@northflank/js-client 0.7.11 → 0.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import e,{EventEmitter as t}from"events";import*as n from"stream";import r,{Transform as i}from"stream";import o from"http";import s,{fileURLToPath as a}from"url";import u from"punycode";import c from"https";import l from"zlib";import d from"os";import*as p from"net";import h,{Socket as f}from"net";import{spawn as v,execSync as m}from"child_process";import b from"fs";import y from"path";import g from"buffer";import w from"tls";import j from"crypto";import _ from"dgram";var S=function(e,t){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},S(e,t)};function P(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var A=function(){return A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},A.apply(this,arguments)};function I(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function C(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function E(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var k="object"==typeof global&&global&&global.Object===Object&&global,U="object"==typeof self&&self&&self.Object===Object&&self,O=k||U||Function("return this")(),x=O.Symbol,D=Object.prototype,R=D.hasOwnProperty,T=D.toString,N=x?x.toStringTag:void 0;var B=Object.prototype.toString;var L="[object Null]",q="[object Undefined]",F=x?x.toStringTag:void 0;function G(e){return null==e?void 0===e?q:L:F&&F in Object(e)?function(e){var t=R.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var i=T.call(e);return r&&(t?e[N]=n:delete e[N]),i}(e):function(e){return B.call(e)}(e)}function M(e){return null!=e&&"object"==typeof e}var J="[object Symbol]";function z(e){return"symbol"==typeof e||M(e)&&G(e)==J}function W(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var $=Array.isArray,V=1/0,H=x?x.prototype:void 0,Y=H?H.toString:void 0;function Z(e){if("string"==typeof e)return e;if($(e))return W(e,Z)+"";if(z(e))return Y?Y.call(e):"";var t=e+"";return"0"==t&&1/e==-V?"-0":t}function K(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function X(e){return e}var Q="[object AsyncFunction]",ee="[object Function]",te="[object GeneratorFunction]",ne="[object Proxy]";function re(e){if(!K(e))return!1;var t=G(e);return t==ee||t==te||t==Q||t==ne}var ie,oe=O["__core-js_shared__"],se=(ie=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||""))?"Symbol(src)_1."+ie:"";var ae=Function.prototype.toString;function ue(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ce=/^\[object .+?Constructor\]$/,le=Function.prototype,de=Object.prototype,pe=le.toString,he=de.hasOwnProperty,fe=RegExp("^"+pe.call(he).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ve(e){return!(!K(e)||(t=e,se&&se in t))&&(re(e)?fe:ce).test(ue(e));var t}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ve(n)?n:void 0}var be=me(O,"WeakMap"),ye=Object.create,ge=function(){function e(){}return function(t){if(!K(t))return{};if(ye)return ye(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var we=Date.now;var je,_e,Se,Pe=function(){try{var e=me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ae=Pe,Ie=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:X,Ce=(je=Ie,_e=0,Se=0,function(){var e=we(),t=16-(e-Se);if(Se=e,t>0){if(++_e>=800)return arguments[0]}else _e=0;return je.apply(void 0,arguments)}),Ee=9007199254740991,ke=/^(?:0|[1-9]\d*)$/;function Ue(e,t){var n=typeof e;return!!(t=null==t?Ee:t)&&("number"==n||"symbol"!=n&&ke.test(e))&&e>-1&&e%1==0&&e<t}function Oe(e,t,n){"__proto__"==t&&Ae?Ae(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function xe(e,t){return e===t||e!=e&&t!=t}var De=Object.prototype.hasOwnProperty;function Re(e,t,n){var r=e[t];De.call(e,t)&&xe(r,n)&&(void 0!==n||t in e)||Oe(e,t,n)}var Te=Math.max;function Ne(e,t){return Ce(function(e,t,n){return t=Te(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Te(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,X),e+"")}var Be=9007199254740991;function Le(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Be}function qe(e){return null!=e&&Le(e.length)&&!re(e)}var Fe=Object.prototype;function Ge(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function Me(e){return M(e)&&"[object Arguments]"==G(e)}var Je=Object.prototype,ze=Je.hasOwnProperty,We=Je.propertyIsEnumerable,$e=Me(function(){return arguments}())?Me:function(e){return M(e)&&ze.call(e,"callee")&&!We.call(e,"callee")};var Ve="object"==typeof exports&&exports&&!exports.nodeType&&exports,He=Ve&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=He&&He.exports===Ve?O.Buffer:void 0,Ze=(Ye?Ye.isBuffer:void 0)||function(){return!1},Ke={};Ke["[object Float32Array]"]=Ke["[object Float64Array]"]=Ke["[object Int8Array]"]=Ke["[object Int16Array]"]=Ke["[object Int32Array]"]=Ke["[object Uint8Array]"]=Ke["[object Uint8ClampedArray]"]=Ke["[object Uint16Array]"]=Ke["[object Uint32Array]"]=!0,Ke["[object Arguments]"]=Ke["[object Array]"]=Ke["[object ArrayBuffer]"]=Ke["[object Boolean]"]=Ke["[object DataView]"]=Ke["[object Date]"]=Ke["[object Error]"]=Ke["[object Function]"]=Ke["[object Map]"]=Ke["[object Number]"]=Ke["[object Object]"]=Ke["[object RegExp]"]=Ke["[object Set]"]=Ke["[object String]"]=Ke["[object WeakMap]"]=!1;var Xe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qe=Xe&&"object"==typeof module&&module&&!module.nodeType&&module,et=Qe&&Qe.exports===Xe&&k.process,tt=function(){try{var e=Qe&&Qe.require&&Qe.require("util").types;return e||et&&et.binding&&et.binding("util")}catch(e){}}(),nt=tt&&tt.isTypedArray,rt=nt?function(e){return function(t){return e(t)}}(nt):function(e){return M(e)&&Le(e.length)&&!!Ke[G(e)]},it=rt,ot=Object.prototype.hasOwnProperty;function st(e,t){var n=$(e),r=!n&&$e(e),i=!n&&!r&&Ze(e),o=!n&&!r&&!i&&it(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=a.length;for(var c in e)!t&&!ot.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ue(c,u))||a.push(c);return a}function at(e,t){return function(n){return e(t(n))}}var ut=at(Object.keys,Object),ct=Object.prototype.hasOwnProperty;function lt(e){return qe(e)?st(e):function(e){if(!Ge(e))return ut(e);var t=[];for(var n in Object(e))ct.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var dt=Object.prototype.hasOwnProperty;function pt(e){if(!K(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ge(e),n=[];for(var r in e)("constructor"!=r||!t&&dt.call(e,r))&&n.push(r);return n}function ht(e){return qe(e)?st(e,!0):pt(e)}var ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vt=/^\w*$/;function mt(e,t){if($(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!z(e))||(vt.test(e)||!ft.test(e)||null!=t&&e in Object(t))}var bt=me(Object,"create");var yt=Object.prototype.hasOwnProperty;var gt=Object.prototype.hasOwnProperty;function wt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jt(e,t){for(var n=e.length;n--;)if(xe(e[n][0],t))return n;return-1}wt.prototype.clear=function(){this.__data__=bt?bt(null):{},this.size=0},wt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wt.prototype.get=function(e){var t=this.__data__;if(bt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return yt.call(t,e)?t[e]:void 0},wt.prototype.has=function(e){var t=this.__data__;return bt?void 0!==t[e]:gt.call(t,e)},wt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bt&&void 0===t?"__lodash_hash_undefined__":t,this};var _t=Array.prototype.splice;function St(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}St.prototype.clear=function(){this.__data__=[],this.size=0},St.prototype.delete=function(e){var t=this.__data__,n=jt(t,e);return!(n<0)&&(n==t.length-1?t.pop():_t.call(t,n,1),--this.size,!0)},St.prototype.get=function(e){var t=this.__data__,n=jt(t,e);return n<0?void 0:t[n][1]},St.prototype.has=function(e){return jt(this.__data__,e)>-1},St.prototype.set=function(e,t){var n=this.__data__,r=jt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Pt=me(O,"Map");function At(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function It(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}It.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(Pt||St),string:new wt}},It.prototype.delete=function(e){var t=At(this,e).delete(e);return this.size-=t?1:0,t},It.prototype.get=function(e){return At(this,e).get(e)},It.prototype.has=function(e){return At(this,e).has(e)},It.prototype.set=function(e,t){var n=At(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Ct="Expected a function";function Et(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Ct);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Et.Cache||It),n}Et.Cache=It;var kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ut=/\\(\\)?/g,Ot=function(e){var t=Et(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(kt,(function(e,n,r,i){t.push(r?i.replace(Ut,"$1"):n||e)})),t})),xt=Ot;function Dt(e){return null==e?"":Z(e)}function Rt(e,t){return $(e)?e:mt(e,t)?[e]:xt(Dt(e))}var Tt=1/0;function Nt(e){if("string"==typeof e||z(e))return e;var t=e+"";return"0"==t&&1/e==-Tt?"-0":t}function Bt(e,t){for(var n=0,r=(t=Rt(t,e)).length;null!=e&&n<r;)e=e[Nt(t[n++])];return n&&n==r?e:void 0}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var qt=x?x.isConcatSpreadable:void 0;function Ft(e){return $(e)||$e(e)||!!(qt&&e&&e[qt])}function Gt(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=Ft),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Gt(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var Mt=at(Object.getPrototypeOf,Object),Jt="[object Object]",zt=Function.prototype,Wt=Object.prototype,$t=zt.toString,Vt=Wt.hasOwnProperty,Ht=$t.call(Object);function Yt(e){var t=this.__data__=new St(e);this.size=t.size}Yt.prototype.clear=function(){this.__data__=new St,this.size=0},Yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yt.prototype.get=function(e){return this.__data__.get(e)},Yt.prototype.has=function(e){return this.__data__.has(e)},Yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof St){var r=n.__data__;if(!Pt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new It(r)}return n.set(e,t),this.size=n.size,this};var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Kt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Kt&&Kt.exports===Zt?O.Buffer:void 0,Qt=Xt?Xt.allocUnsafe:void 0;var en=Object.prototype.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,nn=tn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}(tn(e),(function(t){return en.call(e,t)})))}:function(){return[]};function rn(e){return function(e,t,n){var r=t(e);return $(e)?r:Lt(r,n(e))}(e,lt,nn)}var on=me(O,"DataView"),sn=me(O,"Promise"),an=me(O,"Set"),un="[object Map]",cn="[object Promise]",ln="[object Set]",dn="[object WeakMap]",pn="[object DataView]",hn=ue(on),fn=ue(Pt),vn=ue(sn),mn=ue(an),bn=ue(be),yn=G;(on&&yn(new on(new ArrayBuffer(1)))!=pn||Pt&&yn(new Pt)!=un||sn&&yn(sn.resolve())!=cn||an&&yn(new an)!=ln||be&&yn(new be)!=dn)&&(yn=function(e){var t=G(e),n="[object Object]"==t?e.constructor:void 0,r=n?ue(n):"";if(r)switch(r){case hn:return pn;case fn:return un;case vn:return cn;case mn:return ln;case bn:return dn}return t});var gn=yn,wn=O.Uint8Array;function jn(e,t){var n,r,i=t?(n=e.buffer,r=new n.constructor(n.byteLength),new wn(r).set(new wn(n)),r):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function _n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new It;++t<n;)this.add(e[t])}function Sn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}_n.prototype.add=_n.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},_n.prototype.has=function(e){return this.__data__.has(e)};var Pn=1,An=2;function In(e,t,n,r,i,o){var s=n&Pn,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var c=o.get(e),l=o.get(t);if(c&&l)return c==t&&l==e;var d=-1,p=!0,h=n&An?new _n:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],v=t[d];if(r)var m=s?r(v,f,d,t,e,o):r(f,v,d,e,t,o);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!Sn(t,(function(e,t){if(s=t,!h.has(s)&&(f===e||i(f,e,n,r,o)))return h.push(t);var s}))){p=!1;break}}else if(f!==v&&!i(f,v,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function Cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function En(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var kn=1,Un=2,On="[object Boolean]",xn="[object Date]",Dn="[object Error]",Rn="[object Map]",Tn="[object Number]",Nn="[object RegExp]",Bn="[object Set]",Ln="[object String]",qn="[object Symbol]",Fn="[object ArrayBuffer]",Gn="[object DataView]",Mn=x?x.prototype:void 0,Jn=Mn?Mn.valueOf:void 0;var zn=1,Wn=Object.prototype.hasOwnProperty;var $n=1,Vn="[object Arguments]",Hn="[object Array]",Yn="[object Object]",Zn=Object.prototype.hasOwnProperty;function Kn(e,t,n,r,i,o){var s=$(e),a=$(t),u=s?Hn:gn(e),c=a?Hn:gn(t),l=(u=u==Vn?Yn:u)==Yn,d=(c=c==Vn?Yn:c)==Yn,p=u==c;if(p&&Ze(e)){if(!Ze(t))return!1;s=!0,l=!1}if(p&&!l)return o||(o=new Yt),s||it(e)?In(e,t,n,r,i,o):function(e,t,n,r,i,o,s){switch(n){case Gn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fn:return!(e.byteLength!=t.byteLength||!o(new wn(e),new wn(t)));case On:case xn:case Tn:return xe(+e,+t);case Dn:return e.name==t.name&&e.message==t.message;case Nn:case Ln:return e==t+"";case Rn:var a=Cn;case Bn:var u=r&kn;if(a||(a=En),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=Un,s.set(e,t);var l=In(a(e),a(t),r,i,o,s);return s.delete(e),l;case qn:if(Jn)return Jn.call(e)==Jn.call(t)}return!1}(e,t,u,n,r,i,o);if(!(n&$n)){var h=l&&Zn.call(e,"__wrapped__"),f=d&&Zn.call(t,"__wrapped__");if(h||f){var v=h?e.value():e,m=f?t.value():t;return o||(o=new Yt),i(v,m,n,r,o)}}return!!p&&(o||(o=new Yt),function(e,t,n,r,i,o){var s=n&zn,a=rn(e),u=a.length;if(u!=rn(t).length&&!s)return!1;for(var c=u;c--;){var l=a[c];if(!(s?l in t:Wn.call(t,l)))return!1}var d=o.get(e),p=o.get(t);if(d&&p)return d==t&&p==e;var h=!0;o.set(e,t),o.set(t,e);for(var f=s;++c<u;){var v=e[l=a[c]],m=t[l];if(r)var b=s?r(m,v,l,t,e,o):r(v,m,l,e,t,o);if(!(void 0===b?v===m||i(v,m,n,r,o):b)){h=!1;break}f||(f="constructor"==l)}if(h&&!f){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,o))}function Xn(e,t,n,r,i){return e===t||(null==e||null==t||!M(e)&&!M(t)?e!=e&&t!=t:Kn(e,t,n,r,Xn,i))}var Qn=1,er=2;function tr(e){return e==e&&!K(e)}function nr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function rr(e){var t=function(e){for(var t=lt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,tr(i)]}return t}(e);return 1==t.length&&t[0][2]?nr(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,s=!r;if(null==e)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=n[i])[0],c=e[u],l=a[1];if(s&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Yt;if(r)var p=r(c,l,u,e,t,d);if(!(void 0===p?Xn(l,c,Qn|er,r,d):p))return!1}}return!0}(n,e,t)}}function ir(e,t){return null!=e&&t in Object(e)}function or(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=Rt(t,e)).length,o=!1;++r<i;){var s=Nt(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Le(i)&&Ue(s,i)&&($(e)||$e(e))}(e,t,ir)}var sr=1,ar=2;function ur(e,t){return mt(e)&&tr(t)?nr(Nt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Bt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?or(n,e):Xn(t,r,sr|ar)}}function cr(e){return mt(e)?(t=Nt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Bt(t,e)}}(e);var t}function lr(e){return"function"==typeof e?e:null==e?X:"object"==typeof e?$(e)?ur(e[0],e[1]):rr(e):cr(e)}var dr,pr=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var a=o[dr?s:++r];if(!1===t(i[a],a,i))break}return e};var hr=function(e,t){return function(n,r){if(null==n)return n;if(!qe(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}((function(e,t){return e&&pr(e,t,lt)})),fr=hr;function vr(e,t,n){(void 0!==n&&!xe(e[t],n)||void 0===n&&!(t in e))&&Oe(e,t,n)}function mr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function br(e){return function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],u=r?r(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?Oe(n,a,u):Re(n,a,u)}return n}(e,ht(e))}function yr(e,t,n,r,i,o,s){var a=mr(e,n),u=mr(t,n),c=s.get(u);if(c)vr(e,n,c);else{var l,d=o?o(a,u,n+"",e,t,s):void 0,p=void 0===d;if(p){var h=$(u),f=!h&&Ze(u),v=!h&&!f&&it(u);d=u,h||f||v?$(a)?d=a:M(l=a)&&qe(l)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):f?(p=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=Qt?Qt(n):new e.constructor(n);return e.copy(r),r}(u,!0)):v?(p=!1,d=jn(u,!0)):d=[]:function(e){if(!M(e)||G(e)!=Jt)return!1;var t=Mt(e);if(null===t)return!0;var n=Vt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$t.call(n)==Ht}(u)||$e(u)?(d=a,$e(a)?d=br(a):K(a)&&!re(a)||(d=function(e){return"function"!=typeof e.constructor||Ge(e)?{}:ge(Mt(e))}(u))):p=!1}p&&(s.set(u,d),i(d,u,r,o,s),s.delete(u)),vr(e,n,d)}}function gr(e,t,n,r,i){e!==t&&pr(t,(function(o,s){if(i||(i=new Yt),K(o))yr(e,t,s,n,gr,r,i);else{var a=r?r(mr(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),vr(e,s,a)}}),ht)}var wr=/[\\^$.*+?()[\]{}|]/g,jr=RegExp(wr.source);function _r(e,t){var n=-1,r=qe(e)?Array(e.length):[];return fr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Sr(e,t){return Gt(function(e,t){return($(e)?W:_r)(e,lr(t))}(e,t),1)}function Pr(e,t){return e>t}function Ar(e){return"string"==typeof e||!$(e)&&M(e)&&"[object String]"==G(e)}function Ir(e,t){return e&&e.length?function(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],s=t(o);if(null!=s&&(void 0===a?s==s&&!z(s):n(s,a)))var a=s,u=o}return u}(e,lr(t),Pr):void 0}var Cr,Er=(Cr=function(e,t,n){gr(e,t,n)},Ne((function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=Cr.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!K(n))return!1;var r=typeof t;return!!("number"==r?qe(n)&&Ue(t,n.length):"string"==r&&t in n)&&xe(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var s=t[n];s&&Cr(e,s,n,i)}return e})));function kr(e,t){return e(t={exports:{}},t.exports),t.exports}var Ur={},Or=Ur;function xr(e){return e<0?-1:1}function Dr(e,t){t.unsigned||--e;const n=t.unsigned?0:-Math.pow(2,e),r=Math.pow(2,e)-1,i=t.moduloBitLength?Math.pow(2,t.moduloBitLength):Math.pow(2,e),o=t.moduloBitLength?Math.pow(2,t.moduloBitLength-1):Math.pow(2,e-1);return function(e,s){s||(s={});let a=+e;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=xr(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(e){return e%1==.5&&0==(1&e)?Math.floor(e):Math.round(e)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=xr(a)*Math.floor(Math.abs(a)),a%=i,!t.unsigned&&a>=o)return a-i;if(t.unsigned)if(a<0)a+=i;else if(-0===a)return 0;return a}}Ur.void=function(){},Ur.boolean=function(e){return!!e},Ur.byte=Dr(8,{unsigned:!1}),Ur.octet=Dr(8,{unsigned:!0}),Ur.short=Dr(16,{unsigned:!1}),Ur["unsigned short"]=Dr(16,{unsigned:!0}),Ur.long=Dr(32,{unsigned:!1}),Ur["unsigned long"]=Dr(32,{unsigned:!0}),Ur["long long"]=Dr(32,{unsigned:!1,moduloBitLength:64}),Ur["unsigned long long"]=Dr(32,{unsigned:!0,moduloBitLength:64}),Ur.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},Ur["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},Ur.float=Ur.double,Ur["unrestricted float"]=Ur["unrestricted double"],Ur.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},Ur.ByteString=function(e,t){const n=String(e);let r;for(let e=0;void 0!==(r=n.codePointAt(e));++e)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},Ur.USVString=function(e){const t=String(e),n=t.length,r=[];for(let e=0;e<n;++e){const i=t.charCodeAt(e);if(i<55296||i>57343)r.push(String.fromCodePoint(i));else if(56320<=i&&i<=57343)r.push(String.fromCodePoint(65533));else if(e===n-1)r.push(String.fromCodePoint(65533));else{const n=t.charCodeAt(e+1);if(56320<=n&&n<=57343){const t=1023&i,o=1023&n;r.push(String.fromCodePoint(65536+1024*t+o)),++e}else r.push(String.fromCodePoint(65533))}}return r.join("")},Ur.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},Ur.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var Rr=kr((function(e){e.exports.mixin=function(e,t){const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;++r)Object.defineProperty(e,n[r],Object.getOwnPropertyDescriptor(t,n[r]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(t){return t[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(t){return t[e.exports.implSymbol]}}));Rr.mixin,Rr.wrapperSymbol,Rr.implSymbol,Rr.wrapperForImpl,Rr.implForWrapper;var Tr,Nr=(Tr=Object.freeze({__proto__:null}))&&Tr.default||Tr,Br={TRANSITIONAL:0,NONTRANSITIONAL:1};function Lr(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function qr(e){for(var t=0,n=Nr.length-1;t<=n;){var r=Math.floor((t+n)/2),i=Nr[r];if(i[0][0]<=e&&i[0][1]>=e)return i;i[0][0]>e?n=r-1:t=r+1}return null}var Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Gr(e){return e.replace(Fr,"_").length}var Mr=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function Jr(e,t){"xn--"===e.substr(0,4)&&(e=u.toUnicode(e));var n=!1;(Lr(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(Mr))&&(n=!0);for(var r=Gr(e),i=0;i<r;++i){var o=qr(e.codePointAt(i));if(zr===Br.TRANSITIONAL&&"valid"!==o[1]||zr===Br.NONTRANSITIONAL&&"valid"!==o[1]&&"deviation"!==o[1]){n=!0;break}}return{label:e,error:n}}function zr(e,t,n){var r=function(e,t,n){for(var r=!1,i="",o=Gr(e),s=0;s<o;++s){var a=e.codePointAt(s),u=qr(a);switch(u[1]){case"disallowed":r=!0,i+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":i+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":n===Br.TRANSITIONAL?i+=String.fromCodePoint.apply(String,u[2]):i+=String.fromCodePoint(a);break;case"valid":i+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":t?(r=!0,i+=String.fromCodePoint(a)):i+=String.fromCodePoint.apply(String,u[2]);break;case"disallowed_STD3_valid":t&&(r=!0),i+=String.fromCodePoint(a)}}return{string:i,error:r}}(e,t,n);r.string=Lr(r.string);for(var i=r.string.split("."),o=0;o<i.length;++o)try{var s=Jr(i[o]);i[o]=s.label,r.error=r.error||s.error}catch(e){r.error=!0}return{string:i.join("."),error:r.error}}var Wr={toASCII:function(e,t,n,r){var i=zr(e,t,n),o=i.string.split(".");if(o=o.map((function(e){try{return u.toASCII(e)}catch(t){return i.error=!0,e}})),r){var s=o.slice(0,o.length-1).join(".").length;(s.length>253||0===s.length)&&(i.error=!0);for(var a=0;a<o.length;++a)if(o.length>63||0===o.length){i.error=!0;break}}return i.error?null:o.join(".")},toUnicode:function(e,t){var n=zr(e,t,Br.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Br},$r=kr((function(e){const t={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(e){return u.ucs2.decode(e).length}function i(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function o(e){return e>=48&&e<=57}function s(e){return e>=65&&e<=90||e>=97&&e<=122}function a(e){return o(e)||e>=65&&e<=70||e>=97&&e<=102}function c(e){return"."===e||"%2e"===e.toLowerCase()}function l(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function d(e){return void 0!==t[e]}function p(e){return d(e.scheme)}function h(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function f(e){return e<=31||e>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(e){return f(e)||v.has(e)}const b=new Set([47,58,59,61,64,91,92,93,94,124]);function y(e){return m(e)||b.has(e)}function g(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=h(t[e]);return n}(n):n}function w(e){let t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;return(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?n:parseInt(e,t)}function j(e,t){if("["===e[0])return"]"!==e[e.length-1]?n:function(e){const t=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(e=u.ucs2.decode(e))[c]){if(58!==e[c+1])return n;c+=2,++r,s=r}for(;c<e.length;){if(8===r)return n;if(58===e[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,l=0;for(;l<4&&a(e[c]);)u=16*u+parseInt(i(e,c),16),++c,++l;if(46===e[c]){if(0===l)return n;if(c-=l,r>6)return n;let s=0;for(;void 0!==e[c];){let a=null;if(s>0){if(!(46===e[c]&&s<4))return n;++c}if(!o(e[c]))return n;for(;o(e[c]);){const t=parseInt(i(e,c));if(null===a)a=t;else{if(0===a)return n;a=10*a+t}if(a>255)return n;++c}t[r]=256*t[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===e[c]){if(++c,void 0===e[c])return n}else if(void 0!==e[c])return n;t[r]=u,++r}if(null!==s){let e=r-s;for(r=7;0!==r&&e>0;){const n=t[s+e-1];t[s+e-1]=t[r],t[r]=n,--r,--e}}else if(null===s&&8!==r)return n;return t}(e.substring(1,e.length-1));if(!t)return function(e){if(t=e,-1!==t.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var t;let r="";const i=u.ucs2.decode(e);for(let e=0;e<i.length;++e)r+=g(i[e],f);return r}(e);const r=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&a(t[e+1])&&a(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),s=Wr.toASCII(r,!1,Wr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const r=[];for(const i of t){if(""===i)return e;const t=w(i);if(t===n)return e;r.push(t)}for(let e=0;e<r.length-1;++e)if(r[e]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let i=r.pop(),o=0;for(const e of r)i+=e*Math.pow(256,3-o),++o;return i}(s);return"number"==typeof c||c===n?c:s}function _(e){return"number"==typeof e?function(e){let t="",n=e;for(let e=1;e<=4;++e)t=String(n%256)+t,4!==e&&(t="."+t),n=Math.floor(n/256);return t}(e):e instanceof Array?"["+function(e){let t="";const n=function(e){let t=null,n=1,r=null,i=0;for(let o=0;o<e.length;++o)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),{idx:t,len:n}}(e).idx;let r=!1;for(let i=0;i<=7;++i)r&&0===e[i]||(r&&(r=!1),n!==i?(t+=e[i].toString(16),7!==i&&(t+=":")):(t+=0===i?"::":":",r=!0));return t}(e)+"]":e}function S(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function P(e){return""!==e.username||""!==e.password}function A(e,t,r,i,o){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=r||"utf-8",this.stateOverride=o,this.url=i,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const e=function(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const s=function(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=o||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=u.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),r=this["parse "+this.state](e,t);if(!r)break;if(r===n){this.failure=!0;break}}}A.prototype["parse scheme start"]=function(e,t){if(s(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},A.prototype["parse scheme"]=function(e,t){if(function(e){return s(e)||o(e)}(e)||43===e||45===e||46===e)this.buffer+=t.toLowerCase();else if(58===e){if(this.stateOverride){if(p(this.url)&&!d(this.buffer))return!1;if(!p(this.url)&&d(this.buffer))return!1;if((P(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},A.prototype["parse no scheme"]=function(e){return null===this.base||this.base.cannotBeABaseURL&&35!==e?n:(this.base.cannotBeABaseURL&&35===e?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},A.prototype["parse special relative or authority"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},A.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},A.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,isNaN(e)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===e?this.state="relative slash":63===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):p(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},A.prototype["parse relative slash"]=function(e){return!p(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},A.prototype["parse special authority slashes"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},A.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},A.prototype["parse authority"]=function(e,t){if(64===e){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const e=r(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(58===e&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=g(e,y);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},A.prototype["parse hostname"]=A.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==e||this.arrFlag)if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(P(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=j(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,n;const e=j(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},A.prototype["parse port"]=function(e,r){if(o(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=e===(i=this.url.scheme,t[i])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var i;return!0};const I=new Set([47,92,63,35]);A.prototype["parse file"]=function(e){var t,n;return this.url.scheme="file",47===e||92===e?(92===e&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(e)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(t=e,n=this.input[this.pointer+1],!s(t)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!I.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),S(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},A.prototype["parse file slash"]=function(e){var t;return 47===e||92===e?(92===e&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(t=this.base.path[0]).length&&s(t.codePointAt(0))&&":"===t[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},A.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&l(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=j(this.buffer,p(this.url));if(e===n)return n;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},A.prototype["parse path start"]=function(e){return p(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},A.prototype["parse path"]=function(e){if(isNaN(e)||47===e||p(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(p(this.url)&&92===e&&(this.parseError=!0),!function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!c(this.buffer)||47===e||p(this.url)&&92===e?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&l(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(S(this.url),47===e||p(this.url)&&92===e||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=g(e,m);return!0},A.prototype["parse cannot-be-a-base-URL path"]=function(e){return 63===e?(this.url.query="",this.state="query"):35===e?(this.url.fragment="",this.state="fragment"):(isNaN(e)||37===e||(this.parseError=!0),37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path[0]=this.url.path[0]+g(e,f))),!0},A.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=h(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},A.prototype["parse fragment"]=function(e){return isNaN(e)||(0===e?this.parseError=!0:(37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=g(e,f))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=_(e.host),null!==e.port&&(n+=":"+e.port)):null===e.host&&"file"===e.scheme&&(n+="//"),e.cannotBeABaseURL)n+=e.path[0];else for(const t of e.path)n+="/"+t;return null!==e.query&&(n+="?"+e.query),t||null===e.fragment||(n+="#"+e.fragment),n},e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(e){let t=e.scheme+"://";return t+=_(e.host),null!==e.port&&(t+=":"+e.port),t}({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new A(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?"failure":n.url},e.exports.setTheUsername=function(e,t){e.username="";const n=u.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=g(n[t],y)},e.exports.setThePassword=function(e,t){e.password="";const n=u.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=g(n[t],y)},e.exports.serializeHost=_,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e.cannotBeABaseURL||"file"===e.scheme},e.exports.serializeInteger=function(e){return String(e)},e.exports.parseURL=function(t,n){return void 0===n&&(n={}),e.exports.basicURLParse(t,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));$r.serializeURL,$r.serializeURLOrigin,$r.basicURLParse,$r.setTheUsername,$r.setThePassword,$r.serializeHost,$r.cannotHaveAUsernamePasswordPort,$r.serializeInteger,$r.parseURL;var Vr=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=$r.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const i=$r.basicURLParse(t,{baseURL:r});if("failure"===i)throw new TypeError("Invalid URL");this._url=i}get href(){return $r.serializeURL(this._url)}set href(e){const t=$r.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return $r.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){$r.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){$r.cannotHaveAUsernamePasswordPort(this._url)||$r.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){$r.cannotHaveAUsernamePasswordPort(this._url)||$r.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?$r.serializeHost(e.host):$r.serializeHost(e.host)+":"+$r.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||$r.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":$r.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||$r.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":$r.serializeInteger(this._url.port)}set port(e){$r.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:$r.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],$r.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const t=this._url;if(""===e)return void(t.query=null);const n="?"===e[0]?e.substring(1):e;t.query="",$r.basicURLParse(n,{url:t,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const t="#"===e[0]?e.substring(1):e;this._url.fragment="",$r.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Hr=kr((function(e){const t=Rr.implSymbol;function n(r){if(!this||this[t]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const i=[];for(let e=0;e<arguments.length&&e<2;++e)i[e]=arguments[e];i[0]=Or.USVString(i[0]),void 0!==i[1]&&(i[1]=Or.USVString(i[1])),e.exports.setup(this,i)}n.prototype.toJSON=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let e=0;e<arguments.length&&e<0;++e)n[e]=arguments[e];return this[t].toJSON.apply(this[t],n)},Object.defineProperty(n.prototype,"href",{get(){return this[t].href},set(e){e=Or.USVString(e),this[t].href=e},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[t].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[t].protocol},set(e){e=Or.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=Or.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=Or.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=Or.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=Or.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=Or.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=Or.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=Or.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=Or.USVString(e),this[t].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[t]instanceof Vr,create(e,t){let r=Object.create(n.prototype);return this.setup(r,e,t),r},setup(e,n,r){r||(r={}),r.wrapper=e,e[t]=new Vr(n,r),e[t][Rr.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Hr.is,Hr.create,Hr.setup,Hr.expose;var Yr={URL:Hr.interface,serializeURL:$r.serializeURL,serializeURLOrigin:$r.serializeURLOrigin,basicURLParse:$r.basicURLParse,setTheUsername:$r.setTheUsername,setThePassword:$r.setThePassword,serializeHost:$r.serializeHost,serializeInteger:$r.serializeInteger,parseURL:$r.parseURL};const Zr=r.Readable,Kr=Symbol("buffer"),Xr=Symbol("type");class Qr{constructor(){this[Xr]="";const e=arguments[0],t=arguments[1],n=[];let r=0;if(e){const t=e,i=Number(t.length);for(let e=0;e<i;e++){const i=t[e];let o;o=i instanceof Buffer?i:ArrayBuffer.isView(i)?Buffer.from(i.buffer,i.byteOffset,i.byteLength):i instanceof ArrayBuffer?Buffer.from(i):i instanceof Qr?i[Kr]:Buffer.from("string"==typeof i?i:String(i)),r+=o.length,n.push(o)}}this[Kr]=Buffer.concat(n);let i=t&&void 0!==t.type&&String(t.type).toLowerCase();i&&!/[^\u0020-\u007E]/.test(i)&&(this[Xr]=i)}get size(){return this[Kr].length}get type(){return this[Xr]}text(){return Promise.resolve(this[Kr].toString())}arrayBuffer(){const e=this[Kr],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new Zr;return e._read=function(){},e.push(this[Kr]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],n=arguments[1];let r,i;r=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),i=void 0===n?e:n<0?Math.max(e+n,0):Math.min(n,e);const o=Math.max(i-r,0),s=this[Kr].slice(r,r+o),a=new Qr([],{type:arguments[2]});return a[Kr]=s,a}}function ei(e,t,n){Error.call(this,e),this.message=e,this.type=t,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let ti;Object.defineProperties(Qr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Qr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),ei.prototype=Object.create(Error.prototype),ei.prototype.constructor=ei,ei.prototype.name="FetchError";try{ti=require("encoding").convert}catch(e){}const ni=Symbol("Body internals"),ri=r.PassThrough;function ii(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.size;let o=void 0===i?0:i;var s=n.timeout;let a=void 0===s?0:s;null==e?e=null:si(e)?e=Buffer.from(e.toString()):ai(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof r||(e=Buffer.from(String(e)))),this[ni]={body:e,disturbed:!1,error:null},this.size=o,this.timeout=a,e instanceof r&&e.on("error",(function(e){const n="AbortError"===e.name?e:new ei(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[ni].error=n}))}function oi(){var e=this;if(this[ni].disturbed)return ii.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[ni].disturbed=!0,this[ni].error)return ii.Promise.reject(this[ni].error);let t=this.body;if(null===t)return ii.Promise.resolve(Buffer.alloc(0));if(ai(t)&&(t=t.stream()),Buffer.isBuffer(t))return ii.Promise.resolve(t);if(!(t instanceof r))return ii.Promise.resolve(Buffer.alloc(0));let n=[],i=0,o=!1;return new ii.Promise((function(r,s){let a;e.timeout&&(a=setTimeout((function(){o=!0,s(new ei(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(o=!0,s(t)):s(new ei(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!o&&null!==t){if(e.size&&i+t.length>e.size)return o=!0,void s(new ei(`content size at ${e.url} over limit: ${e.size}`,"max-size"));i+=t.length,n.push(t)}})),t.on("end",(function(){if(!o){clearTimeout(a);try{r(Buffer.concat(n,i))}catch(t){s(new ei(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function si(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function ai(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function ui(e){let t,n,i=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof r&&"function"!=typeof i.getBoundary&&(t=new ri,n=new ri,i.pipe(t),i.pipe(n),e[ni].body=t,i=n),i}function ci(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":si(e)?"application/x-www-form-urlencoded;charset=UTF-8":ai(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof r?null:"text/plain;charset=UTF-8"}function li(e){const t=e.body;return null===t?0:ai(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}ii.prototype={get body(){return this[ni].body},get bodyUsed(){return this[ni].disturbed},arrayBuffer(){return oi.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return oi.call(this).then((function(t){return Object.assign(new Qr([],{type:e.toLowerCase()}),{[Kr]:t})}))},json(){var e=this;return oi.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return ii.Promise.reject(new ei(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return oi.call(this).then((function(e){return e.toString()}))},buffer(){return oi.call(this)},textConverted(){var e=this;return oi.call(this).then((function(t){return function(e,t){if("function"!=typeof ti)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=t.get("content-type");let r,i,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));i=e.slice(0,1024).toString(),!r&&i&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(i));!r&&i&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(i),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(i),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&i&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(i));r&&(o=r.pop(),"gb2312"!==o&&"gbk"!==o||(o="gb18030"));return ti(e,"UTF-8",o).toString()}(t,e.headers)}))}},Object.defineProperties(ii.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),ii.mixIn=function(e){for(const t of Object.getOwnPropertyNames(ii.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(ii.prototype,t);Object.defineProperty(e,t,n)}},ii.Promise=global.Promise;const di=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,pi=/[^\t\x20-\x7e\x80-\xff]/;function hi(e){if(e=`${e}`,di.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function fi(e){if(e=`${e}`,pi.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function vi(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const mi=Symbol("map");class bi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[mi]=Object.create(null),e instanceof bi){const t=e.raw(),n=Object.keys(t);for(const e of n)for(const n of t[e])this.append(e,n)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const n=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(t))}for(const e of n){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const n=e[t];this.append(t,n)}}}}get(e){hi(e=`${e}`);const t=vi(this[mi],e);return void 0===t?null:this[mi][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=yi(this),r=0;for(;r<n.length;){var i=n[r];const o=i[0],s=i[1];e.call(t,s,o,this),n=yi(this),r++}}set(e,t){t=`${t}`,hi(e=`${e}`),fi(t);const n=vi(this[mi],e);this[mi][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,hi(e=`${e}`),fi(t);const n=vi(this[mi],e);void 0!==n?this[mi][n].push(t):this[mi][e]=[t]}has(e){return hi(e=`${e}`),void 0!==vi(this[mi],e)}delete(e){hi(e=`${e}`);const t=vi(this[mi],e);void 0!==t&&delete this[mi][t]}raw(){return this[mi]}keys(){return wi(this,"key")}values(){return wi(this,"value")}[Symbol.iterator](){return wi(this,"key+value")}}function yi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[mi]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[mi][t].join(", ")}:function(t){return[t.toLowerCase(),e[mi][t].join(", ")]})}bi.prototype.entries=bi.prototype[Symbol.iterator],Object.defineProperty(bi.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(bi.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const gi=Symbol("internal");function wi(e,t){const n=Object.create(ji);return n[gi]={target:e,kind:t,index:0},n}const ji=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==ji)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[gi];const t=e.target,n=e.kind,r=e.index,i=yi(t,n);return r>=i.length?{value:void 0,done:!0}:(this[gi].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function _i(e){const t=Object.assign({__proto__:null},e[mi]),n=vi(e[mi],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(ji,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Si=Symbol("Response internals"),Pi=o.STATUS_CODES;class Ai{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ii.call(this,e,t);const n=t.status||200,r=new bi(t.headers);if(null!=e&&!r.has("Content-Type")){const t=ci(e);t&&r.append("Content-Type",t)}this[Si]={url:t.url,status:n,statusText:t.statusText||Pi[n],headers:r,counter:t.counter}}get url(){return this[Si].url||""}get status(){return this[Si].status}get ok(){return this[Si].status>=200&&this[Si].status<300}get redirected(){return this[Si].counter>0}get statusText(){return this[Si].statusText}get headers(){return this[Si].headers}clone(){return new Ai(ui(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}ii.mixIn(Ai.prototype),Object.defineProperties(Ai.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Ai.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Ii=Symbol("Request internals"),Ci=s.URL||Yr.URL,Ei=s.parse,ki=s.format;function Ui(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new Ci(e).toString()),Ei(e)}const Oi="destroy"in r.Readable.prototype;function xi(e){return"object"==typeof e&&"object"==typeof e[Ii]}class Di{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};xi(e)?t=Ui(e.url):(t=e&&e.href?Ui(e.href):Ui(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||xi(e)&&null!==e.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:xi(e)&&null!==e.body?ui(e):null;ii.call(this,i,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const o=new bi(n.headers||e.headers||{});if(null!=i&&!o.has("Content-Type")){const e=ci(i);e&&o.append("Content-Type",e)}let s=xi(e)?e.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Ii]={method:r,redirect:n.redirect||e.redirect||"follow",headers:o,parsedURL:t,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[Ii].method}get url(){return ki(this[Ii].parsedURL)}get headers(){return this[Ii].headers}get redirect(){return this[Ii].redirect}get signal(){return this[Ii].signal}clone(){return new Di(this)}}function Ri(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}ii.mixIn(Di.prototype),Object.defineProperty(Di.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Di.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Ri.prototype=Object.create(Error.prototype),Ri.prototype.constructor=Ri,Ri.prototype.name="AbortError";const Ti=s.URL||Yr.URL,Ni=r.PassThrough;function Bi(e,t){if(!Bi.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return ii.Promise=Bi.Promise,new Bi.Promise((function(n,i){const s=new Di(e,t),a=function(e){const t=e[Ii].parsedURL,n=new bi(e[Ii].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof r.Readable&&!Oi)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let i=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(i="0"),null!=e.body){const t=li(e);"number"==typeof t&&(i=String(t))}i&&n.set("Content-Length",i),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=e.agent;return"function"==typeof o&&(o=o(t)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},t,{method:e.method,headers:_i(n),agent:o})}(s),u=("https:"===a.protocol?c:o).request,d=s.signal;let p=null;const h=function(){let e=new Ri("The user aborted a request.");i(e),s.body&&s.body instanceof r.Readable&&Li(s.body,e),p&&p.body&&p.body.emit("error",e)};if(d&&d.aborted)return void h();const f=function(){h(),b()},v=u(a);let m;function b(){v.abort(),d&&d.removeEventListener("abort",f),clearTimeout(m)}d&&d.addEventListener("abort",f),s.timeout&&v.once("socket",(function(e){m=setTimeout((function(){i(new ei(`network timeout at: ${s.url}`,"request-timeout")),b()}),s.timeout)})),v.on("error",(function(e){i(new ei(`request to ${s.url} failed, reason: ${e.message}`,"system",e)),p&&p.body&&Li(p.body,e),b()})),function(e,t){let n;e.on("socket",(function(e){n=e})),e.on("response",(function(e){const r=e.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||e.once("close",(function(e){if(n.listenerCount("data")>0&&!e){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",t(e)}}))}))}(v,(function(e){d&&d.aborted||p&&p.body&&Li(p.body,e)})),parseInt(process.version.substring(1))<14&&v.on("socket",(function(e){e.addListener("close",(function(t){const n=e.listenerCount("data")>0;if(p&&n&&!t&&(!d||!d.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",e)}}))})),v.on("response",(function(e){clearTimeout(m);const t=function(e){const t=new bi;for(const n of Object.keys(e))if(!di.test(n))if(Array.isArray(e[n]))for(const r of e[n])pi.test(r)||(void 0===t[mi][n]?t[mi][n]=[r]:t[mi][n].push(r));else pi.test(e[n])||(t[mi][n]=[e[n]]);return t}(e.headers);if(Bi.isRedirect(e.statusCode)){const o=t.get("Location");let a=null;try{a=null===o?null:new Ti(o,s.url).toString()}catch(e){if("manual"!==s.redirect)return i(new ei(`uri requested responds with an invalid redirect URL: ${o}`,"invalid-redirect")),void b()}switch(s.redirect){case"error":return i(new ei(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void b();case"manual":if(null!==a)try{t.set("Location",a)}catch(e){i(e)}break;case"follow":if(null===a)break;if(s.counter>=s.follow)return i(new ei(`maximum redirect reached at: ${s.url}`,"max-redirect")),void b();const o={headers:new bi(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(e,t){const n=new Ti(t).hostname,r=new Ti(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,a)||(r=s.url,new Ti(a).protocol!==new Ti(r).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])o.headers.delete(e);return 303!==e.statusCode&&s.body&&null===li(s)?(i(new ei("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==s.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),n(Bi(new Di(a,o))),void b())}}var r;e.once("end",(function(){d&&d.removeEventListener("abort",f)}));let o=e.pipe(new Ni);const a={url:s.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:s.size,timeout:s.timeout,counter:s.counter},u=t.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===u||204===e.statusCode||304===e.statusCode)return p=new Ai(o,a),void n(p);const c={flush:l.Z_SYNC_FLUSH,finishFlush:l.Z_SYNC_FLUSH};if("gzip"==u||"x-gzip"==u)return o=o.pipe(l.createGunzip(c)),p=new Ai(o,a),void n(p);if("deflate"==u||"x-deflate"==u){const t=e.pipe(new Ni);return t.once("data",(function(e){o=8==(15&e[0])?o.pipe(l.createInflate()):o.pipe(l.createInflateRaw()),p=new Ai(o,a),n(p)})),void t.on("end",(function(){p||(p=new Ai(o,a),n(p))}))}if("br"==u&&"function"==typeof l.createBrotliDecompress)return o=o.pipe(l.createBrotliDecompress()),p=new Ai(o,a),void n(p);p=new Ai(o,a),n(p)})),function(e,t){const n=t.body;null===n?e.end():ai(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(v,s)}))}function Li(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}Bi.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Bi.Promise=global.Promise;var qi=function(){function e(e){this.contextProvider=e}return e.prototype.getServiceDetails=function(e,t){return I(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/services/").concat(t))]}))}))},e.prototype.getAddonDetails=function(e,t){return I(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/addons/").concat(t))]}))}))},e.prototype.fetch=function(e,t){return I(this,void 0,void 0,(function(){var n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:return n=Er({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},A({},t)),[4,Bi(e,n)];case 1:return(r=a.sent()).ok?[3,3]:(i=Error.bind,s=(o=JSON).stringify,[4,r.json()]);case 2:throw new(i.apply(Error,[void 0,s.apply(o,[a.sent()])]));case 3:return[4,r.json()];case 4:return[2,a.sent()]}}))}))},e}(),Fi=function(e,t,n){return I(void 0,void 0,void 0,(function(){var r,i,o,s,a;return C(this,(function(u){switch(u.label){case 0:if(r=Ji(t||"127.0.0.1"),(i=Ji(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===d.platform()&&(o=function(e){return I(void 0,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,Mi.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=i?(a=zi(s),[4,Gi(e,a)]):[3,6];case 2:return u.sent()?o?[4,o(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(e,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}}))}))},Gi=function(e,t){return new Promise((function(n){var r=new f,i=!1;r.on("connect",(function(){i=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){i=!1,r.destroy()})),r.on("error",(function(){i=!1})),r.on("close",(function(){n(!i)})),t?r.connect(e,t):r.connect(e)}))},Mi=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return I(void 0,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return"/sbin/ifconfig",[4,Wi("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},Ji=function(e){var t=e.split(".").reverse();if(4!==t.length)throw new Error("Invalid ip address: ".concat(e));for(var n=0,r=0;r<4;r+=1){var i=Number.parseInt(t[r],10);if(i<0||i>255)throw new Error("Invalid ip address: ".concat(e));n+=i<<8*r}return n},zi=function(e){if(!Number.isSafeInteger(e))throw new Error("Number is not an integer");if(e<0||e>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var t=[],n=0;n<4;n+=1)t.push(e>>8*n&255);return t.reverse().join(".")},Wi=function(e,t,n){var r=v(e,t,A({windowsHide:!0},n)),i=new Promise((function(i,o){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(e){s+=e})),r.stderr&&r.stderr.on("data",(function(e){a+=e}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(a);o({message:u,result:r})}else i(r)}))}));return{process:r,resultPromise:i}},$i=function(e,t,n){return I(void 0,void 0,void 0,(function(){var r,i;return C(this,(function(o){switch(o.label){case 0:return r=Vi(e,10),[4,b.promises.writeFile(r,t,n)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,4,,6]),[4,b.promises.rename(r,e)];case 3:return o.sent(),[3,6];case 4:return i=o.sent(),[4,b.promises.unlink(r).catch((function(){}))];case 5:throw o.sent(),i;case 6:return[2]}}))}))},Vi=function(e,t){for(var n,r=y.dirname(e),i=y.basename(e),o=0;null===(n=o<t)||void 0===n||n;o+=1){var s=E([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(i),u=y.join(r,a);if(!b.existsSync(u))return u}throw new Error("Could not write file to file '".concat(e,"'."))},Hi="win32"===process.platform?"\r\n":"\n",Yi=function(){function e(e,t){this.nodes=e,this.config=t}return e.prototype.add=function(e,t,n){var r=this;if(0===t.length)return this;var i=this.findOrCreateEntry(e,n);return t.forEach((function(e){if(!i.hosts.find((function(t){return t.host===e}))){var t=1;0===i.hosts.length&&(t=r.config.indent-"".concat(i.ipPrefixWhitespace).concat(i.ip).length),i.hosts.push({whitespace:" ".repeat(t<1?1:t),host:e})}})),this},e.prototype.remove=function(e,t){var n=this;return this.findEntries(e).forEach((function(e){t.forEach((function(t){var r=e.hosts.findIndex((function(e){return e.host===t}));r<0||(0===r&&void 0!==e.hosts[1]&&(e.hosts[1].whitespace=e.hosts[0].whitespace),e.hosts.splice(r,1),0===e.hosts.length&&n.removeEntry(e))}))})),this},e.prototype.removeHosts=function(e){var t=this;no(this.nodes,"entry").forEach((function(n){t.remove(n.ip,e)}))},e.prototype.removeIps=function(e){var t=this;return e.forEach((function(e){t.findEntries(e).forEach((function(e){return t.removeEntry(e)}))})),this},e.prototype.resolveHosts=function(e){return Sr(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return no(this.nodes,"entry").filter((function(t){return t.hosts.some((function(t){return t.host===e}))})).map((function(e){return e.ip}))},e.prototype.toString=function(){return Qi(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||M(t)&&"[object Number]"==G(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return no(this.nodes,"entry").filter((function(t){return t.ip===e}))},e.prototype.findOrCreateEntry=function(e,t){var n=this.findEntries(e)[0];if(n)return n;var r=this.makeEntry(e);if(t){var i=Xi(t),o=this.nodes.findIndex((function(e){return"comment"===e.type&&e.line===i}));if(o>=0)this.insertAt(o+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[Zi(),Ki(i),r]:[Ki(i),r];this.insertAt.apply(this,E([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},e.prototype.insertAt=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.nodes).splice.apply(t,E([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return A({type:"entry",ip:e,ipPrefixWhitespace:n,hosts:[]},t)},e.fromNodes=function(t,n){var r,i;return new e(t.filter((function(e){return"eol"!==e.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var e,n=no(t,"eol").map((function(e){return e.line}));return null!==(e=ro(n))&&void 0!==e?e:Hi}(),indent:null!==(i=null==n?void 0:n.indent)&&void 0!==i?i:function(){var e,n=Sr(no(t,"entry"),(function(e){var t=e.ipPrefixWhitespace,n=e.ip,r=e.hosts[0];return r?["".concat(t).concat(n).concat(r.whitespace).length]:[]}));return null!==(e=ro(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(eo(e),t)},e}(),Zi=function(){return{type:"blank",line:""}},Ki=function(e){return{type:"comment",line:Xi(e)}},Xi=function(e){return e.startsWith("#")?e:"# ".concat(e)},Qi=function(e,t){var n=e.map((function(e){switch(e.type){case"entry":var t=e.hosts.map((function(e){var t=e.whitespace,n=e.host;return"".concat(t).concat(n)})).join("");return"".concat(e.ipPrefixWhitespace).concat(e.ip).concat(t);case"blank":case"comment":case"invalid":return e.line;default:return""}}));return n.join(null!=t?t:Hi)},eo=function(e){return e.split(/(\r?\n)/).map((function(e){return function(e){return e.match(/^\s*#.*$/)}(e)?{type:"comment",line:e}:function(e){return e.match(/^(\r?\n)$/)}(e)?{type:"eol",line:e}:function(e){return e.match(/^\s*$/)}(e)?{type:"blank",line:e}:to(e)}))},to=function(e){var t=e.match(/^(\s*)(\S+)(.+)?$/);if(!t)return{type:"invalid",line:e};var n=t[1],r=t[2],i=t.slice(3),o=!1,s=Sr(i.filter((function(e){return void 0!==e})),(function(e){var t=e.match(/(\s+)(\S+)/g);return t?t.map((function(e){var t=e.match(/^(\s+)(\S+)$/);t||(o=!0);var n=null!=t?t:[];return{whitespace:n[1],host:n[2]}})):(o=!0,[])}));return o?{type:"invalid",line:e}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},no=function(e,t){return e.filter((function(e){return e.type===t}))},ro=function(e){var t=new Map;e.forEach((function(e){var n;t.set(e,(null!==(n=t.get(e))&&void 0!==n?n:0)+1)}));var n=Ir(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},io="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",oo=function(){function e(e){this.ast=Yi.fromNodes([]);var t={writeMode:"atomic",hostsFile:io};this.config=A(A({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Ar(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Ar(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.add(e,t,this.config.header),this},e.prototype.remove=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Ar(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Ar(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.remove(e,t),this},e.prototype.removeHosts=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach((function(e){if(!Ar(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.removeHosts(e),this},e.prototype.removeIps=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach((function(e){if(!Ar(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."))})),this.ast.removeIps(e),this},e.prototype.read=function(){return I(this,void 0,void 0,(function(){var e;return C(this,(function(t){switch(t.label){case 0:return[4,b.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=Yi.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return I(this,void 0,void 0,(function(){var t,n,r,i;return C(this,(function(o){switch(o.label){case 0:switch(t=A(A({},this.config),e),n=t.hostsFile,r=t.writeMode,i=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,$i(n,i)];case 2:case 4:return o.sent(),[3,6];case 3:return[4,b.promises.writeFile(n,i)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return I(this,void 0,void 0,(function(){var t,n,r,i;return C(this,(function(o){switch(o.label){case 0:return b.existsSync(this.config.hostsFile)?(t=y.dirname(this.config.hostsFile),n=y.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),i=y.resolve(t,r),b.existsSync(i)&&!e.rewrite?[3,2]:[4,b.promises.copyFile(this.config.hostsFile,i)]):[2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},e.load=function(t){return I(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),so=function(){function e(){this.previousPromise=Promise.resolve()}return e.prototype.enter=function(e){return I(this,void 0,void 0,(function(){var t;return C(this,(function(n){return t=this.previousPromise.then((function(){return e()})).catch((function(){return e()})),this.previousPromise=t,[2,t]}))}))},e}(),ao=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}};var uo=ao(lo),co=ao(po);function lo(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function po(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}lo.proto=lo((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return lo(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return po(this)},configurable:!0})})),uo.strict=co;var ho=function(){},fo=function(e,t,n){if("function"==typeof t)return fo(e,null,t);t||(t={}),n=uo(n||ho);var r=e._writableState,i=e._readableState,o=t.readable||!1!==t.readable&&e.readable,s=t.writable||!1!==t.writable&&e.writable,a=!1,u=function(){e.writable||c()},c=function(){s=!1,o||n.call(e)},l=function(){o=!1,s||n.call(e)},d=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},p=function(t){n.call(e,t)},h=function(){process.nextTick(f)},f=function(){if(!a)return(!o||i&&i.ended&&!i.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},v=function(){e.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?s&&!r&&(e.on("end",u),e.on("close",u)):(e.on("complete",c),e.on("abort",h),e.req?v():e.on("request",v)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",d),e.on("end",l),e.on("finish",c),!1!==t.error&&e.on("error",p),e.on("close",h),function(){a=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",v),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",d),e.removeListener("end",l),e.removeListener("error",p),e.removeListener("close",h)}},vo=fo,mo=function(){},bo=/^v?\.0/.test(process.version),yo=function(e){return"function"==typeof e},go=function(e,t,n,r){r=uo(r);var i=!1;e.on("close",(function(){i=!0})),vo(e,{readable:t,writable:n},(function(e){if(e)return r(e);i=!0,r()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return!!bo&&!!b&&(e instanceof(b.ReadStream||mo)||e instanceof(b.WriteStream||mo))&&yo(e.close)}(e)?e.close(mo):function(e){return e.setHeader&&yo(e.abort)}(e)?e.abort():yo(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},wo=function(e){e()},jo=function(e,t){return e.pipe(t)},_o=function(){var e,t=Array.prototype.slice.call(arguments),n=yo(t[t.length-1]||mo)&&t.pop()||mo;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(i,o){var s=o<t.length-1;return go(i,s,o>0,(function(t){e||(e=t),t&&r.forEach(wo),s||(r.forEach(wo),n(e))}))}));return t.reduce(jo)};const{Duplex:So}=r;function Po(e){e.emit("close")}function Ao(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Io(e){this.removeListener("error",Io),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Co=function(e,t){let n=!0;const r=new So({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,n){const i=!n&&r._readableState.objectMode?t.toString():t;r.push(i)||e.pause()})),e.once("error",(function(e){r.destroyed||(n=!1,r.destroy(e))})),e.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(t,i){if(e.readyState===e.CLOSED)return i(t),void process.nextTick(Po,r);let o=!1;e.once("error",(function(e){o=!0,i(e)})),e.once("close",(function(){o||i(t),process.nextTick(Po,r)})),n&&e.terminate()},r._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){r._final(t)}))},r._read=function(){e.isPaused&&e.resume()},r._write=function(t,n,i){e.readyState!==e.CONNECTING?e.send(t,i):e.once("open",(function(){r._write(t,n,i)}))},r.on("end",Ao),r.on("error",Io),r},Eo={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},ko="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},Uo=process.config&&process.config.variables||{},Oo=!!process.env.PREBUILDS_ONLY,xo=process.versions.modules,Do=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",Ro=process.env.npm_config_arch||d.arch(),To=process.env.npm_config_platform||d.platform(),No=process.env.LIBC||(function(e){return"linux"===e&&b.existsSync("/etc/alpine-release")}(To)?"musl":"glibc"),Bo=process.env.ARM_VERSION||("arm64"===Ro?"8":Uo.arm_version)||"",Lo=(process.versions.uv||"").split(".")[0],qo=Fo;function Fo(e){return ko(Fo.resolve(e))}function Go(e){try{return b.readdirSync(e)}catch(e){return[]}}function Mo(e,t){var n=Go(e).filter(t);return n[0]&&y.join(e,n[0])}function Jo(e){return/\.node$/.test(e)}function zo(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function Wo(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function $o(e,t){return e.architectures.length-t.architectures.length}function Vo(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function Ho(e,t){return function(n){return null!=n&&(!(n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n))&&(!(n.abi!==t&&!n.napi)&&((!n.uv||n.uv===Lo)&&((!n.armv||n.armv===Bo)&&(!n.libc||n.libc===No)))))}}function Yo(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}Fo.resolve=Fo.path=function(e){e=y.resolve(e||".");try{var t=ko(y.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!Oo){var n=Mo(y.join(e,"build/Release"),Jo);if(n)return n;var r=Mo(y.join(e,"build/Debug"),Jo);if(r)return r}var i=a(e);if(i)return i;var o=a(y.dirname(process.execPath));if(o)return o;var s=["platform="+To,"arch="+Ro,"runtime="+Do,"abi="+xo,"uv="+Lo,Bo?"armv="+Bo:"","libc="+No,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+e+"\n");function a(e){var t=Go(y.join(e,"prebuilds")).map(zo).filter(Wo(To,Ro)).sort($o)[0];if(t){var n=y.join(e,"prebuilds",t.name),r=Go(n).map(Vo).filter(Ho(Do,xo)).sort(Yo(Do))[0];return r?y.join(n,r.file):void 0}}},Fo.parseTags=Vo,Fo.matchTags=Ho,Fo.compareTags=Yo,Fo.parseTuple=zo,Fo.matchTuple=Wo,Fo.compareTuples=$o;var Zo=kr((function(e){"function"==typeof process.addon?e.exports=process.addon.bind(process):e.exports=qo}));var Ko={mask:(e,t,n,r,i)=>{for(var o=0;o<i;o++)n[r+o]=e[o]^t[3&o]},unmask:(e,t)=>{const n=e.length;for(var r=0;r<n;r++)e[r]^=t[3&r]}},Xo=kr((function(e){try{e.exports=Zo(__dirname)}catch(t){e.exports=Ko}})),Qo=kr((function(e){const{EMPTY_BUFFER:t}=Eo,n=Buffer[Symbol.species];function r(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[o]^t[3&o]}function i(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(e.exports={concat:function(e,r){if(0===e.length)return t;if(1===e.length)return e[0];const i=Buffer.allocUnsafe(r);let o=0;for(let t=0;t<e.length;t++){const n=e[t];i.set(n,o),o+=n.length}return o<r?new n(i.buffer,i.byteOffset,o):i},mask:r,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let r;return t instanceof ArrayBuffer?r=new n(t):ArrayBuffer.isView(t)?r=new n(t.buffer,t.byteOffset,t.byteLength):(r=Buffer.from(t),e.readOnly=!1),r},unmask:i},!process.env.WS_NO_BUFFER_UTIL)try{const t=Xo;e.exports.mask=function(e,n,i,o,s){s<48?r(e,n,i,o,s):t.mask(e,n,i,o,s)},e.exports.unmask=function(e,n){e.length<32?i(e,n):t.unmask(e,n)}}catch(e){}}));Qo.concat,Qo.mask,Qo.toArrayBuffer,Qo.toBuffer,Qo.unmask;const es=Symbol("kDone"),ts=Symbol("kRun");var ns=class{constructor(e){this[es]=()=>{this.pending--,this[ts]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ts]()}[ts](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[es])}}};const{kStatusCode:rs}=Eo,is=Buffer[Symbol.species],os=Buffer.from([0,0,255,255]),ss=Symbol("permessage-deflate"),as=Symbol("total-length"),us=Symbol("callback"),cs=Symbol("buffers"),ls=Symbol("error");let ds;var ps=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!ds){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;ds=new ns(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[us];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n}))})),e}decompress(e,t,n){ds.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){ds.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const r=this._isServer?"client":"server";if(!this._inflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?l.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=l.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[ss]=this,this._inflate[as]=0,this._inflate[cs]=[],this._inflate.on("error",vs),this._inflate.on("data",fs)}this._inflate[us]=n,this._inflate.write(e),t&&this._inflate.write(os),this._inflate.flush((()=>{const e=this._inflate[ls];if(e)return this._inflate.close(),this._inflate=null,void n(e);const i=Qo.concat(this._inflate[cs],this._inflate[as]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[as]=0,this._inflate[cs]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,i)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?l.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=l.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[as]=0,this._deflate[cs]=[],this._deflate.on("data",hs)}this._deflate[us]=n,this._deflate.write(e),this._deflate.flush(l.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=Qo.concat(this._deflate[cs],this._deflate[as]);t&&(e=new is(e.buffer,e.byteOffset,e.length-4)),this._deflate[us]=null,this._deflate[as]=0,this._deflate[cs]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function hs(e){this[cs].push(e),this[as]+=e.length}function fs(e){this[as]+=e.length,this[ss]._maxPayload<1||this[as]<=this[ss]._maxPayload?this[cs].push(e):(this[ls]=new RangeError("Max payload size exceeded"),this[ls].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ls][rs]=1009,this.removeListener("data",fs),this.reset())}function vs(e){this[ss]._inflate=null,e[rs]=1007,this[us](e)}var ms=function(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0},bs=kr((function(e){try{e.exports=Zo(__dirname)}catch(t){e.exports=ms}})),ys=kr((function(e){const{isUtf8:t}=g;function n(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0}if(e.exports={isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:n,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},t)e.exports.isValidUTF8=function(e){return e.length<24?n(e):t(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const t=bs;e.exports.isValidUTF8=function(e){return e.length<32?n(e):t(e)}}catch(e){}}));ys.isValidStatusCode,ys.isValidUTF8,ys.tokenChars;const{Writable:gs}=r,{BINARY_TYPES:ws,EMPTY_BUFFER:js,kStatusCode:_s,kWebSocket:Ss}=Eo,{concat:Ps,toArrayBuffer:As,unmask:Is}=Qo,{isValidStatusCode:Cs,isValidUTF8:Es}=ys,ks=Buffer[Symbol.species];var Us=class extends gs{constructor(e={}){super(),this._binaryType=e.binaryType||ws[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Ss]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=new ks(t.buffer,t.byteOffset+e,t.length-e),new ks(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new ks(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,Os(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const t=64==(64&e[0]);if(t&&!this._extensions[ps.extensionName])return this._loop=!1,Os(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,Os(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Os(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,Os(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,Os(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,Os(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,Os(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return this._loop=!1,Os(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),this._isServer){if(!this._masked)return this._loop=!1,Os(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Os(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,Os(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Os(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=js;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&0!=(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Is(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[ps.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(Os(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return t(r);this.startLoop(t)}))}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?Ps(t,e):"arraybuffer"===this._binaryType?As(Ps(t,e)):t,this.emit("message",n,!0)}else{const n=Ps(t,e);if(!this._skipUTF8Validation&&!Es(n))return this._loop=!1,Os(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,js),this.end();else{const t=e.readUInt16BE(0);if(!Cs(t))return Os(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=new ks(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Es(n))return Os(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,n),this.end()}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}};function Os(e,t,n,r,i){const o=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,Os),o.code=i,o[_s]=r,o}const{randomFillSync:xs}=j,{EMPTY_BUFFER:Ds}=Eo,{isValidStatusCode:Rs}=ys,{mask:Ts,toBuffer:Ns}=Qo,Bs=Symbol("kByteLength"),Ls=Buffer.alloc(4);class qs{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,r,i=!1,o=2,s=!1;t.mask&&(n=t.maskBuffer||Ls,t.generateMask?t.generateMask(n):xs(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),o=6),"string"==typeof e?r=t.mask&&!s||void 0===t[Bs]?(e=Buffer.from(e)).length:t[Bs]:(r=e.length,i=t.mask&&t.readOnly&&!s);let a=r;r>=65536?(o+=8,a=127):r>125&&(o+=2,a=126);const u=Buffer.allocUnsafe(i?r+o:o);return u[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),t.mask?(u[1]|=128,u[o-4]=n[0],u[o-3]=n[1],u[o-2]=n[2],u[o-1]=n[3],s?[u,e]:i?(Ts(e,n,u,o,r),[u]):(Ts(e,n,e,0,r),[u,e])):[u,e]}close(e,t,n,r){let i;if(void 0===e)i=Ds;else{if("number"!=typeof e||!Rs(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==t&&t.length){const n=Buffer.byteLength(t);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+n),i.writeUInt16BE(e,0),"string"==typeof t?i.write(t,2):i.set(t,2)}else i=Buffer.allocUnsafe(2),i.writeUInt16BE(e,0)}const o={[Bs]:i.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,i,!1,o,r]):this.sendFrame(qs.frame(i,o),r)}ping(e,t,n){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):(r=(e=Ns(e)).length,i=Ns.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[Bs]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(qs.frame(e,o),n)}pong(e,t,n){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):(r=(e=Ns(e)).length,i=Ns.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[Bs]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(qs.frame(e,o),n)}send(e,t,n){const r=this._extensions[ps.extensionName];let i,o,s=t.binary?2:1,a=t.compress;if("string"==typeof e?(i=Buffer.byteLength(e),o=!1):(i=(e=Ns(e)).length,o=Ns.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=i>=r._threshold),this._compress=a):(a=!1,s=0),t.fin&&(this._firstFragment=!0),r){const r={[Bs]:i,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:a};this._deflating?this.enqueue([this.dispatch,e,this._compress,r,n]):this.dispatch(e,this._compress,r,n)}else this.sendFrame(qs.frame(e,{[Bs]:i,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:!1}),n)}dispatch(e,t,n,r){if(!t)return void this.sendFrame(qs.frame(e,n),r);const i=this._extensions[ps.extensionName];this._bufferedBytes+=n[Bs],this._deflating=!0,i.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t],r=n[n.length-1];"function"==typeof r&&r(e)}}else this._bufferedBytes-=n[Bs],this._deflating=!1,n.readOnly=!1,this.sendFrame(qs.frame(t,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][Bs],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Bs],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}var Fs=qs;const{kForOnEventAttribute:Gs,kListener:Ms}=Eo,Js=Symbol("kCode"),zs=Symbol("kData"),Ws=Symbol("kError"),$s=Symbol("kMessage"),Vs=Symbol("kReason"),Hs=Symbol("kTarget"),Ys=Symbol("kType"),Zs=Symbol("kWasClean");class Ks{constructor(e){this[Hs]=null,this[Ys]=e}get target(){return this[Hs]}get type(){return this[Ys]}}Object.defineProperty(Ks.prototype,"target",{enumerable:!0}),Object.defineProperty(Ks.prototype,"type",{enumerable:!0});class Xs extends Ks{constructor(e,t={}){super(e),this[Js]=void 0===t.code?0:t.code,this[Vs]=void 0===t.reason?"":t.reason,this[Zs]=void 0!==t.wasClean&&t.wasClean}get code(){return this[Js]}get reason(){return this[Vs]}get wasClean(){return this[Zs]}}Object.defineProperty(Xs.prototype,"code",{enumerable:!0}),Object.defineProperty(Xs.prototype,"reason",{enumerable:!0}),Object.defineProperty(Xs.prototype,"wasClean",{enumerable:!0});class Qs extends Ks{constructor(e,t={}){super(e),this[Ws]=void 0===t.error?null:t.error,this[$s]=void 0===t.message?"":t.message}get error(){return this[Ws]}get message(){return this[$s]}}Object.defineProperty(Qs.prototype,"error",{enumerable:!0}),Object.defineProperty(Qs.prototype,"message",{enumerable:!0});class ea extends Ks{constructor(e,t={}){super(e),this[zs]=void 0===t.data?null:t.data}get data(){return this[zs]}}Object.defineProperty(ea.prototype,"data",{enumerable:!0});const ta={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[Gs]&&r[Ms]===t&&!r[Gs])return;let r;if("message"===e)r=function(e,n){const r=new ea("message",{data:n?e:e.toString()});r[Hs]=this,ra(t,this,r)};else if("close"===e)r=function(e,n){const r=new Xs("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Hs]=this,ra(t,this,r)};else if("error"===e)r=function(e){const n=new Qs("error",{error:e,message:e.message});n[Hs]=this,ra(t,this,n)};else{if("open"!==e)return;r=function(){const e=new Ks("open");e[Hs]=this,ra(t,this,e)}}r[Gs]=!!n[Gs],r[Ms]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[Ms]===t&&!n[Gs]){this.removeListener(e,n);break}}};var na={CloseEvent:Xs,ErrorEvent:Qs,Event:Ks,EventTarget:ta,MessageEvent:ea};function ra(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:ia}=ys;function oa(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var sa={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,r,i=Object.create(null),o=!1,s=!1,a=!1,u=-1,c=-1,l=-1,d=0;for(;d<e.length;d++)if(c=e.charCodeAt(d),void 0===n)if(-1===l&&1===ia[c])-1===u&&(u=d);else if(0===d||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);const r=e.slice(u,l);44===c?(oa(t,r,i),i=Object.create(null)):n=r,u=l=-1}}else-1===l&&-1!==u&&(l=d);else if(void 0===r)if(-1===l&&1===ia[c])-1===u&&(u=d);else if(32===c||9===c)-1===l&&-1!==u&&(l=d);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d),oa(i,e.slice(u,l),!0),44===c&&(oa(t,n,i),i=Object.create(null),n=void 0),u=l=-1}else{if(61!==c||-1===u||-1!==l)throw new SyntaxError(`Unexpected character at index ${d}`);r=e.slice(u,d),u=l=-1}else if(s){if(1!==ia[c])throw new SyntaxError(`Unexpected character at index ${d}`);-1===u?u=d:o||(o=!0),s=!1}else if(a)if(1===ia[c])-1===u&&(u=d);else if(34===c&&-1!==u)a=!1,l=d;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${d}`);s=!0}else if(34===c&&61===e.charCodeAt(d-1))a=!0;else if(-1===l&&1===ia[c])-1===u&&(u=d);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);let s=e.slice(u,l);o&&(s=s.replace(/\\/g,""),o=!1),oa(i,r,s),44===c&&(oa(t,n,i),i=Object.create(null),n=void 0),r=void 0,u=l=-1}}else-1===l&&(l=d);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===l&&(l=d);const p=e.slice(u,l);return void 0===n?oa(t,p,i):(void 0===r?oa(i,p,!0):oa(i,r,o?p.replace(/\\/g,""):p),oa(t,n,i)),t}};const{randomBytes:aa,createHash:ua}=j,{URL:ca}=s,{BINARY_TYPES:la,EMPTY_BUFFER:da,GUID:pa,kForOnEventAttribute:ha,kListener:fa,kStatusCode:va,kWebSocket:ma,NOOP:ba}=Eo,{EventTarget:{addEventListener:ya,removeEventListener:ga}}=na,{format:wa,parse:ja}=sa,{toBuffer:_a}=Qo,Sa=Symbol("kAborted"),Pa=[8,13],Aa=["CONNECTING","OPEN","CLOSING","CLOSED"],Ia=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Ca extends e{constructor(e,t,n){super(),this._binaryType=la[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=da,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Ca.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(n=t,t=[]):t=[t]),ka(this,e,t,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){la.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){const r=new Us({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Fs(e,this._extensions,n.generateMask),this._receiver=r,this._socket=e,r[ma]=this,e[ma]=this,r.on("conclude",Ta),r.on("drain",Na),r.on("error",Ba),r.on("message",qa),r.on("ping",Fa),r.on("pong",Ga),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ja),e.on("data",za),e.on("end",Wa),e.on("error",$a),this._readyState=Ca.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Ca.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[ps.extensionName]&&this._extensions[ps.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Ca.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==Ca.CLOSED)if(this.readyState!==Ca.CONNECTING)this.readyState!==Ca.CLOSING?(this._readyState=Ca.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";Da(this,this._req,e)}}pause(){this.readyState!==Ca.CONNECTING&&this.readyState!==Ca.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===Ca.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===Ca.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||da,t,n)):Ra(this,e,n)}pong(e,t,n){if(this.readyState===Ca.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===Ca.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||da,t,n)):Ra(this,e,n)}resume(){this.readyState!==Ca.CONNECTING&&this.readyState!==Ca.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===Ca.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(n=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==Ca.OPEN)return void Ra(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ps.extensionName]||(r.compress=!1),this._sender.send(e||da,r,n)}terminate(){if(this.readyState!==Ca.CLOSED)if(this.readyState!==Ca.CONNECTING)this._socket&&(this._readyState=Ca.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";Da(this,this._req,e)}}}Object.defineProperty(Ca,"CONNECTING",{enumerable:!0,value:Aa.indexOf("CONNECTING")}),Object.defineProperty(Ca.prototype,"CONNECTING",{enumerable:!0,value:Aa.indexOf("CONNECTING")}),Object.defineProperty(Ca,"OPEN",{enumerable:!0,value:Aa.indexOf("OPEN")}),Object.defineProperty(Ca.prototype,"OPEN",{enumerable:!0,value:Aa.indexOf("OPEN")}),Object.defineProperty(Ca,"CLOSING",{enumerable:!0,value:Aa.indexOf("CLOSING")}),Object.defineProperty(Ca.prototype,"CLOSING",{enumerable:!0,value:Aa.indexOf("CLOSING")}),Object.defineProperty(Ca,"CLOSED",{enumerable:!0,value:Aa.indexOf("CLOSED")}),Object.defineProperty(Ca.prototype,"CLOSED",{enumerable:!0,value:Aa.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(Ca.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(Ca.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[ha])return t[fa];return null},set(t){for(const t of this.listeners(e))if(t[ha]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[ha]:!0})}})})),Ca.prototype.addEventListener=ya,Ca.prototype.removeEventListener=ga;var Ea=Ca;function ka(e,t,n,r){const i={protocolVersion:Pa[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!Pa.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Pa.join(", ")})`);let s;if(t instanceof ca)s=t,e._url=t.href;else{try{s=new ca(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}e._url=t}const a="wss:"===s.protocol,u="ws+unix:"===s.protocol;let l;if("ws:"===s.protocol||a||u?u&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"):l='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',l){const t=new SyntaxError(l);if(0===e._redirects)throw t;return void Ua(e,t)}const d=a?443:80,p=aa(16).toString("base64"),h=a?c.request:o.request,f=new Set;let v,m;if(i.createConnection=a?xa:Oa,i.defaultPort=i.defaultPort||d,i.port=s.port||d,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(v=new ps(!0!==i.perMessageDeflate?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=wa({[ps.extensionName]:v.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Ia.test(e)||f.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(e)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),u){const e=i.path.split(":");i.socketPath=e[0],i.path=e[1]}if(i.followRedirects){if(0===e._redirects){e._originalIpc=u,e._originalSecure=a,e._originalHostOrSocketPath=u?i.socketPath:s.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=u?!!e._originalIpc&&i.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!a)&&(delete i.headers.authorization,delete i.headers.cookie,t||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),m=e._req=h(i),e._redirects&&e.emit("redirect",e.url,m)}else m=e._req=h(i);i.timeout&&m.on("timeout",(()=>{Da(e,m,"Opening handshake has timed out")})),m.on("error",(t=>{null===m||m[Sa]||(m=e._req=null,Ua(e,t))})),m.on("response",(o=>{const s=o.headers.location,a=o.statusCode;if(s&&i.followRedirects&&a>=300&&a<400){if(++e._redirects>i.maxRedirects)return void Da(e,m,"Maximum redirects exceeded");let o;m.abort();try{o=new ca(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void Ua(e,n)}ka(e,o,n,r)}else e.emit("unexpected-response",m,o)||Da(e,m,`Unexpected server response: ${o.statusCode}`)})),m.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==Ca.CONNECTING)return;if(m=e._req=null,"websocket"!==t.headers.upgrade.toLowerCase())return void Da(e,n,"Invalid Upgrade header");const o=ua("sha1").update(p+pa).digest("base64");if(t.headers["sec-websocket-accept"]!==o)return void Da(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"];let a;if(void 0!==s?f.size?f.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":f.size&&(a="Server sent no subprotocol"),a)return void Da(e,n,a);s&&(e._protocol=s);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void Da(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=ja(u)}catch(t){return void Da(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==ps.extensionName){return void Da(e,n,"Server indicated an extension that was not requested")}try{v.accept(t[ps.extensionName])}catch(t){return void Da(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[ps.extensionName]=v}e.setSocket(n,r,{generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})})),i.finishRequest?i.finishRequest(m,e):m.end()}function Ua(e,t){e._readyState=Ca.CLOSING,e.emit("error",t),e.emitClose()}function Oa(e){return e.path=e.socketPath,h.connect(e)}function xa(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=h.isIP(e.host)?"":e.host),w.connect(e)}function Da(e,t,n){e._readyState=Ca.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Da),t.setHeader?(t[Sa]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Ua,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function Ra(e,t,n){if(t){const n=_a(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Aa[e.readyState]})`);process.nextTick(n,t)}}function Ta(e,t){const n=this[ma];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[ma]&&(n._socket.removeListener("data",za),process.nextTick(Ma,n._socket),1005===e?n.close():n.close(e,t))}function Na(){const e=this[ma];e.isPaused||e._socket.resume()}function Ba(e){const t=this[ma];void 0!==t._socket[ma]&&(t._socket.removeListener("data",za),process.nextTick(Ma,t._socket),t.close(e[va])),t.emit("error",e)}function La(){this[ma].emitClose()}function qa(e,t){this[ma].emit("message",e,t)}function Fa(e){const t=this[ma];t.pong(e,!t._isServer,ba),t.emit("ping",e)}function Ga(e){this[ma].emit("pong",e)}function Ma(e){e.resume()}function Ja(){const e=this[ma];let t;this.removeListener("close",Ja),this.removeListener("data",za),this.removeListener("end",Wa),e._readyState=Ca.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[ma]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",La),e._receiver.on("finish",La))}function za(e){this[ma]._receiver.write(e)||this.pause()}function Wa(){const e=this[ma];e._readyState=Ca.CLOSING,e._receiver.end(),this.end()}function $a(){const e=this[ma];this.removeListener("error",$a),this.on("error",ba),e&&(e._readyState=Ca.CLOSING,this.destroy())}var Va=function(e){function t(t,n,r,i,o){void 0===o&&(o=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=i,s.closeTimeout=o,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=Dt(t=e))&&jr.test(t)?t.replace(wr,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return P(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return I(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,i=n.address;e.tcpServer.listen(r,i,(function(){e.emit("tunnel-open",{address:i,port:r}),t({address:i,port:r})}))}else e.tcpServer.listen(0,(function(){var n=e.tcpServer.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:o,port:i},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return I(this,void 0,void 0,(function(){var e,t=this;return C(this,(function(n){switch(n.label){case 0:return e=!1,[4,Promise.race([new Promise((function(n){t.tcpServer.close((function(){e=!0,t.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(e){return setTimeout(e,t.closeTimeout)})).then((function(){e||(t.openConnections.forEach((function(e){e.destroy(),t.openConnections.delete(e)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},t.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new Ea(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Co(n),i=this.getHeaderTransform();this.rewriteHostHeader&&i?_o(e,i,r):_o(e,r),_o(r,e),n.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,t=this.hostRegex;return new i({transform:function(n,r,i){var o=n.toString();if(o.split("\n",1)[0].includes("HTTP")){var s=o.replace(t,"Host: ".concat(e));i(null,Buffer.from(s))}else i(null,n)}})}},t}(t),Ha=function(e){function t(t,n,r){var i=e.call(this)||this;return i.endpoint=t,i.headers=n,i.bindToAssign=r,i.protocol="UDP",i.udpSocket=_.createSocket("udp4"),i.handleConnection(),i}return P(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return I(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,i=n.address;e.udpSocket.bind(r,i,(function(){e.emit("tunnel-open",{address:i,port:r}),t({address:i,port:r})}))}else e.udpSocket.bind(0,(function(){var n=e.udpSocket.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:o,port:i},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return I(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){e.udpSocket.close((function(){e.emit("tunnel-close"),t()}))}))];case 1:return t.sent(),[2]}}))}))},t.prototype.handleConnection=function(){var e,t=this,n=new Ea(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Co(n);this.udpSocket.on("message",(function(t,n){e=n,r.write(t)})),r.on("data",(function(n){e&&t.udpSocket.send(n,e.port,e.address,(function(e){e&&t.emit("connection-error",e)}))})),this.udpSocket.on("error",(function(e){t.emit("connection-error",e)})),r.on("error",(function(e){t.emit("connection-error",e)})),n.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),n.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(t);var Ya,Za="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Ka=function(e,t){return I(void 0,void 0,void 0,(function(){var n;return C(this,(function(r){return n=Promise.resolve([]),[2,e.reduce((function(e,n){return e.then((function(e){return t(n).then((function(t){return e.push(t),e}))}))}),n)]}))}))},Xa=function(e){function t(t){void 0===t&&(t=8192);var n=e.call(this)||this;return n.bufferDefaultSize=t,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return P(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.getContentsAsString=function(e,t){void 0===e&&(e="utf8");var n=this.buffer.toString(e,0,Math.min(t||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},t.prototype.adaptBuffer=function(e){if(this.buffer.length-this.size<e){var t=Math.ceil((e-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*t);this.buffer.copy(n,0,0,this.size),this.buffer=n}},t.prototype._write=function(e,t,n){this.adaptBuffer(e.length),e.copy(this.buffer,this.size,0),this._size+=e.length,n()},t}(r.Writable),Qa=function(e){function t(t,n,r){var i=e.call(this)||this;return i.contextProvider=t,i.listServices=n,i.listAddons=r,i.connections=[],i.hostsFileMutex=new so,i.ipAllocationMutex=new so,i.stopForwarding=function(e){return I(i,void 0,void 0,(function(){var t,n,r,i,o,s,a;return C(this,(function(u){switch(u.label){case 0:return[4,e.tunnel.close()];case 1:return u.sent(),t=e.forwardingContext,n=t.projectId,r=t.type,i=t.id,o=t.hostnames,s=t.ipOnly,o.length>0&&!s?[4,this.unregisterHostnames(null===(a=e.tunnel.bindTo)||void 0===a?void 0:a.address,o)]:[3,3];case 2:u.sent(),u.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(e){var t=e.forwardingContext,o=t.type,s=t.id,a=t.projectId;return s===i&&a===n&&o===r})),1),[2]}}))}))},i.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(e=null===process||void 0===process?void 0:process.getuid)||void 0===e?void 0:e.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return m("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return m("fltmc"),!0}catch(e){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var e},i.assertStartedWithNodejs=function(){if(!Za)throw new Error("Port forwarding only possible when started with nodejs")},i.proxyApiClient=new qi(t),i}return P(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),I(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardProject(e,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopProjectForwarding(e)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardProject=function(e,t){return void 0===t&&(t=!0),I(this,void 0,void 0,(function(){var n,r,i,o,s,a=this;return C(this,(function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return i=u.sent(),[4,Promise.all(r.data.services.map((function(e){return I(a,void 0,void 0,(function(){return C(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return o=u.sent(),[4,Promise.all(i.data.addons.map((function(e){return I(a,void 0,void 0,(function(){return C(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:e.id},t)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=u.sent(),[2,{services:o,addons:s}]}}))}))},t.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),I(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardService(e,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopServiceForwarding(e)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardService=function(e,t){return void 0===t&&(t=!0),I(this,void 0,void 0,(function(){var n,r,i,o,s,a,u,c=this;return C(this,(function(l){switch(l.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,r=e.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return i=l.sent(),o=i.namespace,s=i.targetDomain,a=i.instances,u=i.ports,0===a.length?[2,[]]:[4,Ka(u,(function(e){var i,u="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(e.internalPort),l="".concat(r,".").concat(o,".svc.cluster.local"),d=["".concat(r)];e.name&&d.push("".concat(e.name,".").concat(r)),"HTTP"===e.protocol&&(i={altHostnames:d,targetHostname:l});var p=E([l],d,!0);return c.forwardPort(u,e,p,"service",r,n,t,i)}))];case 2:return[2,l.sent()]}}))}))},t.prototype.withAddonForwarding=function(e,t,n){return void 0===n&&(n=!0),I(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardAddon(e,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopAddonForwarding(e)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardAddon=function(e,t){return void 0===t&&(t=!0),I(this,void 0,void 0,(function(){var n,r,i,o,s=this;return C(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=e.addonId,r=e.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return i=a.sent(),o=i.instances.map((function(e){var t=e.podName,n=e.internalHostname;return e.ports.map((function(e){return{podName:t,internalHostname:n,port:e}}))})),[4,Ka((u=o,null!=u&&u.length?Gt(u,1/0):[]),(function(e){var o=e.podName,a=e.internalHostname,u=e.port;return I(s,void 0,void 0,(function(){var e;return C(this,(function(s){return e="https://".concat(i.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(o,"/port/").concat(u.internalPort),[2,this.forwardPort(e,u,[a],"addon",n,r,t)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},t.prototype.allocateIpAddress=function(e){return I(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){switch(s.label){case 0:return t="127.24.1.1",n="127.24.255.255",r=null!==(o=this.nextIpAddress)&&void 0!==o?o:t,[4,Fi(e,r,n)];case 1:return i=s.sent(),this.nextIpAddress=zi(Ji(i)+1),Ji(this.nextIpAddress)>Ji(n)&&(this.nextIpAddress=t),[2,i]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,i,o,s,a){var u;return void 0===s&&(s=!0),I(this,void 0,void 0,(function(){var c,l,d,p,h,f,v=this;return C(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(l=this.canExecuteWithHostnames()).error)throw new Error("".concat(l.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(o,i,r,t,s)];case 1:return d=m.sent(),p="UDP"===t.protocol?new Ha(e,c,d):new Va(e,c,a,d),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return I(v,void 0,void 0,(function(){return C(this,(function(e){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return h=m.sent(),f={projectId:o,id:i,type:r,hostnames:n,ipOnly:s,port:h.port,address:h.address,protocol:t.protocol,portName:t.name},this.emit("tunnel-open",p,f),p.on("connection-error",(function(e){return v.emit("connection-error",p,f,e)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,f)})),this.connections.push({tunnel:p,forwardingContext:f}),[2,{data:f}]}}))}))},t.prototype.determineSocketAddress=function(e,t,n,r,i){var o;return I(this,void 0,void 0,(function(){var s,a,u;return C(this,(function(c){switch(c.label){case 0:return i&&"darwin"===d.platform()?[2,void 0]:(s=this.connections.find((function(r){return r.forwardingContext.projectId===e&&r.forwardingContext.id===t&&r.forwardingContext.type===n})),a=(null===(o=null==s?void 0:s.forwardingContext)||void 0===o?void 0:o.port)!==r.internalPort,s&&a?[2,{address:s.forwardingContext.address,port:r.internalPort}]:(u={},[4,this.allocateIpAddress(r.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=r.internalPort,u)]}}))}))},t.prototype.registerHostnames=function(e,t){return I(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,E([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return I(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,E([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return I(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return I(t,void 0,void 0,(function(){var t,n=this;return C(this,(function(r){switch(r.label){case 0:return[4,oo.load({header:"Northflank Proxy"})];case 1:return t=r.sent(),e(t),[4,t.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,eu(5)((function(){return I(n,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"atomic"})];case 1:return e.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,eu(5)((function(){return I(n,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"standard"})];case 1:return e.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopProjectForwarding=function(e){return I(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return t.forwardingContext.projectId===e.projectId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopServiceForwarding=function(e){return I(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"service"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.serviceId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopAddonForwarding=function(e){return I(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"addon"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.addonId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stop=function(){return I(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return I(e,void 0,void 0,(function(){return C(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(t),eu=function(e,t){return void 0===t&&(t=50),function(n){var r=e,i=function(){return I(void 0,void 0,void 0,(function(){var e;return C(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,4]),[4,n()];case 1:return[2,o.sent()];case 2:if(e=o.sent(),r<=0)throw e;return r-=1,[4,new Promise((function(e){return setTimeout((function(){return e()}),t)}))];case 3:return o.sent(),[2,i()];case 4:return[2]}}))}))};return i()}},tu=function(e){function t(t,r,i,o,s,a){void 0===o&&(o=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var u=e.call(this)||this;return u.baseUrl=t,u.execConfig=r,u.token=i,u.stdOut=o,u.stdErr=s,u.stdIn=a,u.waitForCommandResult=function(){return I(u,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,e.sent()]}}))}))},u.sendInputToCurrentCommand=function(e){return I(u,void 0,void 0,(function(){var t;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(t=this.duplex)||void 0===t||t.write(this.constructPayloadPacket(e)),[2]}))}))},u.resizeTerminal=function(e){return I(u,void 0,void 0,(function(){var t;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(t=this.duplex)||void 0===t||t.write(JSON.stringify({type:"resize",data:{ttyRows:null==e?void 0:e.rows,ttyColumns:null==e?void 0:e.columns}})),[2]}))}))},u.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},u}return P(t,e),Object.defineProperty(t.prototype,"execEndpoint",{get:function(){var e=this.execConfig,t=e.entityId,n=e.entityType,r=e.projectId,i="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(i).concat(function(){switch(n){case"service":return"services/".concat(t);case"job":return"jobs/".concat(t);case"addon":return"addons/".concat(t);case"build":return"builds/".concat(t);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),t.prototype.start=function(){return I(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(t,n){var r,i,o;void 0!==e.remote&&n(Error("Command is already running"));var s,a=e.execEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ea(a);try{e.duplex=Co(e.remote)}catch(e){throw new Error("Failed to establish connection to command execution proxy: ".concat(e.message))}e.initialAuth(),e.stdIn.on("data",(function(t){var n,r;(null===(n=e.duplex)||void 0===n?void 0:n.writable)&&(null===(r=e.duplex)||void 0===r||r.write(e.constructPayloadPacket(t)))})),null===(r=e.duplex)||void 0===r||r.on("data",(function(t){var n,r,i,o=JSON.parse(t.toString());switch(null==o?void 0:o.type){case"init":var a=o.data;"successful"!==a.auth&&u("Command initialization failed: ".concat(null!==(n=null==a?void 0:a.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":s=o.data,e.emit("command-result",s),null===(r=e.duplex)||void 0===r||r.end();break;case"stdOut":e.emit("std-out-data",o.data),e.stdOut.write(o.data);break;case"stdErr":e.emit("std-err-data",o.data),e.stdErr.write(o.data);break;case"error":u(null===(i=o.data)||void 0===i?void 0:i.message);break;default:var c="unable to parse message: ".concat(JSON.stringify(o));u(c)}})),null===(i=e.duplex)||void 0===i||i.on("end",(function(){e.emit("command-completed"),e.reset(),t(s)})),null===(o=e.duplex)||void 0===o||o.on("error",(function(n){e.emit("error",n),e.emit("command-completed"),e.reset(),t(s)}));var u=function(t){e.emit("error",t),e.reset(),n(new Error(t))};e.emit("command-started")})),[2,this.currentCommand]}))}))},t.prototype.initialAuth=function(){var e,t=this.execConfig,n=t.command,r=t.containerName,i=t.shell,o=t.user,s=t.group,a=t.ttyColumns,u=t.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:i,user:o,group:s,ttyColumns:a,ttyRows:u}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(c))},t.prototype.reset=function(){var e;this.remote=void 0,this.currentCommand=void 0,null===(e=this.duplex)||void 0===e||e.destroy(),this.duplex=void 0},t}(t),nu=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!Za)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return I(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=e.serviceId,r=e.projectId,"service",i=A({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(i)]}))}))},e.prototype.execServiceSession=function(e,t){return I(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=e.serviceId,r=e.projectId,"service",i=A({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(i)]}))}))},e.prototype.execJobCommand=function(e,t){return I(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=e.jobId,r=e.projectId,"job",i=A({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(i)]}))}))},e.prototype.execJobSession=function(e,t){return I(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=e.jobId,r=e.projectId,"job",i=A({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(i)]}))}))},e.prototype.execCommand=function(e){return I(this,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){switch(i.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(A({shell:"none"},e)),n=new Xa,r=new Xa,t.stdOut.pipe(n),t.stdErr.pipe(r),t.on("error",(function(e){throw new Error(e)})),[4,t.start()];case 1:return[2,{commandResult:i.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},e.prototype.shellSession=function(e){this.assertStartedWithNodejs();var t=this.getCommandRunner(e);return t.start(),t},e.prototype.getCommandRunner=function(e){var t=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new tu(t,e,n)},e}(),ru=function(e){function t(t){var n=this.constructor,r=e.call(this,t.message)||this;r.name="NorthflankApiCallError",r.message=t.message,r.status=t.status,r.id=t.id,r.details=t.details;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i,r}return P(t,e),t}(Error),iu=function(e){function t(t,n,r){var i=e.call(this)||this;return i.baseUrl=t,i.logsConfig=n,i.token=r,i.stop=function(){return I(i,void 0,void 0,(function(){var e;return C(this,(function(t){if(void 0===this.logSession)throw new Error("No command is running");return null===(e=this.remote)||void 0===e||e.close(),[2]}))}))},i}return P(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.entityId,r=e.entityType,i=e.buildId,o=e.runId,s=e.isBuild,a=e.lineLimit,u=e.projectId,c=e.queryType,l=e.startTime,d=e.endTime,p=e.duration,h=e.direction,f=e.textIncludes,v=e.textNotIncludes,m=e.regexIncludes,b=e.regexNotIncludes,y="/v1/projects/".concat(u,"/"),g=new URLSearchParams;return g.append("queryType",c),void 0!==l&&g.append("startTime",l.toISOString()),void 0!==d&&g.append("endTime",d.toISOString()),void 0!==a&&g.append("lineLimit",a.toString()),void 0!==t&&g.append("containerName",t),void 0!==o&&g.append("runId",o),void 0!==i&&g.append("buildId",i),void 0!==f&&g.append("textIncludes",f),void 0!==v&&g.append("textNotIncludes",v),void 0!==m&&g.append("regexIncludes",m),void 0!==b&&g.append("regexNotIncludes",b),void 0!==h&&g.append("direction",h),void 0!==p&&g.append("duration",p.toString()),"".concat(y).concat(function(){var e=s?"/build-logs":"/logs";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(r))}}(),"?").concat(g.toString())},Object.defineProperty(t.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(t.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),t.prototype.start=function(){return I(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){switch(t.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(t,n){var r,i,o,s;void 0!==e.remote&&n(Error("Command is already running"));var a=e.logsEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ea(a),null===(r=e.remote)||void 0===r||r.on("message",(function(t){var n,r,i=JSON.parse(t.toString());switch(null==i?void 0:i.type){case"init":var o=i.data;"successful"!==o.auth&&u("Log tail initialization failed: ".concat(null!==(n=null==o?void 0:o.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var s=i.data;e.emit("logs-received",s.map(vu));break;case"error":u(null===(r=i.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(i));u(a)}})),null===(i=e.remote)||void 0===i||i.on("close",(function(){e.emit("close"),e.reset(),t()})),null===(o=e.remote)||void 0===o||o.on("open",(function(){e.emit("open")})),null===(s=e.remote)||void 0===s||s.on("error",(function(n){e.emit("error",n),e.reset(),t()}));var u=function(t){e.emit("error",{message:t}),e.reset(),n(new Error(t))}})),[4,new Promise((function(t){var n;e.remote.on("open",(function(){return t()})),null===(n=e.remote)||void 0===n||n.on("error",(function(){t()}))}))];case 1:return t.sent(),this.initialAuth(),[2,this.logSession]}}))}))},t.prototype.initialAuth=function(){var e,t={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(e=this.remote)||void 0===e||e.send(JSON.stringify(t))},t.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},t}(t),ou=Za?Bi:window.fetch,su=function(){if(Za)try{return JSON.parse(b.readFileSync(y.join(y.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},au=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return I(n,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c,l,d,p,h=this;return C(this,(function(f){switch(f.label){case 0:if(t=this.method,n={method:t,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return i="".concat(r).concat(this.endpointUrl(e)),o=this.body(e),s=A(A({url:i},n),{body:o}),[4,hu(i,A(A({},n),{body:o}))];case 1:return[4,(a=f.sent()).text()];case 2:return u=f.sent(),c=function(){if(200!==a.status){var e=null==l?void 0:l.error,t=(null==e?void 0:e.message)||"",n={status:a.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(h.opts.throwErrorOnHttpErrorCode)throw new ru(n);return n}},l=function(){try{return JSON.parse(u)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),d=c(),[2,{data:null==l?void 0:l.data,rawResponse:a,request:s,error:d,pagination:null==l?void 0:l.pagination}]}}))}))},this.contextProvider=e}return e.prototype.getDefaultHeaders=function(){var e,t,n=this.contextProvider.getCurrentToken(),r=(null===(e=this.opts)||void 0===e?void 0:e.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(t=su())||void 0===t?void 0:t.version).concat(r)}},e}(),uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return P(t,e),t}(au),cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return P(t,e),t}(au),lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return P(t,e),t}(au),du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return P(t,e),t}(au),pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return P(t,e),t}(au),hu=function(e,t,n,r){return void 0===t&&(t={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(i,o){var s=function(n){return ou(e,t).then((function(e){i(e)})).catch((function(e){return I(void 0,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return n>0?[4,(i=r,new Promise((function(e){setTimeout((function(){e()}),i)})))]:[3,2];case 1:return t.sent(),[2,s(n-1)];case 2:return[2,o(e)]}var i}))}))}))};return s(n)}))},fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch log lines over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){return iu.getLogsEndpoint(e)},t.body=function(){},t}return P(t,e),t}(uu),vu=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},mu=function(e){var t=this;this.contextProvider=e,this.getServiceLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,i=t.serviceId,o={entityId:i,projectId:r},[2,this.logRange(o,A(A({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,i=t.jobId,o={entityId:i,projectId:r},[2,this.logRange(o,A(A({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.logRange=function(e,n,r){return I(t,void 0,void 0,(function(){var t,i,o,s,a;return C(this,(function(u){switch(u.label){case 0:return t=e.entityId,i=e.projectId,o=A(A({projectId:i,entityId:t,entityType:r},n),{queryType:"range"}),[4,new fu(this.contextProvider,{}).call(o)];case 1:return(s=u.sent()).error?[2,s]:[2,A(A({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(vu)})]}}))}))},this.tailServiceLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.serviceId,i=t.projectId,o={entityId:r,projectId:i},[2,this.logTail(o,A(A({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,i=t.jobId,o={entityId:i,projectId:r},[2,this.logTail(o,A(A({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.logTail=function(e,n,r){return I(t,void 0,void 0,(function(){var t,i,o,s,a;return C(this,(function(u){if(t=e.entityId,i=e.projectId,o=A({queryType:"tail",projectId:i,entityId:t,entityType:r},n),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new iu(s,o,a)]}))}))},this.assertStartedWithNodejs=function(){if(!Za)throw new Error("Command exec only possible when started with nodejs")}},bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch metrics entries over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){var t=e.projectId,n=e.entityId,r=e.entityType,i=e.runId,o=e.buildId,s=e.isBuild,a=e.queryType,u=e.metricTypes,c=e.startTime,l=e.endTime,d=e.duration,p=e.containerName,h=e.timestamp,f="/v1/projects/".concat(t,"/");var v=new URLSearchParams;return v.append("queryType",a),void 0!==c&&v.append("startTime",c.toISOString()),void 0!==l&&v.append("endTime",l.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==i&&v.append("runId",i),void 0!==o&&v.append("buildId",o),void 0!==h&&v.append("timestamp",h.toISOString()),void 0!==d&&v.append("duration",d.toString()),void 0!==u&&u.forEach((function(e){return v.append("metricTypes",e)})),"".concat(f).concat(function(){var e=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},t.body=function(){},t}return P(t,e),t}(uu),yu=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};!function(e){e.Cpu="cpu",e.Memory="memory",e.NetworkIngress="networkIngress",e.NetworkEgress="networkEgress",e.TcpConnectionOpen="tcpConnectionsOpen",e.PvcUsage="diskUsage",e.Requests="requests",e.Http4xxResponses="http4xxResponses",e.Http5xxResponses="http5xxResponses"}(Ya||(Ya={}));var gu=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.serviceId,i=t.projectId,o={entityId:r,projectId:i},[2,this.metricsSingle(o,A(A({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.jobId,i=t.projectId,o={entityId:r,projectId:i},[2,this.metricsSingle(o,A(A({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(e,n,r){return I(t,void 0,void 0,(function(){var t,i,o;return C(this,(function(s){return t=e.entityId,i=e.projectId,o=A(A({projectId:i,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(o)]}))}))},this.getServiceMetricsRange=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,i=t.serviceId,o={entityId:i,projectId:r},[2,this.metricsRange(o,A(A({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(e){return I(t,void 0,void 0,(function(){var t,n,r,i,o;return C(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,i=t.jobId,o={entityId:i,projectId:r},[2,this.metricsRange(o,A(A({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return I(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(e,n,r){return I(t,void 0,void 0,(function(){var t,i,o;return C(this,(function(s){return t=e.entityId,i=e.projectId,o=A(A({projectId:i,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(o)]}))}))},this.getMetrics=function(e){return I(t,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return[4,new bu(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,A(A({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,A(A({},n),{values:n.values.map(yu)})]})))})]}}))}))}},wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the available addon types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/addon-types"},t.body=function(){},t}return P(t,e),t}(uu),ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of past invoices",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),_u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Su=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud providers",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/cloud-providers"},t.body=function(){},t}return P(t,e),t}(uu),Pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists clusters for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return P(t,e),t}(uu),Cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update an existing cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given cluster. Fails if the cluster has associated projects.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Delete",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return P(t,e),t}(lu),ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return P(t,e),t}(uu),xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Update",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given integration. Fails if the integration is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Delete",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return P(t,e),t}(lu),Ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the partially random string used when generating host names for the authenticated account.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return"/v1/dns-id"},t.body=function(){},t}return P(t,e),t}(uu),Tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available domains",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/domains".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Registers a new domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return"/v1/domains"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return P(t,e),t}(uu),Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a domain and each of its registered subdomains.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Delete",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return P(t,e),t}(lu),qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new subdomain to the domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return P(t,e),t}(uu),Gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from a domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return P(t,e),t}(lu),Mu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assigns a service port to the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from its assigned service",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(){},t}return P(t,e),t}(lu),zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes the CDN integration from the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Enables a CDN integration on the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),$u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/verify")},t.body=function(){},t}return P(t,e),t}(cu),Vu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attempts to verify the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/verify")},t.body=function(){},t}return P(t,e),t}(cu),Hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of log sinks added to this account.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Create",t.endpointUrl=function(e){return"/v1/integrations/log-sinks"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return P(t,e),t}(uu),Ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Delete",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return P(t,e),t}(lu),Xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pauses a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/pause")},t.body=function(){},t}return P(t,e),t}(cu),Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes a paused log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/resume")},t.body=function(){},t}return P(t,e),t}(cu),ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the settings for a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the container registry credentials saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new set of container registry credentials to this account.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Create",t.endpointUrl=function(e){return"/v1/integrations/registries"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Views a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read Encrypted",t.endpointUrl=function(e){return"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return P(t,e),t}(uu),ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Delete",t.endpointUrl=function(e){return"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return P(t,e),t}(lu),oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Update",t.endpointUrl=function(e){return"/v1/integrations/registries/".concat(e.parameters.credentialId,"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists linked version control providers",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){return"/v1/integrations/vcs"},t.body=function(){},t}return P(t,e),t}(uu),ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generate a token for a specific VCS link.",t.withAuth=!0,t.requiredPermissions="Account > Git > Tokens > Read",t.endpointUrl=function(e){return"/v1/integrations/vcs/custom/".concat(e.parameters.customVCSId,"/token/").concat(e.parameters.vcsLinkId)},t.body=function(){},t}return P(t,e),t}(cu),uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of repositories accessible to this account",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of branches for the repo",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(e.parameters.vcsService,"/").concat(e.parameters.repositoryOwner,"/").concat(e.parameters.repositoryName,"/branches").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available billing plans",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/plans"},t.body=function(){},t}return P(t,e),t}(uu),dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists projects for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given project",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId)},t.body=function(){},t}return P(t,e),t}(uu),mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given project. Fails if the project isn't empty.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Delete",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId).concat(r)},t.body=function(){},t}return P(t,e),t}(lu),bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of addons belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return P(t,e),t}(uu),jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),_c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return P(t,e),t}(lu),Sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about an addon's backup schedules",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules/").concat(e.parameters.scheduleId)},t.body=function(){},t}return P(t,e),t}(lu),Ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of backups for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Initiates a backup for the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return P(t,e),t}(uu),kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a given backup",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return P(t,e),t}(lu),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the in progress backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort")},t.body=function(){},t}return P(t,e),t}(cu),Oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts an in-progress backup restore.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort-restore")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generates a temporary download link for downloading the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/download-link")},t.body=function(){},t}return P(t,e),t}(uu),Dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores the given addon to the given backup state.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restore")},t.body=function(){},t}return P(t,e),t}(cu),Rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of restores for the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restores").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/retain")},t.body=function(){},t}return P(t,e),t}(cu),Nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > Deployment > View Instances",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/containers").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the credentials for connecting to the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/credentials")},t.body=function(){},t}return P(t,e),t}(uu),Lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Imports a database from an external archive or existing live database.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the network settings for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pause")},t.body=function(){},t}return P(t,e),t}(cu),Gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores an addon to a specific point in time.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the valid window for performing a point-in-time restore (PITR) on this addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr-window")},t.body=function(){},t}return P(t,e),t}(uu),Jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Reset the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/reset")},t.body=function(){},t}return P(t,e),t}(cu),zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restart the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/restart")},t.body=function(){},t}return P(t,e),t}(cu),Wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resume the given addon if it is paused.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/resume")},t.body=function(){},t}return P(t,e),t}(cu),$c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the allocated resources for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the security rules for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the current addon version including available upgrades and upgrade history.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(){},t}return P(t,e),t}(uu),Yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Upgrades the addon to a new version.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of jobs belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),Qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return P(t,e),t}(uu),il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return P(t,e),t}(lu),ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/branches").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists builds for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given job. Given a commit sha, it will build that commit.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets build arguments for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments/details")},t.body=function(){},t}return P(t,e),t}(uu),dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return P(t,e),t}(uu),fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job build",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return P(t,e),t}(lu),vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/containers").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(){},t}return P(t,e),t}(uu),bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(){},t}return P(t,e),t}(uu),gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pause")},t.body=function(){},t}return P(t,e),t}(cu),jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pull-requests").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),_l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetches run history for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Starts a new job run for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns data about the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return P(t,e),t}(uu),Il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return P(t,e),t}(lu),Cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),El=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment/details")},t.body=function(){},t}return P(t,e),t}(uu),Ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Scale Job",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates settings for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modify cron job to toggle suspending of its schedule.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists all pipelines for a project",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a pipeline",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId)},t.body=function(){},t}return P(t,e),t}(uu),Tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of active preview environments for a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/previews").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a preview environment generated by a preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/previews/").concat(e.parameters.previewId)},t.body=function(){},t}return P(t,e),t}(lu),ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of preview template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/runs").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/runs/").concat(e.parameters.templateRunId)},t.body=function(){},t}return P(t,e),t}(uu),Gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(){},t}return P(t,e),t}(uu),Ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists runs of a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return P(t,e),t}(uu),$l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs/").concat(e.parameters.runId,"/abort")},t.body=function(){},t}return P(t,e),t}(cu),Vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of secrets belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),Zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),Kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret including its contents",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId).concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(){},t}return P(t,e),t}(lu),Ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Link an addon to the secret group or edit the settings of the linked addon.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a given addon link.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return P(t,e),t}(uu),nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unlinks an addon from the secret group.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return P(t,e),t}(lu),rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret with details about its linked addons",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/details")},t.body=function(){},t}return P(t,e),t}(uu),id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of services belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/build/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/combined/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(du),hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/deployment/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(pu),fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId)},t.body=function(){},t}return P(t,e),t}(uu),vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Delete",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId).concat(r)},t.body=function(){},t}return P(t,e),t}(lu),md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/branches").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the builds for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the build arguments for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments/details")},t.body=function(){},t}return P(t,e),t}(uu),_d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given build or combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return P(t,e),t}(uu),Ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given service build",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return P(t,e),t}(lu),Id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/containers").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(){},t}return P(t,e),t}(uu),Ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(){},t}return P(t,e),t}(uu),Ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pause")},t.body=function(){},t}return P(t,e),t}(cu),xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(){},t}return P(t,e),t}(uu),Dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the list of ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pull-requests").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restarts the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/restart")},t.body=function(){},t}return P(t,e),t}(cu),Nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment/details")},t.body=function(){},t}return P(t,e),t}(uu),Fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Scale Service",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of volumes belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(){},t}return P(t,e),t}(uu),Md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a volume with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return P(t,e),t}(uu),zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update volume mounts and storage size",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes this volume and its associated data.",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return P(t,e),t}(lu),$d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Detach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available project regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/regions"},t.body=function(){},t}return P(t,e),t}(uu),Yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of templates",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates".concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return"/v1/templates"},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId).concat(r)},t.body=function(){},t}return P(t,e),t}(uu),Xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Update",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId)},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),Qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId)},t.body=function(){},t}return P(t,e),t}(lu),ep=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Run a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Run",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return P(t,e),t}(cu),tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId,"/runs").concat(r)},t.body=function(){},t}return P(t,e),t}(uu),np=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId,"/runs/").concat(e.parameters.templateRunId)},t.body=function(){},t}return P(t,e),t}(uu),rp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > Runs > Abort",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId,"/runs/").concat(e.parameters.templateRunId,"/abort")},t.body=function(){},t}return P(t,e),t}(cu),ip=function(){function e(){this.loadContext()}return e.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},e.prototype.getInfo=function(){return""},e.prototype.storeContext=function(e){return I(this,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,this.writeContext(e)];case 1:return t.sent(),this.contextWrapper=e,[2]}}))}))},e.prototype.addContext=function(e,t){return void 0===t&&(t=!0),I(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){switch(o.label){case 0:if(t||void 0===this.findContext(e.name))return[3,1];throw new Error("Context with name ".concat(e.name," already exists"));case 1:return[4,this.removeContext(e.name)];case 2:o.sent(),o.label=3;case 3:return n=A({host:"https://api.northflank.com"},e),r=this.contextWrapper,i={current:n.name,contexts:E(E([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(i)];case 4:return o.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return I(this,void 0,void 0,(function(){var t,n,r,i;return C(this,(function(o){switch(o.label){case 0:return t=this.contextWrapper,n=t.contexts.filter((function(t){return t.name!==e})),r=t.current===e?void 0:t.current,i={current:r,contexts:E([],n,!0),lastUpdateCheck:t.lastUpdateCheck},[4,this.storeContext(i)];case 1:return o.sent(),[2]}}))}))},e.prototype.getCurrentContext=function(){var e=this.contextWrapper.current;return void 0===e?e:this.findContext(e)},e.prototype.findContext=function(e){return this.contextWrapper.contexts.find((function(t){return t.name===e}))},e.prototype.getCurrentBaseUrl=function(e){var t=this.getCurrentContext();if(!0===e&&!(null==t?void 0:t.host))throw new Error("Context (".concat(null==t?void 0:t.name,") doesn't have a target API host. Please login again."));return null==t?void 0:t.host},e.prototype.getCurrentProjectName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.project},e.prototype.getCurrentName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.name},e.prototype.getCurrentToken=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.token},e.prototype.getCurrentServiceName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.service},e.prototype.getCurrentJobName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.job},e.prototype.getCurrentPlanId=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.plan},e.prototype.getCurrentRegion=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.region},e.prototype.useContext=function(e){return I(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(!this.findContext(e))throw new Error("Context with name ".concat(e," doesn't exist"));return t=this.contextWrapper,n=A(A({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return I(this,void 0,void 0,(function(){var n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:if(n=null!=t?t:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(t," doesn't exist"));return i=this.contextWrapper,o=i.contexts.map((function(t){return t.name===n?A(A({},r),{token:e}):t})),s=A(A({},i),{contexts:o}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return I(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=A(A({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return I(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=A(A({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return I(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=A(A({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return I(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=A(A({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return I(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=A(A({},t),{region:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},e.prototype.setLastUpdateCheck=function(e){return I(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=A(A({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),op=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return I(n,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,b.promises.mkdir(e,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 3:return[2]}}))}))},n.configPath=t||"".concat(d.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return P(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(b.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return I(this,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,b.promises.writeFile(this.configFile,JSON.stringify(e,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw t=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(t.message)),t;case 5:return[2]}}))}))},t.prototype.assertConfigDir=function(){return I(this,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return e.sent(),[2]}}))}))},t.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},t}(ip),sp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return P(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return I(this,void 0,void 0,(function(){return C(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(ip),ap=function(e,t){void 0===t&&(t={});var n,r,i,o=this;this.baseUrl=function(){return o.contextProvider.getCurrentBaseUrl()},this.contextProvider=e,this.forwarding=new Qa(e,new id(e,t).call,new bc(e,t).call),this.exec=new nu(e),this.logs=new mu(e),this.metrics=new gu(e),this.endpoints={get:(i={},i.addon=((r=new wc(e,t)).types=new wu(e,t),r.backupSchedules=new Sc(e,t),r.backups=new Ic(e,t),r.backup=((n=new Ec(e,t)).download=new xc(e,t),n),r.restores=new Rc(e,t),r.containers=new Nc(e,t),r.credentials=new Bc(e,t),r.pitrWindow=new Mc(e,t),r.version=new Hc(e,t),r),i.invoice=function(){var n={};return n.details=new _u(e,t),n}(),i.cluster=new Iu(e,t),i.integration=new Ou(e,t),i.dnsId=new Ru(e,t),i.domain=new Bu(e,t),i.subdomain=new Fu(e,t),i.logSink=new Zu(e,t),i.registry=new rc(e,t),i.project=new vc(e,t),i.job=function(){var n=new rl(e,t);return n.branches=new ol(e,t),n.builds=new sl(e,t),n.buildArguments=new ul(e,t),n.buildArgumentDetails=new ll(e,t),n.build=new hl(e,t),n.containers=new vl(e,t),n.deployment=new ml(e,t),n.healthChecks=new yl(e,t),n.pullRequests=new jl(e,t),n.runs=new Sl(e,t),n.run=new Al(e,t),n.runtimeEnvironment=new Cl(e,t),n.runtimeEnvironmentDetails=new kl(e,t),n}(),i.pipeline=new Rl(e,t),i.previewTemplate=new Tl(e,t),i.previewTemplateRun=new Fl(e,t),i.releaseFlow=new Gl(e,t),i.releaseFlowRun=new Wl(e,t),i.secret=new Kl(e,t),i.secretLink=new td(e,t),i.secretDetails=new rd(e,t),i.service=function(){var n=new fd(e,t);return n.branches=new md(e,t),n.builds=new bd(e,t),n.buildArguments=new gd(e,t),n.buildArgumentDetails=new jd(e,t),n.build=new Pd(e,t),n.containers=new Id(e,t),n.deployment=new Cd(e,t),n.healthChecks=new kd(e,t),n.ports=new xd(e,t),n.pullRequests=new Rd(e,t),n.runtimeEnvironment=new Bd(e,t),n.runtimeEnvironmentDetails=new qd(e,t),n}(),i.volume=new Jd(e,t),i.template=new Kd(e,t),i.templateRun=new np(e,t),i),list:function(){var n={};return n.invoices=new ju(e,t),n.providers=new Su(e,t),n.clusters=new Pu(e,t),n.integrations=new ku(e,t),n.domains=new Tu(e,t),n.logSinks=new Hu(e,t),n.registries=new tc(e,t),n.vcs=new sc(e,t),n.repos=new uc(e,t),n.branches=new cc(e,t),n.plans=new lc(e,t),n.projects=new dc(e,t),n.addons=new bc(e,t),n.jobs=new Zc(e,t),n.pipelines=new Dl(e,t),n.previewTemplatePreviews=new Bl(e,t),n.previewTemplateRuns=new ql(e,t),n.releaseFlowRuns=new zl(e,t),n.secrets=new Vl(e,t),n.services=new id(e,t),n.volumes=new Gd(e,t),n.regions=new Hd(e,t),n.templates=new Yd(e,t),n.templateRuns=new tp(e,t),n}(),create:function(){var n={};return n.cluster=new Au(e,t),n.integration=new Uu(e,t),n.domain=new Nu(e,t),n.logSink=new Yu(e,t),n.customVcs=function(){var n={};return n.token=new ac(e,t),n}(),n.project=new pc(e,t),n.addon=function(){var n=new yc(e,t);return n.backupSchedule=new Pc(e,t),n}(),n.job=function(){var n={};return n.cron=new Kc(e,t),n.manual=new el(e,t),n}(),n.secret=new Hl(e,t),n.service=function(){var n={};return n.build=new od(e,t),n.combined=new ud(e,t),n.deployment=new dd(e,t),n}(),n.volume=new Md(e,t),n.template=new Zd(e,t),n}(),update:function(){var n={};return n.cluster=new Cu(e,t),n.integration=new xu(e,t),n.logSink=new ec(e,t),n.registry=new oc(e,t),n.addon=function(){var n={};return n.networkSettings=new qc(e,t),n.security=new Vc(e,t),n.version=new Yc(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new cl(e,t),n.buildOptions=new dl(e,t),n.buildSource=new pl(e,t),n.deployment=new bl(e,t),n.healthChecks=new gl(e,t),n.runtimeEnvironment=new El(e,t),n.settings=new Ol(e,t),n}(),n.previewTemplate=new Nl(e,t),n.releaseFlow=new Ml(e,t),n.secret=new Ql(e,t),n.secretLink=new ed(e,t),n.service=function(){var n={};return n.buildArguments=new wd(e,t),n.buildOptions=new _d(e,t),n.buildSource=new Sd(e,t),n.deployment=new Ed(e,t),n.healthChecks=new Ud(e,t),n.ports=new Dd(e,t),n.runtimeEnvironment=new Ld(e,t),n}(),n.volume=new zd(e,t),n.template=new Xd(e,t),n}(),delete:function(){var n={};return n.cluster=new Eu(e,t),n.integration=new Du(e,t),n.domain=new Lu(e,t),n.subdomain=new Gu(e,t),n.logSink=new Ku(e,t),n.registry=new ic(e,t),n.project=new mc(e,t),n.addon=function(){var n=new _c(e,t);return n.backupSchedule=new Ac(e,t),n}(),n.backup=new kc(e,t),n.job=new il(e,t),n.previewTemplatePreview=new Ll(e,t),n.secret=new Xl(e,t),n.secretLink=new nd(e,t),n.service=new vd(e,t),n.volume=new Wd(e,t),n.template=new Qd(e,t),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new qu(e,t),n}(),n.registry=new nc(e,t),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Mu(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=new Ju(e,t),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new zu(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Wu(e,t),n}(),n}(),verify:function(){var n={};return n.subdomain=new $u(e,t),n.domain=new Vu(e,t),n}(),pause:function(){var n={};return n.logSink=new Xu(e,t),n.addon=new Fc(e,t),n.job=new wl(e,t),n.service=new Od(e,t),n}(),resume:function(){var n={};return n.logSink=new Qu(e,t),n.addon=new Wc(e,t),n.job=new _l(e,t),n.service=new Nd(e,t),n}(),put:function(){var n={};return n.project=new hc(e,t),n.addon=new gc(e,t),n.job=function(){var n={};return n.cron=new Xc(e,t),n.manual=new tl(e,t),n}(),n.secret=new Yl(e,t),n.service=function(){var n={};return n.build=new sd(e,t),n.combined=new cd(e,t),n.deployment=new pd(e,t),n}(),n}(),patch:function(){var n={};return n.project=new fc(e,t),n.addon=new jc(e,t),n.job=function(){var n={};return n.cron=new Qc(e,t),n.manual=new nl(e,t),n}(),n.secret=new Zl(e,t),n.service=function(){var n={};return n.build=new ad(e,t),n.combined=new ld(e,t),n.deployment=new hd(e,t),n}(),n}(),backup:function(){var n={};return n.addon=new Cc(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Uc(e,t),n.restore=new Oc(e,t),n}(),n.job=function(){var n={};return n.build=new fl(e,t),n.run=new Il(e,t),n}(),n.releaseFlowRun=new $l(e,t),n.service=function(){var n={};return n.build=new Ad(e,t),n}(),n.templateRun=new rp(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new Dc(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new Tc(e,t),n}(),n}(),import:function(){var n={};return n.addon=function(){var n={};return n.backup=new Lc(e,t),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new Gc(e,t),n}(),n.job=function(){var n={};return n.build=new al(e,t),n.run=new Pl(e,t),n}(),n.service=function(){var n={};return n.build=new yd(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new Jc(e,t),n}(),restart:function(){var n={};return n.addon=new zc(e,t),n.service=new Td(e,t),n}(),scale:function(){var n={};return n.addon=new $c(e,t),n.job=new Ul(e,t),n.service=new Fd(e,t),n}(),suspend:function(){var n={};return n.job=new xl(e,t),n}(),run:function(){var n={};return n.releaseFlow=new Jl(e,t),n.template=new ep(e,t),n}(),attach:function(){var n={};return n.volume=new $d(e,t),n}(),detach:function(){var n={};return n.volume=new Vd(e,t),n}()},this.get=function(){var e={};return e.addon=function(){var e=o.endpoints.get.addon.call;return e.types=o.endpoints.get.addon.types.call,e.backupSchedules=o.endpoints.get.addon.backupSchedules.call,e.backups=o.endpoints.get.addon.backups.call,e.backup=function(){var e=o.endpoints.get.addon.backup.call;return e.download=o.endpoints.get.addon.backup.download.call,e}(),e.restores=o.endpoints.get.addon.restores.call,e.containers=o.endpoints.get.addon.containers.call,e.credentials=o.endpoints.get.addon.credentials.call,e.pitrWindow=o.endpoints.get.addon.pitrWindow.call,e.version=o.endpoints.get.addon.version.call,e.logs=o.logs.getAddonLogs,e.logTail=o.logs.tailAddonLogs,e.metrics=o.metrics.getAddonMetrics,e.metricsRange=o.metrics.getAddonMetricsRange,e}(),e.invoice=function(){var e={};return e.details=o.endpoints.get.invoice.details.call,e}(),e.cluster=o.endpoints.get.cluster.call,e.integration=o.endpoints.get.integration.call,e.dnsId=o.endpoints.get.dnsId.call,e.domain=o.endpoints.get.domain.call,e.subdomain=o.endpoints.get.subdomain.call,e.logSink=o.endpoints.get.logSink.call,e.registry=o.endpoints.get.registry.call,e.project=o.endpoints.get.project.call,e.job=function(){var e=o.endpoints.get.job.call;return e.branches=o.endpoints.get.job.branches.call,e.builds=o.endpoints.get.job.builds.call,e.buildArguments=o.endpoints.get.job.buildArguments.call,e.buildArgumentDetails=o.endpoints.get.job.buildArgumentDetails.call,e.build=o.endpoints.get.job.build.call,e.containers=o.endpoints.get.job.containers.call,e.deployment=o.endpoints.get.job.deployment.call,e.healthChecks=o.endpoints.get.job.healthChecks.call,e.pullRequests=o.endpoints.get.job.pullRequests.call,e.runs=o.endpoints.get.job.runs.call,e.run=o.endpoints.get.job.run.call,e.runtimeEnvironment=o.endpoints.get.job.runtimeEnvironment.call,e.runtimeEnvironmentDetails=o.endpoints.get.job.runtimeEnvironmentDetails.call,e.logs=o.logs.getJobLogs,e.buildLogs=o.logs.getJobBuildLogs,e.logTail=o.logs.tailJobLogs,e.buildLogTail=o.logs.tailJobBuildLogs,e.metrics=o.metrics.getJobMetrics,e.buildMetrics=o.metrics.getJobBuildMetrics,e.metricsRange=o.metrics.getJobMetricsRange,e.buildMetricsRange=o.metrics.getJobBuildMetricsRange,e}(),e.pipeline=o.endpoints.get.pipeline.call,e.previewTemplate=o.endpoints.get.previewTemplate.call,e.previewTemplateRun=o.endpoints.get.previewTemplateRun.call,e.releaseFlow=o.endpoints.get.releaseFlow.call,e.releaseFlowRun=o.endpoints.get.releaseFlowRun.call,e.secret=o.endpoints.get.secret.call,e.secretLink=o.endpoints.get.secretLink.call,e.secretDetails=o.endpoints.get.secretDetails.call,e.service=function(){var e=o.endpoints.get.service.call;return e.branches=o.endpoints.get.service.branches.call,e.builds=o.endpoints.get.service.builds.call,e.buildArguments=o.endpoints.get.service.buildArguments.call,e.buildArgumentDetails=o.endpoints.get.service.buildArgumentDetails.call,e.build=o.endpoints.get.service.build.call,e.containers=o.endpoints.get.service.containers.call,e.deployment=o.endpoints.get.service.deployment.call,e.healthChecks=o.endpoints.get.service.healthChecks.call,e.ports=o.endpoints.get.service.ports.call,e.pullRequests=o.endpoints.get.service.pullRequests.call,e.runtimeEnvironment=o.endpoints.get.service.runtimeEnvironment.call,e.runtimeEnvironmentDetails=o.endpoints.get.service.runtimeEnvironmentDetails.call,e.logs=o.logs.getServiceLogs,e.buildLogs=o.logs.getServiceBuildLogs,e.logTail=o.logs.tailServiceLogs,e.buildLogTail=o.logs.tailServiceBuildLogs,e.metrics=o.metrics.getServiceMetrics,e.buildMetrics=o.metrics.getServiceBuildMetrics,e.metricsRange=o.metrics.getServiceMetricsRange,e.buildMetricsRange=o.metrics.getServiceBuildMetricsRange,e}(),e.volume=o.endpoints.get.volume.call,e.template=o.endpoints.get.template.call,e.templateRun=o.endpoints.get.templateRun.call,e}(),this.list=function(){var e={};return e.invoices=o.endpoints.list.invoices.call,e.providers=o.endpoints.list.providers.call,e.clusters=o.endpoints.list.clusters.call,e.integrations=o.endpoints.list.integrations.call,e.domains=o.endpoints.list.domains.call,e.logSinks=o.endpoints.list.logSinks.call,e.registries=o.endpoints.list.registries.call,e.vcs=o.endpoints.list.vcs.call,e.repos=o.endpoints.list.repos.call,e.branches=o.endpoints.list.branches.call,e.plans=o.endpoints.list.plans.call,e.projects=o.endpoints.list.projects.call,e.addons=o.endpoints.list.addons.call,e.jobs=o.endpoints.list.jobs.call,e.pipelines=o.endpoints.list.pipelines.call,e.previewTemplatePreviews=o.endpoints.list.previewTemplatePreviews.call,e.previewTemplateRuns=o.endpoints.list.previewTemplateRuns.call,e.releaseFlowRuns=o.endpoints.list.releaseFlowRuns.call,e.secrets=o.endpoints.list.secrets.call,e.services=o.endpoints.list.services.call,e.volumes=o.endpoints.list.volumes.call,e.regions=o.endpoints.list.regions.call,e.templates=o.endpoints.list.templates.call,e.templateRuns=o.endpoints.list.templateRuns.call,e}(),this.create=function(){var e={};return e.cluster=o.endpoints.create.cluster.call,e.integration=o.endpoints.create.integration.call,e.domain=o.endpoints.create.domain.call,e.logSink=o.endpoints.create.logSink.call,e.customVcs=function(){var e={};return e.token=o.endpoints.create.customVcs.token.call,e}(),e.project=o.endpoints.create.project.call,e.addon=function(){var e=o.endpoints.create.addon.call;return e.backupSchedule=o.endpoints.create.addon.backupSchedule.call,e}(),e.job=function(){var e={};return e.cron=o.endpoints.create.job.cron.call,e.manual=o.endpoints.create.job.manual.call,e}(),e.secret=o.endpoints.create.secret.call,e.service=function(){var e={};return e.build=o.endpoints.create.service.build.call,e.combined=o.endpoints.create.service.combined.call,e.deployment=o.endpoints.create.service.deployment.call,e}(),e.volume=o.endpoints.create.volume.call,e.template=o.endpoints.create.template.call,e}(),this.update=function(){var e={};return e.cluster=o.endpoints.update.cluster.call,e.integration=o.endpoints.update.integration.call,e.logSink=o.endpoints.update.logSink.call,e.registry=o.endpoints.update.registry.call,e.addon=function(){var e={};return e.networkSettings=o.endpoints.update.addon.networkSettings.call,e.security=o.endpoints.update.addon.security.call,e.version=o.endpoints.update.addon.version.call,e}(),e.job=function(){var e={};return e.buildArguments=o.endpoints.update.job.buildArguments.call,e.buildOptions=o.endpoints.update.job.buildOptions.call,e.buildSource=o.endpoints.update.job.buildSource.call,e.deployment=o.endpoints.update.job.deployment.call,e.healthChecks=o.endpoints.update.job.healthChecks.call,e.runtimeEnvironment=o.endpoints.update.job.runtimeEnvironment.call,e.settings=o.endpoints.update.job.settings.call,e}(),e.previewTemplate=o.endpoints.update.previewTemplate.call,e.releaseFlow=o.endpoints.update.releaseFlow.call,e.secret=o.endpoints.update.secret.call,e.secretLink=o.endpoints.update.secretLink.call,e.service=function(){var e={};return e.buildArguments=o.endpoints.update.service.buildArguments.call,e.buildOptions=o.endpoints.update.service.buildOptions.call,e.buildSource=o.endpoints.update.service.buildSource.call,e.deployment=o.endpoints.update.service.deployment.call,e.healthChecks=o.endpoints.update.service.healthChecks.call,e.ports=o.endpoints.update.service.ports.call,e.runtimeEnvironment=o.endpoints.update.service.runtimeEnvironment.call,e}(),e.volume=o.endpoints.update.volume.call,e.template=o.endpoints.update.template.call,e}(),this.delete=function(){var e={};return e.cluster=o.endpoints.delete.cluster.call,e.integration=o.endpoints.delete.integration.call,e.domain=o.endpoints.delete.domain.call,e.subdomain=o.endpoints.delete.subdomain.call,e.logSink=o.endpoints.delete.logSink.call,e.registry=o.endpoints.delete.registry.call,e.project=o.endpoints.delete.project.call,e.addon=function(){var e=o.endpoints.delete.addon.call;return e.backupSchedule=o.endpoints.delete.addon.backupSchedule.call,e}(),e.backup=o.endpoints.delete.backup.call,e.job=o.endpoints.delete.job.call,e.previewTemplatePreview=o.endpoints.delete.previewTemplatePreview.call,e.secret=o.endpoints.delete.secret.call,e.secretLink=o.endpoints.delete.secretLink.call,e.service=o.endpoints.delete.service.call,e.volume=o.endpoints.delete.volume.call,e.template=o.endpoints.delete.template.call,e}(),this.add=function(){var e={};return e.domain=function(){var e={};return e.subdomain=o.endpoints.add.domain.subdomain.call,e}(),e.registry=o.endpoints.add.registry.call,e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=o.endpoints.assign.subdomain.service.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=o.endpoints.unassign.subdomain.call,e}(),this.disable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=o.endpoints.disable.subdomain.cdn.call,e}(),e}(),this.enable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=o.endpoints.enable.subdomain.cdn.call,e}(),e}(),this.verify=function(){var e={};return e.subdomain=o.endpoints.verify.subdomain.call,e.domain=o.endpoints.verify.domain.call,e}(),this.pause=function(){var e={};return e.logSink=o.endpoints.pause.logSink.call,e.addon=o.endpoints.pause.addon.call,e.job=o.endpoints.pause.job.call,e.service=o.endpoints.pause.service.call,e}(),this.resume=function(){var e={};return e.logSink=o.endpoints.resume.logSink.call,e.addon=o.endpoints.resume.addon.call,e.job=o.endpoints.resume.job.call,e.service=o.endpoints.resume.service.call,e}(),this.put=function(){var e={};return e.project=o.endpoints.put.project.call,e.addon=o.endpoints.put.addon.call,e.job=function(){var e={};return e.cron=o.endpoints.put.job.cron.call,e.manual=o.endpoints.put.job.manual.call,e}(),e.secret=o.endpoints.put.secret.call,e.service=function(){var e={};return e.build=o.endpoints.put.service.build.call,e.combined=o.endpoints.put.service.combined.call,e.deployment=o.endpoints.put.service.deployment.call,e}(),e}(),this.patch=function(){var e={};return e.project=o.endpoints.patch.project.call,e.addon=o.endpoints.patch.addon.call,e.job=function(){var e={};return e.cron=o.endpoints.patch.job.cron.call,e.manual=o.endpoints.patch.job.manual.call,e}(),e.secret=o.endpoints.patch.secret.call,e.service=function(){var e={};return e.build=o.endpoints.patch.service.build.call,e.combined=o.endpoints.patch.service.combined.call,e.deployment=o.endpoints.patch.service.deployment.call,e}(),e}(),this.backup=function(){var e={};return e.addon=o.endpoints.backup.addon.call,e}(),this.abort=function(){var e={};return e.addon=function(){var e={};return e.backup=o.endpoints.abort.addon.backup.call,e.restore=o.endpoints.abort.addon.restore.call,e}(),e.job=function(){var e={};return e.build=o.endpoints.abort.job.build.call,e.run=o.endpoints.abort.job.run.call,e}(),e.releaseFlowRun=o.endpoints.abort.releaseFlowRun.call,e.service=function(){var e={};return e.build=o.endpoints.abort.service.build.call,e}(),e.templateRun=o.endpoints.abort.templateRun.call,e}(),this.restore=function(){var e={};return e.addon=function(){var e={};return e.backup=o.endpoints.restore.addon.backup.call,e}(),e}(),this.retain=function(){var e={};return e.addon=function(){var e={};return e.backup=o.endpoints.retain.addon.backup.call,e}(),e}(),this.import=function(){var e={};return e.addon=function(){var e={};return e.backup=o.endpoints.import.addon.backup.call,e}(),e}(),this.start=function(){var e={};return e.addon=function(){var e={};return e.pitr=o.endpoints.start.addon.pitr.call,e}(),e.job=function(){var e={};return e.build=o.endpoints.start.job.build.call,e.run=o.endpoints.start.job.run.call,e}(),e.service=function(){var e={};return e.build=o.endpoints.start.service.build.call,e}(),e}(),this.reset=function(){var e={};return e.addon=o.endpoints.reset.addon.call,e}(),this.restart=function(){var e={};return e.addon=o.endpoints.restart.addon.call,e.service=o.endpoints.restart.service.call,e}(),this.scale=function(){var e={};return e.addon=o.endpoints.scale.addon.call,e.job=o.endpoints.scale.job.call,e.service=o.endpoints.scale.service.call,e}(),this.suspend=function(){var e={};return e.job=o.endpoints.suspend.job.call,e}(),this.run=function(){var e={};return e.releaseFlow=o.endpoints.run.releaseFlow.call,e.template=o.endpoints.run.template.call,e}(),this.attach=function(){var e={};return e.volume=o.endpoints.attach.volume.call,e}(),this.detach=function(){var e={};return e.volume=o.endpoints.detach.volume.call,e}()};export{Uc as AbortAddonBackupEndpoint,Oc as AbortAddonRestoreEndpoint,fl as AbortJobBuildEndpoint,Il as AbortJobRunEndpoint,$l as AbortReleaseflowrunEndpoint,Ad as AbortServiceBuildEndpoint,rp as AbortTemplaterunEndpoint,qu as AddDomainSubdomainEndpoint,nc as AddRegistryEndpoint,ap as ApiClient,ip as ApiClientContextProvider,op as ApiClientFileContextProvider,sp as ApiClientInMemoryContextProvider,au as ApiEndpoint,Mu as AssignSubdomainServiceEndpoint,$d as AttachVolumeEndpoint,Cc as BackupAddonEndpoint,Pc as CreateAddonBackupscheduleEndpoint,yc as CreateAddonEndpoint,Au as CreateClusterEndpoint,ac as CreateCustomvcsTokenEndpoint,Nu as CreateDomainEndpoint,Uu as CreateIntegrationEndpoint,Kc as CreateJobCronEndpoint,el as CreateJobManualEndpoint,Yu as CreateLogsinkEndpoint,pc as CreateProjectEndpoint,Hl as CreateSecretEndpoint,od as CreateServiceBuildEndpoint,ud as CreateServiceCombinedEndpoint,dd as CreateServiceDeploymentEndpoint,Zd as CreateTemplateEndpoint,Md as CreateVolumeEndpoint,Ac as DeleteAddonBackupscheduleEndpoint,_c as DeleteAddonEndpoint,lu as DeleteApiEndpoint,kc as DeleteBackupEndpoint,Eu as DeleteClusterEndpoint,Lu as DeleteDomainEndpoint,Du as DeleteIntegrationEndpoint,il as DeleteJobEndpoint,Ku as DeleteLogsinkEndpoint,Ll as DeletePreviewtemplatepreviewEndpoint,mc as DeleteProjectEndpoint,ic as DeleteRegistryEndpoint,Xl as DeleteSecretEndpoint,nd as DeleteSecretlinkEndpoint,vd as DeleteServiceEndpoint,Gu as DeleteSubdomainEndpoint,Qd as DeleteTemplateEndpoint,Wd as DeleteVolumeEndpoint,Vd as DetachVolumeEndpoint,zu as DisableSubdomainCdnEndpoint,Wu as EnableSubdomainCdnEndpoint,tu as ExecCommandStandard,xc as GetAddonBackupDownloadEndpoint,Ec as GetAddonBackupEndpoint,Ic as GetAddonBackupsEndpoint,Sc as GetAddonBackupschedulesEndpoint,Nc as GetAddonContainersEndpoint,Bc as GetAddonCredentialsEndpoint,wc as GetAddonEndpoint,Mc as GetAddonPitrwindowEndpoint,Rc as GetAddonRestoresEndpoint,wu as GetAddonTypesEndpoint,Hc as GetAddonVersionEndpoint,uu as GetApiEndpoint,Iu as GetClusterEndpoint,Ru as GetDnsidEndpoint,Bu as GetDomainEndpoint,Ou as GetIntegrationEndpoint,_u as GetInvoiceDetailsEndpoint,ol as GetJobBranchesEndpoint,hl as GetJobBuildEndpoint,ll as GetJobBuildargumentdetailsEndpoint,ul as GetJobBuildargumentsEndpoint,sl as GetJobBuildsEndpoint,vl as GetJobContainersEndpoint,ml as GetJobDeploymentEndpoint,rl as GetJobEndpoint,yl as GetJobHealthchecksEndpoint,jl as GetJobPullrequestsEndpoint,Al as GetJobRunEndpoint,Sl as GetJobRunsEndpoint,Cl as GetJobRuntimeenvironmentEndpoint,kl as GetJobRuntimeenvironmentdetailsEndpoint,Zu as GetLogsinkEndpoint,Rl as GetPipelineEndpoint,Tl as GetPreviewtemplateEndpoint,Fl as GetPreviewtemplaterunEndpoint,vc as GetProjectEndpoint,rc as GetRegistryEndpoint,Gl as GetReleaseflowEndpoint,Wl as GetReleaseflowrunEndpoint,Kl as GetSecretEndpoint,rd as GetSecretdetailsEndpoint,td as GetSecretlinkEndpoint,md as GetServiceBranchesEndpoint,Pd as GetServiceBuildEndpoint,jd as GetServiceBuildargumentdetailsEndpoint,gd as GetServiceBuildargumentsEndpoint,bd as GetServiceBuildsEndpoint,Id as GetServiceContainersEndpoint,Cd as GetServiceDeploymentEndpoint,fd as GetServiceEndpoint,kd as GetServiceHealthchecksEndpoint,xd as GetServicePortsEndpoint,Rd as GetServicePullrequestsEndpoint,Bd as GetServiceRuntimeenvironmentEndpoint,qd as GetServiceRuntimeenvironmentdetailsEndpoint,Fu as GetSubdomainEndpoint,Kd as GetTemplateEndpoint,np as GetTemplaterunEndpoint,Jd as GetVolumeEndpoint,Lc as ImportAddonBackupEndpoint,bc as ListAddonsEndpoint,cc as ListBranchesEndpoint,Pu as ListClustersEndpoint,Tu as ListDomainsEndpoint,ku as ListIntegrationsEndpoint,ju as ListInvoicesEndpoint,Zc as ListJobsEndpoint,Hu as ListLogsinksEndpoint,Dl as ListPipelinesEndpoint,lc as ListPlansEndpoint,Bl as ListPreviewtemplatepreviewsEndpoint,ql as ListPreviewtemplaterunsEndpoint,dc as ListProjectsEndpoint,Su as ListProvidersEndpoint,Hd as ListRegionsEndpoint,tc as ListRegistriesEndpoint,zl as ListReleaseflowrunsEndpoint,uc as ListReposEndpoint,Vl as ListSecretsEndpoint,id as ListServicesEndpoint,tp as ListTemplaterunsEndpoint,Yd as ListTemplatesEndpoint,sc as ListVcsEndpoint,Gd as ListVolumesEndpoint,Ya as MetricType,ru as NorthflankApiCallError,nu as NorthflankExecCommand,mu as NorthflankLogFetch,gu as NorthflankMetricFetch,Qa as NorthflankPortForwarder,jc as PatchAddonEndpoint,pu as PatchApiEndpoint,Qc as PatchJobCronEndpoint,nl as PatchJobManualEndpoint,fc as PatchProjectEndpoint,Zl as PatchSecretEndpoint,ad as PatchServiceBuildEndpoint,ld as PatchServiceCombinedEndpoint,hd as PatchServiceDeploymentEndpoint,Fc as PauseAddonEndpoint,wl as PauseJobEndpoint,Xu as PauseLogsinkEndpoint,Od as PauseServiceEndpoint,cu as PostApiEndpoint,gc as PutAddonEndpoint,du as PutApiEndpoint,Xc as PutJobCronEndpoint,tl as PutJobManualEndpoint,hc as PutProjectEndpoint,Yl as PutSecretEndpoint,sd as PutServiceBuildEndpoint,cd as PutServiceCombinedEndpoint,pd as PutServiceDeploymentEndpoint,Jc as ResetAddonEndpoint,zc as RestartAddonEndpoint,Td as RestartServiceEndpoint,Dc as RestoreAddonBackupEndpoint,Wc as ResumeAddonEndpoint,_l as ResumeJobEndpoint,Qu as ResumeLogsinkEndpoint,Nd as ResumeServiceEndpoint,Tc as RetainAddonBackupEndpoint,Jl as RunReleaseflowEndpoint,ep as RunTemplateEndpoint,$c as ScaleAddonEndpoint,Ul as ScaleJobEndpoint,Fd as ScaleServiceEndpoint,Gc as StartAddonPitrEndpoint,al as StartJobBuildEndpoint,Pl as StartJobRunEndpoint,yd as StartServiceBuildEndpoint,xl as SuspendJobEndpoint,Ju as UnassignSubdomainEndpoint,qc as UpdateAddonNetworksettingsEndpoint,Vc as UpdateAddonSecurityEndpoint,Yc as UpdateAddonVersionEndpoint,Cu as UpdateClusterEndpoint,xu as UpdateIntegrationEndpoint,cl as UpdateJobBuildargumentsEndpoint,dl as UpdateJobBuildoptionsEndpoint,pl as UpdateJobBuildsourceEndpoint,bl as UpdateJobDeploymentEndpoint,gl as UpdateJobHealthchecksEndpoint,El as UpdateJobRuntimeenvironmentEndpoint,Ol as UpdateJobSettingsEndpoint,ec as UpdateLogsinkEndpoint,Nl as UpdatePreviewtemplateEndpoint,oc as UpdateRegistryEndpoint,Ml as UpdateReleaseflowEndpoint,Ql as UpdateSecretEndpoint,ed as UpdateSecretlinkEndpoint,wd as UpdateServiceBuildargumentsEndpoint,_d as UpdateServiceBuildoptionsEndpoint,Sd as UpdateServiceBuildsourceEndpoint,Ed as UpdateServiceDeploymentEndpoint,Ud as UpdateServiceHealthchecksEndpoint,Dd as UpdateServicePortsEndpoint,Ld as UpdateServiceRuntimeenvironmentEndpoint,Xd as UpdateTemplateEndpoint,zd as UpdateVolumeEndpoint,Vu as VerifyDomainEndpoint,$u as VerifySubdomainEndpoint};
1
+ import e,{EventEmitter as t}from"events";import*as n from"stream";import r,{Transform as o}from"stream";import i from"http";import s,{fileURLToPath as a}from"url";import u from"punycode";import c from"https";import d from"zlib";import l from"os";import*as p from"net";import f,{Socket as h}from"net";import{spawn as v,execSync as m}from"child_process";import g from"fs";import b from"path";import y from"buffer";import w from"tls";import j from"crypto";import I from"dgram";var E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}E(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},S.apply(this,arguments)};function P(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function A(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function R(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var C="object"==typeof global&&global&&global.Object===Object&&global,k="object"==typeof self&&self&&self.Object===Object&&self,U=C||k||Function("return this")(),O=U.Symbol,x=Object.prototype,q=x.hasOwnProperty,D=x.toString,T=O?O.toStringTag:void 0;var N=Object.prototype.toString;var B="[object Null]",L="[object Undefined]",F=O?O.toStringTag:void 0;function G(e){return null==e?void 0===e?L:B:F&&F in Object(e)?function(e){var t=q.call(e,T),n=e[T];try{e[T]=void 0;var r=!0}catch(e){}var o=D.call(e);return r&&(t?e[T]=n:delete e[T]),o}(e):function(e){return N.call(e)}(e)}function M(e){return null!=e&&"object"==typeof e}var J="[object Symbol]";function z(e){return"symbol"==typeof e||M(e)&&G(e)==J}function W(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var V=Array.isArray,$=1/0,H=O?O.prototype:void 0,Y=H?H.toString:void 0;function Z(e){if("string"==typeof e)return e;if(V(e))return W(e,Z)+"";if(z(e))return Y?Y.call(e):"";var t=e+"";return"0"==t&&1/e==-$?"-0":t}function K(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function X(e){return e}var Q="[object AsyncFunction]",ee="[object Function]",te="[object GeneratorFunction]",ne="[object Proxy]";function re(e){if(!K(e))return!1;var t=G(e);return t==ee||t==te||t==Q||t==ne}var oe,ie=U["__core-js_shared__"],se=(oe=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"";var ae=Function.prototype.toString;function ue(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ce=/^\[object .+?Constructor\]$/,de=Function.prototype,le=Object.prototype,pe=de.toString,fe=le.hasOwnProperty,he=RegExp("^"+pe.call(fe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ve(e){return!(!K(e)||(t=e,se&&se in t))&&(re(e)?he:ce).test(ue(e));var t}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ve(n)?n:void 0}var ge=me(U,"WeakMap"),be=Object.create,ye=function(){function e(){}return function(t){if(!K(t))return{};if(be)return be(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var we=Date.now;var je,Ie,Ee,_e=function(){try{var e=me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Se=_e,Pe=Se?function(e,t){return Se(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:X,Ae=(je=Pe,Ie=0,Ee=0,function(){var e=we(),t=16-(e-Ee);if(Ee=e,t>0){if(++Ie>=800)return arguments[0]}else Ie=0;return je.apply(void 0,arguments)}),Re=9007199254740991,Ce=/^(?:0|[1-9]\d*)$/;function ke(e,t){var n=typeof e;return!!(t=null==t?Re:t)&&("number"==n||"symbol"!=n&&Ce.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e,t,n){"__proto__"==t&&Se?Se(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Oe(e,t){return e===t||e!=e&&t!=t}var xe=Object.prototype.hasOwnProperty;function qe(e,t,n){var r=e[t];xe.call(e,t)&&Oe(r,n)&&(void 0!==n||t in e)||Ue(e,t,n)}var De=Math.max;function Te(e,t){return Ae(function(e,t,n){return t=De(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=De(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,X),e+"")}var Ne=9007199254740991;function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ne}function Le(e){return null!=e&&Be(e.length)&&!re(e)}var Fe=Object.prototype;function Ge(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function Me(e){return M(e)&&"[object Arguments]"==G(e)}var Je=Object.prototype,ze=Je.hasOwnProperty,We=Je.propertyIsEnumerable,Ve=Me(function(){return arguments}())?Me:function(e){return M(e)&&ze.call(e,"callee")&&!We.call(e,"callee")};var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,He=$e&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=He&&He.exports===$e?U.Buffer:void 0,Ze=(Ye?Ye.isBuffer:void 0)||function(){return!1},Ke={};Ke["[object Float32Array]"]=Ke["[object Float64Array]"]=Ke["[object Int8Array]"]=Ke["[object Int16Array]"]=Ke["[object Int32Array]"]=Ke["[object Uint8Array]"]=Ke["[object Uint8ClampedArray]"]=Ke["[object Uint16Array]"]=Ke["[object Uint32Array]"]=!0,Ke["[object Arguments]"]=Ke["[object Array]"]=Ke["[object ArrayBuffer]"]=Ke["[object Boolean]"]=Ke["[object DataView]"]=Ke["[object Date]"]=Ke["[object Error]"]=Ke["[object Function]"]=Ke["[object Map]"]=Ke["[object Number]"]=Ke["[object Object]"]=Ke["[object RegExp]"]=Ke["[object Set]"]=Ke["[object String]"]=Ke["[object WeakMap]"]=!1;var Xe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qe=Xe&&"object"==typeof module&&module&&!module.nodeType&&module,et=Qe&&Qe.exports===Xe&&C.process,tt=function(){try{var e=Qe&&Qe.require&&Qe.require("util").types;return e||et&&et.binding&&et.binding("util")}catch(e){}}(),nt=tt&&tt.isTypedArray,rt=nt?function(e){return function(t){return e(t)}}(nt):function(e){return M(e)&&Be(e.length)&&!!Ke[G(e)]},ot=rt,it=Object.prototype.hasOwnProperty;function st(e,t){var n=V(e),r=!n&&Ve(e),o=!n&&!r&&Ze(e),i=!n&&!r&&!o&&ot(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=a.length;for(var c in e)!t&&!it.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ke(c,u))||a.push(c);return a}function at(e,t){return function(n){return e(t(n))}}var ut=at(Object.keys,Object),ct=Object.prototype.hasOwnProperty;function dt(e){return Le(e)?st(e):function(e){if(!Ge(e))return ut(e);var t=[];for(var n in Object(e))ct.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var lt=Object.prototype.hasOwnProperty;function pt(e){if(!K(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ge(e),n=[];for(var r in e)("constructor"!=r||!t&&lt.call(e,r))&&n.push(r);return n}function ft(e){return Le(e)?st(e,!0):pt(e)}var ht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vt=/^\w*$/;function mt(e,t){if(V(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!z(e))||(vt.test(e)||!ht.test(e)||null!=t&&e in Object(t))}var gt=me(Object,"create");var bt=Object.prototype.hasOwnProperty;var yt=Object.prototype.hasOwnProperty;function wt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jt(e,t){for(var n=e.length;n--;)if(Oe(e[n][0],t))return n;return-1}wt.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},wt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wt.prototype.get=function(e){var t=this.__data__;if(gt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return bt.call(t,e)?t[e]:void 0},wt.prototype.has=function(e){var t=this.__data__;return gt?void 0!==t[e]:yt.call(t,e)},wt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gt&&void 0===t?"__lodash_hash_undefined__":t,this};var It=Array.prototype.splice;function Et(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Et.prototype.clear=function(){this.__data__=[],this.size=0},Et.prototype.delete=function(e){var t=this.__data__,n=jt(t,e);return!(n<0)&&(n==t.length-1?t.pop():It.call(t,n,1),--this.size,!0)},Et.prototype.get=function(e){var t=this.__data__,n=jt(t,e);return n<0?void 0:t[n][1]},Et.prototype.has=function(e){return jt(this.__data__,e)>-1},Et.prototype.set=function(e,t){var n=this.__data__,r=jt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var _t=me(U,"Map");function St(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Pt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pt.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(_t||Et),string:new wt}},Pt.prototype.delete=function(e){var t=St(this,e).delete(e);return this.size-=t?1:0,t},Pt.prototype.get=function(e){return St(this,e).get(e)},Pt.prototype.has=function(e){return St(this,e).has(e)},Pt.prototype.set=function(e,t){var n=St(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var At="Expected a function";function Rt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(At);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Rt.Cache||Pt),n}Rt.Cache=Pt;var Ct=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kt=/\\(\\)?/g,Ut=function(e){var t=Rt(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ct,(function(e,n,r,o){t.push(r?o.replace(kt,"$1"):n||e)})),t})),Ot=Ut;function xt(e){return null==e?"":Z(e)}function qt(e,t){return V(e)?e:mt(e,t)?[e]:Ot(xt(e))}var Dt=1/0;function Tt(e){if("string"==typeof e||z(e))return e;var t=e+"";return"0"==t&&1/e==-Dt?"-0":t}function Nt(e,t){for(var n=0,r=(t=qt(t,e)).length;null!=e&&n<r;)e=e[Tt(t[n++])];return n&&n==r?e:void 0}function Bt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Lt=O?O.isConcatSpreadable:void 0;function Ft(e){return V(e)||Ve(e)||!!(Lt&&e&&e[Lt])}function Gt(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Ft),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?Gt(a,t-1,n,r,o):Bt(o,a):r||(o[o.length]=a)}return o}var Mt=at(Object.getPrototypeOf,Object),Jt="[object Object]",zt=Function.prototype,Wt=Object.prototype,Vt=zt.toString,$t=Wt.hasOwnProperty,Ht=Vt.call(Object);function Yt(e){var t=this.__data__=new Et(e);this.size=t.size}Yt.prototype.clear=function(){this.__data__=new Et,this.size=0},Yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yt.prototype.get=function(e){return this.__data__.get(e)},Yt.prototype.has=function(e){return this.__data__.has(e)},Yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Et){var r=n.__data__;if(!_t||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pt(r)}return n.set(e,t),this.size=n.size,this};var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Kt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Kt&&Kt.exports===Zt?U.Buffer:void 0,Qt=Xt?Xt.allocUnsafe:void 0;var en=Object.prototype.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,nn=tn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(tn(e),(function(t){return en.call(e,t)})))}:function(){return[]};function rn(e){return function(e,t,n){var r=t(e);return V(e)?r:Bt(r,n(e))}(e,dt,nn)}var on=me(U,"DataView"),sn=me(U,"Promise"),an=me(U,"Set"),un="[object Map]",cn="[object Promise]",dn="[object Set]",ln="[object WeakMap]",pn="[object DataView]",fn=ue(on),hn=ue(_t),vn=ue(sn),mn=ue(an),gn=ue(ge),bn=G;(on&&bn(new on(new ArrayBuffer(1)))!=pn||_t&&bn(new _t)!=un||sn&&bn(sn.resolve())!=cn||an&&bn(new an)!=dn||ge&&bn(new ge)!=ln)&&(bn=function(e){var t=G(e),n="[object Object]"==t?e.constructor:void 0,r=n?ue(n):"";if(r)switch(r){case fn:return pn;case hn:return un;case vn:return cn;case mn:return dn;case gn:return ln}return t});var yn=bn,wn=U.Uint8Array;function jn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new wn(r).set(new wn(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function In(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pt;++t<n;)this.add(e[t])}function En(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}In.prototype.add=In.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},In.prototype.has=function(e){return this.__data__.has(e)};var _n=1,Sn=2;function Pn(e,t,n,r,o,i){var s=n&_n,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var l=-1,p=!0,f=n&Sn?new In:void 0;for(i.set(e,t),i.set(t,e);++l<a;){var h=e[l],v=t[l];if(r)var m=s?r(v,h,l,t,e,i):r(h,v,l,e,t,i);if(void 0!==m){if(m)continue;p=!1;break}if(f){if(!En(t,(function(e,t){if(s=t,!f.has(s)&&(h===e||o(h,e,n,r,i)))return f.push(t);var s}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function An(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Cn=1,kn=2,Un="[object Boolean]",On="[object Date]",xn="[object Error]",qn="[object Map]",Dn="[object Number]",Tn="[object RegExp]",Nn="[object Set]",Bn="[object String]",Ln="[object Symbol]",Fn="[object ArrayBuffer]",Gn="[object DataView]",Mn=O?O.prototype:void 0,Jn=Mn?Mn.valueOf:void 0;var zn=1,Wn=Object.prototype.hasOwnProperty;var Vn=1,$n="[object Arguments]",Hn="[object Array]",Yn="[object Object]",Zn=Object.prototype.hasOwnProperty;function Kn(e,t,n,r,o,i){var s=V(e),a=V(t),u=s?Hn:yn(e),c=a?Hn:yn(t),d=(u=u==$n?Yn:u)==Yn,l=(c=c==$n?Yn:c)==Yn,p=u==c;if(p&&Ze(e)){if(!Ze(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Yt),s||ot(e)?Pn(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case Gn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fn:return!(e.byteLength!=t.byteLength||!i(new wn(e),new wn(t)));case Un:case On:case Dn:return Oe(+e,+t);case xn:return e.name==t.name&&e.message==t.message;case Tn:case Bn:return e==t+"";case qn:var a=An;case Nn:var u=r&Cn;if(a||(a=Rn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=kn,s.set(e,t);var d=Pn(a(e),a(t),r,o,i,s);return s.delete(e),d;case Ln:if(Jn)return Jn.call(e)==Jn.call(t)}return!1}(e,t,u,n,r,o,i);if(!(n&Vn)){var f=d&&Zn.call(e,"__wrapped__"),h=l&&Zn.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new Yt),o(v,m,n,r,i)}}return!!p&&(i||(i=new Yt),function(e,t,n,r,o,i){var s=n&zn,a=rn(e),u=a.length;if(u!=rn(t).length&&!s)return!1;for(var c=u;c--;){var d=a[c];if(!(s?d in t:Wn.call(t,d)))return!1}var l=i.get(e),p=i.get(t);if(l&&p)return l==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=s;++c<u;){var v=e[d=a[c]],m=t[d];if(r)var g=s?r(m,v,d,t,e,i):r(v,m,d,e,t,i);if(!(void 0===g?v===m||o(v,m,n,r,i):g)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function Xn(e,t,n,r,o){return e===t||(null==e||null==t||!M(e)&&!M(t)?e!=e&&t!=t:Kn(e,t,n,r,Xn,o))}var Qn=1,er=2;function tr(e){return e==e&&!K(e)}function nr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function rr(e){var t=function(e){for(var t=dt(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,tr(o)]}return t}(e);return 1==t.length&&t[0][2]?nr(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,s=!r;if(null==e)return!i;for(e=Object(e);o--;){var a=n[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var u=(a=n[o])[0],c=e[u],d=a[1];if(s&&a[2]){if(void 0===c&&!(u in e))return!1}else{var l=new Yt;if(r)var p=r(c,d,u,e,t,l);if(!(void 0===p?Xn(d,c,Qn|er,r,l):p))return!1}}return!0}(n,e,t)}}function or(e,t){return null!=e&&t in Object(e)}function ir(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=qt(t,e)).length,i=!1;++r<o;){var s=Tt(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Be(o)&&ke(s,o)&&(V(e)||Ve(e))}(e,t,or)}var sr=1,ar=2;function ur(e,t){return mt(e)&&tr(t)?nr(Tt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Nt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?ir(n,e):Xn(t,r,sr|ar)}}function cr(e){return mt(e)?(t=Tt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Nt(t,e)}}(e);var t}function dr(e){return"function"==typeof e?e:null==e?X:"object"==typeof e?V(e)?ur(e[0],e[1]):rr(e):cr(e)}var lr,pr=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[lr?s:++r];if(!1===t(o[a],a,o))break}return e};var fr=function(e,t){return function(n,r){if(null==n)return n;if(!Le(n))return e(n,r);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==r(s[i],i,s););return n}}((function(e,t){return e&&pr(e,t,dt)})),hr=fr;function vr(e,t,n){(void 0!==n&&!Oe(e[t],n)||void 0===n&&!(t in e))&&Ue(e,t,n)}function mr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function gr(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],u=r?r(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),o?Ue(n,a,u):qe(n,a,u)}return n}(e,ft(e))}function br(e,t,n,r,o,i,s){var a=mr(e,n),u=mr(t,n),c=s.get(u);if(c)vr(e,n,c);else{var d,l=i?i(a,u,n+"",e,t,s):void 0,p=void 0===l;if(p){var f=V(u),h=!f&&Ze(u),v=!f&&!h&&ot(u);l=u,f||h||v?V(a)?l=a:M(d=a)&&Le(d)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):h?(p=!1,l=function(e,t){if(t)return e.slice();var n=e.length,r=Qt?Qt(n):new e.constructor(n);return e.copy(r),r}(u,!0)):v?(p=!1,l=jn(u,!0)):l=[]:function(e){if(!M(e)||G(e)!=Jt)return!1;var t=Mt(e);if(null===t)return!0;var n=$t.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Vt.call(n)==Ht}(u)||Ve(u)?(l=a,Ve(a)?l=gr(a):K(a)&&!re(a)||(l=function(e){return"function"!=typeof e.constructor||Ge(e)?{}:ye(Mt(e))}(u))):p=!1}p&&(s.set(u,l),o(l,u,r,i,s),s.delete(u)),vr(e,n,l)}}function yr(e,t,n,r,o){e!==t&&pr(t,(function(i,s){if(o||(o=new Yt),K(i))br(e,t,s,n,yr,r,o);else{var a=r?r(mr(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),vr(e,s,a)}}),ft)}var wr=/[\\^$.*+?()[\]{}|]/g,jr=RegExp(wr.source);function Ir(e,t){var n=-1,r=Le(e)?Array(e.length):[];return hr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Er(e,t){return Gt(function(e,t){return(V(e)?W:Ir)(e,dr(t))}(e,t),1)}function _r(e,t){return e>t}function Sr(e){return"string"==typeof e||!V(e)&&M(e)&&"[object String]"==G(e)}function Pr(e,t){return e&&e.length?function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],s=t(i);if(null!=s&&(void 0===a?s==s&&!z(s):n(s,a)))var a=s,u=i}return u}(e,dr(t),_r):void 0}var Ar,Rr=(Ar=function(e,t,n){yr(e,t,n)},Te((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Ar.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!K(n))return!1;var r=typeof t;return!!("number"==r?Le(n)&&ke(t,n.length):"string"==r&&t in n)&&Oe(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&Ar(e,s,n,o)}return e})));function Cr(e,t){return e(t={exports:{}},t.exports),t.exports}var kr={},Ur=kr;function Or(e){return e<0?-1:1}function xr(e,t){t.unsigned||--e;const n=t.unsigned?0:-Math.pow(2,e),r=Math.pow(2,e)-1,o=t.moduloBitLength?Math.pow(2,t.moduloBitLength):Math.pow(2,e),i=t.moduloBitLength?Math.pow(2,t.moduloBitLength-1):Math.pow(2,e-1);return function(e,s){s||(s={});let a=+e;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=Or(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(e){return e%1==.5&&0==(1&e)?Math.floor(e):Math.round(e)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=Or(a)*Math.floor(Math.abs(a)),a%=o,!t.unsigned&&a>=i)return a-o;if(t.unsigned)if(a<0)a+=o;else if(-0===a)return 0;return a}}kr.void=function(){},kr.boolean=function(e){return!!e},kr.byte=xr(8,{unsigned:!1}),kr.octet=xr(8,{unsigned:!0}),kr.short=xr(16,{unsigned:!1}),kr["unsigned short"]=xr(16,{unsigned:!0}),kr.long=xr(32,{unsigned:!1}),kr["unsigned long"]=xr(32,{unsigned:!0}),kr["long long"]=xr(32,{unsigned:!1,moduloBitLength:64}),kr["unsigned long long"]=xr(32,{unsigned:!0,moduloBitLength:64}),kr.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},kr["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},kr.float=kr.double,kr["unrestricted float"]=kr["unrestricted double"],kr.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},kr.ByteString=function(e,t){const n=String(e);let r;for(let e=0;void 0!==(r=n.codePointAt(e));++e)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},kr.USVString=function(e){const t=String(e),n=t.length,r=[];for(let e=0;e<n;++e){const o=t.charCodeAt(e);if(o<55296||o>57343)r.push(String.fromCodePoint(o));else if(56320<=o&&o<=57343)r.push(String.fromCodePoint(65533));else if(e===n-1)r.push(String.fromCodePoint(65533));else{const n=t.charCodeAt(e+1);if(56320<=n&&n<=57343){const t=1023&o,i=1023&n;r.push(String.fromCodePoint(65536+1024*t+i)),++e}else r.push(String.fromCodePoint(65533))}}return r.join("")},kr.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},kr.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var qr=Cr((function(e){e.exports.mixin=function(e,t){const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;++r)Object.defineProperty(e,n[r],Object.getOwnPropertyDescriptor(t,n[r]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(t){return t[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(t){return t[e.exports.implSymbol]}}));qr.mixin,qr.wrapperSymbol,qr.implSymbol,qr.wrapperForImpl,qr.implForWrapper;var Dr,Tr=(Dr=Object.freeze({__proto__:null}))&&Dr.default||Dr,Nr={TRANSITIONAL:0,NONTRANSITIONAL:1};function Br(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function Lr(e){for(var t=0,n=Tr.length-1;t<=n;){var r=Math.floor((t+n)/2),o=Tr[r];if(o[0][0]<=e&&o[0][1]>=e)return o;o[0][0]>e?n=r-1:t=r+1}return null}var Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Gr(e){return e.replace(Fr,"_").length}var Mr=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function Jr(e,t){"xn--"===e.substr(0,4)&&(e=u.toUnicode(e));var n=!1;(Br(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(Mr))&&(n=!0);for(var r=Gr(e),o=0;o<r;++o){var i=Lr(e.codePointAt(o));if(zr===Nr.TRANSITIONAL&&"valid"!==i[1]||zr===Nr.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:e,error:n}}function zr(e,t,n){var r=function(e,t,n){for(var r=!1,o="",i=Gr(e),s=0;s<i;++s){var a=e.codePointAt(s),u=Lr(a);switch(u[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":n===Nr.TRANSITIONAL?o+=String.fromCodePoint.apply(String,u[2]):o+=String.fromCodePoint(a);break;case"valid":o+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":t?(r=!0,o+=String.fromCodePoint(a)):o+=String.fromCodePoint.apply(String,u[2]);break;case"disallowed_STD3_valid":t&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(e,t,n);r.string=Br(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=Jr(o[i]);o[i]=s.label,r.error=r.error||s.error}catch(e){r.error=!0}return{string:o.join("."),error:r.error}}var Wr={toASCII:function(e,t,n,r){var o=zr(e,t,n),i=o.string.split(".");if(i=i.map((function(e){try{return u.toASCII(e)}catch(t){return o.error=!0,e}})),r){var s=i.slice(0,i.length-1).join(".").length;(s.length>253||0===s.length)&&(o.error=!0);for(var a=0;a<i.length;++a)if(i.length>63||0===i.length){o.error=!0;break}}return o.error?null:i.join(".")},toUnicode:function(e,t){var n=zr(e,t,Nr.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Nr},Vr=Cr((function(e){const t={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(e){return u.ucs2.decode(e).length}function o(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function i(e){return e>=48&&e<=57}function s(e){return e>=65&&e<=90||e>=97&&e<=122}function a(e){return i(e)||e>=65&&e<=70||e>=97&&e<=102}function c(e){return"."===e||"%2e"===e.toLowerCase()}function d(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function l(e){return void 0!==t[e]}function p(e){return l(e.scheme)}function f(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function h(e){return e<=31||e>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(e){return h(e)||v.has(e)}const g=new Set([47,58,59,61,64,91,92,93,94,124]);function b(e){return m(e)||g.has(e)}function y(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=f(t[e]);return n}(n):n}function w(e){let t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;return(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?n:parseInt(e,t)}function j(e,t){if("["===e[0])return"]"!==e[e.length-1]?n:function(e){const t=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(e=u.ucs2.decode(e))[c]){if(58!==e[c+1])return n;c+=2,++r,s=r}for(;c<e.length;){if(8===r)return n;if(58===e[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,d=0;for(;d<4&&a(e[c]);)u=16*u+parseInt(o(e,c),16),++c,++d;if(46===e[c]){if(0===d)return n;if(c-=d,r>6)return n;let s=0;for(;void 0!==e[c];){let a=null;if(s>0){if(!(46===e[c]&&s<4))return n;++c}if(!i(e[c]))return n;for(;i(e[c]);){const t=parseInt(o(e,c));if(null===a)a=t;else{if(0===a)return n;a=10*a+t}if(a>255)return n;++c}t[r]=256*t[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===e[c]){if(++c,void 0===e[c])return n}else if(void 0!==e[c])return n;t[r]=u,++r}if(null!==s){let e=r-s;for(r=7;0!==r&&e>0;){const n=t[s+e-1];t[s+e-1]=t[r],t[r]=n,--r,--e}}else if(null===s&&8!==r)return n;return t}(e.substring(1,e.length-1));if(!t)return function(e){if(t=e,-1!==t.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var t;let r="";const o=u.ucs2.decode(e);for(let e=0;e<o.length;++e)r+=y(o[e],h);return r}(e);const r=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&a(t[e+1])&&a(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),s=Wr.toASCII(r,!1,Wr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const r=[];for(const o of t){if(""===o)return e;const t=w(o);if(t===n)return e;r.push(t)}for(let e=0;e<r.length-1;++e)if(r[e]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const e of r)o+=e*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof c||c===n?c:s}function I(e){return"number"==typeof e?function(e){let t="",n=e;for(let e=1;e<=4;++e)t=String(n%256)+t,4!==e&&(t="."+t),n=Math.floor(n/256);return t}(e):e instanceof Array?"["+function(e){let t="";const n=function(e){let t=null,n=1,r=null,o=0;for(let i=0;i<e.length;++i)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),{idx:t,len:n}}(e).idx;let r=!1;for(let o=0;o<=7;++o)r&&0===e[o]||(r&&(r=!1),n!==o?(t+=e[o].toString(16),7!==o&&(t+=":")):(t+=0===o?"::":":",r=!0));return t}(e)+"]":e}function E(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function _(e){return""!==e.username||""!==e.password}function S(e,t,r,o,i){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=r||"utf-8",this.stateOverride=i,this.url=o,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const e=function(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const s=function(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=u.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),r=this["parse "+this.state](e,t);if(!r)break;if(r===n){this.failure=!0;break}}}S.prototype["parse scheme start"]=function(e,t){if(s(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},S.prototype["parse scheme"]=function(e,t){if(function(e){return s(e)||i(e)}(e)||43===e||45===e||46===e)this.buffer+=t.toLowerCase();else if(58===e){if(this.stateOverride){if(p(this.url)&&!l(this.buffer))return!1;if(!p(this.url)&&l(this.buffer))return!1;if((_(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},S.prototype["parse no scheme"]=function(e){return null===this.base||this.base.cannotBeABaseURL&&35!==e?n:(this.base.cannotBeABaseURL&&35===e?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},S.prototype["parse special relative or authority"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},S.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},S.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,isNaN(e)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===e?this.state="relative slash":63===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):p(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},S.prototype["parse relative slash"]=function(e){return!p(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},S.prototype["parse special authority slashes"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},S.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},S.prototype["parse authority"]=function(e,t){if(64===e){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const e=r(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(58===e&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=y(e,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},S.prototype["parse hostname"]=S.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==e||this.arrFlag)if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(_(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=j(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,n;const e=j(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},S.prototype["parse port"]=function(e,r){if(i(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=e===(o=this.url.scheme,t[o])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const P=new Set([47,92,63,35]);S.prototype["parse file"]=function(e){var t,n;return this.url.scheme="file",47===e||92===e?(92===e&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(e)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(t=e,n=this.input[this.pointer+1],!s(t)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!P.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),E(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},S.prototype["parse file slash"]=function(e){var t;return 47===e||92===e?(92===e&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(t=this.base.path[0]).length&&s(t.codePointAt(0))&&":"===t[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},S.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&d(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=j(this.buffer,p(this.url));if(e===n)return n;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},S.prototype["parse path start"]=function(e){return p(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},S.prototype["parse path"]=function(e){if(isNaN(e)||47===e||p(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(p(this.url)&&92===e&&(this.parseError=!0),!function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!c(this.buffer)||47===e||p(this.url)&&92===e?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&d(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(E(this.url),47===e||p(this.url)&&92===e||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=y(e,m);return!0},S.prototype["parse cannot-be-a-base-URL path"]=function(e){return 63===e?(this.url.query="",this.state="query"):35===e?(this.url.fragment="",this.state="fragment"):(isNaN(e)||37===e||(this.parseError=!0),37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path[0]=this.url.path[0]+y(e,h))),!0},S.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=f(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},S.prototype["parse fragment"]=function(e){return isNaN(e)||(0===e?this.parseError=!0:(37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=y(e,h))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=I(e.host),null!==e.port&&(n+=":"+e.port)):null===e.host&&"file"===e.scheme&&(n+="//"),e.cannotBeABaseURL)n+=e.path[0];else for(const t of e.path)n+="/"+t;return null!==e.query&&(n+="?"+e.query),t||null===e.fragment||(n+="#"+e.fragment),n},e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(e){let t=e.scheme+"://";return t+=I(e.host),null!==e.port&&(t+=":"+e.port),t}({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new S(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?"failure":n.url},e.exports.setTheUsername=function(e,t){e.username="";const n=u.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=y(n[t],b)},e.exports.setThePassword=function(e,t){e.password="";const n=u.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=y(n[t],b)},e.exports.serializeHost=I,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e.cannotBeABaseURL||"file"===e.scheme},e.exports.serializeInteger=function(e){return String(e)},e.exports.parseURL=function(t,n){return void 0===n&&(n={}),e.exports.basicURLParse(t,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));Vr.serializeURL,Vr.serializeURLOrigin,Vr.basicURLParse,Vr.setTheUsername,Vr.setThePassword,Vr.serializeHost,Vr.cannotHaveAUsernamePasswordPort,Vr.serializeInteger,Vr.parseURL;var $r=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=Vr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=Vr.basicURLParse(t,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return Vr.serializeURL(this._url)}set href(e){const t=Vr.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return Vr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){Vr.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){Vr.cannotHaveAUsernamePasswordPort(this._url)||Vr.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){Vr.cannotHaveAUsernamePasswordPort(this._url)||Vr.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?Vr.serializeHost(e.host):Vr.serializeHost(e.host)+":"+Vr.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||Vr.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":Vr.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||Vr.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":Vr.serializeInteger(this._url.port)}set port(e){Vr.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:Vr.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],Vr.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const t=this._url;if(""===e)return void(t.query=null);const n="?"===e[0]?e.substring(1):e;t.query="",Vr.basicURLParse(n,{url:t,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const t="#"===e[0]?e.substring(1):e;this._url.fragment="",Vr.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Hr=Cr((function(e){const t=qr.implSymbol;function n(r){if(!this||this[t]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const o=[];for(let e=0;e<arguments.length&&e<2;++e)o[e]=arguments[e];o[0]=Ur.USVString(o[0]),void 0!==o[1]&&(o[1]=Ur.USVString(o[1])),e.exports.setup(this,o)}n.prototype.toJSON=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let e=0;e<arguments.length&&e<0;++e)n[e]=arguments[e];return this[t].toJSON.apply(this[t],n)},Object.defineProperty(n.prototype,"href",{get(){return this[t].href},set(e){e=Ur.USVString(e),this[t].href=e},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[t].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[t].protocol},set(e){e=Ur.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=Ur.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=Ur.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=Ur.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=Ur.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=Ur.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=Ur.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=Ur.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=Ur.USVString(e),this[t].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[t]instanceof $r,create(e,t){let r=Object.create(n.prototype);return this.setup(r,e,t),r},setup(e,n,r){r||(r={}),r.wrapper=e,e[t]=new $r(n,r),e[t][qr.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Hr.is,Hr.create,Hr.setup,Hr.expose;var Yr={URL:Hr.interface,serializeURL:Vr.serializeURL,serializeURLOrigin:Vr.serializeURLOrigin,basicURLParse:Vr.basicURLParse,setTheUsername:Vr.setTheUsername,setThePassword:Vr.setThePassword,serializeHost:Vr.serializeHost,serializeInteger:Vr.serializeInteger,parseURL:Vr.parseURL};const Zr=r.Readable,Kr=Symbol("buffer"),Xr=Symbol("type");class Qr{constructor(){this[Xr]="";const e=arguments[0],t=arguments[1],n=[];let r=0;if(e){const t=e,o=Number(t.length);for(let e=0;e<o;e++){const o=t[e];let i;i=o instanceof Buffer?o:ArrayBuffer.isView(o)?Buffer.from(o.buffer,o.byteOffset,o.byteLength):o instanceof ArrayBuffer?Buffer.from(o):o instanceof Qr?o[Kr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[Kr]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[Xr]=o)}get size(){return this[Kr].length}get type(){return this[Xr]}text(){return Promise.resolve(this[Kr].toString())}arrayBuffer(){const e=this[Kr],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new Zr;return e._read=function(){},e.push(this[Kr]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],n=arguments[1];let r,o;r=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),o=void 0===n?e:n<0?Math.max(e+n,0):Math.min(n,e);const i=Math.max(o-r,0),s=this[Kr].slice(r,r+i),a=new Qr([],{type:arguments[2]});return a[Kr]=s,a}}function eo(e,t,n){Error.call(this,e),this.message=e,this.type=t,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let to;Object.defineProperties(Qr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Qr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),eo.prototype=Object.create(Error.prototype),eo.prototype.constructor=eo,eo.prototype.name="FetchError";try{to=require("encoding").convert}catch(e){}const no=Symbol("Body internals"),ro=r.PassThrough;function oo(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.size;let i=void 0===o?0:o;var s=n.timeout;let a=void 0===s?0:s;null==e?e=null:so(e)?e=Buffer.from(e.toString()):ao(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof r||(e=Buffer.from(String(e)))),this[no]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=a,e instanceof r&&e.on("error",(function(e){const n="AbortError"===e.name?e:new eo(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[no].error=n}))}function io(){var e=this;if(this[no].disturbed)return oo.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[no].disturbed=!0,this[no].error)return oo.Promise.reject(this[no].error);let t=this.body;if(null===t)return oo.Promise.resolve(Buffer.alloc(0));if(ao(t)&&(t=t.stream()),Buffer.isBuffer(t))return oo.Promise.resolve(t);if(!(t instanceof r))return oo.Promise.resolve(Buffer.alloc(0));let n=[],o=0,i=!1;return new oo.Promise((function(r,s){let a;e.timeout&&(a=setTimeout((function(){i=!0,s(new eo(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,s(t)):s(new eo(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&o+t.length>e.size)return i=!0,void s(new eo(`content size at ${e.url} over limit: ${e.size}`,"max-size"));o+=t.length,n.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(a);try{r(Buffer.concat(n,o))}catch(t){s(new eo(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function so(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function ao(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function uo(e){let t,n,o=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof r&&"function"!=typeof o.getBoundary&&(t=new ro,n=new ro,o.pipe(t),o.pipe(n),e[no].body=t,o=n),o}function co(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":so(e)?"application/x-www-form-urlencoded;charset=UTF-8":ao(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof r?null:"text/plain;charset=UTF-8"}function lo(e){const t=e.body;return null===t?0:ao(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}oo.prototype={get body(){return this[no].body},get bodyUsed(){return this[no].disturbed},arrayBuffer(){return io.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return io.call(this).then((function(t){return Object.assign(new Qr([],{type:e.toLowerCase()}),{[Kr]:t})}))},json(){var e=this;return io.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return oo.Promise.reject(new eo(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return io.call(this).then((function(e){return e.toString()}))},buffer(){return io.call(this)},textConverted(){var e=this;return io.call(this).then((function(t){return function(e,t){if("function"!=typeof to)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=t.get("content-type");let r,o,i="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));o=e.slice(0,1024).toString(),!r&&o&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(o));!r&&o&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(o),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(o),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&o&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(o));r&&(i=r.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030"));return to(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(oo.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),oo.mixIn=function(e){for(const t of Object.getOwnPropertyNames(oo.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(oo.prototype,t);Object.defineProperty(e,t,n)}},oo.Promise=global.Promise;const po=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,fo=/[^\t\x20-\x7e\x80-\xff]/;function ho(e){if(e=`${e}`,po.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function vo(e){if(e=`${e}`,fo.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function mo(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const go=Symbol("map");class bo{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[go]=Object.create(null),e instanceof bo){const t=e.raw(),n=Object.keys(t);for(const e of n)for(const n of t[e])this.append(e,n)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const n=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(t))}for(const e of n){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const n=e[t];this.append(t,n)}}}}get(e){ho(e=`${e}`);const t=mo(this[go],e);return void 0===t?null:this[go][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=yo(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],s=o[1];e.call(t,s,i,this),n=yo(this),r++}}set(e,t){t=`${t}`,ho(e=`${e}`),vo(t);const n=mo(this[go],e);this[go][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,ho(e=`${e}`),vo(t);const n=mo(this[go],e);void 0!==n?this[go][n].push(t):this[go][e]=[t]}has(e){return ho(e=`${e}`),void 0!==mo(this[go],e)}delete(e){ho(e=`${e}`);const t=mo(this[go],e);void 0!==t&&delete this[go][t]}raw(){return this[go]}keys(){return jo(this,"key")}values(){return jo(this,"value")}[Symbol.iterator](){return jo(this,"key+value")}}function yo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[go]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[go][t].join(", ")}:function(t){return[t.toLowerCase(),e[go][t].join(", ")]})}bo.prototype.entries=bo.prototype[Symbol.iterator],Object.defineProperty(bo.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(bo.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const wo=Symbol("internal");function jo(e,t){const n=Object.create(Io);return n[wo]={target:e,kind:t,index:0},n}const Io=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Io)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[wo];const t=e.target,n=e.kind,r=e.index,o=yo(t,n);return r>=o.length?{value:void 0,done:!0}:(this[wo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Eo(e){const t=Object.assign({__proto__:null},e[go]),n=mo(e[go],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(Io,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const _o=Symbol("Response internals"),So=i.STATUS_CODES;class Po{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oo.call(this,e,t);const n=t.status||200,r=new bo(t.headers);if(null!=e&&!r.has("Content-Type")){const t=co(e);t&&r.append("Content-Type",t)}this[_o]={url:t.url,status:n,statusText:t.statusText||So[n],headers:r,counter:t.counter}}get url(){return this[_o].url||""}get status(){return this[_o].status}get ok(){return this[_o].status>=200&&this[_o].status<300}get redirected(){return this[_o].counter>0}get statusText(){return this[_o].statusText}get headers(){return this[_o].headers}clone(){return new Po(uo(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}oo.mixIn(Po.prototype),Object.defineProperties(Po.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Po.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Ao=Symbol("Request internals"),Ro=s.URL||Yr.URL,Co=s.parse,ko=s.format;function Uo(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new Ro(e).toString()),Co(e)}const Oo="destroy"in r.Readable.prototype;function xo(e){return"object"==typeof e&&"object"==typeof e[Ao]}class qo{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};xo(e)?t=Uo(e.url):(t=e&&e.href?Uo(e.href):Uo(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||xo(e)&&null!==e.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=n.body?n.body:xo(e)&&null!==e.body?uo(e):null;oo.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new bo(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=co(o);e&&i.append("Content-Type",e)}let s=xo(e)?e.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Ao]={method:r,redirect:n.redirect||e.redirect||"follow",headers:i,parsedURL:t,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[Ao].method}get url(){return ko(this[Ao].parsedURL)}get headers(){return this[Ao].headers}get redirect(){return this[Ao].redirect}get signal(){return this[Ao].signal}clone(){return new qo(this)}}function Do(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}oo.mixIn(qo.prototype),Object.defineProperty(qo.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(qo.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Do.prototype=Object.create(Error.prototype),Do.prototype.constructor=Do,Do.prototype.name="AbortError";const To=s.URL||Yr.URL,No=r.PassThrough;function Bo(e,t){if(!Bo.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return oo.Promise=Bo.Promise,new Bo.Promise((function(n,o){const s=new qo(e,t),a=function(e){const t=e[Ao].parsedURL,n=new bo(e[Ao].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof r.Readable&&!Oo)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let o=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(o="0"),null!=e.body){const t=lo(e);"number"==typeof t&&(o=String(t))}o&&n.set("Content-Length",o),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=e.agent;return"function"==typeof i&&(i=i(t)),Object.assign({},t,{method:e.method,headers:Eo(n),agent:i})}(s),u=("https:"===a.protocol?c:i).request,l=s.signal;let p=null;const f=function(){let e=new Do("The user aborted a request.");o(e),s.body&&s.body instanceof r.Readable&&Lo(s.body,e),p&&p.body&&p.body.emit("error",e)};if(l&&l.aborted)return void f();const h=function(){f(),g()},v=u(a);let m;function g(){v.abort(),l&&l.removeEventListener("abort",h),clearTimeout(m)}l&&l.addEventListener("abort",h),s.timeout&&v.once("socket",(function(e){m=setTimeout((function(){o(new eo(`network timeout at: ${s.url}`,"request-timeout")),g()}),s.timeout)})),v.on("error",(function(e){o(new eo(`request to ${s.url} failed, reason: ${e.message}`,"system",e)),p&&p.body&&Lo(p.body,e),g()})),function(e,t){let n;e.on("socket",(function(e){n=e})),e.on("response",(function(e){const r=e.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||e.once("close",(function(e){if(n&&n.listenerCount("data")>0&&!e){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",t(e)}}))}))}(v,(function(e){l&&l.aborted||p&&p.body&&Lo(p.body,e)})),parseInt(process.version.substring(1))<14&&v.on("socket",(function(e){e.addListener("close",(function(t){const n=e.listenerCount("data")>0;if(p&&n&&!t&&(!l||!l.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",e)}}))})),v.on("response",(function(e){clearTimeout(m);const t=function(e){const t=new bo;for(const n of Object.keys(e))if(!po.test(n))if(Array.isArray(e[n]))for(const r of e[n])fo.test(r)||(void 0===t[go][n]?t[go][n]=[r]:t[go][n].push(r));else fo.test(e[n])||(t[go][n]=[e[n]]);return t}(e.headers);if(Bo.isRedirect(e.statusCode)){const i=t.get("Location");let a=null;try{a=null===i?null:new To(i,s.url).toString()}catch(e){if("manual"!==s.redirect)return o(new eo(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void g()}switch(s.redirect){case"error":return o(new eo(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void g();case"manual":if(null!==a)try{t.set("Location",a)}catch(e){o(e)}break;case"follow":if(null===a)break;if(s.counter>=s.follow)return o(new eo(`maximum redirect reached at: ${s.url}`,"max-redirect")),void g();const i={headers:new bo(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(e,t){const n=new To(t).hostname,r=new To(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,a)||(r=s.url,new To(a).protocol!==new To(r).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(e);return 303!==e.statusCode&&s.body&&null===lo(s)?(o(new eo("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void g()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==s.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(Bo(new qo(a,i))),void g())}}var r;e.once("end",(function(){l&&l.removeEventListener("abort",h)}));let i=e.pipe(new No);const a={url:s.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:s.size,timeout:s.timeout,counter:s.counter},u=t.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===u||204===e.statusCode||304===e.statusCode)return p=new Po(i,a),void n(p);const c={flush:d.Z_SYNC_FLUSH,finishFlush:d.Z_SYNC_FLUSH};if("gzip"==u||"x-gzip"==u)return i=i.pipe(d.createGunzip(c)),p=new Po(i,a),void n(p);if("deflate"==u||"x-deflate"==u){const t=e.pipe(new No);return t.once("data",(function(e){i=8==(15&e[0])?i.pipe(d.createInflate()):i.pipe(d.createInflateRaw()),p=new Po(i,a),n(p)})),void t.on("end",(function(){p||(p=new Po(i,a),n(p))}))}if("br"==u&&"function"==typeof d.createBrotliDecompress)return i=i.pipe(d.createBrotliDecompress()),p=new Po(i,a),void n(p);p=new Po(i,a),n(p)})),function(e,t){const n=t.body;null===n?e.end():ao(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(v,s)}))}function Lo(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}Bo.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Bo.Promise=global.Promise;var Fo=function(){function e(e){this.contextProvider=e}return e.prototype.getServiceDetails=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/services/").concat(t))]}))}))},e.prototype.getAddonDetails=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/addons/").concat(t))]}))}))},e.prototype.fetch=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return A(this,(function(u){switch(u.label){case 0:return n="Error while trying to connect, please try again.",r=Rr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},S({},t)),[4,eu(2)((function(){return P(a,void 0,void 0,(function(){return A(this,(function(t){return[2,Bo(e,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=u.sent()).ok?[3,3]:[4,o.text()];case 2:i=u.sent(),s=n;try{s=JSON.parse(i)}catch(e){s=null!=i?i:n}finally{throw new Error(JSON.stringify(s))}case 3:return[4,o.json()];case 4:return[2,u.sent()]}}))}))},e}(),Go=function(e,t,n){return P(void 0,void 0,void 0,(function(){var r,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:if(r=zo(t||"127.0.0.1"),(o=zo(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===l.platform()&&(i=function(e){return P(void 0,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,Jo.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=o?(a=Wo(s),[4,Mo(e,a)]):[3,6];case 2:return u.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(e,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}}))}))},Mo=function(e,t){return new Promise((function(n){var r=new h,o=!1;r.on("connect",(function(){o=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){o=!1,r.destroy()})),r.on("error",(function(){o=!1})),r.on("close",(function(){n(!o)})),t?r.connect(e,t):r.connect(e)}))},Jo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return P(void 0,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return"/sbin/ifconfig",[4,Vo("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},zo=function(e){var t=e.split(".").reverse();if(4!==t.length)throw new Error("Invalid ip address: ".concat(e));for(var n=0,r=0;r<4;r+=1){var o=Number.parseInt(t[r],10);if(o<0||o>255)throw new Error("Invalid ip address: ".concat(e));n+=o<<8*r}return n},Wo=function(e){if(!Number.isSafeInteger(e))throw new Error("Number is not an integer");if(e<0||e>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var t=[],n=0;n<4;n+=1)t.push(e>>8*n&255);return t.reverse().join(".")},Vo=function(e,t,n){var r=v(e,t,S({windowsHide:!0},n)),o=new Promise((function(o,i){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(e){s+=e})),r.stderr&&r.stderr.on("data",(function(e){a+=e}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(a);i({message:u,result:r})}else o(r)}))}));return{process:r,resultPromise:o}},$o=function(e,t,n){return P(void 0,void 0,void 0,(function(){var r,o;return A(this,(function(i){switch(i.label){case 0:return r=Ho(e,10),[4,g.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,g.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,g.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},Ho=function(e,t){for(var n,r=b.dirname(e),o=b.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var s=R([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),u=b.join(r,a);if(!g.existsSync(u))return u}throw new Error("Could not write file to file '".concat(e,"'."))},Yo="win32"===process.platform?"\r\n":"\n",Zo=function(){function e(e,t){this.nodes=e,this.config=t}return e.prototype.add=function(e,t,n){var r=this;if(0===t.length)return this;var o=this.findOrCreateEntry(e,n);return t.forEach((function(e){if(!o.hosts.find((function(t){return t.host===e}))){var t=1;0===o.hosts.length&&(t=r.config.indent-"".concat(o.ipPrefixWhitespace).concat(o.ip).length),o.hosts.push({whitespace:" ".repeat(t<1?1:t),host:e})}})),this},e.prototype.remove=function(e,t){var n=this;return this.findEntries(e).forEach((function(e){t.forEach((function(t){var r=e.hosts.findIndex((function(e){return e.host===t}));r<0||(0===r&&void 0!==e.hosts[1]&&(e.hosts[1].whitespace=e.hosts[0].whitespace),e.hosts.splice(r,1),0===e.hosts.length&&n.removeEntry(e))}))})),this},e.prototype.removeHosts=function(e){var t=this;ri(this.nodes,"entry").forEach((function(n){t.remove(n.ip,e)}))},e.prototype.removeIps=function(e){var t=this;return e.forEach((function(e){t.findEntries(e).forEach((function(e){return t.removeEntry(e)}))})),this},e.prototype.resolveHosts=function(e){return Er(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return ri(this.nodes,"entry").filter((function(t){return t.hosts.some((function(t){return t.host===e}))})).map((function(e){return e.ip}))},e.prototype.toString=function(){return ei(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||M(t)&&"[object Number]"==G(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return ri(this.nodes,"entry").filter((function(t){return t.ip===e}))},e.prototype.findOrCreateEntry=function(e,t){var n=this.findEntries(e)[0];if(n)return n;var r=this.makeEntry(e);if(t){var o=Qo(t),i=this.nodes.findIndex((function(e){return"comment"===e.type&&e.line===o}));if(i>=0)this.insertAt(i+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[Ko(),Xo(o),r]:[Xo(o),r];this.insertAt.apply(this,R([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},e.prototype.insertAt=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.nodes).splice.apply(t,R([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return S({type:"entry",ip:e,ipPrefixWhitespace:n,hosts:[]},t)},e.fromNodes=function(t,n){var r,o;return new e(t.filter((function(e){return"eol"!==e.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var e,n=ri(t,"eol").map((function(e){return e.line}));return null!==(e=oi(n))&&void 0!==e?e:Yo}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=Er(ri(t,"entry"),(function(e){var t=e.ipPrefixWhitespace,n=e.ip,r=e.hosts[0];return r?["".concat(t).concat(n).concat(r.whitespace).length]:[]}));return null!==(e=oi(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(ti(e),t)},e}(),Ko=function(){return{type:"blank",line:""}},Xo=function(e){return{type:"comment",line:Qo(e)}},Qo=function(e){return e.startsWith("#")?e:"# ".concat(e)},ei=function(e,t){var n=e.map((function(e){switch(e.type){case"entry":var t=e.hosts.map((function(e){var t=e.whitespace,n=e.host;return"".concat(t).concat(n)})).join("");return"".concat(e.ipPrefixWhitespace).concat(e.ip).concat(t);case"blank":case"comment":case"invalid":return e.line;default:return""}}));return n.join(null!=t?t:Yo)},ti=function(e){return e.split(/(\r?\n)/).map((function(e){return function(e){return e.match(/^\s*#.*$/)}(e)?{type:"comment",line:e}:function(e){return e.match(/^(\r?\n)$/)}(e)?{type:"eol",line:e}:function(e){return e.match(/^\s*$/)}(e)?{type:"blank",line:e}:ni(e)}))},ni=function(e){var t=e.match(/^(\s*)(\S+)(.+)?$/);if(!t)return{type:"invalid",line:e};var n=t[1],r=t[2],o=t.slice(3),i=!1,s=Er(o.filter((function(e){return void 0!==e})),(function(e){var t=e.match(/(\s+)(\S+)/g);return t?t.map((function(e){var t=e.match(/^(\s+)(\S+)$/);t||(i=!0);var n=null!=t?t:[];return{whitespace:n[1],host:n[2]}})):(i=!0,[])}));return i?{type:"invalid",line:e}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},ri=function(e,t){return e.filter((function(e){return e.type===t}))},oi=function(e){var t=new Map;e.forEach((function(e){var n;t.set(e,(null!==(n=t.get(e))&&void 0!==n?n:0)+1)}));var n=Pr(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},ii="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",si=function(){function e(e){this.ast=Zo.fromNodes([]);var t={writeMode:"atomic",hostsFile:ii};this.config=S(S({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Sr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Sr(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.add(e,t,this.config.header),this},e.prototype.remove=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Sr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Sr(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.remove(e,t),this},e.prototype.removeHosts=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach((function(e){if(!Sr(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.removeHosts(e),this},e.prototype.removeIps=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach((function(e){if(!Sr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."))})),this.ast.removeIps(e),this},e.prototype.read=function(){return P(this,void 0,void 0,(function(){var e;return A(this,(function(t){switch(t.label){case 0:return[4,g.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=Zo.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return P(this,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){switch(i.label){case 0:switch(t=S(S({},this.config),e),n=t.hostsFile,r=t.writeMode,o=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,$o(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,g.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return P(this,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){switch(i.label){case 0:return g.existsSync(this.config.hostsFile)?(t=b.dirname(this.config.hostsFile),n=b.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=b.resolve(t,r),g.existsSync(o)&&!e.rewrite?[3,2]:[4,g.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),ai=function(){function e(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(e.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),e.prototype.enter=function(e){return P(this,void 0,void 0,(function(){var t,n=this;return A(this,(function(r){return this._queueLength+=1,t=this.previousPromise.then((function(){return n._queueLength-=1,e()}),(function(){return n._queueLength-=1,e()})),this.previousPromise=t,[2,t]}))}))},e}(),ui=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),o=e[e.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach((function(e){r[e]=o[e]})),r}};var ci=ui(li),di=ui(pi);function li(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function pi(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}li.proto=li((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return li(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return pi(this)},configurable:!0})})),ci.strict=di;var fi=function(){},hi=function(e,t,n){if("function"==typeof t)return hi(e,null,t);t||(t={}),n=ci(n||fi);var r=e._writableState,o=e._readableState,i=t.readable||!1!==t.readable&&e.readable,s=t.writable||!1!==t.writable&&e.writable,a=!1,u=function(){e.writable||c()},c=function(){s=!1,i||n.call(e)},d=function(){i=!1,s||n.call(e)},l=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},p=function(t){n.call(e,t)},f=function(){process.nextTick(h)},h=function(){if(!a)return(!i||o&&o.ended&&!o.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},v=function(){e.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?s&&!r&&(e.on("end",u),e.on("close",u)):(e.on("complete",c),e.on("abort",f),e.req?v():e.on("request",v)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),!1!==t.error&&e.on("error",p),e.on("close",f),function(){a=!0,e.removeListener("complete",c),e.removeListener("abort",f),e.removeListener("request",v),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",p),e.removeListener("close",f)}},vi=hi,mi=function(){},gi=/^v?\.0/.test(process.version),bi=function(e){return"function"==typeof e},yi=function(e,t,n,r){r=ci(r);var o=!1;e.on("close",(function(){o=!0})),vi(e,{readable:t,writable:n},(function(e){if(e)return r(e);o=!0,r()}));var i=!1;return function(t){if(!o&&!i)return i=!0,function(e){return!!gi&&!!g&&(e instanceof(g.ReadStream||mi)||e instanceof(g.WriteStream||mi))&&bi(e.close)}(e)?e.close(mi):function(e){return e.setHeader&&bi(e.abort)}(e)?e.abort():bi(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},wi=function(e){e()},ji=function(e,t){return e.pipe(t)},Ii=function(){var e,t=Array.prototype.slice.call(arguments),n=bi(t[t.length-1]||mi)&&t.pop()||mi;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(o,i){var s=i<t.length-1;return yi(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(wi),s||(r.forEach(wi),n(e))}))}));return t.reduce(ji)};const{Duplex:Ei}=r;function _i(e){e.emit("close")}function Si(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Pi(e){this.removeListener("error",Pi),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Ai=function(e,t){let n=!0;const r=new Ei({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,n){const o=!n&&r._readableState.objectMode?t.toString():t;r.push(o)||e.pause()})),e.once("error",(function(e){r.destroyed||(n=!1,r.destroy(e))})),e.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(t,o){if(e.readyState===e.CLOSED)return o(t),void process.nextTick(_i,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(_i,r)})),n&&e.terminate()},r._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){r._final(t)}))},r._read=function(){e.isPaused&&e.resume()},r._write=function(t,n,o){e.readyState!==e.CONNECTING?e.send(t,o):e.once("open",(function(){r._write(t,n,o)}))},r.on("end",Si),r.on("error",Pi),r},Ri={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},Ci="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},ki=process.config&&process.config.variables||{},Ui=!!process.env.PREBUILDS_ONLY,Oi=process.versions.modules,xi=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",qi=process.env.npm_config_arch||l.arch(),Di=process.env.npm_config_platform||l.platform(),Ti=process.env.LIBC||(function(e){return"linux"===e&&g.existsSync("/etc/alpine-release")}(Di)?"musl":"glibc"),Ni=process.env.ARM_VERSION||("arm64"===qi?"8":ki.arm_version)||"",Bi=(process.versions.uv||"").split(".")[0],Li=Fi;function Fi(e){return Ci(Fi.resolve(e))}function Gi(e){try{return g.readdirSync(e)}catch(e){return[]}}function Mi(e,t){var n=Gi(e).filter(t);return n[0]&&b.join(e,n[0])}function Ji(e){return/\.node$/.test(e)}function zi(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function Wi(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function Vi(e,t){return e.architectures.length-t.architectures.length}function $i(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var o=t[r];if("node"===o||"electron"===o||"node-webkit"===o)n.runtime=o;else if("napi"===o)n.napi=!0;else if("abi"===o.slice(0,3))n.abi=o.slice(3);else if("uv"===o.slice(0,2))n.uv=o.slice(2);else if("armv"===o.slice(0,4))n.armv=o.slice(4);else{if("glibc"!==o&&"musl"!==o)continue;n.libc=o}n.specificity++}return n}}function Hi(e,t){return function(n){return null!=n&&(!(n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n))&&(!(n.abi!==t&&!n.napi)&&((!n.uv||n.uv===Bi)&&((!n.armv||n.armv===Ni)&&(!n.libc||n.libc===Ti)))))}}function Yi(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}Fi.resolve=Fi.path=function(e){e=b.resolve(e||".");try{var t=Ci(b.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!Ui){var n=Mi(b.join(e,"build/Release"),Ji);if(n)return n;var r=Mi(b.join(e,"build/Debug"),Ji);if(r)return r}var o=a(e);if(o)return o;var i=a(b.dirname(process.execPath));if(i)return i;var s=["platform="+Di,"arch="+qi,"runtime="+xi,"abi="+Oi,"uv="+Bi,Ni?"armv="+Ni:"","libc="+Ti,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+e+"\n");function a(e){var t=Gi(b.join(e,"prebuilds")).map(zi).filter(Wi(Di,qi)).sort(Vi)[0];if(t){var n=b.join(e,"prebuilds",t.name),r=Gi(n).map($i).filter(Hi(xi,Oi)).sort(Yi(xi))[0];return r?b.join(n,r.file):void 0}}},Fi.parseTags=$i,Fi.matchTags=Hi,Fi.compareTags=Yi,Fi.parseTuple=zi,Fi.matchTuple=Wi,Fi.compareTuples=Vi;var Zi=Cr((function(e){"function"==typeof process.addon?e.exports=process.addon.bind(process):e.exports=Li}));var Ki={mask:(e,t,n,r,o)=>{for(var i=0;i<o;i++)n[r+i]=e[i]^t[3&i]},unmask:(e,t)=>{const n=e.length;for(var r=0;r<n;r++)e[r]^=t[3&r]}},Xi=Cr((function(e){try{e.exports=Zi(__dirname)}catch(t){e.exports=Ki}})),Qi=Cr((function(e){const{EMPTY_BUFFER:t}=Ri,n=Buffer[Symbol.species];function r(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[i]^t[3&i]}function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(e.exports={concat:function(e,r){if(0===e.length)return t;if(1===e.length)return e[0];const o=Buffer.allocUnsafe(r);let i=0;for(let t=0;t<e.length;t++){const n=e[t];o.set(n,i),i+=n.length}return i<r?new n(o.buffer,o.byteOffset,i):o},mask:r,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let r;return t instanceof ArrayBuffer?r=new n(t):ArrayBuffer.isView(t)?r=new n(t.buffer,t.byteOffset,t.byteLength):(r=Buffer.from(t),e.readOnly=!1),r},unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{const t=Xi;e.exports.mask=function(e,n,o,i,s){s<48?r(e,n,o,i,s):t.mask(e,n,o,i,s)},e.exports.unmask=function(e,n){e.length<32?o(e,n):t.unmask(e,n)}}catch(e){}}));Qi.concat,Qi.mask,Qi.toArrayBuffer,Qi.toBuffer,Qi.unmask;const es=Symbol("kDone"),ts=Symbol("kRun");var ns=class{constructor(e){this[es]=()=>{this.pending--,this[ts]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ts]()}[ts](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[es])}}};const{kStatusCode:rs}=Ri,os=Buffer[Symbol.species],is=Buffer.from([0,0,255,255]),ss=Symbol("permessage-deflate"),as=Symbol("total-length"),us=Symbol("callback"),cs=Symbol("buffers"),ds=Symbol("error");let ls;var ps=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!ls){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;ls=new ns(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[us];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n}))})),e}decompress(e,t,n){ls.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){ls.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const r=this._isServer?"client":"server";if(!this._inflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=d.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[ss]=this,this._inflate[as]=0,this._inflate[cs]=[],this._inflate.on("error",vs),this._inflate.on("data",hs)}this._inflate[us]=n,this._inflate.write(e),t&&this._inflate.write(is),this._inflate.flush((()=>{const e=this._inflate[ds];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=Qi.concat(this._inflate[cs],this._inflate[as]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[as]=0,this._inflate[cs]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=d.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[as]=0,this._deflate[cs]=[],this._deflate.on("data",fs)}this._deflate[us]=n,this._deflate.write(e),this._deflate.flush(d.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=Qi.concat(this._deflate[cs],this._deflate[as]);t&&(e=new os(e.buffer,e.byteOffset,e.length-4)),this._deflate[us]=null,this._deflate[as]=0,this._deflate[cs]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function fs(e){this[cs].push(e),this[as]+=e.length}function hs(e){this[as]+=e.length,this[ss]._maxPayload<1||this[as]<=this[ss]._maxPayload?this[cs].push(e):(this[ds]=new RangeError("Max payload size exceeded"),this[ds].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ds][rs]=1009,this.removeListener("data",hs),this.reset())}function vs(e){this[ss]._inflate=null,e[rs]=1007,this[us](e)}var ms=function(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0},gs=Cr((function(e){try{e.exports=Zi(__dirname)}catch(t){e.exports=ms}})),bs=Cr((function(e){const{isUtf8:t}=y;function n(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0}if(e.exports={isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:n,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},t)e.exports.isValidUTF8=function(e){return e.length<24?n(e):t(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const t=gs;e.exports.isValidUTF8=function(e){return e.length<32?n(e):t(e)}}catch(e){}}));bs.isValidStatusCode,bs.isValidUTF8,bs.tokenChars;const{Writable:ys}=r,{BINARY_TYPES:ws,EMPTY_BUFFER:js,kStatusCode:Is,kWebSocket:Es}=Ri,{concat:_s,toArrayBuffer:Ss,unmask:Ps}=Qi,{isValidStatusCode:As,isValidUTF8:Rs}=bs,Cs=Buffer[Symbol.species];var ks=class extends ys{constructor(e={}){super(),this._binaryType=e.binaryType||ws[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Es]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=new Cs(t.buffer,t.byteOffset+e,t.length-e),new Cs(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new Cs(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,Us(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const t=64==(64&e[0]);if(t&&!this._extensions[ps.extensionName])return this._loop=!1,Us(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,Us(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Us(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,Us(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,Us(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,Us(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,Us(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return this._loop=!1,Us(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),this._isServer){if(!this._masked)return this._loop=!1,Us(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Us(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,Us(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Us(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=js;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&0!=(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Ps(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[ps.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(Us(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return t(r);this.startLoop(t)}))}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?_s(t,e):"arraybuffer"===this._binaryType?Ss(_s(t,e)):t,this.emit("message",n,!0)}else{const n=_s(t,e);if(!this._skipUTF8Validation&&!Rs(n))return this._loop=!1,Us(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,js),this.end();else{const t=e.readUInt16BE(0);if(!As(t))return Us(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=new Cs(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Rs(n))return Us(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,n),this.end()}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}};function Us(e,t,n,r,o){const i=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,Us),i.code=o,i[Is]=r,i}const{randomFillSync:Os}=j,{EMPTY_BUFFER:xs}=Ri,{isValidStatusCode:qs}=bs,{mask:Ds,toBuffer:Ts}=Qi,Ns=Symbol("kByteLength"),Bs=Buffer.alloc(4);class Ls{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,r,o=!1,i=2,s=!1;t.mask&&(n=t.maskBuffer||Bs,t.generateMask?t.generateMask(n):Os(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[Ns]?(e=Buffer.from(e)).length:t[Ns]:(r=e.length,o=t.mask&&t.readOnly&&!s);let a=r;r>=65536?(i+=8,a=127):r>125&&(i+=2,a=126);const u=Buffer.allocUnsafe(o?r+i:i);return u[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),t.mask?(u[1]|=128,u[i-4]=n[0],u[i-3]=n[1],u[i-2]=n[2],u[i-1]=n[3],s?[u,e]:o?(Ds(e,n,u,i,r),[u]):(Ds(e,n,e,0,r),[u,e])):[u,e]}close(e,t,n,r){let o;if(void 0===e)o=xs;else{if("number"!=typeof e||!qs(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==t&&t.length){const n=Buffer.byteLength(t);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+n),o.writeUInt16BE(e,0),"string"==typeof t?o.write(t,2):o.set(t,2)}else o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0)}const i={[Ns]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(Ls.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ts(e)).length,o=Ts.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ns]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(Ls.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ts(e)).length,o=Ts.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ns]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(Ls.frame(e,i),n)}send(e,t,n){const r=this._extensions[ps.extensionName];let o,i,s=t.binary?2:1,a=t.compress;if("string"==typeof e?(o=Buffer.byteLength(e),i=!1):(o=(e=Ts(e)).length,i=Ts.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=r._threshold),this._compress=a):(a=!1,s=0),t.fin&&(this._firstFragment=!0),r){const r={[Ns]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};this._deflating?this.enqueue([this.dispatch,e,this._compress,r,n]):this.dispatch(e,this._compress,r,n)}else this.sendFrame(Ls.frame(e,{[Ns]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:!1}),n)}dispatch(e,t,n,r){if(!t)return void this.sendFrame(Ls.frame(e,n),r);const o=this._extensions[ps.extensionName];this._bufferedBytes+=n[Ns],this._deflating=!0,o.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t],r=n[n.length-1];"function"==typeof r&&r(e)}}else this._bufferedBytes-=n[Ns],this._deflating=!1,n.readOnly=!1,this.sendFrame(Ls.frame(t,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][Ns],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Ns],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}var Fs=Ls;const{kForOnEventAttribute:Gs,kListener:Ms}=Ri,Js=Symbol("kCode"),zs=Symbol("kData"),Ws=Symbol("kError"),Vs=Symbol("kMessage"),$s=Symbol("kReason"),Hs=Symbol("kTarget"),Ys=Symbol("kType"),Zs=Symbol("kWasClean");class Ks{constructor(e){this[Hs]=null,this[Ys]=e}get target(){return this[Hs]}get type(){return this[Ys]}}Object.defineProperty(Ks.prototype,"target",{enumerable:!0}),Object.defineProperty(Ks.prototype,"type",{enumerable:!0});class Xs extends Ks{constructor(e,t={}){super(e),this[Js]=void 0===t.code?0:t.code,this[$s]=void 0===t.reason?"":t.reason,this[Zs]=void 0!==t.wasClean&&t.wasClean}get code(){return this[Js]}get reason(){return this[$s]}get wasClean(){return this[Zs]}}Object.defineProperty(Xs.prototype,"code",{enumerable:!0}),Object.defineProperty(Xs.prototype,"reason",{enumerable:!0}),Object.defineProperty(Xs.prototype,"wasClean",{enumerable:!0});class Qs extends Ks{constructor(e,t={}){super(e),this[Ws]=void 0===t.error?null:t.error,this[Vs]=void 0===t.message?"":t.message}get error(){return this[Ws]}get message(){return this[Vs]}}Object.defineProperty(Qs.prototype,"error",{enumerable:!0}),Object.defineProperty(Qs.prototype,"message",{enumerable:!0});class ea extends Ks{constructor(e,t={}){super(e),this[zs]=void 0===t.data?null:t.data}get data(){return this[zs]}}Object.defineProperty(ea.prototype,"data",{enumerable:!0});const ta={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[Gs]&&r[Ms]===t&&!r[Gs])return;let r;if("message"===e)r=function(e,n){const r=new ea("message",{data:n?e:e.toString()});r[Hs]=this,ra(t,this,r)};else if("close"===e)r=function(e,n){const r=new Xs("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Hs]=this,ra(t,this,r)};else if("error"===e)r=function(e){const n=new Qs("error",{error:e,message:e.message});n[Hs]=this,ra(t,this,n)};else{if("open"!==e)return;r=function(){const e=new Ks("open");e[Hs]=this,ra(t,this,e)}}r[Gs]=!!n[Gs],r[Ms]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[Ms]===t&&!n[Gs]){this.removeListener(e,n);break}}};var na={CloseEvent:Xs,ErrorEvent:Qs,Event:Ks,EventTarget:ta,MessageEvent:ea};function ra(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:oa}=bs;function ia(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var sa={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,r,o=Object.create(null),i=!1,s=!1,a=!1,u=-1,c=-1,d=-1,l=0;for(;l<e.length;l++)if(c=e.charCodeAt(l),void 0===n)if(-1===d&&1===oa[c])-1===u&&(u=l);else if(0===l||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(u,d);44===c?(ia(t,r,o),o=Object.create(null)):n=r,u=d=-1}}else-1===d&&-1!==u&&(d=l);else if(void 0===r)if(-1===d&&1===oa[c])-1===u&&(u=l);else if(32===c||9===c)-1===d&&-1!==u&&(d=l);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),ia(o,e.slice(u,d),!0),44===c&&(ia(t,n,o),o=Object.create(null),n=void 0),u=d=-1}else{if(61!==c||-1===u||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(u,l),u=d=-1}else if(s){if(1!==oa[c])throw new SyntaxError(`Unexpected character at index ${l}`);-1===u?u=l:i||(i=!0),s=!1}else if(a)if(1===oa[c])-1===u&&(u=l);else if(34===c&&-1!==u)a=!1,d=l;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===c&&61===e.charCodeAt(l-1))a=!0;else if(-1===d&&1===oa[c])-1===u&&(u=l);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=e.slice(u,d);i&&(s=s.replace(/\\/g,""),i=!1),ia(o,r,s),44===c&&(ia(t,n,o),o=Object.create(null),n=void 0),r=void 0,u=d=-1}}else-1===d&&(d=l);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=e.slice(u,d);return void 0===n?ia(t,p,o):(void 0===r?ia(o,p,!0):ia(o,r,i?p.replace(/\\/g,""):p),ia(t,n,o)),t}};const{randomBytes:aa,createHash:ua}=j,{URL:ca}=s,{BINARY_TYPES:da,EMPTY_BUFFER:la,GUID:pa,kForOnEventAttribute:fa,kListener:ha,kStatusCode:va,kWebSocket:ma,NOOP:ga}=Ri,{EventTarget:{addEventListener:ba,removeEventListener:ya}}=na,{format:wa,parse:ja}=sa,{toBuffer:Ia}=Qi,Ea=Symbol("kAborted"),_a=[8,13],Sa=["CONNECTING","OPEN","CLOSING","CLOSED"],Pa=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Aa extends e{constructor(e,t,n){super(),this._binaryType=da[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=la,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Aa.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(n=t,t=[]):t=[t]),Ca(this,e,t,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){da.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){const r=new ks({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Fs(e,this._extensions,n.generateMask),this._receiver=r,this._socket=e,r[ma]=this,e[ma]=this,r.on("conclude",Da),r.on("drain",Ta),r.on("error",Na),r.on("message",La),r.on("ping",Fa),r.on("pong",Ga),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ja),e.on("data",za),e.on("end",Wa),e.on("error",Va),this._readyState=Aa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Aa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[ps.extensionName]&&this._extensions[ps.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Aa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==Aa.CLOSED)if(this.readyState!==Aa.CONNECTING)this.readyState!==Aa.CLOSING?(this._readyState=Aa.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";xa(this,this._req,e)}}pause(){this.readyState!==Aa.CONNECTING&&this.readyState!==Aa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===Aa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===Aa.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||la,t,n)):qa(this,e,n)}pong(e,t,n){if(this.readyState===Aa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===Aa.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||la,t,n)):qa(this,e,n)}resume(){this.readyState!==Aa.CONNECTING&&this.readyState!==Aa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===Aa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(n=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==Aa.OPEN)return void qa(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ps.extensionName]||(r.compress=!1),this._sender.send(e||la,r,n)}terminate(){if(this.readyState!==Aa.CLOSED)if(this.readyState!==Aa.CONNECTING)this._socket&&(this._readyState=Aa.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";xa(this,this._req,e)}}}Object.defineProperty(Aa,"CONNECTING",{enumerable:!0,value:Sa.indexOf("CONNECTING")}),Object.defineProperty(Aa.prototype,"CONNECTING",{enumerable:!0,value:Sa.indexOf("CONNECTING")}),Object.defineProperty(Aa,"OPEN",{enumerable:!0,value:Sa.indexOf("OPEN")}),Object.defineProperty(Aa.prototype,"OPEN",{enumerable:!0,value:Sa.indexOf("OPEN")}),Object.defineProperty(Aa,"CLOSING",{enumerable:!0,value:Sa.indexOf("CLOSING")}),Object.defineProperty(Aa.prototype,"CLOSING",{enumerable:!0,value:Sa.indexOf("CLOSING")}),Object.defineProperty(Aa,"CLOSED",{enumerable:!0,value:Sa.indexOf("CLOSED")}),Object.defineProperty(Aa.prototype,"CLOSED",{enumerable:!0,value:Sa.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(Aa.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(Aa.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[fa])return t[ha];return null},set(t){for(const t of this.listeners(e))if(t[fa]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[fa]:!0})}})})),Aa.prototype.addEventListener=ba,Aa.prototype.removeEventListener=ya;var Ra=Aa;function Ca(e,t,n,r){const o={protocolVersion:_a[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!_a.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${_a.join(", ")})`);let s;if(t instanceof ca)s=t,e._url=t.href;else{try{s=new ca(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}e._url=t}const a="wss:"===s.protocol,u="ws+unix:"===s.protocol;let d;if("ws:"===s.protocol||a||u?u&&!s.pathname?d="The URL's pathname is empty":s.hash&&(d="The URL contains a fragment identifier"):d='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',d){const t=new SyntaxError(d);if(0===e._redirects)throw t;return void ka(e,t)}const l=a?443:80,p=aa(16).toString("base64"),f=a?c.request:i.request,h=new Set;let v,m;if(o.createConnection=a?Oa:Ua,o.defaultPort=o.defaultPort||l,o.port=s.port||l,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new ps(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=wa({[ps.extensionName]:v.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Pa.test(e)||h.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(e)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),u){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=u,e._originalSecure=a,e._originalHostOrSocketPath=u?o.socketPath:s.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=u?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!a)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),m=e._req=f(o),e._redirects&&e.emit("redirect",e.url,m)}else m=e._req=f(o);o.timeout&&m.on("timeout",(()=>{xa(e,m,"Opening handshake has timed out")})),m.on("error",(t=>{null===m||m[Ea]||(m=e._req=null,ka(e,t))})),m.on("response",(i=>{const s=i.headers.location,a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++e._redirects>o.maxRedirects)return void xa(e,m,"Maximum redirects exceeded");let i;m.abort();try{i=new ca(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void ka(e,n)}Ca(e,i,n,r)}else e.emit("unexpected-response",m,i)||xa(e,m,`Unexpected server response: ${i.statusCode}`)})),m.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==Aa.CONNECTING)return;if(m=e._req=null,"websocket"!==t.headers.upgrade.toLowerCase())return void xa(e,n,"Invalid Upgrade header");const i=ua("sha1").update(p+pa).digest("base64");if(t.headers["sec-websocket-accept"]!==i)return void xa(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"];let a;if(void 0!==s?h.size?h.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":h.size&&(a="Server sent no subprotocol"),a)return void xa(e,n,a);s&&(e._protocol=s);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void xa(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=ja(u)}catch(t){return void xa(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==ps.extensionName){return void xa(e,n,"Server indicated an extension that was not requested")}try{v.accept(t[ps.extensionName])}catch(t){return void xa(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[ps.extensionName]=v}e.setSocket(n,r,{generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(m,e):m.end()}function ka(e,t){e._readyState=Aa.CLOSING,e.emit("error",t),e.emitClose()}function Ua(e){return e.path=e.socketPath,f.connect(e)}function Oa(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=f.isIP(e.host)?"":e.host),w.connect(e)}function xa(e,t,n){e._readyState=Aa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,xa),t.setHeader?(t[Ea]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(ka,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function qa(e,t,n){if(t){const n=Ia(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Sa[e.readyState]})`);process.nextTick(n,t)}}function Da(e,t){const n=this[ma];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[ma]&&(n._socket.removeListener("data",za),process.nextTick(Ma,n._socket),1005===e?n.close():n.close(e,t))}function Ta(){const e=this[ma];e.isPaused||e._socket.resume()}function Na(e){const t=this[ma];void 0!==t._socket[ma]&&(t._socket.removeListener("data",za),process.nextTick(Ma,t._socket),t.close(e[va])),t.emit("error",e)}function Ba(){this[ma].emitClose()}function La(e,t){this[ma].emit("message",e,t)}function Fa(e){const t=this[ma];t.pong(e,!t._isServer,ga),t.emit("ping",e)}function Ga(e){this[ma].emit("pong",e)}function Ma(e){e.resume()}function Ja(){const e=this[ma];let t;this.removeListener("close",Ja),this.removeListener("data",za),this.removeListener("end",Wa),e._readyState=Aa.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[ma]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",Ba),e._receiver.on("finish",Ba))}function za(e){this[ma]._receiver.write(e)||this.pause()}function Wa(){const e=this[ma];e._readyState=Aa.CLOSING,e._receiver.end(),this.end()}function Va(){const e=this[ma];this.removeListener("error",Va),this.on("error",ga),e&&(e._readyState=Aa.CLOSING,this.destroy())}var $a=function(e){function t(t,n,r,o,i){void 0===i&&(i=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=xt(t=e))&&jr.test(t)?t.replace(wr,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return _(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,o=n.address;e.tcpServer.listen(r,o,(function(){e.emit("tunnel-open",{address:o,port:r}),t({address:o,port:r})}))}else e.tcpServer.listen(0,(function(){var n=e.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:i,port:o},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return P(this,void 0,void 0,(function(){var e,t=this;return A(this,(function(n){switch(n.label){case 0:return e=!1,[4,Promise.race([new Promise((function(n){t.tcpServer.close((function(){e=!0,t.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(e){return setTimeout(e,t.closeTimeout)})).then((function(){e||(t.openConnections.forEach((function(e){e.destroy(),t.openConnections.delete(e)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},t.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new Ra(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ai(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?Ii(e,o,r):Ii(e,r),Ii(r,e),n.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,t=this.hostRegex;return new o({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(t,"Host: ".concat(e));o(null,Buffer.from(s))}else o(null,n)}})}},t}(t),Ha=function(e){function t(t,n,r){var o=e.call(this)||this;return o.endpoint=t,o.headers=n,o.bindToAssign=r,o.protocol="UDP",o.udpSocket=I.createSocket("udp4"),o.handleConnection(),o}return _(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,o=n.address;e.udpSocket.bind(r,o,(function(){e.emit("tunnel-open",{address:o,port:r}),t({address:o,port:r})}))}else e.udpSocket.bind(0,(function(){var n=e.udpSocket.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:i,port:o},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){e.udpSocket.close((function(){e.emit("tunnel-close"),t()}))}))];case 1:return t.sent(),[2]}}))}))},t.prototype.handleConnection=function(){var e,t=this,n=new Ra(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ai(n);this.udpSocket.on("message",(function(t,n){e=n,r.write(t)})),r.on("data",(function(n){e&&t.udpSocket.send(n,e.port,e.address,(function(e){e&&t.emit("connection-error",e)}))})),this.udpSocket.on("error",(function(e){t.emit("connection-error",e)})),r.on("error",(function(e){t.emit("connection-error",e)})),n.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),n.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(t);var Ya,Za="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Ka=function(e,t){return P(void 0,void 0,void 0,(function(){var n;return A(this,(function(r){return n=Promise.resolve([]),[2,e.reduce((function(e,n){return e.then((function(e){return t(n).then((function(t){return e.push(t),e}))}))}),n)]}))}))},Xa=function(e){function t(t){void 0===t&&(t=8192);var n=e.call(this)||this;return n.bufferDefaultSize=t,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return _(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.getContentsAsString=function(e,t){void 0===e&&(e="utf8");var n=this.buffer.toString(e,0,Math.min(t||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},t.prototype.adaptBuffer=function(e){if(this.buffer.length-this.size<e){var t=Math.ceil((e-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*t);this.buffer.copy(n,0,0,this.size),this.buffer=n}},t.prototype._write=function(e,t,n){this.adaptBuffer(e.length),e.copy(this.buffer,this.size,0),this._size+=e.length,n()},t}(r.Writable),Qa=function(e){function t(t,n,r){var o=e.call(this)||this;return o.contextProvider=t,o.listServices=n,o.listAddons=r,o.connections=[],o.hostsFileMutex=new ai,o.ipAllocationMutex=new ai,o.stopForwarding=function(e){return P(o,void 0,void 0,(function(){var t,n,r,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:return[4,e.tunnel.close()];case 1:return u.sent(),t=e.forwardingContext,n=t.projectId,r=t.type,o=t.id,i=t.hostnames,s=t.ipOnly,i.length>0&&!s?[4,this.unregisterHostnames(null===(a=e.tunnel.bindTo)||void 0===a?void 0:a.address,i)]:[3,3];case 2:u.sent(),u.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(e){var t=e.forwardingContext,i=t.type,s=t.id,a=t.projectId;return s===o&&a===n&&i===r})),1),[2]}}))}))},o.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(e=null===process||void 0===process?void 0:process.getuid)||void 0===e?void 0:e.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return m("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return m("fltmc"),!0}catch(e){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var e},o.assertStartedWithNodejs=function(){if(!Za)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new Fo(t),o}return _(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardProject(e,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopProjectForwarding(e)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardProject=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return A(this,(function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return o=u.sent(),[4,Promise.all(r.data.services.map((function(e){return P(a,void 0,void 0,(function(){return A(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return i=u.sent(),[4,Promise.all(o.data.addons.map((function(e){return P(a,void 0,void 0,(function(){return A(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:e.id},t)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=u.sent(),[2,{services:i,addons:s}]}}))}))},t.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardService(e,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopServiceForwarding(e)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardService=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s,a,u,c=this;return A(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,r=e.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return o=d.sent(),i=o.namespace,s=o.targetDomain,a=o.instances,u=o.ports,0===a.length?[2,[]]:[4,Ka(u,(function(e){var o,u="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(e.internalPort),d="".concat(r,".").concat(i,".svc.cluster.local"),l=["".concat(r)];e.name&&l.push("".concat(e.name,".").concat(r)),"HTTP"===e.protocol&&(o={altHostnames:l,targetHostname:d});var p=R([d],l,!0);return c.forwardPort(u,e,p,"service",r,n,t,o)}))];case 2:return[2,d.sent()]}}))}))},t.prototype.withAddonForwarding=function(e,t,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardAddon(e,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopAddonForwarding(e)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardAddon=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s=this;return A(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=e.addonId,r=e.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return o=a.sent(),i=o.instances.map((function(e){var t=e.podName,n=e.internalHostname;return e.ports.map((function(e){return{podName:t,internalHostname:n,port:e}}))})),[4,Ka((u=i,null!=u&&u.length?Gt(u,1/0):[]),(function(e){var i=e.podName,a=e.internalHostname,u=e.port;return P(s,void 0,void 0,(function(){var e;return A(this,(function(s){return e="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(u.internalPort),[2,this.forwardPort(e,u,[a],"addon",n,r,t)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},t.prototype.allocateIpAddress=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){switch(s.label){case 0:return t="127.24.1.1",n="127.24.255.255",r=null!==(i=this.nextIpAddress)&&void 0!==i?i:t,[4,Go(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=Wo(zo(o)+1),zo(this.nextIpAddress)>zo(n)&&(this.nextIpAddress=t),[2,o]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,o,i,s,a){var u;return void 0===s&&(s=!0),P(this,void 0,void 0,(function(){var c,d,l,p,f,h,v=this;return A(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(d=this.canExecuteWithHostnames()).error)throw new Error("".concat(d.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(i,o,r,t,s)];case 1:return l=m.sent(),p="UDP"===t.protocol?new Ha(e,c,l):new $a(e,c,a,l),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return P(v,void 0,void 0,(function(){return A(this,(function(e){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return f=m.sent(),h={projectId:i,id:o,type:r,hostnames:n,ipOnly:s,port:f.port,address:f.address,protocol:t.protocol,portName:t.name},this.emit("tunnel-open",p,h),p.on("connection-error",(function(e){return v.emit("connection-error",p,h,e)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,h)})),this.connections.push({tunnel:p,forwardingContext:h}),[2,{data:h}]}}))}))},t.prototype.determineSocketAddress=function(e,t,n,r,o){var i;return P(this,void 0,void 0,(function(){var s,a,u;return A(this,(function(c){switch(c.label){case 0:return o&&"darwin"===l.platform()?[2,void 0]:(s=this.connections.find((function(r){return r.forwardingContext.projectId===e&&r.forwardingContext.id===t&&r.forwardingContext.type===n})),a=(null===(i=null==s?void 0:s.forwardingContext)||void 0===i?void 0:i.port)!==r.internalPort,s&&a?[2,{address:s.forwardingContext.address,port:r.internalPort}]:(u={},[4,this.allocateIpAddress(r.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=r.internalPort,u)]}}))}))},t.prototype.registerHostnames=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,R([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,R([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return P(t,void 0,void 0,(function(){var t,n=this;return A(this,(function(r){switch(r.label){case 0:return[4,si.load({header:"Northflank Proxy"})];case 1:return t=r.sent(),e(t),[4,t.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,eu(5)((function(){return P(n,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"atomic"})];case 1:return e.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,eu(5)((function(){return P(n,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"standard"})];case 1:return e.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopProjectForwarding=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return t.forwardingContext.projectId===e.projectId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopServiceForwarding=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"service"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.serviceId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopAddonForwarding=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"addon"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.addonId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stop=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return P(e,void 0,void 0,(function(){return A(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(t),eu=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return P(void 0,void 0,void 0,(function(){var e;return A(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,n()];case 1:return[2,i.sent()];case 2:if(e=i.sent(),r<=0)throw e;return r-=1,[4,new Promise((function(e){return setTimeout((function(){return e()}),t)}))];case 3:return i.sent(),[2,o()];case 4:return[2]}}))}))};return o()}},tu=function(e){function t(t,r,o,i,s,a){void 0===i&&(i=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var u=e.call(this)||this;return u.baseUrl=t,u.execConfig=r,u.token=o,u.stdOut=i,u.stdErr=s,u.stdIn=a,u.waitForCommandResult=function(){return P(u,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,e.sent()]}}))}))},u.sendInputToCurrentCommand=function(e){return P(u,void 0,void 0,(function(){var t;return A(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(t=this.duplex)||void 0===t||t.write(this.constructPayloadPacket(e)),[2]}))}))},u.resizeTerminal=function(e){return P(u,void 0,void 0,(function(){var t;return A(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(t=this.duplex)||void 0===t||t.write(JSON.stringify({type:"resize",data:{ttyRows:null==e?void 0:e.rows,ttyColumns:null==e?void 0:e.columns}})),[2]}))}))},u.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},u}return _(t,e),Object.defineProperty(t.prototype,"execEndpoint",{get:function(){var e=this.execConfig,t=e.entityId,n=e.entityType,r=e.projectId,o="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(o).concat(function(){switch(n){case"service":return"services/".concat(t);case"job":return"jobs/".concat(t);case"addon":return"addons/".concat(t);case"build":return"builds/".concat(t);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),t.prototype.start=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(t,n){var r,o,i;void 0!==e.remote&&n(Error("Command is already running"));var s,a=e.execEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ra(a);try{e.duplex=Ai(e.remote)}catch(e){throw new Error("Failed to establish connection to command execution proxy: ".concat(e.message))}e.initialAuth(),e.stdIn.on("data",(function(t){var n,r;(null===(n=e.duplex)||void 0===n?void 0:n.writable)&&(null===(r=e.duplex)||void 0===r||r.write(e.constructPayloadPacket(t)))})),null===(r=e.duplex)||void 0===r||r.on("data",(function(t){var n,r,o,i=JSON.parse(t.toString());switch(null==i?void 0:i.type){case"init":var a=i.data;"successful"!==a.auth&&u("Command initialization failed: ".concat(null!==(n=null==a?void 0:a.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":s=i.data,e.emit("command-result",s),null===(r=e.duplex)||void 0===r||r.end();break;case"stdOut":e.emit("std-out-data",i.data),e.stdOut.write(i.data);break;case"stdErr":e.emit("std-err-data",i.data),e.stdErr.write(i.data);break;case"error":u(null===(o=i.data)||void 0===o?void 0:o.message);break;default:var c="unable to parse message: ".concat(JSON.stringify(i));u(c)}})),null===(o=e.duplex)||void 0===o||o.on("end",(function(){e.emit("command-completed"),e.reset(),t(s)})),null===(i=e.duplex)||void 0===i||i.on("error",(function(n){e.emit("error",n),e.emit("command-completed"),e.reset(),t(s)}));var u=function(t){e.emit("error",t),e.reset(),n(new Error(t))};e.emit("command-started")})),[2,this.currentCommand]}))}))},t.prototype.initialAuth=function(){var e,t=this.execConfig,n=t.command,r=t.containerName,o=t.shell,i=t.user,s=t.group,a=t.ttyColumns,u=t.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:u}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(c))},t.prototype.reset=function(){var e;this.remote=void 0,this.currentCommand=void 0,null===(e=this.duplex)||void 0===e||e.destroy(),this.duplex=void 0},t}(t),nu=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!Za)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.serviceId,r=e.projectId,"service",o=S({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.serviceId,r=e.projectId,"service",o=S({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.jobId,r=e.projectId,"job",o=S({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.jobId,r=e.projectId,"job",o=S({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return P(this,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(S({shell:"none"},e)),n=new Xa,r=new Xa,t.stdOut.pipe(n),t.stdErr.pipe(r),t.on("error",(function(e){throw new Error(e)})),[4,t.start()];case 1:return[2,{commandResult:o.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},e.prototype.shellSession=function(e){this.assertStartedWithNodejs();var t=this.getCommandRunner(e);return t.start(),t},e.prototype.getCommandRunner=function(e){var t=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new tu(t,e,n)},e}(),ru=function(e){function t(t){var n=this.constructor,r=e.call(this,t.message)||this;r.name="NorthflankApiCallError",r.message=t.message,r.status=t.status,r.id=t.id,r.details=t.details;var o=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,o):r.__proto__=o,r}return _(t,e),t}(Error),ou=function(e){function t(t,n,r){var o=e.call(this)||this;return o.baseUrl=t,o.logsConfig=n,o.token=r,o.stop=function(){return P(o,void 0,void 0,(function(){var e;return A(this,(function(t){if(void 0===this.logSession)throw new Error("No command is running");return null===(e=this.remote)||void 0===e||e.close(),[2]}))}))},o}return _(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.entityId,r=e.entityType,o=e.buildId,i=e.runId,s=e.backupId,a=e.restoreId,u=e.isBuild,c=e.lineLimit,d=e.projectId,l=e.queryType,p=e.startTime,f=e.endTime,h=e.duration,v=e.direction,m=e.textIncludes,g=e.textNotIncludes,b=e.regexIncludes,y=e.regexNotIncludes,w="/v1/projects/".concat(d,"/"),j=new URLSearchParams;return j.append("queryType",l),void 0!==p&&j.append("startTime",p.toISOString()),void 0!==f&&j.append("endTime",f.toISOString()),void 0!==c&&j.append("lineLimit",c.toString()),void 0!==t&&j.append("containerName",t),void 0!==i&&j.append("runId",i),void 0!==o&&j.append("buildId",o),void 0!==m&&j.append("textIncludes",m),void 0!==g&&j.append("textNotIncludes",g),void 0!==b&&j.append("regexIncludes",b),void 0!==y&&j.append("regexNotIncludes",y),void 0!==v&&j.append("direction",v),void 0!==h&&j.append("duration",h.toString()),"".concat(w).concat(function(){var e=u?"/build-logs":"/logs";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);case"addonBackup":return"addons/".concat(n,"/backups/").concat(s).concat(e);case"addonRestore":return"addons/".concat(n,"/backups/").concat(s,"/restores/").concat(a).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(r))}}(),"?").concat(j.toString())},Object.defineProperty(t.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(t.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),t.prototype.start=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(t,n){var r,o,i,s;void 0!==e.remote&&n(Error("Command is already running"));var a=e.logsEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ra(a),null===(r=e.remote)||void 0===r||r.on("message",(function(t){var n,r,o=JSON.parse(t.toString());switch(null==o?void 0:o.type){case"init":var i=o.data;"successful"!==i.auth&&u("Log tail initialization failed: ".concat(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var s=o.data;e.emit("logs-received",s.map(vu));break;case"error":u(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));u(a)}})),null===(o=e.remote)||void 0===o||o.on("close",(function(){e.emit("close"),e.reset(),t()})),null===(i=e.remote)||void 0===i||i.on("open",(function(){e.emit("open")})),null===(s=e.remote)||void 0===s||s.on("error",(function(n){e.emit("error",n),e.reset(),t()}));var u=function(t){e.emit("error",{message:t}),e.reset(),n(new Error(t))}})),[4,new Promise((function(t){var n;e.remote.on("open",(function(){return t()})),null===(n=e.remote)||void 0===n||n.on("error",(function(){t()}))}))];case 1:return t.sent(),this.initialAuth(),[2,this.logSession]}}))}))},t.prototype.initialAuth=function(){var e,t={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(e=this.remote)||void 0===e||e.send(JSON.stringify(t))},t.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},t}(t),iu=Za?Bo:window.fetch,su=function(){if(Za)try{return JSON.parse(g.readFileSync(b.join(b.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},au=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return P(n,void 0,void 0,(function(){var t,n,r,o,i,s,a,u,c,d,l,p,f=this;return A(this,(function(h){switch(h.label){case 0:if(t=this.method,n={method:t,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return o="".concat(r).concat(this.endpointUrl(e)),i=this.body(e),s=S(S({url:o},n),{body:i}),[4,fu(o,S(S({},n),{body:i}))];case 1:return[4,(a=h.sent()).text()];case 2:return u=h.sent(),c=function(){if(200!==a.status){var e=null==d?void 0:d.error,t=(null==e?void 0:e.message)||"",n={status:a.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(f.opts.throwErrorOnHttpErrorCode)throw new ru(n);return n}},d=function(){try{return JSON.parse(u)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),l=c(),[2,{data:null==d?void 0:d.data,rawResponse:a,request:s,error:l,pagination:null==d?void 0:d.pagination}]}}))}))},this.contextProvider=e}return e.prototype.getDefaultHeaders=function(){var e,t,n=this.contextProvider.getCurrentToken(),r=(null===(e=this.opts)||void 0===e?void 0:e.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(t=su())||void 0===t?void 0:t.version).concat(r)}},e}(),uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return _(t,e),t}(au),cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return _(t,e),t}(au),du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return _(t,e),t}(au),lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return _(t,e),t}(au),pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return _(t,e),t}(au),fu=function(e,t,n,r){return void 0===t&&(t={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(o,i){var s=function(n){return iu(e,t).then((function(e){o(e)})).catch((function(e){return P(void 0,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return n>0?[4,(o=r,new Promise((function(e){setTimeout((function(){e()}),o)})))]:[3,2];case 1:return t.sent(),[2,s(n-1)];case 2:return[2,i(e)]}var o}))}))}))};return s(n)}))},hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch log lines over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){return ou.getLogsEndpoint(e)},t.body=function(){},t}return _(t,e),t}(uu),vu=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},mu=function(e){var t=this;this.contextProvider=e,this.getServiceLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.logRange(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logRange(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,S(S({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},o={backupId:t.backupId,restoreId:t.restoreId},[2,this.logRange(r,S(S({},n),o),"addonRestore")]}))}))},this.logRange=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:return t=e.entityId,o=e.projectId,i=S(S({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[4,new hu(this.contextProvider,{}).call(i)];case 1:return(s=u.sent()).error?[2,s]:[2,S(S({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(vu)})]}}))}))},this.tailServiceLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.logTail(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logTail(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,S(S({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},o={backupId:t.backupId,restoreId:t.restoreId},[2,this.logTail(r,S(S({},n),o),"addonRestore")]}))}))},this.logTail=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i,s,a;return A(this,(function(u){if(t=e.entityId,o=e.projectId,i=S({queryType:"tail",projectId:o,entityId:t,entityType:r},n),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new ou(s,i,a)]}))}))},this.assertStartedWithNodejs=function(){if(!Za)throw new Error("Command exec only possible when started with nodejs")}},gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch metrics entries over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){var t=e.projectId,n=e.entityId,r=e.entityType,o=e.runId,i=e.buildId,s=e.isBuild,a=e.queryType,u=e.metricTypes,c=e.startTime,d=e.endTime,l=e.duration,p=e.containerName,f=e.timestamp,h="/v1/projects/".concat(t,"/");var v=new URLSearchParams;return v.append("queryType",a),void 0!==c&&v.append("startTime",c.toISOString()),void 0!==d&&v.append("endTime",d.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==o&&v.append("runId",o),void 0!==i&&v.append("buildId",i),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==l&&v.append("duration",l.toString()),void 0!==u&&u.forEach((function(e){return v.append("metricTypes",e)})),"".concat(h).concat(function(){var e=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},t.body=function(){},t}return _(t,e),t}(uu),bu=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};!function(e){e.Cpu="cpu",e.Memory="memory",e.NetworkIngress="networkIngress",e.NetworkEgress="networkEgress",e.TcpConnectionOpen="tcpConnectionsOpen",e.PvcUsage="diskUsage",e.Requests="requests",e.Http4xxResponses="http4xxResponses",e.Http5xxResponses="http5xxResponses",e.Bandwidth="bandwidth",e.BandwidthVolume="bandwidthVolume"}(Ya||(Ya={}));var yu=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.jobId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i;return A(this,(function(s){return t=e.entityId,o=e.projectId,i=S(S({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.metricsRange(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.metricsRange(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i;return A(this,(function(s){return t=e.entityId,o=e.projectId,i=S(S({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return P(t,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return[4,new gu(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,S(S({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,S(S({},n),{values:n.values.map(bu)})]})))})]}}))}))}},wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the available addon types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/addon-types"},t.body=function(){},t}return _(t,e),t}(uu),ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of past invoices",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud providers",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/cloud-providers"},t.body=function(){},t}return _(t,e),t}(uu),_u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists clusters for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Su=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return _(t,e),t}(uu),Au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update an existing cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given cluster. Fails if the cluster has associated projects.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Delete",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return _(t,e),t}(du),Cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists docker registries for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/docker-registries"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given docker registry",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(e.parameters.registryId)},t.body=function(){},t}return _(t,e),t}(uu),Ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Delete",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(e.parameters.registryId)},t.body=function(){},t}return _(t,e),t}(du),xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return _(t,e),t}(uu),Tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Update",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given integration. Fails if the integration is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Delete",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return _(t,e),t}(du),Bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider node types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the partially random string used when generating host names for the authenticated account.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return"/v1/dns-id"},t.body=function(){},t}return _(t,e),t}(uu),Gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available domains",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/domains".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Mu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Registers a new domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return"/v1/domains"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return _(t,e),t}(uu),zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a domain and each of its registered subdomains.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Delete",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return _(t,e),t}(du),Wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new subdomain to the domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Vu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return _(t,e),t}(uu),$u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from a domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return _(t,e),t}(du),Hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assigns a service port to the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from its assigned service",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(){},t}return _(t,e),t}(du),Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes the CDN integration from the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Enables a CDN integration on the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/verify")},t.body=function(){},t}return _(t,e),t}(cu),Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attempts to verify the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/verify")},t.body=function(){},t}return _(t,e),t}(cu),ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of log sinks added to this account.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Create",t.endpointUrl=function(e){return"/v1/integrations/log-sinks"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return _(t,e),t}(uu),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Delete",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return _(t,e),t}(du),oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pauses a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes a paused log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/resume")},t.body=function(){},t}return _(t,e),t}(cu),sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the settings for a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists notification integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(e.parameters.notificationId)},t.body=function(){},t}return _(t,e),t}(uu),dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(e.parameters.notificationId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(e.parameters.notificationId)},t.body=function(){},t}return _(t,e),t}(du),pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the container registry credentials saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new set of container registry credentials to this account.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Create",t.endpointUrl=function(e){return"/v1/integrations/registries"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Views a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read Encrypted",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return _(t,e),t}(uu),vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Delete",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return _(t,e),t}(du),mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Update",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(e.parameters.credentialId,"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists linked version control providers",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){return"/v1/integrations/vcs"},t.body=function(){},t}return _(t,e),t}(uu),bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generate a token for a specific VCS link.",t.withAuth=!0,t.requiredPermissions="Account > Git > Tokens > Read",t.endpointUrl=function(e){var t;["customVCSId","vcsLinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(e.parameters.customVCSId,"/token/").concat(e.parameters.vcsLinkId).concat(r)},t.body=function(){},t}return _(t,e),t}(cu),yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of repositories accessible to this account",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of branches for the repo",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t;["vcsService","repositoryOwner","repositoryName"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(e.parameters.vcsService,"/").concat(e.parameters.repositoryOwner,"/").concat(e.parameters.repositoryName,"/branches").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available billing plans",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/plans"},t.body=function(){},t}return _(t,e),t}(uu),Ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists projects for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),_c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),Sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Update",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),Pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given project",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId)},t.body=function(){},t}return _(t,e),t}(uu),Ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given project. Fails if the project isn't empty.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Delete",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId).concat(r)},t.body=function(){},t}return _(t,e),t}(du),Rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of addons belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(uu),Oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(du),qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about an addon's backup schedules",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","scheduleId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules/").concat(e.parameters.scheduleId)},t.body=function(){},t}return _(t,e),t}(du),Nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of backups for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Initiates a backup for the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return _(t,e),t}(uu),Fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a given backup",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return _(t,e),t}(du),Gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the in progress backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort")},t.body=function(){},t}return _(t,e),t}(cu),Mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts an in-progress backup restore.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort-restore")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generates a temporary download link for downloading the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/download-link")},t.body=function(){},t}return _(t,e),t}(uu),zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores the given addon to the given backup state.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restore")},t.body=function(){},t}return _(t,e),t}(cu),Wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of restores for the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restores").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/retain")},t.body=function(){},t}return _(t,e),t}(cu),$c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/containers").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the credentials for connecting to the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/credentials")},t.body=function(){},t}return _(t,e),t}(uu),Yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Imports a database from an external archive or existing live database.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the network settings for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),Xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores an addon to a specific point in time.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the valid window for performing a point-in-time restore (PITR) on this addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr-window")},t.body=function(){},t}return _(t,e),t}(uu),ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Reset the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/reset")},t.body=function(){},t}return _(t,e),t}(cu),td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restart the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/restart")},t.body=function(){},t}return _(t,e),t}(cu),nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resume the given addon if it is paused.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/resume")},t.body=function(){},t}return _(t,e),t}(cu),rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the allocated resources for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the security rules for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the current addon version including available upgrades and upgrade history.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(){},t}return _(t,e),t}(uu),sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Upgrades the addon to a new version.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of jobs belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return _(t,e),t}(uu),vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Delete",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return _(t,e),t}(du),md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/branches").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists builds for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given job. Given a commit sha, it will build that commit.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets build arguments for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Build Parameters",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments/details")},t.body=function(){},t}return _(t,e),t}(uu),Id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),_d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(uu),Sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job build",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(du),Pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/containers").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(){},t}return _(t,e),t}(uu),Rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(){},t}return _(t,e),t}(uu),kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),Od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pull-requests").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetches run history for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Starts a new job run for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns data about the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return _(t,e),t}(uu),Nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return _(t,e),t}(du),Bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Environment Variables",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment/details")},t.body=function(){},t}return _(t,e),t}(uu),Gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Scale Job",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates settings for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modify cron job to toggle suspending of its schedule.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists all pipelines for a project",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a pipeline",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId)},t.body=function(){},t}return _(t,e),t}(uu),Vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),$d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of active preview environments for a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/previews").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a preview environment generated by a preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["projectId","pipelineId","previewId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/previews/").concat(e.parameters.previewId)},t.body=function(){},t}return _(t,e),t}(du),Zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of preview template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/runs/").concat(e.parameters.templateRunId)},t.body=function(){},t}return _(t,e),t}(uu),Xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(){},t}return _(t,e),t}(uu),Qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists runs of a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return _(t,e),t}(uu),rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs/").concat(e.parameters.runId,"/abort")},t.body=function(){},t}return _(t,e),t}(cu),ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of secrets belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret including its contents",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t;["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId).concat(r)},t.body=function(){},t}return _(t,e),t}(uu),cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Delete",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(){},t}return _(t,e),t}(du),dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Link an addon to the secret group or edit the settings of the linked addon.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a given addon link.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(uu),fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unlinks an addon from the secret group.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(du),hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret with details about its linked addons",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/details")},t.body=function(){},t}return _(t,e),t}(uu),vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of services belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/build/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/combined/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),Il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),El=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),_l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/deployment/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),Sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId)},t.body=function(){},t}return _(t,e),t}(uu),Pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Delete",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId).concat(r)},t.body=function(){},t}return _(t,e),t}(du),Al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/branches").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the builds for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the build arguments for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Build Parameters",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments/details")},t.body=function(){},t}return _(t,e),t}(uu),xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given build or combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(uu),Tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given service build",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(du),Nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/containers").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(){},t}return _(t,e),t}(uu),Ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(){},t}return _(t,e),t}(uu),Gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),Jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(){},t}return _(t,e),t}(uu),zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the list of ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pull-requests").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restarts the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/restart")},t.body=function(){},t}return _(t,e),t}(cu),$l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Environment Variables",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment/details")},t.body=function(){},t}return _(t,e),t}(uu),Kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Scale Service",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of volumes belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(){},t}return _(t,e),t}(uu),Ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a volume with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ep=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return _(t,e),t}(uu),tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update volume mounts and storage size",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),np=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes this volume and its associated data.",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Delete",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return _(t,e),t}(du),rp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),op=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Detach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available project regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/regions"},t.body=function(){},t}return _(t,e),t}(uu),sp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of templates",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ap=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return"/v1/templates"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),up=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId).concat(r)},t.body=function(){},t}return _(t,e),t}(uu),cp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Update",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),dp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId)},t.body=function(){},t}return _(t,e),t}(du),lp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Run a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Run",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),pp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId,"/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),fp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId,"/runs/").concat(e.parameters.templateRunId)},t.body=function(){},t}return _(t,e),t}(uu),hp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > Runs > Abort",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId,"/runs/").concat(e.parameters.templateRunId,"/abort")},t.body=function(){},t}return _(t,e),t}(cu),vp=function(){function e(){this.loadContext()}return e.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},e.prototype.getInfo=function(){return""},e.prototype.storeContext=function(e){return P(this,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return[4,this.writeContext(e)];case 1:return t.sent(),this.contextWrapper=e,[2]}}))}))},e.prototype.addContext=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){switch(i.label){case 0:if(t||void 0===this.findContext(e.name))return[3,1];throw new Error("Context with name ".concat(e.name," already exists"));case 1:return[4,this.removeContext(e.name)];case 2:i.sent(),i.label=3;case 3:return n=S({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:R(R([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return P(this,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){switch(i.label){case 0:return t=this.contextWrapper,n=t.contexts.filter((function(t){return t.name!==e})),r=t.current===e?void 0:t.current,o={current:r,contexts:R([],n,!0),lastUpdateCheck:t.lastUpdateCheck},[4,this.storeContext(o)];case 1:return i.sent(),[2]}}))}))},e.prototype.getCurrentContext=function(){var e=this.contextWrapper.current;return void 0===e?e:this.findContext(e)},e.prototype.findContext=function(e){return this.contextWrapper.contexts.find((function(t){return t.name===e}))},e.prototype.getCurrentBaseUrl=function(e){var t=this.getCurrentContext();if(!0===e&&!(null==t?void 0:t.host))throw new Error("Context (".concat(null==t?void 0:t.name,") doesn't have a target API host. Please login again."));return null==t?void 0:t.host},e.prototype.getCurrentProjectName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.project},e.prototype.getCurrentName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.name},e.prototype.getCurrentToken=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.token},e.prototype.getCurrentServiceName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.service},e.prototype.getCurrentJobName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.job},e.prototype.getCurrentPlanId=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.plan},e.prototype.getCurrentRegion=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.region},e.prototype.useContext=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(!this.findContext(e))throw new Error("Context with name ".concat(e," doesn't exist"));return t=this.contextWrapper,n=S(S({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o,i,s;return A(this,(function(a){switch(a.label){case 0:if(n=null!=t?t:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(t," doesn't exist"));return o=this.contextWrapper,i=o.contexts.map((function(t){return t.name===n?S(S({},r),{token:e}):t})),s=S(S({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=S(S({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=S(S({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=S(S({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=S(S({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=S(S({},t),{region:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},e.prototype.setLastUpdateCheck=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=S(S({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),mp=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return P(n,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,g.promises.mkdir(e,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 3:return[2]}}))}))},n.configPath=t||"".concat(l.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return _(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(g.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return P(this,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.promises.writeFile(this.configFile,JSON.stringify(e,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw t=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(t.message)),t;case 5:return[2]}}))}))},t.prototype.assertConfigDir=function(){return P(this,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return e.sent(),[2]}}))}))},t.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},t}(vp),gp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return _(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return P(this,void 0,void 0,(function(){return A(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(vp),bp=function(e,t){void 0===t&&(t={});var n,r,o,i=this;this.baseUrl=function(){return i.contextProvider.getCurrentBaseUrl()},this.contextProvider=e,this.forwarding=new Qa(e,new vl(e,t).call,new Rc(e,t).call),this.exec=new nu(e),this.logs=new mu(e),this.metrics=new yu(e),this.endpoints={get:(o={},o.addon=((r=new Uc(e,t)).types=new wu(e,t),r.backupSchedules=new qc(e,t),r.backups=new Nc(e,t),r.backup=((n=new Lc(e,t)).download=new Jc(e,t),n),r.restores=new Wc(e,t),r.containers=new $c(e,t),r.credentials=new Hc(e,t),r.pitrWindow=new Qc(e,t),r.version=new id(e,t),r),o.invoice=function(){var n={};return n.details=new Iu(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new Pu(e,t),n.dockerRegistry=new Uu(e,t),n.integration=new Du(e,t),n}(),o.dnsId=new Fu(e,t),o.domain=new Ju(e,t),o.subdomain=new Vu(e,t),o.logSink=new nc(e,t),o.notification=new cc(e,t),o.registryCredentials=new hc(e,t),o.project=new Pc(e,t),o.job=function(){var n=new hd(e,t);return n.branches=new md(e,t),n.builds=new gd(e,t),n.buildArguments=new yd(e,t),n.buildArgumentDetails=new jd(e,t),n.build=new _d(e,t),n.containers=new Pd(e,t),n.deployment=new Ad(e,t),n.healthChecks=new Cd(e,t),n.pullRequests=new Od(e,t),n.runs=new qd(e,t),n.run=new Td(e,t),n.runtimeEnvironment=new Bd(e,t),n.runtimeEnvironmentDetails=new Fd(e,t),n}(),o.pipeline=new Wd(e,t),o.previewTemplate=new Vd(e,t),o.previewTemplateRun=new Kd(e,t),o.releaseFlow=new Xd(e,t),o.releaseFlowRun=new nl(e,t),o.secret=new ul(e,t),o.secretLink=new pl(e,t),o.secretDetails=new hl(e,t),o.service=function(){var n=new Sl(e,t);return n.branches=new Al(e,t),n.builds=new Rl(e,t),n.buildArguments=new kl(e,t),n.buildArgumentDetails=new Ol(e,t),n.build=new Dl(e,t),n.containers=new Nl(e,t),n.deployment=new Bl(e,t),n.healthChecks=new Fl(e,t),n.ports=new Jl(e,t),n.pullRequests=new Wl(e,t),n.runtimeEnvironment=new Hl(e,t),n.runtimeEnvironmentDetails=new Zl(e,t),n}(),o.volume=new ep(e,t),o.template=new up(e,t),o.templateRun=new fp(e,t),o),list:function(){var n={};return n.invoices=new ju(e,t),n.cloud=function(){var n={};return n.providers=new Eu(e,t),n.clusters=new _u(e,t),n.dockerRegistry=new Cu(e,t),n.integrations=new xu(e,t),n.nodeTypes=new Bu(e,t),n.regions=new Lu(e,t),n}(),n.domains=new Gu(e,t),n.logSinks=new ec(e,t),n.notifications=new ac(e,t),n.registryCredentials=new pc(e,t),n.vcs=new gc(e,t),n.repos=new yc(e,t),n.branches=new wc(e,t),n.plans=new jc(e,t),n.projects=new Ic(e,t),n.addons=new Rc(e,t),n.jobs=new ad(e,t),n.pipelines=new zd(e,t),n.previewTemplatePreviews=new Hd(e,t),n.previewTemplateRuns=new Zd(e,t),n.releaseFlowRuns=new tl(e,t),n.secrets=new ol(e,t),n.services=new vl(e,t),n.volumes=new Xl(e,t),n.regions=new ip(e,t),n.templates=new sp(e,t),n.templateRuns=new pp(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Su(e,t),n.dockerRegistry=new ku(e,t),n.integration=new qu(e,t),n}(),n.domain=new Mu(e,t),n.logSink=new tc(e,t),n.notification=new uc(e,t),n.customVcs=function(){var n={};return n.token=new bc(e,t),n}(),n.project=new Ec(e,t),n.addon=function(){var n=new Cc(e,t);return n.backupSchedule=new Dc(e,t),n}(),n.job=function(){var n={};return n.cron=new ud(e,t),n.manual=new ld(e,t),n}(),n.secret=new il(e,t),n.service=function(){var n={};return n.build=new ml(e,t),n.combined=new yl(e,t),n.deployment=new Il(e,t),n}(),n.volume=new Ql(e,t),n.template=new ap(e,t),n}(),update:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Au(e,t),n.integration=new Tu(e,t),n}(),n.logSink=new sc(e,t),n.notification=new dc(e,t),n.registryCredentials=new mc(e,t),n.addon=function(){var n={};return n.networkSettings=new Zc(e,t),n.security=new od(e,t),n.version=new sd(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new wd(e,t),n.buildOptions=new Id(e,t),n.buildSource=new Ed(e,t),n.deployment=new Rd(e,t),n.healthChecks=new kd(e,t),n.runtimeEnvironment=new Ld(e,t),n.settings=new Md(e,t),n}(),n.previewTemplate=new $d(e,t),n.releaseFlow=new Qd(e,t),n.secret=new dl(e,t),n.secretLink=new ll(e,t),n.service=function(){var n={};return n.buildArguments=new Ul(e,t),n.buildOptions=new xl(e,t),n.buildSource=new ql(e,t),n.deployment=new Ll(e,t),n.healthChecks=new Gl(e,t),n.ports=new zl(e,t),n.runtimeEnvironment=new Yl(e,t),n}(),n.volume=new tp(e,t),n.template=new cp(e,t),n}(),delete:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Ru(e,t),n.dockerRegistry=new Ou(e,t),n.integration=new Nu(e,t),n}(),n.domain=new zu(e,t),n.subdomain=new $u(e,t),n.logSink=new rc(e,t),n.notification=new lc(e,t),n.registryCredentials=new vc(e,t),n.project=new Ac(e,t),n.addon=function(){var n=new xc(e,t);return n.backupSchedule=new Tc(e,t),n}(),n.backup=new Fc(e,t),n.job=new vd(e,t),n.previewTemplatePreview=new Yd(e,t),n.secret=new cl(e,t),n.secretLink=new fl(e,t),n.service=new Pl(e,t),n.volume=new np(e,t),n.template=new dp(e,t),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new Wu(e,t),n}(),n.registryCredentials=new fc(e,t),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Hu(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=new Yu(e,t),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Zu(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Ku(e,t),n}(),n}(),verify:function(){var n={};return n.subdomain=new Xu(e,t),n.domain=new Qu(e,t),n}(),pause:function(){var n={};return n.logSink=new oc(e,t),n.addon=new Kc(e,t),n.job=new Ud(e,t),n.service=new Ml(e,t),n}(),resume:function(){var n={};return n.logSink=new ic(e,t),n.addon=new nd(e,t),n.job=new xd(e,t),n.service=new $l(e,t),n}(),put:function(){var n={};return n.project=new _c(e,t),n.addon=new kc(e,t),n.job=function(){var n={};return n.cron=new cd(e,t),n.manual=new pd(e,t),n}(),n.secret=new sl(e,t),n.service=function(){var n={};return n.build=new gl(e,t),n.combined=new wl(e,t),n.deployment=new El(e,t),n}(),n}(),patch:function(){var n={};return n.project=new Sc(e,t),n.addon=new Oc(e,t),n.job=function(){var n={};return n.cron=new dd(e,t),n.manual=new fd(e,t),n}(),n.secret=new al(e,t),n.service=function(){var n={};return n.build=new bl(e,t),n.combined=new jl(e,t),n.deployment=new _l(e,t),n}(),n}(),backup:function(){var n={};return n.addon=new Bc(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Gc(e,t),n.restore=new Mc(e,t),n}(),n.job=function(){var n={};return n.build=new Sd(e,t),n.run=new Nd(e,t),n}(),n.releaseFlowRun=new rl(e,t),n.service=function(){var n={};return n.build=new Tl(e,t),n}(),n.templateRun=new hp(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new zc(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new Vc(e,t),n}(),n}(),import:function(){var n={};return n.addon=function(){var n={};return n.backup=new Yc(e,t),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new Xc(e,t),n}(),n.job=function(){var n={};return n.build=new bd(e,t),n.run=new Dd(e,t),n}(),n.service=function(){var n={};return n.build=new Cl(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new ed(e,t),n}(),restart:function(){var n={};return n.addon=new td(e,t),n.service=new Vl(e,t),n}(),scale:function(){var n={};return n.addon=new rd(e,t),n.job=new Gd(e,t),n.service=new Kl(e,t),n}(),suspend:function(){var n={};return n.job=new Jd(e,t),n}(),run:function(){var n={};return n.releaseFlow=new el(e,t),n.template=new lp(e,t),n}(),attach:function(){var n={};return n.volume=new rp(e,t),n}(),detach:function(){var n={};return n.volume=new op(e,t),n}()},this.get=function(){var e={};return e.addon=function(){var e=i.endpoints.get.addon.call;return e.types=i.endpoints.get.addon.types.call,e.backupSchedules=i.endpoints.get.addon.backupSchedules.call,e.backups=i.endpoints.get.addon.backups.call,e.backup=function(){var e=i.endpoints.get.addon.backup.call;return e.download=i.endpoints.get.addon.backup.download.call,e.logs=i.logs.getAddonBackupLogs,e.logTail=i.logs.tailAddonBackupLogs,e}(),e.restores=function(){var e=i.endpoints.get.addon.restores.call;return e.logs=i.logs.getAddonRestoresLogs,e.logTail=i.logs.tailAddonRestoresLogs,e}(),e.containers=i.endpoints.get.addon.containers.call,e.credentials=i.endpoints.get.addon.credentials.call,e.pitrWindow=i.endpoints.get.addon.pitrWindow.call,e.version=i.endpoints.get.addon.version.call,e.logs=i.logs.getAddonLogs,e.logTail=i.logs.tailAddonLogs,e.metrics=i.metrics.getAddonMetrics,e.metricsRange=i.metrics.getAddonMetricsRange,e}(),e.invoice=function(){var e={};return e.details=i.endpoints.get.invoice.details.call,e}(),e.cloud=function(){var e={};return e.cluster=i.endpoints.get.cloud.cluster.call,e.dockerRegistry=i.endpoints.get.cloud.dockerRegistry.call,e.integration=i.endpoints.get.cloud.integration.call,e}(),e.dnsId=i.endpoints.get.dnsId.call,e.domain=i.endpoints.get.domain.call,e.subdomain=i.endpoints.get.subdomain.call,e.logSink=i.endpoints.get.logSink.call,e.notification=i.endpoints.get.notification.call,e.registryCredentials=i.endpoints.get.registryCredentials.call,e.project=i.endpoints.get.project.call,e.job=function(){var e=i.endpoints.get.job.call;return e.branches=i.endpoints.get.job.branches.call,e.builds=i.endpoints.get.job.builds.call,e.buildArguments=i.endpoints.get.job.buildArguments.call,e.buildArgumentDetails=i.endpoints.get.job.buildArgumentDetails.call,e.build=i.endpoints.get.job.build.call,e.containers=i.endpoints.get.job.containers.call,e.deployment=i.endpoints.get.job.deployment.call,e.healthChecks=i.endpoints.get.job.healthChecks.call,e.pullRequests=i.endpoints.get.job.pullRequests.call,e.runs=i.endpoints.get.job.runs.call,e.run=i.endpoints.get.job.run.call,e.runtimeEnvironment=i.endpoints.get.job.runtimeEnvironment.call,e.runtimeEnvironmentDetails=i.endpoints.get.job.runtimeEnvironmentDetails.call,e.logs=i.logs.getJobLogs,e.buildLogs=i.logs.getJobBuildLogs,e.logTail=i.logs.tailJobLogs,e.buildLogTail=i.logs.tailJobBuildLogs,e.metrics=i.metrics.getJobMetrics,e.buildMetrics=i.metrics.getJobBuildMetrics,e.metricsRange=i.metrics.getJobMetricsRange,e.buildMetricsRange=i.metrics.getJobBuildMetricsRange,e}(),e.pipeline=i.endpoints.get.pipeline.call,e.previewTemplate=i.endpoints.get.previewTemplate.call,e.previewTemplateRun=i.endpoints.get.previewTemplateRun.call,e.releaseFlow=i.endpoints.get.releaseFlow.call,e.releaseFlowRun=i.endpoints.get.releaseFlowRun.call,e.secret=i.endpoints.get.secret.call,e.secretLink=i.endpoints.get.secretLink.call,e.secretDetails=i.endpoints.get.secretDetails.call,e.service=function(){var e=i.endpoints.get.service.call;return e.branches=i.endpoints.get.service.branches.call,e.builds=i.endpoints.get.service.builds.call,e.buildArguments=i.endpoints.get.service.buildArguments.call,e.buildArgumentDetails=i.endpoints.get.service.buildArgumentDetails.call,e.build=i.endpoints.get.service.build.call,e.containers=i.endpoints.get.service.containers.call,e.deployment=i.endpoints.get.service.deployment.call,e.healthChecks=i.endpoints.get.service.healthChecks.call,e.ports=i.endpoints.get.service.ports.call,e.pullRequests=i.endpoints.get.service.pullRequests.call,e.runtimeEnvironment=i.endpoints.get.service.runtimeEnvironment.call,e.runtimeEnvironmentDetails=i.endpoints.get.service.runtimeEnvironmentDetails.call,e.logs=i.logs.getServiceLogs,e.buildLogs=i.logs.getServiceBuildLogs,e.logTail=i.logs.tailServiceLogs,e.buildLogTail=i.logs.tailServiceBuildLogs,e.metrics=i.metrics.getServiceMetrics,e.buildMetrics=i.metrics.getServiceBuildMetrics,e.metricsRange=i.metrics.getServiceMetricsRange,e.buildMetricsRange=i.metrics.getServiceBuildMetricsRange,e}(),e.volume=i.endpoints.get.volume.call,e.template=i.endpoints.get.template.call,e.templateRun=i.endpoints.get.templateRun.call,e}(),this.list=function(){var e={};return e.invoices=i.endpoints.list.invoices.call,e.cloud=function(){var e={};return e.providers=i.endpoints.list.cloud.providers.call,e.clusters=i.endpoints.list.cloud.clusters.call,e.dockerRegistry=i.endpoints.list.cloud.dockerRegistry.call,e.integrations=i.endpoints.list.cloud.integrations.call,e.nodeTypes=i.endpoints.list.cloud.nodeTypes.call,e.regions=i.endpoints.list.cloud.regions.call,e}(),e.domains=i.endpoints.list.domains.call,e.logSinks=i.endpoints.list.logSinks.call,e.notifications=i.endpoints.list.notifications.call,e.registryCredentials=i.endpoints.list.registryCredentials.call,e.vcs=i.endpoints.list.vcs.call,e.repos=i.endpoints.list.repos.call,e.branches=i.endpoints.list.branches.call,e.plans=i.endpoints.list.plans.call,e.projects=i.endpoints.list.projects.call,e.addons=i.endpoints.list.addons.call,e.jobs=i.endpoints.list.jobs.call,e.pipelines=i.endpoints.list.pipelines.call,e.previewTemplatePreviews=i.endpoints.list.previewTemplatePreviews.call,e.previewTemplateRuns=i.endpoints.list.previewTemplateRuns.call,e.releaseFlowRuns=i.endpoints.list.releaseFlowRuns.call,e.secrets=i.endpoints.list.secrets.call,e.services=i.endpoints.list.services.call,e.volumes=i.endpoints.list.volumes.call,e.regions=i.endpoints.list.regions.call,e.templates=i.endpoints.list.templates.call,e.templateRuns=i.endpoints.list.templateRuns.call,e}(),this.create=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.create.cloud.cluster.call,e.dockerRegistry=i.endpoints.create.cloud.dockerRegistry.call,e.integration=i.endpoints.create.cloud.integration.call,e}(),e.domain=i.endpoints.create.domain.call,e.logSink=i.endpoints.create.logSink.call,e.notification=i.endpoints.create.notification.call,e.customVcs=function(){var e={};return e.token=i.endpoints.create.customVcs.token.call,e}(),e.project=i.endpoints.create.project.call,e.addon=function(){var e=i.endpoints.create.addon.call;return e.backupSchedule=i.endpoints.create.addon.backupSchedule.call,e}(),e.job=function(){var e={};return e.cron=i.endpoints.create.job.cron.call,e.manual=i.endpoints.create.job.manual.call,e}(),e.secret=i.endpoints.create.secret.call,e.service=function(){var e={};return e.build=i.endpoints.create.service.build.call,e.combined=i.endpoints.create.service.combined.call,e.deployment=i.endpoints.create.service.deployment.call,e}(),e.volume=i.endpoints.create.volume.call,e.template=i.endpoints.create.template.call,e}(),this.update=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.update.cloud.cluster.call,e.integration=i.endpoints.update.cloud.integration.call,e}(),e.logSink=i.endpoints.update.logSink.call,e.notification=i.endpoints.update.notification.call,e.registryCredentials=i.endpoints.update.registryCredentials.call,e.addon=function(){var e={};return e.networkSettings=i.endpoints.update.addon.networkSettings.call,e.security=i.endpoints.update.addon.security.call,e.version=i.endpoints.update.addon.version.call,e}(),e.job=function(){var e={};return e.buildArguments=i.endpoints.update.job.buildArguments.call,e.buildOptions=i.endpoints.update.job.buildOptions.call,e.buildSource=i.endpoints.update.job.buildSource.call,e.deployment=i.endpoints.update.job.deployment.call,e.healthChecks=i.endpoints.update.job.healthChecks.call,e.runtimeEnvironment=i.endpoints.update.job.runtimeEnvironment.call,e.settings=i.endpoints.update.job.settings.call,e}(),e.previewTemplate=i.endpoints.update.previewTemplate.call,e.releaseFlow=i.endpoints.update.releaseFlow.call,e.secret=i.endpoints.update.secret.call,e.secretLink=i.endpoints.update.secretLink.call,e.service=function(){var e={};return e.buildArguments=i.endpoints.update.service.buildArguments.call,e.buildOptions=i.endpoints.update.service.buildOptions.call,e.buildSource=i.endpoints.update.service.buildSource.call,e.deployment=i.endpoints.update.service.deployment.call,e.healthChecks=i.endpoints.update.service.healthChecks.call,e.ports=i.endpoints.update.service.ports.call,e.runtimeEnvironment=i.endpoints.update.service.runtimeEnvironment.call,e}(),e.volume=i.endpoints.update.volume.call,e.template=i.endpoints.update.template.call,e}(),this.delete=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.delete.cloud.cluster.call,e.dockerRegistry=i.endpoints.delete.cloud.dockerRegistry.call,e.integration=i.endpoints.delete.cloud.integration.call,e}(),e.domain=i.endpoints.delete.domain.call,e.subdomain=i.endpoints.delete.subdomain.call,e.logSink=i.endpoints.delete.logSink.call,e.notification=i.endpoints.delete.notification.call,e.registryCredentials=i.endpoints.delete.registryCredentials.call,e.project=i.endpoints.delete.project.call,e.addon=function(){var e=i.endpoints.delete.addon.call;return e.backupSchedule=i.endpoints.delete.addon.backupSchedule.call,e}(),e.backup=i.endpoints.delete.backup.call,e.job=i.endpoints.delete.job.call,e.previewTemplatePreview=i.endpoints.delete.previewTemplatePreview.call,e.secret=i.endpoints.delete.secret.call,e.secretLink=i.endpoints.delete.secretLink.call,e.service=i.endpoints.delete.service.call,e.volume=i.endpoints.delete.volume.call,e.template=i.endpoints.delete.template.call,e}(),this.add=function(){var e={};return e.domain=function(){var e={};return e.subdomain=i.endpoints.add.domain.subdomain.call,e}(),e.registryCredentials=i.endpoints.add.registryCredentials.call,e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=i.endpoints.assign.subdomain.service.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=i.endpoints.unassign.subdomain.call,e}(),this.disable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=i.endpoints.disable.subdomain.cdn.call,e}(),e}(),this.enable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=i.endpoints.enable.subdomain.cdn.call,e}(),e}(),this.verify=function(){var e={};return e.subdomain=i.endpoints.verify.subdomain.call,e.domain=i.endpoints.verify.domain.call,e}(),this.pause=function(){var e={};return e.logSink=i.endpoints.pause.logSink.call,e.addon=i.endpoints.pause.addon.call,e.job=i.endpoints.pause.job.call,e.service=i.endpoints.pause.service.call,e}(),this.resume=function(){var e={};return e.logSink=i.endpoints.resume.logSink.call,e.addon=i.endpoints.resume.addon.call,e.job=i.endpoints.resume.job.call,e.service=i.endpoints.resume.service.call,e}(),this.put=function(){var e={};return e.project=i.endpoints.put.project.call,e.addon=i.endpoints.put.addon.call,e.job=function(){var e={};return e.cron=i.endpoints.put.job.cron.call,e.manual=i.endpoints.put.job.manual.call,e}(),e.secret=i.endpoints.put.secret.call,e.service=function(){var e={};return e.build=i.endpoints.put.service.build.call,e.combined=i.endpoints.put.service.combined.call,e.deployment=i.endpoints.put.service.deployment.call,e}(),e}(),this.patch=function(){var e={};return e.project=i.endpoints.patch.project.call,e.addon=i.endpoints.patch.addon.call,e.job=function(){var e={};return e.cron=i.endpoints.patch.job.cron.call,e.manual=i.endpoints.patch.job.manual.call,e}(),e.secret=i.endpoints.patch.secret.call,e.service=function(){var e={};return e.build=i.endpoints.patch.service.build.call,e.combined=i.endpoints.patch.service.combined.call,e.deployment=i.endpoints.patch.service.deployment.call,e}(),e}(),this.backup=function(){var e={};return e.addon=i.endpoints.backup.addon.call,e}(),this.abort=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.abort.addon.backup.call,e.restore=i.endpoints.abort.addon.restore.call,e}(),e.job=function(){var e={};return e.build=i.endpoints.abort.job.build.call,e.run=i.endpoints.abort.job.run.call,e}(),e.releaseFlowRun=i.endpoints.abort.releaseFlowRun.call,e.service=function(){var e={};return e.build=i.endpoints.abort.service.build.call,e}(),e.templateRun=i.endpoints.abort.templateRun.call,e}(),this.restore=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.restore.addon.backup.call,e}(),e}(),this.retain=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.retain.addon.backup.call,e}(),e}(),this.import=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.import.addon.backup.call,e}(),e}(),this.start=function(){var e={};return e.addon=function(){var e={};return e.pitr=i.endpoints.start.addon.pitr.call,e}(),e.job=function(){var e={};return e.build=i.endpoints.start.job.build.call,e.run=i.endpoints.start.job.run.call,e}(),e.service=function(){var e={};return e.build=i.endpoints.start.service.build.call,e}(),e}(),this.reset=function(){var e={};return e.addon=i.endpoints.reset.addon.call,e}(),this.restart=function(){var e={};return e.addon=i.endpoints.restart.addon.call,e.service=i.endpoints.restart.service.call,e}(),this.scale=function(){var e={};return e.addon=i.endpoints.scale.addon.call,e.job=i.endpoints.scale.job.call,e.service=i.endpoints.scale.service.call,e}(),this.suspend=function(){var e={};return e.job=i.endpoints.suspend.job.call,e}(),this.run=function(){var e={};return e.releaseFlow=i.endpoints.run.releaseFlow.call,e.template=i.endpoints.run.template.call,e}(),this.attach=function(){var e={};return e.volume=i.endpoints.attach.volume.call,e}(),this.detach=function(){var e={};return e.volume=i.endpoints.detach.volume.call,e}()};export{Gc as AbortAddonBackupEndpoint,Mc as AbortAddonRestoreEndpoint,Sd as AbortJobBuildEndpoint,Nd as AbortJobRunEndpoint,rl as AbortReleaseflowrunEndpoint,Tl as AbortServiceBuildEndpoint,hp as AbortTemplaterunEndpoint,Wu as AddDomainSubdomainEndpoint,fc as AddRegistrycredentialsEndpoint,bp as ApiClient,vp as ApiClientContextProvider,mp as ApiClientFileContextProvider,gp as ApiClientInMemoryContextProvider,au as ApiEndpoint,Hu as AssignSubdomainServiceEndpoint,rp as AttachVolumeEndpoint,Bc as BackupAddonEndpoint,Dc as CreateAddonBackupscheduleEndpoint,Cc as CreateAddonEndpoint,Su as CreateCloudClusterEndpoint,ku as CreateCloudDockerregistryEndpoint,qu as CreateCloudIntegrationEndpoint,bc as CreateCustomvcsTokenEndpoint,Mu as CreateDomainEndpoint,ud as CreateJobCronEndpoint,ld as CreateJobManualEndpoint,tc as CreateLogsinkEndpoint,uc as CreateNotificationEndpoint,Ec as CreateProjectEndpoint,il as CreateSecretEndpoint,ml as CreateServiceBuildEndpoint,yl as CreateServiceCombinedEndpoint,Il as CreateServiceDeploymentEndpoint,ap as CreateTemplateEndpoint,Ql as CreateVolumeEndpoint,Tc as DeleteAddonBackupscheduleEndpoint,xc as DeleteAddonEndpoint,du as DeleteApiEndpoint,Fc as DeleteBackupEndpoint,Ru as DeleteCloudClusterEndpoint,Ou as DeleteCloudDockerregistryEndpoint,Nu as DeleteCloudIntegrationEndpoint,zu as DeleteDomainEndpoint,vd as DeleteJobEndpoint,rc as DeleteLogsinkEndpoint,lc as DeleteNotificationEndpoint,Yd as DeletePreviewtemplatepreviewEndpoint,Ac as DeleteProjectEndpoint,vc as DeleteRegistrycredentialsEndpoint,cl as DeleteSecretEndpoint,fl as DeleteSecretlinkEndpoint,Pl as DeleteServiceEndpoint,$u as DeleteSubdomainEndpoint,dp as DeleteTemplateEndpoint,np as DeleteVolumeEndpoint,op as DetachVolumeEndpoint,Zu as DisableSubdomainCdnEndpoint,Ku as EnableSubdomainCdnEndpoint,tu as ExecCommandStandard,Jc as GetAddonBackupDownloadEndpoint,Lc as GetAddonBackupEndpoint,Nc as GetAddonBackupsEndpoint,qc as GetAddonBackupschedulesEndpoint,$c as GetAddonContainersEndpoint,Hc as GetAddonCredentialsEndpoint,Uc as GetAddonEndpoint,Qc as GetAddonPitrwindowEndpoint,Wc as GetAddonRestoresEndpoint,wu as GetAddonTypesEndpoint,id as GetAddonVersionEndpoint,uu as GetApiEndpoint,Pu as GetCloudClusterEndpoint,Uu as GetCloudDockerregistryEndpoint,Du as GetCloudIntegrationEndpoint,Fu as GetDnsidEndpoint,Ju as GetDomainEndpoint,Iu as GetInvoiceDetailsEndpoint,md as GetJobBranchesEndpoint,_d as GetJobBuildEndpoint,jd as GetJobBuildargumentdetailsEndpoint,yd as GetJobBuildargumentsEndpoint,gd as GetJobBuildsEndpoint,Pd as GetJobContainersEndpoint,Ad as GetJobDeploymentEndpoint,hd as GetJobEndpoint,Cd as GetJobHealthchecksEndpoint,Od as GetJobPullrequestsEndpoint,Td as GetJobRunEndpoint,qd as GetJobRunsEndpoint,Bd as GetJobRuntimeenvironmentEndpoint,Fd as GetJobRuntimeenvironmentdetailsEndpoint,nc as GetLogsinkEndpoint,cc as GetNotificationEndpoint,Wd as GetPipelineEndpoint,Vd as GetPreviewtemplateEndpoint,Kd as GetPreviewtemplaterunEndpoint,Pc as GetProjectEndpoint,hc as GetRegistrycredentialsEndpoint,Xd as GetReleaseflowEndpoint,nl as GetReleaseflowrunEndpoint,ul as GetSecretEndpoint,hl as GetSecretdetailsEndpoint,pl as GetSecretlinkEndpoint,Al as GetServiceBranchesEndpoint,Dl as GetServiceBuildEndpoint,Ol as GetServiceBuildargumentdetailsEndpoint,kl as GetServiceBuildargumentsEndpoint,Rl as GetServiceBuildsEndpoint,Nl as GetServiceContainersEndpoint,Bl as GetServiceDeploymentEndpoint,Sl as GetServiceEndpoint,Fl as GetServiceHealthchecksEndpoint,Jl as GetServicePortsEndpoint,Wl as GetServicePullrequestsEndpoint,Hl as GetServiceRuntimeenvironmentEndpoint,Zl as GetServiceRuntimeenvironmentdetailsEndpoint,Vu as GetSubdomainEndpoint,up as GetTemplateEndpoint,fp as GetTemplaterunEndpoint,ep as GetVolumeEndpoint,Yc as ImportAddonBackupEndpoint,Rc as ListAddonsEndpoint,wc as ListBranchesEndpoint,_u as ListCloudClustersEndpoint,Cu as ListCloudDockerregistryEndpoint,xu as ListCloudIntegrationsEndpoint,Bu as ListCloudNodetypesEndpoint,Eu as ListCloudProvidersEndpoint,Lu as ListCloudRegionsEndpoint,Gu as ListDomainsEndpoint,ju as ListInvoicesEndpoint,ad as ListJobsEndpoint,ec as ListLogsinksEndpoint,ac as ListNotificationsEndpoint,zd as ListPipelinesEndpoint,jc as ListPlansEndpoint,Hd as ListPreviewtemplatepreviewsEndpoint,Zd as ListPreviewtemplaterunsEndpoint,Ic as ListProjectsEndpoint,ip as ListRegionsEndpoint,pc as ListRegistrycredentialsEndpoint,tl as ListReleaseflowrunsEndpoint,yc as ListReposEndpoint,ol as ListSecretsEndpoint,vl as ListServicesEndpoint,pp as ListTemplaterunsEndpoint,sp as ListTemplatesEndpoint,gc as ListVcsEndpoint,Xl as ListVolumesEndpoint,Ya as MetricType,ru as NorthflankApiCallError,nu as NorthflankExecCommand,mu as NorthflankLogFetch,yu as NorthflankMetricFetch,Qa as NorthflankPortForwarder,Oc as PatchAddonEndpoint,pu as PatchApiEndpoint,dd as PatchJobCronEndpoint,fd as PatchJobManualEndpoint,Sc as PatchProjectEndpoint,al as PatchSecretEndpoint,bl as PatchServiceBuildEndpoint,jl as PatchServiceCombinedEndpoint,_l as PatchServiceDeploymentEndpoint,Kc as PauseAddonEndpoint,Ud as PauseJobEndpoint,oc as PauseLogsinkEndpoint,Ml as PauseServiceEndpoint,cu as PostApiEndpoint,kc as PutAddonEndpoint,lu as PutApiEndpoint,cd as PutJobCronEndpoint,pd as PutJobManualEndpoint,_c as PutProjectEndpoint,sl as PutSecretEndpoint,gl as PutServiceBuildEndpoint,wl as PutServiceCombinedEndpoint,El as PutServiceDeploymentEndpoint,ed as ResetAddonEndpoint,td as RestartAddonEndpoint,Vl as RestartServiceEndpoint,zc as RestoreAddonBackupEndpoint,nd as ResumeAddonEndpoint,xd as ResumeJobEndpoint,ic as ResumeLogsinkEndpoint,$l as ResumeServiceEndpoint,Vc as RetainAddonBackupEndpoint,el as RunReleaseflowEndpoint,lp as RunTemplateEndpoint,rd as ScaleAddonEndpoint,Gd as ScaleJobEndpoint,Kl as ScaleServiceEndpoint,Xc as StartAddonPitrEndpoint,bd as StartJobBuildEndpoint,Dd as StartJobRunEndpoint,Cl as StartServiceBuildEndpoint,Jd as SuspendJobEndpoint,Yu as UnassignSubdomainEndpoint,Zc as UpdateAddonNetworksettingsEndpoint,od as UpdateAddonSecurityEndpoint,sd as UpdateAddonVersionEndpoint,Au as UpdateCloudClusterEndpoint,Tu as UpdateCloudIntegrationEndpoint,wd as UpdateJobBuildargumentsEndpoint,Id as UpdateJobBuildoptionsEndpoint,Ed as UpdateJobBuildsourceEndpoint,Rd as UpdateJobDeploymentEndpoint,kd as UpdateJobHealthchecksEndpoint,Ld as UpdateJobRuntimeenvironmentEndpoint,Md as UpdateJobSettingsEndpoint,sc as UpdateLogsinkEndpoint,dc as UpdateNotificationEndpoint,$d as UpdatePreviewtemplateEndpoint,mc as UpdateRegistrycredentialsEndpoint,Qd as UpdateReleaseflowEndpoint,dl as UpdateSecretEndpoint,ll as UpdateSecretlinkEndpoint,Ul as UpdateServiceBuildargumentsEndpoint,xl as UpdateServiceBuildoptionsEndpoint,ql as UpdateServiceBuildsourceEndpoint,Ll as UpdateServiceDeploymentEndpoint,Gl as UpdateServiceHealthchecksEndpoint,zl as UpdateServicePortsEndpoint,Yl as UpdateServiceRuntimeenvironmentEndpoint,cp as UpdateTemplateEndpoint,tp as UpdateVolumeEndpoint,Qu as VerifyDomainEndpoint,Xu as VerifySubdomainEndpoint};