@northflank/js-client 0.7.27 → 0.8.1

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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("events"),t=require("child_process"),n=require("stream"),r=require("os"),o=require("net"),i=require("fs"),s=require("path"),a=require("https"),c=require("http"),u=require("tls"),d=require("crypto"),l=require("url"),p=require("zlib"),f=require("buffer"),h=require("dgram");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var g=v(e),b=v(n),w=m(n),y=v(r),I=v(o),j=m(o),E=v(i),R=v(s),C=v(a),U=v(c),_=v(u),S=v(d),P=v(l),x=v(p),k=v(f),A=v(h),q=function(e,t){return q=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])},q(e,t)};function O(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}q(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var G=function(){return G=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},G.apply(this,arguments)};function N(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function T(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}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,c])}}}function L(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 D="object"==typeof global&&global&&global.Object===Object&&global,B="object"==typeof self&&self&&self.Object===Object&&self,J=D||B||Function("return this")(),F=J.Symbol,M=Object.prototype,W=M.hasOwnProperty,V=M.toString,z=F?F.toStringTag:void 0;var $=Object.prototype.toString;var H=F?F.toStringTag:void 0;function Y(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":H&&H in Object(e)?function(e){var t=W.call(e,z),n=e[z];try{e[z]=void 0;var r=!0}catch(e){}var o=V.call(e);return r&&(t?e[z]=n:delete e[z]),o}(e):function(e){return $.call(e)}(e)}function X(e){return null!=e&&"object"==typeof e}function K(e){return"symbol"==typeof e||X(e)&&"[object Symbol]"==Y(e)}function Z(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 Q=Array.isArray,ee=F?F.prototype:void 0,te=ee?ee.toString:void 0;function ne(e){if("string"==typeof e)return e;if(Q(e))return Z(e,ne)+"";if(K(e))return te?te.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function oe(e){return e}function ie(e){if(!re(e))return!1;var t=Y(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var se,ae=J["__core-js_shared__"],ce=(se=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||""))?"Symbol(src)_1."+se:"";var ue=Function.prototype.toString;function de(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var le=/^\[object .+?Constructor\]$/,pe=Function.prototype,fe=Object.prototype,he=pe.toString,ve=fe.hasOwnProperty,me=RegExp("^"+he.call(ve).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ge(e){return!(!re(e)||(t=e,ce&&ce in t))&&(ie(e)?me:le).test(de(e));var t}function be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ge(n)?n:void 0}var we=be(J,"WeakMap"),ye=Object.create,Ie=function(){function e(){}return function(t){if(!re(t))return{};if(ye)return ye(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var je=Date.now;var Ee,Re,Ce,Ue=function(){try{var e=be(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),_e=Ue,Se=_e?function(e,t){return _e(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:oe,Pe=(Ee=Se,Re=0,Ce=0,function(){var e=je(),t=16-(e-Ce);if(Ce=e,t>0){if(++Re>=800)return arguments[0]}else Re=0;return Ee.apply(void 0,arguments)}),xe=/^(?:0|[1-9]\d*)$/;function ke(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&xe.test(e))&&e>-1&&e%1==0&&e<t}function Ae(e,t,n){"__proto__"==t&&_e?_e(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qe(e,t){return e===t||e!=e&&t!=t}var Oe=Object.prototype.hasOwnProperty;function Ge(e,t,n){var r=e[t];Oe.call(e,t)&&qe(r,n)&&(void 0!==n||t in e)||Ae(e,t,n)}var Ne=Math.max;function Te(e,t){return Pe(function(e,t,n){return t=Ne(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Ne(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,oe),e+"")}function Le(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function De(e){return null!=e&&Le(e.length)&&!ie(e)}var Be=Object.prototype;function Je(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Be)}function Fe(e){return X(e)&&"[object Arguments]"==Y(e)}var Me=Object.prototype,We=Me.hasOwnProperty,Ve=Me.propertyIsEnumerable,ze=Fe(function(){return arguments}())?Fe:function(e){return X(e)&&We.call(e,"callee")&&!Ve.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?J.Buffer:void 0,Xe=(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 Ze="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qe=Ze&&"object"==typeof module&&module&&!module.nodeType&&module,et=Qe&&Qe.exports===Ze&&D.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 X(e)&&Le(e.length)&&!!Ke[Y(e)]},ot=rt,it=Object.prototype.hasOwnProperty;function st(e,t){var n=Q(e),r=!n&&ze(e),o=!n&&!r&&Xe(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):[],c=a.length;for(var u in e)!t&&!it.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ke(u,c))||a.push(u);return a}function at(e,t){return function(n){return e(t(n))}}var ct=at(Object.keys,Object),ut=Object.prototype.hasOwnProperty;function dt(e){return De(e)?st(e):function(e){if(!Je(e))return ct(e);var t=[];for(var n in Object(e))ut.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var lt=Object.prototype.hasOwnProperty;function pt(e){if(!re(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Je(e),n=[];for(var r in e)("constructor"!=r||!t&&lt.call(e,r))&&n.push(r);return n}function ft(e){return De(e)?st(e,!0):pt(e)}var ht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vt=/^\w*$/;function mt(e,t){if(Q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!K(e))||(vt.test(e)||!ht.test(e)||null!=t&&e in Object(t))}var gt=be(Object,"create");var bt=Object.prototype.hasOwnProperty;var wt=Object.prototype.hasOwnProperty;function yt(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 It(e,t){for(var n=e.length;n--;)if(qe(e[n][0],t))return n;return-1}yt.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},yt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},yt.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},yt.prototype.has=function(e){var t=this.__data__;return gt?void 0!==t[e]:wt.call(t,e)},yt.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 jt=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=It(t,e);return!(n<0)&&(n==t.length-1?t.pop():jt.call(t,n,1),--this.size,!0)},Et.prototype.get=function(e){var t=this.__data__,n=It(t,e);return n<0?void 0:t[n][1]},Et.prototype.has=function(e){return It(this.__data__,e)>-1},Et.prototype.set=function(e,t){var n=this.__data__,r=It(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Rt=be(J,"Map");function Ct(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 Ut(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])}}Ut.prototype.clear=function(){this.size=0,this.__data__={hash:new yt,map:new(Rt||Et),string:new yt}},Ut.prototype.delete=function(e){var t=Ct(this,e).delete(e);return this.size-=t?1:0,t},Ut.prototype.get=function(e){return Ct(this,e).get(e)},Ut.prototype.has=function(e){return Ct(this,e).has(e)},Ut.prototype.set=function(e,t){var n=Ct(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function _t(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");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(_t.Cache||Ut),n}_t.Cache=Ut;var St=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/\\(\\)?/g,xt=function(e){var t=_t(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(St,(function(e,n,r,o){t.push(r?o.replace(Pt,"$1"):n||e)})),t})),kt=xt;function At(e){return null==e?"":ne(e)}function qt(e,t){return Q(e)?e:mt(e,t)?[e]:kt(At(e))}function Ot(e){if("string"==typeof e||K(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Gt(e,t){for(var n=0,r=(t=qt(t,e)).length;null!=e&&n<r;)e=e[Ot(t[n++])];return n&&n==r?e:void 0}function Nt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Tt=F?F.isConcatSpreadable:void 0;function Lt(e){return Q(e)||ze(e)||!!(Tt&&e&&e[Tt])}function Dt(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Lt),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?Dt(a,t-1,n,r,o):Nt(o,a):r||(o[o.length]=a)}return o}var Bt=at(Object.getPrototypeOf,Object),Jt=Function.prototype,Ft=Object.prototype,Mt=Jt.toString,Wt=Ft.hasOwnProperty,Vt=Mt.call(Object);function zt(e){var t=this.__data__=new Et(e);this.size=t.size}zt.prototype.clear=function(){this.__data__=new Et,this.size=0},zt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},zt.prototype.get=function(e){return this.__data__.get(e)},zt.prototype.has=function(e){return this.__data__.has(e)},zt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Et){var r=n.__data__;if(!Rt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ut(r)}return n.set(e,t),this.size=n.size,this};var $t="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ht=$t&&"object"==typeof module&&module&&!module.nodeType&&module,Yt=Ht&&Ht.exports===$t?J.Buffer:void 0,Xt=Yt?Yt.allocUnsafe:void 0;var Kt=Object.prototype.propertyIsEnumerable,Zt=Object.getOwnPropertySymbols,Qt=Zt?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}(Zt(e),(function(t){return Kt.call(e,t)})))}:function(){return[]};function en(e){return function(e,t,n){var r=t(e);return Q(e)?r:Nt(r,n(e))}(e,dt,Qt)}var tn=be(J,"DataView"),nn=be(J,"Promise"),rn=be(J,"Set"),on="[object Map]",sn="[object Promise]",an="[object Set]",cn="[object WeakMap]",un="[object DataView]",dn=de(tn),ln=de(Rt),pn=de(nn),fn=de(rn),hn=de(we),vn=Y;(tn&&vn(new tn(new ArrayBuffer(1)))!=un||Rt&&vn(new Rt)!=on||nn&&vn(nn.resolve())!=sn||rn&&vn(new rn)!=an||we&&vn(new we)!=cn)&&(vn=function(e){var t=Y(e),n="[object Object]"==t?e.constructor:void 0,r=n?de(n):"";if(r)switch(r){case dn:return un;case ln:return on;case pn:return sn;case fn:return an;case hn:return cn}return t});var mn=vn,gn=J.Uint8Array;function bn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new gn(r).set(new gn(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function wn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ut;++t<n;)this.add(e[t])}function yn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}wn.prototype.add=wn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},wn.prototype.has=function(e){return this.__data__.has(e)};function In(e,t,n,r,o,i){var s=1&n,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var l=-1,p=!0,f=2&n?new wn: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(!yn(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 jn(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 Rn=F?F.prototype:void 0,Cn=Rn?Rn.valueOf:void 0;var Un=Object.prototype.hasOwnProperty;var _n="[object Arguments]",Sn="[object Array]",Pn="[object Object]",xn=Object.prototype.hasOwnProperty;function kn(e,t,n,r,o,i){var s=Q(e),a=Q(t),c=s?Sn:mn(e),u=a?Sn:mn(t),d=(c=c==_n?Pn:c)==Pn,l=(u=u==_n?Pn:u)==Pn,p=c==u;if(p&&Xe(e)){if(!Xe(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new zt),s||ot(e)?In(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new gn(e),new gn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return qe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=jn;case"[object Set]":var c=1&r;if(a||(a=En),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var d=In(a(e),a(t),r,o,i,s);return s.delete(e),d;case"[object Symbol]":if(Cn)return Cn.call(e)==Cn.call(t)}return!1}(e,t,c,n,r,o,i);if(!(1&n)){var f=d&&xn.call(e,"__wrapped__"),h=l&&xn.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new zt),o(v,m,n,r,i)}}return!!p&&(i||(i=new zt),function(e,t,n,r,o,i){var s=1&n,a=en(e),c=a.length;if(c!=en(t).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in t:Un.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;++u<c;){var v=e[d=a[u]],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,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function An(e,t,n,r,o){return e===t||(null==e||null==t||!X(e)&&!X(t)?e!=e&&t!=t:kn(e,t,n,r,An,o))}function qn(e){return e==e&&!re(e)}function On(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Gn(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,qn(o)]}return t}(e);return 1==t.length&&t[0][2]?On(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 c=(a=n[o])[0],u=e[c],d=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var l=new zt;if(r)var p=r(u,d,c,e,t,l);if(!(void 0===p?An(d,u,3,r,l):p))return!1}}return!0}(n,e,t)}}function Nn(e,t){return null!=e&&t in Object(e)}function Tn(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=Ot(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Le(o)&&ke(s,o)&&(Q(e)||ze(e))}(e,t,Nn)}function Ln(e,t){return mt(e)&&qn(t)?On(Ot(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Gt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?Tn(n,e):An(t,r,3)}}function Dn(e){return mt(e)?(t=Ot(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Gt(t,e)}}(e);var t}function Bn(e){return"function"==typeof e?e:null==e?oe:"object"==typeof e?Q(e)?Ln(e[0],e[1]):Gn(e):Dn(e)}var Jn,Fn=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[Jn?s:++r];if(!1===t(o[a],a,o))break}return e};var Mn=function(e,t){return function(n,r){if(null==n)return n;if(!De(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&&Fn(e,t,dt)})),Wn=Mn;function Vn(e,t,n){(void 0!==n&&!qe(e[t],n)||void 0===n&&!(t in e))&&Ae(e,t,n)}function zn(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function $n(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],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),o?Ae(n,a,c):Ge(n,a,c)}return n}(e,ft(e))}function Hn(e,t,n,r,o,i,s){var a=zn(e,n),c=zn(t,n),u=s.get(c);if(u)Vn(e,n,u);else{var d,l=i?i(a,c,n+"",e,t,s):void 0,p=void 0===l;if(p){var f=Q(c),h=!f&&Xe(c),v=!f&&!h&&ot(c);l=c,f||h||v?Q(a)?l=a:X(d=a)&&De(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=Xt?Xt(n):new e.constructor(n);return e.copy(r),r}(c,!0)):v?(p=!1,l=bn(c,!0)):l=[]:function(e){if(!X(e)||"[object Object]"!=Y(e))return!1;var t=Bt(e);if(null===t)return!0;var n=Wt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Mt.call(n)==Vt}(c)||ze(c)?(l=a,ze(a)?l=$n(a):re(a)&&!ie(a)||(l=function(e){return"function"!=typeof e.constructor||Je(e)?{}:Ie(Bt(e))}(c))):p=!1}p&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),Vn(e,n,l)}}function Yn(e,t,n,r,o){e!==t&&Fn(t,(function(i,s){if(o||(o=new zt),re(i))Hn(e,t,s,n,Yn,r,o);else{var a=r?r(zn(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),Vn(e,s,a)}}),ft)}var Xn=/[\\^$.*+?()[\]{}|]/g,Kn=RegExp(Xn.source);function Zn(e,t){var n=-1,r=De(e)?Array(e.length):[];return Wn(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Qn(e,t){return Dt(function(e,t){return(Q(e)?Z:Zn)(e,Bn(t))}(e,t),1)}var er=1/0;function tr(e,t){return e>t}function nr(e){return"string"==typeof e||!Q(e)&&X(e)&&"[object String]"==Y(e)}function rr(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&&!K(s):n(s,a)))var a=s,c=i}return c}(e,Bn(t),tr):void 0}var or,ir=(or=function(e,t,n){Yn(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=or.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!re(n))return!1;var r=typeof t;return!!("number"==r?De(n)&&ke(t,n.length):"string"==r&&t in n)&&qe(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&&or(e,s,n,o)}return e}))),sr=new Function("modulePath","return import(modulePath)"),ar=function(e,t){return N(void 0,void 0,void 0,(function(){return T(this,(function(n){switch(n.label){case 0:return[4,sr("node-fetch")];case 1:return[2,n.sent().default(e,t)]}}))}))};var cr="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,ur=function(e,t){return N(void 0,void 0,void 0,(function(){var n;return T(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)]}))}))},dr=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 O(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}(b.default.Writable),lr=function(){function e(e,t){this.contextProvider=e,this.agent=t}return e.prototype.getServiceDetails=function(e,t){return N(this,void 0,void 0,(function(){return T(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 N(this,void 0,void 0,(function(){return T(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 N(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return T(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=ir({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},G(G({},t),{agent:this.agent})),[4,Ns(2)((function(){return N(a,void 0,void 0,(function(){return T(this,(function(t){return[2,ar(e,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=c.sent()).ok?[3,3]:[4,o.text()];case 2:i=c.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,c.sent()]}}))}))},e}(),pr=function(e,t,n){return N(void 0,void 0,void 0,(function(){var r,o,i,s,a;return T(this,(function(c){switch(c.label){case 0:if(r=vr(t||"127.0.0.1"),(o=vr(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===y.default.platform()&&(i=function(e){return N(void 0,void 0,void 0,(function(){var t;return T(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,hr.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=o?(a=mr(s),[4,fr(e,a)]):[3,6];case 2:return c.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:c.sent(),c.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."))}}))}))},fr=function(e,t){return new Promise((function(n){var r=new o.Socket,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)}))},hr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(void 0,void 0,void 0,(function(){return T(this,(function(t){switch(t.label){case 0:return[4,gr("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},vr=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},mr=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(".")},gr=function(e,n,r){var o=t.spawn(e,n,G({windowsHide:!0},r)),i=new Promise((function(t,i){var s="",a="";(null===(null==r?void 0:r.stdio)||void 0===(null==r?void 0:r.stdio))&&(o.stdout&&o.stdout.on("data",(function(e){s+=e})),o.stderr&&o.stderr.on("data",(function(e){a+=e}))),o.on("close",(function(r){var o={code:r,stdout:s,stderr:a};if(0!==r){var c="Error during execution of command '".concat(e," ").concat(n.join(" "),"': ").concat(a);i({message:c,result:o})}else t(o)}))}));return{process:o,resultPromise:i}},br=function(e,t,n){return N(void 0,void 0,void 0,(function(){var r,o;return T(this,(function(i){switch(i.label){case 0:return r=wr(e,10),[4,E.default.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,E.default.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,E.default.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},wr=function(e,t){for(var n,r=R.default.dirname(e),o=R.default.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var s=L([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),c=R.default.join(r,a);if(!E.default.existsSync(c))return c}throw new Error("Could not write file to file '".concat(e,"'."))},yr="win32"===process.platform?"\r\n":"\n",Ir=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;Sr(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 Qn(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return Sr(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 Cr(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||X(t)&&"[object Number]"==Y(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return Sr(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=Rr(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?[jr(),Er(o),r]:[Er(o),r];this.insertAt.apply(this,L([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,L([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return G({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=Sr(t,"eol").map((function(e){return e.line}));return null!==(e=Pr(n))&&void 0!==e?e:yr}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=Qn(Sr(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=Pr(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(Ur(e),t)},e}(),jr=function(){return{type:"blank",line:""}},Er=function(e){return{type:"comment",line:Rr(e)}},Rr=function(e){return e.startsWith("#")?e:"# ".concat(e)},Cr=function(e,t){return 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""}})).join(null!=t?t:yr)},Ur=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}:_r(e)}))},_r=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=Qn(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}},Sr=function(e,t){return e.filter((function(e){return e.type===t}))},Pr=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=rr(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},xr="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",kr=function(){function e(e){this.ast=Ir.fromNodes([]);var t={writeMode:"atomic",hostsFile:xr};this.config=G(G({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!nr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!nr(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(!nr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!nr(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(!nr(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(!nr(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 N(this,void 0,void 0,(function(){var e;return T(this,(function(t){switch(t.label){case 0:return[4,E.default.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=Ir.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return N(this,void 0,void 0,(function(){var t,n,r,o;return T(this,(function(i){switch(i.label){case 0:switch(t=G(G({},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,br(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,E.default.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return N(this,void 0,void 0,(function(){var t,n,r,o;return T(this,(function(i){switch(i.label){case 0:return E.default.existsSync(this.config.hostsFile)?(t=R.default.dirname(this.config.hostsFile),n=R.default.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=R.default.resolve(t,r),E.default.existsSync(o)&&!e.rewrite?[3,2]:[4,E.default.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return N(this,void 0,void 0,(function(){return T(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),Ar=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 N(this,void 0,void 0,(function(){var t,n=this;return T(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}(),qr=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 Or=qr(Nr),Gr=qr(Tr);function Nr(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Tr(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}Nr.proto=Nr((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Nr(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Tr(this)},configurable:!0})})),Or.strict=Gr;var Lr,Dr=function(){},Br=function(e,t,n){if("function"==typeof t)return Br(e,null,t);t||(t={}),n=Or(n||Dr);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,c=function(){e.writable||u()},u=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",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?s&&!r&&(e.on("end",c),e.on("close",c)):(e.on("complete",u),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",u),!1!==t.error&&e.on("error",p),e.on("close",f),function(){a=!0,e.removeListener("complete",u),e.removeListener("abort",f),e.removeListener("request",v),e.req&&e.req.removeListener("finish",u),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",u),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",p),e.removeListener("close",f)}},Jr=Br;try{Lr=E.default}catch(e){}var Fr=function(){},Mr=/^v?\.0/.test(process.version),Wr=function(e){return"function"==typeof e},Vr=function(e,t,n,r){r=Or(r);var o=!1;e.on("close",(function(){o=!0})),Jr(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!!Mr&&!!Lr&&(e instanceof(Lr.ReadStream||Fr)||e instanceof(Lr.WriteStream||Fr))&&Wr(e.close)}(e)?e.close(Fr):function(e){return e.setHeader&&Wr(e.abort)}(e)?e.abort():Wr(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},zr=function(e){e()},$r=function(e,t){return e.pipe(t)},Hr=function(){var e,t=Array.prototype.slice.call(arguments),n=Wr(t[t.length-1]||Fr)&&t.pop()||Fr;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 Vr(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(zr),s||(r.forEach(zr),n(e))}))}));return t.reduce($r)};function Yr(e,t){return e(t={exports:{}},t.exports),t.exports}const Xr=["nodebuffer","arraybuffer","fragments"],Kr="undefined"!=typeof Blob;Kr&&Xr.push("blob");var Zr={BINARY_TYPES:Xr,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Kr,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},Qr="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},eo=process.config&&process.config.variables||{},to=!!process.env.PREBUILDS_ONLY,no=process.versions.modules,ro=!(!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",oo=process.env.npm_config_arch||y.default.arch(),io=process.env.npm_config_platform||y.default.platform(),so=process.env.LIBC||(function(e){return"linux"===e&&E.default.existsSync("/etc/alpine-release")}(io)?"musl":"glibc"),ao=process.env.ARM_VERSION||("arm64"===oo?"8":eo.arm_version)||"",co=(process.versions.uv||"").split(".")[0],uo=lo;function lo(e){return Qr(lo.path(e))}function po(e){try{return E.default.readdirSync(e)}catch(e){return[]}}function fo(e,t){var n=po(e).filter(t);return n[0]&&R.default.join(e,n[0])}function ho(e){return/\.node$/.test(e)}function vo(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 mo(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function go(e,t){return e.architectures.length-t.architectures.length}function bo(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 wo(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===co)&&((!n.armv||n.armv===ao)&&(!n.libc||n.libc===so)))))}}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}}lo.path=function(e){e=R.default.resolve(e||".");try{var t=Qr(R.default.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!to){var n=fo(R.default.join(e,"build/Release"),ho);if(n)return n;var r=fo(R.default.join(e,"build/Debug"),ho);if(r)return r}var o=a(e);if(o)return o;var i=a(R.default.dirname(process.execPath));if(i)return i;var s=["platform="+io,"arch="+oo,"runtime="+ro,"abi="+no,"uv="+co,ao?"armv="+ao:"","libc="+so,"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=po(R.default.join(e,"prebuilds")).map(vo).filter(mo(io,oo)).sort(go)[0];if(t){var n=R.default.join(e,"prebuilds",t.name),r=po(n).map(bo).filter(wo(ro,no)).sort(yo(ro))[0];return r?R.default.join(n,r.file):void 0}}},lo.parseTags=bo,lo.matchTags=wo,lo.compareTags=yo,lo.parseTuple=vo,lo.matchTuple=mo,lo.compareTuples=go;var Io={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]}},jo=Yr((function(e){try{e.exports=uo(__dirname)}catch(t){e.exports=Io}})),Eo=Yr((function(e){const{EMPTY_BUFFER:t}=Zr,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=jo;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){}}));Eo.concat,Eo.mask,Eo.toArrayBuffer,Eo.toBuffer,Eo.unmask;const Ro=Symbol("kDone"),Co=Symbol("kRun");var Uo=class{constructor(e){this[Ro]=()=>{this.pending--,this[Co]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Co]()}[Co](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[Ro])}}};const{kStatusCode:_o}=Zr,So=Buffer[Symbol.species],Po=Buffer.from([0,0,255,255]),xo=Symbol("permessage-deflate"),ko=Symbol("total-length"),Ao=Symbol("callback"),qo=Symbol("buffers"),Oo=Symbol("error");let Go;var No=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,!Go){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Go=new Uo(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[Ao];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){Go.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){Go.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]?x.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=x.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[xo]=this,this._inflate[ko]=0,this._inflate[qo]=[],this._inflate.on("error",Do),this._inflate.on("data",Lo)}this._inflate[Ao]=n,this._inflate.write(e),t&&this._inflate.write(Po),this._inflate.flush((()=>{const e=this._inflate[Oo];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=Eo.concat(this._inflate[qo],this._inflate[ko]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ko]=0,this._inflate[qo]=[],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]?x.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=x.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[ko]=0,this._deflate[qo]=[],this._deflate.on("data",To)}this._deflate[Ao]=n,this._deflate.write(e),this._deflate.flush(x.default.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=Eo.concat(this._deflate[qo],this._deflate[ko]);t&&(e=new So(e.buffer,e.byteOffset,e.length-4)),this._deflate[Ao]=null,this._deflate[ko]=0,this._deflate[qo]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function To(e){this[qo].push(e),this[ko]+=e.length}function Lo(e){this[ko]+=e.length,this[xo]._maxPayload<1||this[ko]<=this[xo]._maxPayload?this[qo].push(e):(this[Oo]=new RangeError("Max payload size exceeded"),this[Oo].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Oo][_o]=1009,this.removeListener("data",Lo),this.reset())}function Do(e){this[xo]._inflate=null,e[_o]=1007,this[Ao](e)}var Bo=function(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])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}else n++;return!0},Jo=Yr((function(e){try{e.exports=uo(__dirname)}catch(t){e.exports=Bo}})),Fo=Yr((function(e){const{isUtf8:t}=k.default,{hasBlob:n}=Zr;function r(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])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}else n++;return!0}if(e.exports={isBlob:function(e){return n&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:r,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?r(e):t(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const t=Jo;e.exports.isValidUTF8=function(e){return e.length<32?r(e):t(e)}}catch(e){}}));Fo.isBlob,Fo.isValidStatusCode,Fo.isValidUTF8,Fo.tokenChars;const{Writable:Mo}=b.default,{BINARY_TYPES:Wo,EMPTY_BUFFER:Vo,kStatusCode:zo,kWebSocket:$o}=Zr,{concat:Ho,toArrayBuffer:Yo,unmask:Xo}=Eo,{isValidStatusCode:Ko,isValidUTF8:Zo}=Fo,Qo=Buffer[Symbol.species];var ei=class extends Mo{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||Wo[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[$o]=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._errored=!1,this._loop=!1,this._state=0}_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 Qo(t.buffer,t.byteOffset+e,t.length-e),new Qo(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 Qo(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do{switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(48&t[0]){return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~t[0]);if(!n||this._extensions[No.extensionName]){if(this._fin=!(128&~t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void e(this.createError(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 void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void e(this.createError(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&~t[1]),this._isServer){if(!this._masked){return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}else{e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else 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=Vo;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Xo(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else{if(this._compressed)return this._state=5,void this.decompress(t,e);t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}}decompress(e,t){this._extensions[No.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){const e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void t(e)}this._fragments.push(n)}this.dataMessage(t),0===this._state&&this.startLoop(t)}))}dataMessage(e){if(!this._fin)return void(this._state=0);const t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?Ho(n,t):"arraybuffer"===this._binaryType?Yo(Ho(n,t)):"blob"===this._binaryType?new Blob(n):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(e)})))}else{const r=Ho(n,t);if(!this._skipUTF8Validation&&!Zo(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(e)})))}}controlMessage(e,t){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)})));else{if(0===e.length)this._loop=!1,this.emit("conclude",1005,Vo),this.end();else{const n=e.readUInt16BE(0);if(!Ko(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new Qo(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Zo(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(e,t,n,r,o){this._loop=!1,this._errored=!0;const i=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,this.createError),i.code=o,i[zo]=r,i}};const{randomFillSync:ti}=S.default,{EMPTY_BUFFER:ni,kWebSocket:ri,NOOP:oi}=Zr,{isBlob:ii,isValidStatusCode:si}=Fo,{mask:ai,toBuffer:ci}=Eo,ui=Symbol("kByteLength"),di=Buffer.alloc(4),li=8192;let pi,fi=li;class hi{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._queue=[],this._state=0,this.onerror=oi,this[ri]=void 0}static frame(e,t){let n,r,o=!1,i=2,s=!1;t.mask&&(n=t.maskBuffer||di,t.generateMask?t.generateMask(n):(fi===li&&(void 0===pi&&(pi=Buffer.alloc(li)),ti(pi,0,li),fi=0),n[0]=pi[fi++],n[1]=pi[fi++],n[2]=pi[fi++],n[3]=pi[fi++]),s=!(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[ui]?(e=Buffer.from(e)).length:t[ui]:(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 c=Buffer.allocUnsafe(o?r+i:i);return c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=a,126===a?c.writeUInt16BE(r,2):127===a&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),t.mask?(c[1]|=128,c[i-4]=n[0],c[i-3]=n[1],c[i-2]=n[2],c[i-1]=n[3],s?[c,e]:o?(ai(e,n,c,i,r),[c]):(ai(e,n,e,0,r),[c,e])):[c,e]}close(e,t,n,r){let o;if(void 0===e)o=ni;else{if("number"!=typeof e||!si(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={[ui]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(hi.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):ii(e)?(r=e.size,o=!1):(r=(e=ci(e)).length,o=ci.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[ui]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};ii(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,i,n]):this.getBlobData(e,!1,i,n):0!==this._state?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(hi.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):ii(e)?(r=e.size,o=!1):(r=(e=ci(e)).length,o=ci.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[ui]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};ii(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,i,n]):this.getBlobData(e,!1,i,n):0!==this._state?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(hi.frame(e,i),n)}send(e,t,n){const r=this._extensions[No.extensionName];let o,i,s=t.binary?2:1,a=t.compress;"string"==typeof e?(o=Buffer.byteLength(e),i=!1):ii(e)?(o=e.size,i=!1):(o=(e=ci(e)).length,i=ci.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);const c={[ui]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};ii(e)?0!==this._state?this.enqueue([this.getBlobData,e,this._compress,c,n]):this.getBlobData(e,this._compress,c,n):0!==this._state?this.enqueue([this.dispatch,e,this._compress,c,n]):this.dispatch(e,this._compress,c,n)}getBlobData(e,t,n,r){this._bufferedBytes+=n[ui],this._state=2,e.arrayBuffer().then((e=>{if(this._socket.destroyed){const e=new Error("The socket was closed while the blob was being read");return void process.nextTick(mi,this,e,r)}this._bufferedBytes-=n[ui];const o=ci(e);t?this.dispatch(o,t,n,r):(this._state=0,this.sendFrame(hi.frame(o,n),r),this.dequeue())})).catch((e=>{process.nextTick(gi,this,e,r)}))}dispatch(e,t,n,r){if(!t)return void this.sendFrame(hi.frame(e,n),r);const o=this._extensions[No.extensionName];this._bufferedBytes+=n[ui],this._state=1,o.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){mi(this,new Error("The socket was closed while data was being compressed"),r)}else this._bufferedBytes-=n[ui],this._state=0,n.readOnly=!1,this.sendFrame(hi.frame(t,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][ui],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][ui],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 vi=hi;function mi(e,t,n){"function"==typeof n&&n(t);for(let n=0;n<e._queue.length;n++){const r=e._queue[n],o=r[r.length-1];"function"==typeof o&&o(t)}}function gi(e,t,n){mi(e,t,n),e.onerror(t)}const{kForOnEventAttribute:bi,kListener:wi}=Zr,yi=Symbol("kCode"),Ii=Symbol("kData"),ji=Symbol("kError"),Ei=Symbol("kMessage"),Ri=Symbol("kReason"),Ci=Symbol("kTarget"),Ui=Symbol("kType"),_i=Symbol("kWasClean");class Si{constructor(e){this[Ci]=null,this[Ui]=e}get target(){return this[Ci]}get type(){return this[Ui]}}Object.defineProperty(Si.prototype,"target",{enumerable:!0}),Object.defineProperty(Si.prototype,"type",{enumerable:!0});class Pi extends Si{constructor(e,t={}){super(e),this[yi]=void 0===t.code?0:t.code,this[Ri]=void 0===t.reason?"":t.reason,this[_i]=void 0!==t.wasClean&&t.wasClean}get code(){return this[yi]}get reason(){return this[Ri]}get wasClean(){return this[_i]}}Object.defineProperty(Pi.prototype,"code",{enumerable:!0}),Object.defineProperty(Pi.prototype,"reason",{enumerable:!0}),Object.defineProperty(Pi.prototype,"wasClean",{enumerable:!0});class xi extends Si{constructor(e,t={}){super(e),this[ji]=void 0===t.error?null:t.error,this[Ei]=void 0===t.message?"":t.message}get error(){return this[ji]}get message(){return this[Ei]}}Object.defineProperty(xi.prototype,"error",{enumerable:!0}),Object.defineProperty(xi.prototype,"message",{enumerable:!0});class ki extends Si{constructor(e,t={}){super(e),this[Ii]=void 0===t.data?null:t.data}get data(){return this[Ii]}}Object.defineProperty(ki.prototype,"data",{enumerable:!0});const Ai={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[bi]&&r[wi]===t&&!r[bi])return;let r;if("message"===e)r=function(e,n){const r=new ki("message",{data:n?e:e.toString()});r[Ci]=this,Oi(t,this,r)};else if("close"===e)r=function(e,n){const r=new Pi("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Ci]=this,Oi(t,this,r)};else if("error"===e)r=function(e){const n=new xi("error",{error:e,message:e.message});n[Ci]=this,Oi(t,this,n)};else{if("open"!==e)return;r=function(){const e=new Si("open");e[Ci]=this,Oi(t,this,e)}}r[bi]=!!n[bi],r[wi]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[wi]===t&&!n[bi]){this.removeListener(e,n);break}}};var qi={CloseEvent:Pi,ErrorEvent:xi,Event:Si,EventTarget:Ai,MessageEvent:ki};function Oi(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:Gi}=Fo;function Ni(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var Ti={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,c=-1,u=-1,d=-1,l=0;for(;l<e.length;l++)if(u=e.charCodeAt(l),void 0===n)if(-1===d&&1===Gi[u])-1===c&&(c=l);else if(0===l||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(c,d);44===u?(Ni(t,r,o),o=Object.create(null)):n=r,c=d=-1}}else-1===d&&-1!==c&&(d=l);else if(void 0===r)if(-1===d&&1===Gi[u])-1===c&&(c=l);else if(32===u||9===u)-1===d&&-1!==c&&(d=l);else if(59===u||44===u){if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),Ni(o,e.slice(c,d),!0),44===u&&(Ni(t,n,o),o=Object.create(null),n=void 0),c=d=-1}else{if(61!==u||-1===c||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(c,l),c=d=-1}else if(s){if(1!==Gi[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),s=!1}else if(a)if(1===Gi[u])-1===c&&(c=l);else if(34===u&&-1!==c)a=!1,d=l;else{if(92!==u)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===u&&61===e.charCodeAt(l-1))a=!0;else if(-1===d&&1===Gi[u])-1===c&&(c=l);else if(-1===c||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=e.slice(c,d);i&&(s=s.replace(/\\/g,""),i=!1),Ni(o,r,s),44===u&&(Ni(t,n,o),o=Object.create(null),n=void 0),r=void 0,c=d=-1}}else-1===d&&(d=l);if(-1===c||a||32===u||9===u)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=e.slice(c,d);return void 0===n?Ni(t,p,o):(void 0===r?Ni(o,p,!0):Ni(o,r,i?p.replace(/\\/g,""):p),Ni(t,n,o)),t}};const{randomBytes:Li,createHash:Di}=S.default,{URL:Bi}=P.default,{isBlob:Ji}=Fo,{BINARY_TYPES:Fi,EMPTY_BUFFER:Mi,GUID:Wi,kForOnEventAttribute:Vi,kListener:zi,kStatusCode:$i,kWebSocket:Hi,NOOP:Yi}=Zr,{EventTarget:{addEventListener:Xi,removeEventListener:Ki}}=qi,{format:Zi,parse:Qi}=Ti,{toBuffer:es}=Eo,ts=Symbol("kAborted"),ns=[8,13],rs=["CONNECTING","OPEN","CLOSING","CLOSED"],os=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class is extends g.default{constructor(e,t,n){super(),this._binaryType=Fi[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Mi,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=is.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]),as(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Fi.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 ei({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new vi(e,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[Hi]=this,o[Hi]=this,e[Hi]=this,r.on("conclude",fs),r.on("drain",hs),r.on("error",vs),r.on("message",gs),r.on("ping",bs),r.on("pong",ws),o.onerror=Is,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Es),e.on("data",Rs),e.on("end",Cs),e.on("error",Us),this._readyState=is.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=is.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[No.extensionName]&&this._extensions[No.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=is.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==is.CLOSED)if(this.readyState!==is.CONNECTING)this.readyState!==is.CLOSING?(this._readyState=is.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),js(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";ls(this,this._req,e)}}pause(){this.readyState!==is.CONNECTING&&this.readyState!==is.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===is.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===is.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||Mi,t,n)):ps(this,e,n)}pong(e,t,n){if(this.readyState===is.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===is.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||Mi,t,n)):ps(this,e,n)}resume(){this.readyState!==is.CONNECTING&&this.readyState!==is.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===is.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!==is.OPEN)return void ps(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[No.extensionName]||(r.compress=!1),this._sender.send(e||Mi,r,n)}terminate(){if(this.readyState!==is.CLOSED)if(this.readyState!==is.CONNECTING)this._socket&&(this._readyState=is.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";ls(this,this._req,e)}}}Object.defineProperty(is,"CONNECTING",{enumerable:!0,value:rs.indexOf("CONNECTING")}),Object.defineProperty(is.prototype,"CONNECTING",{enumerable:!0,value:rs.indexOf("CONNECTING")}),Object.defineProperty(is,"OPEN",{enumerable:!0,value:rs.indexOf("OPEN")}),Object.defineProperty(is.prototype,"OPEN",{enumerable:!0,value:rs.indexOf("OPEN")}),Object.defineProperty(is,"CLOSING",{enumerable:!0,value:rs.indexOf("CLOSING")}),Object.defineProperty(is.prototype,"CLOSING",{enumerable:!0,value:rs.indexOf("CLOSING")}),Object.defineProperty(is,"CLOSED",{enumerable:!0,value:rs.indexOf("CLOSED")}),Object.defineProperty(is.prototype,"CLOSED",{enumerable:!0,value:rs.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(is.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(is.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[Vi])return t[zi];return null},set(t){for(const t of this.listeners(e))if(t[Vi]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[Vi]:!0})}})})),is.prototype.addEventListener=Xi,is.prototype.removeEventListener=Ki;var ss=is;function as(e,t,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:ns[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,!ns.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${ns.join(", ")})`);let i;if(t instanceof Bi)i=t;else try{i=new Bi(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),e._url=i.href;const s="wss:"===i.protocol,a="ws+unix:"===i.protocol;let c;if("ws:"===i.protocol||s||a?a&&!i.pathname?c="The URL's pathname is empty":i.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',c){const t=new SyntaxError(c);if(0===e._redirects)throw t;return void cs(e,t)}const u=s?443:80,d=Li(16).toString("base64"),l=s?C.default.request:U.default.request,p=new Set;let f,h;if(o.createConnection=o.createConnection||(s?ds:us),o.defaultPort=o.defaultPort||u,o.port=i.port||u,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":d,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(f=new No(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=Zi({[No.extensionName]:f.offer()})),n.length){for(const e of n){if("string"!=typeof e||!os.test(e)||p.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.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),(i.username||i.password)&&(o.auth=`${i.username}:${i.password}`),a){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=a,e._originalSecure=s,e._originalHostOrSocketPath=a?o.socketPath:i.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=a?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&i.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!s)&&(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")),h=e._req=l(o),e._redirects&&e.emit("redirect",e.url,h)}else h=e._req=l(o);o.timeout&&h.on("timeout",(()=>{ls(e,h,"Opening handshake has timed out")})),h.on("error",(t=>{null===h||h[ts]||(h=e._req=null,cs(e,t))})),h.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 ls(e,h,"Maximum redirects exceeded");let i;h.abort();try{i=new Bi(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void cs(e,n)}as(e,i,n,r)}else e.emit("unexpected-response",h,i)||ls(e,h,`Unexpected server response: ${i.statusCode}`)})),h.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==is.CONNECTING)return;h=e._req=null;const i=t.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void ls(e,n,"Invalid Upgrade header");const s=Di("sha1").update(d+Wi).digest("base64");if(t.headers["sec-websocket-accept"]!==s)return void ls(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let c;if(void 0!==a?p.size?p.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":p.size&&(c="Server sent no subprotocol"),c)return void ls(e,n,c);a&&(e._protocol=a);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!f){return void ls(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=Qi(u)}catch(t){return void ls(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==No.extensionName){return void ls(e,n,"Server indicated an extension that was not requested")}try{f.accept(t[No.extensionName])}catch(t){return void ls(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[No.extensionName]=f}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(h,e):h.end()}function cs(e,t){e._readyState=is.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function us(e){return e.path=e.socketPath,I.default.connect(e)}function ds(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=I.default.isIP(e.host)?"":e.host),_.default.connect(e)}function ls(e,t,n){e._readyState=is.CLOSING;const r=new Error(n);Error.captureStackTrace(r,ls),t.setHeader?(t[ts]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(cs,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function ps(e,t,n){if(t){const n=Ji(t)?t.size:es(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${rs[e.readyState]})`);process.nextTick(n,t)}}function fs(e,t){const n=this[Hi];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[Hi]&&(n._socket.removeListener("data",Rs),process.nextTick(ys,n._socket),1005===e?n.close():n.close(e,t))}function hs(){const e=this[Hi];e.isPaused||e._socket.resume()}function vs(e){const t=this[Hi];void 0!==t._socket[Hi]&&(t._socket.removeListener("data",Rs),process.nextTick(ys,t._socket),t.close(e[$i])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function ms(){this[Hi].emitClose()}function gs(e,t){this[Hi].emit("message",e,t)}function bs(e){const t=this[Hi];t._autoPong&&t.pong(e,!this._isServer,Yi),t.emit("ping",e)}function ws(e){this[Hi].emit("pong",e)}function ys(e){e.resume()}function Is(e){const t=this[Hi];t.readyState!==is.CLOSED&&(t.readyState===is.OPEN&&(t._readyState=is.CLOSING,js(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function js(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),3e4)}function Es(){const e=this[Hi];let t;this.removeListener("close",Es),this.removeListener("data",Rs),this.removeListener("end",Cs),e._readyState=is.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[Hi]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",ms),e._receiver.on("finish",ms))}function Rs(e){this[Hi]._receiver.write(e)||this.pause()}function Cs(){const e=this[Hi];e._readyState=is.CLOSING,e._receiver.end(),this.end()}function Us(){const e=this[Hi];this.removeListener("error",Us),this.on("error",Yi),e&&(e._readyState=is.CLOSING,this.destroy())}const{Duplex:_s}=b.default;function Ss(e){e.emit("close")}function Ps(){!this.destroyed&&this._writableState.finished&&this.destroy()}function xs(e){this.removeListener("error",xs),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var ks,As=function(e,t){let n=!0;const r=new _s({...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(Ss,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(Ss,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",Ps),r.on("error",xs),r},qs=function(e){function t(t,n,r,o,i,s){void 0===s&&(s=5e3);var a=e.call(this)||this;a.endpoint=t,a.headers=n,a.rewriteHostHeader=r,a.bindToAssign=o,a.agent=i,a.closeTimeout=s,a.protocol="TCP",a.openConnections=new Set,a.tcpServer=j.createServer(a.handleConnection.bind(a));var c=null==r?void 0:r.altHostnames.map((function(e){return(t=At(t=e))&&Kn.test(t)?t.replace(Xn,"\\$&"):t;var t})).join("|");return a.hostRegex=new RegExp("Host: (?:".concat(c,")(:.*$|$)"),"im"),a}return O(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 N(this,void 0,void 0,(function(){var e=this;return T(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 N(this,void 0,void 0,(function(){var e,t=this;return T(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=this.endpoint.replace("https:","wss:"),r=new ss(n,{headers:this.headers,agent:this.agent}),o=As(r),i=this.getHeaderTransform();this.rewriteHostHeader&&i?Hr(e,i,o):Hr(e,o),Hr(o,e),r.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),o.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 n.Transform({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}(e.EventEmitter),Os=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.endpoint=t,i.headers=n,i.bindToAssign=r,i.agent=o,i.protocol="UDP",i.udpSocket=A.default.createSocket("udp4"),i.handleConnection(),i}return O(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 N(this,void 0,void 0,(function(){var e=this;return T(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 N(this,void 0,void 0,(function(){var e=this;return T(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=this.endpoint.replace("https:","wss:"),r=new ss(n,{headers:this.headers,agent:this.agent}),o=As(r);this.udpSocket.on("message",(function(t,n){e=n,o.write(t)})),o.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)})),o.on("error",(function(e){t.emit("connection-error",e)})),r.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(e.EventEmitter),Gs=function(e){function n(n,r,o,i){var s=e.call(this)||this;return s.contextProvider=n,s.listServices=r,s.listAddons=o,s.agent=i,s.connections=[],s.hostsFileMutex=new Ar,s.ipAllocationMutex=new Ar,s.stopForwarding=function(e){return N(s,void 0,void 0,(function(){var t,n,r,o,i,s,a;return T(this,(function(c){switch(c.label){case 0:return[4,e.tunnel.close()];case 1:return c.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:c.sent(),c.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]}}))}))},s.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 t.execSync("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return t.execSync("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},s.assertStartedWithNodejs=function(){if(!cr)throw new Error("Port forwarding only possible when started with nodejs")},s.proxyApiClient=new lr(n,i),s}return O(n,e),n.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),N(this,void 0,void 0,(function(){var r;return T(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]}}))}))},n.prototype.forwardProject=function(e,t){return void 0===t&&(t=!0),N(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return T(this,(function(c){switch(c.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=c.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return o=c.sent(),[4,Promise.all(r.data.services.map((function(e){return N(a,void 0,void 0,(function(){return T(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return i=c.sent(),[4,Promise.all(o.data.addons.map((function(e){return N(a,void 0,void 0,(function(){return T(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=c.sent(),[2,{services:i,addons:s}]}}))}))},n.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),N(this,void 0,void 0,(function(){var r;return T(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]}}))}))},n.prototype.forwardService=function(e,t){return void 0===t&&(t=!0),N(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u=this;return T(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,c=o.ports,0===a.length?[2,[]]:[4,ur(c,(function(e){var o,c="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=L([d],l,!0);return u.forwardPort(c,e,p,"service",r,n,t,o)}))];case 2:return[2,d.sent()]}}))}))},n.prototype.withAddonForwarding=function(e,t,n){return void 0===n&&(n=!0),N(this,void 0,void 0,(function(){var r;return T(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]}}))}))},n.prototype.forwardAddon=function(e,t){return void 0===t&&(t=!0),N(this,void 0,void 0,(function(){var n,r,o,i,s=this;return T(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,ur((c=i,null!=c&&c.length?Dt(c,er):[]),(function(e){var i=e.podName,a=e.internalHostname,c=e.port;return N(s,void 0,void 0,(function(){var e;return T(this,(function(s){return e="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(c.internalPort),[2,this.forwardPort(e,c,[a],"addon",n,r,t)]}))}))}))];case 2:return[2,a.sent()]}var c}))}))},n.prototype.allocateIpAddress=function(e){return N(this,void 0,void 0,(function(){var t=this;return T(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return N(t,void 0,void 0,(function(){var t,n,r,o,i;return T(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,pr(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=mr(vr(o)+1),vr(this.nextIpAddress)>vr(n)&&(this.nextIpAddress=t),[2,o]}}))}))}))]}))}))},n.prototype.forwardPort=function(e,t,n,r,o,i,s,a){var c;return void 0===s&&(s=!0),N(this,void 0,void 0,(function(){var u,d,l,p,f,h,v=this;return T(this,(function(m){switch(m.label){case 0:if(u={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,n,r,t,s)];case 1:return l=m.sent(),p="UDP"===t.protocol?new Os(e,u,l,this.agent):new qs(e,u,a,l,this.agent),s?[3,3]:[4,this.registerHostnames(null===(c=p.bindTo)||void 0===c?void 0:c.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 N(v,void 0,void 0,(function(){return T(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}]}}))}))},n.prototype.determineSocketAddress=function(e,t,n,r,o,i){return N(this,void 0,void 0,(function(){var s,a,c;return T(this,(function(u){switch(u.label){case 0:return i&&"darwin"===y.default.platform()?[2,void 0]:(s=this.connections.filter((function(n){return n.forwardingContext.projectId===e&&n.forwardingContext.id===t&&n.forwardingContext.type===r})),(a=null==s?void 0:s.find((function(e){return n.find((function(t){return e.forwardingContext.hostnames.includes(t)}))})))?[2,{address:null==a?void 0:a.forwardingContext.address,port:o.internalPort}]:(c={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(c.address=u.sent(),c.port=o.internalPort,c)]}}))}))},n.prototype.registerHostnames=function(e,t){return N(this,void 0,void 0,(function(){return T(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,L([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.unregisterHostnames=function(e,t){return N(this,void 0,void 0,(function(){return T(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,L([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.modifyHostsFile=function(e){return N(this,void 0,void 0,(function(){var t=this;return T(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return N(t,void 0,void 0,(function(){var t,n=this;return T(this,(function(r){switch(r.label){case 0:return[4,kr.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,Ns(5)((function(){return N(n,void 0,void 0,(function(){return T(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,Ns(5)((function(){return N(n,void 0,void 0,(function(){return T(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]}}))}))},n.prototype.stopProjectForwarding=function(e){return N(this,void 0,void 0,(function(){var t=this;return T(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]}}))}))},n.prototype.stopServiceForwarding=function(e){return N(this,void 0,void 0,(function(){var t=this;return T(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]}}))}))},n.prototype.stopAddonForwarding=function(e){return N(this,void 0,void 0,(function(){var t=this;return T(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]}}))}))},n.prototype.stop=function(){return N(this,void 0,void 0,(function(){var e=this;return T(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return N(e,void 0,void 0,(function(){return T(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},n}(e.EventEmitter),Ns=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return N(void 0,void 0,void 0,(function(){var e;return T(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()}},Ts=function(e){function t(t,n,r,o,i,s,a){void 0===i&&(i=new w.PassThrough),void 0===s&&(s=new w.PassThrough),void 0===a&&(a=new w.PassThrough);var c=e.call(this)||this;return c.baseUrl=t,c.execConfig=n,c.token=r,c.agent=o,c.stdOut=i,c.stdErr=s,c.stdIn=a,c.waitForCommandResult=function(){return N(c,void 0,void 0,(function(){return T(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()]}}))}))},c.sendInputToCurrentCommand=function(e){return N(c,void 0,void 0,(function(){var t;return T(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]}))}))},c.resizeTerminal=function(e){return N(c,void 0,void 0,(function(){var t;return T(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]}))}))},c.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},c}return O(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 N(this,void 0,void 0,(function(){var e=this;return T(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 ss(a,{agent:e.agent});try{e.duplex=As(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&&c("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":c(null===(o=i.data)||void 0===o?void 0:o.message);break;default:var u="unable to parse message: ".concat(JSON.stringify(i));c(u)}})),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 c=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,c=t.ttyRows,u={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:c}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(u))},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}(e.EventEmitter),Ls=function(){function e(e,t){this.contextProvider=e,this.agent=t,this.assertStartedWithNodejs=function(){if(!cr)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return T(this,(function(i){return n=e.serviceId,r=e.projectId,o=G({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return T(this,(function(i){return n=e.serviceId,r=e.projectId,o=G({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return T(this,(function(i){return n=e.jobId,r=e.projectId,o=G({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return T(this,(function(i){return n=e.jobId,r=e.projectId,o=G({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return N(this,void 0,void 0,(function(){var t,n,r;return T(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(G({shell:"none"},e)),n=new dr,r=new dr,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 Ts(t,e,n,this.agent)},e}(),Ds=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 O(t,e),t}(Error),Bs=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.baseUrl=t,i.logsConfig=n,i.token=r,i.agent=o,i.stop=function(){return N(i,void 0,void 0,(function(){var e;return T(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 O(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.types,r=e.entityId,o=e.entityType,i=e.buildId,s=e.runId,a=e.backupId,c=e.restoreId,u=e.deploymentId,d=e.isBuild,l=e.lineLimit,p=e.projectId,f=e.queryType,h=e.startTime,v=e.endTime,m=e.duration,g=e.direction,b=e.textIncludes,w=e.textNotIncludes,y=e.regexIncludes,I=e.regexNotIncludes,j="/v1/projects/".concat(p,"/"),E=new URLSearchParams;return E.append("queryType",f),void 0!==h&&E.append("startTime",h.toISOString()),void 0!==v&&E.append("endTime",v.toISOString()),void 0!==l&&E.append("lineLimit",l.toString()),void 0!==t&&E.append("containerName",t),void 0!==u&&E.append("deploymentId",u),void 0!==s&&E.append("runId",s),void 0!==i&&E.append("buildId",i),void 0!==b&&E.append("textIncludes",b),void 0!==w&&E.append("textNotIncludes",w),void 0!==y&&E.append("regexIncludes",y),void 0!==I&&E.append("regexNotIncludes",I),void 0!==g&&E.append("direction",g),void 0!==m&&E.append("duration",m.toString()),void 0!==n&&n.forEach((function(e){return E.append("type",e)})),"".concat(j).concat(function(){var e=d?"/build-logs":"/logs";switch(o){case"service":return"services/".concat(r).concat(e);case"job":return"jobs/".concat(r).concat(e);case"addon":return"addons/".concat(r).concat(e);case"addonBackup":return"addons/".concat(r,"/backups/").concat(a).concat(e);case"addonRestore":return"addons/".concat(r,"/backups/").concat(a,"/restores/").concat(c).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(E.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 N(this,void 0,void 0,(function(){var e=this;return T(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 ss(a,{agent:e.agent}),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&&c("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(ea));break;case"error":c(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));c(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 c=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}(e.EventEmitter),Js=cr?ar:window.fetch,Fs=function(){if(cr)try{return JSON.parse(E.default.readFileSync(R.default.join(R.default.dirname(l.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(e){return{}}return{}},Ms=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return N(n,void 0,void 0,(function(){return T(this,(function(t){return[2,this.executeCall(e)]}))}))},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=Fs())||void 0===t?void 0:t.version).concat(r)}},e.prototype.executeCall=function(e){var t;return N(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u,d,l,p,f,h=this;return T(this,(function(v){switch(v.label){case 0:if(n=this.method,r=this.opts.agent,o={method:n,headers:this.getDefaultHeaders(),agent:r},!(i=null===(t=this.contextProvider)||void 0===t?void 0:t.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return s="".concat(i).concat(this.endpointUrl(e)),a=this.body(e),c=G(G({url:s},o),{body:a}),[4,Ks(s,G(G({},o),{body:a}))];case 1:return[4,(u=v.sent()).text()];case 2:return d=v.sent(),l=function(){if(200!==u.status){var e=null==p?void 0:p.error,t=(null==e?void 0:e.message)||"",n={status:u.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(h.opts.throwErrorOnHttpErrorCode)throw new Ds(n);return n}},p=function(){try{return JSON.parse(d)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(u.statusText," (").concat(u.status,")\n\tMessage: ").concat(d))}}(),f=l(),[2,{data:null==p?void 0:p.data,rawResponse:u,request:c,error:f,pagination:null==p?void 0:p.pagination}]}}))}))},e}(),Ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return O(t,e),t}(Ms),Vs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.all=function(e){return N(t,void 0,void 0,(function(){return T(this,(function(t){return[2,new Xs(this,e).getAll()]}))}))},t.call=function(n){return N(t,void 0,void 0,(function(){var t,r=this;return T(this,(function(o){switch(o.label){case 0:return[4,e.prototype.executeCall.call(this,n)];case 1:return t=o.sent(),[2,G(G({},t),{pagination:G(G({},t.pagination),{getNextPage:function(){return N(r,void 0,void 0,(function(){var e,r,o,i,s,a,c,u=this;return T(this,(function(d){return void 0===(null===(a=t.pagination)||void 0===a?void 0:a.cursor)?(e=Object.keys(t.data),r=1===e.length?((s={})[e[0]]=[],s):{},o=G(G({},t),{pagination:G(G({},t.pagination),{count:0}),data:r}),[2,(i=function(e){return G(G({},e),{pagination:G(G({},e.pagination),{getNextPage:function(){return N(u,void 0,void 0,(function(){return T(this,(function(t){return[2,i(e)]}))}))}})})})(o)]):[2,new Xs(this,n,null===(c=t.pagination)||void 0===c?void 0:c.cursor).getNext()]}))}))}})})]}}))}))},t}return O(t,e),t}(Ws),zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return O(t,e),t}(Ms),$s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return O(t,e),t}(Ms),Hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return O(t,e),t}(Ms),Ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return O(t,e),t}(Ms),Xs=function(){function e(e,t,n){void 0===n&&(n=null);var r=this;this.endpoint=e,this.opts=t,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(e.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),e.prototype.getNext=function(){var e,t,n;return N(this,void 0,void 0,(function(){var r,o,i,s,a,c;return T(this,(function(u){switch(u.label){case 0:return[4,this.endpoint.call(G(G({},this.opts),{options:G(G({},null===(e=this.opts)||void 0===e?void 0:e.options),{cursor:null!==(t=this.cursor)&&void 0!==t?t:void 0})}))];case 1:return r=u.sent(),o=r.data,i=r.request,s=r.error,a=r.pagination,c=r.rawResponse,this.cursor=null==a?void 0:a.cursor,this._currentOffset+=null!==(n=null==a?void 0:a.count)&&void 0!==n?n:0,[2,{data:o,request:i,error:s,pagination:a,rawResponse:c}]}}))}))},e.prototype.getAll=function(){var e,t;return N(this,void 0,void 0,(function(){var n,r,o,i,s;return T(this,(function(a){switch(a.label){case 0:n=[],a.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=a.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return i=n.flatMap((function(e){var t=Object.keys(e.data);return 1===t.length?(o=t[0],e.data[t[0]]):e.data})),[2,{data:void 0===o?i:(s={},s[o]=i,s),request:null===(e=n[0])||void 0===e?void 0:e.request,rawResponse:null===(t=n[0])||void 0===t?void 0:t.rawResponse}]}}))}))},e}(),Ks=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 Js(e,t).then((function(e){o(e)})).catch((function(e){return N(void 0,void 0,void 0,(function(){return T(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)}))},Zs=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 Bs.getLogsEndpoint(e)},t.body=function(){},t}return O(t,e),t}(Ws);exports.LogType=void 0,(ks=exports.LogType||(exports.LogType={})).CDN="cdn",ks.Mesh="mesh",ks.Ingress="ingress",ks.Runtime="runtime";var Qs,ea=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},ta=function(e,t){void 0===t&&(t={});var n=this;this.contextProvider=e,this.clientOpts=t,this.getServiceLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r;return T(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 N(n,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r;return T(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 N(n,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r;return T(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 N(n,void 0,void 0,(function(){var t,n,r;return T(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,G(G({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r,o;return T(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,G(G({},n),o),"addonRestore")]}))}))},this.logRange=function(e,t,r){return N(n,void 0,void 0,(function(){var n,o,i,s,a;return T(this,(function(c){switch(c.label){case 0:return n=e.entityId,o=e.projectId,i=G(G({projectId:o,entityId:n,entityType:r},t),{queryType:"range"}),[4,new Zs(this.contextProvider,this.clientOpts).call(i)];case 1:return(s=c.sent()).error?[2,s]:[2,G(G({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(ea)})]}}))}))},this.tailServiceLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r;return T(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 N(n,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r;return T(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 N(n,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r;return T(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 N(n,void 0,void 0,(function(){var t,n,r;return T(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,G(G({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return N(n,void 0,void 0,(function(){var t,n,r,o;return T(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,G(G({},n),o),"addonRestore")]}))}))},this.logTail=function(e,t,r){return N(n,void 0,void 0,(function(){var n,o,i,s,a;return T(this,(function(c){if(n=e.entityId,o=e.projectId,i=G({queryType:"tail",projectId:o,entityId:n,entityType:r},t),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new Bs(s,i,a,this.clientOpts.agent)]}))}))},this.assertStartedWithNodejs=function(){if(!cr)throw new Error("Command exec only possible when started with nodejs")}},na=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.deploymentId,i=e.runId,s=e.buildId,a=e.isBuild,c=e.queryType,u=e.metricTypes,d=e.startTime,l=e.endTime,p=e.duration,f=e.containerName,h=e.timestamp,v="/v1/projects/".concat(t,"/");var m=new URLSearchParams;return m.append("queryType",c),void 0!==d&&m.append("startTime",d.toISOString()),void 0!==l&&m.append("endTime",l.toISOString()),void 0!==f&&m.append("containerName",f),void 0!==o&&m.append("deploymentId",o),void 0!==i&&m.append("runId",i),void 0!==s&&m.append("buildId",s),void 0!==h&&m.append("timestamp",h.toISOString()),void 0!==p&&m.append("duration",p.toString()),void 0!==u&&u.forEach((function(e){return m.append("metricTypes",e)})),"".concat(v).concat(function(){var e=a?"/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(m.toString())},t.body=function(){},t}return O(t,e),t}(Ws),ra=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};exports.MetricType=void 0,(Qs=exports.MetricType||(exports.MetricType={})).Cpu="cpu",Qs.Memory="memory",Qs.NetworkIngress="networkIngress",Qs.NetworkEgress="networkEgress",Qs.TcpConnectionOpen="tcpConnectionsOpen",Qs.PvcUsage="diskUsage",Qs.Requests="requests",Qs.Http4xxResponses="http4xxResponses",Qs.Http5xxResponses="http5xxResponses",Qs.Bandwidth="bandwidth",Qs.BandwidthVolume="bandwidthVolume";var oa=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return T(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return T(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return T(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 N(t,void 0,void 0,(function(){var t,o,i;return T(this,(function(s){return t=e.entityId,o=e.projectId,i=G(G({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return T(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return T(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return T(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,G(G({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return T(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 N(t,void 0,void 0,(function(){var t,o,i;return T(this,(function(s){return t=e.entityId,o=e.projectId,i=G(G({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return N(t,void 0,void 0,(function(){var t;return T(this,(function(n){switch(n.label){case 0:return[4,new na(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,G(G({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,G(G({},n),{values:n.values.map(ra)})]})))})]}}))}))}},ia=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 O(t,e),t}(Ws),sa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backup destinations saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > 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/backup-destinations".concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new backup destination to this account.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Create",t.endpointUrl=function(e){return"/v1/backup-destinations"},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ca=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a backup destination, including secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){return["backupDestinationId"].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/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return O(t,e),t}(Ws),ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Update",t.endpointUrl=function(e){return["backupDestinationId"].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/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),da=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Delete",t.endpointUrl=function(e){return["backupDestinationId"].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/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return O(t,e),t}($s),la=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backups associated with a backup destinations.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){var t;["backupDestinationId"].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/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId),"/backups").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),pa=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 O(t,e),t}(Vs),fa=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 O(t,e),t}(Ws),ha=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 O(t,e),t}(Ws),va=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 O(t,e),t}(Vs),ma=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 O(t,e),t}(zs),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or update a 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 O(t,e),t}(Hs),ba=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return O(t,e),t}(Ws),wa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a 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(encodeURIComponent(e.parameters.clusterId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),ya=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return O(t,e),t}($s),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of nodes for the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t;["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,"'"))}));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/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),ja=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].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(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/cordon")},t.body=function(){},t}return O(t,e),t}(zs),Ea=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Drain a node by evicting all running pods.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].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(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/drain")},t.body=function(){},t}return O(t,e),t}(zs),Ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Uncordon a node on the cluster if it was previously cordoned.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].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(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/uncordon")},t.body=function(){},t}return O(t,e),t}(zs),Ca=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 O(t,e),t}(Vs),Ua=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 O(t,e),t}(zs),_a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Create",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"},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),Sa=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(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return O(t,e),t}(Ws),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Update",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(encodeURIComponent(e.parameters.registryId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),xa=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(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return O(t,e),t}($s),ka=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 O(t,e),t}(Vs),Aa=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 O(t,e),t}(zs),qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",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"},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),Oa=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return O(t,e),t}(Ws),Ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a 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(encodeURIComponent(e.parameters.integrationId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),Na=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return O(t,e),t}($s),Ta=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 O(t,e),t}(Vs),La=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 O(t,e),t}(Vs),Da=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 O(t,e),t}(Ws),Ba=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 O(t,e),t}(Vs),Ja=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 O(t,e),t}(zs),Fa=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(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return O(t,e),t}(Ws),Ma=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(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return O(t,e),t}($s),Wa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve certificate data for a domain to verify its contents.",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(encodeURIComponent(e.parameters.domain),"/certificate")},t.body=function(){},t}return O(t,e),t}(Ws),Va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Import a certificate for 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(encodeURIComponent(e.parameters.domain),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),za=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),$a=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return O(t,e),t}(Ws),Ha=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return O(t,e),t}($s),Ya=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Xa=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 > Subdomains > General > Update",t.endpointUrl=function(e){var t;["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,"'"))}));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/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign").concat(r)},t.body=function(){},t}return O(t,e),t}($s),Ka=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Za=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new path to the subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Create",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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List paths for a given subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(){},t}return O(t,e),t}(Ws),tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get subdomain path details.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Read",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return O(t,e),t}(Ws),nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return O(t,e),t}($s),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a subdomain path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unassign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(){},t}return O(t,e),t}($s),sc=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/verify")},t.body=function(){},t}return O(t,e),t}(zs),ac=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(encodeURIComponent(e.parameters.domain),"/verify")},t.body=function(){},t}return O(t,e),t}(zs),cc=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 O(t,e),t}(Vs),uc=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 O(t,e),t}(zs),dc=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(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return O(t,e),t}(Ws),lc=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(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return O(t,e),t}($s),pc=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(encodeURIComponent(e.parameters.logSinkId),"/pause")},t.body=function(){},t}return O(t,e),t}(zs),fc=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(encodeURIComponent(e.parameters.logSinkId),"/resume")},t.body=function(){},t}return O(t,e),t}(zs),hc=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(encodeURIComponent(e.parameters.logSinkId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),vc=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 O(t,e),t}(Vs),mc=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 O(t,e),t}(zs),gc=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return O(t,e),t}(Ws),bc=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),wc=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return O(t,e),t}($s),yc=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 O(t,e),t}(Vs),Ic=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 O(t,e),t}(zs),jc=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(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return O(t,e),t}(Ws),Ec=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(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return O(t,e),t}($s),Rc=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(encodeURIComponent(e.parameters.credentialId),"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Cc=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 O(t,e),t}(Ws),Uc=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(encodeURIComponent(e.parameters.customVCSId),"/token/").concat(encodeURIComponent(e.parameters.vcsLinkId)).concat(r)},t.body=function(){},t}return O(t,e),t}(zs),_c=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 O(t,e),t}(Vs),Sc=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(encodeURIComponent(e.parameters.vcsService),"/").concat(encodeURIComponent(e.parameters.repositoryOwner),"/").concat(encodeURIComponent(e.parameters.repositoryName),"/branches").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Pc=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 O(t,e),t}(Ws),xc=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 O(t,e),t}(Vs),kc=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 O(t,e),t}(zs),Ac=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 O(t,e),t}(Hs),qc=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(encodeURIComponent(e.parameters.projectId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),Oc=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(encodeURIComponent(e.parameters.projectId))},t.body=function(){},t}return O(t,e),t}(Ws),Gc=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(encodeURIComponent(e.parameters.projectId)).concat(r)},t.body=function(){},t}return O(t,e),t}($s),Nc=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(encodeURIComponent(e.parameters.projectId),"/addons").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Tc=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(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Lc=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(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),Dc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return O(t,e),t}(Ws),Bc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),Jc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return O(t,e),t}($s),Fc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Mc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Wc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(e.parameters.scheduleId))},t.body=function(){},t}return O(t,e),t}($s),Vc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),zc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),$c=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return O(t,e),t}(Ws),Hc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return O(t,e),t}($s),Yc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort")},t.body=function(){},t}return O(t,e),t}(zs),Xc=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){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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort-restore").concat(r)},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Kc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/download-link")},t.body=function(){},t}return O(t,e),t}(Ws),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){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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restore").concat(r)},t.body=function(){},t}return O(t,e),t}(zs),Qc=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restores").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),eu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/retain")},t.body=function(){},t}return O(t,e),t}(zs),tu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/containers").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),nu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/credentials")},t.body=function(){},t}return O(t,e),t}(Ws),ru=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ou=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),iu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pause")},t.body=function(){},t}return O(t,e),t}(zs),su=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/reset")},t.body=function(){},t}return O(t,e),t}(zs),au=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restart")},t.body=function(){},t}return O(t,e),t}(zs),cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of restores 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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restores").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),uu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/resume")},t.body=function(){},t}return O(t,e),t}(zs),du=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),lu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),pu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(){},t}return O(t,e),t}(Ws),fu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),hu=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(encodeURIComponent(e.parameters.projectId),"/jobs").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),vu=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),mu=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),gu=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),bu=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),wu=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),yu=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),Iu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return O(t,e),t}(Ws),ju=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return O(t,e),t}($s),Eu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/branches").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Ru=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Cu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Uu=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments").concat(r)},t.body=function(){},t}return O(t,e),t}(Ws),_u=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Su=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments/details")},t.body=function(){},t}return O(t,e),t}(Ws),Pu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),xu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ku=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return O(t,e),t}(Ws),Au=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return O(t,e),t}($s),qu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/containers").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Ou=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(){},t}return O(t,e),t}(Ws),Gu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Nu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(){},t}return O(t,e),t}(Ws),Tu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Lu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pause")},t.body=function(){},t}return O(t,e),t}(zs),Du=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pull-requests").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Bu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Ju=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Fu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Mu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return O(t,e),t}(Ws),Wu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return O(t,e),t}($s),Vu=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment").concat(r)},t.body=function(){},t}return O(t,e),t}(Ws),zu=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),$u=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment/details")},t.body=function(){},t}return O(t,e),t}(Ws),Hu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Yu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Xu=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Ku=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(encodeURIComponent(e.parameters.projectId),"/pipelines").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Zu=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId))},t.body=function(){},t}return O(t,e),t}(Ws),Qu=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),ed=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),td=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),nd=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(e.parameters.previewId))},t.body=function(){},t}return O(t,e),t}($s),rd=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),od=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return O(t,e),t}(Ws),id=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(){},t}return O(t,e),t}(Ws),sd=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ad=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),cd=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),ud=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return O(t,e),t}(Ws),dd=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId),"/abort")},t.body=function(){},t}return O(t,e),t}(zs),ld=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),pd=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),fd=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),hd=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),vd=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId)).concat(r)},t.body=function(){},t}return O(t,e),t}(Ws),md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(){},t}return O(t,e),t}($s),gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),bd=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),wd=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return O(t,e),t}(Ws),yd=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return O(t,e),t}($s),Id=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/details")},t.body=function(){},t}return O(t,e),t}(Ws),jd=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(encodeURIComponent(e.parameters.projectId),"/services").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Ed=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(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Rd=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(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),Cd=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(encodeURIComponent(e.parameters.projectId),"/services/build/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),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["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(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),_d=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(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),Sd=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(encodeURIComponent(e.parameters.projectId),"/services/combined/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),Pd=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(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),xd=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(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),kd=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(encodeURIComponent(e.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),Ad=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(){},t}return O(t,e),t}(Ws),qd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId)).concat(r)},t.body=function(){},t}return O(t,e),t}($s),Od=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/branches").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Gd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Nd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Td=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments").concat(r)},t.body=function(){},t}return O(t,e),t}(Ws),Ld=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Dd=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments/details")},t.body=function(){},t}return O(t,e),t}(Ws),Bd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Jd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Fd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return O(t,e),t}(Ws),Md=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return O(t,e),t}($s),Wd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/containers").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Vd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(){},t}return O(t,e),t}(Ws),zd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),$d=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(){},t}return O(t,e),t}(Ws),Hd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Yd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pause")},t.body=function(){},t}return O(t,e),t}(zs),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["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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(){},t}return O(t,e),t}(Ws),Kd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Zd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pull-requests").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Qd=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/restart")},t.body=function(){},t}return O(t,e),t}(zs),el=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),tl=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment").concat(r)},t.body=function(){},t}return O(t,e),t}(Ws),nl=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),rl=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment/details")},t.body=function(){},t}return O(t,e),t}(Ws),ol=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),il=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(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(){},t}return O(t,e),t}(Ws),sl=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(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),al=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return O(t,e),t}(Ws),cl=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ul=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return O(t,e),t}($s),dl=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),ll=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),pl=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 O(t,e),t}(Ws),fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List the resource tags for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > 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/tags".concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Add a new resource tag for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Create",t.endpointUrl=function(e){return"/v1/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update or create a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].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/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Hs),ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View details for a given resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Read",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return O(t,e),t}(Ws),gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Patch a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(Ys),bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Delete",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return O(t,e),t}($s),wl=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 O(t,e),t}(Vs),yl=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 O(t,e),t}(zs),Il=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(encodeURIComponent(e.parameters.templateId)).concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),jl=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(encodeURIComponent(e.parameters.templateId))},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),El=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(encodeURIComponent(e.parameters.templateId))},t.body=function(){},t}return O(t,e),t}($s),Rl=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(encodeURIComponent(e.parameters.templateId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return O(t,e),t}(zs),Cl=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(encodeURIComponent(e.parameters.templateId),"/runs").concat(r)},t.body=function(){},t}return O(t,e),t}(Vs),Ul=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(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return O(t,e),t}(Ws),_l=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(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId),"/abort")},t.body=function(){},t}return O(t,e),t}(zs),Sl=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 N(this,void 0,void 0,(function(){return T(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),N(this,void 0,void 0,(function(){var n,r,o;return T(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=G({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:L(L([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return N(this,void 0,void 0,(function(){var t,n,r,o;return T(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:L([],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 N(this,void 0,void 0,(function(){var t,n;return T(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=G(G({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o,i,s;return T(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?G(G({},r),{token:e}):t})),s=G(G({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return N(this,void 0,void 0,(function(){var t,n;return T(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=G(G({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return N(this,void 0,void 0,(function(){var t,n;return T(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=G(G({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return N(this,void 0,void 0,(function(){var t,n;return T(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=G(G({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return N(this,void 0,void 0,(function(){var t,n;return T(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=G(G({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return N(this,void 0,void 0,(function(){var t,n;return T(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=G(G({},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 N(this,void 0,void 0,(function(){var t,n;return T(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=G(G({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),Pl=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return N(n,void 0,void 0,(function(){var t;return T(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),E.default.existsSync(e)?[3,2]:[4,E.default.promises.mkdir(e,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 4:return[2]}}))}))},n.configPath=t||"".concat(y.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return O(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(E.default.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return N(this,void 0,void 0,(function(){var t;return T(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,E.default.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 N(this,void 0,void 0,(function(){return T(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}(Sl),xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return O(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return N(this,void 0,void 0,(function(){return T(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(Sl),kl=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 Gs(e,new jd(e,t),new Nc(e,t),t.agent),this.exec=new Ls(e,t.agent),this.logs=new ta(e,t),this.metrics=new oa(e),this.endpoints={get:(o={},o.addon=((r=new Dc(e,t)).types=new ia(e,t),r.backupSchedules=new Fc(e,t),r.backups=new Vc(e,t),r.backup=((n=new $c(e,t)).download=new Kc(e,t),n.restores=new Qc(e,t),n),r.containers=new tu(e,t),r.credentials=new nu(e,t),r.restores=new cu(e,t),r.version=new pu(e,t),r),o.backupDestination=new ca(e,t),o.invoice=function(){var n={};return n.details=new fa(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new ba(e,t),n.dockerRegistry=new Sa(e,t),n.integration=new Oa(e,t),n}(),o.dnsId=new Da(e,t),o.domain=new Fa(e,t),o.domainCertificate=new Wa(e,t),o.subdomain=function(){var n=new $a(e,t);return n.path=new tc(e,t),n}(),o.logSink=new dc(e,t),o.notification=new gc(e,t),o.registryCredentials=new jc(e,t),o.project=new Oc(e,t),o.job=function(){var n=new Iu(e,t);return n.branches=new Eu(e,t),n.builds=new Ru(e,t),n.buildArguments=new Uu(e,t),n.buildArgumentDetails=new Su(e,t),n.build=new ku(e,t),n.containers=new qu(e,t),n.deployment=new Ou(e,t),n.healthChecks=new Nu(e,t),n.pullRequests=new Du(e,t),n.runs=new Ju(e,t),n.run=new Mu(e,t),n.runtimeEnvironment=new Vu(e,t),n.runtimeEnvironmentDetails=new $u(e,t),n}(),o.pipeline=new Zu(e,t),o.previewTemplate=new Qu(e,t),o.previewTemplateRun=new od(e,t),o.releaseFlow=new id(e,t),o.releaseFlowRun=new ud(e,t),o.secret=new vd(e,t),o.secretLink=new wd(e,t),o.secretDetails=new Id(e,t),o.service=function(){var n=new Ad(e,t);return n.branches=new Od(e,t),n.builds=new Gd(e,t),n.buildArguments=new Td(e,t),n.buildArgumentDetails=new Dd(e,t),n.build=new Fd(e,t),n.containers=new Wd(e,t),n.deployment=new Vd(e,t),n.healthChecks=new $d(e,t),n.ports=new Xd(e,t),n.pullRequests=new Zd(e,t),n.runtimeEnvironment=new tl(e,t),n.runtimeEnvironmentDetails=new rl(e,t),n}(),o.volume=new al(e,t),o.tag=new ml(e,t),o.template=new Il(e,t),o.templateRun=new Ul(e,t),o),list:function(){var n={};return n.backupDestinations=new sa(e,t),n.backupDestinationsBackups=new la(e,t),n.invoices=new pa(e,t),n.cloud=function(){var n={};return n.providers=new ha(e,t),n.clusters=new va(e,t),n.cluster=function(){var n={};return n.nodes=new Ia(e,t),n}(),n.dockerRegistry=new Ca(e,t),n.integrations=new ka(e,t),n.nodeTypes=new Ta(e,t),n.regions=new La(e,t),n}(),n.domains=new Ba(e,t),n.subdomain=function(){var n={};return n.path=new ec(e,t),n}(),n.logSinks=new cc(e,t),n.notifications=new vc(e,t),n.registryCredentials=new yc(e,t),n.vcs=new Cc(e,t),n.repos=new _c(e,t),n.branches=new Sc(e,t),n.plans=new Pc(e,t),n.projects=new xc(e,t),n.addons=new Nc(e,t),n.jobs=new hu(e,t),n.pipelines=new Ku(e,t),n.previewTemplatePreviews=new td(e,t),n.previewTemplateRuns=new rd(e,t),n.releaseFlowRuns=new cd(e,t),n.secrets=new ld(e,t),n.services=new jd(e,t),n.volumes=new il(e,t),n.regions=new pl(e,t),n.tags=new fl(e,t),n.templates=new wl(e,t),n.templateRuns=new Cl(e,t),n}(),add:function(){var n={};return n.backupDestination=new aa(e,t),n.domain=function(){var n={};return n.subdomain=new za(e,t),n}(),n.subdomain=function(){var n={};return n.path=new Qa(e,t),n}(),n.registryCredentials=new Ic(e,t),n.tag=new hl(e,t),n}(),patch:function(){var n={};return n.backupDestination=new ua(e,t),n.cloud=function(){var n={};return n.cluster=new wa(e,t),n.dockerRegistry=new Pa(e,t),n.integration=new Ga(e,t),n}(),n.project=new qc(e,t),n.addon=new Bc(e,t),n.job=function(){var n={};return n.cron=new gu(e,t),n.manual=new yu(e,t),n}(),n.secret=new hd(e,t),n.service=function(){var n={};return n.build=new Cd(e,t),n.combined=new Sd(e,t),n.deployment=new kd(e,t),n}(),n.tag=new gl(e,t),n}(),delete:function(){var n={};return n.backupDestination=new da(e,t),n.cloud=function(){var n={};return n.cluster=new ya(e,t),n.dockerRegistry=new xa(e,t),n.integration=new Na(e,t),n}(),n.domain=new Ma(e,t),n.subdomain=function(){var n=new Ha(e,t);return n.path=new nc(e,t),n}(),n.logSink=new lc(e,t),n.notification=new wc(e,t),n.registryCredentials=new Ec(e,t),n.project=new Gc(e,t),n.addon=function(){var n=new Jc(e,t);return n.backupSchedule=new Wc(e,t),n}(),n.backup=new Hc(e,t),n.job=new ju(e,t),n.previewTemplatePreview=new nd(e,t),n.secret=new md(e,t),n.secretLink=new yd(e,t),n.service=new qd(e,t),n.volume=new ul(e,t),n.tag=new bl(e,t),n.template=new El(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new ma(e,t),n.dockerRegistry=new Ua(e,t),n.integration=new Aa(e,t),n}(),n.domain=new Ja(e,t),n.logSink=new uc(e,t),n.notification=new mc(e,t),n.customVcs=function(){var n={};return n.token=new Uc(e,t),n}(),n.project=new kc(e,t),n.addon=function(){var n=new Tc(e,t);return n.backupSchedule=new Mc(e,t),n}(),n.job=function(){var n={};return n.cron=new vu(e,t),n.manual=new bu(e,t),n}(),n.secret=new pd(e,t),n.service=function(){var n={};return n.build=new Ed(e,t),n.combined=new Ud(e,t),n.deployment=new Pd(e,t),n}(),n.volume=new sl(e,t),n.template=new yl(e,t),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new ga(e,t),n.dockerRegistry=new _a(e,t),n.integration=new qa(e,t),n}(),n.project=new Ac(e,t),n.addon=new Lc(e,t),n.job=function(){var n={};return n.cron=new mu(e,t),n.manual=new wu(e,t),n}(),n.secret=new fd(e,t),n.service=function(){var n={};return n.build=new Rd(e,t),n.combined=new _d(e,t),n.deployment=new xd(e,t),n}(),n.tag=new vl(e,t),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new ja(e,t),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Ea(e,t),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Ra(e,t),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new Va(e,t),n.addon=function(){var n={};return n.backup=new ru(e,t),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Ya(e,t),n.path=new oc(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new Xa(e,t);return n.path=new ic(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Ka(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Za(e,t),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new rc(e,t),n}(),n.logSink=new hc(e,t),n.notification=new bc(e,t),n.registryCredentials=new Rc(e,t),n.addon=function(){var n={};return n.networkSettings=new ou(e,t),n.security=new lu(e,t),n.version=new fu(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new _u(e,t),n.buildOptions=new Pu(e,t),n.buildSource=new xu(e,t),n.deployment=new Gu(e,t),n.healthChecks=new Tu(e,t),n.runtimeEnvironment=new zu(e,t),n.settings=new Yu(e,t),n}(),n.previewTemplate=new ed(e,t),n.releaseFlow=new sd(e,t),n.secret=new gd(e,t),n.secretLink=new bd(e,t),n.service=function(){var n={};return n.buildArguments=new Ld(e,t),n.buildOptions=new Bd(e,t),n.buildSource=new Jd(e,t),n.deployment=new zd(e,t),n.healthChecks=new Hd(e,t),n.ports=new Kd(e,t),n.runtimeEnvironment=new nl(e,t),n}(),n.volume=new cl(e,t),n.template=new jl(e,t),n}(),verify:function(){var n={};return n.subdomain=new sc(e,t),n.domain=new ac(e,t),n}(),pause:function(){var n={};return n.logSink=new pc(e,t),n.addon=new iu(e,t),n.job=new Lu(e,t),n.service=new Yd(e,t),n}(),resume:function(){var n={};return n.logSink=new fc(e,t),n.addon=new uu(e,t),n.job=new Bu(e,t),n.service=new el(e,t),n}(),backup:function(){var n={};return n.addon=new zc(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Yc(e,t),n.restore=new Xc(e,t),n}(),n.job=function(){var n={};return n.build=new Au(e,t),n.run=new Wu(e,t),n}(),n.releaseFlowRun=new dd(e,t),n.service=function(){var n={};return n.build=new Md(e,t),n}(),n.templateRun=new _l(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 eu(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new su(e,t),n}(),restart:function(){var n={};return n.addon=new au(e,t),n.service=new Qd(e,t),n}(),scale:function(){var n={};return n.addon=new du(e,t),n.job=new Hu(e,t),n.service=new ol(e,t),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new Cu(e,t),n.run=new Fu(e,t),n}(),n.service=function(){var n={};return n.build=new Nd(e,t),n}(),n}(),suspend:function(){var n={};return n.job=new Xu(e,t),n}(),run:function(){var n={};return n.releaseFlow=new ad(e,t),n.template=new Rl(e,t),n}(),attach:function(){var n={};return n.volume=new dl(e,t),n}(),detach:function(){var n={};return n.volume=new ll(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=function(){var e=i.endpoints.get.addon.backupSchedules.call;return e.all=i.endpoints.get.addon.backupSchedules.all,e}(),e.backups=function(){var e=i.endpoints.get.addon.backups.call;return e.all=i.endpoints.get.addon.backups.all,e}(),e.backup=function(){var e=i.endpoints.get.addon.backup.call;return e.download=i.endpoints.get.addon.backup.download.call,e.restores=function(){var e=i.endpoints.get.addon.backup.restores.call;return e.all=i.endpoints.get.addon.backup.restores.all,e}(),e.logs=i.logs.getAddonBackupLogs,e.logTail=i.logs.tailAddonBackupLogs,e}(),e.containers=function(){var e=i.endpoints.get.addon.containers.call;return e.all=i.endpoints.get.addon.containers.all,e}(),e.credentials=i.endpoints.get.addon.credentials.call,e.restores=function(){var e=function(){var e=i.endpoints.get.addon.restores.call;return e.all=i.endpoints.get.addon.restores.all,e}();return e.logs=i.logs.getAddonRestoresLogs,e.logTail=i.logs.tailAddonRestoresLogs,e}(),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.backupDestination=i.endpoints.get.backupDestination.call,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.domainCertificate=i.endpoints.get.domainCertificate.call,e.subdomain=function(){var e=i.endpoints.get.subdomain.call;return e.path=i.endpoints.get.subdomain.path.call,e}(),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=function(){var e=i.endpoints.get.job.branches.call;return e.all=i.endpoints.get.job.branches.all,e}(),e.builds=function(){var e=i.endpoints.get.job.builds.call;return e.all=i.endpoints.get.job.builds.all,e}(),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=function(){var e=i.endpoints.get.job.containers.call;return e.all=i.endpoints.get.job.containers.all,e}(),e.deployment=i.endpoints.get.job.deployment.call,e.healthChecks=i.endpoints.get.job.healthChecks.call,e.pullRequests=function(){var e=i.endpoints.get.job.pullRequests.call;return e.all=i.endpoints.get.job.pullRequests.all,e}(),e.runs=function(){var e=i.endpoints.get.job.runs.call;return e.all=i.endpoints.get.job.runs.all,e}(),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=function(){var e=i.endpoints.get.previewTemplate.call;return e.all=i.endpoints.get.previewTemplate.all,e}(),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=function(){var e=i.endpoints.get.service.branches.call;return e.all=i.endpoints.get.service.branches.all,e}(),e.builds=function(){var e=i.endpoints.get.service.builds.call;return e.all=i.endpoints.get.service.builds.all,e}(),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=function(){var e=i.endpoints.get.service.containers.call;return e.all=i.endpoints.get.service.containers.all,e}(),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=function(){var e=i.endpoints.get.service.pullRequests.call;return e.all=i.endpoints.get.service.pullRequests.all,e}(),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.tag=i.endpoints.get.tag.call,e.template=function(){var e=i.endpoints.get.template.call;return e.all=i.endpoints.get.template.all,e}(),e.templateRun=i.endpoints.get.templateRun.call,e}(),this.list=function(){var e={};return e.backupDestinations=function(){var e=i.endpoints.list.backupDestinations.call;return e.all=i.endpoints.list.backupDestinations.all,e}(),e.backupDestinationsBackups=function(){var e=i.endpoints.list.backupDestinationsBackups.call;return e.all=i.endpoints.list.backupDestinationsBackups.all,e}(),e.invoices=function(){var e=i.endpoints.list.invoices.call;return e.all=i.endpoints.list.invoices.all,e}(),e.cloud=function(){var e={};return e.providers=i.endpoints.list.cloud.providers.call,e.clusters=function(){var e=i.endpoints.list.cloud.clusters.call;return e.all=i.endpoints.list.cloud.clusters.all,e}(),e.cluster=function(){var e={};return e.nodes=function(){var e=i.endpoints.list.cloud.cluster.nodes.call;return e.all=i.endpoints.list.cloud.cluster.nodes.all,e}(),e}(),e.dockerRegistry=function(){var e=i.endpoints.list.cloud.dockerRegistry.call;return e.all=i.endpoints.list.cloud.dockerRegistry.all,e}(),e.integrations=function(){var e=i.endpoints.list.cloud.integrations.call;return e.all=i.endpoints.list.cloud.integrations.all,e}(),e.nodeTypes=function(){var e=i.endpoints.list.cloud.nodeTypes.call;return e.all=i.endpoints.list.cloud.nodeTypes.all,e}(),e.regions=function(){var e=i.endpoints.list.cloud.regions.call;return e.all=i.endpoints.list.cloud.regions.all,e}(),e}(),e.domains=function(){var e=i.endpoints.list.domains.call;return e.all=i.endpoints.list.domains.all,e}(),e.subdomain=function(){var e={};return e.path=i.endpoints.list.subdomain.path.call,e}(),e.logSinks=function(){var e=i.endpoints.list.logSinks.call;return e.all=i.endpoints.list.logSinks.all,e}(),e.notifications=function(){var e=i.endpoints.list.notifications.call;return e.all=i.endpoints.list.notifications.all,e}(),e.registryCredentials=function(){var e=i.endpoints.list.registryCredentials.call;return e.all=i.endpoints.list.registryCredentials.all,e}(),e.vcs=i.endpoints.list.vcs.call,e.repos=function(){var e=i.endpoints.list.repos.call;return e.all=i.endpoints.list.repos.all,e}(),e.branches=function(){var e=i.endpoints.list.branches.call;return e.all=i.endpoints.list.branches.all,e}(),e.plans=i.endpoints.list.plans.call,e.projects=function(){var e=i.endpoints.list.projects.call;return e.all=i.endpoints.list.projects.all,e}(),e.addons=function(){var e=i.endpoints.list.addons.call;return e.all=i.endpoints.list.addons.all,e}(),e.jobs=function(){var e=i.endpoints.list.jobs.call;return e.all=i.endpoints.list.jobs.all,e}(),e.pipelines=function(){var e=i.endpoints.list.pipelines.call;return e.all=i.endpoints.list.pipelines.all,e}(),e.previewTemplatePreviews=function(){var e=i.endpoints.list.previewTemplatePreviews.call;return e.all=i.endpoints.list.previewTemplatePreviews.all,e}(),e.previewTemplateRuns=function(){var e=i.endpoints.list.previewTemplateRuns.call;return e.all=i.endpoints.list.previewTemplateRuns.all,e}(),e.releaseFlowRuns=function(){var e=i.endpoints.list.releaseFlowRuns.call;return e.all=i.endpoints.list.releaseFlowRuns.all,e}(),e.secrets=function(){var e=i.endpoints.list.secrets.call;return e.all=i.endpoints.list.secrets.all,e}(),e.services=function(){var e=i.endpoints.list.services.call;return e.all=i.endpoints.list.services.all,e}(),e.volumes=i.endpoints.list.volumes.call,e.regions=i.endpoints.list.regions.call,e.tags=function(){var e=i.endpoints.list.tags.call;return e.all=i.endpoints.list.tags.all,e}(),e.templates=function(){var e=i.endpoints.list.templates.call;return e.all=i.endpoints.list.templates.all,e}(),e.templateRuns=function(){var e=i.endpoints.list.templateRuns.call;return e.all=i.endpoints.list.templateRuns.all,e}(),e}(),this.add=function(){var e={};return e.backupDestination=i.endpoints.add.backupDestination.call,e.domain=function(){var e={};return e.subdomain=i.endpoints.add.domain.subdomain.call,e}(),e.subdomain=function(){var e={};return e.path=i.endpoints.add.subdomain.path.call,e}(),e.registryCredentials=i.endpoints.add.registryCredentials.call,e.tag=i.endpoints.add.tag.call,e}(),this.patch=function(){var e={};return e.backupDestination=i.endpoints.patch.backupDestination.call,e.cloud=function(){var e={};return e.cluster=i.endpoints.patch.cloud.cluster.call,e.dockerRegistry=i.endpoints.patch.cloud.dockerRegistry.call,e.integration=i.endpoints.patch.cloud.integration.call,e}(),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.tag=i.endpoints.patch.tag.call,e}(),this.delete=function(){var e={};return e.backupDestination=i.endpoints.delete.backupDestination.call,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=function(){var e=i.endpoints.delete.subdomain.call;return e.path=i.endpoints.delete.subdomain.path.call,e}(),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.tag=i.endpoints.delete.tag.call,e.template=i.endpoints.delete.template.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.put=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.put.cloud.cluster.call,e.dockerRegistry=i.endpoints.put.cloud.dockerRegistry.call,e.integration=i.endpoints.put.cloud.integration.call,e}(),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.tag=i.endpoints.put.tag.call,e}(),this.cordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.cordon.cloud.cluster.node.call,e}(),e}(),e}(),this.drain=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.drain.cloud.cluster.node.call,e}(),e}(),e}(),this.uncordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.uncordon.cloud.cluster.node.call,e}(),e}(),e}(),this.import=function(){var e={};return e.domainCertificate=i.endpoints.import.domainCertificate.call,e.addon=function(){var e={};return e.backup=i.endpoints.import.addon.backup.call,e}(),e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=i.endpoints.assign.subdomain.service.call,e.path=i.endpoints.assign.subdomain.path.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=function(){var e=i.endpoints.unassign.subdomain.call;return e.path=i.endpoints.unassign.subdomain.path.call,e}(),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.update=function(){var e={};return e.subdomain=function(){var e={};return e.path=i.endpoints.update.subdomain.path.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.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.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.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.start=function(){var e={};return 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.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}()};exports.AbortAddonBackupEndpoint=Yc,exports.AbortAddonRestoreEndpoint=Xc,exports.AbortJobBuildEndpoint=Au,exports.AbortJobRunEndpoint=Wu,exports.AbortReleaseflowrunEndpoint=dd,exports.AbortServiceBuildEndpoint=Md,exports.AbortTemplaterunEndpoint=_l,exports.AddBackupdestinationEndpoint=aa,exports.AddDomainSubdomainEndpoint=za,exports.AddRegistrycredentialsEndpoint=Ic,exports.AddSubdomainPathEndpoint=Qa,exports.AddTagEndpoint=hl,exports.ApiClient=kl,exports.ApiClientContextProvider=Sl,exports.ApiClientFileContextProvider=Pl,exports.ApiClientInMemoryContextProvider=xl,exports.ApiEndpoint=Ms,exports.AssignSubdomainPathEndpoint=oc,exports.AssignSubdomainServiceEndpoint=Ya,exports.AttachVolumeEndpoint=dl,exports.BackupAddonEndpoint=zc,exports.CordonCloudClusterNodeEndpoint=ja,exports.CreateAddonBackupscheduleEndpoint=Mc,exports.CreateAddonEndpoint=Tc,exports.CreateCloudClusterEndpoint=ma,exports.CreateCloudDockerregistryEndpoint=Ua,exports.CreateCloudIntegrationEndpoint=Aa,exports.CreateCustomvcsTokenEndpoint=Uc,exports.CreateDomainEndpoint=Ja,exports.CreateJobCronEndpoint=vu,exports.CreateJobManualEndpoint=bu,exports.CreateLogsinkEndpoint=uc,exports.CreateNotificationEndpoint=mc,exports.CreateProjectEndpoint=kc,exports.CreateSecretEndpoint=pd,exports.CreateServiceBuildEndpoint=Ed,exports.CreateServiceCombinedEndpoint=Ud,exports.CreateServiceDeploymentEndpoint=Pd,exports.CreateTemplateEndpoint=yl,exports.CreateVolumeEndpoint=sl,exports.DeleteAddonBackupscheduleEndpoint=Wc,exports.DeleteAddonEndpoint=Jc,exports.DeleteApiEndpoint=$s,exports.DeleteBackupEndpoint=Hc,exports.DeleteBackupdestinationEndpoint=da,exports.DeleteCloudClusterEndpoint=ya,exports.DeleteCloudDockerregistryEndpoint=xa,exports.DeleteCloudIntegrationEndpoint=Na,exports.DeleteDomainEndpoint=Ma,exports.DeleteJobEndpoint=ju,exports.DeleteLogsinkEndpoint=lc,exports.DeleteNotificationEndpoint=wc,exports.DeletePreviewtemplatepreviewEndpoint=nd,exports.DeleteProjectEndpoint=Gc,exports.DeleteRegistrycredentialsEndpoint=Ec,exports.DeleteSecretEndpoint=md,exports.DeleteSecretlinkEndpoint=yd,exports.DeleteServiceEndpoint=qd,exports.DeleteSubdomainEndpoint=Ha,exports.DeleteSubdomainPathEndpoint=nc,exports.DeleteTagEndpoint=bl,exports.DeleteTemplateEndpoint=El,exports.DeleteVolumeEndpoint=ul,exports.DetachVolumeEndpoint=ll,exports.DisableSubdomainCdnEndpoint=Ka,exports.DrainCloudClusterNodeEndpoint=Ea,exports.EnableSubdomainCdnEndpoint=Za,exports.ExecCommandStandard=Ts,exports.GetAddonBackupDownloadEndpoint=Kc,exports.GetAddonBackupEndpoint=$c,exports.GetAddonBackupRestoresEndpoint=Qc,exports.GetAddonBackupsEndpoint=Vc,exports.GetAddonBackupschedulesEndpoint=Fc,exports.GetAddonContainersEndpoint=tu,exports.GetAddonCredentialsEndpoint=nu,exports.GetAddonEndpoint=Dc,exports.GetAddonRestoresEndpoint=cu,exports.GetAddonTypesEndpoint=ia,exports.GetAddonVersionEndpoint=pu,exports.GetApiEndpoint=Ws,exports.GetApiEndpointPaginated=Vs,exports.GetBackupdestinationEndpoint=ca,exports.GetCloudClusterEndpoint=ba,exports.GetCloudDockerregistryEndpoint=Sa,exports.GetCloudIntegrationEndpoint=Oa,exports.GetDnsidEndpoint=Da,exports.GetDomainEndpoint=Fa,exports.GetDomaincertificateEndpoint=Wa,exports.GetInvoiceDetailsEndpoint=fa,exports.GetJobBranchesEndpoint=Eu,exports.GetJobBuildEndpoint=ku,exports.GetJobBuildargumentdetailsEndpoint=Su,exports.GetJobBuildargumentsEndpoint=Uu,exports.GetJobBuildsEndpoint=Ru,exports.GetJobContainersEndpoint=qu,exports.GetJobDeploymentEndpoint=Ou,exports.GetJobEndpoint=Iu,exports.GetJobHealthchecksEndpoint=Nu,exports.GetJobPullrequestsEndpoint=Du,exports.GetJobRunEndpoint=Mu,exports.GetJobRunsEndpoint=Ju,exports.GetJobRuntimeenvironmentEndpoint=Vu,exports.GetJobRuntimeenvironmentdetailsEndpoint=$u,exports.GetLogsinkEndpoint=dc,exports.GetNotificationEndpoint=gc,exports.GetPipelineEndpoint=Zu,exports.GetPreviewtemplateEndpoint=Qu,exports.GetPreviewtemplaterunEndpoint=od,exports.GetProjectEndpoint=Oc,exports.GetRegistrycredentialsEndpoint=jc,exports.GetReleaseflowEndpoint=id,exports.GetReleaseflowrunEndpoint=ud,exports.GetSecretEndpoint=vd,exports.GetSecretdetailsEndpoint=Id,exports.GetSecretlinkEndpoint=wd,exports.GetServiceBranchesEndpoint=Od,exports.GetServiceBuildEndpoint=Fd,exports.GetServiceBuildargumentdetailsEndpoint=Dd,exports.GetServiceBuildargumentsEndpoint=Td,exports.GetServiceBuildsEndpoint=Gd,exports.GetServiceContainersEndpoint=Wd,exports.GetServiceDeploymentEndpoint=Vd,exports.GetServiceEndpoint=Ad,exports.GetServiceHealthchecksEndpoint=$d,exports.GetServicePortsEndpoint=Xd,exports.GetServicePullrequestsEndpoint=Zd,exports.GetServiceRuntimeenvironmentEndpoint=tl,exports.GetServiceRuntimeenvironmentdetailsEndpoint=rl,exports.GetSubdomainEndpoint=$a,exports.GetSubdomainPathEndpoint=tc,exports.GetTagEndpoint=ml,exports.GetTemplateEndpoint=Il,exports.GetTemplaterunEndpoint=Ul,exports.GetVolumeEndpoint=al,exports.ImportAddonBackupEndpoint=ru,exports.ImportDomaincertificateEndpoint=Va,exports.ListAddonsEndpoint=Nc,exports.ListBackupdestinationsEndpoint=sa,exports.ListBackupdestinationsbackupsEndpoint=la,exports.ListBranchesEndpoint=Sc,exports.ListCloudClusterNodesEndpoint=Ia,exports.ListCloudClustersEndpoint=va,exports.ListCloudDockerregistryEndpoint=Ca,exports.ListCloudIntegrationsEndpoint=ka,exports.ListCloudNodetypesEndpoint=Ta,exports.ListCloudProvidersEndpoint=ha,exports.ListCloudRegionsEndpoint=La,exports.ListDomainsEndpoint=Ba,exports.ListInvoicesEndpoint=pa,exports.ListJobsEndpoint=hu,exports.ListLogsinksEndpoint=cc,exports.ListNotificationsEndpoint=vc,exports.ListPipelinesEndpoint=Ku,exports.ListPlansEndpoint=Pc,exports.ListPreviewtemplatepreviewsEndpoint=td,exports.ListPreviewtemplaterunsEndpoint=rd,exports.ListProjectsEndpoint=xc,exports.ListRegionsEndpoint=pl,exports.ListRegistrycredentialsEndpoint=yc,exports.ListReleaseflowrunsEndpoint=cd,exports.ListReposEndpoint=_c,exports.ListSecretsEndpoint=ld,exports.ListServicesEndpoint=jd,exports.ListSubdomainPathEndpoint=ec,exports.ListTagsEndpoint=fl,exports.ListTemplaterunsEndpoint=Cl,exports.ListTemplatesEndpoint=wl,exports.ListVcsEndpoint=Cc,exports.ListVolumesEndpoint=il,exports.NorthflankApiCallError=Ds,exports.NorthflankExecCommand=Ls,exports.NorthflankLogFetch=ta,exports.NorthflankMetricFetch=oa,exports.NorthflankPortForwarder=Gs,exports.PatchAddonEndpoint=Bc,exports.PatchApiEndpoint=Ys,exports.PatchBackupdestinationEndpoint=ua,exports.PatchCloudClusterEndpoint=wa,exports.PatchCloudDockerregistryEndpoint=Pa,exports.PatchCloudIntegrationEndpoint=Ga,exports.PatchJobCronEndpoint=gu,exports.PatchJobManualEndpoint=yu,exports.PatchProjectEndpoint=qc,exports.PatchSecretEndpoint=hd,exports.PatchServiceBuildEndpoint=Cd,exports.PatchServiceCombinedEndpoint=Sd,exports.PatchServiceDeploymentEndpoint=kd,exports.PatchTagEndpoint=gl,exports.PauseAddonEndpoint=iu,exports.PauseJobEndpoint=Lu,exports.PauseLogsinkEndpoint=pc,exports.PauseServiceEndpoint=Yd,exports.PostApiEndpoint=zs,exports.PutAddonEndpoint=Lc,exports.PutApiEndpoint=Hs,exports.PutCloudClusterEndpoint=ga,exports.PutCloudDockerregistryEndpoint=_a,exports.PutCloudIntegrationEndpoint=qa,exports.PutJobCronEndpoint=mu,exports.PutJobManualEndpoint=wu,exports.PutProjectEndpoint=Ac,exports.PutSecretEndpoint=fd,exports.PutServiceBuildEndpoint=Rd,exports.PutServiceCombinedEndpoint=_d,exports.PutServiceDeploymentEndpoint=xd,exports.PutTagEndpoint=vl,exports.ResetAddonEndpoint=su,exports.RestartAddonEndpoint=au,exports.RestartServiceEndpoint=Qd,exports.RestoreAddonBackupEndpoint=Zc,exports.ResumeAddonEndpoint=uu,exports.ResumeJobEndpoint=Bu,exports.ResumeLogsinkEndpoint=fc,exports.ResumeServiceEndpoint=el,exports.RetainAddonBackupEndpoint=eu,exports.RunReleaseflowEndpoint=ad,exports.RunTemplateEndpoint=Rl,exports.ScaleAddonEndpoint=du,exports.ScaleJobEndpoint=Hu,exports.ScaleServiceEndpoint=ol,exports.StartJobBuildEndpoint=Cu,exports.StartJobRunEndpoint=Fu,exports.StartServiceBuildEndpoint=Nd,exports.SuspendJobEndpoint=Xu,exports.UnassignSubdomainEndpoint=Xa,exports.UnassignSubdomainPathEndpoint=ic,exports.UncordonCloudClusterNodeEndpoint=Ra,exports.UpdateAddonNetworksettingsEndpoint=ou,exports.UpdateAddonSecurityEndpoint=lu,exports.UpdateAddonVersionEndpoint=fu,exports.UpdateJobBuildargumentsEndpoint=_u,exports.UpdateJobBuildoptionsEndpoint=Pu,exports.UpdateJobBuildsourceEndpoint=xu,exports.UpdateJobDeploymentEndpoint=Gu,exports.UpdateJobHealthchecksEndpoint=Tu,exports.UpdateJobRuntimeenvironmentEndpoint=zu,exports.UpdateJobSettingsEndpoint=Yu,exports.UpdateLogsinkEndpoint=hc,exports.UpdateNotificationEndpoint=bc,exports.UpdatePreviewtemplateEndpoint=ed,exports.UpdateRegistrycredentialsEndpoint=Rc,exports.UpdateReleaseflowEndpoint=sd,exports.UpdateSecretEndpoint=gd,exports.UpdateSecretlinkEndpoint=bd,exports.UpdateServiceBuildargumentsEndpoint=Ld,exports.UpdateServiceBuildoptionsEndpoint=Bd,exports.UpdateServiceBuildsourceEndpoint=Jd,exports.UpdateServiceDeploymentEndpoint=zd,exports.UpdateServiceHealthchecksEndpoint=Hd,exports.UpdateServicePortsEndpoint=Kd,exports.UpdateServiceRuntimeenvironmentEndpoint=nl,exports.UpdateSubdomainPathEndpoint=rc,exports.UpdateTemplateEndpoint=jl,exports.UpdateVolumeEndpoint=cl,exports.VerifyDomainEndpoint=ac,exports.VerifySubdomainEndpoint=sc;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("events"),e=require("child_process"),n=require("stream"),r=require("http"),o=require("url"),i=require("punycode"),s=require("https"),a=require("zlib"),c=require("os"),u=require("net"),d=require("fs"),l=require("path"),h=require("tls"),p=require("crypto"),f=require("buffer"),m=require("dgram"),v=require("node:events"),b=require("node:stream"),g=require("node:string_decoder"),y=require("node:path"),w=require("node:fs"),E=require("assert"),I=require("node:assert"),R=require("node:crypto");function j(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function S(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var _=j(t),C=j(n),A=S(n),U=j(r),x=j(o),P=j(i),k=j(s),O=j(a),T=S(a),D=j(c),L=j(u),N=S(u),q=j(d),B=j(l),F=j(h),G=j(p),M=j(f),z=j(m),J=j(b),W=j(y),$=j(w),H=j(E),V=j(I),Z=function(t,e){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Z(t,e)};function Y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},K.apply(this,arguments)};function X(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))}function Q(t,e){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function tt(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var et="object"==typeof global&&global&&global.Object===Object&&global,nt="object"==typeof self&&self&&self.Object===Object&&self,rt=et||nt||Function("return this")(),ot=rt.Symbol,it=Object.prototype,st=it.hasOwnProperty,at=it.toString,ct=ot?ot.toStringTag:void 0;var ut=Object.prototype.toString;var dt=ot?ot.toStringTag:void 0;function lt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":dt&&dt in Object(t)?function(t){var e=st.call(t,ct),n=t[ct];try{t[ct]=void 0;var r=!0}catch(t){}var o=at.call(t);return r&&(e?t[ct]=n:delete t[ct]),o}(t):function(t){return ut.call(t)}(t)}function ht(t){return null!=t&&"object"==typeof t}function pt(t){return"symbol"==typeof t||ht(t)&&"[object Symbol]"==lt(t)}function ft(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}var mt=Array.isArray,vt=ot?ot.prototype:void 0,bt=vt?vt.toString:void 0;function gt(t){if("string"==typeof t)return t;if(mt(t))return ft(t,gt)+"";if(pt(t))return bt?bt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function yt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function wt(t){return t}function Et(t){if(!yt(t))return!1;var e=lt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var It,Rt=rt["__core-js_shared__"],jt=(It=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+It:"";var St=Function.prototype.toString;function _t(t){if(null!=t){try{return St.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ct=/^\[object .+?Constructor\]$/,At=Function.prototype,Ut=Object.prototype,xt=At.toString,Pt=Ut.hasOwnProperty,kt=RegExp("^"+xt.call(Pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ot(t){return!(!yt(t)||(e=t,jt&&jt in e))&&(Et(t)?kt:Ct).test(_t(t));var e}function Tt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ot(n)?n:void 0}var Dt=Tt(rt,"WeakMap"),Lt=Object.create,Nt=function(){function t(){}return function(e){if(!yt(e))return{};if(Lt)return Lt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var qt=Date.now;var Bt,Ft,Gt,Mt=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),zt=Mt,Jt=zt?function(t,e){return zt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:wt,Wt=(Bt=Jt,Ft=0,Gt=0,function(){var t=qt(),e=16-(t-Gt);if(Gt=t,e>0){if(++Ft>=800)return arguments[0]}else Ft=0;return Bt.apply(void 0,arguments)}),$t=/^(?:0|[1-9]\d*)$/;function Ht(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&$t.test(t))&&t>-1&&t%1==0&&t<e}function Vt(t,e,n){"__proto__"==e&&zt?zt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Zt(t,e){return t===e||t!=t&&e!=e}var Yt=Object.prototype.hasOwnProperty;function Kt(t,e,n){var r=t[e];Yt.call(t,e)&&Zt(r,n)&&(void 0!==n||e in t)||Vt(t,e,n)}var Xt=Math.max;function Qt(t,e){return Wt(function(t,e,n){return e=Xt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Xt(r.length-e,0),s=Array(i);++o<i;)s[o]=r[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=r[o];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}(t,e,wt),t+"")}function te(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function ee(t){return null!=t&&te(t.length)&&!Et(t)}var ne=Object.prototype;function re(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ne)}function oe(t){return ht(t)&&"[object Arguments]"==lt(t)}var ie=Object.prototype,se=ie.hasOwnProperty,ae=ie.propertyIsEnumerable,ce=oe(function(){return arguments}())?oe:function(t){return ht(t)&&se.call(t,"callee")&&!ae.call(t,"callee")};var ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,de=ue&&"object"==typeof module&&module&&!module.nodeType&&module,le=de&&de.exports===ue?rt.Buffer:void 0,he=(le?le.isBuffer:void 0)||function(){return!1},pe={};pe["[object Float32Array]"]=pe["[object Float64Array]"]=pe["[object Int8Array]"]=pe["[object Int16Array]"]=pe["[object Int32Array]"]=pe["[object Uint8Array]"]=pe["[object Uint8ClampedArray]"]=pe["[object Uint16Array]"]=pe["[object Uint32Array]"]=!0,pe["[object Arguments]"]=pe["[object Array]"]=pe["[object ArrayBuffer]"]=pe["[object Boolean]"]=pe["[object DataView]"]=pe["[object Date]"]=pe["[object Error]"]=pe["[object Function]"]=pe["[object Map]"]=pe["[object Number]"]=pe["[object Object]"]=pe["[object RegExp]"]=pe["[object Set]"]=pe["[object String]"]=pe["[object WeakMap]"]=!1;var fe="object"==typeof exports&&exports&&!exports.nodeType&&exports,me=fe&&"object"==typeof module&&module&&!module.nodeType&&module,ve=me&&me.exports===fe&&et.process,be=function(){try{var t=me&&me.require&&me.require("util").types;return t||ve&&ve.binding&&ve.binding("util")}catch(t){}}(),ge=be&&be.isTypedArray,ye=ge?function(t){return function(e){return t(e)}}(ge):function(t){return ht(t)&&te(t.length)&&!!pe[lt(t)]},we=ye,Ee=Object.prototype.hasOwnProperty;function Ie(t,e){var n=mt(t),r=!n&&ce(t),o=!n&&!r&&he(t),i=!n&&!r&&!o&&we(t),s=n||r||o||i,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var u in t)!e&&!Ee.call(t,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ht(u,c))||a.push(u);return a}function Re(t,e){return function(n){return t(e(n))}}var je=Re(Object.keys,Object),Se=Object.prototype.hasOwnProperty;function _e(t){return ee(t)?Ie(t):function(t){if(!re(t))return je(t);var e=[];for(var n in Object(t))Se.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Ce=Object.prototype.hasOwnProperty;function Ae(t){if(!yt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=re(t),n=[];for(var r in t)("constructor"!=r||!e&&Ce.call(t,r))&&n.push(r);return n}function Ue(t){return ee(t)?Ie(t,!0):Ae(t)}var xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/;function ke(t,e){if(mt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!pt(t))||(Pe.test(t)||!xe.test(t)||null!=e&&t in Object(e))}var Oe=Tt(Object,"create");var Te=Object.prototype.hasOwnProperty;var De=Object.prototype.hasOwnProperty;function Le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ne(t,e){for(var n=t.length;n--;)if(Zt(t[n][0],e))return n;return-1}Le.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},Le.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Le.prototype.get=function(t){var e=this.__data__;if(Oe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Te.call(e,t)?e[t]:void 0},Le.prototype.has=function(t){var e=this.__data__;return Oe?void 0!==e[t]:De.call(e,t)},Le.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Oe&&void 0===e?"__lodash_hash_undefined__":e,this};var qe=Array.prototype.splice;function Be(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Be.prototype.clear=function(){this.__data__=[],this.size=0},Be.prototype.delete=function(t){var e=this.__data__,n=Ne(e,t);return!(n<0)&&(n==e.length-1?e.pop():qe.call(e,n,1),--this.size,!0)},Be.prototype.get=function(t){var e=this.__data__,n=Ne(e,t);return n<0?void 0:e[n][1]},Be.prototype.has=function(t){return Ne(this.__data__,t)>-1},Be.prototype.set=function(t,e){var n=this.__data__,r=Ne(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Fe=Tt(rt,"Map");function Ge(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Me(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Me.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Fe||Be),string:new Le}},Me.prototype.delete=function(t){var e=Ge(this,t).delete(t);return this.size-=e?1:0,e},Me.prototype.get=function(t){return Ge(this,t).get(t)},Me.prototype.has=function(t){return Ge(this,t).has(t)},Me.prototype.set=function(t,e){var n=Ge(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function ze(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(ze.Cache||Me),n}ze.Cache=Me;var Je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,We=/\\(\\)?/g,$e=function(t){var e=ze(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Je,(function(t,n,r,o){e.push(r?o.replace(We,"$1"):n||t)})),e})),He=$e;function Ve(t){return null==t?"":gt(t)}function Ze(t,e){return mt(t)?t:ke(t,e)?[t]:He(Ve(t))}function Ye(t){if("string"==typeof t||pt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ke(t,e){for(var n=0,r=(e=Ze(e,t)).length;null!=t&&n<r;)t=t[Ye(e[n++])];return n&&n==r?t:void 0}function Xe(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}var Qe=ot?ot.isConcatSpreadable:void 0;function tn(t){return mt(t)||ce(t)||!!(Qe&&t&&t[Qe])}function en(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=tn),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?en(a,e-1,n,r,o):Xe(o,a):r||(o[o.length]=a)}return o}var nn=Re(Object.getPrototypeOf,Object),rn=Function.prototype,on=Object.prototype,sn=rn.toString,an=on.hasOwnProperty,cn=sn.call(Object);function un(t){var e=this.__data__=new Be(t);this.size=e.size}un.prototype.clear=function(){this.__data__=new Be,this.size=0},un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},un.prototype.get=function(t){return this.__data__.get(t)},un.prototype.has=function(t){return this.__data__.has(t)},un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Be){var r=n.__data__;if(!Fe||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Me(r)}return n.set(t,e),this.size=n.size,this};var dn="object"==typeof exports&&exports&&!exports.nodeType&&exports,ln=dn&&"object"==typeof module&&module&&!module.nodeType&&module,hn=ln&&ln.exports===dn?rt.Buffer:void 0,pn=hn?hn.allocUnsafe:void 0;var fn=Object.prototype.propertyIsEnumerable,mn=Object.getOwnPropertySymbols,vn=mn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}(mn(t),(function(e){return fn.call(t,e)})))}:function(){return[]};function bn(t){return function(t,e,n){var r=e(t);return mt(t)?r:Xe(r,n(t))}(t,_e,vn)}var gn=Tt(rt,"DataView"),yn=Tt(rt,"Promise"),wn=Tt(rt,"Set"),En="[object Map]",In="[object Promise]",Rn="[object Set]",jn="[object WeakMap]",Sn="[object DataView]",_n=_t(gn),Cn=_t(Fe),An=_t(yn),Un=_t(wn),xn=_t(Dt),Pn=lt;(gn&&Pn(new gn(new ArrayBuffer(1)))!=Sn||Fe&&Pn(new Fe)!=En||yn&&Pn(yn.resolve())!=In||wn&&Pn(new wn)!=Rn||Dt&&Pn(new Dt)!=jn)&&(Pn=function(t){var e=lt(t),n="[object Object]"==e?t.constructor:void 0,r=n?_t(n):"";if(r)switch(r){case _n:return Sn;case Cn:return En;case An:return In;case Un:return Rn;case xn:return jn}return e});var kn=Pn,On=rt.Uint8Array;function Tn(t,e){var n,r,o=e?(n=t.buffer,r=new n.constructor(n.byteLength),new On(r).set(new On(n)),r):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Me;++e<n;)this.add(t[e])}function Ln(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}Dn.prototype.add=Dn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Dn.prototype.has=function(t){return this.__data__.has(t)};function Nn(t,e,n,r,o,i){var s=1&n,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var l=-1,h=!0,p=2&n?new Dn:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var f=t[l],m=e[l];if(r)var v=s?r(m,f,l,e,t,i):r(f,m,l,t,e,i);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!Ln(e,(function(t,e){if(s=e,!p.has(s)&&(f===t||o(f,t,n,r,i)))return p.push(e);var s}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h}function qn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Bn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Fn=ot?ot.prototype:void 0,Gn=Fn?Fn.valueOf:void 0;var Mn=Object.prototype.hasOwnProperty;var zn="[object Arguments]",Jn="[object Array]",Wn="[object Object]",$n=Object.prototype.hasOwnProperty;function Hn(t,e,n,r,o,i){var s=mt(t),a=mt(e),c=s?Jn:kn(t),u=a?Jn:kn(e),d=(c=c==zn?Wn:c)==Wn,l=(u=u==zn?Wn:u)==Wn,h=c==u;if(h&&he(t)){if(!he(e))return!1;s=!0,d=!1}if(h&&!d)return i||(i=new un),s||we(t)?Nn(t,e,n,r,o,i):function(t,e,n,r,o,i,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new On(t),new On(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Zt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=qn;case"[object Set]":var c=1&r;if(a||(a=Bn),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=2,s.set(t,e);var d=Nn(a(t),a(e),r,o,i,s);return s.delete(t),d;case"[object Symbol]":if(Gn)return Gn.call(t)==Gn.call(e)}return!1}(t,e,c,n,r,o,i);if(!(1&n)){var p=d&&$n.call(t,"__wrapped__"),f=l&&$n.call(e,"__wrapped__");if(p||f){var m=p?t.value():t,v=f?e.value():e;return i||(i=new un),o(m,v,n,r,i)}}return!!h&&(i||(i=new un),function(t,e,n,r,o,i){var s=1&n,a=bn(t),c=a.length;if(c!=bn(e).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in e:Mn.call(e,d)))return!1}var l=i.get(t),h=i.get(e);if(l&&h)return l==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var f=s;++u<c;){var m=t[d=a[u]],v=e[d];if(r)var b=s?r(v,m,d,e,t,i):r(m,v,d,t,e,i);if(!(void 0===b?m===v||o(m,v,n,r,i):b)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var g=t.constructor,y=e.constructor;g==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,r,o,i))}function Vn(t,e,n,r,o){return t===e||(null==t||null==e||!ht(t)&&!ht(e)?t!=t&&e!=e:Hn(t,e,n,r,Vn,o))}function Zn(t){return t==t&&!yt(t)}function Yn(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Kn(t){var e=function(t){for(var e=_e(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Zn(o)]}return e}(t);return 1==e.length&&e[0][2]?Yn(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var o=n.length,i=o,s=!r;if(null==t)return!i;for(t=Object(t);o--;){var a=n[o];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var c=(a=n[o])[0],u=t[c],d=a[1];if(s&&a[2]){if(void 0===u&&!(c in t))return!1}else{var l=new un;if(r)var h=r(u,d,c,t,e,l);if(!(void 0===h?Vn(d,u,3,r,l):h))return!1}}return!0}(n,t,e)}}function Xn(t,e){return null!=t&&e in Object(t)}function Qn(t,e){return null!=t&&function(t,e,n){for(var r=-1,o=(e=Ze(e,t)).length,i=!1;++r<o;){var s=Ye(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&te(o)&&Ht(s,o)&&(mt(t)||ce(t))}(t,e,Xn)}function tr(t,e){return ke(t)&&Zn(e)?Yn(Ye(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ke(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Qn(n,t):Vn(e,r,3)}}function er(t){return ke(t)?(e=Ye(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ke(e,t)}}(t);var e}function nr(t){return"function"==typeof t?t:null==t?wt:"object"==typeof t?mt(t)?tr(t[0],t[1]):Kn(t):er(t)}var rr,or=function(t,e,n){for(var r=-1,o=Object(t),i=n(t),s=i.length;s--;){var a=i[rr?s:++r];if(!1===e(o[a],a,o))break}return t};var ir=function(t,e){return function(n,r){if(null==n)return n;if(!ee(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Object(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}((function(t,e){return t&&or(t,e,_e)})),sr=ir;function ar(t,e,n){(void 0!==n&&!Zt(t[e],n)||void 0===n&&!(e in t))&&Vt(t,e,n)}function cr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function ur(t){return function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=r?r(n[a],t[a],a,n,t):void 0;void 0===c&&(c=t[a]),o?Vt(n,a,c):Kt(n,a,c)}return n}(t,Ue(t))}function dr(t,e,n,r,o,i,s){var a=cr(t,n),c=cr(e,n),u=s.get(c);if(u)ar(t,n,u);else{var d,l=i?i(a,c,n+"",t,e,s):void 0,h=void 0===l;if(h){var p=mt(c),f=!p&&he(c),m=!p&&!f&&we(c);l=c,p||f||m?mt(a)?l=a:ht(d=a)&&ee(d)?l=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(a):f?(h=!1,l=function(t,e){if(e)return t.slice();var n=t.length,r=pn?pn(n):new t.constructor(n);return t.copy(r),r}(c,!0)):m?(h=!1,l=Tn(c,!0)):l=[]:function(t){if(!ht(t)||"[object Object]"!=lt(t))return!1;var e=nn(t);if(null===e)return!0;var n=an.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&sn.call(n)==cn}(c)||ce(c)?(l=a,ce(a)?l=ur(a):yt(a)&&!Et(a)||(l=function(t){return"function"!=typeof t.constructor||re(t)?{}:Nt(nn(t))}(c))):h=!1}h&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),ar(t,n,l)}}function lr(t,e,n,r,o){t!==e&&or(e,(function(i,s){if(o||(o=new un),yt(i))dr(t,e,s,n,lr,r,o);else{var a=r?r(cr(t,s),i,s+"",t,e,o):void 0;void 0===a&&(a=i),ar(t,s,a)}}),Ue)}var hr=/[\\^$.*+?()[\]{}|]/g,pr=RegExp(hr.source);function fr(t,e){var n=-1,r=ee(t)?Array(t.length):[];return sr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function mr(t,e){return en(function(t,e){return(mt(t)?ft:fr)(t,nr(e))}(t,e),1)}var vr=1/0;function br(t,e){return t>e}function gr(t){return"string"==typeof t||!mt(t)&&ht(t)&&"[object String]"==lt(t)}function yr(t,e){return t&&t.length?function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],s=e(i);if(null!=s&&(void 0===a?s==s&&!pt(s):n(s,a)))var a=s,c=i}return c}(t,nr(e),br):void 0}var wr,Er=(wr=function(t,e,n){lr(t,e,n)},Qt((function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=wr.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!yt(n))return!1;var r=typeof e;return!!("number"==r?ee(n)&&Ht(e,n.length):"string"==r&&e in n)&&Zt(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var s=e[n];s&&wr(t,s,n,o)}return t})));function Ir(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Rr(t,e){return t(e={exports:{}},e.exports),e.exports}var jr={},Sr=jr;function _r(t){return t<0?-1:1}function Cr(t,e){e.unsigned||--t;const n=e.unsigned?0:-Math.pow(2,t),r=Math.pow(2,t)-1,o=e.moduloBitLength?Math.pow(2,e.moduloBitLength):Math.pow(2,t),i=e.moduloBitLength?Math.pow(2,e.moduloBitLength-1):Math.pow(2,t-1);return function(t,s){s||(s={});let a=+t;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=_r(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(t){return t%1!=.5||1&t?Math.round(t):Math.floor(t)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=_r(a)*Math.floor(Math.abs(a)),a%=o,!e.unsigned&&a>=i)return a-o;if(e.unsigned)if(a<0)a+=o;else if(-0===a)return 0;return a}}jr.void=function(){},jr.boolean=function(t){return!!t},jr.byte=Cr(8,{unsigned:!1}),jr.octet=Cr(8,{unsigned:!0}),jr.short=Cr(16,{unsigned:!1}),jr["unsigned short"]=Cr(16,{unsigned:!0}),jr.long=Cr(32,{unsigned:!1}),jr["unsigned long"]=Cr(32,{unsigned:!0}),jr["long long"]=Cr(32,{unsigned:!1,moduloBitLength:64}),jr["unsigned long long"]=Cr(32,{unsigned:!0,moduloBitLength:64}),jr.double=function(t){const e=+t;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},jr["unrestricted double"]=function(t){const e=+t;if(isNaN(e))throw new TypeError("Argument is NaN");return e},jr.float=jr.double,jr["unrestricted float"]=jr["unrestricted double"],jr.DOMString=function(t,e){return e||(e={}),e.treatNullAsEmptyString&&null===t?"":String(t)},jr.ByteString=function(t,e){const n=String(t);let r;for(let t=0;void 0!==(r=n.codePointAt(t));++t)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},jr.USVString=function(t){const e=String(t),n=e.length,r=[];for(let t=0;t<n;++t){const o=e.charCodeAt(t);if(o<55296||o>57343)r.push(String.fromCodePoint(o));else if(56320<=o&&o<=57343)r.push(String.fromCodePoint(65533));else if(t===n-1)r.push(String.fromCodePoint(65533));else{const n=e.charCodeAt(t+1);if(56320<=n&&n<=57343){const e=1023&o,i=1023&n;r.push(String.fromCodePoint(65536+1024*e+i)),++t}else r.push(String.fromCodePoint(65533))}}return r.join("")},jr.Date=function(t,e){if(!(t instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(t))return t},jr.RegExp=function(t,e){return t instanceof RegExp||(t=new RegExp(t)),t};var Ar=Rr((function(t){t.exports.mixin=function(t,e){const n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;++r)Object.defineProperty(t,n[r],Object.getOwnPropertyDescriptor(e,n[r]))},t.exports.wrapperSymbol=Symbol("wrapper"),t.exports.implSymbol=Symbol("impl"),t.exports.wrapperForImpl=function(e){return e[t.exports.wrapperSymbol]},t.exports.implForWrapper=function(e){return e[t.exports.implSymbol]}}));Ar.mixin,Ar.wrapperSymbol,Ar.implSymbol,Ar.wrapperForImpl,Ar.implForWrapper;var Ur,xr=(Ur=Object.freeze({__proto__:null}))&&Ur.default||Ur,Pr={TRANSITIONAL:0,NONTRANSITIONAL:1};function kr(t){return t.split("\0").map((function(t){return t.normalize("NFC")})).join("\0")}function Or(t){for(var e=0,n=xr.length-1;e<=n;){var r=Math.floor((e+n)/2),o=xr[r];if(o[0][0]<=t&&o[0][1]>=t)return o;o[0][0]>t?n=r-1:e=r+1}return null}var Tr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Dr(t){return t.replace(Tr,"_").length}var Lr=/[\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 Nr(t,e){"xn--"===t.substr(0,4)&&(t=P.default.toUnicode(t));var n=!1;(kr(t)!==t||"-"===t[3]&&"-"===t[4]||"-"===t[0]||"-"===t[t.length-1]||-1!==t.indexOf(".")||0===t.search(Lr))&&(n=!0);for(var r=Dr(t),o=0;o<r;++o){var i=Or(t.codePointAt(o));if(qr===Pr.TRANSITIONAL&&"valid"!==i[1]||qr===Pr.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:t,error:n}}function qr(t,e,n){var r=function(t,e,n){for(var r=!1,o="",i=Dr(t),s=0;s<i;++s){var a=t.codePointAt(s),c=Or(a);switch(c[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,c[2]);break;case"deviation":o+=n===Pr.TRANSITIONAL?String.fromCodePoint.apply(String,c[2]):String.fromCodePoint(a);break;case"valid":o+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":e?(r=!0,o+=String.fromCodePoint(a)):o+=String.fromCodePoint.apply(String,c[2]);break;case"disallowed_STD3_valid":e&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(t,e,n);r.string=kr(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=Nr(o[i]);o[i]=s.label,r.error=r.error||s.error}catch(t){r.error=!0}return{string:o.join("."),error:r.error}}var Br={toASCII:function(t,e,n,r){var o=qr(t,e,n),i=o.string.split(".");if(i=i.map((function(t){try{return P.default.toASCII(t)}catch(e){return o.error=!0,t}})),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(t,e){var n=qr(t,e,Pr.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Pr},Fr=Rr((function(t){const e={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(t){return P.default.ucs2.decode(t).length}function o(t,e){const n=t[e];return isNaN(n)?void 0:String.fromCodePoint(n)}function i(t){return t>=48&&t<=57}function s(t){return t>=65&&t<=90||t>=97&&t<=122}function a(t){return i(t)||t>=65&&t<=70||t>=97&&t<=102}function c(t){return"."===t||"%2e"===t.toLowerCase()}function u(t){return 2===t.length&&s(t.codePointAt(0))&&(":"===t[1]||"|"===t[1])}function d(t){return void 0!==e[t]}function l(t){return d(t.scheme)}function h(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function p(t){return t<=31||t>126}const f=new Set([32,34,35,60,62,63,96,123,125]);function m(t){return p(t)||f.has(t)}const v=new Set([47,58,59,61,64,91,92,93,94,124]);function b(t){return m(t)||v.has(t)}function g(t,e){const n=String.fromCodePoint(t);return e(t)?function(t){const e=new Buffer(t);let n="";for(let t=0;t<e.length;++t)n+=h(e[t]);return n}(n):n}function y(t){let e=10;if(t.length>=2&&"0"===t.charAt(0)&&"x"===t.charAt(1).toLowerCase()?(t=t.substring(2),e=16):t.length>=2&&"0"===t.charAt(0)&&(t=t.substring(1),e=8),""===t)return 0;return(10===e?/[^0-9]/:16===e?/[^0-9A-Fa-f]/:/[^0-7]/).test(t)?n:parseInt(t,e)}function w(t,e){if("["===t[0])return"]"!==t[t.length-1]?n:function(t){const e=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(t=P.default.ucs2.decode(t))[c]){if(58!==t[c+1])return n;c+=2,++r,s=r}for(;c<t.length;){if(8===r)return n;if(58===t[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,d=0;for(;d<4&&a(t[c]);)u=16*u+parseInt(o(t,c),16),++c,++d;if(46===t[c]){if(0===d)return n;if(c-=d,r>6)return n;let s=0;for(;void 0!==t[c];){let a=null;if(s>0){if(!(46===t[c]&&s<4))return n;++c}if(!i(t[c]))return n;for(;i(t[c]);){const e=parseInt(o(t,c));if(null===a)a=e;else{if(0===a)return n;a=10*a+e}if(a>255)return n;++c}e[r]=256*e[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===t[c]){if(++c,void 0===t[c])return n}else if(void 0!==t[c])return n;e[r]=u,++r}if(null!==s){let t=r-s;for(r=7;0!==r&&t>0;){const n=e[s+t-1];e[s+t-1]=e[r],e[r]=n,--r,--t}}else if(null===s&&8!==r)return n;return e}(t.substring(1,t.length-1));if(!e)return function(t){if(e=t,-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var e;let r="";const o=P.default.ucs2.decode(t);for(let t=0;t<o.length;++t)r+=g(o[t],p);return r}(t);const r=function(t){const e=new Buffer(t),n=[];for(let t=0;t<e.length;++t)37!==e[t]?n.push(e[t]):37===e[t]&&a(e[t+1])&&a(e[t+2])?(n.push(parseInt(e.slice(t+1,t+3).toString(),16)),t+=2):n.push(e[t]);return new Buffer(n).toString()}(t),s=Br.toASCII(r,!1,Br.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(t){const e=t.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return t;const r=[];for(const o of e){if(""===o)return t;const e=y(o);if(e===n)return t;r.push(e)}for(let t=0;t<r.length-1;++t)if(r[t]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const t of r)o+=t*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof c||c===n?c:s}function E(t){return"number"==typeof t?function(t){let e="",n=t;for(let t=1;t<=4;++t)e=String(n%256)+e,4!==t&&(e="."+e),n=Math.floor(n/256);return e}(t):t instanceof Array?"["+function(t){let e="";const n=function(t){let e=null,n=1,r=null,o=0;for(let i=0;i<t.length;++i)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),{idx:e,len:n}}(t).idx;let r=!1;for(let o=0;o<=7;++o)r&&0===t[o]||(r&&(r=!1),n!==o?(e+=t[o].toString(16),7!==o&&(e+=":")):(e+=0===o?"::":":",r=!0));return e}(t)+"]":t}function I(t){const e=t.path;var n;0!==e.length&&("file"===t.scheme&&1===e.length&&(n=e[0],/^[A-Za-z]:$/.test(n))||e.pop())}function R(t){return""!==t.username||""!==t.password}function j(t,e,r,o,i){if(this.pointer=0,this.input=t,this.base=e||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 t=function(t){return t.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);t!==this.input&&(this.parseError=!0),this.input=t}const s=function(t){return t.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=P.default.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const t=this.input[this.pointer],e=isNaN(t)?void 0:String.fromCodePoint(t),r=this["parse "+this.state](t,e);if(!r)break;if(r===n){this.failure=!0;break}}}j.prototype["parse scheme start"]=function(t,e){if(s(t))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},j.prototype["parse scheme"]=function(t,e){if(function(t){return s(t)||i(t)}(t)||43===t||45===t||46===t)this.buffer+=e.toLowerCase();else if(58===t){if(this.stateOverride){if(l(this.url)&&!d(this.buffer))return!1;if(!l(this.url)&&d(this.buffer))return!1;if((R(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"):l(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":l(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},j.prototype["parse no scheme"]=function(t){return null===this.base||this.base.cannotBeABaseURL&&35!==t?n:(this.base.cannotBeABaseURL&&35===t?(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)},j.prototype["parse special relative or authority"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},j.prototype["parse path or authority"]=function(t){return 47===t?this.state="authority":(this.state="path",--this.pointer),!0},j.prototype["parse relative"]=function(t){return this.url.scheme=this.base.scheme,isNaN(t)?(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===t?this.state="relative slash":63===t?(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===t?(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"):l(this.url)&&92===t?(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},j.prototype["parse relative slash"]=function(t){return!l(this.url)||47!==t&&92!==t?47===t?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===t&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},j.prototype["parse special authority slashes"]=function(t){return 47===t&&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},j.prototype["parse special authority ignore slashes"]=function(t){return 47!==t&&92!==t?(this.state="authority",--this.pointer):this.parseError=!0,!0},j.prototype["parse authority"]=function(t,e){if(64===t){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const t=r(this.buffer);for(let e=0;e<t;++e){const t=this.buffer.codePointAt(e);if(58===t&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=g(t,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(t)||47===t||63===t||35===t||l(this.url)&&92===t){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},j.prototype["parse hostname"]=j.prototype["parse host"]=function(t,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==t||this.arrFlag)if(isNaN(t)||47===t||63===t||35===t||l(this.url)&&92===t){if(--this.pointer,l(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(R(this.url)||null!==this.url.port))return this.parseError=!0,!1;const t=w(this.buffer,l(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===t?this.arrFlag=!0:93===t&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,n;const t=w(this.buffer,l(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},j.prototype["parse port"]=function(t,r){if(i(t))this.buffer+=r;else{if(!(isNaN(t)||47===t||63===t||35===t||l(this.url)&&92===t||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const t=parseInt(this.buffer);if(t>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=t===(o=this.url.scheme,e[o])?null:t,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const S=new Set([47,92,63,35]);j.prototype["parse file"]=function(t){var e,n;return this.url.scheme="file",47===t||92===t?(92===t&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(t)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(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||(e=t,n=this.input[this.pointer+1],!s(e)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!S.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),I(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},j.prototype["parse file slash"]=function(t){var e;return 47===t||92===t?(92===t&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(e=this.base.path[0]).length&&s(e.codePointAt(0))&&":"===e[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},j.prototype["parse file host"]=function(t,e){if(isNaN(t)||47===t||92===t||63===t||35===t)if(--this.pointer,!this.stateOverride&&u(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 t=w(this.buffer,l(this.url));if(t===n)return n;if("localhost"===t&&(t=""),this.url.host=t,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},j.prototype["parse path start"]=function(t){return l(this.url)?(92===t&&(this.parseError=!0),this.state="path",47!==t&&92!==t&&--this.pointer):this.stateOverride||63!==t?this.stateOverride||35!==t?void 0!==t&&(this.state="path",47!==t&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},j.prototype["parse path"]=function(t){if(isNaN(t)||47===t||l(this.url)&&92===t||!this.stateOverride&&(63===t||35===t)){if(l(this.url)&&92===t&&(this.parseError=!0),!function(t){return".."===(t=t.toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t}(this.buffer)?!c(this.buffer)||47===t||l(this.url)&&92===t?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&u(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(""):(I(this.url),47===t||l(this.url)&&92===t||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===t||63===t||35===t))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===t&&(this.url.query="",this.state="query"),35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=g(t,m);return!0},j.prototype["parse cannot-be-a-base-URL path"]=function(t){return 63===t?(this.url.query="",this.state="query"):35===t?(this.url.fragment="",this.state="fragment"):(isNaN(t)||37===t||(this.parseError=!0),37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(t)||(this.url.path[0]=this.url.path[0]+g(t,p))),!0},j.prototype["parse query"]=function(t,e){if(isNaN(t)||!this.stateOverride&&35===t){l(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const e=new Buffer(this.buffer);for(let t=0;t<e.length;++t)e[t]<33||e[t]>126||34===e[t]||35===e[t]||60===e[t]||62===e[t]?this.url.query+=h(e[t]):this.url.query+=String.fromCodePoint(e[t]);this.buffer="",35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e;return!0},j.prototype["parse fragment"]=function(t){return isNaN(t)||(0===t?this.parseError=!0:(37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=g(t,p))),!0},t.exports.serializeURL=function(t,e){let n=t.scheme+":";if(null!==t.host?(n+="//",""===t.username&&""===t.password||(n+=t.username,""!==t.password&&(n+=":"+t.password),n+="@"),n+=E(t.host),null!==t.port&&(n+=":"+t.port)):null===t.host&&"file"===t.scheme&&(n+="//"),t.cannotBeABaseURL)n+=t.path[0];else for(const e of t.path)n+="/"+e;return null!==t.query&&(n+="?"+t.query),e||null===t.fragment||(n+="#"+t.fragment),n},t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return t.exports.serializeURLOrigin(t.exports.parseURL(e.path[0]))}catch(t){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t){let e=t.scheme+"://";return e+=E(t.host),null!==t.port&&(e+=":"+t.port),e}({scheme:e.scheme,host:e.host,port:e.port});case"file":return"file://";default:return"null"}},t.exports.basicURLParse=function(t,e){void 0===e&&(e={});const n=new j(t,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return n.failure?"failure":n.url},t.exports.setTheUsername=function(t,e){t.username="";const n=P.default.ucs2.decode(e);for(let e=0;e<n.length;++e)t.username+=g(n[e],b)},t.exports.setThePassword=function(t,e){t.password="";const n=P.default.ucs2.decode(e);for(let e=0;e<n.length;++e)t.password+=g(n[e],b)},t.exports.serializeHost=E,t.exports.cannotHaveAUsernamePasswordPort=function(t){return null===t.host||""===t.host||t.cannotBeABaseURL||"file"===t.scheme},t.exports.serializeInteger=function(t){return String(t)},t.exports.parseURL=function(e,n){return void 0===n&&(n={}),t.exports.basicURLParse(e,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));Fr.serializeURL,Fr.serializeURLOrigin,Fr.basicURLParse,Fr.setTheUsername,Fr.setThePassword,Fr.serializeHost,Fr.cannotHaveAUsernamePasswordPort,Fr.serializeInteger,Fr.parseURL;var Gr=class{constructor(t){const e=t[0],n=t[1];let r=null;if(void 0!==n&&(r=Fr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=Fr.basicURLParse(e,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return Fr.serializeURL(this._url)}set href(t){const e=Fr.basicURLParse(t);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return Fr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(t){Fr.basicURLParse(t+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){Fr.cannotHaveAUsernamePasswordPort(this._url)||Fr.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){Fr.cannotHaveAUsernamePasswordPort(this._url)||Fr.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?Fr.serializeHost(t.host):Fr.serializeHost(t.host)+":"+Fr.serializeInteger(t.port)}set host(t){this._url.cannotBeABaseURL||Fr.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":Fr.serializeHost(this._url.host)}set hostname(t){this._url.cannotBeABaseURL||Fr.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":Fr.serializeInteger(this._url.port)}set port(t){Fr.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:Fr.basicURLParse(t,{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(t){this._url.cannotBeABaseURL||(this._url.path=[],Fr.basicURLParse(t,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(t){const e=this._url;if(""===t)return void(e.query=null);const n="?"===t[0]?t.substring(1):t;e.query="",Fr.basicURLParse(n,{url:e,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(t){if(""===t)return void(this._url.fragment=null);const e="#"===t[0]?t.substring(1):t;this._url.fragment="",Fr.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Mr=Rr((function(t){const e=Ar.implSymbol;function n(r){if(!this||this[e]||!(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 t=0;t<arguments.length&&t<2;++t)o[t]=arguments[t];o[0]=Sr.USVString(o[0]),void 0!==o[1]&&(o[1]=Sr.USVString(o[1])),t.exports.setup(this,o)}n.prototype.toJSON=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let t=0;t<arguments.length&&t<0;++t)n[t]=arguments[t];return this[e].toJSON.apply(this[e],n)},Object.defineProperty(n.prototype,"href",{get(){return this[e].href},set(t){t=Sr.USVString(t),this[e].href=t},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[e].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[e].protocol},set(t){t=Sr.USVString(t),this[e].protocol=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[e].username},set(t){t=Sr.USVString(t),this[e].username=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[e].password},set(t){t=Sr.USVString(t),this[e].password=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[e].host},set(t){t=Sr.USVString(t),this[e].host=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[e].hostname},set(t){t=Sr.USVString(t),this[e].hostname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[e].port},set(t){t=Sr.USVString(t),this[e].port=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[e].pathname},set(t){t=Sr.USVString(t),this[e].pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[e].search},set(t){t=Sr.USVString(t),this[e].search=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[e].hash},set(t){t=Sr.USVString(t),this[e].hash=t},enumerable:!0,configurable:!0}),t.exports={is:t=>!!t&&t[e]instanceof Gr,create(t,e){let r=Object.create(n.prototype);return this.setup(r,t,e),r},setup(t,n,r){r||(r={}),r.wrapper=t,t[e]=new Gr(n,r),t[e][Ar.wrapperSymbol]=t},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Mr.is,Mr.create,Mr.setup,Mr.expose;var zr={URL:Mr.interface,serializeURL:Fr.serializeURL,serializeURLOrigin:Fr.serializeURLOrigin,basicURLParse:Fr.basicURLParse,setTheUsername:Fr.setTheUsername,setThePassword:Fr.setThePassword,serializeHost:Fr.serializeHost,serializeInteger:Fr.serializeInteger,parseURL:Fr.parseURL};const Jr=C.default.Readable,Wr=Symbol("buffer"),$r=Symbol("type");class Hr{constructor(){this[$r]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,o=Number(e.length);for(let t=0;t<o;t++){const o=e[t];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 Hr?o[Wr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[Wr]=Buffer.concat(n);let o=e&&void 0!==e.type&&String(e.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[$r]=o)}get size(){return this[Wr].length}get type(){return this[$r]}text(){return Promise.resolve(this[Wr].toString())}arrayBuffer(){const t=this[Wr],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new Jr;return t._read=function(){},t.push(this[Wr]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,o;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),o=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const i=Math.max(o-r,0),s=this[Wr].slice(r,r+i),a=new Hr([],{type:arguments[2]});return a[Wr]=s,a}}function Vr(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let Zr;Object.defineProperties(Hr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Hr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),Vr.prototype=Object.create(Error.prototype),Vr.prototype.constructor=Vr,Vr.prototype.name="FetchError";try{Zr=require("encoding").convert}catch(t){}const Yr=Symbol("Body internals"),Kr=C.default.PassThrough;function Xr(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let o=void 0===r?0:r;var i=n.timeout;let s=void 0===i?0:i;null==t?t=null:to(t)?t=Buffer.from(t.toString()):eo(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof C.default||(t=Buffer.from(String(t)))),this[Yr]={body:t,disturbed:!1,error:null},this.size=o,this.timeout=s,t instanceof C.default&&t.on("error",(function(t){const n="AbortError"===t.name?t:new Vr(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[Yr].error=n}))}function Qr(){var t=this;if(this[Yr].disturbed)return Xr.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Yr].disturbed=!0,this[Yr].error)return Xr.Promise.reject(this[Yr].error);let e=this.body;if(null===e)return Xr.Promise.resolve(Buffer.alloc(0));if(eo(e)&&(e=e.stream()),Buffer.isBuffer(e))return Xr.Promise.resolve(e);if(!(e instanceof C.default))return Xr.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new Xr.Promise((function(i,s){let a;t.timeout&&(a=setTimeout((function(){o=!0,s(new Vr(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(o=!0,s(e)):s(new Vr(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!o&&null!==e){if(t.size&&r+e.length>t.size)return o=!0,void s(new Vr(`content size at ${t.url} over limit: ${t.size}`,"max-size"));r+=e.length,n.push(e)}})),e.on("end",(function(){if(!o){clearTimeout(a);try{i(Buffer.concat(n,r))}catch(e){s(new Vr(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function to(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function eo(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function no(t){let e,n,r=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof C.default&&"function"!=typeof r.getBoundary&&(e=new Kr,n=new Kr,r.pipe(e),r.pipe(n),t[Yr].body=e,r=n),r}function ro(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":to(t)?"application/x-www-form-urlencoded;charset=UTF-8":eo(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof C.default?null:"text/plain;charset=UTF-8"}function oo(t){const e=t.body;return null===e?0:eo(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}Xr.prototype={get body(){return this[Yr].body},get bodyUsed(){return this[Yr].disturbed},arrayBuffer(){return Qr.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return Qr.call(this).then((function(e){return Object.assign(new Hr([],{type:t.toLowerCase()}),{[Wr]:e})}))},json(){var t=this;return Qr.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return Xr.Promise.reject(new Vr(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return Qr.call(this).then((function(t){return t.toString()}))},buffer(){return Qr.call(this)},textConverted(){var t=this;return Qr.call(this).then((function(e){return function(t,e){if("function"!=typeof Zr)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,o,i="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));o=t.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 Zr(t,"UTF-8",i).toString()}(e,t.headers)}))}},Object.defineProperties(Xr.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Xr.mixIn=function(t){for(const e of Object.getOwnPropertyNames(Xr.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(Xr.prototype,e);Object.defineProperty(t,e,n)}},Xr.Promise=global.Promise;const io=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,so=/[^\t\x20-\x7e\x80-\xff]/;function ao(t){if(t=`${t}`,io.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function co(t){if(t=`${t}`,so.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function uo(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const lo=Symbol("map");class ho{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[lo]=Object.create(null),t instanceof ho){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){ao(t=`${t}`);const e=uo(this[lo],t);return void 0===e?null:this[lo][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=po(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],s=o[1];t.call(e,s,i,this),n=po(this),r++}}set(t,e){e=`${e}`,ao(t=`${t}`),co(e);const n=uo(this[lo],t);this[lo][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,ao(t=`${t}`),co(e);const n=uo(this[lo],t);void 0!==n?this[lo][n].push(e):this[lo][t]=[e]}has(t){return ao(t=`${t}`),void 0!==uo(this[lo],t)}delete(t){ao(t=`${t}`);const e=uo(this[lo],t);void 0!==e&&delete this[lo][e]}raw(){return this[lo]}keys(){return mo(this,"key")}values(){return mo(this,"value")}[Symbol.iterator](){return mo(this,"key+value")}}function po(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(t[lo]).sort().map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[lo][e].join(", ")}:function(e){return[e.toLowerCase(),t[lo][e].join(", ")]})}ho.prototype.entries=ho.prototype[Symbol.iterator],Object.defineProperty(ho.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(ho.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 fo=Symbol("internal");function mo(t,e){const n=Object.create(vo);return n[fo]={target:t,kind:e,index:0},n}const vo=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==vo)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[fo];const e=t.target,n=t.kind,r=t.index,o=po(e,n);return r>=o.length?{value:void 0,done:!0}:(this[fo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function bo(t){const e=Object.assign({__proto__:null},t[lo]),n=uo(t[lo],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(vo,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const go=Symbol("Response internals"),yo=U.default.STATUS_CODES;class wo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xr.call(this,t,e);const n=e.status||200,r=new ho(e.headers);if(null!=t&&!r.has("Content-Type")){const e=ro(t);e&&r.append("Content-Type",e)}this[go]={url:e.url,status:n,statusText:e.statusText||yo[n],headers:r,counter:e.counter}}get url(){return this[go].url||""}get status(){return this[go].status}get ok(){return this[go].status>=200&&this[go].status<300}get redirected(){return this[go].counter>0}get statusText(){return this[go].statusText}get headers(){return this[go].headers}clone(){return new wo(no(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Xr.mixIn(wo.prototype),Object.defineProperties(wo.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(wo.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Eo=Symbol("Request internals"),Io=x.default.URL||zr.URL,Ro=x.default.parse,jo=x.default.format;function So(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new Io(t).toString()),Ro(t)}const _o="destroy"in C.default.Readable.prototype;function Co(t){return"object"==typeof t&&"object"==typeof t[Eo]}class Ao{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Co(t)?e=So(t.url):(e=t&&t.href?So(t.href):So(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||Co(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=n.body?n.body:Co(t)&&null!==t.body?no(t):null;Xr.call(this,o,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const i=new ho(n.headers||t.headers||{});if(null!=o&&!i.has("Content-Type")){const t=ro(o);t&&i.append("Content-Type",t)}let s=Co(t)?t.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Eo]={method:r,redirect:n.redirect||t.redirect||"follow",headers:i,parsedURL:e,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[Eo].method}get url(){return jo(this[Eo].parsedURL)}get headers(){return this[Eo].headers}get redirect(){return this[Eo].redirect}get signal(){return this[Eo].signal}clone(){return new Ao(this)}}function Uo(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}Xr.mixIn(Ao.prototype),Object.defineProperty(Ao.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Ao.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Uo.prototype=Object.create(Error.prototype),Uo.prototype.constructor=Uo,Uo.prototype.name="AbortError";const xo=x.default.URL||zr.URL,Po=C.default.PassThrough;function ko(t,e){if(!ko.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Xr.Promise=ko.Promise,new ko.Promise((function(n,r){const o=new Ao(t,e),i=function(t){const e=t[Eo].parsedURL,n=new ho(t[Eo].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof C.default.Readable&&!_o)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(r="0"),null!=t.body){const e=oo(t);"number"==typeof e&&(r=String(e))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=t.agent;return"function"==typeof o&&(o=o(e)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:bo(n),agent:o})}(o),s=("https:"===i.protocol?k.default:U.default).request,a=o.signal;let c=null;const u=function(){let t=new Uo("The user aborted a request.");r(t),o.body&&o.body instanceof C.default.Readable&&o.body.destroy(t),c&&c.body&&c.body.emit("error",t)};if(a&&a.aborted)return void u();const d=function(){u(),p()},l=s(i);let h;function p(){l.abort(),a&&a.removeEventListener("abort",d),clearTimeout(h)}a&&a.addEventListener("abort",d),o.timeout&&l.once("socket",(function(t){h=setTimeout((function(){r(new Vr(`network timeout at: ${o.url}`,"request-timeout")),p()}),o.timeout)})),l.on("error",(function(t){r(new Vr(`request to ${o.url} failed, reason: ${t.message}`,"system",t)),p()})),l.on("response",(function(t){clearTimeout(h);const e=function(t){const e=new ho;for(const n of Object.keys(t))if(!io.test(n))if(Array.isArray(t[n]))for(const r of t[n])so.test(r)||(void 0===e[lo][n]?e[lo][n]=[r]:e[lo][n].push(r));else so.test(t[n])||(e[lo][n]=[t[n]]);return e}(t.headers);if(ko.isRedirect(t.statusCode)){const i=e.get("Location");let s=null;try{s=null===i?null:new xo(i,o.url).toString()}catch(t){if("manual"!==o.redirect)return r(new Vr(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void p()}switch(o.redirect){case"error":return r(new Vr(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),void p();case"manual":if(null!==s)try{e.set("Location",s)}catch(t){r(t)}break;case"follow":if(null===s)break;if(o.counter>=o.follow)return r(new Vr(`maximum redirect reached at: ${o.url}`,"max-redirect")),void p();const i={headers:new ho(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:o.body,signal:o.signal,timeout:o.timeout,size:o.size};if(!function(t,e){const n=new xo(e).hostname,r=new xo(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(o.url,s))for(const t of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(t);return 303!==t.statusCode&&o.body&&null===oo(o)?(r(new Vr("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void p()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==o.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(ko(new Ao(s,i))),void p())}}t.once("end",(function(){a&&a.removeEventListener("abort",d)}));let i=t.pipe(new Po);const s={url:o.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:o.size,timeout:o.timeout,counter:o.counter},u=e.get("Content-Encoding");if(!o.compress||"HEAD"===o.method||null===u||204===t.statusCode||304===t.statusCode)return c=new wo(i,s),void n(c);const l={flush:O.default.Z_SYNC_FLUSH,finishFlush:O.default.Z_SYNC_FLUSH};if("gzip"==u||"x-gzip"==u)return i=i.pipe(O.default.createGunzip(l)),c=new wo(i,s),void n(c);if("deflate"!=u&&"x-deflate"!=u){if("br"==u&&"function"==typeof O.default.createBrotliDecompress)return i=i.pipe(O.default.createBrotliDecompress()),c=new wo(i,s),void n(c);c=new wo(i,s),n(c)}else{t.pipe(new Po).once("data",(function(t){i=8==(15&t[0])?i.pipe(O.default.createInflate()):i.pipe(O.default.createInflateRaw()),c=new wo(i,s),n(c)}))}})),function(t,e){const n=e.body;null===n?t.end():eo(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(l,o)}))}ko.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},ko.Promise=global.Promise;var Oo="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,To=Oo?ko:window.fetch;var Do=function(t){return Array.isArray(t)?t:[t]},Lo=function(t,e){return X(void 0,void 0,void 0,(function(){var n;return Q(this,(function(r){return n=Promise.resolve([]),[2,t.reduce((function(t,n){return t.then((function(t){return e(n).then((function(e){return t.push(e),t}))}))}),n)]}))}))},No=function(t){function e(e){void 0===e&&(e=8192);var n=t.call(this)||this;return n.bufferDefaultSize=e,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return Y(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.getContentsAsString=function(t,e){void 0===t&&(t="utf8");var n=this.buffer.toString(t,0,Math.min(e||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},e.prototype.adaptBuffer=function(t){if(this.buffer.length-this.size<t){var e=Math.ceil((t-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*e);this.buffer.copy(n,0,0,this.size),this.buffer=n}},e.prototype._write=function(t,e,n){this.adaptBuffer(t.length),t.copy(this.buffer,this.size,0),this._size+=t.length,n()},e}(C.default.Writable),qo=function(){function t(t,e){this.contextProvider=t,this.agent=e}return t.prototype.getServiceDetails=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/services/").concat(e))]}))}))},t.prototype.getAddonDetails=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/addons/").concat(e))]}))}))},t.prototype.fetch=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return Q(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=Er({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},K(K({},e),{agent:this.agent})),[4,ac(2)((function(){return X(a,void 0,void 0,(function(){return Q(this,(function(e){return[2,To(t,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=c.sent()).ok?[3,3]:[4,o.text()];case 2:i=c.sent(),s=n;try{s=JSON.parse(i)}catch(t){s=null!=i?i:n}finally{throw new Error(JSON.stringify(s))}case 3:return[4,o.json()];case 4:return[2,c.sent()]}}))}))},t}(),Bo=function(t,e,n){return X(void 0,void 0,void 0,(function(){var r,o,i,s,a;return Q(this,(function(c){switch(c.label){case 0:if(r=Mo(e||"127.0.0.1"),(o=Mo(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===D.default.platform()&&(i=function(t){return X(void 0,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return e="lo0 alias ".concat(t," up"),[4,Go.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=o?(a=zo(s),[4,Fo(t,a)]):[3,6];case 2:return c.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:c.sent(),c.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(t,"' 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."))}}))}))},Fo=function(t,e){return new Promise((function(n){var r=new u.Socket,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)})),e?r.connect(t,e):r.connect(t)}))},Go=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return X(void 0,void 0,void 0,(function(){return Q(this,(function(e){switch(e.label){case 0:return[4,Jo("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}}))}))},Mo=function(t){var e=t.split(".").reverse();if(4!==e.length)throw new Error("Invalid ip address: ".concat(t));for(var n=0,r=0;r<4;r+=1){var o=Number.parseInt(e[r],10);if(o<0||o>255)throw new Error("Invalid ip address: ".concat(t));n+=o<<8*r}return n},zo=function(t){if(!Number.isSafeInteger(t))throw new Error("Number is not an integer");if(t<0||t>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var e=[],n=0;n<4;n+=1)e.push(t>>8*n&255);return e.reverse().join(".")},Jo=function(t,n,r){var o=e.spawn(t,n,K({windowsHide:!0},r)),i=new Promise((function(e,i){var s="",a="";(null===(null==r?void 0:r.stdio)||void 0===(null==r?void 0:r.stdio))&&(o.stdout&&o.stdout.on("data",(function(t){s+=t})),o.stderr&&o.stderr.on("data",(function(t){a+=t}))),o.on("close",(function(r){var o={code:r,stdout:s,stderr:a};if(0!==r){var c="Error during execution of command '".concat(t," ").concat(n.join(" "),"': ").concat(a);i({message:c,result:o})}else e(o)}))}));return{process:o,resultPromise:i}},Wo=function(t,e,n){return X(void 0,void 0,void 0,(function(){var r,o;return Q(this,(function(i){switch(i.label){case 0:return r=$o(t,10),[4,q.default.promises.writeFile(r,e,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,q.default.promises.rename(r,t)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,q.default.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},$o=function(t,e){for(var n,r=B.default.dirname(t),o=B.default.basename(t),i=0;null===(n=i<e)||void 0===n||n;i+=1){var s=tt([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),c=B.default.join(r,a);if(!q.default.existsSync(c))return c}throw new Error("Could not write file to file '".concat(t,"'."))},Ho="win32"===process.platform?"\r\n":"\n",Vo=function(){function t(t,e){this.nodes=t,this.config=e}return t.prototype.add=function(t,e,n){var r=this;if(0===e.length)return this;var o=this.findOrCreateEntry(t,n);return e.forEach((function(t){if(!o.hosts.find((function(e){return e.host===t}))){var e=1;0===o.hosts.length&&(e=r.config.indent-"".concat(o.ipPrefixWhitespace).concat(o.ip).length),o.hosts.push({whitespace:" ".repeat(e<1?1:e),host:t})}})),this},t.prototype.remove=function(t,e){var n=this;return this.findEntries(t).forEach((function(t){e.forEach((function(e){var r=t.hosts.findIndex((function(t){return t.host===e}));r<0||(0===r&&void 0!==t.hosts[1]&&(t.hosts[1].whitespace=t.hosts[0].whitespace),t.hosts.splice(r,1),0===t.hosts.length&&n.removeEntry(t))}))})),this},t.prototype.removeHosts=function(t){var e=this;ei(this.nodes,"entry").forEach((function(n){e.remove(n.ip,t)}))},t.prototype.removeIps=function(t){var e=this;return t.forEach((function(t){e.findEntries(t).forEach((function(t){return e.removeEntry(t)}))})),this},t.prototype.resolveHosts=function(t){return mr(this.findEntries(t),(function(t){return t.hosts.map((function(t){return t.host}))}))},t.prototype.resolveIps=function(t){return ei(this.nodes,"entry").filter((function(e){return e.hosts.some((function(e){return e.host===t}))})).map((function(t){return t.ip}))},t.prototype.toString=function(){return Xo(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||ht(e)&&"[object Number]"==lt(e)?t:this.nodes.findIndex((function(e){return e===t}));n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return ei(this.nodes,"entry").filter((function(e){return e.ip===t}))},t.prototype.findOrCreateEntry=function(t,e){var n=this.findEntries(t)[0];if(n)return n;var r=this.makeEntry(t);if(e){var o=Ko(e),i=this.nodes.findIndex((function(t){return"comment"===t.type&&t.line===o}));if(i>=0)this.insertAt(i+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[Zo(),Yo(o),r]:[Yo(o),r];this.insertAt.apply(this,tt([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},t.prototype.insertAt=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.nodes).splice.apply(e,tt([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return K({type:"entry",ip:t,ipPrefixWhitespace:n,hosts:[]},e)},t.fromNodes=function(e,n){var r,o;return new t(e.filter((function(t){return"eol"!==t.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var t,n=ei(e,"eol").map((function(t){return t.line}));return null!==(t=ni(n))&&void 0!==t?t:Ho}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var t,n=mr(ei(e,"entry"),(function(t){var e=t.ipPrefixWhitespace,n=t.ip,r=t.hosts[0];return r?["".concat(e).concat(n).concat(r.whitespace).length]:[]}));return null!==(t=ni(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(Qo(t),e)},t}(),Zo=function(){return{type:"blank",line:""}},Yo=function(t){return{type:"comment",line:Ko(t)}},Ko=function(t){return t.startsWith("#")?t:"# ".concat(t)},Xo=function(t,e){var n=t.map((function(t){switch(t.type){case"entry":var e=t.hosts.map((function(t){var e=t.whitespace,n=t.host;return"".concat(e).concat(n)})).join("");return"".concat(t.ipPrefixWhitespace).concat(t.ip).concat(e);case"blank":case"comment":case"invalid":return t.line;default:return""}}));return n.join(null!=e?e:Ho)},Qo=function(t){return t.split(/(\r?\n)/).map((function(t){return function(t){return t.match(/^\s*#.*$/)}(t)?{type:"comment",line:t}:function(t){return t.match(/^(\r?\n)$/)}(t)?{type:"eol",line:t}:function(t){return t.match(/^\s*$/)}(t)?{type:"blank",line:t}:ti(t)}))},ti=function(t){var e=t.match(/^(\s*)(\S+)(.+)?$/);if(!e)return{type:"invalid",line:t};var n=e[1],r=e[2],o=e.slice(3),i=!1,s=mr(o.filter((function(t){return void 0!==t})),(function(t){var e=t.match(/(\s+)(\S+)/g);return e?e.map((function(t){var e=t.match(/^(\s+)(\S+)$/);e||(i=!0);var n=null!=e?e:[];return{whitespace:n[1],host:n[2]}})):(i=!0,[])}));return i?{type:"invalid",line:t}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},ei=function(t,e){return t.filter((function(t){return t.type===e}))},ni=function(t){var e=new Map;t.forEach((function(t){var n;e.set(t,(null!==(n=e.get(t))&&void 0!==n?n:0)+1)}));var n=yr(Array.from(e.entries()),(function(t){return t[1]}));if(n)return n[0]},ri="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",oi=function(){function t(t){this.ast=Vo.fromNodes([]);var e={writeMode:"atomic",hostsFile:ri};this.config=K(K({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!gr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!gr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.add(t,e,this.config.header),this},t.prototype.remove=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!gr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!gr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.remove(t,e),this},t.prototype.removeHosts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!gr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeHosts(t),this},t.prototype.removeIps=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!gr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeIps(t),this},t.prototype.read=function(){return X(this,void 0,void 0,(function(){var t;return Q(this,(function(e){switch(e.label){case 0:return[4,q.default.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=Vo.parse(t.toString(),this.config),[2,this]}}))}))},t.prototype.write=function(t){return X(this,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){switch(i.label){case 0:switch(e=K(K({},this.config),t),n=e.hostsFile,r=e.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,Wo(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,q.default.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},t.prototype.backup=function(t){return X(this,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){switch(i.label){case 0:return q.default.existsSync(this.config.hostsFile)?(e=B.default.dirname(this.config.hostsFile),n=B.default.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),o=B.default.resolve(e,r),q.default.existsSync(o)&&!t.rewrite?[3,2]:[4,q.default.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},t.load=function(e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){switch(n.label){case 0:return[4,new t(e).read()];case 1:return[2,n.sent()]}}))}))},t}(),ii=function(){function t(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(t.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),t.prototype.enter=function(t){return X(this,void 0,void 0,(function(){var e,n=this;return Q(this,(function(r){return this._queueLength+=1,e=this.previousPromise.then((function(){return n._queueLength-=1,t()}),(function(){return n._queueLength-=1,t()})),this.previousPromise=e,[2,e]}))}))},t}(),si=function t(e,n){if(e&&n)return t(e)(n);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),o=t[t.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach((function(t){r[t]=o[t]})),r}};var ai=si(ui),ci=si(di);function ui(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function di(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}ui.proto=ui((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ui(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return di(this)},configurable:!0})})),ai.strict=ci;var li,hi=function(){},pi=function(t,e,n){if("function"==typeof e)return pi(t,null,e);e||(e={}),n=ai(n||hi);var r=t._writableState,o=t._readableState,i=e.readable||!1!==e.readable&&t.readable,s=e.writable||!1!==e.writable&&t.writable,a=!1,c=function(){t.writable||u()},u=function(){s=!1,i||n.call(t)},d=function(){i=!1,s||n.call(t)},l=function(e){n.call(t,e?new Error("exited with error code: "+e):null)},h=function(e){n.call(t,e)},p=function(){process.nextTick(f)},f=function(){if(!a)return(!i||o&&o.ended&&!o.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(t,new Error("premature close"))},m=function(){t.req.on("finish",u)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?s&&!r&&(t.on("end",c),t.on("close",c)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",l),t.on("end",d),t.on("finish",u),!1!==e.error&&t.on("error",h),t.on("close",p),function(){a=!0,t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("exit",l),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}},fi=pi;try{li=q.default}catch(t){}var mi=function(){},vi=/^v?\.0/.test(process.version),bi=function(t){return"function"==typeof t},gi=function(t,e,n,r){r=ai(r);var o=!1;t.on("close",(function(){o=!0})),fi(t,{readable:e,writable:n},(function(t){if(t)return r(t);o=!0,r()}));var i=!1;return function(e){if(!o&&!i)return i=!0,function(t){return!!vi&&!!li&&(t instanceof(li.ReadStream||mi)||t instanceof(li.WriteStream||mi))&&bi(t.close)}(t)?t.close(mi):function(t){return t.setHeader&&bi(t.abort)}(t)?t.abort():bi(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},yi=function(t){t()},wi=function(t,e){return t.pipe(e)},Ei=function(){var t,e=Array.prototype.slice.call(arguments),n=bi(e[e.length-1]||mi)&&e.pop()||mi;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map((function(o,i){var s=i<e.length-1;return gi(o,s,i>0,(function(e){t||(t=e),e&&r.forEach(yi),s||(r.forEach(yi),n(t))}))}));return e.reduce(wi)};const Ii=["nodebuffer","arraybuffer","fragments"],Ri="undefined"!=typeof Blob;Ri&&Ii.push("blob");var ji={BINARY_TYPES:Ii,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ri,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},Si="function"==typeof __webpack_require__?__non_webpack_require__:Ir,_i=process.config&&process.config.variables||{},Ci=!!process.env.PREBUILDS_ONLY,Ai=process.versions.modules,Ui=!(!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",xi=process.env.npm_config_arch||D.default.arch(),Pi=process.env.npm_config_platform||D.default.platform(),ki=process.env.LIBC||(function(t){return"linux"===t&&q.default.existsSync("/etc/alpine-release")}(Pi)?"musl":"glibc"),Oi=process.env.ARM_VERSION||("arm64"===xi?"8":_i.arm_version)||"",Ti=(process.versions.uv||"").split(".")[0],Di=Li;function Li(t){return Si(Li.resolve(t))}function Ni(t){try{return q.default.readdirSync(t)}catch(t){return[]}}function qi(t,e){var n=Ni(t).filter(e);return n[0]&&B.default.join(t,n[0])}function Bi(t){return/\.node$/.test(t)}function Fi(t){var e=t.split("-");if(2===e.length){var n=e[0],r=e[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:t,platform:n,architectures:r}}}function Gi(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function Mi(t,e){return t.architectures.length-e.architectures.length}function zi(t){var e=t.split("."),n={file:t,specificity:0};if("node"===e.pop()){for(var r=0;r<e.length;r++){var o=e[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 Ji(t,e){return function(n){return null!=n&&(!(n.runtime&&n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi&&n.abi!==e&&!n.napi)&&((!n.uv||n.uv===Ti)&&((!n.armv||n.armv===Oi)&&(!n.libc||n.libc===ki)))))}}function Wi(t){return function(e,n){return e.runtime!==n.runtime?e.runtime===t?-1:1:e.abi!==n.abi?e.abi?-1:1:e.specificity!==n.specificity?e.specificity>n.specificity?-1:1:0}}Li.resolve=Li.path=function(t){t=B.default.resolve(t||".");try{var e=Si(B.default.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!Ci){var n=qi(B.default.join(t,"build/Release"),Bi);if(n)return n;var r=qi(B.default.join(t,"build/Debug"),Bi);if(r)return r}var o=a(t);if(o)return o;var i=a(B.default.dirname(process.execPath));if(i)return i;var s=["platform="+Pi,"arch="+xi,"runtime="+Ui,"abi="+Ai,"uv="+Ti,Oi?"armv="+Oi:"","libc="+ki,"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: "+t+"\n");function a(t){var e=Ni(B.default.join(t,"prebuilds")).map(Fi).filter(Gi(Pi,xi)).sort(Mi)[0];if(e){var n=B.default.join(t,"prebuilds",e.name),r=Ni(n).map(zi).filter(Ji(Ui,Ai)).sort(Wi(Ui))[0];return r?B.default.join(n,r.file):void 0}}},Li.parseTags=zi,Li.matchTags=Ji,Li.compareTags=Wi,Li.parseTuple=Fi,Li.matchTuple=Gi,Li.compareTuples=Mi;var $i=Rr((function(t){const e="function"==typeof __webpack_require__?__non_webpack_require__:Ir;"function"==typeof e.addon?t.exports=e.addon.bind(e):t.exports=Di}));var Hi={mask:(t,e,n,r,o)=>{for(var i=0;i<o;i++)n[r+i]=t[i]^e[3&i]},unmask:(t,e)=>{const n=t.length;for(var r=0;r<n;r++)t[r]^=e[3&r]}},Vi=Rr((function(t){try{t.exports=$i(__dirname)}catch(e){t.exports=Hi}})),Zi=Rr((function(t){const{EMPTY_BUFFER:e}=ji,n=Buffer[Symbol.species];function r(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[i]^e[3&i]}function o(t,e){for(let n=0;n<t.length;n++)t[n]^=e[3&n]}if(t.exports={concat:function(t,r){if(0===t.length)return e;if(1===t.length)return t[0];const o=Buffer.allocUnsafe(r);let i=0;for(let e=0;e<t.length;e++){const n=t[e];o.set(n,i),i+=n.length}return i<r?new n(o.buffer,o.byteOffset,i):o},mask:r,toArrayBuffer:function(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)},toBuffer:function t(e){if(t.readOnly=!0,Buffer.isBuffer(e))return e;let r;return e instanceof ArrayBuffer?r=new n(e):ArrayBuffer.isView(e)?r=new n(e.buffer,e.byteOffset,e.byteLength):(r=Buffer.from(e),t.readOnly=!1),r},unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{const e=Vi;t.exports.mask=function(t,n,o,i,s){s<48?r(t,n,o,i,s):e.mask(t,n,o,i,s)},t.exports.unmask=function(t,n){t.length<32?o(t,n):e.unmask(t,n)}}catch(t){}}));Zi.concat,Zi.mask,Zi.toArrayBuffer,Zi.toBuffer,Zi.unmask;const Yi=Symbol("kDone"),Ki=Symbol("kRun");var Xi=class{constructor(t){this[Yi]=()=>{this.pending--,this[Ki]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Ki]()}[Ki](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[Yi])}}};const{kStatusCode:Qi}=ji,ts=Buffer[Symbol.species],es=Buffer.from([0,0,255,255]),ns=Symbol("permessage-deflate"),rs=Symbol("total-length"),os=Symbol("callback"),is=Symbol("buffers"),ss=Symbol("error");let as;var cs=class{constructor(t,e,n){if(this._maxPayload=0|n,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!as){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;as=new Xi(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[os];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,n=t.find((t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"==typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"==typeof e.clientMaxWindowBits&&!t.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(n.server_no_context_takeover=!0),e.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof e.serverMaxWindowBits&&(n.server_max_window_bits=e.serverMaxWindowBits),"number"==typeof e.clientMaxWindowBits?n.client_max_window_bits=e.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach((t=>{Object.keys(t).forEach((e=>{let n=t[e];if(n.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(n=n[0],"client_max_window_bits"===e){if(!0!==n){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}else if("server_max_window_bits"===e){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}t[e]=n}))})),t}decompress(t,e,n){as.add((r=>{this._decompress(t,e,((t,e)=>{r(),n(t,e)}))}))}compress(t,e,n){as.add((r=>{this._compress(t,e,((t,e)=>{r(),n(t,e)}))}))}_decompress(t,e,n){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?O.default.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=O.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[ns]=this,this._inflate[rs]=0,this._inflate[is]=[],this._inflate.on("error",ls),this._inflate.on("data",ds)}this._inflate[os]=n,this._inflate.write(t),e&&this._inflate.write(es),this._inflate.flush((()=>{const t=this._inflate[ss];if(t)return this._inflate.close(),this._inflate=null,void n(t);const o=Zi.concat(this._inflate[is],this._inflate[rs]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[rs]=0,this._inflate[is]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)}))}_compress(t,e,n){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?O.default.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=O.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[rs]=0,this._deflate[is]=[],this._deflate.on("data",us)}this._deflate[os]=n,this._deflate.write(t),this._deflate.flush(O.default.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=Zi.concat(this._deflate[is],this._deflate[rs]);e&&(t=new ts(t.buffer,t.byteOffset,t.length-4)),this._deflate[os]=null,this._deflate[rs]=0,this._deflate[is]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)}))}};function us(t){this[is].push(t),this[rs]+=t.length}function ds(t){this[rs]+=t.length,this[ns]._maxPayload<1||this[rs]<=this[ns]._maxPayload?this[is].push(t):(this[ss]=new RangeError("Max payload size exceeded"),this[ss].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ss][Qi]=1009,this.removeListener("data",ds),this.reset())}function ls(t){this[ns]._inflate=null,this[ss]?this[os](this[ss]):(t[Qi]=1007,this[os](t))}var hs=function(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0},ps=Rr((function(t){try{t.exports=$i(__dirname)}catch(e){t.exports=hs}})),fs=Rr((function(t){const{isUtf8:e}=M.default,{hasBlob:n}=ji;function r(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0}if(t.exports={isBlob:function(t){return n&&"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&("Blob"===t[Symbol.toStringTag]||"File"===t[Symbol.toStringTag])},isValidStatusCode:function(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999},isValidUTF8:r,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]},e)t.exports.isValidUTF8=function(t){return t.length<24?r(t):e(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=ps;t.exports.isValidUTF8=function(t){return t.length<32?r(t):e(t)}}catch(t){}}));fs.isBlob,fs.isValidStatusCode,fs.isValidUTF8,fs.tokenChars;const{Writable:ms}=C.default,{BINARY_TYPES:vs,EMPTY_BUFFER:bs,kStatusCode:gs,kWebSocket:ys}=ji,{concat:ws,toArrayBuffer:Es,unmask:Is}=Zi,{isValidStatusCode:Rs,isValidUTF8:js}=fs,Ss=Buffer[Symbol.species];var _s=class extends ms{constructor(t={}){super(),this._allowSynchronousEvents=void 0===t.allowSynchronousEvents||t.allowSynchronousEvents,this._binaryType=t.binaryType||vs[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[ys]=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._errored=!1,this._loop=!1,this._state=0}_write(t,e,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){const e=this._buffers[0];return this._buffers[0]=new Ss(e.buffer,e.byteOffset+t,e.length-t),new Ss(e.buffer,e.byteOffset,t)}const e=Buffer.allocUnsafe(t);do{const n=this._buffers[0],r=e.length-t;t>=n.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(n.buffer,n.byteOffset,t),r),this._buffers[0]=new Ss(n.buffer,n.byteOffset+t,n.length-t)),t-=n.length}while(t>0);return e}startLoop(t){this._loop=!0;do{switch(this._state){case 0:this.getInfo(t);break;case 1:this.getPayloadLength16(t);break;case 2:this.getPayloadLength64(t);break;case 3:this.getMask();break;case 4:this.getData(t);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(48&e[0]){return void t(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~e[0]);if(!n||this._extensions[cs.extensionName]){if(this._fin=!(128&~e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(n){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void t(this.createError(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 void t(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void t(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void t(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void t(this.createError(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&~e[1]),this._isServer){if(!this._masked){return void t(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void t(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(t)}else{t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(t){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t))}getPayloadLength64(t){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),n=e.readUInt32BE(0);if(n>Math.pow(2,21)-1){t(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(t){let e=bs;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);e=this.consume(this._payloadLength),this._masked&&0!==(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Is(e,this._mask)}if(this._opcode>7)this.controlMessage(e,t);else{if(this._compressed)return this._state=5,void this.decompress(e,t);e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage(t)}}decompress(t,e){this._extensions[cs.extensionName].decompress(t,this._fin,((t,n)=>{if(t)return e(t);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void e(t)}this._fragments.push(n)}this.dataMessage(e),0===this._state&&this.startLoop(e)}))}dataMessage(t){if(!this._fin)return void(this._state=0);const e=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?ws(n,e):"arraybuffer"===this._binaryType?Es(ws(n,e)):"blob"===this._binaryType?new Blob(n):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(t)})))}else{const r=ws(n,e);if(!this._skipUTF8Validation&&!js(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(t)})))}}controlMessage(t,e){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",t),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",t),this._state=0,this.startLoop(e)})));else{if(0===t.length)this._loop=!1,this.emit("conclude",1005,bs),this.end();else{const n=t.readUInt16BE(0);if(!Rs(n)){const t=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void e(t)}const r=new Ss(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!js(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(t,e,n,r,o){this._loop=!1,this._errored=!0;const i=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(i,this.createError),i.code=o,i[gs]=r,i}};const{randomFillSync:Cs}=G.default,{EMPTY_BUFFER:As,kWebSocket:Us,NOOP:xs}=ji,{isBlob:Ps,isValidStatusCode:ks}=fs,{mask:Os,toBuffer:Ts}=Zi,Ds=Symbol("kByteLength"),Ls=Buffer.alloc(4),Ns=8192;let qs,Bs=Ns;class Fs{constructor(t,e,n){this._extensions=e||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=xs,this[Us]=void 0}static frame(t,e){let n,r,o=!1,i=2,s=!1;e.mask&&(n=e.maskBuffer||Ls,e.generateMask?e.generateMask(n):(Bs===Ns&&(void 0===qs&&(qs=Buffer.alloc(Ns)),Cs(qs,0,Ns),Bs=0),n[0]=qs[Bs++],n[1]=qs[Bs++],n[2]=qs[Bs++],n[3]=qs[Bs++]),s=0===(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof t?r=e.mask&&!s||void 0===e[Ds]?(t=Buffer.from(t)).length:e[Ds]:(r=t.length,o=e.mask&&e.readOnly&&!s);let a=r;r>=65536?(i+=8,a=127):r>125&&(i+=2,a=126);const c=Buffer.allocUnsafe(o?r+i:i);return c[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(c[0]|=64),c[1]=a,126===a?c.writeUInt16BE(r,2):127===a&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),e.mask?(c[1]|=128,c[i-4]=n[0],c[i-3]=n[1],c[i-2]=n[2],c[i-1]=n[3],s?[c,t]:o?(Os(t,n,c,i,r),[c]):(Os(t,n,t,0,r),[c,t])):[c,t]}close(t,e,n,r){let o;if(void 0===t)o=As;else{if("number"!=typeof t||!ks(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==e&&e.length){const n=Buffer.byteLength(e);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+n),o.writeUInt16BE(t,0),"string"==typeof e?o.write(e,2):o.set(e,2)}else o=Buffer.allocUnsafe(2),o.writeUInt16BE(t,0)}const i={[Ds]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(Fs.frame(o,i),r)}ping(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):Ps(t)?(r=t.size,o=!1):(r=(t=Ts(t)).length,o=Ts.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ds]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};Ps(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,i,n]):this.getBlobData(t,!1,i,n):0!==this._state?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(Fs.frame(t,i),n)}pong(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):Ps(t)?(r=t.size,o=!1):(r=(t=Ts(t)).length,o=Ts.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ds]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};Ps(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,i,n]):this.getBlobData(t,!1,i,n):0!==this._state?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(Fs.frame(t,i),n)}send(t,e,n){const r=this._extensions[cs.extensionName];let o,i,s=e.binary?2:1,a=e.compress;"string"==typeof t?(o=Buffer.byteLength(t),i=!1):Ps(t)?(o=t.size,i=!1):(o=(t=Ts(t)).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),e.fin&&(this._firstFragment=!0);const c={[Ds]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};Ps(t)?0!==this._state?this.enqueue([this.getBlobData,t,this._compress,c,n]):this.getBlobData(t,this._compress,c,n):0!==this._state?this.enqueue([this.dispatch,t,this._compress,c,n]):this.dispatch(t,this._compress,c,n)}getBlobData(t,e,n,r){this._bufferedBytes+=n[Ds],this._state=2,t.arrayBuffer().then((t=>{if(this._socket.destroyed){const t=new Error("The socket was closed while the blob was being read");return void process.nextTick(Ms,this,t,r)}this._bufferedBytes-=n[Ds];const o=Ts(t);e?this.dispatch(o,e,n,r):(this._state=0,this.sendFrame(Fs.frame(o,n),r),this.dequeue())})).catch((t=>{process.nextTick(zs,this,t,r)}))}dispatch(t,e,n,r){if(!e)return void this.sendFrame(Fs.frame(t,n),r);const o=this._extensions[cs.extensionName];this._bufferedBytes+=n[Ds],this._state=1,o.compress(t,n.fin,((t,e)=>{if(this._socket.destroyed){Ms(this,new Error("The socket was closed while data was being compressed"),r)}else this._bufferedBytes-=n[Ds],this._state=0,n.readOnly=!1,this.sendFrame(Fs.frame(e,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][Ds],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Ds],this._queue.push(t)}sendFrame(t,e){2===t.length?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}}var Gs=Fs;function Ms(t,e,n){"function"==typeof n&&n(e);for(let n=0;n<t._queue.length;n++){const r=t._queue[n],o=r[r.length-1];"function"==typeof o&&o(e)}}function zs(t,e,n){Ms(t,e,n),t.onerror(e)}const{kForOnEventAttribute:Js,kListener:Ws}=ji,$s=Symbol("kCode"),Hs=Symbol("kData"),Vs=Symbol("kError"),Zs=Symbol("kMessage"),Ys=Symbol("kReason"),Ks=Symbol("kTarget"),Xs=Symbol("kType"),Qs=Symbol("kWasClean");class ta{constructor(t){this[Ks]=null,this[Xs]=t}get target(){return this[Ks]}get type(){return this[Xs]}}Object.defineProperty(ta.prototype,"target",{enumerable:!0}),Object.defineProperty(ta.prototype,"type",{enumerable:!0});class ea extends ta{constructor(t,e={}){super(t),this[$s]=void 0===e.code?0:e.code,this[Ys]=void 0===e.reason?"":e.reason,this[Qs]=void 0!==e.wasClean&&e.wasClean}get code(){return this[$s]}get reason(){return this[Ys]}get wasClean(){return this[Qs]}}Object.defineProperty(ea.prototype,"code",{enumerable:!0}),Object.defineProperty(ea.prototype,"reason",{enumerable:!0}),Object.defineProperty(ea.prototype,"wasClean",{enumerable:!0});class na extends ta{constructor(t,e={}){super(t),this[Vs]=void 0===e.error?null:e.error,this[Zs]=void 0===e.message?"":e.message}get error(){return this[Vs]}get message(){return this[Zs]}}Object.defineProperty(na.prototype,"error",{enumerable:!0}),Object.defineProperty(na.prototype,"message",{enumerable:!0});class ra extends ta{constructor(t,e={}){super(t),this[Hs]=void 0===e.data?null:e.data}get data(){return this[Hs]}}Object.defineProperty(ra.prototype,"data",{enumerable:!0});const oa={addEventListener(t,e,n={}){for(const r of this.listeners(t))if(!n[Js]&&r[Ws]===e&&!r[Js])return;let r;if("message"===t)r=function(t,n){const r=new ra("message",{data:n?t:t.toString()});r[Ks]=this,sa(e,this,r)};else if("close"===t)r=function(t,n){const r=new ea("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Ks]=this,sa(e,this,r)};else if("error"===t)r=function(t){const n=new na("error",{error:t,message:t.message});n[Ks]=this,sa(e,this,n)};else{if("open"!==t)return;r=function(){const t=new ta("open");t[Ks]=this,sa(e,this,t)}}r[Js]=!!n[Js],r[Ws]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[Ws]===e&&!n[Js]){this.removeListener(t,n);break}}};var ia={CloseEvent:ea,ErrorEvent:na,Event:ta,EventTarget:oa,MessageEvent:ra};function sa(t,e,n){"object"==typeof t&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}const{tokenChars:aa}=fs;function ca(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var ua={format:function(t){return Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>[e].concat(Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>!0===t?e:`${e}=${t}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(t){const e=Object.create(null);let n,r,o=Object.create(null),i=!1,s=!1,a=!1,c=-1,u=-1,d=-1,l=0;for(;l<t.length;l++)if(u=t.charCodeAt(l),void 0===n)if(-1===d&&1===aa[u])-1===c&&(c=l);else if(0===l||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=t.slice(c,d);44===u?(ca(e,r,o),o=Object.create(null)):n=r,c=d=-1}}else-1===d&&-1!==c&&(d=l);else if(void 0===r)if(-1===d&&1===aa[u])-1===c&&(c=l);else if(32===u||9===u)-1===d&&-1!==c&&(d=l);else if(59===u||44===u){if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),ca(o,t.slice(c,d),!0),44===u&&(ca(e,n,o),o=Object.create(null),n=void 0),c=d=-1}else{if(61!==u||-1===c||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=t.slice(c,l),c=d=-1}else if(s){if(1!==aa[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),s=!1}else if(a)if(1===aa[u])-1===c&&(c=l);else if(34===u&&-1!==c)a=!1,d=l;else{if(92!==u)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===u&&61===t.charCodeAt(l-1))a=!0;else if(-1===d&&1===aa[u])-1===c&&(c=l);else if(-1===c||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=t.slice(c,d);i&&(s=s.replace(/\\/g,""),i=!1),ca(o,r,s),44===u&&(ca(e,n,o),o=Object.create(null),n=void 0),r=void 0,c=d=-1}}else-1===d&&(d=l);if(-1===c||a||32===u||9===u)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const h=t.slice(c,d);return void 0===n?ca(e,h,o):(void 0===r?ca(o,h,!0):ca(o,r,i?h.replace(/\\/g,""):h),ca(e,n,o)),e}};const{randomBytes:da,createHash:la}=G.default,{URL:ha}=x.default,{isBlob:pa}=fs,{BINARY_TYPES:fa,EMPTY_BUFFER:ma,GUID:va,kForOnEventAttribute:ba,kListener:ga,kStatusCode:ya,kWebSocket:wa,NOOP:Ea}=ji,{EventTarget:{addEventListener:Ia,removeEventListener:Ra}}=ia,{format:ja,parse:Sa}=ua,{toBuffer:_a}=Zi,Ca=Symbol("kAborted"),Aa=[8,13],Ua=["CONNECTING","OPEN","CLOSING","CLOSED"],xa=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Pa extends _.default{constructor(t,e,n){super(),this._binaryType=fa[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ma,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Pa.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===e?e=[]:Array.isArray(e)||("object"==typeof e&&null!==e?(n=e,e=[]):e=[e]),Oa(this,t,e,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){fa.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}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(t,e,n){const r=new _s({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new Gs(t,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=t,r[wa]=this,o[wa]=this,t[wa]=this,r.on("conclude",Ba),r.on("drain",Fa),r.on("error",Ga),r.on("message",za),r.on("ping",Ja),r.on("pong",Wa),o.onerror=Ha,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",Za),t.on("data",Ya),t.on("end",Ka),t.on("error",Xa),this._readyState=Pa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Pa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[cs.extensionName]&&this._extensions[cs.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Pa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Pa.CLOSED)if(this.readyState!==Pa.CONNECTING)this.readyState!==Pa.CLOSING?(this._readyState=Pa.CLOSING,this._sender.close(t,e,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),Va(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const t="WebSocket was closed before the connection was established";Na(this,this._req,t)}}pause(){this.readyState!==Pa.CONNECTING&&this.readyState!==Pa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Pa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Pa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||ma,e,n)):qa(this,t,n)}pong(t,e,n){if(this.readyState===Pa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Pa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||ma,e,n)):qa(this,t,n)}resume(){this.readyState!==Pa.CONNECTING&&this.readyState!==Pa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Pa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof e&&(n=e,e={}),"number"==typeof t&&(t=t.toString()),this.readyState!==Pa.OPEN)return void qa(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[cs.extensionName]||(r.compress=!1),this._sender.send(t||ma,r,n)}terminate(){if(this.readyState!==Pa.CLOSED)if(this.readyState!==Pa.CONNECTING)this._socket&&(this._readyState=Pa.CLOSING,this._socket.destroy());else{const t="WebSocket was closed before the connection was established";Na(this,this._req,t)}}}Object.defineProperty(Pa,"CONNECTING",{enumerable:!0,value:Ua.indexOf("CONNECTING")}),Object.defineProperty(Pa.prototype,"CONNECTING",{enumerable:!0,value:Ua.indexOf("CONNECTING")}),Object.defineProperty(Pa,"OPEN",{enumerable:!0,value:Ua.indexOf("OPEN")}),Object.defineProperty(Pa.prototype,"OPEN",{enumerable:!0,value:Ua.indexOf("OPEN")}),Object.defineProperty(Pa,"CLOSING",{enumerable:!0,value:Ua.indexOf("CLOSING")}),Object.defineProperty(Pa.prototype,"CLOSING",{enumerable:!0,value:Ua.indexOf("CLOSING")}),Object.defineProperty(Pa,"CLOSED",{enumerable:!0,value:Ua.indexOf("CLOSED")}),Object.defineProperty(Pa.prototype,"CLOSED",{enumerable:!0,value:Ua.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(Pa.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(Pa.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[ba])return e[ga];return null},set(e){for(const e of this.listeners(t))if(e[ba]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[ba]:!0})}})})),Pa.prototype.addEventListener=Ia,Pa.prototype.removeEventListener=Ra;var ka=Pa;function Oa(t,e,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Aa[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=o.autoPong,!Aa.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${Aa.join(", ")})`);let i;if(e instanceof ha)i=e;else try{i=new ha(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}"http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),t._url=i.href;const s="wss:"===i.protocol,a="ws+unix:"===i.protocol;let c;if("ws:"===i.protocol||s||a?a&&!i.pathname?c="The URL's pathname is empty":i.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',c){const e=new SyntaxError(c);if(0===t._redirects)throw e;return void Ta(t,e)}const u=s?443:80,d=da(16).toString("base64"),l=s?k.default.request:U.default.request,h=new Set;let p,f;if(o.createConnection=o.createConnection||(s?La:Da),o.defaultPort=o.defaultPort||u,o.port=i.port||u,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":d,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(p=new cs(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=ja({[cs.extensionName]:p.offer()})),n.length){for(const t of n){if("string"!=typeof t||!xa.test(t)||h.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(t)}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),(i.username||i.password)&&(o.auth=`${i.username}:${i.password}`),a){const t=o.path.split(":");o.socketPath=t[0],o.path=t[1]}if(o.followRedirects){if(0===t._redirects){t._originalIpc=a,t._originalSecure=s,t._originalHostOrSocketPath=a?o.socketPath:i.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,n]of Object.entries(e))r.headers[t.toLowerCase()]=n}else if(0===t.listenerCount("redirect")){const e=a?!!t._originalIpc&&o.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&i.host===t._originalHostOrSocketPath;(!e||t._originalSecure&&!s)&&(delete o.headers.authorization,delete o.headers.cookie,e||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),f=t._req=l(o),t._redirects&&t.emit("redirect",t.url,f)}else f=t._req=l(o);o.timeout&&f.on("timeout",(()=>{Na(t,f,"Opening handshake has timed out")})),f.on("error",(e=>{null===f||f[Ca]||(f=t._req=null,Ta(t,e))})),f.on("response",(i=>{const s=i.headers.location,a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++t._redirects>o.maxRedirects)return void Na(t,f,"Maximum redirects exceeded");let i;f.abort();try{i=new ha(s,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${s}`);return void Ta(t,n)}Oa(t,i,n,r)}else t.emit("unexpected-response",f,i)||Na(t,f,`Unexpected server response: ${i.statusCode}`)})),f.on("upgrade",((e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Pa.CONNECTING)return;f=t._req=null;const i=e.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void Na(t,n,"Invalid Upgrade header");const s=la("sha1").update(d+va).digest("base64");if(e.headers["sec-websocket-accept"]!==s)return void Na(t,n,"Invalid Sec-WebSocket-Accept header");const a=e.headers["sec-websocket-protocol"];let c;if(void 0!==a?h.size?h.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":h.size&&(c="Server sent no subprotocol"),c)return void Na(t,n,c);a&&(t._protocol=a);const u=e.headers["sec-websocket-extensions"];if(void 0!==u){if(!p){return void Na(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=Sa(u)}catch(e){return void Na(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==cs.extensionName){return void Na(t,n,"Server indicated an extension that was not requested")}try{p.accept(e[cs.extensionName])}catch(e){return void Na(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[cs.extensionName]=p}t.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(f,t):f.end()}function Ta(t,e){t._readyState=Pa.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Da(t){return t.path=t.socketPath,L.default.connect(t)}function La(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=L.default.isIP(t.host)?"":t.host),F.default.connect(t)}function Na(t,e,n){t._readyState=Pa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Na),e.setHeader?(e[Ca]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Ta,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function qa(t,e,n){if(e){const n=pa(e)?e.size:_a(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(n){const e=new Error(`WebSocket is not open: readyState ${t.readyState} (${Ua[t.readyState]})`);process.nextTick(n,e)}}function Ba(t,e){const n=this[wa];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[wa]&&(n._socket.removeListener("data",Ya),process.nextTick($a,n._socket),1005===t?n.close():n.close(t,e))}function Fa(){const t=this[wa];t.isPaused||t._socket.resume()}function Ga(t){const e=this[wa];void 0!==e._socket[wa]&&(e._socket.removeListener("data",Ya),process.nextTick($a,e._socket),e.close(t[ya])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function Ma(){this[wa].emitClose()}function za(t,e){this[wa].emit("message",t,e)}function Ja(t){const e=this[wa];e._autoPong&&e.pong(t,!this._isServer,Ea),e.emit("ping",t)}function Wa(t){this[wa].emit("pong",t)}function $a(t){t.resume()}function Ha(t){const e=this[wa];e.readyState!==Pa.CLOSED&&(e.readyState===Pa.OPEN&&(e._readyState=Pa.CLOSING,Va(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Va(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),3e4)}function Za(){const t=this[wa];let e;this.removeListener("close",Za),this.removeListener("data",Ya),this.removeListener("end",Ka),t._readyState=Pa.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[wa]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Ma),t._receiver.on("finish",Ma))}function Ya(t){this[wa]._receiver.write(t)||this.pause()}function Ka(){const t=this[wa];t._readyState=Pa.CLOSING,t._receiver.end(),this.end()}function Xa(){const t=this[wa];this.removeListener("error",Xa),this.on("error",Ea),t&&(t._readyState=Pa.CLOSING,this.destroy())}const{Duplex:Qa}=C.default;function tc(t){t.emit("close")}function ec(){!this.destroyed&&this._writableState.finished&&this.destroy()}function nc(t){this.removeListener("error",nc),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var rc=function(t,e){let n=!0;const r=new Qa({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",(function(e,n){const o=!n&&r._readableState.objectMode?e.toString():e;r.push(o)||t.pause()})),t.once("error",(function(t){r.destroyed||(n=!1,r.destroy(t))})),t.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(e,o){if(t.readyState===t.CLOSED)return o(e),void process.nextTick(tc,r);let i=!1;t.once("error",(function(t){i=!0,o(t)})),t.once("close",(function(){i||o(e),process.nextTick(tc,r)})),n&&t.terminate()},r._final=function(e){t.readyState!==t.CONNECTING?null!==t._socket&&(t._socket._writableState.finished?(e(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",(function(){e()})),t.close())):t.once("open",(function(){r._final(e)}))},r._read=function(){t.isPaused&&t.resume()},r._write=function(e,n,o){t.readyState!==t.CONNECTING?t.send(e,o):t.once("open",(function(){r._write(e,n,o)}))},r.on("end",ec),r.on("error",nc),r},oc=function(t){function e(e,n,r,o,i,s){void 0===s&&(s=5e3);var a=t.call(this)||this;a.endpoint=e,a.headers=n,a.rewriteHostHeader=r,a.bindToAssign=o,a.agent=i,a.closeTimeout=s,a.protocol="TCP",a.openConnections=new Set,a.tcpServer=N.createServer(a.handleConnection.bind(a));var c=null==r?void 0:r.altHostnames.map((function(t){return(e=Ve(e=t))&&pr.test(e)?e.replace(hr,"\\$&"):e;var e})).join("|");return a.hostRegex=new RegExp("Host: (?:".concat(c,")(:.*$|$)"),"im"),a}return Y(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,o=n.address;t.tcpServer.listen(r,o,(function(){t.emit("tunnel-open",{address:o,port:r}),e({address:o,port:r})}))}else t.tcpServer.listen(0,(function(){var n=t.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:i,port:o},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return X(this,void 0,void 0,(function(){var t,e=this;return Q(this,(function(n){switch(n.label){case 0:return t=!1,[4,Promise.race([new Promise((function(n){e.tcpServer.close((function(){t=!0,e.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(t){return setTimeout(t,e.closeTimeout)})).then((function(){t||(e.openConnections.forEach((function(t){t.destroy(),e.openConnections.delete(t)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},e.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=this.endpoint.replace("https:","wss:"),r=new ka(n,{headers:this.headers,agent:this.agent}),o=rc(r),i=this.getHeaderTransform();this.rewriteHostHeader&&i?Ei(t,i,o):Ei(t,o),Ei(o,t),r.on("close",(function(t,n,r){e.emit("connection-close",t,n,r)})),o.on("error",(function(t){e.emit("connection-error",t)})),t.on("error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var t=this.rewriteHostHeader.targetHostname,e=this.hostRegex;return new n.Transform({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(e,"Host: ".concat(t));o(null,Buffer.from(s))}else o(null,n)}})}},e}(t.EventEmitter),ic=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i.endpoint=e,i.headers=n,i.bindToAssign=r,i.agent=o,i.protocol="UDP",i.udpSocket=z.default.createSocket("udp4"),i.handleConnection(),i}return Y(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,o=n.address;t.udpSocket.bind(r,o,(function(){t.emit("tunnel-open",{address:o,port:r}),e({address:o,port:r})}))}else t.udpSocket.bind(0,(function(){var n=t.udpSocket.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:i,port:o},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){t.udpSocket.close((function(){t.emit("tunnel-close"),e()}))}))];case 1:return e.sent(),[2]}}))}))},e.prototype.handleConnection=function(){var t,e=this,n=this.endpoint.replace("https:","wss:"),r=new ka(n,{headers:this.headers,agent:this.agent}),o=rc(r);this.udpSocket.on("message",(function(e,n){t=n,o.write(e)})),o.on("data",(function(n){t&&e.udpSocket.send(n,t.port,t.address,(function(t){t&&e.emit("connection-error",t)}))})),this.udpSocket.on("error",(function(t){e.emit("connection-error",t)})),o.on("error",(function(t){e.emit("connection-error",t)})),r.on("connection-close",(function(t,n,r){e.emit("connection-close",t,n,r)})),r.on("connection-error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e}(t.EventEmitter),sc=function(t){function n(n,r,o,i){var s=t.call(this)||this;return s.contextProvider=n,s.listServices=r,s.listAddons=o,s.agent=i,s.connections=[],s.hostsFileMutex=new ii,s.ipAllocationMutex=new ii,s.stopForwarding=function(t){return X(s,void 0,void 0,(function(){var e,n,r,o,i,s,a;return Q(this,(function(c){switch(c.label){case 0:return[4,t.tunnel.close()];case 1:return c.sent(),e=t.forwardingContext,n=e.projectId,r=e.type,o=e.id,i=e.hostnames,s=e.ipOnly,i.length>0&&!s?[4,this.unregisterHostnames(null===(a=t.tunnel.bindTo)||void 0===a?void 0:a.address,i)]:[3,3];case 2:c.sent(),c.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(t){var e=t.forwardingContext,i=e.type,s=e.id,a=e.projectId;return s===o&&a===n&&i===r})),1),[2]}}))}))},s.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===(t=null===process||void 0===process?void 0:process.getuid)||void 0===t?void 0:t.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return e.execSync("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return e.execSync("fltmc"),!0}catch(t){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 t},s.assertStartedWithNodejs=function(){if(!Oo)throw new Error("Port forwarding only possible when started with nodejs")},s.proxyApiClient=new qo(n,i),s}return Y(n,t),n.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),X(this,void 0,void 0,(function(){var r;return Q(this,(function(o){switch(o.label){case 0:return[4,this.forwardProject(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopProjectForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},n.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return Q(this,(function(c){switch(c.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=c.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return o=c.sent(),[4,Promise.all(r.data.services.map((function(t){return X(a,void 0,void 0,(function(){return Q(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:t.id},e)]}))}))})))];case 3:return i=c.sent(),[4,Promise.all(o.data.addons.map((function(t){return X(a,void 0,void 0,(function(){return Q(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:t.id},e)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=c.sent(),[2,{services:i,addons:s}]}}))}))},n.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),X(this,void 0,void 0,(function(){var r;return Q(this,(function(o){switch(o.label){case 0:return[4,this.forwardService(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopServiceForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},n.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u=this;return Q(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,r=t.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return o=d.sent(),i=o.namespace,s=o.targetDomain,a=o.instances,c=o.ports,0===a.length?[2,[]]:[4,Lo(c,(function(t){var o,c="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(t.internalPort),d="".concat(r,".").concat(i,".svc.cluster.local"),l=["".concat(r)];t.name&&l.push("".concat(t.name,".").concat(r)),"HTTP"===t.protocol&&(o={altHostnames:l,targetHostname:d});var h=tt([d],l,!0);return u.forwardPort(c,t,h,"service",r,n,e,o)}))];case 2:return[2,d.sent()]}}))}))},n.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),X(this,void 0,void 0,(function(){var r;return Q(this,(function(o){switch(o.label){case 0:return[4,this.forwardAddon(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopAddonForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},n.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o,i,s=this;return Q(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=t.addonId,r=t.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return o=a.sent(),i=o.instances.map((function(t){var e=t.podName,n=t.internalHostname;return t.ports.map((function(t){return{podName:e,internalHostname:n,port:t}}))})),[4,Lo((c=i,null!=c&&c.length?en(c,vr):[]),(function(t){var i=t.podName,a=t.internalHostname,c=t.port;return X(s,void 0,void 0,(function(){var t;return Q(this,(function(s){return t="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(c.internalPort),[2,this.forwardPort(t,c,[a],"addon",n,r,e)]}))}))}))];case 2:return[2,a.sent()]}var c}))}))},n.prototype.allocateIpAddress=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){switch(s.label){case 0:return e="127.24.1.1",n="127.24.255.255",r=null!==(i=this.nextIpAddress)&&void 0!==i?i:e,[4,Bo(t,r,n)];case 1:return o=s.sent(),this.nextIpAddress=zo(Mo(o)+1),Mo(this.nextIpAddress)>Mo(n)&&(this.nextIpAddress=e),[2,o]}}))}))}))]}))}))},n.prototype.forwardPort=function(t,e,n,r,o,i,s,a){var c;return void 0===s&&(s=!0),X(this,void 0,void 0,(function(){var u,d,l,h,p,f,m=this;return Q(this,(function(v){switch(v.label){case 0:if(u={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,n,r,e,s)];case 1:return l=v.sent(),h="UDP"===e.protocol?new ic(t,u,l,this.agent):new oc(t,u,a,l,this.agent),s?[3,3]:[4,this.registerHostnames(null===(c=h.bindTo)||void 0===c?void 0:c.address,n)];case 2:v.sent(),v.label=3;case 3:return h.on("connection-accept",(function(){return m.emit("connection-accept",h)})),h.on("connection-close",(function(){return X(m,void 0,void 0,(function(){return Q(this,(function(t){return[2,this.emit("connection-close",h)]}))}))})),[4,h.open()];case 4:return p=v.sent(),f={projectId:i,id:o,type:r,hostnames:n,ipOnly:s,port:p.port,address:p.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",h,f),h.on("connection-error",(function(t){return m.emit("connection-error",h,f,t)})),h.on("tunnel-close",(function(){return m.emit("tunnel-close",h,f)})),this.connections.push({tunnel:h,forwardingContext:f}),[2,{data:f}]}}))}))},n.prototype.determineSocketAddress=function(t,e,n,r,o,i){return X(this,void 0,void 0,(function(){var s,a,c;return Q(this,(function(u){switch(u.label){case 0:return i&&"darwin"===D.default.platform()?[2,void 0]:(s=this.connections.filter((function(n){return n.forwardingContext.projectId===t&&n.forwardingContext.id===e&&n.forwardingContext.type===r})),(a=null==s?void 0:s.find((function(t){return n.find((function(e){return t.forwardingContext.hostnames.includes(e)}))})))?[2,{address:null==a?void 0:a.forwardingContext.address,port:o.internalPort}]:(c={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(c.address=u.sent(),c.port=o.internalPort,c)]}}))}))},n.prototype.registerHostnames=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,e),n.add.apply(n,tt([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.unregisterHostnames=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,tt([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.modifyHostsFile=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return X(e,void 0,void 0,(function(){var e,n=this;return Q(this,(function(r){switch(r.label){case 0:return[4,oi.load({header:"Northflank Proxy"})];case 1:return e=r.sent(),t(e),[4,e.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,ac(5)((function(){return X(n,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"atomic"})];case 1:return t.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,ac(5)((function(){return X(n,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"standard"})];case 1:return t.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.stopProjectForwarding=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return e.forwardingContext.projectId===t.projectId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},n.prototype.stopServiceForwarding=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"service"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.serviceId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},n.prototype.stopAddonForwarding=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"addon"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.addonId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},n.prototype.stop=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this.connections.map((function(e){return X(t,void 0,void 0,(function(){return Q(this,(function(t){return[2,this.stopForwarding(e)]}))}))})))];case 1:return e.sent(),[2]}}))}))},n}(t.EventEmitter),ac=function(t,e){return void 0===e&&(e=50),function(n){var r=t,o=function(){return X(void 0,void 0,void 0,(function(){var t;return Q(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(t=i.sent(),r<=0)throw t;return r-=1,[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 3:return i.sent(),[2,o()];case 4:return[2]}}))}))};return o()}},cc=function(t){function e(e,n,r,o,i,s,a){void 0===i&&(i=new A.PassThrough),void 0===s&&(s=new A.PassThrough),void 0===a&&(a=new A.PassThrough);var c=t.call(this)||this;return c.baseUrl=e,c.execConfig=n,c.token=r,c.agent=o,c.stdOut=i,c.stdErr=s,c.stdIn=a,c.waitForCommandResult=function(){return X(c,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,t.sent()]}}))}))},c.sendInputToCurrentCommand=function(t){return X(c,void 0,void 0,(function(){var e;return Q(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(e=this.duplex)||void 0===e||e.write(this.constructPayloadPacket(t)),[2]}))}))},c.resizeTerminal=function(t){return X(c,void 0,void 0,(function(){var e;return Q(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===(e=this.duplex)||void 0===e||e.write(JSON.stringify({type:"resize",data:{ttyRows:null==t?void 0:t.rows,ttyColumns:null==t?void 0:t.columns}})),[2]}))}))},c.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},c.stdInEndPacket=JSON.stringify({type:"stdInEnd"}),c}return Y(e,t),Object.defineProperty(e.prototype,"execEndpoint",{get:function(){var t=this.execConfig,e=t.entityId,n=t.entityType,r=t.projectId,o="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(o).concat(function(){switch(n){case"service":return"services/".concat(e);case"job":return"jobs/".concat(e);case"addon":return"addons/".concat(e);case"build":return"builds/".concat(e);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),e.prototype.start=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(e,n){var r,o,i;void 0!==t.remote&&n(Error("Command is already running"));var s,a=t.execEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new ka(a,{agent:t.agent});try{t.duplex=rc(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),t.stdIn.on("data",(function(e){var n,r;(null===(n=t.duplex)||void 0===n?void 0:n.writable)&&(null===(r=t.duplex)||void 0===r||r.write(t.constructPayloadPacket(e)))})),t.stdIn.on("end",(function(){var e,n;(null===(e=t.duplex)||void 0===e?void 0:e.writable)&&(null===(n=t.duplex)||void 0===n||n.write(t.stdInEndPacket))})),null===(r=t.duplex)||void 0===r||r.on("data",(function(e){var n,r,o,i,a,u=JSON.parse(e.toString());switch(null==u?void 0:u.type){case"init":var d=u.data;"successful"!==d.auth?c("Command initialization failed: ".concat(null!==(n=null==d?void 0:d.message)&&void 0!==n?n:"Reason unknown")):t.emit("auth-success",s);break;case"completion":s=u.data,t.emit("command-result",s),null===(r=t.duplex)||void 0===r||r.end();break;case"stdOut":t.emit("std-out-data",u.data),t.stdOut.write(u.data,null===(o=t.execConfig)||void 0===o?void 0:o.encoding);break;case"stdErr":t.emit("std-err-data",u.data),t.stdErr.write(u.data,null===(i=t.execConfig)||void 0===i?void 0:i.encoding);break;case"error":c(null===(a=u.data)||void 0===a?void 0:a.message);break;default:var l="unable to parse message: ".concat(JSON.stringify(u));c(l)}})),null===(o=t.duplex)||void 0===o||o.on("end",(function(){t.emit("command-completed"),t.reset(),e(s)})),null===(i=t.duplex)||void 0===i||i.on("error",(function(n){t.emit("error",n),t.emit("command-completed"),t.reset(),e(s)}));var c=function(e){t.emit("error",e),t.reset(),n(new Error(e))};t.emit("command-started")})),[2,this.currentCommand]}))}))},e.prototype.initialAuth=function(){var t,e=this.execConfig,n=e.command,r=e.containerName,o=e.shell,i=e.user,s=e.group,a=e.encoding,c=e.tty,u=e.ttyColumns,d=e.ttyRows,l={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,encoding:a,tty:c,ttyColumns:u,ttyRows:d}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(l))},e.prototype.reset=function(){var t;this.remote=void 0,this.currentCommand=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(t.EventEmitter),uc=function(){function t(t,e){this.contextProvider=t,this.agent=e,this.assertStartedWithNodejs=function(){if(!Oo)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){return n=t.serviceId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(o)]}))}))},t.prototype.execServiceSession=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.serviceId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"service"},e),[4,this.shellSession(o)];case 1:return[2,i.sent()]}}))}))},t.prototype.execJobCommand=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){return n=t.jobId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(o)]}))}))},t.prototype.execJobSession=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.jobId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"job"},e),[4,this.shellSession(o)];case 1:return[2,i.sent()]}}))}))},t.prototype.execCommand=function(t){return X(this,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(K({shell:"none"},t)),n=new No,r=new No,e.stdOut.pipe(n),e.stdErr.pipe(r),e.on("error",(function(t){throw new Error(t)})),[4,e.start()];case 1:return[2,{commandResult:o.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},t.prototype.shellSession=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(t),n=new Promise((function(t){e.on("auth-success",(function(){t()}))})),e.start(),[4,n];case 1:return r.sent(),[2,e]}}))}))},t.prototype.getCommandRunner=function(t){var e=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new cc(e,t,n,this.agent)},t}();const dc="object"==typeof process&&process?process:{stdout:null,stderr:null},lc=t=>!!t&&"object"==typeof t&&(t instanceof Zc||t instanceof J.default||hc(t)||pc(t)),hc=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==J.default.Writable.prototype.pipe,pc=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end,fc=Symbol("EOF"),mc=Symbol("maybeEmitEnd"),vc=Symbol("emittedEnd"),bc=Symbol("emittingEnd"),gc=Symbol("emittedError"),yc=Symbol("closed"),wc=Symbol("read"),Ec=Symbol("flush"),Ic=Symbol("flushChunk"),Rc=Symbol("encoding"),jc=Symbol("decoder"),Sc=Symbol("flowing"),_c=Symbol("paused"),Cc=Symbol("resume"),Ac=Symbol("buffer"),Uc=Symbol("pipes"),xc=Symbol("bufferLength"),Pc=Symbol("bufferPush"),kc=Symbol("bufferShift"),Oc=Symbol("objectMode"),Tc=Symbol("destroyed"),Dc=Symbol("error"),Lc=Symbol("emitData"),Nc=Symbol("emitEnd"),qc=Symbol("emitEnd2"),Bc=Symbol("async"),Fc=Symbol("abort"),Gc=Symbol("aborted"),Mc=Symbol("signal"),zc=Symbol("dataListeners"),Jc=Symbol("discarded"),Wc=t=>Promise.resolve().then(t),$c=t=>t();class Hc{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Cc](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class Vc extends Hc{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class Zc extends v.EventEmitter{[Sc]=!1;[_c]=!1;[Uc]=[];[Ac]=[];[Oc];[Rc];[Bc];[jc];[fc]=!1;[vc]=!1;[bc]=!1;[yc]=!1;[gc]=null;[xc]=0;[Tc]=!1;[Mc];[Gc]=!1;[zc]=0;[Jc]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[Oc]=!0,this[Rc]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[Rc]=e.encoding,this[Oc]=!1):(this[Oc]=!1,this[Rc]=null),this[Bc]=!!e.async,this[jc]=this[Rc]?new g.StringDecoder(this[Rc]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Ac]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Uc]});const{signal:n}=e;n&&(this[Mc]=n,n.aborted?this[Fc]():n.addEventListener("abort",(()=>this[Fc]())))}get bufferLength(){return this[xc]}get encoding(){return this[Rc]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Oc]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Bc]}set async(t){this[Bc]=this[Bc]||!!t}[Fc](){this[Gc]=!0,this.emit("abort",this[Mc]?.reason),this.destroy(this[Mc]?.reason)}get aborted(){return this[Gc]}set aborted(t){}write(t,e,n){if(this[Gc])return!1;if(this[fc])throw new Error("write after end");if(this[Tc])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[Bc]?Wc:$c;if(!this[Oc]&&!Buffer.isBuffer(t))if(o=t,!Buffer.isBuffer(o)&&ArrayBuffer.isView(o))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var o;return this[Oc]?(this[Sc]&&0!==this[xc]&&this[Ec](!0),this[Sc]?this.emit("data",t):this[Pc](t),0!==this[xc]&&this.emit("readable"),n&&r(n),this[Sc]):t.length?("string"!=typeof t||e===this[Rc]&&!this[jc]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[Rc]&&(t=this[jc].write(t)),this[Sc]&&0!==this[xc]&&this[Ec](!0),this[Sc]?this.emit("data",t):this[Pc](t),0!==this[xc]&&this.emit("readable"),n&&r(n),this[Sc]):(0!==this[xc]&&this.emit("readable"),n&&r(n),this[Sc])}read(t){if(this[Tc])return null;if(this[Jc]=!1,0===this[xc]||0===t||t&&t>this[xc])return this[mc](),null;this[Oc]&&(t=null),this[Ac].length>1&&!this[Oc]&&(this[Ac]=[this[Rc]?this[Ac].join(""):Buffer.concat(this[Ac],this[xc])]);const e=this[wc](t||null,this[Ac][0]);return this[mc](),e}[wc](t,e){if(this[Oc])this[kc]();else{const n=e;t===n.length||null===t?this[kc]():"string"==typeof n?(this[Ac][0]=n.slice(t),e=n.slice(0,t),this[xc]-=t):(this[Ac][0]=n.subarray(t),e=n.subarray(0,t),this[xc]-=t)}return this.emit("data",e),this[Ac].length||this[fc]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[fc]=!0,this.writable=!1,!this[Sc]&&this[_c]||this[mc](),this}[Cc](){this[Tc]||(this[zc]||this[Uc].length||(this[Jc]=!0),this[_c]=!1,this[Sc]=!0,this.emit("resume"),this[Ac].length?this[Ec]():this[fc]?this[mc]():this.emit("drain"))}resume(){return this[Cc]()}pause(){this[Sc]=!1,this[_c]=!0,this[Jc]=!1}get destroyed(){return this[Tc]}get flowing(){return this[Sc]}get paused(){return this[_c]}[Pc](t){this[Oc]?this[xc]+=1:this[xc]+=t.length,this[Ac].push(t)}[kc](){return this[Oc]?this[xc]-=1:this[xc]-=this[Ac][0].length,this[Ac].shift()}[Ec](t=!1){do{}while(this[Ic](this[kc]())&&this[Ac].length);t||this[Ac].length||this[fc]||this.emit("drain")}[Ic](t){return this.emit("data",t),this[Sc]}pipe(t,e){if(this[Tc])return t;this[Jc]=!1;const n=this[vc];return e=e||{},t===dc.stdout||t===dc.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[Uc].push(e.proxyErrors?new Vc(this,t,e):new Hc(this,t,e)),this[Bc]?Wc((()=>this[Cc]())):this[Cc]()),t}unpipe(t){const e=this[Uc].find((e=>e.dest===t));e&&(1===this[Uc].length?(this[Sc]&&0===this[zc]&&(this[Sc]=!1),this[Uc]=[]):this[Uc].splice(this[Uc].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[Jc]=!1,this[zc]++,this[Uc].length||this[Sc]||this[Cc]();else if("readable"===t&&0!==this[xc])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[vc])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[gc]){const t=e;this[Bc]?Wc((()=>t.call(this,this[gc]))):t.call(this,this[gc])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[zc]=this.listeners("data").length,0!==this[zc]||this[Jc]||this[Uc].length||(this[Sc]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[zc]=0,this[Jc]||this[Uc].length||(this[Sc]=!1)),e}get emittedEnd(){return this[vc]}[mc](){this[bc]||this[vc]||this[Tc]||0!==this[Ac].length||!this[fc]||(this[bc]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[yc]&&this.emit("close"),this[bc]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==Tc&&this[Tc])return!1;if("data"===t)return!(!this[Oc]&&!n)&&(this[Bc]?(Wc((()=>this[Lc](n))),!0):this[Lc](n));if("end"===t)return this[Nc]();if("close"===t){if(this[yc]=!0,!this[vc]&&!this[Tc])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[gc]=n,super.emit(Dc,n);const t=!(this[Mc]&&!this.listeners("error").length)&&super.emit("error",n);return this[mc](),t}if("resume"===t){const t=super.emit("resume");return this[mc](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[mc](),r}[Lc](t){for(const e of this[Uc])!1===e.dest.write(t)&&this.pause();const e=!this[Jc]&&super.emit("data",t);return this[mc](),e}[Nc](){return!this[vc]&&(this[vc]=!0,this.readable=!1,this[Bc]?(Wc((()=>this[qc]())),!0):this[qc]())}[qc](){if(this[jc]){const t=this[jc].end();if(t){for(const e of this[Uc])e.dest.write(t);this[Jc]||super.emit("data",t)}}for(const t of this[Uc])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[Oc]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[Oc]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[Oc])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[Rc]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(Tc,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[Jc]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[fc])return e();let r,o;const i=t=>{this.off("data",s),this.off("end",a),this.off(Tc,c),e(),o(t)},s=t=>{this.off("error",i),this.off("end",a),this.off(Tc,c),this.pause(),r({value:t,done:!!this[fc]})},a=()=>{this.off("error",i),this.off("data",s),this.off(Tc,c),e(),r({done:!0,value:void 0})},c=()=>i(new Error("stream destroyed"));return new Promise(((t,e)=>{o=e,r=t,this.once(Tc,c),this.once("error",i),this.once("end",a),this.once("data",s)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Jc]=!1;let t=!1;const e=()=>(this.pause(),this.off(Dc,e),this.off(Tc,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(Dc,e),this.once(Tc,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[Tc])return t?this.emit("error",t):this.emit(Tc),this;this[Tc]=!0,this[Jc]=!0,this[Ac].length=0,this[xc]=0;return"function"!=typeof this.close||this[yc]||this.close(),t?this.emit("error",t):this.emit(Tc),this}static get isStream(){return lc}}const Yc=q.default.writev,Kc=Symbol("_autoClose"),Xc=Symbol("_close"),Qc=Symbol("_ended"),tu=Symbol("_fd"),eu=Symbol("_finished"),nu=Symbol("_flags"),ru=Symbol("_flush"),ou=Symbol("_handleChunk"),iu=Symbol("_makeBuf"),su=Symbol("_mode"),au=Symbol("_needDrain"),cu=Symbol("_onerror"),uu=Symbol("_onopen"),du=Symbol("_onread"),lu=Symbol("_onwrite"),hu=Symbol("_open"),pu=Symbol("_path"),fu=Symbol("_pos"),mu=Symbol("_queue"),vu=Symbol("_read"),bu=Symbol("_readSize"),gu=Symbol("_reading"),yu=Symbol("_remain"),wu=Symbol("_size"),Eu=Symbol("_write"),Iu=Symbol("_writing"),Ru=Symbol("_defaultFlag"),ju=Symbol("_errored");class Su extends Zc{[ju]=!1;[tu];[pu];[bu];[gu]=!1;[wu];[yu];[Kc];constructor(t,e){if(super(e=e||{}),this.readable=!0,this.writable=!1,"string"!=typeof t)throw new TypeError("path must be a string");this[ju]=!1,this[tu]="number"==typeof e.fd?e.fd:void 0,this[pu]=t,this[bu]=e.readSize||16777216,this[gu]=!1,this[wu]="number"==typeof e.size?e.size:1/0,this[yu]=this[wu],this[Kc]="boolean"!=typeof e.autoClose||e.autoClose,"number"==typeof this[tu]?this[vu]():this[hu]()}get fd(){return this[tu]}get path(){return this[pu]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[hu](){q.default.open(this[pu],"r",((t,e)=>this[uu](t,e)))}[uu](t,e){t?this[cu](t):(this[tu]=e,this.emit("open",e),this[vu]())}[iu](){return Buffer.allocUnsafe(Math.min(this[bu],this[yu]))}[vu](){if(!this[gu]){this[gu]=!0;const t=this[iu]();if(0===t.length)return process.nextTick((()=>this[du](null,0,t)));q.default.read(this[tu],t,0,t.length,null,((t,e,n)=>this[du](t,e,n)))}}[du](t,e,n){this[gu]=!1,t?this[cu](t):this[ou](e,n)&&this[vu]()}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}[cu](t){this[gu]=!0,this[Xc](),this.emit("error",t)}[ou](t,e){let n=!1;return this[yu]-=t,t>0&&(n=super.write(t<e.length?e.subarray(0,t):e)),(0===t||this[yu]<=0)&&(n=!1,this[Xc](),super.end()),n}emit(t,...e){switch(t){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[tu]&&this[vu](),!1;case"error":return!this[ju]&&(this[ju]=!0,super.emit(t,...e));default:return super.emit(t,...e)}}}class _u extends Su{[hu](){let t=!0;try{this[uu](null,q.default.openSync(this[pu],"r")),t=!1}finally{t&&this[Xc]()}}[vu](){let t=!0;try{if(!this[gu]){for(this[gu]=!0;;){const t=this[iu](),e=0===t.length?0:q.default.readSync(this[tu],t,0,t.length,null);if(!this[ou](e,t))break}this[gu]=!1}t=!1}finally{t&&this[Xc]()}}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.closeSync(t),this.emit("close")}}}class Cu extends _.default{readable=!1;writable=!0;[ju]=!1;[Iu]=!1;[Qc]=!1;[mu]=[];[au]=!1;[pu];[su];[Kc];[tu];[Ru];[nu];[eu]=!1;[fu];constructor(t,e){super(e=e||{}),this[pu]=t,this[tu]="number"==typeof e.fd?e.fd:void 0,this[su]=void 0===e.mode?438:e.mode,this[fu]="number"==typeof e.start?e.start:void 0,this[Kc]="boolean"!=typeof e.autoClose||e.autoClose;const n=void 0!==this[fu]?"r+":"w";this[Ru]=void 0===e.flags,this[nu]=void 0===e.flags?n:e.flags,void 0===this[tu]&&this[hu]()}emit(t,...e){if("error"===t){if(this[ju])return!1;this[ju]=!0}return super.emit(t,...e)}get fd(){return this[tu]}get path(){return this[pu]}[cu](t){this[Xc](),this[Iu]=!0,this.emit("error",t)}[hu](){q.default.open(this[pu],this[nu],this[su],((t,e)=>this[uu](t,e)))}[uu](t,e){this[Ru]&&"r+"===this[nu]&&t&&"ENOENT"===t.code?(this[nu]="w",this[hu]()):t?this[cu](t):(this[tu]=e,this.emit("open",e),this[Iu]||this[ru]())}end(t,e){return t&&this.write(t,e),this[Qc]=!0,this[Iu]||this[mu].length||"number"!=typeof this[tu]||this[lu](null,0),this}write(t,e){return"string"==typeof t&&(t=Buffer.from(t,e)),this[Qc]?(this.emit("error",new Error("write() after end()")),!1):void 0===this[tu]||this[Iu]||this[mu].length?(this[mu].push(t),this[au]=!0,!1):(this[Iu]=!0,this[Eu](t),!0)}[Eu](t){q.default.write(this[tu],t,0,t.length,this[fu],((t,e)=>this[lu](t,e)))}[lu](t,e){t?this[cu](t):(void 0!==this[fu]&&"number"==typeof e&&(this[fu]+=e),this[mu].length?this[ru]():(this[Iu]=!1,this[Qc]&&!this[eu]?(this[eu]=!0,this[Xc](),this.emit("finish")):this[au]&&(this[au]=!1,this.emit("drain"))))}[ru](){if(0===this[mu].length)this[Qc]&&this[lu](null,0);else if(1===this[mu].length)this[Eu](this[mu].pop());else{const t=this[mu];this[mu]=[],Yc(this[tu],t,this[fu],((t,e)=>this[lu](t,e)))}}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}}class Au extends Cu{[hu](){let t;if(this[Ru]&&"r+"===this[nu])try{t=q.default.openSync(this[pu],this[nu],this[su])}catch(t){if("ENOENT"===t?.code)return this[nu]="w",this[hu]();throw t}else t=q.default.openSync(this[pu],this[nu],this[su]);this[uu](null,t)}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.closeSync(t),this.emit("close")}}[Eu](t){let e=!0;try{this[lu](null,q.default.writeSync(this[tu],t,0,t.length,this[fu])),e=!1}finally{if(e)try{this[Xc]()}catch{}}}}const Uu=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),xu=t=>{const e=Uu.get(t);return e||t},Pu=(t={})=>{if(!t)return{};const e={};for(const[n,r]of Object.entries(t)){e[xu(n)]=r}return void 0===e.chmod&&!1===e.noChmod&&(e.chmod=!0),delete e.noChmod,e},ku=(t,e,n,r,o)=>Object.assign(((i=[],s,a)=>{Array.isArray(i)&&(s=i,i={}),"function"==typeof s&&(a=s,s=void 0),s=s?Array.from(s):[];const c=Pu(i);if(o?.(c,s),(u=c).sync&&u.file){if("function"==typeof a)throw new TypeError("callback not supported for sync tar functions");return t(c,s)}if((t=>!t.sync&&!!t.file)(c)){const t=e(c,s),n=a||void 0;return n?t.then((()=>n()),n):t}if((t=>!!t.sync&&!t.file)(c)){if("function"==typeof a)throw new TypeError("callback not supported for sync tar functions");return n(c,s)}if((t=>!t.sync&&!t.file)(c)){if("function"==typeof a)throw new TypeError("callback only supported with file option");return r(c,s)}throw new Error("impossible options??");var u}),{syncFile:t,asyncFile:e,syncNoFile:n,asyncNoFile:r,validate:o}),Ou="object"==typeof process&&process?process:{stdout:null,stderr:null},Tu=t=>!!t&&"object"==typeof t&&(t instanceof gd||t instanceof J.default||Du(t)||Lu(t)),Du=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==J.default.Writable.prototype.pipe,Lu=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end,Nu=Symbol("EOF"),qu=Symbol("maybeEmitEnd"),Bu=Symbol("emittedEnd"),Fu=Symbol("emittingEnd"),Gu=Symbol("emittedError"),Mu=Symbol("closed"),zu=Symbol("read"),Ju=Symbol("flush"),Wu=Symbol("flushChunk"),$u=Symbol("encoding"),Hu=Symbol("decoder"),Vu=Symbol("flowing"),Zu=Symbol("paused"),Yu=Symbol("resume"),Ku=Symbol("buffer"),Xu=Symbol("pipes"),Qu=Symbol("bufferLength"),td=Symbol("bufferPush"),ed=Symbol("bufferShift"),nd=Symbol("objectMode"),rd=Symbol("destroyed"),od=Symbol("error"),id=Symbol("emitData"),sd=Symbol("emitEnd"),ad=Symbol("emitEnd2"),cd=Symbol("async"),ud=Symbol("abort"),dd=Symbol("aborted"),ld=Symbol("signal"),hd=Symbol("dataListeners"),pd=Symbol("discarded"),fd=t=>Promise.resolve().then(t),md=t=>t();class vd{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Yu](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class bd extends vd{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class gd extends v.EventEmitter{[Vu]=!1;[Zu]=!1;[Xu]=[];[Ku]=[];[nd];[$u];[cd];[Hu];[Nu]=!1;[Bu]=!1;[Fu]=!1;[Mu]=!1;[Gu]=null;[Qu]=0;[rd]=!1;[ld];[dd]=!1;[hd]=0;[pd]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[nd]=!0,this[$u]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[$u]=e.encoding,this[nd]=!1):(this[nd]=!1,this[$u]=null),this[cd]=!!e.async,this[Hu]=this[$u]?new g.StringDecoder(this[$u]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Ku]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Xu]});const{signal:n}=e;n&&(this[ld]=n,n.aborted?this[ud]():n.addEventListener("abort",(()=>this[ud]())))}get bufferLength(){return this[Qu]}get encoding(){return this[$u]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[nd]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[cd]}set async(t){this[cd]=this[cd]||!!t}[ud](){this[dd]=!0,this.emit("abort",this[ld]?.reason),this.destroy(this[ld]?.reason)}get aborted(){return this[dd]}set aborted(t){}write(t,e,n){if(this[dd])return!1;if(this[Nu])throw new Error("write after end");if(this[rd])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[cd]?fd:md;if(!this[nd]&&!Buffer.isBuffer(t))if(o=t,!Buffer.isBuffer(o)&&ArrayBuffer.isView(o))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var o;return this[nd]?(this[Vu]&&0!==this[Qu]&&this[Ju](!0),this[Vu]?this.emit("data",t):this[td](t),0!==this[Qu]&&this.emit("readable"),n&&r(n),this[Vu]):t.length?("string"!=typeof t||e===this[$u]&&!this[Hu]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[$u]&&(t=this[Hu].write(t)),this[Vu]&&0!==this[Qu]&&this[Ju](!0),this[Vu]?this.emit("data",t):this[td](t),0!==this[Qu]&&this.emit("readable"),n&&r(n),this[Vu]):(0!==this[Qu]&&this.emit("readable"),n&&r(n),this[Vu])}read(t){if(this[rd])return null;if(this[pd]=!1,0===this[Qu]||0===t||t&&t>this[Qu])return this[qu](),null;this[nd]&&(t=null),this[Ku].length>1&&!this[nd]&&(this[Ku]=[this[$u]?this[Ku].join(""):Buffer.concat(this[Ku],this[Qu])]);const e=this[zu](t||null,this[Ku][0]);return this[qu](),e}[zu](t,e){if(this[nd])this[ed]();else{const n=e;t===n.length||null===t?this[ed]():"string"==typeof n?(this[Ku][0]=n.slice(t),e=n.slice(0,t),this[Qu]-=t):(this[Ku][0]=n.subarray(t),e=n.subarray(0,t),this[Qu]-=t)}return this.emit("data",e),this[Ku].length||this[Nu]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[Nu]=!0,this.writable=!1,!this[Vu]&&this[Zu]||this[qu](),this}[Yu](){this[rd]||(this[hd]||this[Xu].length||(this[pd]=!0),this[Zu]=!1,this[Vu]=!0,this.emit("resume"),this[Ku].length?this[Ju]():this[Nu]?this[qu]():this.emit("drain"))}resume(){return this[Yu]()}pause(){this[Vu]=!1,this[Zu]=!0,this[pd]=!1}get destroyed(){return this[rd]}get flowing(){return this[Vu]}get paused(){return this[Zu]}[td](t){this[nd]?this[Qu]+=1:this[Qu]+=t.length,this[Ku].push(t)}[ed](){return this[nd]?this[Qu]-=1:this[Qu]-=this[Ku][0].length,this[Ku].shift()}[Ju](t=!1){do{}while(this[Wu](this[ed]())&&this[Ku].length);t||this[Ku].length||this[Nu]||this.emit("drain")}[Wu](t){return this.emit("data",t),this[Vu]}pipe(t,e){if(this[rd])return t;this[pd]=!1;const n=this[Bu];return e=e||{},t===Ou.stdout||t===Ou.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[Xu].push(e.proxyErrors?new bd(this,t,e):new vd(this,t,e)),this[cd]?fd((()=>this[Yu]())):this[Yu]()),t}unpipe(t){const e=this[Xu].find((e=>e.dest===t));e&&(1===this[Xu].length?(this[Vu]&&0===this[hd]&&(this[Vu]=!1),this[Xu]=[]):this[Xu].splice(this[Xu].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[pd]=!1,this[hd]++,this[Xu].length||this[Vu]||this[Yu]();else if("readable"===t&&0!==this[Qu])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[Bu])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[Gu]){const t=e;this[cd]?fd((()=>t.call(this,this[Gu]))):t.call(this,this[Gu])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[hd]=this.listeners("data").length,0!==this[hd]||this[pd]||this[Xu].length||(this[Vu]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[hd]=0,this[pd]||this[Xu].length||(this[Vu]=!1)),e}get emittedEnd(){return this[Bu]}[qu](){this[Fu]||this[Bu]||this[rd]||0!==this[Ku].length||!this[Nu]||(this[Fu]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Mu]&&this.emit("close"),this[Fu]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==rd&&this[rd])return!1;if("data"===t)return!(!this[nd]&&!n)&&(this[cd]?(fd((()=>this[id](n))),!0):this[id](n));if("end"===t)return this[sd]();if("close"===t){if(this[Mu]=!0,!this[Bu]&&!this[rd])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[Gu]=n,super.emit(od,n);const t=!(this[ld]&&!this.listeners("error").length)&&super.emit("error",n);return this[qu](),t}if("resume"===t){const t=super.emit("resume");return this[qu](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[qu](),r}[id](t){for(const e of this[Xu])!1===e.dest.write(t)&&this.pause();const e=!this[pd]&&super.emit("data",t);return this[qu](),e}[sd](){return!this[Bu]&&(this[Bu]=!0,this.readable=!1,this[cd]?(fd((()=>this[ad]())),!0):this[ad]())}[ad](){if(this[Hu]){const t=this[Hu].end();if(t){for(const e of this[Xu])e.dest.write(t);this[pd]||super.emit("data",t)}}for(const t of this[Xu])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[nd]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[nd]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[nd])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[$u]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(rd,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[pd]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[Nu])return e();let r,o;const i=t=>{this.off("data",s),this.off("end",a),this.off(rd,c),e(),o(t)},s=t=>{this.off("error",i),this.off("end",a),this.off(rd,c),this.pause(),r({value:t,done:!!this[Nu]})},a=()=>{this.off("error",i),this.off("data",s),this.off(rd,c),e(),r({done:!0,value:void 0})},c=()=>i(new Error("stream destroyed"));return new Promise(((t,e)=>{o=e,r=t,this.once(rd,c),this.once("error",i),this.once("end",a),this.once("data",s)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[pd]=!1;let t=!1;const e=()=>(this.pause(),this.off(od,e),this.off(rd,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(od,e),this.once(rd,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[rd])return t?this.emit("error",t):this.emit(rd),this;this[rd]=!0,this[pd]=!0,this[Ku].length=0,this[Qu]=0;return"function"!=typeof this.close||this[Mu]||this.close(),t?this.emit("error",t):this.emit(rd),this}static get isStream(){return Tu}}const yd=O.default.constants||{ZLIB_VERNUM:4736},wd=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},yd)),Ed=f.Buffer.concat,Id=Object.getOwnPropertyDescriptor(f.Buffer,"concat"),Rd=t=>t,jd=!0===Id?.writable||void 0!==Id?.set?t=>{f.Buffer.concat=t?Rd:Ed}:t=>{},Sd=Symbol("_superWrite");class _d extends Error{code;errno;constructor(t){super("zlib: "+t.message),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const Cd=Symbol("flushFlag");class Ad extends gd{#t=!1;#e=!1;#n;#r;#o;#i;#s;get sawError(){return this.#t}get handle(){return this.#i}get flushFlag(){return this.#n}constructor(t,e){if(!t||"object"!=typeof t)throw new TypeError("invalid options for ZlibBase constructor");super(t),this.#n=t.flush??0,this.#r=t.finishFlush??0,this.#o=t.fullFlushFlag??0;try{this.#i=new T[e](t)}catch(t){throw new _d(t)}this.#s=t=>{this.#t||(this.#t=!0,this.close(),this.emit("error",t))},this.#i?.on("error",(t=>this.#s(new _d(t)))),this.once("end",(()=>this.close))}close(){this.#i&&(this.#i.close(),this.#i=void 0,this.emit("close"))}reset(){if(!this.#t)return H.default(this.#i,"zlib binding closed"),this.#i.reset?.()}flush(t){this.ended||("number"!=typeof t&&(t=this.#o),this.write(Object.assign(f.Buffer.alloc(0),{[Cd]:t})))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&(e?this.write(t,e):this.write(t)),this.flush(this.#r),this.#e=!0,super.end(n)}get ended(){return this.#e}[Sd](t){return super.write(t)}write(t,e,n){if("function"==typeof e&&(n=e,e="utf8"),"string"==typeof t&&(t=f.Buffer.from(t,e)),this.#t)return;H.default(this.#i,"zlib binding closed");const r=this.#i._handle,o=r.close;r.close=()=>{};const i=this.#i.close;let s,a;this.#i.close=()=>{},jd(!0);try{const e="number"==typeof t[Cd]?t[Cd]:this.#n;s=this.#i._processChunk(t,e),jd(!1)}catch(t){jd(!1),this.#s(new _d(t))}finally{this.#i&&(this.#i._handle=r,r.close=o,this.#i.close=i,this.#i.removeAllListeners("error"))}if(this.#i&&this.#i.on("error",(t=>this.#s(new _d(t)))),s)if(Array.isArray(s)&&s.length>0){const t=s[0];a=this[Sd](f.Buffer.from(t));for(let t=1;t<s.length;t++)a=this[Sd](s[t])}else a=this[Sd](f.Buffer.from(s));return n&&n(),a}}class Ud extends Ad{#a;#c;constructor(t,e){(t=t||{}).flush=t.flush||wd.Z_NO_FLUSH,t.finishFlush=t.finishFlush||wd.Z_FINISH,t.fullFlushFlag=wd.Z_FULL_FLUSH,super(t,e),this.#a=t.level,this.#c=t.strategy}params(t,e){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#a!==t||this.#c!==e){this.flush(wd.Z_SYNC_FLUSH),H.default(this.handle,"zlib binding closed");const n=this.handle.flush;this.handle.flush=(t,e)=>{"function"==typeof t&&(e=t,t=this.flushFlag),this.flush(t),e?.()};try{this.handle.params(t,e)}finally{this.handle.flush=n}this.handle&&(this.#a=t,this.#c=e)}}}}class xd extends Ud{#u;constructor(t){super(t,"Gzip"),this.#u=t&&!!t.portable}[Sd](t){return this.#u?(this.#u=!1,t[9]=255,super[Sd](t)):super[Sd](t)}}class Pd extends Ud{constructor(t){super(t,"Unzip")}}class kd extends Ad{constructor(t,e){(t=t||{}).flush=t.flush||wd.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||wd.BROTLI_OPERATION_FINISH,t.fullFlushFlag=wd.BROTLI_OPERATION_FLUSH,super(t,e)}}class Od extends kd{constructor(t){super(t,"BrotliCompress")}}class Td extends kd{constructor(t){super(t,"BrotliDecompress")}}class Dd{tail;head;length=0;static create(t=[]){return new Dd(t)}constructor(t=[]){for(const e of t)this.push(e)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");const e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,e}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);const e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);const e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let e=0,n=t.length;e<n;e++)Nd(this,t[e]);return this.length}unshift(...t){for(var e=0,n=t.length;e<n;e++)qd(this,t[e]);return this.length}pop(){if(!this.tail)return;const t=this.tail.value,e=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,e.list=void 0,this.length--,t}shift(){if(!this.head)return;const t=this.head.value,e=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,e.list=void 0,this.length--,t}forEach(t,e){e=e||this;for(let n=this.head,r=0;n;r++)t.call(e,n.value,r,this),n=n.next}forEachReverse(t,e){e=e||this;for(let n=this.tail,r=this.length-1;n;r--)t.call(e,n.value,r,this),n=n.prev}get(t){let e=0,n=this.head;for(;n&&e<t;e++)n=n.next;if(e===t&&n)return n.value}getReverse(t){let e=0,n=this.tail;for(;n&&e<t;e++)n=n.prev;if(e===t&&n)return n.value}map(t,e){e=e||this;const n=new Dd;for(let r=this.head;r;)n.push(t.call(e,r.value,this)),r=r.next;return n}mapReverse(t,e){e=e||this;var n=new Dd;for(let r=this.tail;r;)n.push(t.call(e,r.value,this)),r=r.prev;return n}reduce(t,e){let n,r=this.head;if(arguments.length>1)n=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;r;o++)n=t(n,r.value,o),r=r.next;return n}reduceReverse(t,e){let n,r=this.tail;if(arguments.length>1)n=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(let e=this.length-1;r;e--)n=t(n,r.value,e),r=r.prev;return n}toArray(){const t=new Array(this.length);for(let e=0,n=this.head;n;e++)t[e]=n.value,n=n.next;return t}toArrayReverse(){const t=new Array(this.length);for(let e=0,n=this.tail;n;e++)t[e]=n.value,n=n.prev;return t}slice(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Dd;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.head,o=0;for(o=0;r&&o<t;o++)r=r.next;for(;r&&o<e;o++,r=r.next)n.push(r.value);return n}sliceReverse(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Dd;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.length,o=this.tail;for(;o&&r>e;r--)o=o.prev;for(;o&&r>t;r--,o=o.prev)n.push(o.value);return n}splice(t,e=0,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let r=this.head;for(let e=0;r&&e<t;e++)r=r.next;const o=[];for(let t=0;r&&t<e;t++)o.push(r.value),r=this.removeNode(r);r?r!==this.tail&&(r=r.prev):r=this.tail;for(const t of n)r=Ld(this,r,t);return o}reverse(){const t=this.head,e=this.tail;for(let e=t;e;e=e.prev){const t=e.prev;e.prev=e.next,e.next=t}return this.head=e,this.tail=t,this}}function Ld(t,e,n){const r=e,o=e?e.next:t.head,i=new Bd(n,r,o,t);return void 0===i.next&&(t.tail=i),void 0===i.prev&&(t.head=i),t.length++,i}function Nd(t,e){t.tail=new Bd(e,t.tail,void 0,t),t.head||(t.head=t.tail),t.length++}function qd(t,e){t.head=new Bd(e,void 0,t.head,t),t.tail||(t.tail=t.head),t.length++}class Bd{list;next;prev;value;constructor(t,e,n,r){this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=void 0,n?(n.prev=this,this.next=n):this.next=void 0}}const Fd=(t,e)=>{e[0]=128;for(var n=e.length;n>1;n--)e[n-1]=255&t,t=Math.floor(t/256)},Gd=(t,e)=>{e[0]=255;var n=!1;t*=-1;for(var r=e.length;r>1;r--){var o=255&t;t=Math.floor(t/256),n?e[r-1]=Jd(o):0===o?e[r-1]=0:(n=!0,e[r-1]=Wd(o))}},Md=t=>{for(var e=t.length,n=0,r=!1,o=e-1;o>-1;o--){var i,s=Number(t[o]);r?i=Jd(s):0===s?i=s:(r=!0,i=Wd(s)),0!==i&&(n-=i*Math.pow(256,e-o-1))}return n},zd=t=>{for(var e=t.length,n=0,r=e-1;r>-1;r--){var o=Number(t[r]);0!==o&&(n+=o*Math.pow(256,e-r-1))}return n},Jd=t=>255&(255^t),Wd=t=>1+(255^t)&255,$d=t=>Hd.has(t),Hd=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),Vd=new Map(Array.from(Hd).map((t=>[t[1],t[0]])));class Zd{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#d="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,e=0,n,r){Buffer.isBuffer(t)?this.decode(t,e||0,n,r):t&&this.#l(t)}decode(t,e,n,r){if(e||(e=0),!(t&&t.length>=e+512))throw new Error("need 512 bytes for header");this.path=Kd(t,e,100),this.mode=tl(t,e+100,8),this.uid=tl(t,e+108,8),this.gid=tl(t,e+116,8),this.size=tl(t,e+124,12),this.mtime=Xd(t,e+136,12),this.cksum=tl(t,e+148,12),r&&this.#l(r,!0),n&&this.#l(n);const o=Kd(t,e+156,1);if($d(o)&&(this.#d=o||"0"),"0"===this.#d&&"/"===this.path.slice(-1)&&(this.#d="5"),"5"===this.#d&&(this.size=0),this.linkpath=Kd(t,e+157,100),"ustar\x0000"===t.subarray(e+257,e+265).toString())if(this.uname=Kd(t,e+265,32),this.gname=Kd(t,e+297,32),this.devmaj=tl(t,e+329,8)??0,this.devmin=tl(t,e+337,8)??0,0!==t[e+475]){const n=Kd(t,e+345,155);this.path=n+"/"+this.path}else{const n=Kd(t,e+345,130);n&&(this.path=n+"/"+this.path),this.atime=Xd(t,e+476,12),this.ctime=Xd(t,e+488,12)}let i=256;for(let n=e;n<e+148;n++)i+=t[n];for(let n=e+156;n<e+512;n++)i+=t[n];this.cksumValid=i===this.cksum,void 0===this.cksum&&256===i&&(this.nullBlock=!0)}#l(t,e=!1){Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,n])=>!(null==n||"path"===t&&e||"linkpath"===t&&e||"global"===t)))))}encode(t,e=0){if(t||(t=this.block=Buffer.alloc(512)),"Unsupported"===this.#d&&(this.#d="0"),!(t.length>=e+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=Yd(this.path||"",n),o=r[0],i=r[1];this.needPax=!!r[2],this.needPax=ul(t,e,100,o)||this.needPax,this.needPax=rl(t,e+100,8,this.mode)||this.needPax,this.needPax=rl(t,e+108,8,this.uid)||this.needPax,this.needPax=rl(t,e+116,8,this.gid)||this.needPax,this.needPax=rl(t,e+124,12,this.size)||this.needPax,this.needPax=al(t,e+136,12,this.mtime)||this.needPax,t[e+156]=this.#d.charCodeAt(0),this.needPax=ul(t,e+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",e+257,8),this.needPax=ul(t,e+265,32,this.uname)||this.needPax,this.needPax=ul(t,e+297,32,this.gname)||this.needPax,this.needPax=rl(t,e+329,8,this.devmaj)||this.needPax,this.needPax=rl(t,e+337,8,this.devmin)||this.needPax,this.needPax=ul(t,e+345,n,i)||this.needPax,0!==t[e+475]?this.needPax=ul(t,e+345,155,i)||this.needPax:(this.needPax=ul(t,e+345,130,i)||this.needPax,this.needPax=al(t,e+476,12,this.atime)||this.needPax,this.needPax=al(t,e+488,12,this.ctime)||this.needPax);let s=256;for(let n=e;n<e+148;n++)s+=t[n];for(let n=e+156;n<e+512;n++)s+=t[n];return this.cksum=s,rl(t,e+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#d?this.#d:Hd.get(this.#d)}get typeKey(){return this.#d}set type(t){const e=String(Vd.get(t));if($d(e)||"Unsupported"===e)this.#d=e;else{if(!$d(t))throw new TypeError("invalid entry type: "+t);this.#d=t}}}const Yd=(t,e)=>{const n=100;let r,o=t,i="";const s=y.posix.parse(t).root||".";if(Buffer.byteLength(o)<n)r=[o,i,!1];else{i=y.posix.dirname(o),o=y.posix.basename(o);do{Buffer.byteLength(o)<=n&&Buffer.byteLength(i)<=e?r=[o,i,!1]:Buffer.byteLength(o)>n&&Buffer.byteLength(i)<=e?r=[o.slice(0,99),i,!0]:(o=y.posix.join(y.posix.basename(i),o),i=y.posix.dirname(i))}while(i!==s&&void 0===r);r||(r=[t.slice(0,99),"",!0])}return r},Kd=(t,e,n)=>t.subarray(e,e+n).toString("utf8").replace(/\0.*/,""),Xd=(t,e,n)=>Qd(tl(t,e,n)),Qd=t=>void 0===t?void 0:new Date(1e3*t),tl=(t,e,n)=>128&Number(t[e])?(t=>{const e=t[0],n=128===e?zd(t.subarray(1,t.length)):255===e?Md(t):null;if(null===n)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n})(t.subarray(e,e+n)):el(t,e,n),el=(t,e,n)=>{return r=parseInt(t.subarray(e,e+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?void 0:r;var r},nl={12:8589934591,8:2097151},rl=(t,e,n,r)=>void 0!==r&&(r>nl[n]||r<0?(((t,e)=>{if(!Number.isSafeInteger(t))throw Error("cannot encode number outside of javascript safe integer range");t<0?Gd(t,e):Fd(t,e)})(r,t.subarray(e,e+n)),!0):(ol(t,e,n,r),!1)),ol=(t,e,n,r)=>t.write(il(r,n),e,n,"ascii"),il=(t,e)=>sl(Math.floor(t).toString(8),e),sl=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",al=(t,e,n,r)=>void 0!==r&&rl(t,e,n,r.getTime()/1e3),cl=new Array(156).join("\0"),ul=(t,e,n,r)=>void 0!==r&&(t.write(r+cl,e,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);class dl{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,e=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=e,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){const t=this.encodeBody();if(""===t)return Buffer.allocUnsafe(0);const e=Buffer.byteLength(t),n=512*Math.ceil(1+e/512),r=Buffer.allocUnsafe(n);for(let t=0;t<512;t++)r[t]=0;new Zd({path:("PaxHeader/"+y.basename(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:e,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(t,512,e,"utf8");for(let t=e+512;t<r.length;t++)r[t]=0;return r}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(void 0===this[t])return"";const e=this[t],n=" "+("dev"===t||"ino"===t||"nlink"===t?"SCHILY.":"")+t+"="+(e instanceof Date?e.getTime()/1e3:e)+"\n",r=Buffer.byteLength(n);let o=Math.floor(Math.log(r)/Math.log(10))+1;r+o>=Math.pow(10,o)&&(o+=1);return o+r+n}static parse(t,e,n=!1){return new dl(ll(hl(t),e),n)}}const ll=(t,e)=>e?Object.assign({},e,t):t,hl=t=>t.replace(/\n$/,"").split("\n").reduce(pl,Object.create(null)),pl=(t,e)=>{const n=parseInt(e,10);if(n!==Buffer.byteLength(e)+1)return t;const r=(e=e.slice((n+" ").length)).split("="),o=r.shift();if(!o)return t;const i=o.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),s=r.join("=");return t[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(1e3*Number(s)):/^[0-9]+$/.test(s)?+s:s,t},fl="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?t=>t:t=>t&&t.replace(/\\/g,"/");class ml extends gd{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,e,n){switch(super({}),this.pause(),this.extended=e,this.globalExtended=n,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw new Error("no path provided for tar.ReadEntry");this.path=fl(t.path),this.mode=t.mode,this.mode&&(this.mode=4095&this.mode),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?fl(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,e&&this.#l(e),n&&this.#l(n,!0)}write(t){const e=t.length;if(e>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-e),this.blockRemain=Math.max(0,r-e),!!this.ignore||(n>=e?super.write(t):super.write(t.subarray(0,n)))}#l(t,e=!1){t.path&&(t.path=fl(t.path)),t.linkpath&&(t.linkpath=fl(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,n])=>!(null==n||"path"===t&&e)))))}}const vl=(t,e,n,r={})=>{t.file&&(r.file=t.file),t.cwd&&(r.cwd=t.cwd),r.code=n instanceof Error&&n.code||e,r.tarCode=e,t.strict||!1===r.recoverable?n instanceof Error?t.emit("error",Object.assign(n,r)):t.emit("error",Object.assign(new Error(`${e}: ${n}`),r)):(n instanceof Error&&(r=Object.assign(n,r),n=n.message),t.emit("warn",e,n,r))},bl=Buffer.from([31,139]),gl=Symbol("state"),yl=Symbol("writeEntry"),wl=Symbol("readEntry"),El=Symbol("nextEntry"),Il=Symbol("processEntry"),Rl=Symbol("extendedHeader"),jl=Symbol("globalExtendedHeader"),Sl=Symbol("meta"),_l=Symbol("emitMeta"),Cl=Symbol("buffer"),Al=Symbol("queue"),Ul=Symbol("ended"),xl=Symbol("emittedEnd"),Pl=Symbol("emit"),kl=Symbol("unzip"),Ol=Symbol("consumeChunk"),Tl=Symbol("consumeChunkSub"),Dl=Symbol("consumeBody"),Ll=Symbol("consumeMeta"),Nl=Symbol("consumeHeader"),ql=Symbol("consuming"),Bl=Symbol("bufferConcat"),Fl=Symbol("maybeEnd"),Gl=Symbol("writing"),Ml=Symbol("aborted"),zl=Symbol("onDone"),Jl=Symbol("sawValidEntry"),Wl=Symbol("sawNullBlock"),$l=Symbol("sawEOF"),Hl=Symbol("closeStream"),Vl=()=>!0;class Zl extends t.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;writable=!0;readable=!1;[Al]=new Dd;[Cl];[wl];[yl];[gl]="begin";[Sl]="";[Rl];[jl];[Ul]=!1;[kl];[Ml]=!1;[Jl];[Wl]=!1;[$l]=!1;[Gl]=!1;[ql]=!1;[xl]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(zl,(()=>{"begin"!==this[gl]&&!1!==this[Jl]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")})),t.ondone?this.on(zl,t.ondone):this.on(zl,(()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")})),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||1048576,this.filter="function"==typeof t.filter?t.filter:Vl;const e=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=t.gzip||void 0===t.brotli?!!e&&void 0:t.brotli,this.on("end",(()=>this[Hl]())),"function"==typeof t.onwarn&&this.on("warn",t.onwarn),"function"==typeof t.onReadEntry&&this.on("entry",t.onReadEntry)}warn(t,e,n={}){vl(this,t,e,n)}[Nl](t,e){let n;void 0===this[Jl]&&(this[Jl]=!1);try{n=new Zd(t,e,this[Rl],this[jl])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(n.nullBlock)this[Wl]?(this[$l]=!0,"begin"===this[gl]&&(this[gl]="header"),this[Pl]("eof")):(this[Wl]=!0,this[Pl]("nullBlock"));else if(this[Wl]=!1,n.cksumValid)if(n.path){const t=n.type;if(/^(Symbolic)?Link$/.test(t)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(/^(Symbolic)?Link$/.test(t)||/^(Global)?ExtendedHeader$/.test(t)||!n.linkpath){const t=this[yl]=new ml(n,this[Rl],this[jl]);if(!this[Jl])if(t.remain){const e=()=>{t.invalid||(this[Jl]=!0)};t.on("end",e)}else this[Jl]=!0;t.meta?t.size>this.maxMetaEntrySize?(t.ignore=!0,this[Pl]("ignoredEntry",t),this[gl]="ignore",t.resume()):t.size>0&&(this[Sl]="",t.on("data",(t=>this[Sl]+=t)),this[gl]="meta"):(this[Rl]=void 0,t.ignore=t.ignore||!this.filter(t.path,t),t.ignore?(this[Pl]("ignoredEntry",t),this[gl]=t.remain?"ignore":"header",t.resume()):(t.remain?this[gl]="body":(this[gl]="header",t.end()),this[wl]?this[Al].push(t):(this[Al].push(t),this[El]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[Hl](){queueMicrotask((()=>this.emit("close")))}[Il](t){let e=!0;if(t)if(Array.isArray(t)){const[e,...n]=t;this.emit(e,...n)}else this[wl]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",(()=>this[El]())),e=!1);else this[wl]=void 0,e=!1;return e}[El](){do{}while(this[Il](this[Al].shift()));if(!this[Al].length){const t=this[wl];!t||t.flowing||t.size===t.remain?this[Gl]||this.emit("drain"):t.once("drain",(()=>this.emit("drain")))}}[Dl](t,e){const n=this[yl];if(!n)throw new Error("attempt to consume body without entry??");const r=n.blockRemain??0,o=r>=t.length&&0===e?t:t.subarray(e,e+r);return n.write(o),n.blockRemain||(this[gl]="header",this[yl]=void 0,n.end()),o.length}[Ll](t,e){const n=this[yl],r=this[Dl](t,e);return!this[yl]&&n&&this[_l](n),r}[Pl](t,e,n){this[Al].length||this[wl]?this[Al].push([t,e,n]):this.emit(t,e,n)}[_l](t){switch(this[Pl]("meta",this[Sl]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[Rl]=dl.parse(this[Sl],this[Rl],!1);break;case"GlobalExtendedHeader":this[jl]=dl.parse(this[Sl],this[jl],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{const t=this[Rl]??Object.create(null);this[Rl]=t,t.path=this[Sl].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{const t=this[Rl]||Object.create(null);this[Rl]=t,t.linkpath=this[Sl].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[Ml]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this[Ml])return n?.(),!1;if((void 0===this[kl]||void 0===this.brotli&&!1===this[kl])&&t){if(this[Cl]&&(t=Buffer.concat([this[Cl],t]),this[Cl]=void 0),t.length<bl.length)return this[Cl]=t,n?.(),!0;for(let e=0;void 0===this[kl]&&e<bl.length;e++)t[e]!==bl[e]&&(this[kl]=!1);const e=void 0===this.brotli;if(!1===this[kl]&&e)if(t.length<512){if(!this[Ul])return this[Cl]=t,n?.(),!0;this.brotli=!0}else try{new Zd(t.subarray(0,512)),this.brotli=!1}catch(t){this.brotli=!0}if(void 0===this[kl]||!1===this[kl]&&this.brotli){const e=this[Ul];this[Ul]=!1,this[kl]=void 0===this[kl]?new Pd({}):new Td({}),this[kl].on("data",(t=>this[Ol](t))),this[kl].on("error",(t=>this.abort(t))),this[kl].on("end",(()=>{this[Ul]=!0,this[Ol]()})),this[Gl]=!0;const r=!!this[kl][e?"end":"write"](t);return this[Gl]=!1,n?.(),r}}this[Gl]=!0,this[kl]?this[kl].write(t):this[Ol](t),this[Gl]=!1;const r=!this[Al].length&&(!this[wl]||this[wl].flowing);return r||this[Al].length||this[wl]?.once("drain",(()=>this.emit("drain"))),n?.(),r}[Bl](t){t&&!this[Ml]&&(this[Cl]=this[Cl]?Buffer.concat([this[Cl],t]):t)}[Fl](){if(this[Ul]&&!this[xl]&&!this[Ml]&&!this[ql]){this[xl]=!0;const t=this[yl];if(t&&t.blockRemain){const e=this[Cl]?this[Cl].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`,{entry:t}),this[Cl]&&t.write(this[Cl]),t.end()}this[Pl](zl)}}[Ol](t){if(this[ql]&&t)this[Bl](t);else if(t||this[Cl]){if(t){if(this[ql]=!0,this[Cl]){this[Bl](t);const e=this[Cl];this[Cl]=void 0,this[Tl](e)}else this[Tl](t);for(;this[Cl]&&this[Cl]?.length>=512&&!this[Ml]&&!this[$l];){const t=this[Cl];this[Cl]=void 0,this[Tl](t)}this[ql]=!1}}else this[Fl]();this[Cl]&&!this[Ul]||this[Fl]()}[Tl](t){let e=0;const n=t.length;for(;e+512<=n&&!this[Ml]&&!this[$l];)switch(this[gl]){case"begin":case"header":this[Nl](t,e),e+=512;break;case"ignore":case"body":e+=this[Dl](t,e);break;case"meta":e+=this[Ll](t,e);break;default:throw new Error("invalid state: "+this[gl])}e<n&&(this[Cl]?this[Cl]=Buffer.concat([t.subarray(e),this[Cl]]):this[Cl]=t.subarray(e))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e)),n&&this.once("finish",n),this[Ml]||(this[kl]?(t&&this[kl].write(t),this[kl].end()):(this[Ul]=!0,void 0===this.brotli&&(t=t||Buffer.alloc(0)),t&&this.write(t),this[Fl]())),this}}const Yl=t=>{let e=t.length-1,n=-1;for(;e>-1&&"/"===t.charAt(e);)n=e,e--;return-1===n?t:t.slice(0,n)},Kl=(t,e)=>{const n=new Map(e.map((t=>[Yl(t),!0]))),r=t.filter,o=(t,e="")=>{const r=e||l.parse(t).root||".";let i;if(t===r)i=!1;else{const e=n.get(t);i=void 0!==e?e:o(l.dirname(t),r)}return n.set(t,i),i};t.filter=r?(t,e)=>r(t,e)&&o(Yl(t)):t=>o(Yl(t))},Xl=ku((t=>{const e=new Zl(t),n=t.file;let r;try{const o=$.default.statSync(n),i=t.maxReadSize||16777216;if(o.size<i)e.end($.default.readFileSync(n));else{let t=0;const s=Buffer.allocUnsafe(i);for(r=$.default.openSync(n,"r");t<o.size;){const n=$.default.readSync(r,s,0,i,t);t+=n,e.write(s.subarray(0,n))}e.end()}}finally{if("number"==typeof r)try{$.default.closeSync(r)}catch(t){}}}),((t,e)=>{const n=new Zl(t),r=t.maxReadSize||16777216,o=t.file,i=new Promise(((t,e)=>{n.on("error",e),n.on("end",t),$.default.stat(o,((t,i)=>{if(t)e(t);else{const t=new Su(o,{readSize:r,size:i.size});t.on("error",e),t.pipe(n)}}))}));return i}),(t=>new Zl(t)),(t=>new Zl(t)),((t,e)=>{e?.length&&Kl(t,e),t.noResume||(t=>{const e=t.onReadEntry;t.onReadEntry=e?t=>{e(t),t.resume()}:t=>t.resume()})(t)})),Ql=(t,e,n)=>(t&=4095,n&&(t=-19&t|384),e&&(256&t&&(t|=64),32&t&&(t|=8),4&t&&(t|=1)),t),{isAbsolute:th,parse:eh}=y.win32,nh=t=>{let e="",n=eh(t);for(;th(t)||n.root;){const r="/"===t.charAt(0)&&"//?/"!==t.slice(0,4)?"/":n.root;t=t.slice(r.length),e+=r,n=eh(t)}return[e,t]},rh=["|","<",">","?",":"],oh=rh.map((t=>String.fromCharCode(61440+t.charCodeAt(0)))),ih=new Map(rh.map(((t,e)=>[t,oh[e]]))),sh=new Map(oh.map(((t,e)=>[t,rh[e]]))),ah=t=>rh.reduce(((t,e)=>t.split(e).join(ih.get(e))),t),ch=(t,e)=>e?(t=fl(t).replace(/^\.(\/|$)/,""),Yl(e)+"/"+t):fl(t),uh=Symbol("process"),dh=Symbol("file"),lh=Symbol("directory"),hh=Symbol("symlink"),ph=Symbol("hardlink"),fh=Symbol("header"),mh=Symbol("read"),vh=Symbol("lstat"),bh=Symbol("onlstat"),gh=Symbol("onread"),yh=Symbol("onreadlink"),wh=Symbol("openfile"),Eh=Symbol("onopenfile"),Ih=Symbol("close"),Rh=Symbol("mode"),jh=Symbol("awaitDrain"),Sh=Symbol("ondrain"),_h=Symbol("prefix");class Ch extends gd{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#h=!1;constructor(t,e={}){const n=Pu(e);super(),this.path=fl(t),this.portable=!!n.portable,this.maxReadSize=n.maxReadSize||16777216,this.linkCache=n.linkCache||new Map,this.statCache=n.statCache||new Map,this.preservePaths=!!n.preservePaths,this.cwd=fl(n.cwd||process.cwd()),this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.mtime=n.mtime,this.prefix=n.prefix?fl(n.prefix):void 0,this.onWriteEntry=n.onWriteEntry,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){const[t,e]=nh(this.path);t&&"string"==typeof e&&(this.path=e,r=t)}var o;this.win32=!!n.win32||"win32"===process.platform,this.win32&&(this.path=(o=this.path.replace(/\\/g,"/"),oh.reduce(((t,e)=>t.split(e).join(sh.get(e))),o)),t=t.replace(/\\/g,"/")),this.absolute=fl(n.absolute||B.default.resolve(this.cwd,t)),""===this.path&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});const i=this.statCache.get(this.absolute);i?this[bh](i):this[vh]()}warn(t,e,n={}){return vl(this,t,e,n)}emit(t,...e){return"error"===t&&(this.#h=!0),super.emit(t,...e)}[vh](){q.default.lstat(this.absolute,((t,e)=>{if(t)return this.emit("error",t);this[bh](e)}))}[bh](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=xh(t),this.emit("stat",t),this[uh]()}[uh](){switch(this.type){case"File":return this[dh]();case"Directory":return this[lh]();case"SymbolicLink":return this[hh]();default:return this.end()}}[Rh](t){return Ql(t,"Directory"===this.type,this.portable)}[_h](t){return ch(t,this.prefix)}[fh](){if(!this.stat)throw new Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new Zd({path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,mode:this[Rh](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new dl({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());const t=this.header?.block;if(!t)throw new Error("failed to encode header");super.write(t)}[lh](){if(!this.stat)throw new Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[fh](),this.end()}[hh](){q.default.readlink(this.absolute,((t,e)=>{if(t)return this.emit("error",t);this[yh](e)}))}[yh](t){this.linkpath=fl(t),this[fh](),this.end()}[ph](t){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=fl(B.default.relative(this.cwd,t)),this.stat.size=0,this[fh](),this.end()}[dh](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){const t=`${this.stat.dev}:${this.stat.ino}`,e=this.linkCache.get(t);if(0===e?.indexOf(this.cwd))return this[ph](e);this.linkCache.set(t,this.absolute)}if(this[fh](),0===this.stat.size)return this.end();this[wh]()}[wh](){q.default.open(this.absolute,"r",((t,e)=>{if(t)return this.emit("error",t);this[Eh](e)}))}[Eh](t){if(this.fd=t,this.#h)return this[Ih]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const e=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(e),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[mh]()}[mh](){const{fd:t,buf:e,offset:n,length:r,pos:o}=this;if(void 0===t||void 0===e)throw new Error("cannot read file without first opening");q.default.read(t,e,n,r,o,((t,e)=>{if(t)return this[Ih]((()=>this.emit("error",t)));this[gh](e)}))}[Ih](t=()=>{}){void 0!==this.fd&&q.default.close(this.fd,t)}[gh](t){if(t<=0&&this.remain>0){const t=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Ih]((()=>this.emit("error",t)))}if(t>this.remain){const t=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Ih]((()=>this.emit("error",t)))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(t===this.remain)for(let e=t;e<this.length&&t<this.blockRemain;e++)this.buf[e+this.offset]=0,t++,this.remain++;const e=0===this.offset&&t===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+t);this.write(e)?this[Sh]():this[jh]((()=>this[Sh]()))}[jh](t){this.once("drain",t)}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this.blockRemain<t.length){const t=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",t)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t,null,n)}[Sh](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[Ih]((t=>t?this.emit("error",t):this.end()));if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[mh]()}}class Ah extends Ch{sync=!0;[vh](){this[bh](q.default.lstatSync(this.absolute))}[hh](){this[yh](q.default.readlinkSync(this.absolute))}[wh](){this[Eh](q.default.openSync(this.absolute,"r"))}[mh](){let t=!0;try{const{fd:e,buf:n,offset:r,length:o,pos:i}=this;if(void 0===e||void 0===n)throw new Error("fd and buf must be set in READ method");const s=q.default.readSync(e,n,r,o,i);this[gh](s),t=!1}finally{if(t)try{this[Ih]((()=>{}))}catch(t){}}}[jh](t){t()}[Ih](t=()=>{}){void 0!==this.fd&&q.default.closeSync(this.fd),t()}}class Uh extends gd{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,e,n={}){return vl(this,t,e,n)}constructor(t,e={}){const n=Pu(e);super(),this.preservePaths=!!n.preservePaths,this.portable=!!n.portable,this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.onWriteEntry=n.onWriteEntry,this.readEntry=t;const{type:r}=t;if("Unsupported"===r)throw new Error("writing entry that should be ignored");this.type=r,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=n.prefix,this.path=fl(t.path),this.mode=void 0!==t.mode?this[Rh](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:n.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=void 0!==t.linkpath?fl(t.linkpath):void 0,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let o=!1;if(!this.preservePaths){const[t,e]=nh(this.path);t&&"string"==typeof e&&(this.path=e,o=t)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new Zd({path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.header.encode()&&!this.noPax&&super.write(new dl({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());const i=this.header?.block;if(!i)throw new Error("failed to encode header");super.write(i),t.pipe(this)}[_h](t){return ch(t,this.prefix)}[Rh](t){return Ql(t,"Directory"===this.type,this.portable)}write(t,e,n){"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8"));const r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t,n)}end(t,e,n){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e??"utf8")),n&&this.once("finish",n),t?super.end(t,n):super.end(n),this}}const xh=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";class Ph{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(t,e){this.path=t||"./",this.absolute=e}}const kh=Buffer.alloc(1024),Oh=Symbol("onStat"),Th=Symbol("ended"),Dh=Symbol("queue"),Lh=Symbol("current"),Nh=Symbol("process"),qh=Symbol("processing"),Bh=Symbol("processJob"),Fh=Symbol("jobs"),Gh=Symbol("jobDone"),Mh=Symbol("addFSEntry"),zh=Symbol("addTarEntry"),Jh=Symbol("stat"),Wh=Symbol("readdir"),$h=Symbol("onreaddir"),Hh=Symbol("pipe"),Vh=Symbol("entry"),Zh=Symbol("entryOpt"),Yh=Symbol("writeEntryClass"),Kh=Symbol("write"),Xh=Symbol("ondrain");class Qh extends gd{opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[Yh];onWriteEntry;[Dh];[Fh]=0;[qh]=!1;[Th]=!1;constructor(t={}){if(super(),this.opt=t,this.file=t.file||"",this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=fl(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this.onWriteEntry=t.onWriteEntry,this[Yh]=Ch,"function"==typeof t.onwarn&&this.on("warn",t.onwarn),this.portable=!!t.portable,t.gzip||t.brotli){if(t.gzip&&t.brotli)throw new TypeError("gzip and brotli are mutually exclusive");if(t.gzip&&("object"!=typeof t.gzip&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new xd(t.gzip)),t.brotli&&("object"!=typeof t.brotli&&(t.brotli={}),this.zip=new Od(t.brotli)),!this.zip)throw new Error("impossible");const e=this.zip;e.on("data",(t=>super.write(t))),e.on("end",(()=>super.end())),e.on("drain",(()=>this[Xh]())),this.on("resume",(()=>e.resume()))}else this.on("drain",this[Xh]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter="function"==typeof t.filter?t.filter:()=>!0,this[Dh]=new Dd,this[Fh]=0,this.jobs=Number(t.jobs)||4,this[qh]=!1,this[Th]=!1}[Kh](t){return super.write(t)}add(t){return this.write(t),this}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&this.add(t),this[Th]=!0,this[Nh](),n&&n(),this}write(t){if(this[Th])throw new Error("write after end");return t instanceof ml?this[zh](t):this[Mh](t),this.flowing}[zh](t){const e=fl(B.default.resolve(this.cwd,t.path));if(this.filter(t.path,t)){const n=new Ph(t.path,e);n.entry=new Uh(t,this[Zh](n)),n.entry.on("end",(()=>this[Gh](n))),this[Fh]+=1,this[Dh].push(n)}else t.resume();this[Nh]()}[Mh](t){const e=fl(B.default.resolve(this.cwd,t));this[Dh].push(new Ph(t,e)),this[Nh]()}[Jh](t){t.pending=!0,this[Fh]+=1;const e=this.follow?"stat":"lstat";q.default[e](t.absolute,((e,n)=>{t.pending=!1,this[Fh]-=1,e?this.emit("error",e):this[Oh](t,n)}))}[Oh](t,e){this.statCache.set(t.absolute,e),t.stat=e,this.filter(t.path,e)||(t.ignore=!0),this[Nh]()}[Wh](t){t.pending=!0,this[Fh]+=1,q.default.readdir(t.absolute,((e,n)=>{if(t.pending=!1,this[Fh]-=1,e)return this.emit("error",e);this[$h](t,n)}))}[$h](t,e){this.readdirCache.set(t.absolute,e),t.readdir=e,this[Nh]()}[Nh](){if(!this[qh]){this[qh]=!0;for(let t=this[Dh].head;t&&this[Fh]<this.jobs;t=t.next)if(this[Bh](t.value),t.value.ignore){const e=t.next;this[Dh].removeNode(t),t.next=e}this[qh]=!1,this[Th]&&!this[Dh].length&&0===this[Fh]&&(this.zip?this.zip.end(kh):(super.write(kh),super.end()))}}get[Lh](){return this[Dh]&&this[Dh].head&&this[Dh].head.value}[Gh](t){this[Dh].shift(),this[Fh]-=1,this[Nh]()}[Bh](t){if(!t.pending)if(t.entry)t!==this[Lh]||t.piped||this[Hh](t);else{if(!t.stat){const e=this.statCache.get(t.absolute);e?this[Oh](t,e):this[Jh](t)}if(t.stat&&!t.ignore){if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){const e=this.readdirCache.get(t.absolute);if(e?this[$h](t,e):this[Wh](t),!t.readdir)return}t.entry=this[Vh](t),t.entry?t!==this[Lh]||t.piped||this[Hh](t):t.ignore=!0}}}[Zh](t){return{onwarn:(t,e,n)=>this.warn(t,e,n),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[Vh](t){this[Fh]+=1;try{return new this[Yh](t.path,this[Zh](t)).on("end",(()=>this[Gh](t))).on("error",(t=>this.emit("error",t)))}catch(t){this.emit("error",t)}}[Xh](){this[Lh]&&this[Lh].entry&&this[Lh].entry.resume()}[Hh](t){t.piped=!0,t.readdir&&t.readdir.forEach((e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Mh](r+e)}));const e=t.entry,n=this.zip;if(!e)throw new Error("cannot pipe without source");n?e.on("data",(t=>{n.write(t)||e.pause()})):e.on("data",(t=>{super.write(t)||e.pause()}))}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,e,n={}){vl(this,t,e,n)}}class tp extends Qh{sync=!0;constructor(t){super(t),this[Yh]=Ah}pause(){}resume(){}[Jh](t){const e=this.follow?"statSync":"lstatSync";this[Oh](t,q.default[e](t.absolute))}[Wh](t){this[$h](t,q.default.readdirSync(t.absolute))}[Hh](t){const e=t.entry,n=this.zip;if(t.readdir&&t.readdir.forEach((e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Mh](r+e)})),!e)throw new Error("Cannot pipe without source");n?e.on("data",(t=>{n.write(t)})):e.on("data",(t=>{super[Kh](t)}))}}const ep=(t,e)=>{e.forEach((e=>{"@"===e.charAt(0)?Xl({file:W.default.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)})),t.end()},np=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await Xl({file:W.default.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>{t.add(e)}}):t.add(r)}t.end()},rp=ku(((t,e)=>{const n=new tp(t),r=new Au(t.file,{mode:t.mode||438});n.pipe(r),ep(n,e)}),((t,e)=>{const n=new Qh(t),r=new Cu(t.file,{mode:t.mode||438});n.pipe(r);const o=new Promise(((t,e)=>{r.on("error",e),r.on("close",t),n.on("error",e)}));return np(n,e),o}),((t,e)=>{const n=new tp(t);return ep(n,e),n}),((t,e)=>{const n=new Qh(t);return np(n,e),n}),((t,e)=>{if(!e?.length)throw new TypeError("no paths specified to add to archive")})),op="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:ip,O_TRUNC:sp,O_WRONLY:ap}=q.default.constants,cp=Number(process.env.__FAKE_FS_O_FILENAME__)||q.default.constants.UV_FS_O_FILEMAP||0,up=cp|sp|ip|ap,dp=op&&!!cp?t=>t<524288?up:"w":()=>"w",lp=(t,e,n)=>{try{return $.default.lchownSync(t,e,n)}catch(t){if("ENOENT"!==t?.code)throw t}},hp=(t,e,n,r)=>{$.default.lchown(t,e,n,(t=>{r(t&&"ENOENT"!==t?.code?t:null)}))},pp=(t,e,n,r,o)=>{if(e.isDirectory())fp(W.default.resolve(t,e.name),n,r,(i=>{if(i)return o(i);const s=W.default.resolve(t,e.name);hp(s,n,r,o)}));else{const i=W.default.resolve(t,e.name);hp(i,n,r,o)}},fp=(t,e,n,r)=>{$.default.readdir(t,{withFileTypes:!0},((o,i)=>{if(o){if("ENOENT"===o.code)return r();if("ENOTDIR"!==o.code&&"ENOTSUP"!==o.code)return r(o)}if(o||!i.length)return hp(t,e,n,r);let s=i.length,a=null;const c=o=>{if(!a)return o?r(a=o):0===--s?hp(t,e,n,r):void 0};for(const r of i)pp(t,r,e,n,c)}))},mp=(t,e,n,r)=>{e.isDirectory()&&vp(W.default.resolve(t,e.name),n,r),lp(W.default.resolve(t,e.name),n,r)},vp=(t,e,n)=>{let r;try{r=$.default.readdirSync(t,{withFileTypes:!0})}catch(r){const o=r;if("ENOENT"===o?.code)return;if("ENOTDIR"===o?.code||"ENOTSUP"===o?.code)return lp(t,e,n);throw o}for(const o of r)mp(t,o,e,n);return lp(t,e,n)},bp=t=>{if(t)if("object"==typeof t)t={mode:511,...t};else if("number"==typeof t)t={mode:t};else{if("string"!=typeof t)throw new TypeError("invalid options argument");t={mode:parseInt(t,8)}}else t={mode:511};const e=t,n=t.fs||{};return t.mkdir=t.mkdir||n.mkdir||d.mkdir,t.mkdirAsync=t.mkdirAsync?t.mkdirAsync:async(t,n)=>new Promise(((r,o)=>e.mkdir(t,n,((t,e)=>t?o(t):r(e))))),t.stat=t.stat||n.stat||d.stat,t.statAsync=t.statAsync?t.statAsync:async t=>new Promise(((n,r)=>e.stat(t,((t,e)=>t?r(t):n(e))))),t.statSync=t.statSync||n.statSync||d.statSync,t.mkdirSync=t.mkdirSync||n.mkdirSync||d.mkdirSync,e},gp=(t,e,n)=>{const r=l.dirname(t),o={...bp(e),recursive:!1};if(r===t)try{return o.mkdirSync(t,o)}catch(t){if(t&&"EISDIR"!==t.code)throw t;return}try{return o.mkdirSync(t,o),n||t}catch(e){const i=e;if(i&&"ENOENT"===i.code)return gp(t,o,gp(r,o,n));if(i&&"EEXIST"!==i.code&&i&&"EROFS"!==i.code)throw e;try{if(!o.statSync(t).isDirectory())throw e}catch(t){throw e}}},yp=Object.assign((async(t,e,n)=>{const r=bp(e);r.recursive=!1;const o=l.dirname(t);return o===t?r.mkdirAsync(t,r).catch((t=>{if(t&&"EISDIR"!==t.code)throw t})):r.mkdirAsync(t,r).then((()=>n||t),(async e=>{const i=e;if(i&&"ENOENT"===i.code)return yp(o,r).then((e=>yp(t,r,e)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw e;return r.statAsync(t).then((t=>{if(t.isDirectory())return n;throw e}),(()=>{throw e}))}))}),{sync:gp}),wp=async(t,e,n)=>{if(n!==e)return t.statAsync(e).then((t=>t.isDirectory()?n:void 0),(n=>n&&"ENOENT"===n.code?wp(t,l.dirname(e),e):void 0))},Ep=(t,e,n)=>{if(n!==e)try{return t.statSync(e).isDirectory()?n:void 0}catch(n){return n&&"ENOENT"===n.code?Ep(t,l.dirname(e),e):void 0}},Ip=(t,e)=>{const n=bp(e);n.recursive=!0;if(l.dirname(t)===t)return n.mkdirSync(t,n);const r=Ep(n,t);try{return n.mkdirSync(t,n),r}catch(e){if(e&&"ENOENT"===e.code)return gp(t,n);throw e}},Rp=Object.assign((async(t,e)=>{const n={...bp(e),recursive:!0};return l.dirname(t)===t?await n.mkdirAsync(t,n):wp(n,t).then((e=>n.mkdirAsync(t,n).then((t=>e||t)).catch((e=>{if(e&&"ENOENT"===e.code)return yp(t,n);throw e}))))}),{sync:Ip}),jp=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Sp=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=l.resolve(t),"win32"===jp){const e=/[*|"<>?:]/,{root:n}=l.parse(t);if(e.test(t.substring(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t},_p=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Cp=+_p[0]>10||10===+_p[0]&&+_p[1]>=12,Ap=Cp?t=>bp(t).mkdirSync===d.mkdirSync:()=>!1,Up=Object.assign(Cp?t=>bp(t).mkdir===d.mkdir:()=>!1,{sync:Ap}),xp=(t,e)=>{t=Sp(t);const n=bp(e);return Ap(n)?Ip(t,n):gp(t,n)},Pp=Object.assign((async(t,e)=>{t=Sp(t);const n=bp(e);return Up(n)?Rp(t,n):yp(t,n)}),{mkdirpSync:xp,mkdirpNative:Rp,mkdirpNativeSync:Ip,mkdirpManual:yp,mkdirpManualSync:gp,sync:xp,native:Rp,nativeSync:Ip,manual:yp,manualSync:gp,useNative:Up,useNativeSync:Ap});class kp extends Error{path;code;syscall="chdir";constructor(t,e){super(`${e}: Cannot cd into '${t}'`),this.path=t,this.code=e}get name(){return"CwdError"}}class Op extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,e){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=e}get name(){return"SymlinkError"}}const Tp=(t,e)=>t.get(fl(e)),Dp=(t,e,n)=>t.set(fl(e),n),Lp=(t,e,n)=>{t=fl(t);const r=e.umask??18,o=448|e.mode,i=0!==(o&r),s=e.uid,a=e.gid,c="number"==typeof s&&"number"==typeof a&&(s!==e.processUid||a!==e.processGid),u=e.preserve,d=e.unlink,l=e.cache,h=fl(e.cwd),p=(e,r)=>{e?n(e):(Dp(l,t,!0),r&&c?fp(r,s,a,(t=>p(t))):i?q.default.chmod(t,o,n):n())};if(l&&!0===Tp(l,t))return p();if(t===h)return((t,e)=>{q.default.stat(t,((n,r)=>{!n&&r.isDirectory()||(n=new kp(t,n?.code||"ENOTDIR")),e(n)}))})(t,p);if(u)return Pp(t,{mode:o}).then((t=>p(null,t??void 0)),p);const f=fl(W.default.relative(h,t)).split("/");Np(h,f,o,l,d,h,void 0,p)},Np=(t,e,n,r,o,i,s,a)=>{if(!e.length)return a(null,s);const c=e.shift(),u=fl(W.default.resolve(t+"/"+c));if(Tp(r,u))return Np(u,e,n,r,o,i,s,a);q.default.mkdir(u,n,qp(u,e,n,r,o,i,s,a))},qp=(t,e,n,r,o,i,s,a)=>c=>{c?q.default.lstat(t,((u,d)=>{if(u)u.path=u.path&&fl(u.path),a(u);else if(d.isDirectory())Np(t,e,n,r,o,i,s,a);else if(o)q.default.unlink(t,(c=>{if(c)return a(c);q.default.mkdir(t,n,qp(t,e,n,r,o,i,s,a))}));else{if(d.isSymbolicLink())return a(new Op(t,t+"/"+e.join("/")));a(c)}})):Np(t,e,n,r,o,i,s=s||t,a)},Bp=(t,e)=>{t=fl(t);const n=e.umask??18,r=448|e.mode,o=0!==(r&n),i=e.uid,s=e.gid,a="number"==typeof i&&"number"==typeof s&&(i!==e.processUid||s!==e.processGid),c=e.preserve,u=e.unlink,d=e.cache,l=fl(e.cwd),h=e=>{Dp(d,t,!0),e&&a&&vp(e,i,s),o&&q.default.chmodSync(t,r)};if(d&&!0===Tp(d,t))return h();if(t===l)return(t=>{let e,n=!1;try{n=q.default.statSync(t).isDirectory()}catch(t){e=t?.code}finally{if(!n)throw new kp(t,e??"ENOTDIR")}})(l),h();if(c)return h(xp(t,r)??void 0);const p=fl(W.default.relative(l,t)).split("/");let f;for(let t=p.shift(),e=l;t&&(e+="/"+t);t=p.shift())if(e=fl(W.default.resolve(e)),!Tp(d,e))try{q.default.mkdirSync(e,r),f=f||e,Dp(d,e,!0)}catch(t){const n=q.default.lstatSync(e);if(n.isDirectory()){Dp(d,e,!0);continue}if(u){q.default.unlinkSync(e),q.default.mkdirSync(e,r),f=f||e,Dp(d,e,!0);continue}if(n.isSymbolicLink())return new Op(e,e+"/"+p.join("/"))}return h(f)},Fp=Object.create(null),{hasOwnProperty:Gp}=Object.prototype,Mp=t=>(Gp.call(Fp,t)||(Fp[t]=t.normalize("NFD")),Fp[t]),zp="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);class Jp{#p=new Map;#f=new Map;#m=new Set;reserve(t,e){t=zp?["win32 parallelization disabled"]:t.map((t=>Yl(y.join(Mp(t))).toLowerCase()));const n=new Set(t.map((t=>(t=>{const e=t.split("/").slice(0,-1).reduce(((t,e)=>{const n=t[t.length-1];return void 0!==n&&(e=y.join(n,e)),t.push(e||"/"),t}),[]);return e})(t))).reduce(((t,e)=>t.concat(e))));this.#f.set(e,{dirs:n,paths:t});for(const n of t){const t=this.#p.get(n);t?t.push(e):this.#p.set(n,[e])}for(const t of n){const n=this.#p.get(t);if(n){const t=n[n.length-1];t instanceof Set?t.add(e):n.push(new Set([e]))}else this.#p.set(t,[new Set([e])])}return this.#v(e)}#b(t){const e=this.#f.get(t);if(!e)throw new Error("function does not have any path reservations");return{paths:e.paths.map((t=>this.#p.get(t))),dirs:[...e.dirs].map((t=>this.#p.get(t)))}}check(t){const{paths:e,dirs:n}=this.#b(t);return e.every((e=>e&&e[0]===t))&&n.every((e=>e&&e[0]instanceof Set&&e[0].has(t)))}#v(t){return!(this.#m.has(t)||!this.check(t))&&(this.#m.add(t),t((()=>this.#g(t))),!0)}#g(t){if(!this.#m.has(t))return!1;const e=this.#f.get(t);if(!e)throw new Error("invalid reservation");const{paths:n,dirs:r}=e,o=new Set;for(const e of n){const n=this.#p.get(e);if(!n||n?.[0]!==t)continue;const r=n[1];if(r)if(n.shift(),"function"==typeof r)o.add(r);else for(const t of r)o.add(t);else this.#p.delete(e)}for(const e of r){const n=this.#p.get(e),r=n?.[0];if(n&&r instanceof Set)if(1!==r.size||1!==n.length)if(1===r.size){n.shift();const t=n[0];"function"==typeof t&&o.add(t)}else r.delete(t);else this.#p.delete(e)}return this.#m.delete(t),o.forEach((t=>this.#v(t))),!0}}const Wp=Symbol("onEntry"),$p=Symbol("checkFs"),Hp=Symbol("checkFs2"),Vp=Symbol("pruneCache"),Zp=Symbol("isReusable"),Yp=Symbol("makeFs"),Kp=Symbol("file"),Xp=Symbol("directory"),Qp=Symbol("link"),tf=Symbol("symlink"),ef=Symbol("hardlink"),nf=Symbol("unsupported"),rf=Symbol("checkPath"),of=Symbol("mkdir"),sf=Symbol("onError"),af=Symbol("pending"),cf=Symbol("pend"),uf=Symbol("unpend"),df=Symbol("ended"),lf=Symbol("maybeClose"),hf=Symbol("skip"),pf=Symbol("doChown"),ff=Symbol("uid"),mf=Symbol("gid"),vf=Symbol("checkedCwd"),bf="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),gf=(t,e,n)=>void 0!==t&&t===t>>>0?t:void 0!==e&&e===e>>>0?e:n,yf=t=>Yl(fl(Mp(t))).toLowerCase();class wf extends Zl{[df]=!1;[vf]=!1;[af]=0;reservations=new Jp;transform;writable=!0;readable=!1;dirCache;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[df]=!0,this[lf]()},super(t),this.transform=t.transform,this.dirCache=t.dirCache||new Map,this.chmod=!!t.chmod,"number"==typeof t.uid||"number"==typeof t.gid){if("number"!=typeof t.uid||"number"!=typeof t.gid)throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;void 0===t.preserveOwner&&"number"!=typeof t.uid?this.preserveOwner=!(!process.getuid||0!==process.getuid()):this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1024,this.forceChown=!0===t.forceChown,this.win32=!!t.win32||bf,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=fl(W.default.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?"number"==typeof t.processUmask?t.processUmask:process.umask():0,this.umask="number"==typeof t.umask?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",(t=>this[Wp](t)))}warn(t,e,n={}){return"TAR_BAD_ARCHIVE"!==t&&"TAR_ABORT"!==t||(n.recoverable=!1),super.warn(t,e,n)}[lf](){this[df]&&0===this[af]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[rf](t){const e=fl(t.path),n=e.split("/");if(this.strip){if(n.length<this.strip)return!1;if("Link"===t.type){const e=fl(String(t.linkpath)).split("/");if(!(e.length>=this.strip))return!1;t.linkpath=e.slice(this.strip).join("/")}n.splice(0,this.strip),t.path=n.join("/")}if(isFinite(this.maxDepth)&&n.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:e,depth:n.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(n.includes("..")||bf&&/^[a-z]:\.\.$/i.test(n[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:t,path:e}),!1;const[r,o]=nh(e);r&&(t.path=String(o),this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:t,path:e}))}if(W.default.isAbsolute(t.path)?t.absolute=fl(W.default.resolve(t.path)):t.absolute=fl(W.default.resolve(this.cwd,t.path)),!this.preservePaths&&"string"==typeof t.absolute&&0!==t.absolute.indexOf(this.cwd+"/")&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:fl(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&"Directory"!==t.type&&"GNUDumpDir"!==t.type)return!1;if(this.win32){const{root:e}=W.default.win32.parse(String(t.absolute));t.absolute=e+ah(String(t.absolute).slice(e.length));const{root:n}=W.default.win32.parse(t.path);t.path=n+ah(t.path.slice(n.length))}return!0}[Wp](t){if(!this[rf](t))return t.resume();switch(V.default.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=448|t.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[$p](t);default:return this[nf](t)}}[sf](t,e){"CwdError"===t.name?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:e}),this[uf](),e.resume())}[of](t,e,n){Lp(fl(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e},n)}[pf](t){return this.forceChown||this.preserveOwner&&("number"==typeof t.uid&&t.uid!==this.processUid||"number"==typeof t.gid&&t.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[ff](t){return gf(this.uid,t.uid,this.processUid)}[mf](t){return gf(this.gid,t.gid,this.processGid)}[Kp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=new Cu(String(t.absolute),{flags:dp(t.size),mode:n,autoClose:!1});r.on("error",(n=>{r.fd&&$.default.close(r.fd,(()=>{})),r.write=()=>!0,this[sf](n,t),e()}));let o=1;const i=n=>{if(n)return r.fd&&$.default.close(r.fd,(()=>{})),this[sf](n,t),void e();0===--o&&void 0!==r.fd&&$.default.close(r.fd,(n=>{n?this[sf](n,t):this[uf](),e()}))};r.on("finish",(()=>{const e=String(t.absolute),n=r.fd;if("number"==typeof n&&t.mtime&&!this.noMtime){o++;const r=t.atime||new Date,s=t.mtime;$.default.futimes(n,r,s,(t=>t?$.default.utimes(e,r,s,(e=>i(e&&t))):i()))}if("number"==typeof n&&this[pf](t)){o++;const r=this[ff](t),s=this[mf](t);"number"==typeof r&&"number"==typeof s&&$.default.fchown(n,r,s,(t=>t?$.default.chown(e,r,s,(e=>i(e&&t))):i()))}i()}));const s=this.transform&&this.transform(t)||t;s!==t&&(s.on("error",(n=>{this[sf](n,t),e()})),t.pipe(s)),s.pipe(r)}[Xp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode;this[of](String(t.absolute),n,(n=>{if(n)return this[sf](n,t),void e();let r=1;const o=()=>{0===--r&&(e(),this[uf](),t.resume())};t.mtime&&!this.noMtime&&(r++,$.default.utimes(String(t.absolute),t.atime||new Date,t.mtime,o)),this[pf](t)&&(r++,$.default.chown(String(t.absolute),Number(this[ff](t)),Number(this[mf](t)),o)),o()}))}[nf](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[tf](t,e){this[Qp](t,String(t.linkpath),"symlink",e)}[ef](t,e){const n=fl(W.default.resolve(this.cwd,String(t.linkpath)));this[Qp](t,n,"link",e)}[cf](){this[af]++}[uf](){this[af]--,this[lf]()}[hf](t){this[uf](),t.resume()}[Zp](t,e){return"File"===t.type&&!this.unlink&&e.isFile()&&e.nlink<=1&&!bf}[$p](t){this[cf]();const e=[t.path];t.linkpath&&e.push(t.linkpath),this.reservations.reserve(e,(e=>this[Hp](t,e)))}[Vp](t){"SymbolicLink"===t.type?(t=>{for(const e of t.keys())t.delete(e)})(this.dirCache):"Directory"!==t.type&&((t,e)=>{e=yf(e);for(const n of t.keys()){const r=yf(n);r!==e&&0!==r.indexOf(e+"/")||t.delete(n)}})(this.dirCache,String(t.absolute))}[Hp](t,e){this[Vp](t);const n=n=>{this[Vp](t),e(n)},r=()=>{this[of](this.cwd,this.dmode,(e=>{if(e)return this[sf](e,t),void n();this[vf]=!0,o()}))},o=()=>{if(t.absolute!==this.cwd){const e=fl(W.default.dirname(String(t.absolute)));if(e!==this.cwd)return this[of](e,this.dmode,(e=>{if(e)return this[sf](e,t),void n();i()}))}i()},i=()=>{$.default.lstat(String(t.absolute),((e,r)=>{if(r&&(this.keep||this.newer&&r.mtime>(t.mtime??r.mtime)))return this[hf](t),void n();if(e||this[Zp](t,r))return this[Yp](null,t,n);if(r.isDirectory()){if("Directory"===t.type){const e=e=>this[Yp](e??null,t,n);return this.chmod&&t.mode&&(4095&r.mode)!==t.mode?$.default.chmod(String(t.absolute),Number(t.mode),e):e()}if(t.absolute!==this.cwd)return $.default.rmdir(String(t.absolute),(e=>this[Yp](e??null,t,n)))}if(t.absolute===this.cwd)return this[Yp](null,t,n);((t,e)=>{if(!bf)return $.default.unlink(t,e);const n=t+".DELETE."+R.randomBytes(16).toString("hex");$.default.rename(t,n,(t=>{if(t)return e(t);$.default.unlink(n,e)}))})(String(t.absolute),(e=>this[Yp](e??null,t,n)))}))};this[vf]?o():r()}[Yp](t,e,n){if(t)return this[sf](t,e),void n();switch(e.type){case"File":case"OldFile":case"ContiguousFile":return this[Kp](e,n);case"Link":return this[ef](e,n);case"SymbolicLink":return this[tf](e,n);case"Directory":case"GNUDumpDir":return this[Xp](e,n)}}[Qp](t,e,n,r){$.default[n](e,String(t.absolute),(e=>{e?this[sf](e,t):(this[uf](),t.resume()),r()}))}}const Ef=t=>{try{return[null,t()]}catch(t){return[t,null]}};class If extends wf{sync=!0;[Yp](t,e){return super[Yp](t,e,(()=>{}))}[$p](t){if(this[Vp](t),!this[vf]){const e=this[of](this.cwd,this.dmode);if(e)return this[sf](e,t);this[vf]=!0}if(t.absolute!==this.cwd){const e=fl(W.default.dirname(String(t.absolute)));if(e!==this.cwd){const n=this[of](e,this.dmode);if(n)return this[sf](n,t)}}const[e,n]=Ef((()=>$.default.lstatSync(String(t.absolute))));if(n&&(this.keep||this.newer&&n.mtime>(t.mtime??n.mtime)))return this[hf](t);if(e||this[Zp](t,n))return this[Yp](null,t);if(n.isDirectory()){if("Directory"===t.type){const e=this.chmod&&t.mode&&(4095&n.mode)!==t.mode,[r]=e?Ef((()=>{$.default.chmodSync(String(t.absolute),Number(t.mode))})):[];return this[Yp](r,t)}const[e]=Ef((()=>$.default.rmdirSync(String(t.absolute))));this[Yp](e,t)}const[r]=t.absolute===this.cwd?[]:Ef((()=>(t=>{if(!bf)return $.default.unlinkSync(t);const e=t+".DELETE."+R.randomBytes(16).toString("hex");$.default.renameSync(t,e),$.default.unlinkSync(e)})(String(t.absolute))));this[Yp](r,t)}[Kp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=n=>{let r;try{$.default.closeSync(o)}catch(t){r=t}(n||r)&&this[sf](n||r,t),e()};let o;try{o=$.default.openSync(String(t.absolute),dp(t.size),n)}catch(t){return r(t)}const i=this.transform&&this.transform(t)||t;i!==t&&(i.on("error",(e=>this[sf](e,t))),t.pipe(i)),i.on("data",(t=>{try{$.default.writeSync(o,t,0,t.length)}catch(t){r(t)}})),i.on("end",(()=>{let e=null;if(t.mtime&&!this.noMtime){const n=t.atime||new Date,r=t.mtime;try{$.default.futimesSync(o,n,r)}catch(o){try{$.default.utimesSync(String(t.absolute),n,r)}catch(t){e=o}}}if(this[pf](t)){const n=this[ff](t),r=this[mf](t);try{$.default.fchownSync(o,Number(n),Number(r))}catch(o){try{$.default.chownSync(String(t.absolute),Number(n),Number(r))}catch(t){e=e||o}}}r(e)}))}[Xp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode,r=this[of](String(t.absolute),n);if(r)return this[sf](r,t),void e();if(t.mtime&&!this.noMtime)try{$.default.utimesSync(String(t.absolute),t.atime||new Date,t.mtime)}catch(r){}if(this[pf](t))try{$.default.chownSync(String(t.absolute),Number(this[ff](t)),Number(this[mf](t)))}catch(r){}e(),t.resume()}[of](t,e){try{return Bp(fl(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e})}catch(t){return t}}[Qp](t,e,n,r){const o=`${n}Sync`;try{$.default[o](e,String(t.absolute)),r(),t.resume()}catch(e){return this[sf](e,t)}}}const Rf=ku((t=>{const e=new If(t),n=t.file,r=$.default.statSync(n),o=t.maxReadSize||16777216;new _u(n,{readSize:o,size:r.size}).pipe(e)}),((t,e)=>{const n=new wf(t),r=t.maxReadSize||16777216,o=t.file,i=new Promise(((t,e)=>{n.on("error",e),n.on("close",t),$.default.stat(o,((t,i)=>{if(t)e(t);else{const t=new Su(o,{readSize:r,size:i.size});t.on("error",e),t.pipe(n)}}))}));return i}),(t=>new If(t)),(t=>new wf(t)),((t,e)=>{e?.length&&Kl(t,e)})),jf=(t,e,n,r,o)=>{const i=new Au(t.file,{fd:r,start:n});e.pipe(i),Sf(e,o)},Sf=(t,e)=>{e.forEach((e=>{"@"===e.charAt(0)?Xl({file:W.default.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)})),t.end()},_f=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await Xl({file:W.default.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>t.add(e)}):t.add(r)}t.end()},Cf=ku(((t,e)=>{const n=new tp(t);let r,o,i=!0;try{try{r=$.default.openSync(t.file,"r+")}catch(e){if("ENOENT"!==e?.code)throw e;r=$.default.openSync(t.file,"w+")}const s=$.default.fstatSync(r),a=Buffer.alloc(512);t:for(o=0;o<s.size;o+=512){for(let t=0,e=0;t<512;t+=e){if(e=$.default.readSync(r,a,t,a.length-t,o+t),0===o&&31===a[0]&&139===a[1])throw new Error("cannot append to compressed archives");if(!e)break t}const e=new Zd(a);if(!e.cksumValid)break;const n=512*Math.ceil((e.size||0)/512);if(o+n+512>s.size)break;o+=n,t.mtimeCache&&e.mtime&&t.mtimeCache.set(String(e.path),e.mtime)}i=!1,jf(t,n,o,r,e)}finally{if(i)try{$.default.closeSync(r)}catch(t){}}}),((t,e)=>{e=Array.from(e);const n=new Qh(t),r=new Promise(((r,o)=>{n.on("error",o);let i="r+";const s=(a,c)=>a&&"ENOENT"===a.code&&"r+"===i?(i="w+",$.default.open(t.file,i,s)):a||!c?o(a):void $.default.fstat(c,((i,s)=>{if(i)return $.default.close(c,(()=>o(i)));((e,n,r)=>{const o=(t,n)=>{t?$.default.close(e,(e=>r(t))):r(null,n)};let i=0;if(0===n)return o(null,0);let s=0;const a=Buffer.alloc(512),c=(r,u)=>{if(r||void 0===u)return o(r);if(s+=u,s<512&&u)return $.default.read(e,a,s,a.length-s,i+s,c);if(0===i&&31===a[0]&&139===a[1])return o(new Error("cannot append to compressed archives"));if(s<512)return o(null,i);const d=new Zd(a);if(!d.cksumValid)return o(null,i);const l=512*Math.ceil((d.size??0)/512);return i+l+512>n?o(null,i):(i+=l+512,i>=n?o(null,i):(t.mtimeCache&&d.mtime&&t.mtimeCache.set(String(d.path),d.mtime),s=0,void $.default.read(e,a,0,512,i,c)))};$.default.read(e,a,0,512,i,c)})(c,s.size,((i,s)=>{if(i)return o(i);const a=new Cu(t.file,{fd:c,start:s});n.pipe(a),a.on("error",o),a.on("close",r),_f(n,e)}))}));$.default.open(t.file,i,s)}));return r}),(()=>{throw new TypeError("file is required")}),(()=>{throw new TypeError("file is required")}),((t,e)=>{if(!t.file)throw new TypeError("file is required");if(t.gzip||t.brotli||t.file.endsWith(".br")||t.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e?.length)throw new TypeError("no paths specified to add/replace")}));ku(Cf.syncFile,Cf.asyncFile,Cf.syncNoFile,Cf.asyncNoFile,((t,e=[])=>{Cf.validate?.(t,e),Af(t)}));const Af=t=>{const e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(n,r)=>e(n,r)&&!((t.mtimeCache?.get(n)??r.mtime??0)>(r.mtime??0)):(e,n)=>!((t.mtimeCache?.get(e)??n.mtime??0)>(n.mtime??0))};function Uf(t){return Array.isArray(t)?t:[t]}const xf=/^\s+$/,Pf=/(?:[^\\]|^)\\$/,kf=/^\\!/,Of=/^\\#/,Tf=/\r?\n/g,Df=/^\.*\/|^\.+$/;let Lf="node-ignore";"undefined"!=typeof Symbol&&(Lf=Symbol.for("node-ignore"));const Nf=Lf,qf=/([0-z])-([0-z])/g,Bf=()=>!1,Ff=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,n)=>e+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(t,e)=>{const{length:n}=e;return e.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,n)=>e+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(t,e,n)=>e+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,n,r,o)=>"\\"===e?`\\[${n}${(t=>{const{length:e}=t;return t.slice(0,e-e%2)})(r)}${o}`:"]"===o&&r.length%2==0?`[${(t=>t.replace(qf,((t,e,n)=>e.charCodeAt(0)<=n.charCodeAt(0)?t:"")))(n)}${r}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Gf=Object.create(null),Mf=t=>"string"==typeof t;class zf{constructor(t,e,n,r){this.origin=t,this.pattern=e,this.negative=n,this.regex=r}}const Jf=(t,e)=>{const n=t;let r=!1;0===t.indexOf("!")&&(r=!0,t=t.substr(1));const o=((t,e)=>{let n=Gf[t];return n||(n=Ff.reduce(((e,[n,r])=>e.replace(n,r.bind(t))),t),Gf[t]=n),e?new RegExp(n,"i"):new RegExp(n)})(t=t.replace(kf,"!").replace(Of,"#"),e);return new zf(n,t,r,o)},Wf=(t,e)=>{throw new e(t)},$f=(t,e,n)=>{if(!Mf(t))return n(`path must be a string, but got \`${e}\``,TypeError);if(!t)return n("path must not be empty",TypeError);if($f.isNotRelative(t)){return n(`path should be a ${"`path.relative()`d"} string, but got "${e}"`,RangeError)}return!0},Hf=t=>Df.test(t);$f.isNotRelative=Hf,$f.convert=t=>t;class Vf{constructor({ignorecase:t=!0,ignoreCase:e=t,allowRelativePaths:n=!1}={}){var r,o,i;r=this,o=Nf,i=!0,Object.defineProperty(r,o,{value:i}),this._rules=[],this._ignoreCase=e,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[Nf])return this._rules=this._rules.concat(t._rules),void(this._added=!0);if((t=>t&&Mf(t)&&!xf.test(t)&&!Pf.test(t)&&0!==t.indexOf("#"))(t)){const e=Jf(t,this._ignoreCase);this._added=!0,this._rules.push(e)}}add(t){return this._added=!1,Uf(Mf(t)?(t=>t.split(Tf))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,e){let n=!1,r=!1;return this._rules.forEach((o=>{const{negative:i}=o;if(r===i&&n!==r||i&&!n&&!r&&!e)return;o.regex.test(t)&&(n=!i,r=i)})),{ignored:n,unignored:r}}_test(t,e,n,r){const o=t&&$f.convert(t);return $f(o,t,this._allowRelativePaths?Bf:Wf),this._t(o,e,n,r)}_t(t,e,n,r){if(t in e)return e[t];if(r||(r=t.split("/")),r.pop(),!r.length)return e[t]=this._testOne(t,n);const o=this._t(r.join("/")+"/",e,n,r);return e[t]=o.ignored?o:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Uf(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}}const Zf=t=>new Vf(t);Zf.isPathValid=t=>$f(t&&$f.convert(t),t,Bf),Zf.default=Zf;var Yf=Zf;if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const t=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");$f.convert=t;const e=/^[a-z]:\//i;$f.isNotRelative=t=>e.test(t)||Hf(t)}var Kf,Xf=function(){function t(t,e){var n=this;if(this.exec=t,this.parameters=e,this.defaultEncoding="base64",this.getFileIgnoreFilter=function(t){if(void 0!==t){var e=Yf({allowRelativePaths:!0}).add(t);return function(t){return!e.ignores(t)}}},this.getTarTransformFn=function(t,e){return function(n){n.path=n.path.replace(t,e)}},this.ensureDirRemote=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){switch(o.label){case 0:return e=["mkdir","-p",t],[4,this.runCommand(e)];case 1:if(n=o.sent(),"Success"!==(null===(r=null==n?void 0:n.commandResult)||void 0===r?void 0:r.status))throw new Error("Failed creating remote directory.");return[2]}}))}))},this.ensureTarCmd=function(){return X(n,void 0,void 0,(function(){var t,e,n;return Q(this,(function(r){switch(r.label){case 0:return t=["tar","--version"],[4,this.runCommand(t)];case 1:if(e=r.sent(),"Success"!==(null===(n=null==e?void 0:e.commandResult)||void 0===n?void 0:n.status))throw new Error("Tar command not found on remote container. Required for file copy.");return[2]}}))}))},this.pathExistsRemote=function(t){return X(n,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return e=["test","-e",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.checkIsDirRemote=function(t){return X(n,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return e=["test","-d",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.runCommand=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i,s,a,c,u;return Q(this,(function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,o=r.projectId,i=r.resourceId,s=r.resourceType,a=r.containerName,c={command:t,shell:"none",containerName:a},"service"!==s?[3,2]:[4,n.execServiceCommand({projectId:o,serviceId:i},c)];case 1:return u=d.sent(),[3,4];case 2:return[4,n.execJobCommand({projectId:o,jobId:i},c)];case 3:u=d.sent(),d.label=4;case 4:return[2,u]}}))}))},this.runSession=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i,s,a,c,u;return Q(this,(function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,o=r.projectId,i=r.resourceId,s=r.resourceType,a=r.containerName,c={command:t,shell:"none",tty:!1,encoding:this.defaultEncoding,containerName:a},"service"!==s?[3,2]:[4,n.execServiceSession({projectId:o,serviceId:i},c)];case 1:return u=d.sent(),[3,4];case 2:return[4,n.execJobSession({projectId:o,jobId:i},c)];case 3:u=d.sent(),d.label=4;case 4:return[2,u]}}))}))},!["service","job"].includes(e.resourceType))throw new Error("Invalid resource type: ".concat(e.resourceType,", only 'service' and 'job' supported"))}return t.prototype.uploadFiles=function(t,e,n){return X(this,void 0,void 0,(function(){var r,o,i,s,a,c,u,d,l,h,p,f;return Q(this,(function(m){switch(m.label){case 0:if(void 0===t||!q.default.existsSync(t))throw new Error("Local path '".concat(t,"' does not exists but is required for uploads."));return r=q.default.lstatSync(t).isFile(),o=r?B.default.dirname(t):t,i=r?B.default.basename(t):".",s=r&&void 0!==e&&""!==B.default.extname(e),a=s?B.default.dirname(e):null!=e?e:o,c=void 0!==e?B.default.basename(e):i,u=rp({gzip:{encoding:this.defaultEncoding},cwd:o,filter:this.getFileIgnoreFilter(n),preservePaths:!0,onWriteEntry:s?this.getTarTransformFn(i,c):void 0},Do(i)),[4,this.ensureTarCmd()];case 1:return m.sent(),[4,this.ensureDirRemote(a)];case 2:return m.sent(),d=tt(tt(["tar","-xzvf","-"],["--no-same-owner"],!0),["-C",a],!1),[4,this.runSession(d)];case 3:return l=m.sent(),h=new No,p=new No,l.stdErr.pipe(h),l.stdOut.pipe(p),u.pipe(l.stdIn),[4,l.waitForCommandResult()];case 4:if("Success"!==(null==(f=m.sent())?void 0:f.status))throw new Error("Failed to upload file to container: ".concat(null==f?void 0:f.message,", error details: ").concat(h.getContentsAsString(),"; ").concat(p.getContentsAsString()));return r?[2,{type:exports.CopyType.FILE_UPLOAD,sourceDirectory:o,sourceFile:i,targetDirectory:a,targetFile:c}]:[2,{type:exports.CopyType.DIRECTORY_UPLOAD,sourceDirectory:o,targetDirectory:a}]}}))}))},t.prototype.downloadFiles=function(t,e,n){return X(this,void 0,void 0,(function(){var r,o,i,s,a,c,u,d,l,h,p,f,m,v;return Q(this,(function(b){switch(b.label){case 0:return(r=void 0===t)?[3,2]:[4,this.pathExistsRemote(t)];case 1:r=!b.sent(),b.label=2;case 2:if(r)throw new Error("Remote path '".concat(t,"' does not exists but is required for downloads."));return[4,this.checkIsDirRemote(t)];case 3:return o=b.sent(),i=o?t:B.default.dirname(t),s=o?".":B.default.basename(t),a=void 0!==e&&""!==B.default.extname(e),c=!o&&a?B.default.basename(e):s,(u=void 0!==e?a?B.default.dirname(e):e:".")&&q.default.mkdirSync(u,{recursive:!0}),d=Do(null!=n?n:[]).map((function(t){return"--exclude=".concat(t)})),l=tt(tt(["tar","-zcf","-"],["--no-same-owner"],!0),d,!0),h=tt(tt([],l,!0),["-C",i,s],!1),[4,this.runSession(h)];case 4:return p=b.sent(),f=Rf({cwd:u,gzip:{encoding:this.defaultEncoding},onReadEntry:c?this.getTarTransformFn(s,c):void 0}),m=new No,p.stdErr.pipe(m),p.stdOut.pipe(f),[4,p.waitForCommandResult()];case 5:if("Success"!==(null==(v=b.sent())?void 0:v.status))throw new Error("Failed to download file from container: ".concat(null==v?void 0:v.message,", error details: ").concat(m.getContentsAsString()));return o?[2,{type:exports.CopyType.DIRECTORY_DOWNLOAD,sourceDirectory:i,targetDirectory:u}]:[2,{type:exports.CopyType.FILE_DOWNLOAD,sourceDirectory:i,sourceFile:s,targetDirectory:u,targetFile:c}]}}))}))},t}();exports.CopyType=void 0,(Kf=exports.CopyType||(exports.CopyType={})).DIRECTORY_UPLOAD="directory-upload",Kf.FILE_UPLOAD="file-upload",Kf.DIRECTORY_DOWNLOAD="directory-download",Kf.FILE_DOWNLOAD="file-download";var Qf,tm=function(){function t(t,e){this.exec=t,this.stdIgnoreList=["*.*~"],e&&(this.stdIgnoreList=e)}return t.prototype.downloadServiceFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.serviceId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(o,e,"download")];case 1:return[2,i.sent()]}}))}))},t.prototype.uploadServiceFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.serviceId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(o,e,"upload")];case 1:return[2,i.sent()]}}))}))},t.prototype.downloadJobFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.jobId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(o,e,"download")];case 1:return[2,i.sent()]}}))}))},t.prototype.uploadJobFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.jobId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(o,e,"upload")];case 1:return[2,i.sent()]}}))}))},t.prototype.copy=function(t,e,n){var r;return X(this,void 0,void 0,(function(){var o,i;return Q(this,(function(s){switch(s.label){case 0:switch(o=new Xf(this.exec,K(K({},t),{containerName:e.containerName})),i=tt(tt([],null!==(r=e.ignoreList)&&void 0!==r?r:[],!0),this.stdIgnoreList,!0),n){case"download":return[3,1];case"upload":return[3,3]}return[3,5];case 1:return[4,o.downloadFiles(e.remotePath,e.localPath,i)];case 2:case 4:return[2,s.sent()];case 3:return[4,o.uploadFiles(e.localPath,e.remotePath,i)];case 5:return[2]}}))}))},t}(),em=function(t){function e(e){var n=this.constructor,r=t.call(this,e.message)||this;r.name="NorthflankApiCallError",r.message=e.message,r.status=e.status,r.id=e.id,r.details=e.details;var o=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,o):r.__proto__=o,r}return Y(e,t),e}(Error),nm=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i.baseUrl=e,i.logsConfig=n,i.token=r,i.agent=o,i.stop=function(){return X(i,void 0,void 0,(function(){var t;return Q(this,(function(e){if(void 0===this.logSession)throw new Error("No command is running");return null===(t=this.remote)||void 0===t||t.close(),[2]}))}))},i}return Y(e,t),e.getLogsEndpoint=function(t){var e=t.containerName,n=t.types,r=t.entityId,o=t.entityType,i=t.buildId,s=t.runId,a=t.backupId,c=t.restoreId,u=t.deploymentId,d=t.isBuild,l=t.lineLimit,h=t.projectId,p=t.queryType,f=t.startTime,m=t.endTime,v=t.duration,b=t.direction,g=t.textIncludes,y=t.textNotIncludes,w=t.regexIncludes,E=t.regexNotIncludes,I="/v1/projects/".concat(h,"/"),R=new URLSearchParams;return R.append("queryType",p),void 0!==f&&R.append("startTime",f.toISOString()),void 0!==m&&R.append("endTime",m.toISOString()),void 0!==l&&R.append("lineLimit",l.toString()),void 0!==e&&R.append("containerName",e),void 0!==u&&R.append("deploymentId",u),void 0!==s&&R.append("runId",s),void 0!==i&&R.append("buildId",i),void 0!==g&&R.append("textIncludes",g),void 0!==y&&R.append("textNotIncludes",y),void 0!==w&&R.append("regexIncludes",w),void 0!==E&&R.append("regexNotIncludes",E),void 0!==b&&R.append("direction",b),void 0!==v&&R.append("duration",v.toString()),void 0!==n&&n.forEach((function(t){return R.append("type",t)})),"".concat(I).concat(function(){var t=d?"/build-logs":"/logs";switch(o){case"service":return"services/".concat(r).concat(t);case"job":return"jobs/".concat(r).concat(t);case"addon":return"addons/".concat(r).concat(t);case"addonBackup":return"addons/".concat(r,"/backups/").concat(a).concat(t);case"addonRestore":return"addons/".concat(r,"/backups/").concat(a,"/restores/").concat(c).concat(t);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(R.toString())},Object.defineProperty(e.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(e.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),e.prototype.start=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){switch(e.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(e,n){var r,o,i,s;void 0!==t.remote&&n(Error("Command is already running"));var a=t.logsEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new ka(a,{agent:t.agent}),null===(r=t.remote)||void 0===r||r.on("message",(function(e){var n,r,o=JSON.parse(e.toString());switch(null==o?void 0:o.type){case"init":var i=o.data;"successful"!==i.auth&&c("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;t.emit("logs-received",s.map(mm));break;case"error":c(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));c(a)}})),null===(o=t.remote)||void 0===o||o.on("close",(function(){t.emit("close"),t.reset(),e()})),null===(i=t.remote)||void 0===i||i.on("open",(function(){t.emit("open")})),null===(s=t.remote)||void 0===s||s.on("error",(function(n){t.emit("error",n),t.reset(),e()}));var c=function(e){t.emit("error",{message:e}),t.reset(),n(new Error(e))}})),[4,new Promise((function(e){var n;t.remote.on("open",(function(){return e()})),null===(n=t.remote)||void 0===n||n.on("error",(function(){e()}))}))];case 1:return e.sent(),this.initialAuth(),[2,this.logSession]}}))}))},e.prototype.initialAuth=function(){var t,e={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(t=this.remote)||void 0===t||t.send(JSON.stringify(e))},e.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},e}(t.EventEmitter),rm=function(){if(Oo)try{return JSON.parse(q.default.readFileSync(B.default.join(B.default.dirname(o.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(t){return{}}return{}},om=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return X(n,void 0,void 0,(function(){return Q(this,(function(e){return[2,this.executeCall(t)]}))}))},this.contextProvider=t}return t.prototype.getDefaultHeaders=function(){var t,e,n=this.contextProvider.getCurrentToken(),r=(null===(t=this.opts)||void 0===t?void 0:t.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===(e=rm())||void 0===e?void 0:e.version).concat(r)}},t.prototype.executeCall=function(t){var e;return X(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u,d,l,h,p,f=this;return Q(this,(function(m){switch(m.label){case 0:if(n=this.method,r=this.opts.agent,o={method:n,headers:this.getDefaultHeaders(),agent:r},!(i=null===(e=this.contextProvider)||void 0===e?void 0:e.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return s="".concat(i).concat(this.endpointUrl(t)),a=this.body(t),c=K(K({url:s},o),{body:a}),[4,hm(s,K(K({},o),{body:a}))];case 1:return[4,(u=m.sent()).text()];case 2:return d=m.sent(),l=function(){if(200!==u.status){var t=null==h?void 0:h.error,e=(null==t?void 0:t.message)||"",n={status:u.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(f.opts.throwErrorOnHttpErrorCode)throw new em(n);return n}},h=function(){try{return JSON.parse(d)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(u.statusText," (").concat(u.status,")\n\tMessage: ").concat(d))}}(),p=l(),[2,{data:null==h?void 0:h.data,rawResponse:u,request:c,error:p,pagination:null==h?void 0:h.pagination}]}}))}))},t}(),im=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return Y(e,t),e}(om),sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.all=function(t){return X(e,void 0,void 0,(function(){return Q(this,(function(e){return[2,new lm(this,t).getAll()]}))}))},e.call=function(n){return X(e,void 0,void 0,(function(){var e,r=this;return Q(this,(function(o){switch(o.label){case 0:return[4,t.prototype.executeCall.call(this,n)];case 1:return e=o.sent(),[2,K(K({},e),{pagination:K(K({},e.pagination),{getNextPage:function(){return X(r,void 0,void 0,(function(){var t,r,o,i,s,a,c,u=this;return Q(this,(function(d){return void 0===(null===(a=e.pagination)||void 0===a?void 0:a.cursor)?(t=Object.keys(e.data),r=1===t.length?((s={})[t[0]]=[],s):{},o=K(K({},e),{pagination:K(K({},e.pagination),{count:0}),data:r}),[2,(i=function(t){return K(K({},t),{pagination:K(K({},t.pagination),{getNextPage:function(){return X(u,void 0,void 0,(function(){return Q(this,(function(e){return[2,i(t)]}))}))}})})})(o)]):[2,new lm(this,n,null===(c=e.pagination)||void 0===c?void 0:c.cursor).getNext()]}))}))}})})]}}))}))},e}return Y(e,t),e}(im),am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return Y(e,t),e}(om),cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return Y(e,t),e}(om),um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="put",e}return Y(e,t),e}(om),dm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="patch",e}return Y(e,t),e}(om),lm=function(){function t(t,e,n){void 0===n&&(n=null);var r=this;this.endpoint=t,this.opts=e,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(t.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),t.prototype.getNext=function(){var t,e,n;return X(this,void 0,void 0,(function(){var r,o,i,s,a,c;return Q(this,(function(u){switch(u.label){case 0:return[4,this.endpoint.call(K(K({},this.opts),{options:K(K({},null===(t=this.opts)||void 0===t?void 0:t.options),{cursor:null!==(e=this.cursor)&&void 0!==e?e:void 0})}))];case 1:return r=u.sent(),o=r.data,i=r.request,s=r.error,a=r.pagination,c=r.rawResponse,this.cursor=null==a?void 0:a.cursor,this._currentOffset+=null!==(n=null==a?void 0:a.count)&&void 0!==n?n:0,[2,{data:o,request:i,error:s,pagination:a,rawResponse:c}]}}))}))},t.prototype.getAll=function(){var t,e;return X(this,void 0,void 0,(function(){var n,r,o,i,s;return Q(this,(function(a){switch(a.label){case 0:n=[],a.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=a.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return i=n.flatMap((function(t){var e=Object.keys(t.data);return 1===e.length?(o=e[0],t.data[e[0]]):t.data})),[2,{data:void 0===o?i:(s={},s[o]=i,s),request:null===(t=n[0])||void 0===t?void 0:t.request,rawResponse:null===(e=n[0])||void 0===e?void 0:e.rawResponse}]}}))}))},t}(),hm=function(t,e,n,r){return void 0===e&&(e={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(o,i){var s=function(n){return To(t,e).then((function(t){o(t)})).catch((function(t){return X(void 0,void 0,void 0,(function(){return Q(this,(function(e){switch(e.label){case 0:return n>0?[4,(o=r,new Promise((function(t){setTimeout((function(){t()}),o)})))]:[3,2];case 1:return e.sent(),[2,s(n-1)];case 2:return[2,i(t)]}var o}))}))}))};return s(n)}))},pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch log lines over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){return nm.getLogsEndpoint(t)},e.body=function(){},e}return Y(e,t),e}(im);exports.LogType=void 0,(Qf=exports.LogType||(exports.LogType={})).CDN="cdn",Qf.Mesh="mesh",Qf.Ingress="ingress",Qf.Runtime="runtime";var fm,mm=function(t){return{containerId:t.containerId,log:t.log,ts:new Date(t.ts)}},vm=function(t,e){void 0===e&&(e={});var n=this;this.contextProvider=t,this.clientOpts=e,this.getServiceLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.serviceId,i={entityId:o,projectId:r},[2,this.logRange(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.logRange(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,K(K({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},o={backupId:e.backupId,restoreId:e.restoreId},[2,this.logRange(r,K(K({},n),o),"addonRestore")]}))}))},this.logRange=function(t,e,r){return X(n,void 0,void 0,(function(){var n,o,i,s,a;return Q(this,(function(c){switch(c.label){case 0:return n=t.entityId,o=t.projectId,i=K(K({projectId:o,entityId:n,entityType:r},e),{queryType:"range"}),[4,new pm(this.contextProvider,this.clientOpts).call(i)];case 1:return(s=c.sent()).error?[2,s]:[2,K(K({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(mm)})]}}))}))},this.tailServiceLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,o=e.projectId,i={entityId:r,projectId:o},[2,this.logTail(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.logTail(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,K(K({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},o={backupId:e.backupId,restoreId:e.restoreId},[2,this.logTail(r,K(K({},n),o),"addonRestore")]}))}))},this.logTail=function(t,e,r){return X(n,void 0,void 0,(function(){var n,o,i,s,a;return Q(this,(function(c){if(n=t.entityId,o=t.projectId,i=K({queryType:"tail",projectId:o,entityId:n,entityType:r},e),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new nm(s,i,a,this.clientOpts.agent)]}))}))},this.assertStartedWithNodejs=function(){if(!Oo)throw new Error("Command exec only possible when started with nodejs")}},bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch metrics entries over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){var e=t.projectId,n=t.entityId,r=t.entityType,o=t.deploymentId,i=t.runId,s=t.buildId,a=t.isBuild,c=t.queryType,u=t.metricTypes,d=t.startTime,l=t.endTime,h=t.duration,p=t.containerName,f=t.timestamp,m="/v1/projects/".concat(e,"/");var v=new URLSearchParams;return v.append("queryType",c),void 0!==d&&v.append("startTime",d.toISOString()),void 0!==l&&v.append("endTime",l.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==o&&v.append("deploymentId",o),void 0!==i&&v.append("runId",i),void 0!==s&&v.append("buildId",s),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==h&&v.append("duration",h.toString()),void 0!==u&&u.forEach((function(t){return v.append("metricTypes",t)})),"".concat(m).concat(function(){var t=a?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(t);case"job":return"jobs/".concat(n).concat(t);case"addon":return"addons/".concat(n).concat(t);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},e.body=function(){},e}return Y(e,t),e}(im),gm=function(t){return{metadata:t.metadata,data:t.data.map((function(t){return{value:t.value,ts:new Date(t.ts)}}))}};exports.MetricType=void 0,(fm=exports.MetricType||(exports.MetricType={})).Cpu="cpu",fm.Memory="memory",fm.NetworkIngress="networkIngress",fm.NetworkEgress="networkEgress",fm.TcpConnectionOpen="tcpConnectionsOpen",fm.PvcUsage="diskUsage",fm.Requests="requests",fm.Http4xxResponses="http4xxResponses",fm.Http5xxResponses="http5xxResponses",fm.Bandwidth="bandwidth",fm.BandwidthVolume="bandwidthVolume";var ym=function(t){var e=this;this.contextProvider=t,this.getServiceMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,o=e.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.jobId,o=e.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(t,n,r){return X(e,void 0,void 0,(function(){var e,o,i;return Q(this,(function(s){return e=t.entityId,o=t.projectId,i=K(K({projectId:o,entityId:e,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.serviceId,i={entityId:o,projectId:r},[2,this.metricsRange(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.metricsRange(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(t,n,r){return X(e,void 0,void 0,(function(){var e,o,i;return Q(this,(function(s){return e=t.entityId,o=t.projectId,i=K(K({projectId:o,entityId:e,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(t){return X(e,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return[4,new bm(this.contextProvider,{}).call(t)];case 1:return(e=n.sent()).error?[2,e]:[2,K(K({},e),{data:Object.fromEntries(Object.entries(e.data).map((function(t){var e=t[0],n=t[1];return[e,K(K({},n),{values:n.values.map(gm)})]})))})]}}))}))}},wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the available addon types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/addon-types"},e.body=function(){},e}return Y(e,t),e}(im),Em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backup destinations saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/backup-destinations".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Im=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new backup destination to this account.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Create",e.endpointUrl=function(t){return"/v1/backup-destinations"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a backup destination, including secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return Y(e,t),e}(im),jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Update",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Delete",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return Y(e,t),e}(cm),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backups associated with a backup destinations.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e;["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId),"/backups").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of past invoices",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.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.",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud providers",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/cloud-providers"},e.body=function(){},e}return Y(e,t),e}(im),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists clusters for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or update a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return Y(e,t),e}(im),Tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Dm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given cluster. Fails if the cluster has associated projects.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Delete",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return Y(e,t),e}(cm),Lm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of nodes for the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e;["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Nm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/cordon")},e.body=function(){},e}return Y(e,t),e}(am),qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Drain a node by evicting all running pods.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/drain")},e.body=function(){},e}return Y(e,t),e}(am),Bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Uncordon a node on the cluster if it was previously cordoned.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/uncordon")},e.body=function(){},e}return Y(e,t),e}(am),Fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists docker registries for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/docker-registries"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Create",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given docker registry",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(){},e}return Y(e,t),e}(im),Jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Update",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Delete",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(){},e}return Y(e,t),e}(cm),$m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Hm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return Y(e,t),e}(im),Ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given integration. Fails if the integration is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Delete",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return Y(e,t),e}(cm),Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider node types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the partially random string used when generating host names for the authenticated account.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/dns-id"},e.body=function(){},e}return Y(e,t),e}(im),ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available domains",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Registers a new domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return Y(e,t),e}(im),ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a domain and each of its registered subdomains.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Delete",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return Y(e,t),e}(cm),iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve certificate data for a domain to verify its contents.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/certificate")},e.body=function(){},e}return Y(e,t),e}(im),sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Import a certificate for the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new subdomain to the domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return Y(e,t),e}(im),uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from a domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return Y(e,t),e}(cm),dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assigns a service port to the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from its assigned service",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){var e;["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign").concat(r)},e.body=function(){},e}return Y(e,t),e}(cm),hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes the CDN integration from the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/disable")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Enables a CDN integration on the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/enable")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new path to the subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Create",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List paths for a given subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(){},e}return Y(e,t),e}(im),vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get subdomain path details.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return Y(e,t),e}(im),bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return Y(e,t),e}(cm),gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a subdomain path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unassign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(){},e}return Y(e,t),e}(cm),Ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/verify")},e.body=function(){},e}return Y(e,t),e}(am),Iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attempts to verify the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/verify")},e.body=function(){},e}return Y(e,t),e}(am),Rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of log sinks added to this account.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Create",e.endpointUrl=function(t){return"/v1/integrations/log-sinks"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return Y(e,t),e}(im),_v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Delete",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return Y(e,t),e}(cm),Cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pauses a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),Av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes a paused log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/resume")},e.body=function(){},e}return Y(e,t),e}(am),Uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the settings for a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists notification integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return Y(e,t),e}(im),Ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return Y(e,t),e}(cm),Dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the container registry credentials saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new set of container registry credentials to this account.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Create",e.endpointUrl=function(t){return"/v1/integrations/registries"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Views a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read Encrypted",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return Y(e,t),e}(im),qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Delete",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return Y(e,t),e}(cm),Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Update",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId),"/modify")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists linked version control providers",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){return"/v1/integrations/vcs"},e.body=function(){},e}return Y(e,t),e}(im),Gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generate a token for a specific VCS link.",e.withAuth=!0,e.requiredPermissions="Account > Git > Tokens > Read",e.endpointUrl=function(t){var e;["customVCSId","vcsLinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(encodeURIComponent(t.parameters.customVCSId),"/token/").concat(encodeURIComponent(t.parameters.vcsLinkId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(am),Mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of repositories accessible to this account",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of branches for the repo",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e;["vcsService","repositoryOwner","repositoryName"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(encodeURIComponent(t.parameters.vcsService),"/").concat(encodeURIComponent(t.parameters.repositoryOwner),"/").concat(encodeURIComponent(t.parameters.repositoryName),"/branches").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available billing plans",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/plans"},e.body=function(){},e}return Y(e,t),e}(im),Wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists projects for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),$v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Update",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given project",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(){},e}return Y(e,t),e}(im),Yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given project. Fails if the project isn't empty.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Delete",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(cm),Kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of addons belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(im),eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(cm),rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about an addon's backup schedules",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","scheduleId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(t.parameters.scheduleId))},e.body=function(){},e}return Y(e,t),e}(cm),sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of backups for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Initiates a backup for the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return Y(e,t),e}(im),ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a given backup",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return Y(e,t),e}(cm),db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the in progress backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort")},e.body=function(){},e}return Y(e,t),e}(am),lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts an in-progress backup restore.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort-restore").concat(r)},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generates a temporary download link for downloading the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/download-link")},e.body=function(){},e}return Y(e,t),e}(im),pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores the given addon to the given backup state.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restore").concat(r)},e.body=function(){},e}return Y(e,t),e}(am),fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of restores for the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restores").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/retain")},e.body=function(){},e}return Y(e,t),e}(am),vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/containers").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the credentials for connecting to the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/credentials")},e.body=function(){},e}return Y(e,t),e}(im),gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Imports a database from an external archive or existing live database.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the network settings for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),Eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Reset the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/reset")},e.body=function(){},e}return Y(e,t),e}(am),Ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restart the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restart")},e.body=function(){},e}return Y(e,t),e}(am),Rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of restores for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restores").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resume the given addon if it is paused.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/resume")},e.body=function(){},e}return Y(e,t),e}(am),Sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the allocated resources for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),_b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the security rules for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the current addon version including available upgrades and upgrade history.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(){},e}return Y(e,t),e}(im),Ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Upgrades the addon to a new version.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of jobs belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return Y(e,t),e}(im),Nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Delete",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return Y(e,t),e}(cm),qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/branches").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists builds for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given job. Given a commit sha, it will build that commit.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.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.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets build arguments for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments/details")},e.body=function(){},e}return Y(e,t),e}(im),Jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),$b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(im),Hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job build",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(cm),Vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/containers").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(){},e}return Y(e,t),e}(im),Yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(){},e}return Y(e,t),e}(im),Xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pull-requests").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetches run history for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Starts a new job run for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns data about the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return Y(e,t),e}(im),ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return Y(e,t),e}(cm),sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.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.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment/details")},e.body=function(){},e}return Y(e,t),e}(im),ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Scale Job",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates settings for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modify cron job to toggle suspending of its schedule.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists all pipelines for a project",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a pipeline",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId))},e.body=function(){},e}return Y(e,t),e}(im),fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of active preview environments for a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a preview environment generated by a preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["projectId","pipelineId","previewId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(t.parameters.previewId))},e.body=function(){},e}return Y(e,t),e}(cm),gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of preview template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return Y(e,t),e}(im),wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(){},e}return Y(e,t),e}(im),Eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.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.",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists runs of a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return Y(e,t),e}(im),Sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId),"/abort")},e.body=function(){},e}return Y(e,t),e}(am),_g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of secrets belonging to the project",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret including its contents",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(){},e}return Y(e,t),e}(cm),kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Link an addon to the secret group or edit the settings of the linked addon.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a given addon link.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(im),Dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unlinks an addon from the secret group.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(cm),Lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret with details about its linked addons",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/details")},e.body=function(){},e}return Y(e,t),e}(im),Ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of services belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),$g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(){},e}return Y(e,t),e}(im),Vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Delete",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(cm),Zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/branches").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the builds for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.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.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.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.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the build arguments for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments/details")},e.body=function(){},e}return Y(e,t),e}(im),ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given build or combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(im),oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given service build",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(cm),iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/containers").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(){},e}return Y(e,t),e}(im),ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(){},e}return Y(e,t),e}(im),uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(){},e}return Y(e,t),e}(im),hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the list of ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pull-requests").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restarts the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/restart")},e.body=function(){},e}return Y(e,t),e}(am),my=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.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.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),by=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment/details")},e.body=function(){},e}return Y(e,t),e}(im),yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Scale Service",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of volumes belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(){},e}return Y(e,t),e}(im),Ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a volume with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return Y(e,t),e}(im),Ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update volume mounts and storage size",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),jy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes this volume and its associated data.",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Delete",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return Y(e,t),e}(cm),Sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),_y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Detach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available project regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/regions"},e.body=function(){},e}return Y(e,t),e}(im),Ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List the resource tags for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/tags".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Add a new resource tag for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Create",e.endpointUrl=function(t){return"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),xy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update or create a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View details for a given resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return Y(e,t),e}(im),ky=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Patch a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Delete",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return Y(e,t),e}(cm),Ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of templates",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return"/v1/templates"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Update",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),qy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(){},e}return Y(e,t),e}(cm),By=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Run a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Run",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return Y(e,t),e}(im),My=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > Runs > Abort",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId),"/abort")},e.body=function(){},e}return Y(e,t),e}(am),zy=function(){function t(){this.loadContext()}return t.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},t.prototype.getInfo=function(){return""},t.prototype.storeContext=function(t){return X(this,void 0,void 0,(function(){return Q(this,(function(e){switch(e.label){case 0:return[4,this.writeContext(t)];case 1:return e.sent(),this.contextWrapper=t,[2]}}))}))},t.prototype.addContext=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:if(e||void 0===this.findContext(t.name))return[3,1];throw new Error("Context with name ".concat(t.name," already exists"));case 1:return[4,this.removeContext(t.name)];case 2:i.sent(),i.label=3;case 3:return n=K({host:"https://api.northflank.com"},t),r=this.contextWrapper,o={current:n.name,contexts:tt(tt([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},t.prototype.removeContext=function(t){return X(this,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){switch(i.label){case 0:return e=this.contextWrapper,n=e.contexts.filter((function(e){return e.name!==t})),r=e.current===t?void 0:e.current,o={current:r,contexts:tt([],n,!0),lastUpdateCheck:e.lastUpdateCheck},[4,this.storeContext(o)];case 1:return i.sent(),[2]}}))}))},t.prototype.getCurrentContext=function(){var t=this.contextWrapper.current;return void 0===t?t:this.findContext(t)},t.prototype.findContext=function(t){return this.contextWrapper.contexts.find((function(e){return e.name===t}))},t.prototype.getCurrentBaseUrl=function(t){var e=this.getCurrentContext();if(!0===t&&!(null==e?void 0:e.host))throw new Error("Context (".concat(null==e?void 0:e.name,") doesn't have a target API host. Please login again."));return null==e?void 0:e.host},t.prototype.getCurrentProjectName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.project},t.prototype.getCurrentName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.name},t.prototype.getCurrentToken=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.token},t.prototype.getCurrentServiceName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.service},t.prototype.getCurrentJobName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.job},t.prototype.getCurrentPlanId=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.plan},t.prototype.getCurrentRegion=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.region},t.prototype.useContext=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(!this.findContext(t))throw new Error("Context with name ".concat(t," doesn't exist"));return e=this.contextWrapper,n=K(K({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.updateToken=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o,i,s;return Q(this,(function(a){switch(a.label){case 0:if(n=null!=e?e:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(e," doesn't exist"));return o=this.contextWrapper,i=o.contexts.map((function(e){return e.name===n?K(K({},r),{token:t}):e})),s=K(K({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},t.prototype.useProjectId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=K(K({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useServiceId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=K(K({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useJobId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=K(K({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.usePlanId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=K(K({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useRegion=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=K(K({},e),{region:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},t.prototype.setLastUpdateCheck=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:return e=this.contextWrapper,n=K(K({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t}(),Jy=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return X(n,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),q.default.existsSync(t)?[3,2]:[4,q.default.promises.mkdir(t,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 4:return[2]}}))}))},n.configPath=e||"".concat(D.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return Y(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(q.default.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return X(this,void 0,void 0,(function(){var e;return Q(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,q.default.promises.writeFile(this.configFile,JSON.stringify(t,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw e=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(e.message)),e;case 5:return[2]}}))}))},e.prototype.assertConfigDir=function(){return X(this,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return t.sent(),[2]}}))}))},e.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},e}(zy),Wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return Y(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return X(this,void 0,void 0,(function(){return Q(this,(function(e){return this.inMemoryContextWrapper=t,[2]}))}))},e}(zy),$y=function(t,e){void 0===e&&(e={});var n,r,o,i=this;this.baseUrl=function(){return i.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new sc(t,new Ng(t,e),new Kv(t,e),e.agent),this.exec=new uc(t,e.agent),this.logs=new vm(t,e),this.metrics=new ym(t),this.fileCopy=new tm(this.exec),this.endpoints={get:(o={},o.addon=((r=new tb(t,e)).types=new wm(t,e),r.backupSchedules=new rb(t,e),r.backups=new sb(t,e),r.backup=((n=new cb(t,e)).download=new hb(t,e),n.restores=new fb(t,e),n),r.containers=new vb(t,e),r.credentials=new bb(t,e),r.restores=new Rb(t,e),r.version=new Cb(t,e),r),o.backupDestination=new Rm(t,e),o.invoice=function(){var n={};return n.details=new Am(t,e),n}(),o.cloud=function(){var n={};return n.cluster=new Om(t,e),n.dockerRegistry=new zm(t,e),n.integration=new Zm(t,e),n}(),o.dnsId=new tv(t,e),o.domain=new rv(t,e),o.domainCertificate=new iv(t,e),o.subdomain=function(){var n=new cv(t,e);return n.path=new vv(t,e),n}(),o.logSink=new Sv(t,e),o.notification=new kv(t,e),o.registryCredentials=new Nv(t,e),o.project=new Zv(t,e),o.job=function(){var n=new Lb(t,e);return n.branches=new qb(t,e),n.builds=new Bb(t,e),n.buildArguments=new Gb(t,e),n.buildArgumentDetails=new zb(t,e),n.build=new $b(t,e),n.containers=new Vb(t,e),n.deployment=new Zb(t,e),n.healthChecks=new Kb(t,e),n.pullRequests=new tg(t,e),n.runs=new ng(t,e),n.run=new og(t,e),n.runtimeEnvironment=new sg(t,e),n.runtimeEnvironmentDetails=new cg(t,e),n}(),o.pipeline=new pg(t,e),o.previewTemplate=new fg(t,e),o.previewTemplateRun=new yg(t,e),o.releaseFlow=new wg(t,e),o.releaseFlowRun=new jg(t,e),o.secret=new xg(t,e),o.secretLink=new Tg(t,e),o.secretDetails=new Lg(t,e),o.service=function(){var n=new Hg(t,e);return n.branches=new Zg(t,e),n.builds=new Yg(t,e),n.buildArguments=new Xg(t,e),n.buildArgumentDetails=new ty(t,e),n.build=new ry(t,e),n.containers=new iy(t,e),n.deployment=new sy(t,e),n.healthChecks=new cy(t,e),n.ports=new ly(t,e),n.pullRequests=new py(t,e),n.runtimeEnvironment=new vy(t,e),n.runtimeEnvironmentDetails=new gy(t,e),n}(),o.volume=new Iy(t,e),o.tag=new Py(t,e),o.template=new Ly(t,e),o.templateRun=new Gy(t,e),o),list:function(){var n={};return n.backupDestinations=new Em(t,e),n.backupDestinationsBackups=new _m(t,e),n.invoices=new Cm(t,e),n.cloud=function(){var n={};return n.providers=new Um(t,e),n.clusters=new xm(t,e),n.cluster=function(){var n={};return n.nodes=new Lm(t,e),n}(),n.dockerRegistry=new Fm(t,e),n.integrations=new $m(t,e),n.nodeTypes=new Xm(t,e),n.regions=new Qm(t,e),n}(),n.domains=new ev(t,e),n.subdomain=function(){var n={};return n.path=new mv(t,e),n}(),n.logSinks=new Rv(t,e),n.notifications=new xv(t,e),n.registryCredentials=new Dv(t,e),n.vcs=new Fv(t,e),n.repos=new Mv(t,e),n.branches=new zv(t,e),n.plans=new Jv(t,e),n.projects=new Wv(t,e),n.addons=new Kv(t,e),n.jobs=new Ub(t,e),n.pipelines=new hg(t,e),n.previewTemplatePreviews=new vg(t,e),n.previewTemplateRuns=new gg(t,e),n.releaseFlowRuns=new Rg(t,e),n.secrets=new _g(t,e),n.services=new Ng(t,e),n.volumes=new wy(t,e),n.regions=new Cy(t,e),n.tags=new Ay(t,e),n.templates=new Ty(t,e),n.templateRuns=new Fy(t,e),n}(),add:function(){var n={};return n.backupDestination=new Im(t,e),n.domain=function(){var n={};return n.subdomain=new av(t,e),n}(),n.subdomain=function(){var n={};return n.path=new fv(t,e),n}(),n.registryCredentials=new Lv(t,e),n.tag=new Uy(t,e),n}(),patch:function(){var n={};return n.backupDestination=new jm(t,e),n.cloud=function(){var n={};return n.cluster=new Tm(t,e),n.dockerRegistry=new Jm(t,e),n.integration=new Ym(t,e),n}(),n.project=new Vv(t,e),n.addon=new eb(t,e),n.job=function(){var n={};return n.cron=new kb(t,e),n.manual=new Db(t,e),n}(),n.secret=new Ug(t,e),n.service=function(){var n={};return n.build=new Fg(t,e),n.combined=new zg(t,e),n.deployment=new $g(t,e),n}(),n.tag=new ky(t,e),n}(),delete:function(){var n={};return n.backupDestination=new Sm(t,e),n.cloud=function(){var n={};return n.cluster=new Dm(t,e),n.dockerRegistry=new Wm(t,e),n.integration=new Km(t,e),n}(),n.domain=new ov(t,e),n.subdomain=function(){var n=new uv(t,e);return n.path=new bv(t,e),n}(),n.logSink=new _v(t,e),n.notification=new Tv(t,e),n.registryCredentials=new qv(t,e),n.project=new Yv(t,e),n.addon=function(){var n=new nb(t,e);return n.backupSchedule=new ib(t,e),n}(),n.backup=new ub(t,e),n.job=new Nb(t,e),n.previewTemplatePreview=new bg(t,e),n.secret=new Pg(t,e),n.secretLink=new Dg(t,e),n.service=new Vg(t,e),n.volume=new jy(t,e),n.tag=new Oy(t,e),n.template=new qy(t,e),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Pm(t,e),n.dockerRegistry=new Gm(t,e),n.integration=new Hm(t,e),n}(),n.domain=new nv(t,e),n.logSink=new jv(t,e),n.notification=new Pv(t,e),n.customVcs=function(){var n={};return n.token=new Gv(t,e),n}(),n.project=new $v(t,e),n.addon=function(){var n=new Xv(t,e);return n.backupSchedule=new ob(t,e),n}(),n.job=function(){var n={};return n.cron=new xb(t,e),n.manual=new Ob(t,e),n}(),n.secret=new Cg(t,e),n.service=function(){var n={};return n.build=new qg(t,e),n.combined=new Gg(t,e),n.deployment=new Jg(t,e),n}(),n.volume=new Ey(t,e),n.template=new Dy(t,e),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new km(t,e),n.dockerRegistry=new Mm(t,e),n.integration=new Vm(t,e),n}(),n.project=new Hv(t,e),n.addon=new Qv(t,e),n.job=function(){var n={};return n.cron=new Pb(t,e),n.manual=new Tb(t,e),n}(),n.secret=new Ag(t,e),n.service=function(){var n={};return n.build=new Bg(t,e),n.combined=new Mg(t,e),n.deployment=new Wg(t,e),n}(),n.tag=new xy(t,e),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Nm(t,e),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new qm(t,e),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Bm(t,e),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new sv(t,e),n.addon=function(){var n={};return n.backup=new gb(t,e),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new dv(t,e),n.path=new yv(t,e),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new lv(t,e);return n.path=new wv(t,e),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new hv(t,e),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new pv(t,e),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new gv(t,e),n}(),n.logSink=new Uv(t,e),n.notification=new Ov(t,e),n.registryCredentials=new Bv(t,e),n.addon=function(){var n={};return n.networkSettings=new yb(t,e),n.security=new _b(t,e),n.version=new Ab(t,e),n}(),n.job=function(){var n={};return n.buildArguments=new Mb(t,e),n.buildOptions=new Jb(t,e),n.buildSource=new Wb(t,e),n.deployment=new Yb(t,e),n.healthChecks=new Xb(t,e),n.runtimeEnvironment=new ag(t,e),n.settings=new dg(t,e),n}(),n.previewTemplate=new mg(t,e),n.releaseFlow=new Eg(t,e),n.secret=new kg(t,e),n.secretLink=new Og(t,e),n.service=function(){var n={};return n.buildArguments=new Qg(t,e),n.buildOptions=new ey(t,e),n.buildSource=new ny(t,e),n.deployment=new ay(t,e),n.healthChecks=new uy(t,e),n.ports=new hy(t,e),n.runtimeEnvironment=new by(t,e),n}(),n.volume=new Ry(t,e),n.template=new Ny(t,e),n}(),verify:function(){var n={};return n.subdomain=new Ev(t,e),n.domain=new Iv(t,e),n}(),pause:function(){var n={};return n.logSink=new Cv(t,e),n.addon=new wb(t,e),n.job=new Qb(t,e),n.service=new dy(t,e),n}(),resume:function(){var n={};return n.logSink=new Av(t,e),n.addon=new jb(t,e),n.job=new eg(t,e),n.service=new my(t,e),n}(),backup:function(){var n={};return n.addon=new ab(t,e),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new db(t,e),n.restore=new lb(t,e),n}(),n.job=function(){var n={};return n.build=new Hb(t,e),n.run=new ig(t,e),n}(),n.releaseFlowRun=new Sg(t,e),n.service=function(){var n={};return n.build=new oy(t,e),n}(),n.templateRun=new My(t,e),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new pb(t,e),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new mb(t,e),n}(),n}(),reset:function(){var n={};return n.addon=new Eb(t,e),n}(),restart:function(){var n={};return n.addon=new Ib(t,e),n.service=new fy(t,e),n}(),scale:function(){var n={};return n.addon=new Sb(t,e),n.job=new ug(t,e),n.service=new yy(t,e),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new Fb(t,e),n.run=new rg(t,e),n}(),n.service=function(){var n={};return n.build=new Kg(t,e),n}(),n}(),suspend:function(){var n={};return n.job=new lg(t,e),n}(),run:function(){var n={};return n.releaseFlow=new Ig(t,e),n.template=new By(t,e),n}(),attach:function(){var n={};return n.volume=new Sy(t,e),n}(),detach:function(){var n={};return n.volume=new _y(t,e),n}(),download:function(){var t={};return t.service=function(){var t={};return t.files=i.fileCopy.downloadServiceFiles.bind(i.fileCopy),t}(),t.job=function(){var t={};return t.files=i.fileCopy.downloadJobFiles.bind(i.fileCopy),t}(),t}(),upload:function(){var t={};return t.service=function(){var t={};return t.files=i.fileCopy.uploadServiceFiles.bind(i.fileCopy),t}(),t.job=function(){var t={};return t.files=i.fileCopy.uploadJobFiles.bind(i.fileCopy),t}(),t}()},this.download=function(){var t={};return t.service=function(){var t={};return t.files=i.endpoints.download.service.files,t}(),t.job=function(){var t={};return t.files=i.endpoints.download.job.files,t}(),t}(),this.upload=function(){var t={};return t.service=function(){var t={};return t.files=i.endpoints.upload.service.files,t}(),t.job=function(){var t={};return t.files=i.endpoints.upload.job.files,t}(),t}(),this.get=function(){var t={};return t.addon=function(){var t=i.endpoints.get.addon.call;return t.types=i.endpoints.get.addon.types.call,t.backupSchedules=function(){var t=i.endpoints.get.addon.backupSchedules.call;return t.all=i.endpoints.get.addon.backupSchedules.all,t}(),t.backups=function(){var t=i.endpoints.get.addon.backups.call;return t.all=i.endpoints.get.addon.backups.all,t}(),t.backup=function(){var t=i.endpoints.get.addon.backup.call;return t.download=i.endpoints.get.addon.backup.download.call,t.restores=function(){var t=i.endpoints.get.addon.backup.restores.call;return t.all=i.endpoints.get.addon.backup.restores.all,t}(),t.logs=i.logs.getAddonBackupLogs,t.logTail=i.logs.tailAddonBackupLogs,t}(),t.containers=function(){var t=i.endpoints.get.addon.containers.call;return t.all=i.endpoints.get.addon.containers.all,t}(),t.credentials=i.endpoints.get.addon.credentials.call,t.restores=function(){var t=function(){var t=i.endpoints.get.addon.restores.call;return t.all=i.endpoints.get.addon.restores.all,t}();return t.logs=i.logs.getAddonRestoresLogs,t.logTail=i.logs.tailAddonRestoresLogs,t}(),t.version=i.endpoints.get.addon.version.call,t.logs=i.logs.getAddonLogs,t.logTail=i.logs.tailAddonLogs,t.metrics=i.metrics.getAddonMetrics,t.metricsRange=i.metrics.getAddonMetricsRange,t}(),t.backupDestination=i.endpoints.get.backupDestination.call,t.invoice=function(){var t={};return t.details=i.endpoints.get.invoice.details.call,t}(),t.cloud=function(){var t={};return t.cluster=i.endpoints.get.cloud.cluster.call,t.dockerRegistry=i.endpoints.get.cloud.dockerRegistry.call,t.integration=i.endpoints.get.cloud.integration.call,t}(),t.dnsId=i.endpoints.get.dnsId.call,t.domain=i.endpoints.get.domain.call,t.domainCertificate=i.endpoints.get.domainCertificate.call,t.subdomain=function(){var t=i.endpoints.get.subdomain.call;return t.path=i.endpoints.get.subdomain.path.call,t}(),t.logSink=i.endpoints.get.logSink.call,t.notification=i.endpoints.get.notification.call,t.registryCredentials=i.endpoints.get.registryCredentials.call,t.project=i.endpoints.get.project.call,t.job=function(){var t=i.endpoints.get.job.call;return t.branches=function(){var t=i.endpoints.get.job.branches.call;return t.all=i.endpoints.get.job.branches.all,t}(),t.builds=function(){var t=i.endpoints.get.job.builds.call;return t.all=i.endpoints.get.job.builds.all,t}(),t.buildArguments=i.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=i.endpoints.get.job.buildArgumentDetails.call,t.build=i.endpoints.get.job.build.call,t.containers=function(){var t=i.endpoints.get.job.containers.call;return t.all=i.endpoints.get.job.containers.all,t}(),t.deployment=i.endpoints.get.job.deployment.call,t.healthChecks=i.endpoints.get.job.healthChecks.call,t.pullRequests=function(){var t=i.endpoints.get.job.pullRequests.call;return t.all=i.endpoints.get.job.pullRequests.all,t}(),t.runs=function(){var t=i.endpoints.get.job.runs.call;return t.all=i.endpoints.get.job.runs.all,t}(),t.run=i.endpoints.get.job.run.call,t.runtimeEnvironment=i.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=i.endpoints.get.job.runtimeEnvironmentDetails.call,t.logs=i.logs.getJobLogs,t.buildLogs=i.logs.getJobBuildLogs,t.logTail=i.logs.tailJobLogs,t.buildLogTail=i.logs.tailJobBuildLogs,t.metrics=i.metrics.getJobMetrics,t.buildMetrics=i.metrics.getJobBuildMetrics,t.metricsRange=i.metrics.getJobMetricsRange,t.buildMetricsRange=i.metrics.getJobBuildMetricsRange,t}(),t.pipeline=i.endpoints.get.pipeline.call,t.previewTemplate=function(){var t=i.endpoints.get.previewTemplate.call;return t.all=i.endpoints.get.previewTemplate.all,t}(),t.previewTemplateRun=i.endpoints.get.previewTemplateRun.call,t.releaseFlow=i.endpoints.get.releaseFlow.call,t.releaseFlowRun=i.endpoints.get.releaseFlowRun.call,t.secret=i.endpoints.get.secret.call,t.secretLink=i.endpoints.get.secretLink.call,t.secretDetails=i.endpoints.get.secretDetails.call,t.service=function(){var t=i.endpoints.get.service.call;return t.branches=function(){var t=i.endpoints.get.service.branches.call;return t.all=i.endpoints.get.service.branches.all,t}(),t.builds=function(){var t=i.endpoints.get.service.builds.call;return t.all=i.endpoints.get.service.builds.all,t}(),t.buildArguments=i.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=i.endpoints.get.service.buildArgumentDetails.call,t.build=i.endpoints.get.service.build.call,t.containers=function(){var t=i.endpoints.get.service.containers.call;return t.all=i.endpoints.get.service.containers.all,t}(),t.deployment=i.endpoints.get.service.deployment.call,t.healthChecks=i.endpoints.get.service.healthChecks.call,t.ports=i.endpoints.get.service.ports.call,t.pullRequests=function(){var t=i.endpoints.get.service.pullRequests.call;return t.all=i.endpoints.get.service.pullRequests.all,t}(),t.runtimeEnvironment=i.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=i.endpoints.get.service.runtimeEnvironmentDetails.call,t.logs=i.logs.getServiceLogs,t.buildLogs=i.logs.getServiceBuildLogs,t.logTail=i.logs.tailServiceLogs,t.buildLogTail=i.logs.tailServiceBuildLogs,t.metrics=i.metrics.getServiceMetrics,t.buildMetrics=i.metrics.getServiceBuildMetrics,t.metricsRange=i.metrics.getServiceMetricsRange,t.buildMetricsRange=i.metrics.getServiceBuildMetricsRange,t}(),t.volume=i.endpoints.get.volume.call,t.tag=i.endpoints.get.tag.call,t.template=function(){var t=i.endpoints.get.template.call;return t.all=i.endpoints.get.template.all,t}(),t.templateRun=i.endpoints.get.templateRun.call,t}(),this.list=function(){var t={};return t.backupDestinations=function(){var t=i.endpoints.list.backupDestinations.call;return t.all=i.endpoints.list.backupDestinations.all,t}(),t.backupDestinationsBackups=function(){var t=i.endpoints.list.backupDestinationsBackups.call;return t.all=i.endpoints.list.backupDestinationsBackups.all,t}(),t.invoices=function(){var t=i.endpoints.list.invoices.call;return t.all=i.endpoints.list.invoices.all,t}(),t.cloud=function(){var t={};return t.providers=i.endpoints.list.cloud.providers.call,t.clusters=function(){var t=i.endpoints.list.cloud.clusters.call;return t.all=i.endpoints.list.cloud.clusters.all,t}(),t.cluster=function(){var t={};return t.nodes=function(){var t=i.endpoints.list.cloud.cluster.nodes.call;return t.all=i.endpoints.list.cloud.cluster.nodes.all,t}(),t}(),t.dockerRegistry=function(){var t=i.endpoints.list.cloud.dockerRegistry.call;return t.all=i.endpoints.list.cloud.dockerRegistry.all,t}(),t.integrations=function(){var t=i.endpoints.list.cloud.integrations.call;return t.all=i.endpoints.list.cloud.integrations.all,t}(),t.nodeTypes=function(){var t=i.endpoints.list.cloud.nodeTypes.call;return t.all=i.endpoints.list.cloud.nodeTypes.all,t}(),t.regions=function(){var t=i.endpoints.list.cloud.regions.call;return t.all=i.endpoints.list.cloud.regions.all,t}(),t}(),t.domains=function(){var t=i.endpoints.list.domains.call;return t.all=i.endpoints.list.domains.all,t}(),t.subdomain=function(){var t={};return t.path=i.endpoints.list.subdomain.path.call,t}(),t.logSinks=function(){var t=i.endpoints.list.logSinks.call;return t.all=i.endpoints.list.logSinks.all,t}(),t.notifications=function(){var t=i.endpoints.list.notifications.call;return t.all=i.endpoints.list.notifications.all,t}(),t.registryCredentials=function(){var t=i.endpoints.list.registryCredentials.call;return t.all=i.endpoints.list.registryCredentials.all,t}(),t.vcs=i.endpoints.list.vcs.call,t.repos=function(){var t=i.endpoints.list.repos.call;return t.all=i.endpoints.list.repos.all,t}(),t.branches=function(){var t=i.endpoints.list.branches.call;return t.all=i.endpoints.list.branches.all,t}(),t.plans=i.endpoints.list.plans.call,t.projects=function(){var t=i.endpoints.list.projects.call;return t.all=i.endpoints.list.projects.all,t}(),t.addons=function(){var t=i.endpoints.list.addons.call;return t.all=i.endpoints.list.addons.all,t}(),t.jobs=function(){var t=i.endpoints.list.jobs.call;return t.all=i.endpoints.list.jobs.all,t}(),t.pipelines=function(){var t=i.endpoints.list.pipelines.call;return t.all=i.endpoints.list.pipelines.all,t}(),t.previewTemplatePreviews=function(){var t=i.endpoints.list.previewTemplatePreviews.call;return t.all=i.endpoints.list.previewTemplatePreviews.all,t}(),t.previewTemplateRuns=function(){var t=i.endpoints.list.previewTemplateRuns.call;return t.all=i.endpoints.list.previewTemplateRuns.all,t}(),t.releaseFlowRuns=function(){var t=i.endpoints.list.releaseFlowRuns.call;return t.all=i.endpoints.list.releaseFlowRuns.all,t}(),t.secrets=function(){var t=i.endpoints.list.secrets.call;return t.all=i.endpoints.list.secrets.all,t}(),t.services=function(){var t=i.endpoints.list.services.call;return t.all=i.endpoints.list.services.all,t}(),t.volumes=i.endpoints.list.volumes.call,t.regions=i.endpoints.list.regions.call,t.tags=function(){var t=i.endpoints.list.tags.call;return t.all=i.endpoints.list.tags.all,t}(),t.templates=function(){var t=i.endpoints.list.templates.call;return t.all=i.endpoints.list.templates.all,t}(),t.templateRuns=function(){var t=i.endpoints.list.templateRuns.call;return t.all=i.endpoints.list.templateRuns.all,t}(),t}(),this.add=function(){var t={};return t.backupDestination=i.endpoints.add.backupDestination.call,t.domain=function(){var t={};return t.subdomain=i.endpoints.add.domain.subdomain.call,t}(),t.subdomain=function(){var t={};return t.path=i.endpoints.add.subdomain.path.call,t}(),t.registryCredentials=i.endpoints.add.registryCredentials.call,t.tag=i.endpoints.add.tag.call,t}(),this.patch=function(){var t={};return t.backupDestination=i.endpoints.patch.backupDestination.call,t.cloud=function(){var t={};return t.cluster=i.endpoints.patch.cloud.cluster.call,t.dockerRegistry=i.endpoints.patch.cloud.dockerRegistry.call,t.integration=i.endpoints.patch.cloud.integration.call,t}(),t.project=i.endpoints.patch.project.call,t.addon=i.endpoints.patch.addon.call,t.job=function(){var t={};return t.cron=i.endpoints.patch.job.cron.call,t.manual=i.endpoints.patch.job.manual.call,t}(),t.secret=i.endpoints.patch.secret.call,t.service=function(){var t={};return t.build=i.endpoints.patch.service.build.call,t.combined=i.endpoints.patch.service.combined.call,t.deployment=i.endpoints.patch.service.deployment.call,t}(),t.tag=i.endpoints.patch.tag.call,t}(),this.delete=function(){var t={};return t.backupDestination=i.endpoints.delete.backupDestination.call,t.cloud=function(){var t={};return t.cluster=i.endpoints.delete.cloud.cluster.call,t.dockerRegistry=i.endpoints.delete.cloud.dockerRegistry.call,t.integration=i.endpoints.delete.cloud.integration.call,t}(),t.domain=i.endpoints.delete.domain.call,t.subdomain=function(){var t=i.endpoints.delete.subdomain.call;return t.path=i.endpoints.delete.subdomain.path.call,t}(),t.logSink=i.endpoints.delete.logSink.call,t.notification=i.endpoints.delete.notification.call,t.registryCredentials=i.endpoints.delete.registryCredentials.call,t.project=i.endpoints.delete.project.call,t.addon=function(){var t=i.endpoints.delete.addon.call;return t.backupSchedule=i.endpoints.delete.addon.backupSchedule.call,t}(),t.backup=i.endpoints.delete.backup.call,t.job=i.endpoints.delete.job.call,t.previewTemplatePreview=i.endpoints.delete.previewTemplatePreview.call,t.secret=i.endpoints.delete.secret.call,t.secretLink=i.endpoints.delete.secretLink.call,t.service=i.endpoints.delete.service.call,t.volume=i.endpoints.delete.volume.call,t.tag=i.endpoints.delete.tag.call,t.template=i.endpoints.delete.template.call,t}(),this.create=function(){var t={};return t.cloud=function(){var t={};return t.cluster=i.endpoints.create.cloud.cluster.call,t.dockerRegistry=i.endpoints.create.cloud.dockerRegistry.call,t.integration=i.endpoints.create.cloud.integration.call,t}(),t.domain=i.endpoints.create.domain.call,t.logSink=i.endpoints.create.logSink.call,t.notification=i.endpoints.create.notification.call,t.customVcs=function(){var t={};return t.token=i.endpoints.create.customVcs.token.call,t}(),t.project=i.endpoints.create.project.call,t.addon=function(){var t=i.endpoints.create.addon.call;return t.backupSchedule=i.endpoints.create.addon.backupSchedule.call,t}(),t.job=function(){var t={};return t.cron=i.endpoints.create.job.cron.call,t.manual=i.endpoints.create.job.manual.call,t}(),t.secret=i.endpoints.create.secret.call,t.service=function(){var t={};return t.build=i.endpoints.create.service.build.call,t.combined=i.endpoints.create.service.combined.call,t.deployment=i.endpoints.create.service.deployment.call,t}(),t.volume=i.endpoints.create.volume.call,t.template=i.endpoints.create.template.call,t}(),this.put=function(){var t={};return t.cloud=function(){var t={};return t.cluster=i.endpoints.put.cloud.cluster.call,t.dockerRegistry=i.endpoints.put.cloud.dockerRegistry.call,t.integration=i.endpoints.put.cloud.integration.call,t}(),t.project=i.endpoints.put.project.call,t.addon=i.endpoints.put.addon.call,t.job=function(){var t={};return t.cron=i.endpoints.put.job.cron.call,t.manual=i.endpoints.put.job.manual.call,t}(),t.secret=i.endpoints.put.secret.call,t.service=function(){var t={};return t.build=i.endpoints.put.service.build.call,t.combined=i.endpoints.put.service.combined.call,t.deployment=i.endpoints.put.service.deployment.call,t}(),t.tag=i.endpoints.put.tag.call,t}(),this.cordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=i.endpoints.cordon.cloud.cluster.node.call,t}(),t}(),t}(),this.drain=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=i.endpoints.drain.cloud.cluster.node.call,t}(),t}(),t}(),this.uncordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=i.endpoints.uncordon.cloud.cluster.node.call,t}(),t}(),t}(),this.import=function(){var t={};return t.domainCertificate=i.endpoints.import.domainCertificate.call,t.addon=function(){var t={};return t.backup=i.endpoints.import.addon.backup.call,t}(),t}(),this.assign=function(){var t={};return t.subdomain=function(){var t={};return t.service=i.endpoints.assign.subdomain.service.call,t.path=i.endpoints.assign.subdomain.path.call,t}(),t}(),this.unassign=function(){var t={};return t.subdomain=function(){var t=i.endpoints.unassign.subdomain.call;return t.path=i.endpoints.unassign.subdomain.path.call,t}(),t}(),this.disable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=i.endpoints.disable.subdomain.cdn.call,t}(),t}(),this.enable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=i.endpoints.enable.subdomain.cdn.call,t}(),t}(),this.update=function(){var t={};return t.subdomain=function(){var t={};return t.path=i.endpoints.update.subdomain.path.call,t}(),t.logSink=i.endpoints.update.logSink.call,t.notification=i.endpoints.update.notification.call,t.registryCredentials=i.endpoints.update.registryCredentials.call,t.addon=function(){var t={};return t.networkSettings=i.endpoints.update.addon.networkSettings.call,t.security=i.endpoints.update.addon.security.call,t.version=i.endpoints.update.addon.version.call,t}(),t.job=function(){var t={};return t.buildArguments=i.endpoints.update.job.buildArguments.call,t.buildOptions=i.endpoints.update.job.buildOptions.call,t.buildSource=i.endpoints.update.job.buildSource.call,t.deployment=i.endpoints.update.job.deployment.call,t.healthChecks=i.endpoints.update.job.healthChecks.call,t.runtimeEnvironment=i.endpoints.update.job.runtimeEnvironment.call,t.settings=i.endpoints.update.job.settings.call,t}(),t.previewTemplate=i.endpoints.update.previewTemplate.call,t.releaseFlow=i.endpoints.update.releaseFlow.call,t.secret=i.endpoints.update.secret.call,t.secretLink=i.endpoints.update.secretLink.call,t.service=function(){var t={};return t.buildArguments=i.endpoints.update.service.buildArguments.call,t.buildOptions=i.endpoints.update.service.buildOptions.call,t.buildSource=i.endpoints.update.service.buildSource.call,t.deployment=i.endpoints.update.service.deployment.call,t.healthChecks=i.endpoints.update.service.healthChecks.call,t.ports=i.endpoints.update.service.ports.call,t.runtimeEnvironment=i.endpoints.update.service.runtimeEnvironment.call,t}(),t.volume=i.endpoints.update.volume.call,t.template=i.endpoints.update.template.call,t}(),this.verify=function(){var t={};return t.subdomain=i.endpoints.verify.subdomain.call,t.domain=i.endpoints.verify.domain.call,t}(),this.pause=function(){var t={};return t.logSink=i.endpoints.pause.logSink.call,t.addon=i.endpoints.pause.addon.call,t.job=i.endpoints.pause.job.call,t.service=i.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.logSink=i.endpoints.resume.logSink.call,t.addon=i.endpoints.resume.addon.call,t.job=i.endpoints.resume.job.call,t.service=i.endpoints.resume.service.call,t}(),this.backup=function(){var t={};return t.addon=i.endpoints.backup.addon.call,t}(),this.abort=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.abort.addon.backup.call,t.restore=i.endpoints.abort.addon.restore.call,t}(),t.job=function(){var t={};return t.build=i.endpoints.abort.job.build.call,t.run=i.endpoints.abort.job.run.call,t}(),t.releaseFlowRun=i.endpoints.abort.releaseFlowRun.call,t.service=function(){var t={};return t.build=i.endpoints.abort.service.build.call,t}(),t.templateRun=i.endpoints.abort.templateRun.call,t}(),this.restore=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.restore.addon.backup.call,t}(),t}(),this.retain=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.retain.addon.backup.call,t}(),t}(),this.reset=function(){var t={};return t.addon=i.endpoints.reset.addon.call,t}(),this.restart=function(){var t={};return t.addon=i.endpoints.restart.addon.call,t.service=i.endpoints.restart.service.call,t}(),this.scale=function(){var t={};return t.addon=i.endpoints.scale.addon.call,t.job=i.endpoints.scale.job.call,t.service=i.endpoints.scale.service.call,t}(),this.start=function(){var t={};return t.job=function(){var t={};return t.build=i.endpoints.start.job.build.call,t.run=i.endpoints.start.job.run.call,t}(),t.service=function(){var t={};return t.build=i.endpoints.start.service.build.call,t}(),t}(),this.suspend=function(){var t={};return t.job=i.endpoints.suspend.job.call,t}(),this.run=function(){var t={};return t.releaseFlow=i.endpoints.run.releaseFlow.call,t.template=i.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=i.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=i.endpoints.detach.volume.call,t}()};exports.AbortAddonBackupEndpoint=db,exports.AbortAddonRestoreEndpoint=lb,exports.AbortJobBuildEndpoint=Hb,exports.AbortJobRunEndpoint=ig,exports.AbortReleaseflowrunEndpoint=Sg,exports.AbortServiceBuildEndpoint=oy,exports.AbortTemplaterunEndpoint=My,exports.AddBackupdestinationEndpoint=Im,exports.AddDomainSubdomainEndpoint=av,exports.AddRegistrycredentialsEndpoint=Lv,exports.AddSubdomainPathEndpoint=fv,exports.AddTagEndpoint=Uy,exports.ApiClient=$y,exports.ApiClientContextProvider=zy,exports.ApiClientFileContextProvider=Jy,exports.ApiClientInMemoryContextProvider=Wy,exports.ApiEndpoint=om,exports.AssignSubdomainPathEndpoint=yv,exports.AssignSubdomainServiceEndpoint=dv,exports.AttachVolumeEndpoint=Sy,exports.BackupAddonEndpoint=ab,exports.CordonCloudClusterNodeEndpoint=Nm,exports.CreateAddonBackupscheduleEndpoint=ob,exports.CreateAddonEndpoint=Xv,exports.CreateCloudClusterEndpoint=Pm,exports.CreateCloudDockerregistryEndpoint=Gm,exports.CreateCloudIntegrationEndpoint=Hm,exports.CreateCustomvcsTokenEndpoint=Gv,exports.CreateDomainEndpoint=nv,exports.CreateJobCronEndpoint=xb,exports.CreateJobManualEndpoint=Ob,exports.CreateLogsinkEndpoint=jv,exports.CreateNotificationEndpoint=Pv,exports.CreateProjectEndpoint=$v,exports.CreateSecretEndpoint=Cg,exports.CreateServiceBuildEndpoint=qg,exports.CreateServiceCombinedEndpoint=Gg,exports.CreateServiceDeploymentEndpoint=Jg,exports.CreateTemplateEndpoint=Dy,exports.CreateVolumeEndpoint=Ey,exports.DeleteAddonBackupscheduleEndpoint=ib,exports.DeleteAddonEndpoint=nb,exports.DeleteApiEndpoint=cm,exports.DeleteBackupEndpoint=ub,exports.DeleteBackupdestinationEndpoint=Sm,exports.DeleteCloudClusterEndpoint=Dm,exports.DeleteCloudDockerregistryEndpoint=Wm,exports.DeleteCloudIntegrationEndpoint=Km,exports.DeleteDomainEndpoint=ov,exports.DeleteJobEndpoint=Nb,exports.DeleteLogsinkEndpoint=_v,exports.DeleteNotificationEndpoint=Tv,exports.DeletePreviewtemplatepreviewEndpoint=bg,exports.DeleteProjectEndpoint=Yv,exports.DeleteRegistrycredentialsEndpoint=qv,exports.DeleteSecretEndpoint=Pg,exports.DeleteSecretlinkEndpoint=Dg,exports.DeleteServiceEndpoint=Vg,exports.DeleteSubdomainEndpoint=uv,exports.DeleteSubdomainPathEndpoint=bv,exports.DeleteTagEndpoint=Oy,exports.DeleteTemplateEndpoint=qy,exports.DeleteVolumeEndpoint=jy,exports.DetachVolumeEndpoint=_y,exports.DisableSubdomainCdnEndpoint=hv,exports.DrainCloudClusterNodeEndpoint=qm,exports.EnableSubdomainCdnEndpoint=pv,exports.ExecCommandStandard=cc,exports.GetAddonBackupDownloadEndpoint=hb,exports.GetAddonBackupEndpoint=cb,exports.GetAddonBackupRestoresEndpoint=fb,exports.GetAddonBackupsEndpoint=sb,exports.GetAddonBackupschedulesEndpoint=rb,exports.GetAddonContainersEndpoint=vb,exports.GetAddonCredentialsEndpoint=bb,exports.GetAddonEndpoint=tb,exports.GetAddonRestoresEndpoint=Rb,exports.GetAddonTypesEndpoint=wm,exports.GetAddonVersionEndpoint=Cb,exports.GetApiEndpoint=im,exports.GetApiEndpointPaginated=sm,exports.GetBackupdestinationEndpoint=Rm,exports.GetCloudClusterEndpoint=Om,exports.GetCloudDockerregistryEndpoint=zm,exports.GetCloudIntegrationEndpoint=Zm,exports.GetDnsidEndpoint=tv,exports.GetDomainEndpoint=rv,exports.GetDomaincertificateEndpoint=iv,exports.GetInvoiceDetailsEndpoint=Am,exports.GetJobBranchesEndpoint=qb,exports.GetJobBuildEndpoint=$b,exports.GetJobBuildargumentdetailsEndpoint=zb,exports.GetJobBuildargumentsEndpoint=Gb,exports.GetJobBuildsEndpoint=Bb,exports.GetJobContainersEndpoint=Vb,exports.GetJobDeploymentEndpoint=Zb,exports.GetJobEndpoint=Lb,exports.GetJobHealthchecksEndpoint=Kb,exports.GetJobPullrequestsEndpoint=tg,exports.GetJobRunEndpoint=og,exports.GetJobRunsEndpoint=ng,exports.GetJobRuntimeenvironmentEndpoint=sg,exports.GetJobRuntimeenvironmentdetailsEndpoint=cg,exports.GetLogsinkEndpoint=Sv,exports.GetNotificationEndpoint=kv,exports.GetPipelineEndpoint=pg,exports.GetPreviewtemplateEndpoint=fg,exports.GetPreviewtemplaterunEndpoint=yg,exports.GetProjectEndpoint=Zv,exports.GetRegistrycredentialsEndpoint=Nv,exports.GetReleaseflowEndpoint=wg,exports.GetReleaseflowrunEndpoint=jg,exports.GetSecretEndpoint=xg,exports.GetSecretdetailsEndpoint=Lg,exports.GetSecretlinkEndpoint=Tg,exports.GetServiceBranchesEndpoint=Zg,exports.GetServiceBuildEndpoint=ry,exports.GetServiceBuildargumentdetailsEndpoint=ty,exports.GetServiceBuildargumentsEndpoint=Xg,exports.GetServiceBuildsEndpoint=Yg,exports.GetServiceContainersEndpoint=iy,exports.GetServiceDeploymentEndpoint=sy,exports.GetServiceEndpoint=Hg,exports.GetServiceHealthchecksEndpoint=cy,exports.GetServicePortsEndpoint=ly,exports.GetServicePullrequestsEndpoint=py,exports.GetServiceRuntimeenvironmentEndpoint=vy,exports.GetServiceRuntimeenvironmentdetailsEndpoint=gy,exports.GetSubdomainEndpoint=cv,exports.GetSubdomainPathEndpoint=vv,exports.GetTagEndpoint=Py,exports.GetTemplateEndpoint=Ly,exports.GetTemplaterunEndpoint=Gy,exports.GetVolumeEndpoint=Iy,exports.ImportAddonBackupEndpoint=gb,exports.ImportDomaincertificateEndpoint=sv,exports.ListAddonsEndpoint=Kv,exports.ListBackupdestinationsEndpoint=Em,exports.ListBackupdestinationsbackupsEndpoint=_m,exports.ListBranchesEndpoint=zv,exports.ListCloudClusterNodesEndpoint=Lm,exports.ListCloudClustersEndpoint=xm,exports.ListCloudDockerregistryEndpoint=Fm,exports.ListCloudIntegrationsEndpoint=$m,exports.ListCloudNodetypesEndpoint=Xm,exports.ListCloudProvidersEndpoint=Um,exports.ListCloudRegionsEndpoint=Qm,exports.ListDomainsEndpoint=ev,exports.ListInvoicesEndpoint=Cm,exports.ListJobsEndpoint=Ub,exports.ListLogsinksEndpoint=Rv,exports.ListNotificationsEndpoint=xv,exports.ListPipelinesEndpoint=hg,exports.ListPlansEndpoint=Jv,exports.ListPreviewtemplatepreviewsEndpoint=vg,exports.ListPreviewtemplaterunsEndpoint=gg,exports.ListProjectsEndpoint=Wv,exports.ListRegionsEndpoint=Cy,exports.ListRegistrycredentialsEndpoint=Dv,exports.ListReleaseflowrunsEndpoint=Rg,exports.ListReposEndpoint=Mv,exports.ListSecretsEndpoint=_g,exports.ListServicesEndpoint=Ng,exports.ListSubdomainPathEndpoint=mv,exports.ListTagsEndpoint=Ay,exports.ListTemplaterunsEndpoint=Fy,exports.ListTemplatesEndpoint=Ty,exports.ListVcsEndpoint=Fv,exports.ListVolumesEndpoint=wy,exports.NorthflankApiCallError=em,exports.NorthflankExecCommand=uc,exports.NorthflankFileCopy=tm,exports.NorthflankLogFetch=vm,exports.NorthflankMetricFetch=ym,exports.NorthflankPortForwarder=sc,exports.PatchAddonEndpoint=eb,exports.PatchApiEndpoint=dm,exports.PatchBackupdestinationEndpoint=jm,exports.PatchCloudClusterEndpoint=Tm,exports.PatchCloudDockerregistryEndpoint=Jm,exports.PatchCloudIntegrationEndpoint=Ym,exports.PatchJobCronEndpoint=kb,exports.PatchJobManualEndpoint=Db,exports.PatchProjectEndpoint=Vv,exports.PatchSecretEndpoint=Ug,exports.PatchServiceBuildEndpoint=Fg,exports.PatchServiceCombinedEndpoint=zg,exports.PatchServiceDeploymentEndpoint=$g,exports.PatchTagEndpoint=ky,exports.PauseAddonEndpoint=wb,exports.PauseJobEndpoint=Qb,exports.PauseLogsinkEndpoint=Cv,exports.PauseServiceEndpoint=dy,exports.PostApiEndpoint=am,exports.PutAddonEndpoint=Qv,exports.PutApiEndpoint=um,exports.PutCloudClusterEndpoint=km,exports.PutCloudDockerregistryEndpoint=Mm,exports.PutCloudIntegrationEndpoint=Vm,exports.PutJobCronEndpoint=Pb,exports.PutJobManualEndpoint=Tb,exports.PutProjectEndpoint=Hv,exports.PutSecretEndpoint=Ag,exports.PutServiceBuildEndpoint=Bg,exports.PutServiceCombinedEndpoint=Mg,exports.PutServiceDeploymentEndpoint=Wg,exports.PutTagEndpoint=xy,exports.ResetAddonEndpoint=Eb,exports.RestartAddonEndpoint=Ib,exports.RestartServiceEndpoint=fy,exports.RestoreAddonBackupEndpoint=pb,exports.ResumeAddonEndpoint=jb,exports.ResumeJobEndpoint=eg,exports.ResumeLogsinkEndpoint=Av,exports.ResumeServiceEndpoint=my,exports.RetainAddonBackupEndpoint=mb,exports.RunReleaseflowEndpoint=Ig,exports.RunTemplateEndpoint=By,exports.ScaleAddonEndpoint=Sb,exports.ScaleJobEndpoint=ug,exports.ScaleServiceEndpoint=yy,exports.StartJobBuildEndpoint=Fb,exports.StartJobRunEndpoint=rg,exports.StartServiceBuildEndpoint=Kg,exports.SuspendJobEndpoint=lg,exports.UnassignSubdomainEndpoint=lv,exports.UnassignSubdomainPathEndpoint=wv,exports.UncordonCloudClusterNodeEndpoint=Bm,exports.UpdateAddonNetworksettingsEndpoint=yb,exports.UpdateAddonSecurityEndpoint=_b,exports.UpdateAddonVersionEndpoint=Ab,exports.UpdateJobBuildargumentsEndpoint=Mb,exports.UpdateJobBuildoptionsEndpoint=Jb,exports.UpdateJobBuildsourceEndpoint=Wb,exports.UpdateJobDeploymentEndpoint=Yb,exports.UpdateJobHealthchecksEndpoint=Xb,exports.UpdateJobRuntimeenvironmentEndpoint=ag,exports.UpdateJobSettingsEndpoint=dg,exports.UpdateLogsinkEndpoint=Uv,exports.UpdateNotificationEndpoint=Ov,exports.UpdatePreviewtemplateEndpoint=mg,exports.UpdateRegistrycredentialsEndpoint=Bv,exports.UpdateReleaseflowEndpoint=Eg,exports.UpdateSecretEndpoint=kg,exports.UpdateSecretlinkEndpoint=Og,exports.UpdateServiceBuildargumentsEndpoint=Qg,exports.UpdateServiceBuildoptionsEndpoint=ey,exports.UpdateServiceBuildsourceEndpoint=ny,exports.UpdateServiceDeploymentEndpoint=ay,exports.UpdateServiceHealthchecksEndpoint=uy,exports.UpdateServicePortsEndpoint=hy,exports.UpdateServiceRuntimeenvironmentEndpoint=by,exports.UpdateSubdomainPathEndpoint=gv,exports.UpdateTemplateEndpoint=Ny,exports.UpdateVolumeEndpoint=Ry,exports.VerifyDomainEndpoint=Iv,exports.VerifySubdomainEndpoint=Ev;