@northflank/js-client 0.7.3 → 0.7.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api-client.d.ts +1367 -581
- package/dist/cjs/api-client.js +1 -1
- package/dist/esm/api-client.d.ts +1367 -581
- package/dist/esm/api-client.js +1 -1
- package/package.json +1 -1
package/dist/cjs/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("events"),t=require("stream"),n=require("http"),r=require("url"),o=require("punycode"),i=require("https"),s=require("zlib"),a=require("os"),u=require("net"),c=require("child_process"),l=require("fs"),d=require("path"),p=require("tls"),h=require("crypto"),f=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 b=v(e),y=v(t),g=m(t),w=v(n),j=v(r),_=v(o),S=v(i),E=v(s),P=v(a),A=v(u),x=m(u),C=v(l),I=v(d),k=v(p),U=v(h),O=v(f),D=function(e,t){return D=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])},D(e,t)};function R(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}D(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var B=function(){return B=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},B.apply(this,arguments)};function N(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function T(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function 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))}var G="object"==typeof global&&global&&global.Object===Object&&global,q="object"==typeof self&&self&&self.Object===Object&&self,F=G||q||Function("return this")(),J=F.Symbol,M=Object.prototype,z=M.hasOwnProperty,W=M.toString,V=J?J.toStringTag:void 0;var $=Object.prototype.toString;var H=J?J.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=z.call(e,V),n=e[V];try{e[V]=void 0;var r=!0}catch(e){}var o=W.call(e);return r&&(t?e[V]=n:delete e[V]),o}(e):function(e){return $.call(e)}(e)}function Z(e){return null!=e&&"object"==typeof e}function K(e){return"symbol"==typeof e||Z(e)&&"[object Symbol]"==Y(e)}function X(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=J?J.prototype:void 0,te=ee?ee.toString:void 0;function ne(e){if("string"==typeof e)return e;if(Q(e))return X(e,ne)+"";if(K(e))return te?te.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-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=F["__core-js_shared__"],ue=(se=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||""))?"Symbol(src)_1."+se:"";var ce=Function.prototype.toString;function le(e){if(null!=e){try{return ce.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var de=/^\[object .+?Constructor\]$/,pe=Function.prototype,he=Object.prototype,fe=pe.toString,ve=he.hasOwnProperty,me=RegExp("^"+fe.call(ve).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function be(e){return!(!re(e)||(t=e,ue&&ue in t))&&(ie(e)?me:de).test(le(e));var t}function ye(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return be(n)?n:void 0}var ge=ye(F,"WeakMap"),we=Object.create,je=function(){function e(){}return function(t){if(!re(t))return{};if(we)return we(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function _e(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)}var Se=Date.now;var Ee,Pe,Ae,xe=function(){try{var e=ye(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ce=xe,Ie=Ce?function(e,t){return Ce(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:oe,ke=(Ee=Ie,Pe=0,Ae=0,function(){var e=Se(),t=16-(e-Ae);if(Ae=e,t>0){if(++Pe>=800)return arguments[0]}else Pe=0;return Ee.apply(void 0,arguments)}),Ue=/^(?:0|[1-9]\d*)$/;function Oe(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Ue.test(e))&&e>-1&&e%1==0&&e<t}function De(e,t,n){"__proto__"==t&&Ce?Ce(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Re(e,t){return e===t||e!=e&&t!=t}var Be=Object.prototype.hasOwnProperty;function Ne(e,t,n){var r=e[t];Be.call(e,t)&&Re(r,n)&&(void 0!==n||t in e)||De(e,t,n)}var Te=Math.max;function Le(e,t){return ke(function(e,t,n){return t=Te(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Te(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),_e(e,this,a)}}(e,t,oe),e+"")}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function qe(e){return null!=e&&Ge(e.length)&&!ie(e)}var Fe=Object.prototype;function Je(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function Me(e){return Z(e)&&"[object Arguments]"==Y(e)}var ze=Object.prototype,We=ze.hasOwnProperty,Ve=ze.propertyIsEnumerable,$e=Me(function(){return arguments}())?Me:function(e){return Z(e)&&We.call(e,"callee")&&!Ve.call(e,"callee")};var He="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ye=He&&"object"==typeof module&&module&&!module.nodeType&&module,Ze=Ye&&Ye.exports===He?F.Buffer:void 0,Ke=(Ze?Ze.isBuffer:void 0)||function(){return!1},Xe={};Xe["[object Float32Array]"]=Xe["[object Float64Array]"]=Xe["[object Int8Array]"]=Xe["[object Int16Array]"]=Xe["[object Int32Array]"]=Xe["[object Uint8Array]"]=Xe["[object Uint8ClampedArray]"]=Xe["[object Uint16Array]"]=Xe["[object Uint32Array]"]=!0,Xe["[object Arguments]"]=Xe["[object Array]"]=Xe["[object ArrayBuffer]"]=Xe["[object Boolean]"]=Xe["[object DataView]"]=Xe["[object Date]"]=Xe["[object Error]"]=Xe["[object Function]"]=Xe["[object Map]"]=Xe["[object Number]"]=Xe["[object Object]"]=Xe["[object RegExp]"]=Xe["[object Set]"]=Xe["[object String]"]=Xe["[object WeakMap]"]=!1;var Qe="object"==typeof exports&&exports&&!exports.nodeType&&exports,et=Qe&&"object"==typeof module&&module&&!module.nodeType&&module,tt=et&&et.exports===Qe&&G.process,nt=function(){try{var e=et&&et.require&&et.require("util").types;return e||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,ot=rt?function(e){return function(t){return e(t)}}(rt):function(e){return Z(e)&&Ge(e.length)&&!!Xe[Y(e)]},it=ot,st=Object.prototype.hasOwnProperty;function at(e,t){var n=Q(e),r=!n&&$e(e),o=!n&&!r&&Ke(e),i=!n&&!r&&!o&&it(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=a.length;for(var c in e)!t&&!st.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Oe(c,u))||a.push(c);return a}function ut(e,t){return function(n){return e(t(n))}}var ct=ut(Object.keys,Object),lt=Object.prototype.hasOwnProperty;function dt(e){return qe(e)?at(e):function(e){if(!Je(e))return ct(e);var t=[];for(var n in Object(e))lt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var pt=Object.prototype.hasOwnProperty;function ht(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&&pt.call(e,r))&&n.push(r);return n}function ft(e){return qe(e)?at(e,!0):ht(e)}var vt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mt=/^\w*$/;function bt(e,t){if(Q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!K(e))||(mt.test(e)||!vt.test(e)||null!=t&&e in Object(t))}var yt=ye(Object,"create");var gt=Object.prototype.hasOwnProperty;var wt=Object.prototype.hasOwnProperty;function jt(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 _t(e,t){for(var n=e.length;n--;)if(Re(e[n][0],t))return n;return-1}jt.prototype.clear=function(){this.__data__=yt?yt(null):{},this.size=0},jt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},jt.prototype.get=function(e){var t=this.__data__;if(yt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return gt.call(t,e)?t[e]:void 0},jt.prototype.has=function(e){var t=this.__data__;return yt?void 0!==t[e]:wt.call(t,e)},jt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yt&&void 0===t?"__lodash_hash_undefined__":t,this};var St=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=_t(t,e);return!(n<0)&&(n==t.length-1?t.pop():St.call(t,n,1),--this.size,!0)},Et.prototype.get=function(e){var t=this.__data__,n=_t(t,e);return n<0?void 0:t[n][1]},Et.prototype.has=function(e){return _t(this.__data__,e)>-1},Et.prototype.set=function(e,t){var n=this.__data__,r=_t(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Pt=ye(F,"Map");function At(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 xt(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])}}xt.prototype.clear=function(){this.size=0,this.__data__={hash:new jt,map:new(Pt||Et),string:new jt}},xt.prototype.delete=function(e){var t=At(this,e).delete(e);return this.size-=t?1:0,t},xt.prototype.get=function(e){return At(this,e).get(e)},xt.prototype.has=function(e){return At(this,e).has(e)},xt.prototype.set=function(e,t){var n=At(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ct(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(Ct.Cache||xt),n}Ct.Cache=xt;var It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kt=/\\(\\)?/g,Ut=function(e){var t=Ct(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(It,(function(e,n,r,o){t.push(r?o.replace(kt,"$1"):n||e)})),t})),Ot=Ut;function Dt(e){return null==e?"":ne(e)}function Rt(e,t){return Q(e)?e:bt(e,t)?[e]:Ot(Dt(e))}function Bt(e){if("string"==typeof e||K(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function Nt(e,t){for(var n=0,r=(t=Rt(t,e)).length;null!=e&&n<r;)e=e[Bt(t[n++])];return n&&n==r?e:void 0}function Tt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Lt=J?J.isConcatSpreadable:void 0;function Gt(e){return Q(e)||$e(e)||!!(Lt&&e&&e[Lt])}function qt(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Gt),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?qt(a,t-1,n,r,o):Tt(o,a):r||(o[o.length]=a)}return o}var Ft=ut(Object.getPrototypeOf,Object),Jt=Function.prototype,Mt=Object.prototype,zt=Jt.toString,Wt=Mt.hasOwnProperty,Vt=zt.call(Object);function $t(e){var t=this.__data__=new Et(e);this.size=t.size}$t.prototype.clear=function(){this.__data__=new Et,this.size=0},$t.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$t.prototype.get=function(e){return this.__data__.get(e)},$t.prototype.has=function(e){return this.__data__.has(e)},$t.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Et){var r=n.__data__;if(!Pt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xt(r)}return n.set(e,t),this.size=n.size,this};var Ht="object"==typeof exports&&exports&&!exports.nodeType&&exports,Yt=Ht&&"object"==typeof module&&module&&!module.nodeType&&module,Zt=Yt&&Yt.exports===Ht?F.Buffer:void 0,Kt=Zt?Zt.allocUnsafe:void 0;var Xt=Object.prototype.propertyIsEnumerable,Qt=Object.getOwnPropertySymbols,en=Qt?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}(Qt(e),(function(t){return Xt.call(e,t)})))}:function(){return[]};function tn(e){return function(e,t,n){var r=t(e);return Q(e)?r:Tt(r,n(e))}(e,dt,en)}var nn=ye(F,"DataView"),rn=ye(F,"Promise"),on=ye(F,"Set"),sn=le(nn),an=le(Pt),un=le(rn),cn=le(on),ln=le(ge),dn=Y;(nn&&"[object DataView]"!=dn(new nn(new ArrayBuffer(1)))||Pt&&"[object Map]"!=dn(new Pt)||rn&&"[object Promise]"!=dn(rn.resolve())||on&&"[object Set]"!=dn(new on)||ge&&"[object WeakMap]"!=dn(new ge))&&(dn=function(e){var t=Y(e),n="[object Object]"==t?e.constructor:void 0,r=n?le(n):"";if(r)switch(r){case sn:return"[object DataView]";case an:return"[object Map]";case un:return"[object Promise]";case cn:return"[object Set]";case ln:return"[object WeakMap]"}return t});var pn=dn,hn=F.Uint8Array;function fn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new hn(r).set(new hn(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xt;++t<n;)this.add(e[t])}function mn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}vn.prototype.add=vn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},vn.prototype.has=function(e){return this.__data__.has(e)};function bn(e,t,n,r,o,i){var s=1&n,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var d=-1,p=!0,h=2&n?new vn:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var f=e[d],v=t[d];if(r)var m=s?r(v,f,d,t,e,i):r(f,v,d,e,t,i);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!mn(t,(function(e,t){if(s=t,!h.has(s)&&(f===e||o(f,e,n,r,i)))return h.push(t);var s}))){p=!1;break}}else if(f!==v&&!o(f,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function yn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function gn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var wn=J?J.prototype:void 0,jn=wn?wn.valueOf:void 0;var _n=Object.prototype.hasOwnProperty;var Sn="[object Object]",En=Object.prototype.hasOwnProperty;function Pn(e,t,n,r,o,i){var s=Q(e),a=Q(t),u=s?"[object Array]":pn(e),c=a?"[object Array]":pn(t),l=(u="[object Arguments]"==u?Sn:u)==Sn,d=(c="[object Arguments]"==c?Sn:c)==Sn,p=u==c;if(p&&Ke(e)){if(!Ke(t))return!1;s=!0,l=!1}if(p&&!l)return i||(i=new $t),s||it(e)?bn(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 hn(e),new hn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Re(+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=yn;case"[object Set]":var u=1&r;if(a||(a=gn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var l=bn(a(e),a(t),r,o,i,s);return s.delete(e),l;case"[object Symbol]":if(jn)return jn.call(e)==jn.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var h=l&&En.call(e,"__wrapped__"),f=d&&En.call(t,"__wrapped__");if(h||f){var v=h?e.value():e,m=f?t.value():t;return i||(i=new $t),o(v,m,n,r,i)}}return!!p&&(i||(i=new $t),function(e,t,n,r,o,i){var s=1&n,a=tn(e),u=a.length;if(u!=tn(t).length&&!s)return!1;for(var c=u;c--;){var l=a[c];if(!(s?l in t:_n.call(t,l)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var h=!0;i.set(e,t),i.set(t,e);for(var f=s;++c<u;){var v=e[l=a[c]],m=t[l];if(r)var b=s?r(m,v,l,t,e,i):r(v,m,l,e,t,i);if(!(void 0===b?v===m||o(v,m,n,r,i):b)){h=!1;break}f||(f="constructor"==l)}if(h&&!f){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}function An(e,t,n,r,o){return e===t||(null==e||null==t||!Z(e)&&!Z(t)?e!=e&&t!=t:Pn(e,t,n,r,An,o))}function xn(e){return e==e&&!re(e)}function Cn(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function In(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,xn(o)]}return t}(e);return 1==t.length&&t[0][2]?Cn(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,s=!r;if(null==e)return!i;for(e=Object(e);o--;){var a=n[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var u=(a=n[o])[0],c=e[u],l=a[1];if(s&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new $t;if(r)var p=r(c,l,u,e,t,d);if(!(void 0===p?An(l,c,3,r,d):p))return!1}}return!0}(n,e,t)}}function kn(e,t){return null!=e&&t in Object(e)}function Un(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=Rt(t,e)).length,i=!1;++r<o;){var s=Bt(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ge(o)&&Oe(s,o)&&(Q(e)||$e(e))}(e,t,kn)}function On(e,t){return bt(e)&&xn(t)?Cn(Bt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Nt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?Un(n,e):An(t,r,3)}}function Dn(e){return bt(e)?(t=Bt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Nt(t,e)}}(e);var t}function Rn(e){return"function"==typeof e?e:null==e?oe:"object"==typeof e?Q(e)?On(e[0],e[1]):In(e):Dn(e)}var Bn,Nn=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[Bn?s:++r];if(!1===t(o[a],a,o))break}return e};var Tn=function(e,t){return function(n,r){if(null==n)return n;if(!qe(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&&Nn(e,t,dt)})),Ln=Tn;function Gn(e,t,n){(void 0!==n&&!Re(e[t],n)||void 0===n&&!(t in e))&&De(e,t,n)}function qn(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Fn(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],u=r?r(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),o?De(n,a,u):Ne(n,a,u)}return n}(e,ft(e))}function Jn(e,t,n,r,o,i,s){var a=qn(e,n),u=qn(t,n),c=s.get(u);if(c)Gn(e,n,c);else{var l,d=i?i(a,u,n+"",e,t,s):void 0,p=void 0===d;if(p){var h=Q(u),f=!h&&Ke(u),v=!h&&!f&&it(u);d=u,h||f||v?Q(a)?d=a:Z(l=a)&&qe(l)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):f?(p=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=Kt?Kt(n):new e.constructor(n);return e.copy(r),r}(u,!0)):v?(p=!1,d=fn(u,!0)):d=[]:function(e){if(!Z(e)||"[object Object]"!=Y(e))return!1;var t=Ft(e);if(null===t)return!0;var n=Wt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&zt.call(n)==Vt}(u)||$e(u)?(d=a,$e(a)?d=Fn(a):re(a)&&!ie(a)||(d=function(e){return"function"!=typeof e.constructor||Je(e)?{}:je(Ft(e))}(u))):p=!1}p&&(s.set(u,d),o(d,u,r,i,s),s.delete(u)),Gn(e,n,d)}}function Mn(e,t,n,r,o){e!==t&&Nn(t,(function(i,s){if(o||(o=new $t),re(i))Jn(e,t,s,n,Mn,r,o);else{var a=r?r(qn(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),Gn(e,s,a)}}),ft)}var zn=/[\\^$.*+?()[\]{}|]/g,Wn=RegExp(zn.source);function Vn(e,t){var n=-1,r=qe(e)?Array(e.length):[];return Ln(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function $n(e,t){return qt(function(e,t){return(Q(e)?X:Vn)(e,Rn(t))}(e,t),1)}function Hn(e,t){return e>t}function Yn(e){return"string"==typeof e||!Q(e)&&Z(e)&&"[object String]"==Y(e)}function Zn(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,u=i}return u}(e,Rn(t),Hn):void 0}var Kn,Xn=(Kn=function(e,t,n){Mn(e,t,n)},Le((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=Kn.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?qe(n)&&Oe(t,n.length):"string"==r&&t in n)&&Re(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&&Kn(e,s,n,o)}return e})));function Qn(e,t){return e(t={exports:{}},t.exports),t.exports}var er={},tr=er;function nr(e){return e<0?-1:1}function rr(e,t){t.unsigned||--e;const n=t.unsigned?0:-Math.pow(2,e),r=Math.pow(2,e)-1,o=t.moduloBitLength?Math.pow(2,t.moduloBitLength):Math.pow(2,e),i=t.moduloBitLength?Math.pow(2,t.moduloBitLength-1):Math.pow(2,e-1);return function(e,s){s||(s={});let a=+e;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=nr(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(e){return e%1==.5&&0==(1&e)?Math.floor(e):Math.round(e)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=nr(a)*Math.floor(Math.abs(a)),a%=o,!t.unsigned&&a>=i)return a-o;if(t.unsigned)if(a<0)a+=o;else if(-0===a)return 0;return a}}er.void=function(){},er.boolean=function(e){return!!e},er.byte=rr(8,{unsigned:!1}),er.octet=rr(8,{unsigned:!0}),er.short=rr(16,{unsigned:!1}),er["unsigned short"]=rr(16,{unsigned:!0}),er.long=rr(32,{unsigned:!1}),er["unsigned long"]=rr(32,{unsigned:!0}),er["long long"]=rr(32,{unsigned:!1,moduloBitLength:64}),er["unsigned long long"]=rr(32,{unsigned:!0,moduloBitLength:64}),er.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},er["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},er.float=er.double,er["unrestricted float"]=er["unrestricted double"],er.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},er.ByteString=function(e,t){const n=String(e);let r;for(let e=0;void 0!==(r=n.codePointAt(e));++e)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},er.USVString=function(e){const t=String(e),n=t.length,r=[];for(let e=0;e<n;++e){const o=t.charCodeAt(e);if(o<55296||o>57343)r.push(String.fromCodePoint(o));else if(56320<=o&&o<=57343)r.push(String.fromCodePoint(65533));else if(e===n-1)r.push(String.fromCodePoint(65533));else{const n=t.charCodeAt(e+1);if(56320<=n&&n<=57343){const t=1023&o,i=1023&n;r.push(String.fromCodePoint(65536+1024*t+i)),++e}else r.push(String.fromCodePoint(65533))}}return r.join("")},er.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},er.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var or=Qn((function(e){e.exports.mixin=function(e,t){const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;++r)Object.defineProperty(e,n[r],Object.getOwnPropertyDescriptor(t,n[r]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(t){return t[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(t){return t[e.exports.implSymbol]}}));or.mixin,or.wrapperSymbol,or.implSymbol,or.wrapperForImpl,or.implForWrapper;var ir,sr=(ir=Object.freeze({__proto__:null}))&&ir.default||ir,ar={TRANSITIONAL:0,NONTRANSITIONAL:1};function ur(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function cr(e){for(var t=0,n=sr.length-1;t<=n;){var r=Math.floor((t+n)/2),o=sr[r];if(o[0][0]<=e&&o[0][1]>=e)return o;o[0][0]>e?n=r-1:t=r+1}return null}var lr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function dr(e){return e.replace(lr,"_").length}var pr=/[\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 hr(e,t){"xn--"===e.substr(0,4)&&(e=_.default.toUnicode(e));var n=!1;(ur(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(pr))&&(n=!0);for(var r=dr(e),o=0;o<r;++o){var i=cr(e.codePointAt(o));if(fr===ar.TRANSITIONAL&&"valid"!==i[1]||fr===ar.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:e,error:n}}function fr(e,t,n){var r=function(e,t,n){for(var r=!1,o="",i=dr(e),s=0;s<i;++s){var a=e.codePointAt(s),u=cr(a);switch(u[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":o+=n===ar.TRANSITIONAL?String.fromCodePoint.apply(String,u[2]):String.fromCodePoint(a);break;case"valid":o+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":t?(r=!0,o+=String.fromCodePoint(a)):o+=String.fromCodePoint.apply(String,u[2]);break;case"disallowed_STD3_valid":t&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(e,t,n);r.string=ur(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=hr(o[i]);o[i]=s.label,r.error=r.error||s.error}catch(e){r.error=!0}return{string:o.join("."),error:r.error}}var vr={toASCII:function(e,t,n,r){var o=fr(e,t,n),i=o.string.split(".");if(i=i.map((function(e){try{return _.default.toASCII(e)}catch(t){return o.error=!0,e}})),r){var s=i.slice(0,i.length-1).join(".").length;(s.length>253||0===s.length)&&(o.error=!0);for(var a=0;a<i.length;++a)if(i.length>63||0===i.length){o.error=!0;break}}return o.error?null:i.join(".")},toUnicode:function(e,t){var n=fr(e,t,ar.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:ar},mr=Qn((function(e){const t={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(e){return _.default.ucs2.decode(e).length}function o(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function i(e){return e>=48&&e<=57}function s(e){return e>=65&&e<=90||e>=97&&e<=122}function a(e){return i(e)||e>=65&&e<=70||e>=97&&e<=102}function u(e){return"."===e||"%2e"===e.toLowerCase()}function c(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function l(e){return void 0!==t[e]}function d(e){return l(e.scheme)}function p(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function h(e){return e<=31||e>126}const f=new Set([32,34,35,60,62,63,96,123,125]);function v(e){return h(e)||f.has(e)}const m=new Set([47,58,59,61,64,91,92,93,94,124]);function b(e){return v(e)||m.has(e)}function y(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=p(t[e]);return n}(n):n}function g(e){let t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;return(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?n:parseInt(e,t)}function w(e,t){if("["===e[0])return"]"!==e[e.length-1]?n:function(e){const t=[0,0,0,0,0,0,0,0];let r=0,s=null,u=0;if(58===(e=_.default.ucs2.decode(e))[u]){if(58!==e[u+1])return n;u+=2,++r,s=r}for(;u<e.length;){if(8===r)return n;if(58===e[u]){if(null!==s)return n;++u,++r,s=r;continue}let c=0,l=0;for(;l<4&&a(e[u]);)c=16*c+parseInt(o(e,u),16),++u,++l;if(46===e[u]){if(0===l)return n;if(u-=l,r>6)return n;let s=0;for(;void 0!==e[u];){let a=null;if(s>0){if(!(46===e[u]&&s<4))return n;++u}if(!i(e[u]))return n;for(;i(e[u]);){const t=parseInt(o(e,u));if(null===a)a=t;else{if(0===a)return n;a=10*a+t}if(a>255)return n;++u}t[r]=256*t[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===e[u]){if(++u,void 0===e[u])return n}else if(void 0!==e[u])return n;t[r]=c,++r}if(null!==s){let e=r-s;for(r=7;0!==r&&e>0;){const n=t[s+e-1];t[s+e-1]=t[r],t[r]=n,--r,--e}}else if(null===s&&8!==r)return n;return t}(e.substring(1,e.length-1));if(!t)return function(e){if(t=e,-1!==t.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var t;let r="";const o=_.default.ucs2.decode(e);for(let e=0;e<o.length;++e)r+=y(o[e],h);return r}(e);const r=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&a(t[e+1])&&a(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),s=vr.toASCII(r,!1,vr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const u=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const r=[];for(const o of t){if(""===o)return e;const t=g(o);if(t===n)return e;r.push(t)}for(let e=0;e<r.length-1;++e)if(r[e]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const e of r)o+=e*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof u||u===n?u:s}function j(e){return"number"==typeof e?function(e){let t="",n=e;for(let e=1;e<=4;++e)t=String(n%256)+t,4!==e&&(t="."+t),n=Math.floor(n/256);return t}(e):e instanceof Array?"["+function(e){let t="";const n=function(e){let t=null,n=1,r=null,o=0;for(let i=0;i<e.length;++i)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),{idx:t,len:n}}(e).idx;let r=!1;for(let o=0;o<=7;++o)r&&0===e[o]||(r&&(r=!1),n!==o?(t+=e[o].toString(16),7!==o&&(t+=":")):(t+=0===o?"::":":",r=!0));return t}(e)+"]":e}function S(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function E(e){return""!==e.username||""!==e.password}function P(e,t,r,o,i){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=r||"utf-8",this.stateOverride=i,this.url=o,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const e=function(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const s=function(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=_.default.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),r=this["parse "+this.state](e,t);if(!r)break;if(r===n){this.failure=!0;break}}}P.prototype["parse scheme start"]=function(e,t){if(s(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},P.prototype["parse scheme"]=function(e,t){if(function(e){return s(e)||i(e)}(e)||43===e||45===e||46===e)this.buffer+=t.toLowerCase();else if(58===e){if(this.stateOverride){if(d(this.url)&&!l(this.buffer))return!1;if(!d(this.url)&&l(this.buffer))return!1;if((E(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"):d(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":d(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},P.prototype["parse no scheme"]=function(e){return null===this.base||this.base.cannotBeABaseURL&&35!==e?n:(this.base.cannotBeABaseURL&&35===e?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},P.prototype["parse special relative or authority"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},P.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},P.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,isNaN(e)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===e?this.state="relative slash":63===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):d(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},P.prototype["parse relative slash"]=function(e){return!d(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},P.prototype["parse special authority slashes"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},P.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},P.prototype["parse authority"]=function(e,t){if(64===e){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const e=r(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(58===e&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=y(e,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||d(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},P.prototype["parse hostname"]=P.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==e||this.arrFlag)if(isNaN(e)||47===e||63===e||35===e||d(this.url)&&92===e){if(--this.pointer,d(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(E(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=w(this.buffer,d(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,n;const e=w(this.buffer,d(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},P.prototype["parse port"]=function(e,r){if(i(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||d(this.url)&&92===e||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=e===(o=this.url.scheme,t[o])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const A=new Set([47,92,63,35]);P.prototype["parse file"]=function(e){var t,n;return this.url.scheme="file",47===e||92===e?(92===e&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(e)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(t=e,n=this.input[this.pointer+1],!s(t)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!A.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),S(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},P.prototype["parse file slash"]=function(e){var t;return 47===e||92===e?(92===e&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(t=this.base.path[0]).length&&s(t.codePointAt(0))&&":"===t[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},P.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&c(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=w(this.buffer,d(this.url));if(e===n)return n;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},P.prototype["parse path start"]=function(e){return d(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},P.prototype["parse path"]=function(e){if(isNaN(e)||47===e||d(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(d(this.url)&&92===e&&(this.parseError=!0),".."===(t=(t=this.buffer).toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t?(S(this.url),47===e||d(this.url)&&92===e||this.url.path.push("")):!u(this.buffer)||47===e||d(this.url)&&92===e?u(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&c(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(""),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=y(e,v);var t;return!0},P.prototype["parse cannot-be-a-base-URL path"]=function(e){return 63===e?(this.url.query="",this.state="query"):35===e?(this.url.fragment="",this.state="fragment"):(isNaN(e)||37===e||(this.parseError=!0),37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path[0]=this.url.path[0]+y(e,h))),!0},P.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){d(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=p(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},P.prototype["parse fragment"]=function(e){return isNaN(e)||(0===e?this.parseError=!0:(37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=y(e,h))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=j(e.host),null!==e.port&&(n+=":"+e.port)):null===e.host&&"file"===e.scheme&&(n+="//"),e.cannotBeABaseURL)n+=e.path[0];else for(const t of e.path)n+="/"+t;return null!==e.query&&(n+="?"+e.query),t||null===e.fragment||(n+="#"+e.fragment),n},e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(e){let t=e.scheme+"://";return t+=j(e.host),null!==e.port&&(t+=":"+e.port),t}({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new P(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?"failure":n.url},e.exports.setTheUsername=function(e,t){e.username="";const n=_.default.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=y(n[t],b)},e.exports.setThePassword=function(e,t){e.password="";const n=_.default.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=y(n[t],b)},e.exports.serializeHost=j,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e.cannotBeABaseURL||"file"===e.scheme},e.exports.serializeInteger=function(e){return String(e)},e.exports.parseURL=function(t,n){return void 0===n&&(n={}),e.exports.basicURLParse(t,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));mr.serializeURL,mr.serializeURLOrigin,mr.basicURLParse,mr.setTheUsername,mr.setThePassword,mr.serializeHost,mr.cannotHaveAUsernamePasswordPort,mr.serializeInteger,mr.parseURL;var br=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=mr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=mr.basicURLParse(t,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return mr.serializeURL(this._url)}set href(e){const t=mr.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return mr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){mr.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){mr.cannotHaveAUsernamePasswordPort(this._url)||mr.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){mr.cannotHaveAUsernamePasswordPort(this._url)||mr.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?mr.serializeHost(e.host):mr.serializeHost(e.host)+":"+mr.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||mr.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":mr.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||mr.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":mr.serializeInteger(this._url.port)}set port(e){mr.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:mr.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],mr.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const t=this._url;if(""===e)return void(t.query=null);const n="?"===e[0]?e.substring(1):e;t.query="",mr.basicURLParse(n,{url:t,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const t="#"===e[0]?e.substring(1):e;this._url.fragment="",mr.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},yr=Qn((function(e){const t=or.implSymbol;function n(r){if(!this||this[t]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const o=[];for(let e=0;e<arguments.length&&e<2;++e)o[e]=arguments[e];o[0]=tr.USVString(o[0]),void 0!==o[1]&&(o[1]=tr.USVString(o[1])),e.exports.setup(this,o)}n.prototype.toJSON=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let e=0;e<arguments.length&&e<0;++e)n[e]=arguments[e];return this[t].toJSON.apply(this[t],n)},Object.defineProperty(n.prototype,"href",{get(){return this[t].href},set(e){e=tr.USVString(e),this[t].href=e},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[t].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[t].protocol},set(e){e=tr.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=tr.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=tr.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=tr.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=tr.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=tr.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=tr.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=tr.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=tr.USVString(e),this[t].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[t]instanceof br,create(e,t){let r=Object.create(n.prototype);return this.setup(r,e,t),r},setup(e,n,r){r||(r={}),r.wrapper=e,e[t]=new br(n,r),e[t][or.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));yr.is,yr.create,yr.setup,yr.expose;var gr={URL:yr.interface,serializeURL:mr.serializeURL,serializeURLOrigin:mr.serializeURLOrigin,basicURLParse:mr.basicURLParse,setTheUsername:mr.setTheUsername,setThePassword:mr.setThePassword,serializeHost:mr.serializeHost,serializeInteger:mr.serializeInteger,parseURL:mr.parseURL};const wr=y.default.Readable,jr=Symbol("buffer"),_r=Symbol("type");class Sr{constructor(){this[_r]="";const e=arguments[0],t=arguments[1],n=[];let r=0;if(e){const t=e,o=Number(t.length);for(let e=0;e<o;e++){const o=t[e];let i;i=o instanceof Buffer?o:ArrayBuffer.isView(o)?Buffer.from(o.buffer,o.byteOffset,o.byteLength):o instanceof ArrayBuffer?Buffer.from(o):o instanceof Sr?o[jr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[jr]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[_r]=o)}get size(){return this[jr].length}get type(){return this[_r]}text(){return Promise.resolve(this[jr].toString())}arrayBuffer(){const e=this[jr],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new wr;return e._read=function(){},e.push(this[jr]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],n=arguments[1];let r,o;r=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),o=void 0===n?e:n<0?Math.max(e+n,0):Math.min(n,e);const i=Math.max(o-r,0),s=this[jr].slice(r,r+i),a=new Sr([],{type:arguments[2]});return a[jr]=s,a}}function Er(e,t,n){Error.call(this,e),this.message=e,this.type=t,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let Pr;Object.defineProperties(Sr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Sr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),Er.prototype=Object.create(Error.prototype),Er.prototype.constructor=Er,Er.prototype.name="FetchError";try{Pr=require("encoding").convert}catch(e){}const Ar=Symbol("Body internals"),xr=y.default.PassThrough;function Cr(e){var t=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==e?e=null:kr(e)?e=Buffer.from(e.toString()):Ur(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof y.default||(e=Buffer.from(String(e)))),this[Ar]={body:e,disturbed:!1,error:null},this.size=o,this.timeout=s,e instanceof y.default&&e.on("error",(function(e){const n="AbortError"===e.name?e:new Er(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[Ar].error=n}))}function Ir(){var e=this;if(this[Ar].disturbed)return Cr.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Ar].disturbed=!0,this[Ar].error)return Cr.Promise.reject(this[Ar].error);let t=this.body;if(null===t)return Cr.Promise.resolve(Buffer.alloc(0));if(Ur(t)&&(t=t.stream()),Buffer.isBuffer(t))return Cr.Promise.resolve(t);if(!(t instanceof y.default))return Cr.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new Cr.Promise((function(i,s){let a;e.timeout&&(a=setTimeout((function(){o=!0,s(new Er(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(o=!0,s(t)):s(new Er(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!o&&null!==t){if(e.size&&r+t.length>e.size)return o=!0,void s(new Er(`content size at ${e.url} over limit: ${e.size}`,"max-size"));r+=t.length,n.push(t)}})),t.on("end",(function(){if(!o){clearTimeout(a);try{i(Buffer.concat(n,r))}catch(t){s(new Er(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function kr(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function Ur(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Or(e){let t,n,r=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof y.default&&"function"!=typeof r.getBoundary&&(t=new xr,n=new xr,r.pipe(t),r.pipe(n),e[Ar].body=t,r=n),r}function Dr(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":kr(e)?"application/x-www-form-urlencoded;charset=UTF-8":Ur(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof y.default?null:"text/plain;charset=UTF-8"}function Rr(e){const t=e.body;return null===t?0:Ur(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}Cr.prototype={get body(){return this[Ar].body},get bodyUsed(){return this[Ar].disturbed},arrayBuffer(){return Ir.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return Ir.call(this).then((function(t){return Object.assign(new Sr([],{type:e.toLowerCase()}),{[jr]:t})}))},json(){var e=this;return Ir.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return Cr.Promise.reject(new Er(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return Ir.call(this).then((function(e){return e.toString()}))},buffer(){return Ir.call(this)},textConverted(){var e=this;return Ir.call(this).then((function(t){return function(e,t){if("function"!=typeof Pr)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=t.get("content-type");let r,o,i="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));o=e.slice(0,1024).toString(),!r&&o&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(o));!r&&o&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(o),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(o),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&o&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(o));r&&(i=r.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030"));return Pr(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(Cr.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Cr.mixIn=function(e){for(const t of Object.getOwnPropertyNames(Cr.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(Cr.prototype,t);Object.defineProperty(e,t,n)}},Cr.Promise=global.Promise;const Br=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Nr=/[^\t\x20-\x7e\x80-\xff]/;function Tr(e){if(e=`${e}`,Br.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function Lr(e){if(e=`${e}`,Nr.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function Gr(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const qr=Symbol("map");class Fr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[qr]=Object.create(null),e instanceof Fr){const t=e.raw(),n=Object.keys(t);for(const e of n)for(const n of t[e])this.append(e,n)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const n=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(t))}for(const e of n){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const n=e[t];this.append(t,n)}}}}get(e){Tr(e=`${e}`);const t=Gr(this[qr],e);return void 0===t?null:this[qr][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=Jr(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],s=o[1];e.call(t,s,i,this),n=Jr(this),r++}}set(e,t){t=`${t}`,Tr(e=`${e}`),Lr(t);const n=Gr(this[qr],e);this[qr][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,Tr(e=`${e}`),Lr(t);const n=Gr(this[qr],e);void 0!==n?this[qr][n].push(t):this[qr][e]=[t]}has(e){return Tr(e=`${e}`),void 0!==Gr(this[qr],e)}delete(e){Tr(e=`${e}`);const t=Gr(this[qr],e);void 0!==t&&delete this[qr][t]}raw(){return this[qr]}keys(){return zr(this,"key")}values(){return zr(this,"value")}[Symbol.iterator](){return zr(this,"key+value")}}function Jr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const n=Object.keys(e[qr]).sort();return n.map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[qr][t].join(", ")}:function(t){return[t.toLowerCase(),e[qr][t].join(", ")]})}Fr.prototype.entries=Fr.prototype[Symbol.iterator],Object.defineProperty(Fr.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Fr.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 Mr=Symbol("internal");function zr(e,t){const n=Object.create(Wr);return n[Mr]={target:e,kind:t,index:0},n}const Wr=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Wr)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[Mr];const t=e.target,n=e.kind,r=e.index,o=Jr(t,n);return r>=o.length?{value:void 0,done:!0}:(this[Mr].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Vr(e){const t=Object.assign({__proto__:null},e[qr]),n=Gr(e[qr],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(Wr,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const $r=Symbol("Response internals"),Hr=w.default.STATUS_CODES;class Yr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Cr.call(this,e,t);const n=t.status||200,r=new Fr(t.headers);if(null!=e&&!r.has("Content-Type")){const t=Dr(e);t&&r.append("Content-Type",t)}this[$r]={url:t.url,status:n,statusText:t.statusText||Hr[n],headers:r,counter:t.counter}}get url(){return this[$r].url||""}get status(){return this[$r].status}get ok(){return this[$r].status>=200&&this[$r].status<300}get redirected(){return this[$r].counter>0}get statusText(){return this[$r].statusText}get headers(){return this[$r].headers}clone(){return new Yr(Or(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Cr.mixIn(Yr.prototype),Object.defineProperties(Yr.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Yr.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Zr=Symbol("Request internals"),Kr=j.default.URL||gr.URL,Xr=j.default.parse,Qr=j.default.format;function eo(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new Kr(e).toString()),Xr(e)}const to="destroy"in y.default.Readable.prototype;function no(e){return"object"==typeof e&&"object"==typeof e[Zr]}class ro{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};no(e)?t=eo(e.url):(t=e&&e.href?eo(e.href):eo(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||no(e)&&null!==e.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=n.body?n.body:no(e)&&null!==e.body?Or(e):null;Cr.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new Fr(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=Dr(o);e&&i.append("Content-Type",e)}let s=no(e)?e.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Zr]={method:r,redirect:n.redirect||e.redirect||"follow",headers:i,parsedURL:t,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[Zr].method}get url(){return Qr(this[Zr].parsedURL)}get headers(){return this[Zr].headers}get redirect(){return this[Zr].redirect}get signal(){return this[Zr].signal}clone(){return new ro(this)}}function oo(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}Cr.mixIn(ro.prototype),Object.defineProperty(ro.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(ro.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),oo.prototype=Object.create(Error.prototype),oo.prototype.constructor=oo,oo.prototype.name="AbortError";const io=j.default.URL||gr.URL,so=y.default.PassThrough;function ao(e,t){if(!ao.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Cr.Promise=ao.Promise,new ao.Promise((function(n,r){const o=new ro(e,t),i=function(e){const t=e[Zr].parsedURL,n=new Fr(e[Zr].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof y.default.Readable&&!to)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(r="0"),null!=e.body){const t=Rr(e);"number"==typeof t&&(r=String(t))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=e.agent;return"function"==typeof o&&(o=o(t)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},t,{method:e.method,headers:Vr(n),agent:o})}(o),s=("https:"===i.protocol?S.default:w.default).request,a=o.signal;let u=null;const c=function(){let e=new oo("The user aborted a request.");r(e),o.body&&o.body instanceof y.default.Readable&&o.body.destroy(e),u&&u.body&&u.body.emit("error",e)};if(a&&a.aborted)return void c();const l=function(){c(),h()},d=s(i);let p;function h(){d.abort(),a&&a.removeEventListener("abort",l),clearTimeout(p)}a&&a.addEventListener("abort",l),o.timeout&&d.once("socket",(function(e){p=setTimeout((function(){r(new Er(`network timeout at: ${o.url}`,"request-timeout")),h()}),o.timeout)})),d.on("error",(function(e){r(new Er(`request to ${o.url} failed, reason: ${e.message}`,"system",e)),h()})),d.on("response",(function(e){clearTimeout(p);const t=function(e){const t=new Fr;for(const n of Object.keys(e))if(!Br.test(n))if(Array.isArray(e[n]))for(const r of e[n])Nr.test(r)||(void 0===t[qr][n]?t[qr][n]=[r]:t[qr][n].push(r));else Nr.test(e[n])||(t[qr][n]=[e[n]]);return t}(e.headers);if(ao.isRedirect(e.statusCode)){const i=t.get("Location");let s=null;try{s=null===i?null:new io(i,o.url).toString()}catch(e){if("manual"!==o.redirect)return r(new Er(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void h()}switch(o.redirect){case"error":return r(new Er(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),void h();case"manual":if(null!==s)try{t.set("Location",s)}catch(e){r(e)}break;case"follow":if(null===s)break;if(o.counter>=o.follow)return r(new Er(`maximum redirect reached at: ${o.url}`,"max-redirect")),void h();const i={headers:new Fr(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(e,t){const n=new io(t).hostname,r=new io(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(o.url,s))for(const e of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(e);return 303!==e.statusCode&&o.body&&null===Rr(o)?(r(new Er("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void h()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==o.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(ao(new ro(s,i))),void h())}}e.once("end",(function(){a&&a.removeEventListener("abort",l)}));let i=e.pipe(new so);const s={url:o.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:o.size,timeout:o.timeout,counter:o.counter},c=t.get("Content-Encoding");if(!o.compress||"HEAD"===o.method||null===c||204===e.statusCode||304===e.statusCode)return u=new Yr(i,s),void n(u);const d={flush:E.default.Z_SYNC_FLUSH,finishFlush:E.default.Z_SYNC_FLUSH};if("gzip"==c||"x-gzip"==c)return i=i.pipe(E.default.createGunzip(d)),u=new Yr(i,s),void n(u);if("deflate"!=c&&"x-deflate"!=c){if("br"==c&&"function"==typeof E.default.createBrotliDecompress)return i=i.pipe(E.default.createBrotliDecompress()),u=new Yr(i,s),void n(u);u=new Yr(i,s),n(u)}else{e.pipe(new so).once("data",(function(e){i=8==(15&e[0])?i.pipe(E.default.createInflate()):i.pipe(E.default.createInflateRaw()),u=new Yr(i,s),n(u)}))}})),function(e,t){const n=t.body;null===n?e.end():Ur(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(d,o)}))}ao.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},ao.Promise=global.Promise;var uo=function(){function e(e){this.contextProvider=e}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;return T(this,(function(a){switch(a.label){case 0:return n=Xn({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},B({},t)),[4,ao(e,n)];case 1:return(r=a.sent()).ok?[3,3]:(o=Error.bind,s=(i=JSON).stringify,[4,r.json()]);case 2:throw new(o.apply(Error,[void 0,s.apply(i,[a.sent()])]));case 3:return[4,r.json()];case 4:return[2,a.sent()]}}))}))},e}(),co=function(e,t,n){return N(void 0,void 0,void 0,(function(){var r,o,i,s,a;return T(this,(function(u){switch(u.label){case 0:if(r=ho(t||"127.0.0.1"),(o=ho(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===P.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,po.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=o?(a=fo(s),[4,lo(e,a)]):[3,6];case 2:return u.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(e,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}}))}))},lo=function(e,t){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)})),t?r.connect(e,t):r.connect(e)}))},po=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"/sbin/ifconfig",[4,vo("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},ho=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},fo=function(e){if(!Number.isSafeInteger(e))throw new Error("Number is not an integer");if(e<0||e>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var t=[],n=0;n<4;n+=1)t.push(e>>8*n&255);return t.reverse().join(".")},vo=function(e,t,n){var r=c.spawn(e,t,B({windowsHide:!0},n)),o=new Promise((function(o,i){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(e){s+=e})),r.stderr&&r.stderr.on("data",(function(e){a+=e}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(a);i({message:u,result:r})}else o(r)}))}));return{process:r,resultPromise:o}},mo=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=bo(e,10),[4,C.default.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,C.default.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,C.default.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},bo=function(e,t){for(var n,r=I.default.dirname(e),o=I.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),u=I.default.join(r,a);if(!C.default.existsSync(u))return u}throw new Error("Could not write file to file '".concat(e,"'."))},yo="win32"===process.platform?"\r\n":"\n",go=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;Ao(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 $n(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return Ao(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 So(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||Z(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 Ao(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=_o(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?[wo(),jo(o),r]:[jo(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 B({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=Ao(t,"eol").map((function(e){return e.line}));return null!==(e=xo(n))&&void 0!==e?e:yo}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=$n(Ao(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=xo(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(Eo(e),t)},e}(),wo=function(){return{type:"blank",line:""}},jo=function(e){return{type:"comment",line:_o(e)}},_o=function(e){return e.startsWith("#")?e:"# ".concat(e)},So=function(e,t){var n=e.map((function(e){switch(e.type){case"entry":var t=e.hosts.map((function(e){var t=e.whitespace,n=e.host;return"".concat(t).concat(n)})).join("");return"".concat(e.ipPrefixWhitespace).concat(e.ip).concat(t);case"blank":case"comment":case"invalid":return e.line;default:return""}}));return n.join(null!=t?t:yo)},Eo=function(e){return e.split(/(\r?\n)/).map((function(e){return function(e){return e.match(/^\s*#.*$/)}(e)?{type:"comment",line:e}:function(e){return e.match(/^(\r?\n)$/)}(e)?{type:"eol",line:e}:function(e){return e.match(/^\s*$/)}(e)?{type:"blank",line:e}:Po(e)}))},Po=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=$n(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}},Ao=function(e,t){return e.filter((function(e){return e.type===t}))},xo=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=Zn(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},Co="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",Io=function(){function e(e){this.ast=go.fromNodes([]);var t={writeMode:"atomic",hostsFile:Co};this.config=B(B({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Yn(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Yn(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(!Yn(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Yn(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(!Yn(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(!Yn(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,C.default.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=go.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=B(B({},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,mo(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,C.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 C.default.existsSync(this.config.hostsFile)?(t=I.default.dirname(this.config.hostsFile),n=I.default.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=I.default.resolve(t,r),C.default.existsSync(o)&&!e.rewrite?[3,2]:[4,C.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}(),ko=function(){function e(){this.previousPromise=Promise.resolve()}return e.prototype.enter=function(e){return N(this,void 0,void 0,(function(){var t;return T(this,(function(n){return t=this.previousPromise.then((function(){return e()})).catch((function(){return e()})),this.previousPromise=t,[2,t]}))}))},e}(),Uo=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 Oo=Uo(Ro),Do=Uo(Bo);function Ro(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Bo(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}Ro.proto=Ro((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Ro(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Bo(this)},configurable:!0})})),Oo.strict=Do;var No=function(){},To=function(e,t,n){if("function"==typeof t)return To(e,null,t);t||(t={}),n=Oo(n||No);var r=e._writableState,o=e._readableState,i=t.readable||!1!==t.readable&&e.readable,s=t.writable||!1!==t.writable&&e.writable,a=!1,u=function(){e.writable||c()},c=function(){s=!1,i||n.call(e)},l=function(){i=!1,s||n.call(e)},d=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},p=function(t){n.call(e,t)},h=function(){process.nextTick(f)},f=function(){if(!a)return(!i||o&&o.ended&&!o.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},v=function(){e.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?s&&!r&&(e.on("end",u),e.on("close",u)):(e.on("complete",c),e.on("abort",h),e.req?v():e.on("request",v)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",d),e.on("end",l),e.on("finish",c),!1!==t.error&&e.on("error",p),e.on("close",h),function(){a=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",v),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",d),e.removeListener("end",l),e.removeListener("error",p),e.removeListener("close",h)}},Lo=To,Go=function(){},qo=/^v?\.0/.test(process.version),Fo=function(e){return"function"==typeof e},Jo=function(e,t,n,r){r=Oo(r);var o=!1;e.on("close",(function(){o=!0})),Lo(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!!qo&&!!C.default&&(e instanceof(C.default.ReadStream||Go)||e instanceof(C.default.WriteStream||Go))&&Fo(e.close)}(e)?e.close(Go):function(e){return e.setHeader&&Fo(e.abort)}(e)?e.abort():Fo(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},Mo=function(e){e()},zo=function(e,t){return e.pipe(t)},Wo=function(){var e,t=Array.prototype.slice.call(arguments),n=Fo(t[t.length-1]||Go)&&t.pop()||Go;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 Jo(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(Mo),s||(r.forEach(Mo),n(e))}))}));return t.reduce(zo)};const{Duplex:Vo}=y.default;function $o(e){e.emit("close")}function Ho(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Yo(e){this.removeListener("error",Yo),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Zo=function(e,t){let n=!0;const r=new Vo({...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($o,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick($o,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",Ho),r.on("error",Yo),r},Ko={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},Xo="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},Qo=process.config&&process.config.variables||{},ei=!!process.env.PREBUILDS_ONLY,ti=process.versions.modules,ni=!(!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",ri=process.env.npm_config_arch||P.default.arch(),oi=process.env.npm_config_platform||P.default.platform(),ii=process.env.LIBC||(function(e){return"linux"===e&&C.default.existsSync("/etc/alpine-release")}(oi)?"musl":"glibc"),si=process.env.ARM_VERSION||("arm64"===ri?"8":Qo.arm_version)||"",ai=(process.versions.uv||"").split(".")[0],ui=ci;function ci(e){return Xo(ci.path(e))}function li(e){try{return C.default.readdirSync(e)}catch(e){return[]}}function di(e,t){var n=li(e).filter(t);return n[0]&&I.default.join(e,n[0])}function pi(e){return/\.node$/.test(e)}function hi(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 fi(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function vi(e,t){return e.architectures.length-t.architectures.length}function mi(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 bi(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===ai)&&((!n.armv||n.armv===si)&&(!n.libc||n.libc===ii)))))}}function yi(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}ci.path=function(e){e=I.default.resolve(e||".");try{var t=Xo(I.default.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!ei){var n=di(I.default.join(e,"build/Release"),pi);if(n)return n;var r=di(I.default.join(e,"build/Debug"),pi);if(r)return r}var o=a(e);if(o)return o;var i=a(I.default.dirname(process.execPath));if(i)return i;var s=["platform="+oi,"arch="+ri,"runtime="+ni,"abi="+ti,"uv="+ai,si?"armv="+si:"","libc="+ii,"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=li(I.default.join(e,"prebuilds")).map(hi).filter(fi(oi,ri)).sort(vi)[0];if(t){var n=I.default.join(e,"prebuilds",t.name),r=li(n).map(mi).filter(bi(ni,ti)).sort(yi(ni))[0];return r?I.default.join(n,r.file):void 0}}},ci.parseTags=mi,ci.matchTags=bi,ci.compareTags=yi,ci.parseTuple=hi,ci.matchTuple=fi,ci.compareTuples=vi;var gi={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]}},wi=Qn((function(e){try{e.exports=ui(__dirname)}catch(t){e.exports=gi}})),ji=Qn((function(e){const{EMPTY_BUFFER:t}=Ko;function n(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[i]^t[3&i]}function r(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(e.exports={concat:function(e,n){if(0===e.length)return t;if(1===e.length)return e[0];const r=Buffer.allocUnsafe(n);let o=0;for(let t=0;t<e.length;t++){const n=e[t];r.set(n,o),o+=n.length}return o<n?r.slice(0,o):r},mask:n,toArrayBuffer:function(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let n;return t instanceof ArrayBuffer?n=Buffer.from(t):ArrayBuffer.isView(t)?n=Buffer.from(t.buffer,t.byteOffset,t.byteLength):(n=Buffer.from(t),e.readOnly=!1),n},unmask:r},!process.env.WS_NO_BUFFER_UTIL)try{const t=wi;e.exports.mask=function(e,r,o,i,s){s<48?n(e,r,o,i,s):t.mask(e,r,o,i,s)},e.exports.unmask=function(e,n){e.length<32?r(e,n):t.unmask(e,n)}}catch(e){}}));ji.concat,ji.mask,ji.toArrayBuffer,ji.toBuffer,ji.unmask;const _i=Symbol("kDone"),Si=Symbol("kRun");var Ei=class{constructor(e){this[_i]=()=>{this.pending--,this[Si]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Si]()}[Si](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[_i])}}};const{kStatusCode:Pi}=Ko,Ai=Buffer.from([0,0,255,255]),xi=Symbol("permessage-deflate"),Ci=Symbol("total-length"),Ii=Symbol("callback"),ki=Symbol("buffers"),Ui=Symbol("error");let Oi;var Di=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,!Oi){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Oi=new Ei(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[Ii];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){Oi.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){Oi.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]?E.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=E.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[xi]=this,this._inflate[Ci]=0,this._inflate[ki]=[],this._inflate.on("error",Ni),this._inflate.on("data",Bi)}this._inflate[Ii]=n,this._inflate.write(e),t&&this._inflate.write(Ai),this._inflate.flush((()=>{const e=this._inflate[Ui];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=ji.concat(this._inflate[ki],this._inflate[Ci]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Ci]=0,this._inflate[ki]=[],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]?E.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=E.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[Ci]=0,this._deflate[ki]=[],this._deflate.on("data",Ri)}this._deflate[Ii]=n,this._deflate.write(e),this._deflate.flush(E.default.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=ji.concat(this._deflate[ki],this._deflate[Ci]);t&&(e=e.slice(0,e.length-4)),this._deflate[Ii]=null,this._deflate[Ci]=0,this._deflate[ki]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function Ri(e){this[ki].push(e),this[Ci]+=e.length}function Bi(e){this[Ci]+=e.length,this[xi]._maxPayload<1||this[Ci]<=this[xi]._maxPayload?this[ki].push(e):(this[Ui]=new RangeError("Max payload size exceeded"),this[Ui].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ui][Pi]=1009,this.removeListener("data",Bi),this.reset())}function Ni(e){this[xi]._inflate=null,e[Pi]=1007,this[Ii](e)}var Ti=function(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0},Li=Qn((function(e){try{e.exports=ui(__dirname)}catch(t){e.exports=Ti}})),Gi=Qn((function(e){function t(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0}if(e.exports={isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:t,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]},!process.env.WS_NO_UTF_8_VALIDATE)try{const n=Li;e.exports.isValidUTF8=function(e){return e.length<150?t(e):n(e)}}catch(e){}}));Gi.isValidStatusCode,Gi.isValidUTF8,Gi.tokenChars;const{Writable:qi}=y.default,{BINARY_TYPES:Fi,EMPTY_BUFFER:Ji,kStatusCode:Mi,kWebSocket:zi}=Ko,{concat:Wi,toArrayBuffer:Vi,unmask:$i}=ji,{isValidStatusCode:Hi,isValidUTF8:Yi}=Gi;var Zi=class extends qi{constructor(e={}){super(),this._binaryType=e.binaryType||Fi[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[zi]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=t.slice(e),t.slice(0,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]=n.slice(e)),e-=n.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,Ki(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const t=64==(64&e[0]);if(t&&!this._extensions[Di.extensionName])return this._loop=!1,Ki(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,Ki(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Ki(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,Ki(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,Ki(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,Ki(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,Ki(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,Ki(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),this._isServer){if(!this._masked)return this._loop=!1,Ki(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Ki(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,Ki(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Ki(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=Ji;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&0!=(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&$i(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[Di.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(Ki(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return t(r);this.startLoop(t)}))}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?Wi(t,e):"arraybuffer"===this._binaryType?Vi(Wi(t,e)):t,this.emit("message",n,!0)}else{const n=Wi(t,e);if(!this._skipUTF8Validation&&!Yi(n))return this._loop=!1,Ki(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,Ji),this.end();else{if(1===e.length)return Ki(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{const t=e.readUInt16BE(0);if(!Hi(t))return Ki(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=e.slice(2);if(!this._skipUTF8Validation&&!Yi(n))return Ki(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,n),this.end()}}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}};function Ki(e,t,n,r,o){const i=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,Ki),i.code=o,i[Mi]=r,i}const{randomFillSync:Xi}=U.default,{EMPTY_BUFFER:Qi}=Ko,{isValidStatusCode:es}=Gi,{mask:ts,toBuffer:ns}=ji,rs=Symbol("kByteLength"),os=Buffer.alloc(4);class is{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,r,o=!1,i=2,s=!1;t.mask&&(n=t.maskBuffer||os,t.generateMask?t.generateMask(n):Xi(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[rs]?(e=Buffer.from(e)).length:t[rs]:(r=e.length,o=t.mask&&t.readOnly&&!s);let a=r;r>=65536?(i+=8,a=127):r>125&&(i+=2,a=126);const u=Buffer.allocUnsafe(o?r+i:i);return u[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),t.mask?(u[1]|=128,u[i-4]=n[0],u[i-3]=n[1],u[i-2]=n[2],u[i-1]=n[3],s?[u,e]:o?(ts(e,n,u,i,r),[u]):(ts(e,n,e,0,r),[u,e])):[u,e]}close(e,t,n,r){let o;if(void 0===e)o=Qi;else{if("number"!=typeof e||!es(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={[rs]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(is.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=ns(e)).length,o=ns.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[rs]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(is.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=ns(e)).length,o=ns.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[rs]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(is.frame(e,i),n)}send(e,t,n){const r=this._extensions[Di.extensionName];let o,i,s=t.binary?2:1,a=t.compress;if("string"==typeof e?(o=Buffer.byteLength(e),i=!1):(o=(e=ns(e)).length,i=ns.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=r._threshold),this._compress=a):(a=!1,s=0),t.fin&&(this._firstFragment=!0),r){const r={[rs]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};this._deflating?this.enqueue([this.dispatch,e,this._compress,r,n]):this.dispatch(e,this._compress,r,n)}else this.sendFrame(is.frame(e,{[rs]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:!1}),n)}dispatch(e,t,n,r){if(!t)return void this.sendFrame(is.frame(e,n),r);const o=this._extensions[Di.extensionName];this._bufferedBytes+=n[rs],this._deflating=!0,o.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t],r=n[n.length-1];"function"==typeof r&&r(e)}}else this._bufferedBytes-=n[rs],this._deflating=!1,n.readOnly=!1,this.sendFrame(is.frame(t,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][rs],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][rs],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 ss=is;const{kForOnEventAttribute:as,kListener:us}=Ko,cs=Symbol("kCode"),ls=Symbol("kData"),ds=Symbol("kError"),ps=Symbol("kMessage"),hs=Symbol("kReason"),fs=Symbol("kTarget"),vs=Symbol("kType"),ms=Symbol("kWasClean");class bs{constructor(e){this[fs]=null,this[vs]=e}get target(){return this[fs]}get type(){return this[vs]}}Object.defineProperty(bs.prototype,"target",{enumerable:!0}),Object.defineProperty(bs.prototype,"type",{enumerable:!0});class ys extends bs{constructor(e,t={}){super(e),this[cs]=void 0===t.code?0:t.code,this[hs]=void 0===t.reason?"":t.reason,this[ms]=void 0!==t.wasClean&&t.wasClean}get code(){return this[cs]}get reason(){return this[hs]}get wasClean(){return this[ms]}}Object.defineProperty(ys.prototype,"code",{enumerable:!0}),Object.defineProperty(ys.prototype,"reason",{enumerable:!0}),Object.defineProperty(ys.prototype,"wasClean",{enumerable:!0});class gs extends bs{constructor(e,t={}){super(e),this[ds]=void 0===t.error?null:t.error,this[ps]=void 0===t.message?"":t.message}get error(){return this[ds]}get message(){return this[ps]}}Object.defineProperty(gs.prototype,"error",{enumerable:!0}),Object.defineProperty(gs.prototype,"message",{enumerable:!0});class ws extends bs{constructor(e,t={}){super(e),this[ls]=void 0===t.data?null:t.data}get data(){return this[ls]}}Object.defineProperty(ws.prototype,"data",{enumerable:!0});const js={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[as]&&r[us]===t&&!r[as])return;let r;if("message"===e)r=function(e,n){const r=new ws("message",{data:n?e:e.toString()});r[fs]=this,Ss(t,this,r)};else if("close"===e)r=function(e,n){const r=new ys("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[fs]=this,Ss(t,this,r)};else if("error"===e)r=function(e){const n=new gs("error",{error:e,message:e.message});n[fs]=this,Ss(t,this,n)};else{if("open"!==e)return;r=function(){const e=new bs("open");e[fs]=this,Ss(t,this,e)}}r[as]=!!n[as],r[us]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[us]===t&&!n[as]){this.removeListener(e,n);break}}};var _s={CloseEvent:ys,ErrorEvent:gs,Event:bs,EventTarget:js,MessageEvent:ws};function Ss(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:Es}=Gi;function Ps(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var As={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,r,o=Object.create(null),i=!1,s=!1,a=!1,u=-1,c=-1,l=-1,d=0;for(;d<e.length;d++)if(c=e.charCodeAt(d),void 0===n)if(-1===l&&1===Es[c])-1===u&&(u=d);else if(0===d||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);const r=e.slice(u,l);44===c?(Ps(t,r,o),o=Object.create(null)):n=r,u=l=-1}}else-1===l&&-1!==u&&(l=d);else if(void 0===r)if(-1===l&&1===Es[c])-1===u&&(u=d);else if(32===c||9===c)-1===l&&-1!==u&&(l=d);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d),Ps(o,e.slice(u,l),!0),44===c&&(Ps(t,n,o),o=Object.create(null),n=void 0),u=l=-1}else{if(61!==c||-1===u||-1!==l)throw new SyntaxError(`Unexpected character at index ${d}`);r=e.slice(u,d),u=l=-1}else if(s){if(1!==Es[c])throw new SyntaxError(`Unexpected character at index ${d}`);-1===u?u=d:i||(i=!0),s=!1}else if(a)if(1===Es[c])-1===u&&(u=d);else if(34===c&&-1!==u)a=!1,l=d;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${d}`);s=!0}else if(34===c&&61===e.charCodeAt(d-1))a=!0;else if(-1===l&&1===Es[c])-1===u&&(u=d);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);let s=e.slice(u,l);i&&(s=s.replace(/\\/g,""),i=!1),Ps(o,r,s),44===c&&(Ps(t,n,o),o=Object.create(null),n=void 0),r=void 0,u=l=-1}}else-1===l&&(l=d);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===l&&(l=d);const p=e.slice(u,l);return void 0===n?Ps(t,p,o):(void 0===r?Ps(o,p,!0):Ps(o,r,i?p.replace(/\\/g,""):p),Ps(t,n,o)),t}};const{randomBytes:xs,createHash:Cs}=U.default,{URL:Is}=j.default,{BINARY_TYPES:ks,EMPTY_BUFFER:Us,GUID:Os,kForOnEventAttribute:Ds,kListener:Rs,kStatusCode:Bs,kWebSocket:Ns,NOOP:Ts}=Ko,{EventTarget:{addEventListener:Ls,removeEventListener:Gs}}=_s,{format:qs,parse:Fs}=As,{toBuffer:Js}=ji,Ms=Symbol("kAborted"),zs=[8,13],Ws=["CONNECTING","OPEN","CLOSING","CLOSED"],Vs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class $s extends b.default{constructor(e,t,n){super(),this._binaryType=ks[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Us,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=$s.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]),Ys(this,e,t,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){ks.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 Zi({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new ss(e,this._extensions,n.generateMask),this._receiver=r,this._socket=e,r[Ns]=this,e[Ns]=this,r.on("conclude",ta),r.on("drain",na),r.on("error",ra),r.on("message",ia),r.on("ping",sa),r.on("pong",aa),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",ca),e.on("data",la),e.on("end",da),e.on("error",pa),this._readyState=$s.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=$s.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[Di.extensionName]&&this._extensions[Di.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=$s.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==$s.CLOSED){if(this.readyState===$s.CONNECTING){const e="WebSocket was closed before the connection was established";return Qs(this,this._req,e)}this.readyState!==$s.CLOSING?(this._readyState=$s.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end()}}pause(){this.readyState!==$s.CONNECTING&&this.readyState!==$s.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===$s.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===$s.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||Us,t,n)):ea(this,e,n)}pong(e,t,n){if(this.readyState===$s.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===$s.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||Us,t,n)):ea(this,e,n)}resume(){this.readyState!==$s.CONNECTING&&this.readyState!==$s.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===$s.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!==$s.OPEN)return void ea(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Di.extensionName]||(r.compress=!1),this._sender.send(e||Us,r,n)}terminate(){if(this.readyState!==$s.CLOSED){if(this.readyState===$s.CONNECTING){const e="WebSocket was closed before the connection was established";return Qs(this,this._req,e)}this._socket&&(this._readyState=$s.CLOSING,this._socket.destroy())}}}Object.defineProperty($s,"CONNECTING",{enumerable:!0,value:Ws.indexOf("CONNECTING")}),Object.defineProperty($s.prototype,"CONNECTING",{enumerable:!0,value:Ws.indexOf("CONNECTING")}),Object.defineProperty($s,"OPEN",{enumerable:!0,value:Ws.indexOf("OPEN")}),Object.defineProperty($s.prototype,"OPEN",{enumerable:!0,value:Ws.indexOf("OPEN")}),Object.defineProperty($s,"CLOSING",{enumerable:!0,value:Ws.indexOf("CLOSING")}),Object.defineProperty($s.prototype,"CLOSING",{enumerable:!0,value:Ws.indexOf("CLOSING")}),Object.defineProperty($s,"CLOSED",{enumerable:!0,value:Ws.indexOf("CLOSED")}),Object.defineProperty($s.prototype,"CLOSED",{enumerable:!0,value:Ws.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty($s.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty($s.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[Ds])return t[Rs];return null},set(t){for(const t of this.listeners(e))if(t[Ds]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[Ds]:!0})}})})),$s.prototype.addEventListener=Ls,$s.prototype.removeEventListener=Gs;var Hs=$s;function Ys(e,t,n,r){const o={protocolVersion:zs[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!zs.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${zs.join(", ")})`);let i;if(t instanceof Is)i=t,e._url=t.href;else{try{i=new Is(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}e._url=t}const s="wss:"===i.protocol,a="ws+unix:"===i.protocol;let u;if("ws:"===i.protocol||s||a?a&&!i.pathname?u="The URL's pathname is empty":i.hash&&(u="The URL contains a fragment identifier"):u='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',u){const t=new SyntaxError(u);if(0===e._redirects)throw t;return void Zs(e,t)}const c=s?443:80,l=xs(16).toString("base64"),d=s?S.default.request:w.default.request,p=new Set;let h,f;if(o.createConnection=s?Xs:Ks,o.defaultPort=o.defaultPort||c,o.port=i.port||c,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(h=new Di(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=qs({[Di.extensionName]:h.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Vs.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")),f=e._req=d(o),e._redirects&&e.emit("redirect",e.url,f)}else f=e._req=d(o);o.timeout&&f.on("timeout",(()=>{Qs(e,f,"Opening handshake has timed out")})),f.on("error",(t=>{null===f||f[Ms]||(f=e._req=null,Zs(e,t))})),f.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 Qs(e,f,"Maximum redirects exceeded");let i;f.abort();try{i=new Is(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void Zs(e,n)}Ys(e,i,n,r)}else e.emit("unexpected-response",f,i)||Qs(e,f,`Unexpected server response: ${i.statusCode}`)})),f.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==$s.CONNECTING)return;if(f=e._req=null,"websocket"!==t.headers.upgrade.toLowerCase())return void Qs(e,n,"Invalid Upgrade header");const i=Cs("sha1").update(l+Os).digest("base64");if(t.headers["sec-websocket-accept"]!==i)return void Qs(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"];let a;if(void 0!==s?p.size?p.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":p.size&&(a="Server sent no subprotocol"),a)return void Qs(e,n,a);s&&(e._protocol=s);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!h){return void Qs(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=Fs(u)}catch(t){return void Qs(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==Di.extensionName){return void Qs(e,n,"Server indicated an extension that was not requested")}try{h.accept(t[Di.extensionName])}catch(t){return void Qs(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[Di.extensionName]=h}e.setSocket(n,r,{generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),f.end()}function Zs(e,t){e._readyState=$s.CLOSING,e.emit("error",t),e.emitClose()}function Ks(e){return e.path=e.socketPath,A.default.connect(e)}function Xs(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=A.default.isIP(e.host)?"":e.host),k.default.connect(e)}function Qs(e,t,n){e._readyState=$s.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Qs),t.setHeader?(t[Ms]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Zs,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function ea(e,t,n){if(t){const n=Js(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){n(new Error(`WebSocket is not open: readyState ${e.readyState} (${Ws[e.readyState]})`))}}function ta(e,t){const n=this[Ns];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[Ns]&&(n._socket.removeListener("data",la),process.nextTick(ua,n._socket),1005===e?n.close():n.close(e,t))}function na(){const e=this[Ns];e.isPaused||e._socket.resume()}function ra(e){const t=this[Ns];void 0!==t._socket[Ns]&&(t._socket.removeListener("data",la),process.nextTick(ua,t._socket),t.close(e[Bs])),t.emit("error",e)}function oa(){this[Ns].emitClose()}function ia(e,t){this[Ns].emit("message",e,t)}function sa(e){const t=this[Ns];t.pong(e,!t._isServer,Ts),t.emit("ping",e)}function aa(e){this[Ns].emit("pong",e)}function ua(e){e.resume()}function ca(){const e=this[Ns];let t;this.removeListener("close",ca),this.removeListener("data",la),this.removeListener("end",da),e._readyState=$s.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[Ns]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",oa),e._receiver.on("finish",oa))}function la(e){this[Ns]._receiver.write(e)||this.pause()}function da(){const e=this[Ns];e._readyState=$s.CLOSING,e._receiver.end(),this.end()}function pa(){const e=this[Ns];this.removeListener("error",pa),this.on("error",Ts),e&&(e._readyState=$s.CLOSING,this.destroy())}var ha=function(e){function n(t,n,r,o,i){void 0===i&&(i=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=x.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=Dt(t=e))&&Wn.test(t)?t.replace(zn,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return R(n,e),Object.defineProperty(n.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),n.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)}))}))]}))}))},n.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]}}))}))},n.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new Hs(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Zo(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?Wo(e,o,r):Wo(e,r),Wo(r,e),n.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},n.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,n=this.hostRegex;return new t.Transform({transform:function(t,r,o){var i=t.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(n,"Host: ".concat(e));o(null,Buffer.from(s))}else o(null,t)}})}},n}(e.EventEmitter),fa=function(e){function t(t,n,r){var o=e.call(this)||this;return o.endpoint=t,o.headers=n,o.bindToAssign=r,o.protocol="UDP",o.udpSocket=O.default.createSocket("udp4"),o.handleConnection(),o}return R(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=new Hs(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Zo(n);this.udpSocket.on("message",(function(t,n){e=n,r.write(t)})),r.on("data",(function(n){e&&t.udpSocket.send(n,e.port,e.address,(function(e){e&&t.emit("connection-error",e)}))})),this.udpSocket.on("error",(function(e){t.emit("connection-error",e)})),r.on("error",(function(e){t.emit("connection-error",e)})),n.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),n.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(e.EventEmitter);var va="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,ma=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)]}))}))},ba=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 R(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}(y.default.Writable),ya=function(e){function t(t,n,r){var o=e.call(this)||this;return o.contextProvider=t,o.listServices=n,o.listAddons=r,o.connections=[],o.hostsFileMutex=new ko,o.ipAllocationMutex=new ko,o.stopForwarding=function(e){return N(o,void 0,void 0,(function(){var t,n,r,o,i,s,a;return T(this,(function(u){switch(u.label){case 0:return[4,e.tunnel.close()];case 1:return u.sent(),t=e.forwardingContext,n=t.projectId,r=t.type,o=t.id,i=t.hostnames,s=t.ipOnly,i.length>0&&!s?[4,this.unregisterHostnames(null===(a=e.tunnel.bindTo)||void 0===a?void 0:a.address,i)]:[3,3];case 2:u.sent(),u.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(e){var t=e.forwardingContext,i=t.type,s=t.id,a=t.projectId;return s===o&&a===n&&i===r})),1),[2]}}))}))},o.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(e=null===process||void 0===process?void 0:process.getuid)||void 0===e?void 0:e.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return c.execSync("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return c.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},o.assertStartedWithNodejs=function(){if(!va)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new uo(t),o}return R(t,e),t.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]}}))}))},t.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(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return o=u.sent(),[4,Promise.all(r.data.services.map((function(e){return 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=u.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=u.sent(),[2,{services:i,addons:s}]}}))}))},t.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]}}))}))},t.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,u,c=this;return T(this,(function(l){switch(l.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,r=e.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return o=l.sent(),i=o.namespace,s=o.targetDomain,a=o.instances,u=o.ports,0===a.length?[2,[]]:[4,ma(u,(function(e){var o,u="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(e.internalPort),l="".concat(r,".").concat(i,".svc.cluster.local"),d=["".concat(r)];e.name&&d.push("".concat(e.name,".").concat(r)),"HTTP"===e.protocol&&(o={altHostnames:d,targetHostname:l});var p=L([l],d,!0);return c.forwardPort(u,e,p,"service",r,n,t,o)}))];case 2:return[2,l.sent()]}}))}))},t.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]}}))}))},t.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,ma((u=i,null!=u&&u.length?qt(u,1/0):[]),(function(e){var i=e.podName,a=e.internalHostname,u=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(u.internalPort),[2,this.forwardPort(e,u,[a],"addon",n,r,t)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},t.prototype.allocateIpAddress=function(e){return 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,co(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=fo(ho(o)+1),ho(this.nextIpAddress)>ho(n)&&(this.nextIpAddress=t),[2,o]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,o,i,s,a){var u;return void 0===s&&(s=!0),N(this,void 0,void 0,(function(){var c,l,d,p,h,f,v=this;return T(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(l=this.canExecuteWithHostnames()).error)throw new Error("".concat(l.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(i,o,r,t,s)];case 1:return d=m.sent(),p="UDP"===t.protocol?new fa(e,c,d):new ha(e,c,a,d),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return 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 h=m.sent(),f={projectId:i,id:o,type:r,hostnames:n,ipOnly:s,port:h.port,address:h.address,protocol:t.protocol,portName:t.name},this.emit("tunnel-open",p,f),p.on("connection-error",(function(e){return v.emit("connection-error",p,f,e)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,f)})),this.connections.push({tunnel:p,forwardingContext:f}),[2,{data:f}]}}))}))},t.prototype.determineSocketAddress=function(e,t,n,r,o){var i;return N(this,void 0,void 0,(function(){var s,a,u;return T(this,(function(c){switch(c.label){case 0:return o&&"darwin"===P.default.platform()?[2,void 0]:(s=this.connections.find((function(r){return r.forwardingContext.projectId===e&&r.forwardingContext.id===t&&r.forwardingContext.type===n})),a=(null===(i=null==s?void 0:s.forwardingContext)||void 0===i?void 0:i.port)!==r.internalPort,s&&a?[2,{address:s.forwardingContext.address,port:r.internalPort}]:(u={},[4,this.allocateIpAddress(r.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=r.internalPort,u)]}}))}))},t.prototype.registerHostnames=function(e,t){return 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]}}))}))},t.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]}}))}))},t.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,Io.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,ga(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,ga(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]}}))}))},t.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]}}))}))},t.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]}}))}))},t.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]}}))}))},t.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]}}))}))},t}(e.EventEmitter),ga=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()}},wa=function(e){function t(t,n,r,o,i,s){void 0===o&&(o=new g.PassThrough),void 0===i&&(i=new g.PassThrough),void 0===s&&(s=new g.PassThrough);var a=e.call(this)||this;return a.baseUrl=t,a.execConfig=n,a.token=r,a.stdOut=o,a.stdErr=i,a.stdIn=s,a.waitForCommandResult=function(){return N(a,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()]}}))}))},a.sendInputToCurrentCommand=function(e){return N(a,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]}))}))},a.resizeTerminal=function(e){return N(a,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]}))}))},a.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},a}return R(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 Hs(a);try{e.duplex=Zo(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=JSON.parse(t.toString());switch(null==o?void 0:o.type){case"init":var i=o.data;"successful"!==i.auth&&u("Command initialization failed: ".concat(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":s=o.data,e.emit("command-result",s),null===(r=e.duplex)||void 0===r||r.end();break;case"stdOut":e.emit("std-out-data",o.data),e.stdOut.write(o.data);break;case"stdErr":e.emit("std-err-data",o.data),e.stdErr.write(o.data);break;case"error":u(o.data);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));u(a)}})),null===(o=e.duplex)||void 0===o||o.on("end",(function(){e.emit("command-completed"),e.reset(),t(s)})),null===(i=e.duplex)||void 0===i||i.on("error",(function(n){e.emit("error",n),e.emit("command-completed"),e.reset(),t(s)}));var u=function(t){e.emit("error",t),e.reset(),n(new Error(t))};e.emit("command-started")})),[2,this.currentCommand]}))}))},t.prototype.initialAuth=function(){var e,t=this.execConfig,n=t.command,r=t.containerName,o=t.shell,i=t.user,s=t.group,a=t.ttyColumns,u=t.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:u}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(c))},t.prototype.reset=function(){var e;this.remote=void 0,this.currentCommand=void 0,null===(e=this.duplex)||void 0===e||e.destroy(),this.duplex=void 0},t}(e.EventEmitter),ja=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!va)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,"service",o=B({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,"service",o=B({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,"job",o=B({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,"job",o=B({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(B({shell:"none"},e)),n=new ba,r=new ba,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 wa(t,e,n)},e}(),_a=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 R(t,e),t}(Error),Sa=va?ao:window.fetch,Ea=function(){if(va)try{return JSON.parse(C.default.readFileSync(I.default.join(I.default.dirname(r.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},Pa=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return N(n,void 0,void 0,(function(){var t,n,r,o,i,s,a,u,c,l,d,p,h=this;return T(this,(function(f){switch(f.label){case 0:if(t=this.method,n={method:t,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return o="".concat(r).concat(this.endpointUrl(e)),i=this.body(e),s=B(B({url:o},n),{body:i}),[4,Ua(o,B(B({},n),{body:i}))];case 1:return[4,(a=f.sent()).text()];case 2:return u=f.sent(),c=function(){if(200!==a.status){var e=null==l?void 0:l.error,t=(null==e?void 0:e.message)||"",n={status:a.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(h.opts.throwErrorOnHttpErrorCode)throw new _a(n);return n}},l=function(){try{return JSON.parse(u)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),d=c(),[2,{data:null==l?void 0:l.data,rawResponse:a,request:s,error:d,pagination:null==l?void 0:l.pagination}]}}))}))},this.contextProvider=e}return e.prototype.getDefaultHeaders=function(){var e,t,n=this.contextProvider.getCurrentToken(),r=(null===(e=this.opts)||void 0===e?void 0:e.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(t=Ea())||void 0===t?void 0:t.version).concat(r)}},e}(),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return R(t,e),t}(Pa),xa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return R(t,e),t}(Pa),Ca=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return R(t,e),t}(Pa),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return R(t,e),t}(Pa),ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return R(t,e),t}(Pa),Ua=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 Sa(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)}))},Oa=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 R(t,e),t}(Aa),Da=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 R(t,e),t}(xa),Ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given project",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId)},t.body=function(){},t}return R(t,e),t}(Aa),Ba=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){return"/v1/projects/".concat(e.parameters.projectId)},t.body=function(){},t}return R(t,e),t}(Ca),Na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of addons belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),La=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ia),Ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return R(t,e),t}(Aa),qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(ka),Fa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return R(t,e),t}(Ca),Ja=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the credentials for connecting to the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/credentials")},t.body=function(){},t}return R(t,e),t}(Aa),Ma=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 R(t,e),t}(Aa),za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the allocated resources for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Wa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the current addon version including available upgrades and upgrade history.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(){},t}return R(t,e),t}(Aa),Va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Upgrades the addon to a new version.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),$a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the network settings for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Ha=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the security rules for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Ya=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of backups for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Initiates a backup for the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return R(t,e),t}(Aa),Xa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a given backup",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return R(t,e),t}(Ca),Qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores the given addon to the given backup state.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restore")},t.body=function(){},t}return R(t,e),t}(xa),eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of restores for the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restores").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Imports a database from an external archive or existing live database.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > Deployment > View Instances",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/containers").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pause")},t.body=function(){},t}return R(t,e),t}(xa),ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resume the given addon if it is paused.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/resume")},t.body=function(){},t}return R(t,e),t}(xa),iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restart the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/restart")},t.body=function(){},t}return R(t,e),t}(xa),su=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the in progress backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort")},t.body=function(){},t}return R(t,e),t}(xa),au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/retain")},t.body=function(){},t}return R(t,e),t}(xa),uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generates a temporary download link for downloading the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/download-link")},t.body=function(){},t}return R(t,e),t}(Aa),cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts an in-progress backup restore.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort-restore")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about an addon's backup schedules",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules/").concat(e.parameters.scheduleId)},t.body=function(){},t}return R(t,e),t}(Ca),hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the valid window for performing a point-in-time restore (PITR) on this addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr-window")},t.body=function(){},t}return R(t,e),t}(Aa),fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores an addon to a specific point in time.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),vu=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 R(t,e),t}(Aa),mu=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 R(t,e),t}(Aa),bu=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 R(t,e),t}(Aa),yu=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 R(t,e),t}(Aa),gu=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 R(t,e),t}(xa),wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return R(t,e),t}(Aa),ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Update",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),_u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given integration. Fails if the integration is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Delete",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return R(t,e),t}(Ca),Su=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 R(t,e),t}(Aa),Eu=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 R(t,e),t}(xa),Pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return R(t,e),t}(Aa),Au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update an existing cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given cluster. Fails if the cluster has associated projects.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Delete",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return R(t,e),t}(Ca),Cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of jobs belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),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"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return R(t,e),t}(Aa),ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return R(t,e),t}(Ca),Uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ia),Du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(ka),Ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ia),Nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(ka),Tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Scale Job",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modify cron job to toggle suspending of its schedule.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pause")},t.body=function(){},t}return R(t,e),t}(xa),qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetches run history for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Starts a new job run for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),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"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return R(t,e),t}(Aa),zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return R(t,e),t}(Ca),Wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates settings for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Vu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(){},t}return R(t,e),t}(Aa),$u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists builds for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given job. Given a commit sha, it will build that commit.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return R(t,e),t}(Aa),Ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job build",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return R(t,e),t}(Ca),Xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets build arguments for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments/details")},t.body=function(){},t}return R(t,e),t}(Aa),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment/details")},t.body=function(){},t}return R(t,e),t}(Aa),sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(){},t}return R(t,e),t}(Aa),ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/containers").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/branches").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pull-requests").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),dc=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 R(t,e),t}(Aa),pc=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 R(t,e),t}(xa),hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return R(t,e),t}(Aa),fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Delete",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return R(t,e),t}(Ca),vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the settings for a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pauses a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/pause")},t.body=function(){},t}return R(t,e),t}(xa),bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes a paused log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/resume")},t.body=function(){},t}return R(t,e),t}(xa),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 R(t,e),t}(Aa),gc=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 R(t,e),t}(xa),wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Views a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read Encrypted",t.endpointUrl=function(e){return"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return R(t,e),t}(Aa),jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Delete",t.endpointUrl=function(e){return"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return R(t,e),t}(Ca),_c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Update",t.endpointUrl=function(e){return"/v1/integrations/registries/".concat(e.parameters.credentialId,"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Sc=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 R(t,e),t}(Aa),Ec=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 R(t,e),t}(xa),Pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return R(t,e),t}(Aa),Ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a domain and each of its registered subdomains.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Delete",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return R(t,e),t}(Ca),xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attempts to verify the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/verify")},t.body=function(){},t}return R(t,e),t}(xa),Cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new subdomain to the domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return R(t,e),t}(Aa),kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from a domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return R(t,e),t}(Ca),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/verify")},t.body=function(){},t}return R(t,e),t}(xa),Oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assigns a service port to the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from its assigned service",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(){},t}return R(t,e),t}(Ca),Rc=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 R(t,e),t}(Aa),Bc=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 R(t,e),t}(Aa),Nc=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 R(t,e),t}(Aa),Tc=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 R(t,e),t}(Aa),Lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists all pipelines for a project",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a pipeline",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId)},t.body=function(){},t}return R(t,e),t}(Aa),qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(){},t}return R(t,e),t}(Aa),Fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists runs of a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return R(t,e),t}(Aa),Wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of secrets belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),$c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ia),Hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(ka),Yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret including its contents",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId).concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(){},t}return R(t,e),t}(Ca),Kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret with details about its linked addons",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/details")},t.body=function(){},t}return R(t,e),t}(Aa),Qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Link an addon to the secret group or edit the settings of the linked addon.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a given addon link.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return R(t,e),t}(Aa),tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unlinks an addon from the secret group.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return R(t,e),t}(Ca),nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of services belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ia),il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/combined/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(ka),sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ia),ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/deployment/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(ka),cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ia),dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/build/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(ka),pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId)},t.body=function(){},t}return R(t,e),t}(Aa),hl=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){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId)},t.body=function(){},t}return R(t,e),t}(Ca),fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Scale Service",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(){},t}return R(t,e),t}(Aa),ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restarts the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/restart")},t.body=function(){},t}return R(t,e),t}(xa),yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pause")},t.body=function(){},t}return R(t,e),t}(xa),gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(){},t}return R(t,e),t}(Aa),jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the list of ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),_l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given build or combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),El=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(){},t}return R(t,e),t}(Aa),Pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the builds for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return R(t,e),t}(Aa),Il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given service build",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return R(t,e),t}(Ca),kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/containers").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/branches").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pull-requests").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Dl=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 R(t,e),t}(Aa),Rl=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 R(t,e),t}(xa),Bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId).concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Update",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId)},t.body=function(){},t}return R(t,e),t}(Ca),Ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Run a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Run",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId,"/runs").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return"/v1/templates/".concat(e.parameters.templateId,"/runs/").concat(e.parameters.templateRunId)},t.body=function(){},t}return R(t,e),t}(Aa),Fl=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 R(t,e),t}(Aa),Jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of branches for the repo",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(e.parameters.vcsService,"/").concat(e.parameters.repositoryOwner,"/").concat(e.parameters.repositoryName,"/branches").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of volumes belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(){},t}return R(t,e),t}(Aa),zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a volume with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Create",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return R(t,e),t}(Aa),Vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update volume mounts and storage size",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),$l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes this volume and its associated data.",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Delete",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return R(t,e),t}(Ca),Hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Detach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),Kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the build arguments for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),Xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments/details")},t.body=function(){},t}return R(t,e),t}(Aa),Ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment").concat(r)},t.body=function(){},t}return R(t,e),t}(Aa),ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(xa),td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment/details")},t.body=function(){},t}return R(t,e),t}(Aa),nd=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=B({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=B(B({},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?B(B({},r),{token:e}):t})),s=B(B({},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=B(B({},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=B(B({},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=B(B({},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=B(B({},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=B(B({},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=B(B({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),rd=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,2,,3]),[4,C.default.promises.mkdir(e,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 3:return[2]}}))}))},n.configPath=t||"".concat(P.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return R(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(C.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,C.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}(nd),od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return R(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}(nd),id=function(e,t){void 0===t&&(t={});var n,r=this;this.baseUrl=function(){return r.contextProvider.getCurrentBaseUrl()},this.contextProvider=e,this.forwarding=new ya(e,new nl(e,t).call,new Na(e,t).call),this.exec=new ja(e),this.endpoints={list:(n={},n.projects=new Oa(e,t),n.addons=new Na(e,t),n.invoices=new vu(e,t),n.providers=new bu(e,t),n.integrations=new yu(e,t),n.clusters=new Su(e,t),n.jobs=new Cu(e,t),n.logSinks=new dc(e,t),n.registries=new yc(e,t),n.domains=new Sc(e,t),n.plans=new Rc(e,t),n.regions=new Bc(e,t),n.vcs=new Tc(e,t),n.pipelines=new Lc(e,t),n.releaseFlowRuns=new Mc(e,t),n.secrets=new Wc(e,t),n.services=new nl(e,t),n.templates=new Dl(e,t),n.templateRuns=new Gl(e,t),n.repos=new Fl(e,t),n.branches=new Jl(e,t),n.volumes=new Ml(e,t),n),create:function(){var n,r={};return r.project=new Da(e,t),r.addon=((n=new Ta(e,t)).backupSchedule=new du(e,t),n),r.integration=new gu(e,t),r.cluster=new Eu(e,t),r.job=function(){var n={};return n.manual=new Uu(e,t),n.cron=new Ru(e,t),n}(),r.logSink=new pc(e,t),r.domain=new Ec(e,t),r.secret=new Vc(e,t),r.service=function(){var n={};return n.combined=new rl(e,t),n.deployment=new sl(e,t),n.build=new cl(e,t),n}(),r.template=new Rl(e,t),r.volume=new zl(e,t),r}(),get:function(){var n,r,o={};return o.project=new Ra(e,t),o.addon=((r=new Ga(e,t)).credentials=new Ja(e,t),r.types=new Ma(e,t),r.version=new Wa(e,t),r.backups=new Ya(e,t),r.backup=((n=new Ka(e,t)).download=new uu(e,t),n),r.restores=new eu(e,t),r.containers=new nu(e,t),r.backupSchedules=new lu(e,t),r.pitrWindow=new hu(e,t),r),o.invoice=function(){var n={};return n.details=new mu(e,t),n}(),o.integration=new wu(e,t),o.cluster=new Pu(e,t),o.job=function(){var n=new Iu(e,t);return n.runs=new Fu(e,t),n.run=new Mu(e,t),n.healthChecks=new Vu(e,t),n.builds=new Hu(e,t),n.build=new Zu(e,t),n.buildArguments=new ec(e,t),n.buildArgumentDetails=new nc(e,t),n.runtimeEnvironment=new rc(e,t),n.runtimeEnvironmentDetails=new ic(e,t),n.deployment=new sc(e,t),n.containers=new uc(e,t),n.branches=new cc(e,t),n.pullRequests=new lc(e,t),n}(),o.logSink=new hc(e,t),o.registry=new wc(e,t),o.domain=new Pc(e,t),o.subdomain=new Ic(e,t),o.dnsId=new Nc(e,t),o.pipeline=new Gc(e,t),o.releaseFlow=new qc(e,t),o.releaseFlowRun=new zc(e,t),o.secret=new Yc(e,t),o.secretDetails=new Xc(e,t),o.secretLink=new el(e,t),o.service=function(){var n=new pl(e,t);return n.deployment=new vl(e,t),n.ports=new wl(e,t),n.healthChecks=new El(e,t),n.builds=new Al(e,t),n.build=new Cl(e,t),n.containers=new kl(e,t),n.branches=new Ul(e,t),n.pullRequests=new Ol(e,t),n.buildArguments=new Zl(e,t),n.buildArgumentDetails=new Xl(e,t),n.runtimeEnvironment=new Ql(e,t),n.runtimeEnvironmentDetails=new td(e,t),n}(),o.template=new Bl(e,t),o.templateRun=new ql(e,t),o.volume=new Wl(e,t),o}(),delete:function(){var n,r={};return r.project=new Ba(e,t),r.addon=((n=new Fa(e,t)).backupSchedule=new pu(e,t),n),r.backup=new Xa(e,t),r.integration=new _u(e,t),r.cluster=new xu(e,t),r.job=new ku(e,t),r.logSink=new fc(e,t),r.registry=new jc(e,t),r.domain=new Ac(e,t),r.subdomain=new kc(e,t),r.secret=new Zc(e,t),r.secretLink=new tl(e,t),r.service=new hl(e,t),r.template=new Tl(e,t),r.volume=new $l(e,t),r}(),put:function(){var n,r={};return r.addon=new La(e,t),r.job=((n={}).manual=new Ou(e,t),n.cron=new Bu(e,t),n),r.secret=new $c(e,t),r.service=function(){var n={};return n.combined=new ol(e,t),n.deployment=new al(e,t),n.build=new ll(e,t),n}(),r}(),patch:function(){var n,r={};return r.addon=new qa(e,t),r.job=((n={}).manual=new Du(e,t),n.cron=new Nu(e,t),n),r.secret=new Hc(e,t),r.service=function(){var n={};return n.combined=new il(e,t),n.deployment=new ul(e,t),n.build=new dl(e,t),n}(),r}(),scale:function(){var n={};return n.addon=new za(e,t),n.job=new Tu(e,t),n.service=new fl(e,t),n}(),update:function(){var n,r={};return r.addon=((n={}).version=new Va(e,t),n.networkSettings=new $a(e,t),n.security=new Ha(e,t),n),r.integration=new ju(e,t),r.cluster=new Au(e,t),r.job=function(){var n={};return n.settings=new Wu(e,t),n.healthChecks=new $u(e,t),n.buildOptions=new Xu(e,t),n.buildSource=new Qu(e,t),n.buildArguments=new tc(e,t),n.runtimeEnvironment=new oc(e,t),n.deployment=new ac(e,t),n}(),r.logSink=new vc(e,t),r.registry=new _c(e,t),r.releaseFlow=new Fc(e,t),r.secret=new Kc(e,t),r.secretLink=new Qc(e,t),r.service=function(){var n={};return n.deployment=new ml(e,t),n.ports=new jl(e,t),n.buildOptions=new _l(e,t),n.buildSource=new Sl(e,t),n.healthChecks=new Pl(e,t),n.buildArguments=new Kl(e,t),n.runtimeEnvironment=new ed(e,t),n}(),r.template=new Nl(e,t),r.volume=new Vl(e,t),r}(),backup:function(){var n={};return n.addon=new Za(e,t),n}(),restore:function(){var n,r={};return r.addon=((n={}).backup=new Qa(e,t),n),r}(),import:function(){var n,r={};return r.addon=((n={}).backup=new tu(e,t),n),r}(),pause:function(){var n={};return n.addon=new ru(e,t),n.job=new Gu(e,t),n.logSink=new mc(e,t),n.service=new yl(e,t),n}(),resume:function(){var n={};return n.addon=new ou(e,t),n.job=new qu(e,t),n.logSink=new bc(e,t),n.service=new gl(e,t),n}(),restart:function(){var n={};return n.addon=new iu(e,t),n.service=new bl(e,t),n}(),abort:function(){var n,r={};return r.addon=((n={}).backup=new su(e,t),n.restore=new cu(e,t),n),r.job=function(){var n={};return n.run=new zu(e,t),n.build=new Ku(e,t),n}(),r.service=function(){var n={};return n.build=new Il(e,t),n}(),r}(),retain:function(){var n,r={};return r.addon=((n={}).backup=new au(e,t),n),r}(),start:function(){var n,r={};return r.addon=((n={}).pitr=new fu(e,t),n),r.job=function(){var n={};return n.run=new Ju(e,t),n.build=new Yu(e,t),n}(),r.service=function(){var n={};return n.build=new xl(e,t),n}(),r}(),suspend:function(){var n={};return n.job=new Lu(e,t),n}(),add:function(){var n,r={};return r.registry=new gc(e,t),r.domain=((n={}).subdomain=new Cc(e,t),n),r}(),verify:function(){var n={};return n.domain=new xc(e,t),n.subdomain=new Uc(e,t),n}(),assign:function(){var n,r={};return r.subdomain=((n={}).service=new Oc(e,t),n),r}(),unassign:function(){var n={};return n.subdomain=new Dc(e,t),n}(),run:function(){var n={};return n.releaseFlow=new Jc(e,t),n.template=new Ll(e,t),n}(),attach:function(){var n={};return n.volume=new Hl(e,t),n}(),detach:function(){var n={};return n.volume=new Yl(e,t),n}()},this.list=function(){var e={};return e.projects=r.endpoints.list.projects.call,e.addons=r.endpoints.list.addons.call,e.invoices=r.endpoints.list.invoices.call,e.providers=r.endpoints.list.providers.call,e.integrations=r.endpoints.list.integrations.call,e.clusters=r.endpoints.list.clusters.call,e.jobs=r.endpoints.list.jobs.call,e.logSinks=r.endpoints.list.logSinks.call,e.registries=r.endpoints.list.registries.call,e.domains=r.endpoints.list.domains.call,e.plans=r.endpoints.list.plans.call,e.regions=r.endpoints.list.regions.call,e.vcs=r.endpoints.list.vcs.call,e.pipelines=r.endpoints.list.pipelines.call,e.releaseFlowRuns=r.endpoints.list.releaseFlowRuns.call,e.secrets=r.endpoints.list.secrets.call,e.services=r.endpoints.list.services.call,e.templates=r.endpoints.list.templates.call,e.templateRuns=r.endpoints.list.templateRuns.call,e.repos=r.endpoints.list.repos.call,e.branches=r.endpoints.list.branches.call,e.volumes=r.endpoints.list.volumes.call,e}(),this.create=function(){var e,t={};return t.project=r.endpoints.create.project.call,t.addon=((e=r.endpoints.create.addon.call).backupSchedule=r.endpoints.create.addon.backupSchedule.call,e),t.integration=r.endpoints.create.integration.call,t.cluster=r.endpoints.create.cluster.call,t.job=function(){var e={};return e.manual=r.endpoints.create.job.manual.call,e.cron=r.endpoints.create.job.cron.call,e}(),t.logSink=r.endpoints.create.logSink.call,t.domain=r.endpoints.create.domain.call,t.secret=r.endpoints.create.secret.call,t.service=function(){var e={};return e.combined=r.endpoints.create.service.combined.call,e.deployment=r.endpoints.create.service.deployment.call,e.build=r.endpoints.create.service.build.call,e}(),t.template=r.endpoints.create.template.call,t.volume=r.endpoints.create.volume.call,t}(),this.get=function(){var e,t,n={};return n.project=r.endpoints.get.project.call,n.addon=((t=r.endpoints.get.addon.call).credentials=r.endpoints.get.addon.credentials.call,t.types=r.endpoints.get.addon.types.call,t.version=r.endpoints.get.addon.version.call,t.backups=r.endpoints.get.addon.backups.call,t.backup=((e=r.endpoints.get.addon.backup.call).download=r.endpoints.get.addon.backup.download.call,e),t.restores=r.endpoints.get.addon.restores.call,t.containers=r.endpoints.get.addon.containers.call,t.backupSchedules=r.endpoints.get.addon.backupSchedules.call,t.pitrWindow=r.endpoints.get.addon.pitrWindow.call,t),n.invoice=function(){var e={};return e.details=r.endpoints.get.invoice.details.call,e}(),n.integration=r.endpoints.get.integration.call,n.cluster=r.endpoints.get.cluster.call,n.job=function(){var e=r.endpoints.get.job.call;return e.runs=r.endpoints.get.job.runs.call,e.run=r.endpoints.get.job.run.call,e.healthChecks=r.endpoints.get.job.healthChecks.call,e.builds=r.endpoints.get.job.builds.call,e.build=r.endpoints.get.job.build.call,e.buildArguments=r.endpoints.get.job.buildArguments.call,e.buildArgumentDetails=r.endpoints.get.job.buildArgumentDetails.call,e.runtimeEnvironment=r.endpoints.get.job.runtimeEnvironment.call,e.runtimeEnvironmentDetails=r.endpoints.get.job.runtimeEnvironmentDetails.call,e.deployment=r.endpoints.get.job.deployment.call,e.containers=r.endpoints.get.job.containers.call,e.branches=r.endpoints.get.job.branches.call,e.pullRequests=r.endpoints.get.job.pullRequests.call,e}(),n.logSink=r.endpoints.get.logSink.call,n.registry=r.endpoints.get.registry.call,n.domain=r.endpoints.get.domain.call,n.subdomain=r.endpoints.get.subdomain.call,n.dnsId=r.endpoints.get.dnsId.call,n.pipeline=r.endpoints.get.pipeline.call,n.releaseFlow=r.endpoints.get.releaseFlow.call,n.releaseFlowRun=r.endpoints.get.releaseFlowRun.call,n.secret=r.endpoints.get.secret.call,n.secretDetails=r.endpoints.get.secretDetails.call,n.secretLink=r.endpoints.get.secretLink.call,n.service=function(){var e=r.endpoints.get.service.call;return e.deployment=r.endpoints.get.service.deployment.call,e.ports=r.endpoints.get.service.ports.call,e.healthChecks=r.endpoints.get.service.healthChecks.call,e.builds=r.endpoints.get.service.builds.call,e.build=r.endpoints.get.service.build.call,e.containers=r.endpoints.get.service.containers.call,e.branches=r.endpoints.get.service.branches.call,e.pullRequests=r.endpoints.get.service.pullRequests.call,e.buildArguments=r.endpoints.get.service.buildArguments.call,e.buildArgumentDetails=r.endpoints.get.service.buildArgumentDetails.call,e.runtimeEnvironment=r.endpoints.get.service.runtimeEnvironment.call,e.runtimeEnvironmentDetails=r.endpoints.get.service.runtimeEnvironmentDetails.call,e}(),n.template=r.endpoints.get.template.call,n.templateRun=r.endpoints.get.templateRun.call,n.volume=r.endpoints.get.volume.call,n}(),this.delete=function(){var e,t={};return t.project=r.endpoints.delete.project.call,t.addon=((e=r.endpoints.delete.addon.call).backupSchedule=r.endpoints.delete.addon.backupSchedule.call,e),t.backup=r.endpoints.delete.backup.call,t.integration=r.endpoints.delete.integration.call,t.cluster=r.endpoints.delete.cluster.call,t.job=r.endpoints.delete.job.call,t.logSink=r.endpoints.delete.logSink.call,t.registry=r.endpoints.delete.registry.call,t.domain=r.endpoints.delete.domain.call,t.subdomain=r.endpoints.delete.subdomain.call,t.secret=r.endpoints.delete.secret.call,t.secretLink=r.endpoints.delete.secretLink.call,t.service=r.endpoints.delete.service.call,t.template=r.endpoints.delete.template.call,t.volume=r.endpoints.delete.volume.call,t}(),this.put=function(){var e,t={};return t.addon=r.endpoints.put.addon.call,t.job=((e={}).manual=r.endpoints.put.job.manual.call,e.cron=r.endpoints.put.job.cron.call,e),t.secret=r.endpoints.put.secret.call,t.service=function(){var e={};return e.combined=r.endpoints.put.service.combined.call,e.deployment=r.endpoints.put.service.deployment.call,e.build=r.endpoints.put.service.build.call,e}(),t}(),this.patch=function(){var e,t={};return t.addon=r.endpoints.patch.addon.call,t.job=((e={}).manual=r.endpoints.patch.job.manual.call,e.cron=r.endpoints.patch.job.cron.call,e),t.secret=r.endpoints.patch.secret.call,t.service=function(){var e={};return e.combined=r.endpoints.patch.service.combined.call,e.deployment=r.endpoints.patch.service.deployment.call,e.build=r.endpoints.patch.service.build.call,e}(),t}(),this.scale=function(){var e={};return e.addon=r.endpoints.scale.addon.call,e.job=r.endpoints.scale.job.call,e.service=r.endpoints.scale.service.call,e}(),this.update=function(){var e,t={};return t.addon=((e={}).version=r.endpoints.update.addon.version.call,e.networkSettings=r.endpoints.update.addon.networkSettings.call,e.security=r.endpoints.update.addon.security.call,e),t.integration=r.endpoints.update.integration.call,t.cluster=r.endpoints.update.cluster.call,t.job=function(){var e={};return e.settings=r.endpoints.update.job.settings.call,e.healthChecks=r.endpoints.update.job.healthChecks.call,e.buildOptions=r.endpoints.update.job.buildOptions.call,e.buildSource=r.endpoints.update.job.buildSource.call,e.buildArguments=r.endpoints.update.job.buildArguments.call,e.runtimeEnvironment=r.endpoints.update.job.runtimeEnvironment.call,e.deployment=r.endpoints.update.job.deployment.call,e}(),t.logSink=r.endpoints.update.logSink.call,t.registry=r.endpoints.update.registry.call,t.releaseFlow=r.endpoints.update.releaseFlow.call,t.secret=r.endpoints.update.secret.call,t.secretLink=r.endpoints.update.secretLink.call,t.service=function(){var e={};return e.deployment=r.endpoints.update.service.deployment.call,e.ports=r.endpoints.update.service.ports.call,e.buildOptions=r.endpoints.update.service.buildOptions.call,e.buildSource=r.endpoints.update.service.buildSource.call,e.healthChecks=r.endpoints.update.service.healthChecks.call,e.buildArguments=r.endpoints.update.service.buildArguments.call,e.runtimeEnvironment=r.endpoints.update.service.runtimeEnvironment.call,e}(),t.template=r.endpoints.update.template.call,t.volume=r.endpoints.update.volume.call,t}(),this.backup=function(){var e={};return e.addon=r.endpoints.backup.addon.call,e}(),this.restore=function(){var e,t={};return t.addon=((e={}).backup=r.endpoints.restore.addon.backup.call,e),t}(),this.import=function(){var e,t={};return t.addon=((e={}).backup=r.endpoints.import.addon.backup.call,e),t}(),this.pause=function(){var e={};return e.addon=r.endpoints.pause.addon.call,e.job=r.endpoints.pause.job.call,e.logSink=r.endpoints.pause.logSink.call,e.service=r.endpoints.pause.service.call,e}(),this.resume=function(){var e={};return e.addon=r.endpoints.resume.addon.call,e.job=r.endpoints.resume.job.call,e.logSink=r.endpoints.resume.logSink.call,e.service=r.endpoints.resume.service.call,e}(),this.restart=function(){var e={};return e.addon=r.endpoints.restart.addon.call,e.service=r.endpoints.restart.service.call,e}(),this.abort=function(){var e,t={};return t.addon=((e={}).backup=r.endpoints.abort.addon.backup.call,e.restore=r.endpoints.abort.addon.restore.call,e),t.job=function(){var e={};return e.run=r.endpoints.abort.job.run.call,e.build=r.endpoints.abort.job.build.call,e}(),t.service=function(){var e={};return e.build=r.endpoints.abort.service.build.call,e}(),t}(),this.retain=function(){var e,t={};return t.addon=((e={}).backup=r.endpoints.retain.addon.backup.call,e),t}(),this.start=function(){var e,t={};return t.addon=((e={}).pitr=r.endpoints.start.addon.pitr.call,e),t.job=function(){var e={};return e.run=r.endpoints.start.job.run.call,e.build=r.endpoints.start.job.build.call,e}(),t.service=function(){var e={};return e.build=r.endpoints.start.service.build.call,e}(),t}(),this.suspend=function(){var e={};return e.job=r.endpoints.suspend.job.call,e}(),this.add=function(){var e,t={};return t.registry=r.endpoints.add.registry.call,t.domain=((e={}).subdomain=r.endpoints.add.domain.subdomain.call,e),t}(),this.verify=function(){var e={};return e.domain=r.endpoints.verify.domain.call,e.subdomain=r.endpoints.verify.subdomain.call,e}(),this.assign=function(){var e,t={};return t.subdomain=((e={}).service=r.endpoints.assign.subdomain.service.call,e),t}(),this.unassign=function(){var e={};return e.subdomain=r.endpoints.unassign.subdomain.call,e}(),this.run=function(){var e={};return e.releaseFlow=r.endpoints.run.releaseFlow.call,e.template=r.endpoints.run.template.call,e}(),this.attach=function(){var e={};return e.volume=r.endpoints.attach.volume.call,e}(),this.detach=function(){var e={};return e.volume=r.endpoints.detach.volume.call,e}()};exports.AbortAddonBackupEndpoint=su,exports.AbortAddonRestoreEndpoint=cu,exports.AbortJobBuildEndpoint=Ku,exports.AbortJobRunEndpoint=zu,exports.AbortServiceBuildEndpoint=Il,exports.AddDomainSubdomainEndpoint=Cc,exports.AddRegistryEndpoint=gc,exports.ApiClient=id,exports.ApiClientContextProvider=nd,exports.ApiClientFileContextProvider=rd,exports.ApiClientInMemoryContextProvider=od,exports.ApiEndpoint=Pa,exports.AssignSubdomainServiceEndpoint=Oc,exports.AttachVolumeEndpoint=Hl,exports.BackupAddonEndpoint=Za,exports.CreateAddonBackupscheduleEndpoint=du,exports.CreateAddonEndpoint=Ta,exports.CreateClusterEndpoint=Eu,exports.CreateDomainEndpoint=Ec,exports.CreateIntegrationEndpoint=gu,exports.CreateJobCronEndpoint=Ru,exports.CreateJobManualEndpoint=Uu,exports.CreateLogsinkEndpoint=pc,exports.CreateProjectEndpoint=Da,exports.CreateSecretEndpoint=Vc,exports.CreateServiceBuildEndpoint=cl,exports.CreateServiceCombinedEndpoint=rl,exports.CreateServiceDeploymentEndpoint=sl,exports.CreateTemplateEndpoint=Rl,exports.CreateVolumeEndpoint=zl,exports.DeleteAddonBackupscheduleEndpoint=pu,exports.DeleteAddonEndpoint=Fa,exports.DeleteApiEndpoint=Ca,exports.DeleteBackupEndpoint=Xa,exports.DeleteClusterEndpoint=xu,exports.DeleteDomainEndpoint=Ac,exports.DeleteIntegrationEndpoint=_u,exports.DeleteJobEndpoint=ku,exports.DeleteLogsinkEndpoint=fc,exports.DeleteProjectEndpoint=Ba,exports.DeleteRegistryEndpoint=jc,exports.DeleteSecretEndpoint=Zc,exports.DeleteSecretlinkEndpoint=tl,exports.DeleteServiceEndpoint=hl,exports.DeleteSubdomainEndpoint=kc,exports.DeleteTemplateEndpoint=Tl,exports.DeleteVolumeEndpoint=$l,exports.DetachVolumeEndpoint=Yl,exports.ExecCommandStandard=wa,exports.GetAddonBackupDownloadEndpoint=uu,exports.GetAddonBackupEndpoint=Ka,exports.GetAddonBackupsEndpoint=Ya,exports.GetAddonBackupschedulesEndpoint=lu,exports.GetAddonContainersEndpoint=nu,exports.GetAddonCredentialsEndpoint=Ja,exports.GetAddonEndpoint=Ga,exports.GetAddonPitrwindowEndpoint=hu,exports.GetAddonRestoresEndpoint=eu,exports.GetAddonTypesEndpoint=Ma,exports.GetAddonVersionEndpoint=Wa,exports.GetApiEndpoint=Aa,exports.GetClusterEndpoint=Pu,exports.GetDnsidEndpoint=Nc,exports.GetDomainEndpoint=Pc,exports.GetIntegrationEndpoint=wu,exports.GetInvoiceDetailsEndpoint=mu,exports.GetJobBranchesEndpoint=cc,exports.GetJobBuildEndpoint=Zu,exports.GetJobBuildargumentdetailsEndpoint=nc,exports.GetJobBuildargumentsEndpoint=ec,exports.GetJobBuildsEndpoint=Hu,exports.GetJobContainersEndpoint=uc,exports.GetJobDeploymentEndpoint=sc,exports.GetJobEndpoint=Iu,exports.GetJobHealthchecksEndpoint=Vu,exports.GetJobPullrequestsEndpoint=lc,exports.GetJobRunEndpoint=Mu,exports.GetJobRunsEndpoint=Fu,exports.GetJobRuntimeenvironmentEndpoint=rc,exports.GetJobRuntimeenvironmentdetailsEndpoint=ic,exports.GetLogsinkEndpoint=hc,exports.GetPipelineEndpoint=Gc,exports.GetProjectEndpoint=Ra,exports.GetRegistryEndpoint=wc,exports.GetReleaseflowEndpoint=qc,exports.GetReleaseflowrunEndpoint=zc,exports.GetSecretEndpoint=Yc,exports.GetSecretdetailsEndpoint=Xc,exports.GetSecretlinkEndpoint=el,exports.GetServiceBranchesEndpoint=Ul,exports.GetServiceBuildEndpoint=Cl,exports.GetServiceBuildargumentdetailsEndpoint=Xl,exports.GetServiceBuildargumentsEndpoint=Zl,exports.GetServiceBuildsEndpoint=Al,exports.GetServiceContainersEndpoint=kl,exports.GetServiceDeploymentEndpoint=vl,exports.GetServiceEndpoint=pl,exports.GetServiceHealthchecksEndpoint=El,exports.GetServicePortsEndpoint=wl,exports.GetServicePullrequestsEndpoint=Ol,exports.GetServiceRuntimeenvironmentEndpoint=Ql,exports.GetServiceRuntimeenvironmentdetailsEndpoint=td,exports.GetSubdomainEndpoint=Ic,exports.GetTemplateEndpoint=Bl,exports.GetTemplaterunEndpoint=ql,exports.GetVolumeEndpoint=Wl,exports.ImportAddonBackupEndpoint=tu,exports.ListAddonsEndpoint=Na,exports.ListBranchesEndpoint=Jl,exports.ListClustersEndpoint=Su,exports.ListDomainsEndpoint=Sc,exports.ListIntegrationsEndpoint=yu,exports.ListInvoicesEndpoint=vu,exports.ListJobsEndpoint=Cu,exports.ListLogsinksEndpoint=dc,exports.ListPipelinesEndpoint=Lc,exports.ListPlansEndpoint=Rc,exports.ListProjectsEndpoint=Oa,exports.ListProvidersEndpoint=bu,exports.ListRegionsEndpoint=Bc,exports.ListRegistriesEndpoint=yc,exports.ListReleaseflowrunsEndpoint=Mc,exports.ListReposEndpoint=Fl,exports.ListSecretsEndpoint=Wc,exports.ListServicesEndpoint=nl,exports.ListTemplaterunsEndpoint=Gl,exports.ListTemplatesEndpoint=Dl,exports.ListVcsEndpoint=Tc,exports.ListVolumesEndpoint=Ml,exports.NorthflankApiCallError=_a,exports.NorthflankExecCommand=ja,exports.NorthflankPortForwarder=ya,exports.PatchAddonEndpoint=qa,exports.PatchApiEndpoint=ka,exports.PatchJobCronEndpoint=Nu,exports.PatchJobManualEndpoint=Du,exports.PatchSecretEndpoint=Hc,exports.PatchServiceBuildEndpoint=dl,exports.PatchServiceCombinedEndpoint=il,exports.PatchServiceDeploymentEndpoint=ul,exports.PauseAddonEndpoint=ru,exports.PauseJobEndpoint=Gu,exports.PauseLogsinkEndpoint=mc,exports.PauseServiceEndpoint=yl,exports.PostApiEndpoint=xa,exports.PutAddonEndpoint=La,exports.PutApiEndpoint=Ia,exports.PutJobCronEndpoint=Bu,exports.PutJobManualEndpoint=Ou,exports.PutSecretEndpoint=$c,exports.PutServiceBuildEndpoint=ll,exports.PutServiceCombinedEndpoint=ol,exports.PutServiceDeploymentEndpoint=al,exports.RestartAddonEndpoint=iu,exports.RestartServiceEndpoint=bl,exports.RestoreAddonBackupEndpoint=Qa,exports.ResumeAddonEndpoint=ou,exports.ResumeJobEndpoint=qu,exports.ResumeLogsinkEndpoint=bc,exports.ResumeServiceEndpoint=gl,exports.RetainAddonBackupEndpoint=au,exports.RunReleaseflowEndpoint=Jc,exports.RunTemplateEndpoint=Ll,exports.ScaleAddonEndpoint=za,exports.ScaleJobEndpoint=Tu,exports.ScaleServiceEndpoint=fl,exports.StartAddonPitrEndpoint=fu,exports.StartJobBuildEndpoint=Yu,exports.StartJobRunEndpoint=Ju,exports.StartServiceBuildEndpoint=xl,exports.SuspendJobEndpoint=Lu,exports.UnassignSubdomainEndpoint=Dc,exports.UpdateAddonNetworksettingsEndpoint=$a,exports.UpdateAddonSecurityEndpoint=Ha,exports.UpdateAddonVersionEndpoint=Va,exports.UpdateClusterEndpoint=Au,exports.UpdateIntegrationEndpoint=ju,exports.UpdateJobBuildargumentsEndpoint=tc,exports.UpdateJobBuildoptionsEndpoint=Xu,exports.UpdateJobBuildsourceEndpoint=Qu,exports.UpdateJobDeploymentEndpoint=ac,exports.UpdateJobHealthchecksEndpoint=$u,exports.UpdateJobRuntimeenvironmentEndpoint=oc,exports.UpdateJobSettingsEndpoint=Wu,exports.UpdateLogsinkEndpoint=vc,exports.UpdateRegistryEndpoint=_c,exports.UpdateReleaseflowEndpoint=Fc,exports.UpdateSecretEndpoint=Kc,exports.UpdateSecretlinkEndpoint=Qc,exports.UpdateServiceBuildargumentsEndpoint=Kl,exports.UpdateServiceBuildoptionsEndpoint=_l,exports.UpdateServiceBuildsourceEndpoint=Sl,exports.UpdateServiceDeploymentEndpoint=ml,exports.UpdateServiceHealthchecksEndpoint=Pl,exports.UpdateServicePortsEndpoint=jl,exports.UpdateServiceRuntimeenvironmentEndpoint=ed,exports.UpdateTemplateEndpoint=Nl,exports.UpdateVolumeEndpoint=Vl,exports.VerifyDomainEndpoint=xc,exports.VerifySubdomainEndpoint=Uc;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("events"),e=require("stream"),n=require("http"),r=require("url"),o=require("punycode"),i=require("https"),s=require("zlib"),a=require("os"),u=require("net"),c=require("child_process"),d=require("fs"),l=require("path"),p=require("buffer"),h=require("tls"),f=require("crypto"),v=require("dgram");function m(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function b(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 y=m(t),g=m(e),w=b(e),j=m(n),_=m(r),S=m(o),E=m(i),P=m(s),A=m(a),x=m(u),I=b(u),C=m(d),k=m(l),U=m(p),O=m(h),D=m(f),R=m(v),T=function(t,e){return T=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])},T(t,e)};function B(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}T(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var N=function(){return N=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},N.apply(this,arguments)};function L(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}function q(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}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,u])}}}function G(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))}var F="object"==typeof global&&global&&global.Object===Object&&global,J="object"==typeof self&&self&&self.Object===Object&&self,M=F||J||Function("return this")(),z=M.Symbol,W=Object.prototype,V=W.hasOwnProperty,$=W.toString,H=z?z.toStringTag:void 0;var Y=Object.prototype.toString;var Z="[object Null]",K="[object Undefined]",X=z?z.toStringTag:void 0;function Q(t){return null==t?void 0===t?K:Z:X&&X in Object(t)?function(t){var e=V.call(t,H),n=t[H];try{t[H]=void 0;var r=!0}catch(t){}var o=$.call(t);return r&&(e?t[H]=n:delete t[H]),o}(t):function(t){return Y.call(t)}(t)}function tt(t){return null!=t&&"object"==typeof t}var et="[object Symbol]";function nt(t){return"symbol"==typeof t||tt(t)&&Q(t)==et}function rt(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 ot=Array.isArray,it=1/0,st=z?z.prototype:void 0,at=st?st.toString:void 0;function ut(t){if("string"==typeof t)return t;if(ot(t))return rt(t,ut)+"";if(nt(t))return at?at.call(t):"";var e=t+"";return"0"==e&&1/t==-it?"-0":e}function ct(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function dt(t){return t}var lt="[object AsyncFunction]",pt="[object Function]",ht="[object GeneratorFunction]",ft="[object Proxy]";function vt(t){if(!ct(t))return!1;var e=Q(t);return e==pt||e==ht||e==lt||e==ft}var mt,bt=M["__core-js_shared__"],yt=(mt=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||""))?"Symbol(src)_1."+mt:"";var gt=Function.prototype.toString;function wt(t){if(null!=t){try{return gt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var jt=/^\[object .+?Constructor\]$/,_t=Function.prototype,St=Object.prototype,Et=_t.toString,Pt=St.hasOwnProperty,At=RegExp("^"+Et.call(Pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xt(t){return!(!ct(t)||(e=t,yt&&yt in e))&&(vt(t)?At:jt).test(wt(t));var e}function It(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return xt(n)?n:void 0}var Ct=It(M,"WeakMap"),kt=Object.create,Ut=function(){function t(){}return function(e){if(!ct(e))return{};if(kt)return kt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var Ot=800,Dt=16,Rt=Date.now;var Tt,Bt,Nt,Lt=function(){try{var t=It(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),qt=Lt,Gt=qt?function(t,e){return qt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:dt,Ft=(Tt=Gt,Bt=0,Nt=0,function(){var t=Rt(),e=Dt-(t-Nt);if(Nt=t,e>0){if(++Bt>=Ot)return arguments[0]}else Bt=0;return Tt.apply(void 0,arguments)}),Jt=9007199254740991,Mt=/^(?:0|[1-9]\d*)$/;function zt(t,e){var n=typeof t;return!!(e=null==e?Jt:e)&&("number"==n||"symbol"!=n&&Mt.test(t))&&t>-1&&t%1==0&&t<e}function Wt(t,e,n){"__proto__"==e&&qt?qt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Vt(t,e){return t===e||t!=t&&e!=e}var $t=Object.prototype.hasOwnProperty;function Ht(t,e,n){var r=t[e];$t.call(t,e)&&Vt(r,n)&&(void 0!==n||e in t)||Wt(t,e,n)}var Yt=Math.max;function Zt(t,e){return Ft(function(t,e,n){return e=Yt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Yt(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,dt),t+"")}var Kt=9007199254740991;function Xt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Kt}function Qt(t){return null!=t&&Xt(t.length)&&!vt(t)}var te=Object.prototype;function ee(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||te)}var ne="[object Arguments]";function re(t){return tt(t)&&Q(t)==ne}var oe=Object.prototype,ie=oe.hasOwnProperty,se=oe.propertyIsEnumerable,ae=re(function(){return arguments}())?re:function(t){return tt(t)&&ie.call(t,"callee")&&!se.call(t,"callee")};var ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,ce=ue&&"object"==typeof module&&module&&!module.nodeType&&module,de=ce&&ce.exports===ue?M.Buffer:void 0,le=(de?de.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 he="object"==typeof exports&&exports&&!exports.nodeType&&exports,fe=he&&"object"==typeof module&&module&&!module.nodeType&&module,ve=fe&&fe.exports===he&&F.process,me=function(){try{var t=fe&&fe.require&&fe.require("util").types;return t||ve&&ve.binding&&ve.binding("util")}catch(t){}}(),be=me&&me.isTypedArray,ye=be?function(t){return function(e){return t(e)}}(be):function(t){return tt(t)&&Xt(t.length)&&!!pe[Q(t)]},ge=ye,we=Object.prototype.hasOwnProperty;function je(t,e){var n=ot(t),r=!n&&ae(t),o=!n&&!r&&le(t),i=!n&&!r&&!o&&ge(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):[],u=a.length;for(var c in t)!e&&!we.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||zt(c,u))||a.push(c);return a}function _e(t,e){return function(n){return t(e(n))}}var Se=_e(Object.keys,Object),Ee=Object.prototype.hasOwnProperty;function Pe(t){return Qt(t)?je(t):function(t){if(!ee(t))return Se(t);var e=[];for(var n in Object(t))Ee.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Ae=Object.prototype.hasOwnProperty;function xe(t){if(!ct(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=ee(t),n=[];for(var r in t)("constructor"!=r||!e&&Ae.call(t,r))&&n.push(r);return n}function Ie(t){return Qt(t)?je(t,!0):xe(t)}var Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ke=/^\w*$/;function Ue(t,e){if(ot(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!nt(t))||(ke.test(t)||!Ce.test(t)||null!=e&&t in Object(e))}var Oe=It(Object,"create");var De="__lodash_hash_undefined__",Re=Object.prototype.hasOwnProperty;var Te=Object.prototype.hasOwnProperty;var Be="__lodash_hash_undefined__";function Ne(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 Le(t,e){for(var n=t.length;n--;)if(Vt(t[n][0],e))return n;return-1}Ne.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},Ne.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ne.prototype.get=function(t){var e=this.__data__;if(Oe){var n=e[t];return n===De?void 0:n}return Re.call(e,t)?e[t]:void 0},Ne.prototype.has=function(t){var e=this.__data__;return Oe?void 0!==e[t]:Te.call(e,t)},Ne.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Oe&&void 0===e?Be:e,this};var qe=Array.prototype.splice;function Ge(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])}}Ge.prototype.clear=function(){this.__data__=[],this.size=0},Ge.prototype.delete=function(t){var e=this.__data__,n=Le(e,t);return!(n<0)&&(n==e.length-1?e.pop():qe.call(e,n,1),--this.size,!0)},Ge.prototype.get=function(t){var e=this.__data__,n=Le(e,t);return n<0?void 0:e[n][1]},Ge.prototype.has=function(t){return Le(this.__data__,t)>-1},Ge.prototype.set=function(t,e){var n=this.__data__,r=Le(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Fe=It(M,"Map");function Je(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 Ne,map:new(Fe||Ge),string:new Ne}},Me.prototype.delete=function(t){var e=Je(this,t).delete(t);return this.size-=e?1:0,e},Me.prototype.get=function(t){return Je(this,t).get(t)},Me.prototype.has=function(t){return Je(this,t).has(t)},Me.prototype.set=function(t,e){var n=Je(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var ze="Expected a function";function We(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(ze);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(We.Cache||Me),n}We.Cache=Me;var Ve=500;var $e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,He=/\\(\\)?/g,Ye=function(t){var e=We(t,(function(t){return n.size===Ve&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace($e,(function(t,n,r,o){e.push(r?o.replace(He,"$1"):n||t)})),e})),Ze=Ye;function Ke(t){return null==t?"":ut(t)}function Xe(t,e){return ot(t)?t:Ue(t,e)?[t]:Ze(Ke(t))}var Qe=1/0;function tn(t){if("string"==typeof t||nt(t))return t;var e=t+"";return"0"==e&&1/t==-Qe?"-0":e}function en(t,e){for(var n=0,r=(e=Xe(e,t)).length;null!=t&&n<r;)t=t[tn(e[n++])];return n&&n==r?t:void 0}function nn(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}var rn=z?z.isConcatSpreadable:void 0;function on(t){return ot(t)||ae(t)||!!(rn&&t&&t[rn])}function sn(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=on),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?sn(a,e-1,n,r,o):nn(o,a):r||(o[o.length]=a)}return o}var an=_e(Object.getPrototypeOf,Object),un="[object Object]",cn=Function.prototype,dn=Object.prototype,ln=cn.toString,pn=dn.hasOwnProperty,hn=ln.call(Object);var fn=200;function vn(t){var e=this.__data__=new Ge(t);this.size=e.size}vn.prototype.clear=function(){this.__data__=new Ge,this.size=0},vn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},vn.prototype.get=function(t){return this.__data__.get(t)},vn.prototype.has=function(t){return this.__data__.has(t)},vn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ge){var r=n.__data__;if(!Fe||r.length<fn-1)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 mn="object"==typeof exports&&exports&&!exports.nodeType&&exports,bn=mn&&"object"==typeof module&&module&&!module.nodeType&&module,yn=bn&&bn.exports===mn?M.Buffer:void 0,gn=yn?yn.allocUnsafe:void 0;var wn=Object.prototype.propertyIsEnumerable,jn=Object.getOwnPropertySymbols,_n=jn?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}(jn(t),(function(e){return wn.call(t,e)})))}:function(){return[]};function Sn(t){return function(t,e,n){var r=e(t);return ot(t)?r:nn(r,n(t))}(t,Pe,_n)}var En=It(M,"DataView"),Pn=It(M,"Promise"),An=It(M,"Set"),xn="[object Map]",In="[object Promise]",Cn="[object Set]",kn="[object WeakMap]",Un="[object DataView]",On=wt(En),Dn=wt(Fe),Rn=wt(Pn),Tn=wt(An),Bn=wt(Ct),Nn=Q;(En&&Nn(new En(new ArrayBuffer(1)))!=Un||Fe&&Nn(new Fe)!=xn||Pn&&Nn(Pn.resolve())!=In||An&&Nn(new An)!=Cn||Ct&&Nn(new Ct)!=kn)&&(Nn=function(t){var e=Q(t),n="[object Object]"==e?t.constructor:void 0,r=n?wt(n):"";if(r)switch(r){case On:return Un;case Dn:return xn;case Rn:return In;case Tn:return Cn;case Bn:return kn}return e});var Ln=Nn,qn=M.Uint8Array;function Gn(t,e){var n,r,o=e?(n=t.buffer,r=new n.constructor(n.byteLength),new qn(r).set(new qn(n)),r):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Fn="__lodash_hash_undefined__";function Jn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Me;++e<n;)this.add(t[e])}function Mn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}Jn.prototype.add=Jn.prototype.push=function(t){return this.__data__.set(t,Fn),this},Jn.prototype.has=function(t){return this.__data__.has(t)};var zn=1,Wn=2;function Vn(t,e,n,r,o,i){var s=n&zn,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var c=i.get(t),d=i.get(e);if(c&&d)return c==e&&d==t;var l=-1,p=!0,h=n&Wn?new Jn:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var f=t[l],v=e[l];if(r)var m=s?r(v,f,l,e,t,i):r(f,v,l,t,e,i);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!Mn(e,(function(t,e){if(s=e,!h.has(s)&&(f===t||o(f,t,n,r,i)))return h.push(e);var s}))){p=!1;break}}else if(f!==v&&!o(f,v,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p}function $n(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Hn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Yn=1,Zn=2,Kn="[object Boolean]",Xn="[object Date]",Qn="[object Error]",tr="[object Map]",er="[object Number]",nr="[object RegExp]",rr="[object Set]",or="[object String]",ir="[object Symbol]",sr="[object ArrayBuffer]",ar="[object DataView]",ur=z?z.prototype:void 0,cr=ur?ur.valueOf:void 0;var dr=1,lr=Object.prototype.hasOwnProperty;var pr=1,hr="[object Arguments]",fr="[object Array]",vr="[object Object]",mr=Object.prototype.hasOwnProperty;function br(t,e,n,r,o,i){var s=ot(t),a=ot(e),u=s?fr:Ln(t),c=a?fr:Ln(e),d=(u=u==hr?vr:u)==vr,l=(c=c==hr?vr:c)==vr,p=u==c;if(p&&le(t)){if(!le(e))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new vn),s||ge(t)?Vn(t,e,n,r,o,i):function(t,e,n,r,o,i,s){switch(n){case ar:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case sr:return!(t.byteLength!=e.byteLength||!i(new qn(t),new qn(e)));case Kn:case Xn:case er:return Vt(+t,+e);case Qn:return t.name==e.name&&t.message==e.message;case nr:case or:return t==e+"";case tr:var a=$n;case rr:var u=r&Yn;if(a||(a=Hn),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=Zn,s.set(t,e);var d=Vn(a(t),a(e),r,o,i,s);return s.delete(t),d;case ir:if(cr)return cr.call(t)==cr.call(e)}return!1}(t,e,u,n,r,o,i);if(!(n&pr)){var h=d&&mr.call(t,"__wrapped__"),f=l&&mr.call(e,"__wrapped__");if(h||f){var v=h?t.value():t,m=f?e.value():e;return i||(i=new vn),o(v,m,n,r,i)}}return!!p&&(i||(i=new vn),function(t,e,n,r,o,i){var s=n&dr,a=Sn(t),u=a.length;if(u!=Sn(e).length&&!s)return!1;for(var c=u;c--;){var d=a[c];if(!(s?d in e:lr.call(e,d)))return!1}var l=i.get(t),p=i.get(e);if(l&&p)return l==e&&p==t;var h=!0;i.set(t,e),i.set(e,t);for(var f=s;++c<u;){var v=t[d=a[c]],m=e[d];if(r)var b=s?r(m,v,d,e,t,i):r(v,m,d,t,e,i);if(!(void 0===b?v===m||o(v,m,n,r,i):b)){h=!1;break}f||(f="constructor"==d)}if(h&&!f){var y=t.constructor,g=e.constructor;y==g||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(h=!1)}return i.delete(t),i.delete(e),h}(t,e,n,r,o,i))}function yr(t,e,n,r,o){return t===e||(null==t||null==e||!tt(t)&&!tt(e)?t!=t&&e!=e:br(t,e,n,r,yr,o))}var gr=1,wr=2;function jr(t){return t==t&&!ct(t)}function _r(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Sr(t){var e=function(t){for(var e=Pe(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,jr(o)]}return e}(t);return 1==e.length&&e[0][2]?_r(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 u=(a=n[o])[0],c=t[u],d=a[1];if(s&&a[2]){if(void 0===c&&!(u in t))return!1}else{var l=new vn;if(r)var p=r(c,d,u,t,e,l);if(!(void 0===p?yr(d,c,gr|wr,r,l):p))return!1}}return!0}(n,t,e)}}function Er(t,e){return null!=t&&e in Object(t)}function Pr(t,e){return null!=t&&function(t,e,n){for(var r=-1,o=(e=Xe(e,t)).length,i=!1;++r<o;){var s=tn(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Xt(o)&&zt(s,o)&&(ot(t)||ae(t))}(t,e,Er)}var Ar=1,xr=2;function Ir(t,e){return Ue(t)&&jr(e)?_r(tn(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:en(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Pr(n,t):yr(e,r,Ar|xr)}}function Cr(t){return Ue(t)?(e=tn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return en(e,t)}}(t);var e}function kr(t){return"function"==typeof t?t:null==t?dt:"object"==typeof t?ot(t)?Ir(t[0],t[1]):Sr(t):Cr(t)}var Ur,Or=function(t,e,n){for(var r=-1,o=Object(t),i=n(t),s=i.length;s--;){var a=i[Ur?s:++r];if(!1===e(o[a],a,o))break}return t};var Dr=function(t,e){return function(n,r){if(null==n)return n;if(!Qt(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,Pe)})),Rr=Dr;function Tr(t,e,n){(void 0!==n&&!Vt(t[e],n)||void 0===n&&!(e in t))&&Wt(t,e,n)}function Br(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Nr(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],u=r?r(n[a],t[a],a,n,t):void 0;void 0===u&&(u=t[a]),o?Wt(n,a,u):Ht(n,a,u)}return n}(t,Ie(t))}function Lr(t,e,n,r,o,i,s){var a=Br(t,n),u=Br(e,n),c=s.get(u);if(c)Tr(t,n,c);else{var d,l=i?i(a,u,n+"",t,e,s):void 0,p=void 0===l;if(p){var h=ot(u),f=!h&&le(u),v=!h&&!f&&ge(u);l=u,h||f||v?ot(a)?l=a:tt(d=a)&&Qt(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?(p=!1,l=function(t,e){if(e)return t.slice();var n=t.length,r=gn?gn(n):new t.constructor(n);return t.copy(r),r}(u,!0)):v?(p=!1,l=Gn(u,!0)):l=[]:function(t){if(!tt(t)||Q(t)!=un)return!1;var e=an(t);if(null===e)return!0;var n=pn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ln.call(n)==hn}(u)||ae(u)?(l=a,ae(a)?l=Nr(a):ct(a)&&!vt(a)||(l=function(t){return"function"!=typeof t.constructor||ee(t)?{}:Ut(an(t))}(u))):p=!1}p&&(s.set(u,l),o(l,u,r,i,s),s.delete(u)),Tr(t,n,l)}}function qr(t,e,n,r,o){t!==e&&Or(e,(function(i,s){if(o||(o=new vn),ct(i))Lr(t,e,s,n,qr,r,o);else{var a=r?r(Br(t,s),i,s+"",t,e,o):void 0;void 0===a&&(a=i),Tr(t,s,a)}}),Ie)}var Gr=/[\\^$.*+?()[\]{}|]/g,Fr=RegExp(Gr.source);function Jr(t,e){var n=-1,r=Qt(t)?Array(t.length):[];return Rr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Mr(t,e){return sn(function(t,e){return(ot(t)?rt:Jr)(t,kr(e))}(t,e),1)}var zr=1/0;function Wr(t,e){return t>e}var Vr="[object String]";function $r(t){return"string"==typeof t||!ot(t)&&tt(t)&&Q(t)==Vr}var Hr="[object Number]";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&&!nt(s):n(s,a)))var a=s,u=i}return u}(t,kr(e),Wr):void 0}var Zr,Kr=(Zr=function(t,e,n){qr(t,e,n)},Zt((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=Zr.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!ct(n))return!1;var r=typeof e;return!!("number"==r?Qt(n)&&zt(e,n.length):"string"==r&&e in n)&&Vt(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&&Zr(t,s,n,o)}return t})));function Xr(t,e){return t(e={exports:{}},e.exports),e.exports}var Qr={},to=Qr;function eo(t){return t<0?-1:1}function no(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=eo(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&&0==(1&t)?Math.floor(t):Math.round(t)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=eo(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}}Qr.void=function(){},Qr.boolean=function(t){return!!t},Qr.byte=no(8,{unsigned:!1}),Qr.octet=no(8,{unsigned:!0}),Qr.short=no(16,{unsigned:!1}),Qr["unsigned short"]=no(16,{unsigned:!0}),Qr.long=no(32,{unsigned:!1}),Qr["unsigned long"]=no(32,{unsigned:!0}),Qr["long long"]=no(32,{unsigned:!1,moduloBitLength:64}),Qr["unsigned long long"]=no(32,{unsigned:!0,moduloBitLength:64}),Qr.double=function(t){const e=+t;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},Qr["unrestricted double"]=function(t){const e=+t;if(isNaN(e))throw new TypeError("Argument is NaN");return e},Qr.float=Qr.double,Qr["unrestricted float"]=Qr["unrestricted double"],Qr.DOMString=function(t,e){return e||(e={}),e.treatNullAsEmptyString&&null===t?"":String(t)},Qr.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},Qr.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("")},Qr.Date=function(t,e){if(!(t instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(t))return t},Qr.RegExp=function(t,e){return t instanceof RegExp||(t=new RegExp(t)),t};var ro=Xr((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]}}));ro.mixin,ro.wrapperSymbol,ro.implSymbol,ro.wrapperForImpl,ro.implForWrapper;var oo,io=(oo=Object.freeze({__proto__:null}))&&oo.default||oo,so={TRANSITIONAL:0,NONTRANSITIONAL:1};function ao(t){return t.split("\0").map((function(t){return t.normalize("NFC")})).join("\0")}function uo(t){for(var e=0,n=io.length-1;e<=n;){var r=Math.floor((e+n)/2),o=io[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 co=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function lo(t){return t.replace(co,"_").length}var po=/[\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 ho(t,e){"xn--"===t.substr(0,4)&&(t=S.default.toUnicode(t));var n=!1;(ao(t)!==t||"-"===t[3]&&"-"===t[4]||"-"===t[0]||"-"===t[t.length-1]||-1!==t.indexOf(".")||0===t.search(po))&&(n=!0);for(var r=lo(t),o=0;o<r;++o){var i=uo(t.codePointAt(o));if(fo===so.TRANSITIONAL&&"valid"!==i[1]||fo===so.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:t,error:n}}function fo(t,e,n){var r=function(t,e,n){for(var r=!1,o="",i=lo(t),s=0;s<i;++s){var a=t.codePointAt(s),u=uo(a);switch(u[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":n===so.TRANSITIONAL?o+=String.fromCodePoint.apply(String,u[2]):o+=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,u[2]);break;case"disallowed_STD3_valid":e&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(t,e,n);r.string=ao(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=ho(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 vo={toASCII:function(t,e,n,r){var o=fo(t,e,n),i=o.string.split(".");if(i=i.map((function(t){try{return S.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=fo(t,e,so.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:so},mo=Xr((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 S.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 u(t){return"."===t||"%2e"===t.toLowerCase()}function c(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 p(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function h(t){return t<=31||t>126}const f=new Set([32,34,35,60,62,63,96,123,125]);function v(t){return h(t)||f.has(t)}const m=new Set([47,58,59,61,64,91,92,93,94,124]);function b(t){return v(t)||m.has(t)}function y(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+=p(e[t]);return n}(n):n}function g(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,u=0;if(58===(t=S.default.ucs2.decode(t))[u]){if(58!==t[u+1])return n;u+=2,++r,s=r}for(;u<t.length;){if(8===r)return n;if(58===t[u]){if(null!==s)return n;++u,++r,s=r;continue}let c=0,d=0;for(;d<4&&a(t[u]);)c=16*c+parseInt(o(t,u),16),++u,++d;if(46===t[u]){if(0===d)return n;if(u-=d,r>6)return n;let s=0;for(;void 0!==t[u];){let a=null;if(s>0){if(!(46===t[u]&&s<4))return n;++u}if(!i(t[u]))return n;for(;i(t[u]);){const e=parseInt(o(t,u));if(null===a)a=e;else{if(0===a)return n;a=10*a+e}if(a>255)return n;++u}e[r]=256*e[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===t[u]){if(++u,void 0===t[u])return n}else if(void 0!==t[u])return n;e[r]=c,++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=S.default.ucs2.decode(t);for(let t=0;t<o.length;++t)r+=y(o[t],h);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=vo.toASCII(r,!1,vo.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const u=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=g(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 u||u===n?u:s}function j(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 _(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 E(t){return""!==t.username||""!==t.password}function P(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=S.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}}}P.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},P.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((E(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},P.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)},P.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},P.prototype["parse path or authority"]=function(t){return 47===t?this.state="authority":(this.state="path",--this.pointer),!0},P.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},P.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},P.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},P.prototype["parse special authority ignore slashes"]=function(t){return 47!==t&&92!==t?(this.state="authority",--this.pointer):this.parseError=!0,!0},P.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=y(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},P.prototype["parse hostname"]=P.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&&(E(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},P.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 A=new Set([47,92,63,35]);P.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&&!A.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),_(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},P.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},P.prototype["parse file host"]=function(t,e){if(isNaN(t)||47===t||92===t||63===t||35===t)if(--this.pointer,!this.stateOverride&&c(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},P.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},P.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)?!u(this.buffer)||47===t||l(this.url)&&92===t?u(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&c(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(""):(_(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+=y(t,v);return!0},P.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]+y(t,h))),!0},P.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+=p(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},P.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+=y(t,h))),!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+=j(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+=j(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 P(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=S.default.ucs2.decode(e);for(let e=0;e<n.length;++e)t.username+=y(n[e],b)},t.exports.setThePassword=function(t,e){t.password="";const n=S.default.ucs2.decode(e);for(let e=0;e<n.length;++e)t.password+=y(n[e],b)},t.exports.serializeHost=j,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})}}));mo.serializeURL,mo.serializeURLOrigin,mo.basicURLParse,mo.setTheUsername,mo.setThePassword,mo.serializeHost,mo.cannotHaveAUsernamePasswordPort,mo.serializeInteger,mo.parseURL;var bo=class{constructor(t){const e=t[0],n=t[1];let r=null;if(void 0!==n&&(r=mo.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=mo.basicURLParse(e,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return mo.serializeURL(this._url)}set href(t){const e=mo.basicURLParse(t);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return mo.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(t){mo.basicURLParse(t+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){mo.cannotHaveAUsernamePasswordPort(this._url)||mo.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){mo.cannotHaveAUsernamePasswordPort(this._url)||mo.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?mo.serializeHost(t.host):mo.serializeHost(t.host)+":"+mo.serializeInteger(t.port)}set host(t){this._url.cannotBeABaseURL||mo.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":mo.serializeHost(this._url.host)}set hostname(t){this._url.cannotBeABaseURL||mo.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":mo.serializeInteger(this._url.port)}set port(t){mo.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:mo.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=[],mo.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="",mo.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="",mo.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},yo=Xr((function(t){const e=ro.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]=to.USVString(o[0]),void 0!==o[1]&&(o[1]=to.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=to.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=to.USVString(t),this[e].protocol=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[e].username},set(t){t=to.USVString(t),this[e].username=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[e].password},set(t){t=to.USVString(t),this[e].password=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[e].host},set(t){t=to.USVString(t),this[e].host=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[e].hostname},set(t){t=to.USVString(t),this[e].hostname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[e].port},set(t){t=to.USVString(t),this[e].port=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[e].pathname},set(t){t=to.USVString(t),this[e].pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[e].search},set(t){t=to.USVString(t),this[e].search=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[e].hash},set(t){t=to.USVString(t),this[e].hash=t},enumerable:!0,configurable:!0}),t.exports={is:t=>!!t&&t[e]instanceof bo,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 bo(n,r),t[e][ro.wrapperSymbol]=t},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));yo.is,yo.create,yo.setup,yo.expose;var go={URL:yo.interface,serializeURL:mo.serializeURL,serializeURLOrigin:mo.serializeURLOrigin,basicURLParse:mo.basicURLParse,setTheUsername:mo.setTheUsername,setThePassword:mo.setThePassword,serializeHost:mo.serializeHost,serializeInteger:mo.serializeInteger,parseURL:mo.parseURL};const wo=g.default.Readable,jo=Symbol("buffer"),_o=Symbol("type");class So{constructor(){this[_o]="";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 So?o[jo]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[jo]=Buffer.concat(n);let o=e&&void 0!==e.type&&String(e.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[_o]=o)}get size(){return this[jo].length}get type(){return this[_o]}text(){return Promise.resolve(this[jo].toString())}arrayBuffer(){const t=this[jo],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new wo;return t._read=function(){},t.push(this[jo]),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[jo].slice(r,r+i),a=new So([],{type:arguments[2]});return a[jo]=s,a}}function Eo(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 Po;Object.defineProperties(So.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(So.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),Eo.prototype=Object.create(Error.prototype),Eo.prototype.constructor=Eo,Eo.prototype.name="FetchError";try{Po=require("encoding").convert}catch(t){}const Ao=Symbol("Body internals"),xo=g.default.PassThrough;function Io(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:ko(t)?t=Buffer.from(t.toString()):Uo(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 g.default||(t=Buffer.from(String(t)))),this[Ao]={body:t,disturbed:!1,error:null},this.size=o,this.timeout=s,t instanceof g.default&&t.on("error",(function(t){const n="AbortError"===t.name?t:new Eo(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[Ao].error=n}))}function Co(){var t=this;if(this[Ao].disturbed)return Io.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Ao].disturbed=!0,this[Ao].error)return Io.Promise.reject(this[Ao].error);let e=this.body;if(null===e)return Io.Promise.resolve(Buffer.alloc(0));if(Uo(e)&&(e=e.stream()),Buffer.isBuffer(e))return Io.Promise.resolve(e);if(!(e instanceof g.default))return Io.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new Io.Promise((function(i,s){let a;t.timeout&&(a=setTimeout((function(){o=!0,s(new Eo(`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 Eo(`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 Eo(`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 Eo(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function ko(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 Uo(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 Oo(t){let e,n,r=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof g.default&&"function"!=typeof r.getBoundary&&(e=new xo,n=new xo,r.pipe(e),r.pipe(n),t[Ao].body=e,r=n),r}function Do(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":ko(t)?"application/x-www-form-urlencoded;charset=UTF-8":Uo(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 g.default?null:"text/plain;charset=UTF-8"}function Ro(t){const e=t.body;return null===e?0:Uo(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}Io.prototype={get body(){return this[Ao].body},get bodyUsed(){return this[Ao].disturbed},arrayBuffer(){return Co.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 Co.call(this).then((function(e){return Object.assign(new So([],{type:t.toLowerCase()}),{[jo]:e})}))},json(){var t=this;return Co.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return Io.Promise.reject(new Eo(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return Co.call(this).then((function(t){return t.toString()}))},buffer(){return Co.call(this)},textConverted(){var t=this;return Co.call(this).then((function(e){return function(t,e){if("function"!=typeof Po)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 Po(t,"UTF-8",i).toString()}(e,t.headers)}))}},Object.defineProperties(Io.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Io.mixIn=function(t){for(const e of Object.getOwnPropertyNames(Io.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(Io.prototype,e);Object.defineProperty(t,e,n)}},Io.Promise=global.Promise;const To=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Bo=/[^\t\x20-\x7e\x80-\xff]/;function No(t){if(t=`${t}`,To.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function Lo(t){if(t=`${t}`,Bo.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function qo(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const Go=Symbol("map");class Fo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[Go]=Object.create(null),t instanceof Fo){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){No(t=`${t}`);const e=qo(this[Go],t);return void 0===e?null:this[Go][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=Jo(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=Jo(this),r++}}set(t,e){e=`${e}`,No(t=`${t}`),Lo(e);const n=qo(this[Go],t);this[Go][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,No(t=`${t}`),Lo(e);const n=qo(this[Go],t);void 0!==n?this[Go][n].push(e):this[Go][t]=[e]}has(t){return No(t=`${t}`),void 0!==qo(this[Go],t)}delete(t){No(t=`${t}`);const e=qo(this[Go],t);void 0!==e&&delete this[Go][e]}raw(){return this[Go]}keys(){return zo(this,"key")}values(){return zo(this,"value")}[Symbol.iterator](){return zo(this,"key+value")}}function Jo(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(t[Go]).sort().map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[Go][e].join(", ")}:function(e){return[e.toLowerCase(),t[Go][e].join(", ")]})}Fo.prototype.entries=Fo.prototype[Symbol.iterator],Object.defineProperty(Fo.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Fo.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 Mo=Symbol("internal");function zo(t,e){const n=Object.create(Wo);return n[Mo]={target:t,kind:e,index:0},n}const Wo=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Wo)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[Mo];const e=t.target,n=t.kind,r=t.index,o=Jo(e,n);return r>=o.length?{value:void 0,done:!0}:(this[Mo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Vo(t){const e=Object.assign({__proto__:null},t[Go]),n=qo(t[Go],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(Wo,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const $o=Symbol("Response internals"),Ho=j.default.STATUS_CODES;class Yo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Io.call(this,t,e);const n=e.status||200,r=new Fo(e.headers);if(null!=t&&!r.has("Content-Type")){const e=Do(t);e&&r.append("Content-Type",e)}this[$o]={url:e.url,status:n,statusText:e.statusText||Ho[n],headers:r,counter:e.counter}}get url(){return this[$o].url||""}get status(){return this[$o].status}get ok(){return this[$o].status>=200&&this[$o].status<300}get redirected(){return this[$o].counter>0}get statusText(){return this[$o].statusText}get headers(){return this[$o].headers}clone(){return new Yo(Oo(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Io.mixIn(Yo.prototype),Object.defineProperties(Yo.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Yo.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Zo=Symbol("Request internals"),Ko=_.default.URL||go.URL,Xo=_.default.parse,Qo=_.default.format;function ti(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new Ko(t).toString()),Xo(t)}const ei="destroy"in g.default.Readable.prototype;function ni(t){return"object"==typeof t&&"object"==typeof t[Zo]}class ri{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ni(t)?e=ti(t.url):(e=t&&t.href?ti(t.href):ti(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||ni(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:ni(t)&&null!==t.body?Oo(t):null;Io.call(this,o,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const i=new Fo(n.headers||t.headers||{});if(null!=o&&!i.has("Content-Type")){const t=Do(o);t&&i.append("Content-Type",t)}let s=ni(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[Zo]={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[Zo].method}get url(){return Qo(this[Zo].parsedURL)}get headers(){return this[Zo].headers}get redirect(){return this[Zo].redirect}get signal(){return this[Zo].signal}clone(){return new ri(this)}}function oi(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}Io.mixIn(ri.prototype),Object.defineProperty(ri.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(ri.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),oi.prototype=Object.create(Error.prototype),oi.prototype.constructor=oi,oi.prototype.name="AbortError";const ii=_.default.URL||go.URL,si=g.default.PassThrough,ai=function(t,e){const n=new ii(e).hostname,r=new ii(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)},ui=function(t,e){return new ii(e).protocol===new ii(t).protocol};function ci(t,e){if(!ci.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Io.Promise=ci.Promise,new ci.Promise((function(n,r){const o=new ri(t,e),i=function(t){const e=t[Zo].parsedURL,n=new Fo(t[Zo].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 g.default.Readable&&!ei)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=Ro(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:Vo(n),agent:o})}(o),s=("https:"===i.protocol?E.default:j.default).request,a=o.signal;let u=null;const c=function(){let t=new oi("The user aborted a request.");r(t),o.body&&o.body instanceof g.default.Readable&&di(o.body,t),u&&u.body&&u.body.emit("error",t)};if(a&&a.aborted)return void c();const d=function(){c(),h()},l=s(i);let p;function h(){l.abort(),a&&a.removeEventListener("abort",d),clearTimeout(p)}a&&a.addEventListener("abort",d),o.timeout&&l.once("socket",(function(t){p=setTimeout((function(){r(new Eo(`network timeout at: ${o.url}`,"request-timeout")),h()}),o.timeout)})),l.on("error",(function(t){r(new Eo(`request to ${o.url} failed, reason: ${t.message}`,"system",t)),u&&u.body&&di(u.body,t),h()})),function(t,e){let n;t.on("socket",(function(t){n=t})),t.on("response",(function(t){const r=t.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||t.once("close",(function(t){if(n.listenerCount("data")>0&&!t){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE",e(t)}}))}))}(l,(function(t){a&&a.aborted||u&&u.body&&di(u.body,t)})),parseInt(process.version.substring(1))<14&&l.on("socket",(function(t){t.addListener("close",(function(e){const n=t.listenerCount("data")>0;if(u&&n&&!e&&(!a||!a.aborted)){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE",u.body.emit("error",t)}}))})),l.on("response",(function(t){clearTimeout(p);const e=function(t){const e=new Fo;for(const n of Object.keys(t))if(!To.test(n))if(Array.isArray(t[n]))for(const r of t[n])Bo.test(r)||(void 0===e[Go][n]?e[Go][n]=[r]:e[Go][n].push(r));else Bo.test(t[n])||(e[Go][n]=[t[n]]);return e}(t.headers);if(ci.isRedirect(t.statusCode)){const i=e.get("Location");let s=null;try{s=null===i?null:new ii(i,o.url).toString()}catch(t){if("manual"!==o.redirect)return r(new Eo(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void h()}switch(o.redirect){case"error":return r(new Eo(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),void h();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 Eo(`maximum redirect reached at: ${o.url}`,"max-redirect")),void h();const i={headers:new Fo(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(!ai(o.url,s)||!ui(o.url,s))for(const t of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(t);return 303!==t.statusCode&&o.body&&null===Ro(o)?(r(new Eo("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void h()):(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(ci(new ri(s,i))),void h())}}t.once("end",(function(){a&&a.removeEventListener("abort",d)}));let i=t.pipe(new si);const s={url:o.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:o.size,timeout:o.timeout,counter:o.counter},c=e.get("Content-Encoding");if(!o.compress||"HEAD"===o.method||null===c||204===t.statusCode||304===t.statusCode)return u=new Yo(i,s),void n(u);const l={flush:P.default.Z_SYNC_FLUSH,finishFlush:P.default.Z_SYNC_FLUSH};if("gzip"==c||"x-gzip"==c)return i=i.pipe(P.default.createGunzip(l)),u=new Yo(i,s),void n(u);if("deflate"==c||"x-deflate"==c){const e=t.pipe(new si);return e.once("data",(function(t){i=8==(15&t[0])?i.pipe(P.default.createInflate()):i.pipe(P.default.createInflateRaw()),u=new Yo(i,s),n(u)})),void e.on("end",(function(){u||(u=new Yo(i,s),n(u))}))}if("br"==c&&"function"==typeof P.default.createBrotliDecompress)return i=i.pipe(P.default.createBrotliDecompress()),u=new Yo(i,s),void n(u);u=new Yo(i,s),n(u)})),function(t,e){const n=e.body;null===n?t.end():Uo(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(l,o)}))}function di(t,e){t.destroy?t.destroy(e):(t.emit("error",e),t.end())}ci.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},ci.Promise=global.Promise;var li=function(){function t(t){this.contextProvider=t}return t.prototype.getServiceDetails=function(t,e){return L(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 L(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 L(this,void 0,void 0,(function(){var n,r,o,i,s;return q(this,(function(a){switch(a.label){case 0:return n=Kr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},N({},e)),[4,ci(t,n)];case 1:return(r=a.sent()).ok?[3,3]:(o=Error.bind,s=(i=JSON).stringify,[4,r.json()]);case 2:throw new(o.apply(Error,[void 0,s.apply(i,[a.sent()])]));case 3:return[4,r.json()];case 4:return[2,a.sent()]}}))}))},t}(),pi=function(t,e,n){return L(void 0,void 0,void 0,(function(){var r,o,i,s,a;return q(this,(function(u){switch(u.label){case 0:if(r=vi(e||"127.0.0.1"),(o=vi(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===A.default.platform()&&(i=function(t){return L(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,fi.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=o?(a=mi(s),[4,hi(t,a)]):[3,6];case 2:return u.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(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."))}}))}))},hi=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)}))},fi=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return L(void 0,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return"/sbin/ifconfig",[4,bi("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}}))}))},vi=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},mi=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(".")},bi=function(t,e,n){var r=c.spawn(t,e,N({windowsHide:!0},n)),o=new Promise((function(o,i){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(t){s+=t})),r.stderr&&r.stderr.on("data",(function(t){a+=t}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(t," ").concat(e.join(" "),"': ").concat(a);i({message:u,result:r})}else o(r)}))}));return{process:r,resultPromise:o}},yi=function(t,e,n){return L(void 0,void 0,void 0,(function(){var r,o;return q(this,(function(i){switch(i.label){case 0:return r=gi(t,10),[4,C.default.promises.writeFile(r,e,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,C.default.promises.rename(r,t)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,C.default.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},gi=function(t,e){for(var n,r=k.default.dirname(t),o=k.default.basename(t),i=0;null===(n=i<e)||void 0===n||n;i+=1){var s=G([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),u=k.default.join(r,a);if(!C.default.existsSync(u))return u}throw new Error("Could not write file to file '".concat(t,"'."))},wi="win32"===process.platform?"\r\n":"\n",ji=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;Ii(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 Ii(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 Pi(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||tt(e)&&Q(e)==Hr?t:this.nodes.findIndex((function(e){return e===t}));n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return Ii(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=Ei(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?[_i(),Si(o),r]:[Si(o),r];this.insertAt.apply(this,G([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,G([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return N({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=Ii(e,"eol").map((function(t){return t.line}));return null!==(t=Ci(n))&&void 0!==t?t:wi}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var t,n=Mr(Ii(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=Ci(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(Ai(t),e)},t}(),_i=function(){return{type:"blank",line:""}},Si=function(t){return{type:"comment",line:Ei(t)}},Ei=function(t){return t.startsWith("#")?t:"# ".concat(t)},Pi=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:wi)},Ai=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}:xi(t)}))},xi=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}},Ii=function(t,e){return t.filter((function(t){return t.type===e}))},Ci=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]},ki="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",Ui=function(){function t(t){this.ast=ji.fromNodes([]);var e={writeMode:"atomic",hostsFile:ki};this.config=N(N({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!$r(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!$r(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(!$r(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!$r(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(!$r(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(!$r(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 L(this,void 0,void 0,(function(){var t;return q(this,(function(e){switch(e.label){case 0:return[4,C.default.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=ji.parse(t.toString(),this.config),[2,this]}}))}))},t.prototype.write=function(t){return L(this,void 0,void 0,(function(){var e,n,r,o;return q(this,(function(i){switch(i.label){case 0:switch(e=N(N({},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,yi(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,C.default.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},t.prototype.backup=function(t){return L(this,void 0,void 0,(function(){var e,n,r,o;return q(this,(function(i){switch(i.label){case 0:return C.default.existsSync(this.config.hostsFile)?(e=k.default.dirname(this.config.hostsFile),n=k.default.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),o=k.default.resolve(e,r),C.default.existsSync(o)&&!t.rewrite?[3,2]:[4,C.default.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},t.load=function(e){return L(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}(),Oi=function(){function t(){this.previousPromise=Promise.resolve()}return t.prototype.enter=function(t){return L(this,void 0,void 0,(function(){var e;return q(this,(function(n){return e=this.previousPromise.then((function(){return t()})).catch((function(){return t()})),this.previousPromise=e,[2,e]}))}))},t}(),Di=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 Ri=Di(Bi),Ti=Di(Ni);function Bi(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Ni(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}Bi.proto=Bi((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Bi(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ni(this)},configurable:!0})})),Ri.strict=Ti;var Li=function(){},qi=function(t,e,n){if("function"==typeof e)return qi(t,null,e);e||(e={}),n=Ri(n||Li);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,u=function(){t.writable||c()},c=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)},p=function(e){n.call(t,e)},h=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"))},v=function(){t.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?s&&!r&&(t.on("end",u),t.on("close",u)):(t.on("complete",c),t.on("abort",h),t.req?v():t.on("request",v)),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",c),!1!==e.error&&t.on("error",p),t.on("close",h),function(){a=!0,t.removeListener("complete",c),t.removeListener("abort",h),t.removeListener("request",v),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("exit",l),t.removeListener("end",d),t.removeListener("error",p),t.removeListener("close",h)}},Gi=qi,Fi=function(){},Ji=/^v?\.0/.test(process.version),Mi=function(t){return"function"==typeof t},zi=function(t,e,n,r){r=Ri(r);var o=!1;t.on("close",(function(){o=!0})),Gi(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!!Ji&&!!C.default&&(t instanceof(C.default.ReadStream||Fi)||t instanceof(C.default.WriteStream||Fi))&&Mi(t.close)}(t)?t.close(Fi):function(t){return t.setHeader&&Mi(t.abort)}(t)?t.abort():Mi(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},Wi=function(t){t()},Vi=function(t,e){return t.pipe(e)},$i=function(){var t,e=Array.prototype.slice.call(arguments),n=Mi(e[e.length-1]||Fi)&&e.pop()||Fi;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 zi(o,s,i>0,(function(e){t||(t=e),e&&r.forEach(Wi),s||(r.forEach(Wi),n(t))}))}));return e.reduce(Vi)};const{Duplex:Hi}=g.default;function Yi(t){t.emit("close")}function Zi(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ki(t){this.removeListener("error",Ki),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var Xi=function(t,e){let n=!0;const r=new Hi({...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(Yi,r);let i=!1;t.once("error",(function(t){i=!0,o(t)})),t.once("close",(function(){i||o(e),process.nextTick(Yi,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",Zi),r.on("error",Ki),r},Qi={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},ts="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},es=process.config&&process.config.variables||{},ns=!!process.env.PREBUILDS_ONLY,rs=process.versions.modules,os=!(!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",is=process.env.npm_config_arch||A.default.arch(),ss=process.env.npm_config_platform||A.default.platform(),as=process.env.LIBC||(function(t){return"linux"===t&&C.default.existsSync("/etc/alpine-release")}(ss)?"musl":"glibc"),us=process.env.ARM_VERSION||("arm64"===is?"8":es.arm_version)||"",cs=(process.versions.uv||"").split(".")[0],ds=ls;function ls(t){return ts(ls.resolve(t))}function ps(t){try{return C.default.readdirSync(t)}catch(t){return[]}}function hs(t,e){var n=ps(t).filter(e);return n[0]&&k.default.join(t,n[0])}function fs(t){return/\.node$/.test(t)}function vs(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 ms(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function bs(t,e){return t.architectures.length-e.architectures.length}function ys(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 gs(t,e){return function(n){return null!=n&&(!(n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi!==e&&!n.napi)&&((!n.uv||n.uv===cs)&&((!n.armv||n.armv===us)&&(!n.libc||n.libc===as)))))}}function ws(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}}ls.resolve=ls.path=function(t){t=k.default.resolve(t||".");try{var e=ts(k.default.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!ns){var n=hs(k.default.join(t,"build/Release"),fs);if(n)return n;var r=hs(k.default.join(t,"build/Debug"),fs);if(r)return r}var o=a(t);if(o)return o;var i=a(k.default.dirname(process.execPath));if(i)return i;var s=["platform="+ss,"arch="+is,"runtime="+os,"abi="+rs,"uv="+cs,us?"armv="+us:"","libc="+as,"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=ps(k.default.join(t,"prebuilds")).map(vs).filter(ms(ss,is)).sort(bs)[0];if(e){var n=k.default.join(t,"prebuilds",e.name),r=ps(n).map(ys).filter(gs(os,rs)).sort(ws(os))[0];return r?k.default.join(n,r.file):void 0}}},ls.parseTags=ys,ls.matchTags=gs,ls.compareTags=ws,ls.parseTuple=vs,ls.matchTuple=ms,ls.compareTuples=bs;var js=Xr((function(t){"function"==typeof process.addon?t.exports=process.addon.bind(process):t.exports=ds}));var _s={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]}},Ss=Xr((function(t){try{t.exports=js(__dirname)}catch(e){t.exports=_s}})),Es=Xr((function(t){const{EMPTY_BUFFER:e}=Qi,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=Ss;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){}}));Es.concat,Es.mask,Es.toArrayBuffer,Es.toBuffer,Es.unmask;const Ps=Symbol("kDone"),As=Symbol("kRun");var xs=class{constructor(t){this[Ps]=()=>{this.pending--,this[As]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[As]()}[As](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[Ps])}}};const{kStatusCode:Is}=Qi,Cs=Buffer[Symbol.species],ks=Buffer.from([0,0,255,255]),Us=Symbol("permessage-deflate"),Os=Symbol("total-length"),Ds=Symbol("callback"),Rs=Symbol("buffers"),Ts=Symbol("error");let Bs;var Ns=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,!Bs){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Bs=new xs(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[Ds];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){Bs.add((r=>{this._decompress(t,e,((t,e)=>{r(),n(t,e)}))}))}compress(t,e,n){Bs.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]?P.default.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=P.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[Us]=this,this._inflate[Os]=0,this._inflate[Rs]=[],this._inflate.on("error",Gs),this._inflate.on("data",qs)}this._inflate[Ds]=n,this._inflate.write(t),e&&this._inflate.write(ks),this._inflate.flush((()=>{const t=this._inflate[Ts];if(t)return this._inflate.close(),this._inflate=null,void n(t);const o=Es.concat(this._inflate[Rs],this._inflate[Os]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Os]=0,this._inflate[Rs]=[],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]?P.default.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=P.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[Os]=0,this._deflate[Rs]=[],this._deflate.on("data",Ls)}this._deflate[Ds]=n,this._deflate.write(t),this._deflate.flush(P.default.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=Es.concat(this._deflate[Rs],this._deflate[Os]);e&&(t=new Cs(t.buffer,t.byteOffset,t.length-4)),this._deflate[Ds]=null,this._deflate[Os]=0,this._deflate[Rs]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)}))}};function Ls(t){this[Rs].push(t),this[Os]+=t.length}function qs(t){this[Os]+=t.length,this[Us]._maxPayload<1||this[Os]<=this[Us]._maxPayload?this[Rs].push(t):(this[Ts]=new RangeError("Max payload size exceeded"),this[Ts].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ts][Is]=1009,this.removeListener("data",qs),this.reset())}function Gs(t){this[Us]._inflate=null,t[Is]=1007,this[Ds](t)}var Fs=function(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else 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}return!0},Js=Xr((function(t){try{t.exports=js(__dirname)}catch(e){t.exports=Fs}})),Ms=Xr((function(t){const{isUtf8:e}=U.default;function n(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else 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}return!0}if(t.exports={isValidStatusCode:function(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999},isValidUTF8:n,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},e)t.exports.isValidUTF8=function(t){return t.length<24?n(t):e(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=Js;t.exports.isValidUTF8=function(t){return t.length<32?n(t):e(t)}}catch(t){}}));Ms.isValidStatusCode,Ms.isValidUTF8,Ms.tokenChars;const{Writable:zs}=g.default,{BINARY_TYPES:Ws,EMPTY_BUFFER:Vs,kStatusCode:$s,kWebSocket:Hs}=Qi,{concat:Ys,toArrayBuffer:Zs,unmask:Ks}=Es,{isValidStatusCode:Xs,isValidUTF8:Qs}=Ms,ta=Buffer[Symbol.species];var ea=class extends zs{constructor(t={}){super(),this._binaryType=t.binaryType||Ws[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[Hs]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(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 ta(e.buffer,e.byteOffset+t,e.length-t),new ta(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 ta(n.buffer,n.byteOffset+t,n.length-t)),t-=n.length}while(t>0);return e}startLoop(t){let e;this._loop=!0;do{switch(this._state){case 0:e=this.getInfo();break;case 1:e=this.getPayloadLength16();break;case 2:e=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:e=this.getData(t);break;default:return void(this._loop=!1)}}while(this._loop);t(e)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(0!=(48&t[0]))return this._loop=!1,na(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const e=64==(64&t[0]);if(e&&!this._extensions[Ns.extensionName])return this._loop=!1,na(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(e)return this._loop=!1,na(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,na(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,na(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=e}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,na(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,na(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(e)return this._loop=!1,na(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return this._loop=!1,na(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&t[1]),this._isServer){if(!this._masked)return this._loop=!1,na(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,na(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),e=t.readUInt32BE(0);return e>Math.pow(2,21)-1?(this._loop=!1,na(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=e*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,na(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(t){let e=Vs;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])&&Ks(e,this._mask)}return this._opcode>7?this.controlMessage(e):this._compressed?(this._state=5,void this.decompress(e,t)):(e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage())}decompress(t,e){this._extensions[Ns.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)return e(na(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return e(r);this.startLoop(e)}))}dataMessage(){if(this._fin){const t=this._messageLength,e=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?Ys(e,t):"arraybuffer"===this._binaryType?Zs(Ys(e,t)):e,this.emit("message",n,!0)}else{const n=Ys(e,t);if(!this._skipUTF8Validation&&!Qs(n))return this._loop=!1,na(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(t){if(8===this._opcode)if(this._loop=!1,0===t.length)this.emit("conclude",1005,Vs),this.end();else{const e=t.readUInt16BE(0);if(!Xs(e))return na(RangeError,`invalid status code ${e}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=new ta(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!Qs(n))return na(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",e,n),this.end()}else 9===this._opcode?this.emit("ping",t):this.emit("pong",t);this._state=0}};function na(t,e,n,r,o){const i=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(i,na),i.code=o,i[$s]=r,i}const{randomFillSync:ra}=D.default,{EMPTY_BUFFER:oa}=Qi,{isValidStatusCode:ia}=Ms,{mask:sa,toBuffer:aa}=Es,ua=Symbol("kByteLength"),ca=Buffer.alloc(4);class da{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._deflating=!1,this._queue=[]}static frame(t,e){let n,r,o=!1,i=2,s=!1;e.mask&&(n=e.maskBuffer||ca,e.generateMask?e.generateMask(n):ra(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof t?r=e.mask&&!s||void 0===e[ua]?(t=Buffer.from(t)).length:e[ua]:(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 u=Buffer.allocUnsafe(o?r+i:i);return u[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),e.mask?(u[1]|=128,u[i-4]=n[0],u[i-3]=n[1],u[i-2]=n[2],u[i-1]=n[3],s?[u,t]:o?(sa(t,n,u,i,r),[u]):(sa(t,n,t,0,r),[u,t])):[u,t]}close(t,e,n,r){let o;if(void 0===t)o=oa;else{if("number"!=typeof t||!ia(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={[ua]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(da.frame(o,i),r)}ping(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):(r=(t=aa(t)).length,o=aa.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[ua]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(da.frame(t,i),n)}pong(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):(r=(t=aa(t)).length,o=aa.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[ua]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(da.frame(t,i),n)}send(t,e,n){const r=this._extensions[Ns.extensionName];let o,i,s=e.binary?2:1,a=e.compress;if("string"==typeof t?(o=Buffer.byteLength(t),i=!1):(o=(t=aa(t)).length,i=aa.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),r){const r={[ua]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};this._deflating?this.enqueue([this.dispatch,t,this._compress,r,n]):this.dispatch(t,this._compress,r,n)}else this.sendFrame(da.frame(t,{[ua]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:!1}),n)}dispatch(t,e,n,r){if(!e)return void this.sendFrame(da.frame(t,n),r);const o=this._extensions[Ns.extensionName];this._bufferedBytes+=n[ua],this._deflating=!0,o.compress(t,n.fin,((t,e)=>{if(this._socket.destroyed){const t=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(t);for(let e=0;e<this._queue.length;e++){const n=this._queue[e],r=n[n.length-1];"function"==typeof r&&r(t)}}else this._bufferedBytes-=n[ua],this._deflating=!1,n.readOnly=!1,this.sendFrame(da.frame(e,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][ua],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][ua],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 la=da;const{kForOnEventAttribute:pa,kListener:ha}=Qi,fa=Symbol("kCode"),va=Symbol("kData"),ma=Symbol("kError"),ba=Symbol("kMessage"),ya=Symbol("kReason"),ga=Symbol("kTarget"),wa=Symbol("kType"),ja=Symbol("kWasClean");class _a{constructor(t){this[ga]=null,this[wa]=t}get target(){return this[ga]}get type(){return this[wa]}}Object.defineProperty(_a.prototype,"target",{enumerable:!0}),Object.defineProperty(_a.prototype,"type",{enumerable:!0});class Sa extends _a{constructor(t,e={}){super(t),this[fa]=void 0===e.code?0:e.code,this[ya]=void 0===e.reason?"":e.reason,this[ja]=void 0!==e.wasClean&&e.wasClean}get code(){return this[fa]}get reason(){return this[ya]}get wasClean(){return this[ja]}}Object.defineProperty(Sa.prototype,"code",{enumerable:!0}),Object.defineProperty(Sa.prototype,"reason",{enumerable:!0}),Object.defineProperty(Sa.prototype,"wasClean",{enumerable:!0});class Ea extends _a{constructor(t,e={}){super(t),this[ma]=void 0===e.error?null:e.error,this[ba]=void 0===e.message?"":e.message}get error(){return this[ma]}get message(){return this[ba]}}Object.defineProperty(Ea.prototype,"error",{enumerable:!0}),Object.defineProperty(Ea.prototype,"message",{enumerable:!0});class Pa extends _a{constructor(t,e={}){super(t),this[va]=void 0===e.data?null:e.data}get data(){return this[va]}}Object.defineProperty(Pa.prototype,"data",{enumerable:!0});const Aa={addEventListener(t,e,n={}){for(const r of this.listeners(t))if(!n[pa]&&r[ha]===e&&!r[pa])return;let r;if("message"===t)r=function(t,n){const r=new Pa("message",{data:n?t:t.toString()});r[ga]=this,Ia(e,this,r)};else if("close"===t)r=function(t,n){const r=new Sa("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[ga]=this,Ia(e,this,r)};else if("error"===t)r=function(t){const n=new Ea("error",{error:t,message:t.message});n[ga]=this,Ia(e,this,n)};else{if("open"!==t)return;r=function(){const t=new _a("open");t[ga]=this,Ia(e,this,t)}}r[pa]=!!n[pa],r[ha]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[ha]===e&&!n[pa]){this.removeListener(t,n);break}}};var xa={CloseEvent:Sa,ErrorEvent:Ea,Event:_a,EventTarget:Aa,MessageEvent:Pa};function Ia(t,e,n){"object"==typeof t&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}const{tokenChars:Ca}=Ms;function ka(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,u=-1,c=-1,d=-1,l=0;for(;l<t.length;l++)if(c=t.charCodeAt(l),void 0===n)if(-1===d&&1===Ca[c])-1===u&&(u=l);else if(0===l||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=t.slice(u,d);44===c?(ka(e,r,o),o=Object.create(null)):n=r,u=d=-1}}else-1===d&&-1!==u&&(d=l);else if(void 0===r)if(-1===d&&1===Ca[c])-1===u&&(u=l);else if(32===c||9===c)-1===d&&-1!==u&&(d=l);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),ka(o,t.slice(u,d),!0),44===c&&(ka(e,n,o),o=Object.create(null),n=void 0),u=d=-1}else{if(61!==c||-1===u||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=t.slice(u,l),u=d=-1}else if(s){if(1!==Ca[c])throw new SyntaxError(`Unexpected character at index ${l}`);-1===u?u=l:i||(i=!0),s=!1}else if(a)if(1===Ca[c])-1===u&&(u=l);else if(34===c&&-1!==u)a=!1,d=l;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===c&&61===t.charCodeAt(l-1))a=!0;else if(-1===d&&1===Ca[c])-1===u&&(u=l);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=t.slice(u,d);i&&(s=s.replace(/\\/g,""),i=!1),ka(o,r,s),44===c&&(ka(e,n,o),o=Object.create(null),n=void 0),r=void 0,u=d=-1}}else-1===d&&(d=l);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=t.slice(u,d);return void 0===n?ka(e,p,o):(void 0===r?ka(o,p,!0):ka(o,r,i?p.replace(/\\/g,""):p),ka(e,n,o)),e}};const{randomBytes:Oa,createHash:Da}=D.default,{URL:Ra}=_.default,{BINARY_TYPES:Ta,EMPTY_BUFFER:Ba,GUID:Na,kForOnEventAttribute:La,kListener:qa,kStatusCode:Ga,kWebSocket:Fa,NOOP:Ja}=Qi,{EventTarget:{addEventListener:Ma,removeEventListener:za}}=xa,{format:Wa,parse:Va}=Ua,{toBuffer:$a}=Es,Ha=Symbol("kAborted"),Ya=[8,13],Za=["CONNECTING","OPEN","CLOSING","CLOSED"],Ka=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Xa extends y.default{constructor(t,e,n){super(),this._binaryType=Ta[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Ba,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Xa.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]),tu(this,t,e,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(t){Ta.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 ea({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new la(t,this._extensions,n.generateMask),this._receiver=r,this._socket=t,r[Fa]=this,t[Fa]=this,r.on("conclude",su),r.on("drain",au),r.on("error",uu),r.on("message",du),r.on("ping",lu),r.on("pong",pu),t.setTimeout(0),t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",fu),t.on("data",vu),t.on("end",mu),t.on("error",bu),this._readyState=Xa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Xa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[Ns.extensionName]&&this._extensions[Ns.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Xa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Xa.CLOSED)if(this.readyState!==Xa.CONNECTING)this.readyState!==Xa.CLOSING?(this._readyState=Xa.CLOSING,this._sender.close(t,e,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const t="WebSocket was closed before the connection was established";ou(this,this._req,t)}}pause(){this.readyState!==Xa.CONNECTING&&this.readyState!==Xa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Xa.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===Xa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||Ba,e,n)):iu(this,t,n)}pong(t,e,n){if(this.readyState===Xa.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===Xa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||Ba,e,n)):iu(this,t,n)}resume(){this.readyState!==Xa.CONNECTING&&this.readyState!==Xa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Xa.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!==Xa.OPEN)return void iu(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[Ns.extensionName]||(r.compress=!1),this._sender.send(t||Ba,r,n)}terminate(){if(this.readyState!==Xa.CLOSED)if(this.readyState!==Xa.CONNECTING)this._socket&&(this._readyState=Xa.CLOSING,this._socket.destroy());else{const t="WebSocket was closed before the connection was established";ou(this,this._req,t)}}}Object.defineProperty(Xa,"CONNECTING",{enumerable:!0,value:Za.indexOf("CONNECTING")}),Object.defineProperty(Xa.prototype,"CONNECTING",{enumerable:!0,value:Za.indexOf("CONNECTING")}),Object.defineProperty(Xa,"OPEN",{enumerable:!0,value:Za.indexOf("OPEN")}),Object.defineProperty(Xa.prototype,"OPEN",{enumerable:!0,value:Za.indexOf("OPEN")}),Object.defineProperty(Xa,"CLOSING",{enumerable:!0,value:Za.indexOf("CLOSING")}),Object.defineProperty(Xa.prototype,"CLOSING",{enumerable:!0,value:Za.indexOf("CLOSING")}),Object.defineProperty(Xa,"CLOSED",{enumerable:!0,value:Za.indexOf("CLOSED")}),Object.defineProperty(Xa.prototype,"CLOSED",{enumerable:!0,value:Za.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(Xa.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(Xa.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[La])return e[qa];return null},set(e){for(const e of this.listeners(t))if(e[La]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[La]:!0})}})})),Xa.prototype.addEventListener=Ma,Xa.prototype.removeEventListener=za;var Qa=Xa;function tu(t,e,n,r){const o={protocolVersion:Ya[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!Ya.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${Ya.join(", ")})`);let i;if(e instanceof Ra)i=e,t._url=e.href;else{try{i=new Ra(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}t._url=e}const s="wss:"===i.protocol,a="ws+unix:"===i.protocol;let u;if("ws:"===i.protocol||s||a?a&&!i.pathname?u="The URL's pathname is empty":i.hash&&(u="The URL contains a fragment identifier"):u='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',u){const e=new SyntaxError(u);if(0===t._redirects)throw e;return void eu(t,e)}const c=s?443:80,d=Oa(16).toString("base64"),l=s?E.default.request:j.default.request,p=new Set;let h,f;if(o.createConnection=s?ru:nu,o.defaultPort=o.defaultPort||c,o.port=i.port||c,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&&(h=new Ns(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=Wa({[Ns.extensionName]:h.offer()})),n.length){for(const t of n){if("string"!=typeof t||!Ka.test(t)||p.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.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",(()=>{ou(t,f,"Opening handshake has timed out")})),f.on("error",(e=>{null===f||f[Ha]||(f=t._req=null,eu(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 ou(t,f,"Maximum redirects exceeded");let i;f.abort();try{i=new Ra(s,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${s}`);return void eu(t,n)}tu(t,i,n,r)}else t.emit("unexpected-response",f,i)||ou(t,f,`Unexpected server response: ${i.statusCode}`)})),f.on("upgrade",((e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Xa.CONNECTING)return;if(f=t._req=null,"websocket"!==e.headers.upgrade.toLowerCase())return void ou(t,n,"Invalid Upgrade header");const i=Da("sha1").update(d+Na).digest("base64");if(e.headers["sec-websocket-accept"]!==i)return void ou(t,n,"Invalid Sec-WebSocket-Accept header");const s=e.headers["sec-websocket-protocol"];let a;if(void 0!==s?p.size?p.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":p.size&&(a="Server sent no subprotocol"),a)return void ou(t,n,a);s&&(t._protocol=s);const u=e.headers["sec-websocket-extensions"];if(void 0!==u){if(!h){return void ou(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=Va(u)}catch(e){return void ou(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==Ns.extensionName){return void ou(t,n,"Server indicated an extension that was not requested")}try{h.accept(e[Ns.extensionName])}catch(e){return void ou(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[Ns.extensionName]=h}t.setSocket(n,r,{generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),f.end()}function eu(t,e){t._readyState=Xa.CLOSING,t.emit("error",e),t.emitClose()}function nu(t){return t.path=t.socketPath,x.default.connect(t)}function ru(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=x.default.isIP(t.host)?"":t.host),O.default.connect(t)}function ou(t,e,n){t._readyState=Xa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,ou),e.setHeader?(e[Ha]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(eu,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function iu(t,e,n){if(e){const n=$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} (${Za[t.readyState]})`);process.nextTick(n,e)}}function su(t,e){const n=this[Fa];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[Fa]&&(n._socket.removeListener("data",vu),process.nextTick(hu,n._socket),1005===t?n.close():n.close(t,e))}function au(){const t=this[Fa];t.isPaused||t._socket.resume()}function uu(t){const e=this[Fa];void 0!==e._socket[Fa]&&(e._socket.removeListener("data",vu),process.nextTick(hu,e._socket),e.close(t[Ga])),e.emit("error",t)}function cu(){this[Fa].emitClose()}function du(t,e){this[Fa].emit("message",t,e)}function lu(t){const e=this[Fa];e.pong(t,!e._isServer,Ja),e.emit("ping",t)}function pu(t){this[Fa].emit("pong",t)}function hu(t){t.resume()}function fu(){const t=this[Fa];let e;this.removeListener("close",fu),this.removeListener("data",vu),this.removeListener("end",mu),t._readyState=Xa.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[Fa]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",cu),t._receiver.on("finish",cu))}function vu(t){this[Fa]._receiver.write(t)||this.pause()}function mu(){const t=this[Fa];t._readyState=Xa.CLOSING,t._receiver.end(),this.end()}function bu(){const t=this[Fa];this.removeListener("error",bu),this.on("error",Ja),t&&(t._readyState=Xa.CLOSING,this.destroy())}var yu=function(t){function n(e,n,r,o,i){void 0===i&&(i=5e3);var s=t.call(this)||this;s.endpoint=e,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=I.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(t){return(e=Ke(e=t))&&Fr.test(e)?e.replace(Gr,"\\$&"):e;var e})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return B(n,t),Object.defineProperty(n.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),n.prototype.open=function(){return L(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)}))}))]}))}))},n.prototype.close=function(){return L(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]}}))}))},n.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=new Qa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Xi(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?$i(t,o,r):$i(t,r),$i(r,t),n.on("close",(function(t,n,r){e.emit("connection-close",t,n,r)})),r.on("error",(function(t){e.emit("connection-error",t)})),t.on("error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},n.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var t=this.rewriteHostHeader.targetHostname,n=this.hostRegex;return new e.Transform({transform:function(e,r,o){var i=e.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(n,"Host: ".concat(t));o(null,Buffer.from(s))}else o(null,e)}})}},n}(t.EventEmitter),gu=function(t){function e(e,n,r){var o=t.call(this)||this;return o.endpoint=e,o.headers=n,o.bindToAssign=r,o.protocol="UDP",o.udpSocket=R.default.createSocket("udp4"),o.handleConnection(),o}return B(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 L(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 L(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=new Qa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Xi(n);this.udpSocket.on("message",(function(e,n){t=n,r.write(e)})),r.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)})),r.on("error",(function(t){e.emit("connection-error",t)})),n.on("connection-close",(function(t,n,r){e.emit("connection-close",t,n,r)})),n.on("connection-error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e}(t.EventEmitter);var wu,ju="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,_u=function(t,e){return L(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)]}))}))},Su=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 B(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}(g.default.Writable),Eu=function(t){function e(e,n,r){var o=t.call(this)||this;return o.contextProvider=e,o.listServices=n,o.listAddons=r,o.connections=[],o.hostsFileMutex=new Oi,o.ipAllocationMutex=new Oi,o.stopForwarding=function(t){return L(o,void 0,void 0,(function(){var e,n,r,o,i,s,a;return q(this,(function(u){switch(u.label){case 0:return[4,t.tunnel.close()];case 1:return u.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:u.sent(),u.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]}}))}))},o.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(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 c.execSync("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return c.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},o.assertStartedWithNodejs=function(){if(!ju)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new li(e),o}return B(e,t),e.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),L(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]}}))}))},e.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),L(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return q(this,(function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return o=u.sent(),[4,Promise.all(r.data.services.map((function(t){return L(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=u.sent(),[4,Promise.all(o.data.addons.map((function(t){return L(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=u.sent(),[2,{services:i,addons:s}]}}))}))},e.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),L(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]}}))}))},e.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),L(this,void 0,void 0,(function(){var n,r,o,i,s,a,u,c=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,u=o.ports,0===a.length?[2,[]]:[4,_u(u,(function(t){var o,u="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 p=G([d],l,!0);return c.forwardPort(u,t,p,"service",r,n,e,o)}))];case 2:return[2,d.sent()]}}))}))},e.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),L(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]}}))}))},e.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),L(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,_u((u=i,null!=u&&u.length?sn(u,zr):[]),(function(t){var i=t.podName,a=t.internalHostname,u=t.port;return L(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(u.internalPort),[2,this.forwardPort(t,u,[a],"addon",n,r,e)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},e.prototype.allocateIpAddress=function(t){return L(this,void 0,void 0,(function(){var e=this;return q(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return L(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,pi(t,r,n)];case 1:return o=s.sent(),this.nextIpAddress=mi(vi(o)+1),vi(this.nextIpAddress)>vi(n)&&(this.nextIpAddress=e),[2,o]}}))}))}))]}))}))},e.prototype.forwardPort=function(t,e,n,r,o,i,s,a){var u;return void 0===s&&(s=!0),L(this,void 0,void 0,(function(){var c,d,l,p,h,f,v=this;return q(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(d=this.canExecuteWithHostnames()).error)throw new Error("".concat(d.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(i,o,r,e,s)];case 1:return l=m.sent(),p="UDP"===e.protocol?new gu(t,c,l):new yu(t,c,a,l),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return L(v,void 0,void 0,(function(){return q(this,(function(t){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return h=m.sent(),f={projectId:i,id:o,type:r,hostnames:n,ipOnly:s,port:h.port,address:h.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",p,f),p.on("connection-error",(function(t){return v.emit("connection-error",p,f,t)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,f)})),this.connections.push({tunnel:p,forwardingContext:f}),[2,{data:f}]}}))}))},e.prototype.determineSocketAddress=function(t,e,n,r,o){var i;return L(this,void 0,void 0,(function(){var s,a,u;return q(this,(function(c){switch(c.label){case 0:return o&&"darwin"===A.default.platform()?[2,void 0]:(s=this.connections.find((function(r){return r.forwardingContext.projectId===t&&r.forwardingContext.id===e&&r.forwardingContext.type===n})),a=(null===(i=null==s?void 0:s.forwardingContext)||void 0===i?void 0:i.port)!==r.internalPort,s&&a?[2,{address:s.forwardingContext.address,port:r.internalPort}]:(u={},[4,this.allocateIpAddress(r.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=r.internalPort,u)]}}))}))},e.prototype.registerHostnames=function(t,e){return L(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,G([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.unregisterHostnames=function(t,e){return L(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,G([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.modifyHostsFile=function(t){return L(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 L(e,void 0,void 0,(function(){var e,n=this;return q(this,(function(r){switch(r.label){case 0:return[4,Ui.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,Pu(5)((function(){return L(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,Pu(5)((function(){return L(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]}}))}))},e.prototype.stopProjectForwarding=function(t){return L(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]}}))}))},e.prototype.stopServiceForwarding=function(t){return L(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]}}))}))},e.prototype.stopAddonForwarding=function(t){return L(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]}}))}))},e.prototype.stop=function(){return L(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 L(t,void 0,void 0,(function(){return q(this,(function(t){return[2,this.stopForwarding(e)]}))}))})))];case 1:return e.sent(),[2]}}))}))},e}(t.EventEmitter),Pu=function(t,e){return void 0===e&&(e=50),function(n){var r=t,o=function(){return L(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()}},Au=function(t){function e(e,n,r,o,i,s){void 0===o&&(o=new w.PassThrough),void 0===i&&(i=new w.PassThrough),void 0===s&&(s=new w.PassThrough);var a=t.call(this)||this;return a.baseUrl=e,a.execConfig=n,a.token=r,a.stdOut=o,a.stdErr=i,a.stdIn=s,a.waitForCommandResult=function(){return L(a,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()]}}))}))},a.sendInputToCurrentCommand=function(t){return L(a,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]}))}))},a.resizeTerminal=function(t){return L(a,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]}))}))},a.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},a}return B(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 L(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 Qa(a);try{t.duplex=Xi(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)))})),null===(r=t.duplex)||void 0===r||r.on("data",(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&&u("Command initialization failed: ".concat(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":s=o.data,t.emit("command-result",s),null===(r=t.duplex)||void 0===r||r.end();break;case"stdOut":t.emit("std-out-data",o.data),t.stdOut.write(o.data);break;case"stdErr":t.emit("std-err-data",o.data),t.stdErr.write(o.data);break;case"error":u(o.data);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));u(a)}})),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 u=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.ttyColumns,u=e.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:u}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(c))},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),xu=function(){function t(t){this.contextProvider=t,this.assertStartedWithNodejs=function(){if(!ju)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o;return q(this,(function(i){return n=t.serviceId,r=t.projectId,"service",o=N({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(o)]}))}))},t.prototype.execServiceSession=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o;return q(this,(function(i){return n=t.serviceId,r=t.projectId,"service",o=N({projectId:r,entityId:n,entityType:"service"},e),[2,this.shellSession(o)]}))}))},t.prototype.execJobCommand=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o;return q(this,(function(i){return n=t.jobId,r=t.projectId,"job",o=N({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(o)]}))}))},t.prototype.execJobSession=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o;return q(this,(function(i){return n=t.jobId,r=t.projectId,"job",o=N({projectId:r,entityId:n,entityType:"job"},e),[2,this.shellSession(o)]}))}))},t.prototype.execCommand=function(t){return L(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(N({shell:"none"},t)),n=new Su,r=new Su,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){this.assertStartedWithNodejs();var e=this.getCommandRunner(t);return e.start(),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 Au(e,t,n)},t}(),Iu=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 B(e,t),e}(Error),Cu=function(t){function e(e,n,r){var o=t.call(this)||this;return o.baseUrl=e,o.logsConfig=n,o.token=r,o.stop=function(){return L(o,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.duplex)||void 0===t||t.end(),[2]}))}))},o}return B(e,t),e.getLogsEndpoint=function(t){var e=t.containerName,n=t.entityId,r=t.entityType,o=t.buildId,i=t.lineLimit,s=t.projectId,a=t.queryType,u=t.startTime,c=t.endTime,d=t.duration,l=t.direction,p=t.textIncludes,h=t.textNotIncludes,f=t.regexIncludes,v=t.regexNotIncludes,m="/v1/projects/".concat(s,"/");var b=new URLSearchParams;return b.append("queryType",a),u&&b.append("startTime",u.toISOString()),c&&b.append("endTime",c.toISOString()),i&&b.append("lineLimit",i.toString()),e&&b.append("containerName",e),p&&b.append("textIncludes",p),h&&b.append("textNotIncludes",h),f&&b.append("regexIncludes",f),v&&b.append("regexNotIncludes",v),l&&b.append("direction",l),d&&b.append("duration",d.toString()),"".concat(m).concat(function(){var t=o?"/builds/".concat(o):"";switch(r){case"service":return"services/".concat(n).concat(t);case"job":return"jobs/".concat(n).concat(t);case"addon":return"addons/".concat(n);case"build":return"builds/".concat(n);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(r))}}(),"/logs?").concat(b.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 L(this,void 0,void 0,(function(){var t=this;return q(this,(function(e){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 Qa(a);try{t.duplex=Xi(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),null===(r=t.duplex)||void 0===r||r.on("data",(function(e){var n,r=JSON.parse(e.toString());switch(null==r?void 0:r.type){case"init":var o=r.data;"successful"!==o.auth&&u("Command initialization failed: ".concat(null!==(n=null==o?void 0:o.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var i=r.data;t.emit("logs-received",i.map(Gu));break;case"error":u(r.data);break;default:var s="unable to parse message: ".concat(JSON.stringify(r));u(s)}})),null===(o=t.duplex)||void 0===o||o.on("end",(function(){t.emit("close"),t.reset(),e()})),null===(i=t.duplex)||void 0===i||i.on("open",(function(){t.emit("open")})),null===(s=t.duplex)||void 0===s||s.on("error",(function(n){t.emit("error",n),t.reset(),e()}));var u=function(e){t.emit("error",e),t.reset(),n(new Error(e))}})),[2,this.logSession]}))}))},e.prototype.initialAuth=function(){var t,e={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(e))},e.prototype.reset=function(){var t;this.remote=void 0,this.logSession=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(t.EventEmitter),ku=ju?ci:window.fetch,Uu=function(){if(ju)try{return JSON.parse(C.default.readFileSync(k.default.join(k.default.dirname(r.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(t){return console.log("Failed to check version of northflank CLI (".concat(t.message,")")),{}}return{}},Ou=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return L(n,void 0,void 0,(function(){var e,n,r,o,i,s,a,u,c,d,l,p,h=this;return q(this,(function(f){switch(f.label){case 0:if(e=this.method,n={method:e,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return o="".concat(r).concat(this.endpointUrl(t)),i=this.body(t),s=N(N({url:o},n),{body:i}),[4,Lu(o,N(N({},n),{body:i}))];case 1:return[4,(a=f.sent()).text()];case 2:return u=f.sent(),c=function(){if(200!==a.status){var t=null==d?void 0:d.error,e=(null==t?void 0:t.message)||"",n={status:a.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(h.opts.throwErrorOnHttpErrorCode)throw new Iu(n);return n}},d=function(){try{return JSON.parse(u)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),l=c(),[2,{data:null==d?void 0:d.data,rawResponse:a,request:s,error:l,pagination:null==d?void 0:d.pagination}]}}))}))},this.contextProvider=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=Uu())||void 0===e?void 0:e.version).concat(r)}},t}(),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return B(e,t),e}(Ou),Ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return B(e,t),e}(Ou),Tu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return B(e,t),e}(Ou),Bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="put",e}return B(e,t),e}(Ou),Nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="patch",e}return B(e,t),e}(Ou),Lu=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 ku(t,e).then((function(t){o(t)})).catch((function(t){return L(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)}))},qu=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 Cu.getLogsEndpoint(t)},e.body=function(){},e}return B(e,t),e}(Du),Gu=function(t){return{containerId:t.containerId,log:t.log,ts:new Date(t.ts)}},Fu=function(){function t(t){this.contextProvider=t,this.assertStartedWithNodejs=function(){if(!ju)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.getServiceLogs=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.serviceId,projectId:t.projectId},[2,this.logRange(n,e,"service")]}))}))},t.prototype.getServiceBuildLogs=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.projectId,r=t.buildId,o=t.serviceId,i={entityId:o,buildId:r,projectId:n},[2,this.logRange(i,e,"build")]}))}))},t.prototype.getJobLogs=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.jobId,projectId:t.projectId},[2,this.logRange(n,e,"job")]}))}))},t.prototype.getJobBuildLogs=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.projectId,r=t.buildId,o=t.jobId,i={entityId:o,buildId:r,projectId:n},[2,this.logRange(i,e,"build")]}))}))},t.prototype.getAddonLogs=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(n,e,"addon")]}))}))},t.prototype.logRange=function(t,e,n){var r;return L(this,void 0,void 0,(function(){var o,i,s,a,u;return q(this,(function(c){switch(c.label){case 0:if(o=t.entityId,i=t.projectId,s=t.buildId,"build"===n&&!s)throw new Error("Log endpoint for build requires buildId argument");return a=N(N({projectId:i,entityId:o,entityType:n,buildId:s},e),{queryType:"range"}),[4,new qu(this.contextProvider,{}).call(a)];case 1:return(u=c.sent()).error?[2,u]:[2,N(N({},u),{data:null===(r=null==u?void 0:u.data)||void 0===r?void 0:r.map(Gu)})]}}))}))},t.prototype.tailServiceLogs=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.serviceId,projectId:t.projectId},[2,this.logTail(n,e,"service")]}))}))},t.prototype.tailServiceBuildLogs=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.serviceId,r=t.projectId,o=t.buildId,i={entityId:n,buildId:o,projectId:r},[2,this.logTail(i,e,"build")]}))}))},t.prototype.tailJobLogs=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.jobId,projectId:t.projectId},[2,this.logTail(n,e,"job")]}))}))},t.prototype.tailJobBuildLogs=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.projectId,r=t.buildId,o=t.jobId,i={entityId:o,buildId:r,projectId:n},[2,this.logTail(i,e,"build")]}))}))},t.prototype.tailAddonLogs=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(n,e,"addon")]}))}))},t.prototype.logTail=function(t,e,n){return L(this,void 0,void 0,(function(){var r,o,i,s,a,u;return q(this,(function(c){if(r=t.entityId,o=t.projectId,i=t.buildId,"build"===n&&!i)throw new Error("Log endpoint for build requires buildId argument");if(s=N(N({projectId:o,entityId:r,entityType:n,buildId:i},e),{queryType:"tail"}),this.assertStartedWithNodejs(),a=this.contextProvider.getCurrentBaseUrl(!0),!(u=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new Cu(a,s,u)]}))}))},t}(),Ju=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.buildId,i=t.queryType,s=t.metricTypes,a=t.startTime,u=t.endTime,c=t.duration,d=t.containerName,l=t.timestamp,p="/v1/projects/".concat(e,"/");var h=new URLSearchParams;return h.append("queryType",i),a&&h.append("startTime",a.toISOString()),u&&h.append("endTime",u.toISOString()),d&&h.append("containerName",d),l&&h.append("timestamp",l.toISOString()),c&&h.append("duration",c.toString()),s&&s.forEach((function(t){return h.append("metricTypes",t)})),"".concat(p).concat(function(){var t=o?"/builds/".concat(o):"";switch(r){case"service":return"services/".concat(n).concat(t);case"job":return"jobs/".concat(n).concat(t);case"addon":return"addons/".concat(n);case"build":return"builds/".concat(n);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"/metrics?").concat(h.toString())},e.body=function(){},e}return B(e,t),e}(Du),Mu=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,(wu=exports.MetricType||(exports.MetricType={})).Cpu="cpu",wu.Memory="memory",wu.NetworkIngress="networkIngress",wu.NetworkEgress="networkEgress",wu.TcpConnectionOpen="tcpConnectionsOpen",wu.PvcUsage="diskUsage",wu.Requests="requests",wu.Http4xxResponses="http4xxResponses",wu.Http5xxResponses="http5xxResponses";var zu=function(){function t(t){this.contextProvider=t}return t.prototype.getServiceMetrics=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsSingle(n,e,"service")]}))}))},t.prototype.getServiceBuildMetrics=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.serviceId,r=t.buildId,o=t.projectId,i={entityId:n,buildId:r,projectId:o},[2,this.metricsSingle(i,e,"build")]}))}))},t.prototype.getJobMetrics=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.jobId,projectId:t.projectId},[2,this.metricsSingle(n,e,"job")]}))}))},t.prototype.getJobBuildMetrics=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.jobId,r=t.buildId,o=t.projectId,i={entityId:n,buildId:r,projectId:o},[2,this.metricsSingle(i,e,"build")]}))}))},t.prototype.getAddonMetrics=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.addonId,projectId:t.projectId},[2,this.metricsSingle(n,e,"addon")]}))}))},t.prototype.metricsSingle=function(t,e,n){return L(this,void 0,void 0,(function(){var r,o,i;return q(this,(function(s){return r=t.entityId,o=t.projectId,i=N(N({projectId:o,entityId:r,entityType:n},e),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},t.prototype.getServiceMetricsRange=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsRange(n,e,"service")]}))}))},t.prototype.getServiceBuildMetricsRange=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.projectId,r=t.buildId,o=t.serviceId,i={entityId:o,buildId:r,projectId:n},[2,this.metricsRange(i,e,"build")]}))}))},t.prototype.getJobMetricsRange=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.jobId,projectId:t.projectId},[2,this.metricsRange(n,e,"job")]}))}))},t.prototype.getJobBuildMetricsRange=function(t,e){return L(this,void 0,void 0,(function(){var n,r,o,i;return q(this,(function(s){return n=t.projectId,r=t.buildId,o=t.jobId,i={entityId:o,buildId:r,projectId:n},[2,this.metricsRange(i,e,"build")]}))}))},t.prototype.getAddonMetricsRange=function(t,e){return L(this,void 0,void 0,(function(){var n;return q(this,(function(r){return n={entityId:t.addonId,projectId:t.projectId},[2,this.metricsRange(n,e,"addon")]}))}))},t.prototype.metricsRange=function(t,e,n){return L(this,void 0,void 0,(function(){var r,o,i,s;return q(this,(function(a){if(r=t.entityId,o=t.projectId,i=t.buildId,"build"===n&&!i)throw new Error("Log endpoint for build requires buildId argument");return s=N(N({projectId:o,entityId:r,entityType:n,buildId:i},e),{queryType:"range"}),[2,this.getMetrics(s)]}))}))},t.prototype.getMetrics=function(t){return L(this,void 0,void 0,(function(){var e;return q(this,(function(n){switch(n.label){case 0:return[4,new Ju(this.contextProvider,{}).call(t)];case 1:return(e=n.sent()).error?[2,e]:[2,N(N({},e),{data:Object.fromEntries(Object.entries(e.data).map((function(t){var e=t[0],n=t[1];return[e,N(N({},n),{values:n.values.map(Mu)})]})))})]}}))}))},t}(),Wu=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 B(e,t),e}(Du),Vu=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 B(e,t),e}(Ru),$u=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"/v1/projects/".concat(t.parameters.projectId)},e.body=function(){},e}return B(e,t),e}(Du),Hu=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){return"/v1/projects/".concat(t.parameters.projectId)},e.body=function(){},e}return B(e,t),e}(Tu),Yu=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,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(t.parameters.projectId,"/addons").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Zu=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"/v1/projects/".concat(t.parameters.projectId,"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Ku=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"/v1/projects/".concat(t.parameters.projectId,"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Bu),Xu=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return B(e,t),e}(Du),Qu=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Nu),tc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return B(e,t),e}(Tu),ec=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/credentials")},e.body=function(){},e}return B(e,t),e}(Du),nc=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 B(e,t),e}(Du),rc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),oc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(){},e}return B(e,t),e}(Du),ic=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),sc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),ac=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),uc=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,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(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),cc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),dc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return B(e,t),e}(Du),lc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return B(e,t),e}(Tu),pc=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){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/restore")},e.body=function(){},e}return B(e,t),e}(Ru),hc=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,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(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/restores").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),fc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),vc=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,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(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/containers").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),mc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pause")},e.body=function(){},e}return B(e,t),e}(Ru),bc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/resume")},e.body=function(){},e}return B(e,t),e}(Ru),yc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/restart")},e.body=function(){},e}return B(e,t),e}(Ru),gc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort")},e.body=function(){},e}return B(e,t),e}(Ru),wc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/retain")},e.body=function(){},e}return B(e,t),e}(Ru),jc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/download-link")},e.body=function(){},e}return B(e,t),e}(Du),_c=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){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort-restore")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Sc=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,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(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Ec=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Pc=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"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules/").concat(t.parameters.scheduleId)},e.body=function(){},e}return B(e,t),e}(Tu),Ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the valid window for performing a point-in-time restore (PITR) on this addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pitr-window")},e.body=function(){},e}return B(e,t),e}(Du),xc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores an addon to a specific point in time.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pitr")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Ic=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 B(e,t),e}(Du),Cc=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 B(e,t),e}(Du),kc=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 B(e,t),e}(Du),Uc=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 B(e,t),e}(Du),Oc=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 B(e,t),e}(Ru),Dc=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"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return B(e,t),e}(Du),Rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Tc=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"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return B(e,t),e}(Tu),Bc=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 B(e,t),e}(Du),Nc=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 B(e,t),e}(Ru),Lc=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"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return B(e,t),e}(Du),qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update an existing cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Gc=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"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return B(e,t),e}(Tu),Fc=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,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(t.parameters.projectId,"/jobs").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Jc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return B(e,t),e}(Du),Mc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return B(e,t),e}(Tu),zc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Wc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Bu),Vc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual/").concat(t.parameters.jobId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Nu),$c=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Hc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Bu),Yc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron/").concat(t.parameters.jobId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Nu),Zc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Kc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Xc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pause")},e.body=function(){},e}return B(e,t),e}(Ru),Qc=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),td=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,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(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),ed=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),nd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return B(e,t),e}(Du),rd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return B(e,t),e}(Tu),od=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),id=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(){},e}return B(e,t),e}(Du),sd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),ad=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,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(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),ud=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),cd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return B(e,t),e}(Du),dd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return B(e,t),e}(Tu),ld=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),pd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),hd=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 > Jobs > Configuration > View Build Parameters",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(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),fd=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 > Jobs > Configuration > Update Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),vd=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 > Jobs > Configuration > View Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments/details")},e.body=function(){},e}return B(e,t),e}(Du),md=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 > Jobs > Configuration > View Environment Variables",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(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),bd=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 > Jobs > Configuration > Update Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),yd=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 > Jobs > Configuration > View Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment/details")},e.body=function(){},e}return B(e,t),e}(Du),gd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(){},e}return B(e,t),e}(Du),wd=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"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),jd=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,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(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/containers").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),_d=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,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(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/branches").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Sd=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,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(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pull-requests").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Ed=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 B(e,t),e}(Du),Pd=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 B(e,t),e}(Ru),Ad=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"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId)},e.body=function(){},e}return B(e,t),e}(Du),xd=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"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId)},e.body=function(){},e}return B(e,t),e}(Tu),Id=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"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Cd=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"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/pause")},e.body=function(){},e}return B(e,t),e}(Ru),kd=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"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/resume")},e.body=function(){},e}return B(e,t),e}(Ru),Ud=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 B(e,t),e}(Du),Od=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 B(e,t),e}(Ru),Dd=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"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return B(e,t),e}(Du),Rd=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"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return B(e,t),e}(Tu),Td=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"/v1/integrations/registries/".concat(t.parameters.credentialId,"/modify")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Bd=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 B(e,t),e}(Du),Nd=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 B(e,t),e}(Ru),Ld=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"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return B(e,t),e}(Du),qd=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"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return B(e,t),e}(Tu),Gd=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"/v1/domains/".concat(t.parameters.domain,"/verify")},e.body=function(){},e}return B(e,t),e}(Ru),Fd=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 > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Jd=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 > Domains > General > Read",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return B(e,t),e}(Du),Md=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 > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return B(e,t),e}(Tu),zd=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 > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/verify")},e.body=function(){},e}return B(e,t),e}(Ru),Wd=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 > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Vd=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 > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(){},e}return B(e,t),e}(Tu),$d=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 B(e,t),e}(Du),Hd=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 B(e,t),e}(Du),Yd=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 B(e,t),e}(Du),Zd=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 B(e,t),e}(Du),Kd=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,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(t.parameters.projectId,"/pipelines").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Xd=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"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId)},e.body=function(){},e}return B(e,t),e}(Du),Qd=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"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage)},e.body=function(){},e}return B(e,t),e}(Du),tl=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"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),el=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"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),nl=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,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(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),rl=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"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return B(e,t),e}(Du),ol=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"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs/").concat(t.parameters.runId,"/abort")},e.body=function(){},e}return B(e,t),e}(Ru),il=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="Project > Secrets > 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/projects/".concat(t.parameters.projectId,"/secrets").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),sl=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="Project > Secrets > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),al=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="Project > Secrets > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Bu),ul=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="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Nu),cl=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="Project > Secrets > 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/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId).concat(r)},e.body=function(){},e}return B(e,t),e}(Du),dl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(){},e}return B(e,t),e}(Tu),ll=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),pl=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="Project > Secrets > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/details")},e.body=function(){},e}return B(e,t),e}(Du),hl=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="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),fl=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="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return B(e,t),e}(Du),vl=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="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return B(e,t),e}(Tu),ml=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,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(t.parameters.projectId,"/services").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),bl=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"/v1/projects/".concat(t.parameters.projectId,"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),yl=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"/v1/projects/".concat(t.parameters.projectId,"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Bu),gl=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"/v1/projects/".concat(t.parameters.projectId,"/services/combined/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Nu),wl=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"/v1/projects/".concat(t.parameters.projectId,"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),jl=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"/v1/projects/".concat(t.parameters.projectId,"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Bu),_l=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"/v1/projects/".concat(t.parameters.projectId,"/services/deployment/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Nu),Sl=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"/v1/projects/".concat(t.parameters.projectId,"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),El=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"/v1/projects/".concat(t.parameters.projectId,"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Bu),Pl=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"/v1/projects/".concat(t.parameters.projectId,"/services/build/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Nu),Al=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId)},e.body=function(){},e}return B(e,t),e}(Du),xl=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){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId)},e.body=function(){},e}return B(e,t),e}(Tu),Il=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Cl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(){},e}return B(e,t),e}(Du),kl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Ul=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/restart")},e.body=function(){},e}return B(e,t),e}(Ru),Ol=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pause")},e.body=function(){},e}return B(e,t),e}(Ru),Dl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Rl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(){},e}return B(e,t),e}(Du),Tl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Bl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Nl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Ll=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(){},e}return B(e,t),e}(Du),ql=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Gl=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,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(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Fl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Jl=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return B(e,t),e}(Du),Ml=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"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return B(e,t),e}(Tu),zl=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,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(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/containers").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Wl=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,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(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/branches").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Vl=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,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(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pull-requests").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),$l=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 B(e,t),e}(Du),Hl=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 B(e,t),e}(Ru),Yl=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,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(t.parameters.templateId).concat(r)},e.body=function(){},e}return B(e,t),e}(Du),Zl=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"/v1/templates/".concat(t.parameters.templateId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Kl=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"/v1/templates/".concat(t.parameters.templateId)},e.body=function(){},e}return B(e,t),e}(Tu),Xl=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"/v1/templates/".concat(t.parameters.templateId,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),Ql=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,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(t.parameters.templateId,"/runs").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),tp=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"/v1/templates/".concat(t.parameters.templateId,"/runs/").concat(t.parameters.templateRunId)},e.body=function(){},e}return B(e,t),e}(Du),ep=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"/v1/templates/".concat(t.parameters.templateId,"/runs/").concat(t.parameters.templateRunId,"/abort")},e.body=function(){},e}return B(e,t),e}(Ru),np=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 B(e,t),e}(Du),rp=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,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(t.parameters.vcsService,"/").concat(t.parameters.repositoryOwner,"/").concat(t.parameters.repositoryName,"/branches").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),op=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"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(){},e}return B(e,t),e}(Du),ip=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"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),sp=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"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return B(e,t),e}(Du),ap=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"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),up=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"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return B(e,t),e}(Tu),cp=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"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),dp=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"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),lp=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 > Services > Configuration > View Build Parameters",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(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),pp=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 > Services > Configuration > Update Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),hp=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 > Services > Configuration > View Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments/details")},e.body=function(){},e}return B(e,t),e}(Du),fp=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 > Services > Configuration > View Environment Variables",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(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment").concat(r)},e.body=function(){},e}return B(e,t),e}(Du),vp=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 > Services > Configuration > Update Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return B(e,t),e}(Ru),mp=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 > Services > Configuration > View Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment/details")},e.body=function(){},e}return B(e,t),e}(Du),bp=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 L(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),L(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=N({host:"https://api.northflank.com"},t),r=this.contextWrapper,o={current:n.name,contexts:G(G([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},t.prototype.removeContext=function(t){return L(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:G([],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 L(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=N(N({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.updateToken=function(t,e){return L(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?N(N({},r),{token:t}):e})),s=N(N({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},t.prototype.useProjectId=function(t){return L(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=N(N({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useServiceId=function(t){return L(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=N(N({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useJobId=function(t){return L(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=N(N({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.usePlanId=function(t){return L(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=N(N({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useRegion=function(t){return L(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=N(N({},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 L(this,void 0,void 0,(function(){var e,n;return q(this,(function(r){switch(r.label){case 0:return e=this.contextWrapper,n=N(N({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t}(),yp=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return L(n,void 0,void 0,(function(){var e;return q(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,C.default.promises.mkdir(t,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 3:return[2]}}))}))},n.configPath=e||"".concat(A.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return B(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(C.default.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return L(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,C.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 L(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}(bp),gp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return B(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return L(this,void 0,void 0,(function(){return q(this,(function(e){return this.inMemoryContextWrapper=t,[2]}))}))},e}(bp),wp=function(t,e){void 0===e&&(e={});var n,r=this;this.baseUrl=function(){return r.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new Eu(t,new ml(t,e).call,new Yu(t,e).call),this.exec=new xu(t),this.logs=new Fu(t),this.metrics=new zu(t),this.endpoints={list:(n={},n.projects=new Wu(t,e),n.addons=new Yu(t,e),n.invoices=new Ic(t,e),n.providers=new kc(t,e),n.integrations=new Uc(t,e),n.clusters=new Bc(t,e),n.jobs=new Fc(t,e),n.logSinks=new Ed(t,e),n.registries=new Ud(t,e),n.domains=new Bd(t,e),n.plans=new $d(t,e),n.regions=new Hd(t,e),n.vcs=new Zd(t,e),n.pipelines=new Kd(t,e),n.releaseFlowRuns=new nl(t,e),n.secrets=new il(t,e),n.services=new ml(t,e),n.templates=new $l(t,e),n.templateRuns=new Ql(t,e),n.repos=new np(t,e),n.branches=new rp(t,e),n.volumes=new op(t,e),n),create:function(){var n,r={};return r.project=new Vu(t,e),r.addon=((n=new Zu(t,e)).backupSchedule=new Ec(t,e),n),r.integration=new Oc(t,e),r.cluster=new Nc(t,e),r.job=function(){var n={};return n.manual=new zc(t,e),n.cron=new $c(t,e),n}(),r.logSink=new Pd(t,e),r.domain=new Nd(t,e),r.secret=new sl(t,e),r.service=function(){var n={};return n.combined=new bl(t,e),n.deployment=new wl(t,e),n.build=new Sl(t,e),n}(),r.template=new Hl(t,e),r.volume=new ip(t,e),r}(),get:function(){var n,r,o={};return o.project=new $u(t,e),o.addon=((r=new Xu(t,e)).credentials=new ec(t,e),r.types=new nc(t,e),r.version=new oc(t,e),r.backups=new uc(t,e),r.backup=((n=new dc(t,e)).download=new jc(t,e),n),r.restores=new hc(t,e),r.containers=new vc(t,e),r.backupSchedules=new Sc(t,e),r.pitrWindow=new Ac(t,e),r),o.invoice=function(){var n={};return n.details=new Cc(t,e),n}(),o.integration=new Dc(t,e),o.cluster=new Lc(t,e),o.job=function(){var n=new Jc(t,e);return n.runs=new td(t,e),n.run=new nd(t,e),n.healthChecks=new id(t,e),n.builds=new ad(t,e),n.build=new cd(t,e),n.buildArguments=new hd(t,e),n.buildArgumentDetails=new vd(t,e),n.runtimeEnvironment=new md(t,e),n.runtimeEnvironmentDetails=new yd(t,e),n.deployment=new gd(t,e),n.containers=new jd(t,e),n.branches=new _d(t,e),n.pullRequests=new Sd(t,e),n}(),o.logSink=new Ad(t,e),o.registry=new Dd(t,e),o.domain=new Ld(t,e),o.subdomain=new Jd(t,e),o.dnsId=new Yd(t,e),o.pipeline=new Xd(t,e),o.releaseFlow=new Qd(t,e),o.releaseFlowRun=new rl(t,e),o.secret=new cl(t,e),o.secretDetails=new pl(t,e),o.secretLink=new fl(t,e),o.service=function(){var n=new Al(t,e);return n.deployment=new Cl(t,e),n.ports=new Rl(t,e),n.healthChecks=new Ll(t,e),n.builds=new Gl(t,e),n.build=new Jl(t,e),n.containers=new zl(t,e),n.branches=new Wl(t,e),n.pullRequests=new Vl(t,e),n.buildArguments=new lp(t,e),n.buildArgumentDetails=new hp(t,e),n.runtimeEnvironment=new fp(t,e),n.runtimeEnvironmentDetails=new mp(t,e),n}(),o.template=new Yl(t,e),o.templateRun=new tp(t,e),o.volume=new sp(t,e),o}(),delete:function(){var n,r={};return r.project=new Hu(t,e),r.addon=((n=new tc(t,e)).backupSchedule=new Pc(t,e),n),r.backup=new lc(t,e),r.integration=new Tc(t,e),r.cluster=new Gc(t,e),r.job=new Mc(t,e),r.logSink=new xd(t,e),r.registry=new Rd(t,e),r.domain=new qd(t,e),r.subdomain=new Md(t,e),r.secret=new dl(t,e),r.secretLink=new vl(t,e),r.service=new xl(t,e),r.template=new Kl(t,e),r.volume=new up(t,e),r}(),put:function(){var n,r={};return r.addon=new Ku(t,e),r.job=((n={}).manual=new Wc(t,e),n.cron=new Hc(t,e),n),r.secret=new al(t,e),r.service=function(){var n={};return n.combined=new yl(t,e),n.deployment=new jl(t,e),n.build=new El(t,e),n}(),r}(),patch:function(){var n,r={};return r.addon=new Qu(t,e),r.job=((n={}).manual=new Vc(t,e),n.cron=new Yc(t,e),n),r.secret=new ul(t,e),r.service=function(){var n={};return n.combined=new gl(t,e),n.deployment=new _l(t,e),n.build=new Pl(t,e),n}(),r}(),scale:function(){var n={};return n.addon=new rc(t,e),n.job=new Zc(t,e),n.service=new Il(t,e),n}(),update:function(){var n,r={};return r.addon=((n={}).version=new ic(t,e),n.networkSettings=new sc(t,e),n.security=new ac(t,e),n),r.integration=new Rc(t,e),r.cluster=new qc(t,e),r.job=function(){var n={};return n.settings=new od(t,e),n.healthChecks=new sd(t,e),n.buildOptions=new ld(t,e),n.buildSource=new pd(t,e),n.buildArguments=new fd(t,e),n.runtimeEnvironment=new bd(t,e),n.deployment=new wd(t,e),n}(),r.logSink=new Id(t,e),r.registry=new Td(t,e),r.releaseFlow=new tl(t,e),r.secret=new ll(t,e),r.secretLink=new hl(t,e),r.service=function(){var n={};return n.deployment=new kl(t,e),n.ports=new Tl(t,e),n.buildOptions=new Bl(t,e),n.buildSource=new Nl(t,e),n.healthChecks=new ql(t,e),n.buildArguments=new pp(t,e),n.runtimeEnvironment=new vp(t,e),n}(),r.template=new Zl(t,e),r.volume=new ap(t,e),r}(),backup:function(){var n={};return n.addon=new cc(t,e),n}(),restore:function(){var n,r={};return r.addon=((n={}).backup=new pc(t,e),n),r}(),import:function(){var n,r={};return r.addon=((n={}).backup=new fc(t,e),n),r}(),pause:function(){var n={};return n.addon=new mc(t,e),n.job=new Xc(t,e),n.logSink=new Cd(t,e),n.service=new Ol(t,e),n}(),resume:function(){var n={};return n.addon=new bc(t,e),n.job=new Qc(t,e),n.logSink=new kd(t,e),n.service=new Dl(t,e),n}(),restart:function(){var n={};return n.addon=new yc(t,e),n.service=new Ul(t,e),n}(),abort:function(){var n,r={};return r.addon=((n={}).backup=new gc(t,e),n.restore=new _c(t,e),n),r.job=function(){var n={};return n.run=new rd(t,e),n.build=new dd(t,e),n}(),r.releaseFlowRun=new ol(t,e),r.service=function(){var n={};return n.build=new Ml(t,e),n}(),r.templateRun=new ep(t,e),r}(),retain:function(){var n,r={};return r.addon=((n={}).backup=new wc(t,e),n),r}(),start:function(){var n,r={};return r.addon=((n={}).pitr=new xc(t,e),n),r.job=function(){var n={};return n.run=new ed(t,e),n.build=new ud(t,e),n}(),r.service=function(){var n={};return n.build=new Fl(t,e),n}(),r}(),suspend:function(){var n={};return n.job=new Kc(t,e),n}(),add:function(){var n,r={};return r.registry=new Od(t,e),r.domain=((n={}).subdomain=new Fd(t,e),n),r}(),verify:function(){var n={};return n.domain=new Gd(t,e),n.subdomain=new zd(t,e),n}(),assign:function(){var n,r={};return r.subdomain=((n={}).service=new Wd(t,e),n),r}(),unassign:function(){var n={};return n.subdomain=new Vd(t,e),n}(),run:function(){var n={};return n.releaseFlow=new el(t,e),n.template=new Xl(t,e),n}(),attach:function(){var n={};return n.volume=new cp(t,e),n}(),detach:function(){var n={};return n.volume=new dp(t,e),n}()},this.list=function(){var t={};return t.projects=r.endpoints.list.projects.call,t.addons=r.endpoints.list.addons.call,t.invoices=r.endpoints.list.invoices.call,t.providers=r.endpoints.list.providers.call,t.integrations=r.endpoints.list.integrations.call,t.clusters=r.endpoints.list.clusters.call,t.jobs=r.endpoints.list.jobs.call,t.logSinks=r.endpoints.list.logSinks.call,t.registries=r.endpoints.list.registries.call,t.domains=r.endpoints.list.domains.call,t.plans=r.endpoints.list.plans.call,t.regions=r.endpoints.list.regions.call,t.vcs=r.endpoints.list.vcs.call,t.pipelines=r.endpoints.list.pipelines.call,t.releaseFlowRuns=r.endpoints.list.releaseFlowRuns.call,t.secrets=r.endpoints.list.secrets.call,t.services=r.endpoints.list.services.call,t.templates=r.endpoints.list.templates.call,t.templateRuns=r.endpoints.list.templateRuns.call,t.repos=r.endpoints.list.repos.call,t.branches=r.endpoints.list.branches.call,t.volumes=r.endpoints.list.volumes.call,t}(),this.create=function(){var t,e={};return e.project=r.endpoints.create.project.call,e.addon=((t=r.endpoints.create.addon.call).backupSchedule=r.endpoints.create.addon.backupSchedule.call,t),e.integration=r.endpoints.create.integration.call,e.cluster=r.endpoints.create.cluster.call,e.job=function(){var t={};return t.manual=r.endpoints.create.job.manual.call,t.cron=r.endpoints.create.job.cron.call,t}(),e.logSink=r.endpoints.create.logSink.call,e.domain=r.endpoints.create.domain.call,e.secret=r.endpoints.create.secret.call,e.service=function(){var t={};return t.combined=r.endpoints.create.service.combined.call,t.deployment=r.endpoints.create.service.deployment.call,t.build=r.endpoints.create.service.build.call,t}(),e.template=r.endpoints.create.template.call,e.volume=r.endpoints.create.volume.call,e}(),this.get=function(){var t,e,n={};return n.project=r.endpoints.get.project.call,n.addon=((e=r.endpoints.get.addon.call).credentials=r.endpoints.get.addon.credentials.call,e.types=r.endpoints.get.addon.types.call,e.version=r.endpoints.get.addon.version.call,e.backups=r.endpoints.get.addon.backups.call,e.backup=((t=r.endpoints.get.addon.backup.call).download=r.endpoints.get.addon.backup.download.call,t),e.restores=r.endpoints.get.addon.restores.call,e.containers=r.endpoints.get.addon.containers.call,e.backupSchedules=r.endpoints.get.addon.backupSchedules.call,e.pitrWindow=r.endpoints.get.addon.pitrWindow.call,e),n.invoice=function(){var t={};return t.details=r.endpoints.get.invoice.details.call,t}(),n.integration=r.endpoints.get.integration.call,n.cluster=r.endpoints.get.cluster.call,n.job=function(){var t=r.endpoints.get.job.call;return t.runs=r.endpoints.get.job.runs.call,t.run=r.endpoints.get.job.run.call,t.healthChecks=r.endpoints.get.job.healthChecks.call,t.builds=r.endpoints.get.job.builds.call,t.build=r.endpoints.get.job.build.call,t.buildArguments=r.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=r.endpoints.get.job.buildArgumentDetails.call,t.runtimeEnvironment=r.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=r.endpoints.get.job.runtimeEnvironmentDetails.call,t.deployment=r.endpoints.get.job.deployment.call,t.containers=r.endpoints.get.job.containers.call,t.branches=r.endpoints.get.job.branches.call,t.pullRequests=r.endpoints.get.job.pullRequests.call,t}(),n.logSink=r.endpoints.get.logSink.call,n.registry=r.endpoints.get.registry.call,n.domain=r.endpoints.get.domain.call,n.subdomain=r.endpoints.get.subdomain.call,n.dnsId=r.endpoints.get.dnsId.call,n.pipeline=r.endpoints.get.pipeline.call,n.releaseFlow=r.endpoints.get.releaseFlow.call,n.releaseFlowRun=r.endpoints.get.releaseFlowRun.call,n.secret=r.endpoints.get.secret.call,n.secretDetails=r.endpoints.get.secretDetails.call,n.secretLink=r.endpoints.get.secretLink.call,n.service=function(){var t=r.endpoints.get.service.call;return t.deployment=r.endpoints.get.service.deployment.call,t.ports=r.endpoints.get.service.ports.call,t.healthChecks=r.endpoints.get.service.healthChecks.call,t.builds=r.endpoints.get.service.builds.call,t.build=r.endpoints.get.service.build.call,t.containers=r.endpoints.get.service.containers.call,t.branches=r.endpoints.get.service.branches.call,t.pullRequests=r.endpoints.get.service.pullRequests.call,t.buildArguments=r.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=r.endpoints.get.service.buildArgumentDetails.call,t.runtimeEnvironment=r.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=r.endpoints.get.service.runtimeEnvironmentDetails.call,t}(),n.template=r.endpoints.get.template.call,n.templateRun=r.endpoints.get.templateRun.call,n.volume=r.endpoints.get.volume.call,n}(),this.delete=function(){var t,e={};return e.project=r.endpoints.delete.project.call,e.addon=((t=r.endpoints.delete.addon.call).backupSchedule=r.endpoints.delete.addon.backupSchedule.call,t),e.backup=r.endpoints.delete.backup.call,e.integration=r.endpoints.delete.integration.call,e.cluster=r.endpoints.delete.cluster.call,e.job=r.endpoints.delete.job.call,e.logSink=r.endpoints.delete.logSink.call,e.registry=r.endpoints.delete.registry.call,e.domain=r.endpoints.delete.domain.call,e.subdomain=r.endpoints.delete.subdomain.call,e.secret=r.endpoints.delete.secret.call,e.secretLink=r.endpoints.delete.secretLink.call,e.service=r.endpoints.delete.service.call,e.template=r.endpoints.delete.template.call,e.volume=r.endpoints.delete.volume.call,e}(),this.put=function(){var t,e={};return e.addon=r.endpoints.put.addon.call,e.job=((t={}).manual=r.endpoints.put.job.manual.call,t.cron=r.endpoints.put.job.cron.call,t),e.secret=r.endpoints.put.secret.call,e.service=function(){var t={};return t.combined=r.endpoints.put.service.combined.call,t.deployment=r.endpoints.put.service.deployment.call,t.build=r.endpoints.put.service.build.call,t}(),e}(),this.patch=function(){var t,e={};return e.addon=r.endpoints.patch.addon.call,e.job=((t={}).manual=r.endpoints.patch.job.manual.call,t.cron=r.endpoints.patch.job.cron.call,t),e.secret=r.endpoints.patch.secret.call,e.service=function(){var t={};return t.combined=r.endpoints.patch.service.combined.call,t.deployment=r.endpoints.patch.service.deployment.call,t.build=r.endpoints.patch.service.build.call,t}(),e}(),this.scale=function(){var t={};return t.addon=r.endpoints.scale.addon.call,t.job=r.endpoints.scale.job.call,t.service=r.endpoints.scale.service.call,t}(),this.update=function(){var t,e={};return e.addon=((t={}).version=r.endpoints.update.addon.version.call,t.networkSettings=r.endpoints.update.addon.networkSettings.call,t.security=r.endpoints.update.addon.security.call,t),e.integration=r.endpoints.update.integration.call,e.cluster=r.endpoints.update.cluster.call,e.job=function(){var t={};return t.settings=r.endpoints.update.job.settings.call,t.healthChecks=r.endpoints.update.job.healthChecks.call,t.buildOptions=r.endpoints.update.job.buildOptions.call,t.buildSource=r.endpoints.update.job.buildSource.call,t.buildArguments=r.endpoints.update.job.buildArguments.call,t.runtimeEnvironment=r.endpoints.update.job.runtimeEnvironment.call,t.deployment=r.endpoints.update.job.deployment.call,t}(),e.logSink=r.endpoints.update.logSink.call,e.registry=r.endpoints.update.registry.call,e.releaseFlow=r.endpoints.update.releaseFlow.call,e.secret=r.endpoints.update.secret.call,e.secretLink=r.endpoints.update.secretLink.call,e.service=function(){var t={};return t.deployment=r.endpoints.update.service.deployment.call,t.ports=r.endpoints.update.service.ports.call,t.buildOptions=r.endpoints.update.service.buildOptions.call,t.buildSource=r.endpoints.update.service.buildSource.call,t.healthChecks=r.endpoints.update.service.healthChecks.call,t.buildArguments=r.endpoints.update.service.buildArguments.call,t.runtimeEnvironment=r.endpoints.update.service.runtimeEnvironment.call,t}(),e.template=r.endpoints.update.template.call,e.volume=r.endpoints.update.volume.call,e}(),this.backup=function(){var t={};return t.addon=r.endpoints.backup.addon.call,t}(),this.restore=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.restore.addon.backup.call,t),e}(),this.import=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.import.addon.backup.call,t),e}(),this.pause=function(){var t={};return t.addon=r.endpoints.pause.addon.call,t.job=r.endpoints.pause.job.call,t.logSink=r.endpoints.pause.logSink.call,t.service=r.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.addon=r.endpoints.resume.addon.call,t.job=r.endpoints.resume.job.call,t.logSink=r.endpoints.resume.logSink.call,t.service=r.endpoints.resume.service.call,t}(),this.restart=function(){var t={};return t.addon=r.endpoints.restart.addon.call,t.service=r.endpoints.restart.service.call,t}(),this.abort=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.abort.addon.backup.call,t.restore=r.endpoints.abort.addon.restore.call,t),e.job=function(){var t={};return t.run=r.endpoints.abort.job.run.call,t.build=r.endpoints.abort.job.build.call,t}(),e.releaseFlowRun=r.endpoints.abort.releaseFlowRun.call,e.service=function(){var t={};return t.build=r.endpoints.abort.service.build.call,t}(),e.templateRun=r.endpoints.abort.templateRun.call,e}(),this.retain=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.retain.addon.backup.call,t),e}(),this.start=function(){var t,e={};return e.addon=((t={}).pitr=r.endpoints.start.addon.pitr.call,t),e.job=function(){var t={};return t.run=r.endpoints.start.job.run.call,t.build=r.endpoints.start.job.build.call,t}(),e.service=function(){var t={};return t.build=r.endpoints.start.service.build.call,t}(),e}(),this.suspend=function(){var t={};return t.job=r.endpoints.suspend.job.call,t}(),this.add=function(){var t,e={};return e.registry=r.endpoints.add.registry.call,e.domain=((t={}).subdomain=r.endpoints.add.domain.subdomain.call,t),e}(),this.verify=function(){var t={};return t.domain=r.endpoints.verify.domain.call,t.subdomain=r.endpoints.verify.subdomain.call,t}(),this.assign=function(){var t,e={};return e.subdomain=((t={}).service=r.endpoints.assign.subdomain.service.call,t),e}(),this.unassign=function(){var t={};return t.subdomain=r.endpoints.unassign.subdomain.call,t}(),this.run=function(){var t={};return t.releaseFlow=r.endpoints.run.releaseFlow.call,t.template=r.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=r.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=r.endpoints.detach.volume.call,t}()};exports.AbortAddonBackupEndpoint=gc,exports.AbortAddonRestoreEndpoint=_c,exports.AbortJobBuildEndpoint=dd,exports.AbortJobRunEndpoint=rd,exports.AbortReleaseflowrunEndpoint=ol,exports.AbortServiceBuildEndpoint=Ml,exports.AbortTemplaterunEndpoint=ep,exports.AddDomainSubdomainEndpoint=Fd,exports.AddRegistryEndpoint=Od,exports.ApiClient=wp,exports.ApiClientContextProvider=bp,exports.ApiClientFileContextProvider=yp,exports.ApiClientInMemoryContextProvider=gp,exports.ApiEndpoint=Ou,exports.AssignSubdomainServiceEndpoint=Wd,exports.AttachVolumeEndpoint=cp,exports.BackupAddonEndpoint=cc,exports.CreateAddonBackupscheduleEndpoint=Ec,exports.CreateAddonEndpoint=Zu,exports.CreateClusterEndpoint=Nc,exports.CreateDomainEndpoint=Nd,exports.CreateIntegrationEndpoint=Oc,exports.CreateJobCronEndpoint=$c,exports.CreateJobManualEndpoint=zc,exports.CreateLogsinkEndpoint=Pd,exports.CreateProjectEndpoint=Vu,exports.CreateSecretEndpoint=sl,exports.CreateServiceBuildEndpoint=Sl,exports.CreateServiceCombinedEndpoint=bl,exports.CreateServiceDeploymentEndpoint=wl,exports.CreateTemplateEndpoint=Hl,exports.CreateVolumeEndpoint=ip,exports.DeleteAddonBackupscheduleEndpoint=Pc,exports.DeleteAddonEndpoint=tc,exports.DeleteApiEndpoint=Tu,exports.DeleteBackupEndpoint=lc,exports.DeleteClusterEndpoint=Gc,exports.DeleteDomainEndpoint=qd,exports.DeleteIntegrationEndpoint=Tc,exports.DeleteJobEndpoint=Mc,exports.DeleteLogsinkEndpoint=xd,exports.DeleteProjectEndpoint=Hu,exports.DeleteRegistryEndpoint=Rd,exports.DeleteSecretEndpoint=dl,exports.DeleteSecretlinkEndpoint=vl,exports.DeleteServiceEndpoint=xl,exports.DeleteSubdomainEndpoint=Md,exports.DeleteTemplateEndpoint=Kl,exports.DeleteVolumeEndpoint=up,exports.DetachVolumeEndpoint=dp,exports.ExecCommandStandard=Au,exports.GetAddonBackupDownloadEndpoint=jc,exports.GetAddonBackupEndpoint=dc,exports.GetAddonBackupsEndpoint=uc,exports.GetAddonBackupschedulesEndpoint=Sc,exports.GetAddonContainersEndpoint=vc,exports.GetAddonCredentialsEndpoint=ec,exports.GetAddonEndpoint=Xu,exports.GetAddonPitrwindowEndpoint=Ac,exports.GetAddonRestoresEndpoint=hc,exports.GetAddonTypesEndpoint=nc,exports.GetAddonVersionEndpoint=oc,exports.GetApiEndpoint=Du,exports.GetClusterEndpoint=Lc,exports.GetDnsidEndpoint=Yd,exports.GetDomainEndpoint=Ld,exports.GetIntegrationEndpoint=Dc,exports.GetInvoiceDetailsEndpoint=Cc,exports.GetJobBranchesEndpoint=_d,exports.GetJobBuildEndpoint=cd,exports.GetJobBuildargumentdetailsEndpoint=vd,exports.GetJobBuildargumentsEndpoint=hd,exports.GetJobBuildsEndpoint=ad,exports.GetJobContainersEndpoint=jd,exports.GetJobDeploymentEndpoint=gd,exports.GetJobEndpoint=Jc,exports.GetJobHealthchecksEndpoint=id,exports.GetJobPullrequestsEndpoint=Sd,exports.GetJobRunEndpoint=nd,exports.GetJobRunsEndpoint=td,exports.GetJobRuntimeenvironmentEndpoint=md,exports.GetJobRuntimeenvironmentdetailsEndpoint=yd,exports.GetLogsinkEndpoint=Ad,exports.GetPipelineEndpoint=Xd,exports.GetProjectEndpoint=$u,exports.GetRegistryEndpoint=Dd,exports.GetReleaseflowEndpoint=Qd,exports.GetReleaseflowrunEndpoint=rl,exports.GetSecretEndpoint=cl,exports.GetSecretdetailsEndpoint=pl,exports.GetSecretlinkEndpoint=fl,exports.GetServiceBranchesEndpoint=Wl,exports.GetServiceBuildEndpoint=Jl,exports.GetServiceBuildargumentdetailsEndpoint=hp,exports.GetServiceBuildargumentsEndpoint=lp,exports.GetServiceBuildsEndpoint=Gl,exports.GetServiceContainersEndpoint=zl,exports.GetServiceDeploymentEndpoint=Cl,exports.GetServiceEndpoint=Al,exports.GetServiceHealthchecksEndpoint=Ll,exports.GetServicePortsEndpoint=Rl,exports.GetServicePullrequestsEndpoint=Vl,exports.GetServiceRuntimeenvironmentEndpoint=fp,exports.GetServiceRuntimeenvironmentdetailsEndpoint=mp,exports.GetSubdomainEndpoint=Jd,exports.GetTemplateEndpoint=Yl,exports.GetTemplaterunEndpoint=tp,exports.GetVolumeEndpoint=sp,exports.ImportAddonBackupEndpoint=fc,exports.ListAddonsEndpoint=Yu,exports.ListBranchesEndpoint=rp,exports.ListClustersEndpoint=Bc,exports.ListDomainsEndpoint=Bd,exports.ListIntegrationsEndpoint=Uc,exports.ListInvoicesEndpoint=Ic,exports.ListJobsEndpoint=Fc,exports.ListLogsinksEndpoint=Ed,exports.ListPipelinesEndpoint=Kd,exports.ListPlansEndpoint=$d,exports.ListProjectsEndpoint=Wu,exports.ListProvidersEndpoint=kc,exports.ListRegionsEndpoint=Hd,exports.ListRegistriesEndpoint=Ud,exports.ListReleaseflowrunsEndpoint=nl,exports.ListReposEndpoint=np,exports.ListSecretsEndpoint=il,exports.ListServicesEndpoint=ml,exports.ListTemplaterunsEndpoint=Ql,exports.ListTemplatesEndpoint=$l,exports.ListVcsEndpoint=Zd,exports.ListVolumesEndpoint=op,exports.NorthflankApiCallError=Iu,exports.NorthflankExecCommand=xu,exports.NorthflankLogFetch=Fu,exports.NorthflankMetricFetch=zu,exports.NorthflankPortForwarder=Eu,exports.PatchAddonEndpoint=Qu,exports.PatchApiEndpoint=Nu,exports.PatchJobCronEndpoint=Yc,exports.PatchJobManualEndpoint=Vc,exports.PatchSecretEndpoint=ul,exports.PatchServiceBuildEndpoint=Pl,exports.PatchServiceCombinedEndpoint=gl,exports.PatchServiceDeploymentEndpoint=_l,exports.PauseAddonEndpoint=mc,exports.PauseJobEndpoint=Xc,exports.PauseLogsinkEndpoint=Cd,exports.PauseServiceEndpoint=Ol,exports.PostApiEndpoint=Ru,exports.PutAddonEndpoint=Ku,exports.PutApiEndpoint=Bu,exports.PutJobCronEndpoint=Hc,exports.PutJobManualEndpoint=Wc,exports.PutSecretEndpoint=al,exports.PutServiceBuildEndpoint=El,exports.PutServiceCombinedEndpoint=yl,exports.PutServiceDeploymentEndpoint=jl,exports.RestartAddonEndpoint=yc,exports.RestartServiceEndpoint=Ul,exports.RestoreAddonBackupEndpoint=pc,exports.ResumeAddonEndpoint=bc,exports.ResumeJobEndpoint=Qc,exports.ResumeLogsinkEndpoint=kd,exports.ResumeServiceEndpoint=Dl,exports.RetainAddonBackupEndpoint=wc,exports.RunReleaseflowEndpoint=el,exports.RunTemplateEndpoint=Xl,exports.ScaleAddonEndpoint=rc,exports.ScaleJobEndpoint=Zc,exports.ScaleServiceEndpoint=Il,exports.StartAddonPitrEndpoint=xc,exports.StartJobBuildEndpoint=ud,exports.StartJobRunEndpoint=ed,exports.StartServiceBuildEndpoint=Fl,exports.SuspendJobEndpoint=Kc,exports.UnassignSubdomainEndpoint=Vd,exports.UpdateAddonNetworksettingsEndpoint=sc,exports.UpdateAddonSecurityEndpoint=ac,exports.UpdateAddonVersionEndpoint=ic,exports.UpdateClusterEndpoint=qc,exports.UpdateIntegrationEndpoint=Rc,exports.UpdateJobBuildargumentsEndpoint=fd,exports.UpdateJobBuildoptionsEndpoint=ld,exports.UpdateJobBuildsourceEndpoint=pd,exports.UpdateJobDeploymentEndpoint=wd,exports.UpdateJobHealthchecksEndpoint=sd,exports.UpdateJobRuntimeenvironmentEndpoint=bd,exports.UpdateJobSettingsEndpoint=od,exports.UpdateLogsinkEndpoint=Id,exports.UpdateRegistryEndpoint=Td,exports.UpdateReleaseflowEndpoint=tl,exports.UpdateSecretEndpoint=ll,exports.UpdateSecretlinkEndpoint=hl,exports.UpdateServiceBuildargumentsEndpoint=pp,exports.UpdateServiceBuildoptionsEndpoint=Bl,exports.UpdateServiceBuildsourceEndpoint=Nl,exports.UpdateServiceDeploymentEndpoint=kl,exports.UpdateServiceHealthchecksEndpoint=ql,exports.UpdateServicePortsEndpoint=Tl,exports.UpdateServiceRuntimeenvironmentEndpoint=vp,exports.UpdateTemplateEndpoint=Zl,exports.UpdateVolumeEndpoint=ap,exports.VerifyDomainEndpoint=Gd,exports.VerifySubdomainEndpoint=zd;
|