@northflank/js-client 0.7.27 → 0.8.2
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/README.md +2 -0
- package/dist/cjs/api-client.d.ts +664 -120
- package/dist/cjs/api-client.js +1 -1
- package/dist/esm/api-client.d.ts +664 -120
- package/dist/esm/api-client.js +1 -1
- package/package.json +15 -2
package/dist/esm/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{EventEmitter as t}from"events";import{execSync as n,spawn as r}from"child_process";import*as o from"stream";import i,{Transform as a}from"stream";import s from"os";import*as c from"net";import u,{Socket as d}from"net";import l from"fs";import p from"path";import f from"https";import h from"http";import v from"tls";import m from"crypto";import g,{fileURLToPath as b}from"url";import w from"zlib";import y from"buffer";import I from"dgram";var j=function(e,t){return j=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])},j(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}j(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var U=function(){return U=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},U.apply(this,arguments)};function _(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function C(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function E(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var S="object"==typeof global&&global&&global.Object===Object&&global,P="object"==typeof self&&self&&self.Object===Object&&self,k=S||P||Function("return this")(),A=k.Symbol,q=Object.prototype,x=q.hasOwnProperty,O=q.toString,N=A?A.toStringTag:void 0;var T=Object.prototype.toString;var G=A?A.toStringTag:void 0;function L(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?function(e){var t=x.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var o=O.call(e);return r&&(t?e[N]=n:delete e[N]),o}(e):function(e){return T.call(e)}(e)}function D(e){return null!=e&&"object"==typeof e}function B(e){return"symbol"==typeof e||D(e)&&"[object Symbol]"==L(e)}function J(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 F=Array.isArray,M=A?A.prototype:void 0,W=M?M.toString:void 0;function z(e){if("string"==typeof e)return e;if(F(e))return J(e,z)+"";if(B(e))return W?W.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function V(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $(e){return e}function H(e){if(!V(e))return!1;var t=L(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Y,X=k["__core-js_shared__"],K=(Y=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var Z=Function.prototype.toString;function Q(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ee=/^\[object .+?Constructor\]$/,te=Function.prototype,ne=Object.prototype,re=te.toString,oe=ne.hasOwnProperty,ie=RegExp("^"+re.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ae(e){return!(!V(e)||(t=e,K&&K in t))&&(H(e)?ie:ee).test(Q(e));var t}function se(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ae(n)?n:void 0}var ce=se(k,"WeakMap"),ue=Object.create,de=function(){function e(){}return function(t){if(!V(t))return{};if(ue)return ue(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var le=Date.now;var pe,fe,he,ve=function(){try{var e=se(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),me=ve,ge=me?function(e,t){return me(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:$,be=(pe=ge,fe=0,he=0,function(){var e=le(),t=16-(e-he);if(he=e,t>0){if(++fe>=800)return arguments[0]}else fe=0;return pe.apply(void 0,arguments)}),we=/^(?:0|[1-9]\d*)$/;function ye(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function Ie(e,t,n){"__proto__"==t&&me?me(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function je(e,t){return e===t||e!=e&&t!=t}var Re=Object.prototype.hasOwnProperty;function Ue(e,t,n){var r=e[t];Re.call(e,t)&&je(r,n)&&(void 0!==n||t in e)||Ie(e,t,n)}var _e=Math.max;function Ce(e,t){return be(function(e,t,n){return t=_e(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=_e(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,$),e+"")}function Ee(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Se(e){return null!=e&&Ee(e.length)&&!H(e)}var Pe=Object.prototype;function ke(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function Ae(e){return D(e)&&"[object Arguments]"==L(e)}var qe=Object.prototype,xe=qe.hasOwnProperty,Oe=qe.propertyIsEnumerable,Ne=Ae(function(){return arguments}())?Ae:function(e){return D(e)&&xe.call(e,"callee")&&!Oe.call(e,"callee")};var Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ge=Te&&"object"==typeof module&&module&&!module.nodeType&&module,Le=Ge&&Ge.exports===Te?k.Buffer:void 0,De=(Le?Le.isBuffer:void 0)||function(){return!1},Be={};Be["[object Float32Array]"]=Be["[object Float64Array]"]=Be["[object Int8Array]"]=Be["[object Int16Array]"]=Be["[object Int32Array]"]=Be["[object Uint8Array]"]=Be["[object Uint8ClampedArray]"]=Be["[object Uint16Array]"]=Be["[object Uint32Array]"]=!0,Be["[object Arguments]"]=Be["[object Array]"]=Be["[object ArrayBuffer]"]=Be["[object Boolean]"]=Be["[object DataView]"]=Be["[object Date]"]=Be["[object Error]"]=Be["[object Function]"]=Be["[object Map]"]=Be["[object Number]"]=Be["[object Object]"]=Be["[object RegExp]"]=Be["[object Set]"]=Be["[object String]"]=Be["[object WeakMap]"]=!1;var Je="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fe=Je&&"object"==typeof module&&module&&!module.nodeType&&module,Me=Fe&&Fe.exports===Je&&S.process,We=function(){try{var e=Fe&&Fe.require&&Fe.require("util").types;return e||Me&&Me.binding&&Me.binding("util")}catch(e){}}(),ze=We&&We.isTypedArray,Ve=ze?function(e){return function(t){return e(t)}}(ze):function(e){return D(e)&&Ee(e.length)&&!!Be[L(e)]},$e=Ve,He=Object.prototype.hasOwnProperty;function Ye(e,t){var n=F(e),r=!n&&Ne(e),o=!n&&!r&&De(e),i=!n&&!r&&!o&&$e(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!He.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ye(u,c))||s.push(u);return s}function Xe(e,t){return function(n){return e(t(n))}}var Ke=Xe(Object.keys,Object),Ze=Object.prototype.hasOwnProperty;function Qe(e){return Se(e)?Ye(e):function(e){if(!ke(e))return Ke(e);var t=[];for(var n in Object(e))Ze.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var et=Object.prototype.hasOwnProperty;function tt(e){if(!V(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ke(e),n=[];for(var r in e)("constructor"!=r||!t&&et.call(e,r))&&n.push(r);return n}function nt(e){return Se(e)?Ye(e,!0):tt(e)}var rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ot=/^\w*$/;function it(e,t){if(F(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!B(e))||(ot.test(e)||!rt.test(e)||null!=t&&e in Object(t))}var at=se(Object,"create");var st=Object.prototype.hasOwnProperty;var ct=Object.prototype.hasOwnProperty;function ut(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function dt(e,t){for(var n=e.length;n--;)if(je(e[n][0],t))return n;return-1}ut.prototype.clear=function(){this.__data__=at?at(null):{},this.size=0},ut.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ut.prototype.get=function(e){var t=this.__data__;if(at){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return st.call(t,e)?t[e]:void 0},ut.prototype.has=function(e){var t=this.__data__;return at?void 0!==t[e]:ct.call(t,e)},ut.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=at&&void 0===t?"__lodash_hash_undefined__":t,this};var lt=Array.prototype.splice;function pt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(e){var t=this.__data__,n=dt(t,e);return!(n<0)&&(n==t.length-1?t.pop():lt.call(t,n,1),--this.size,!0)},pt.prototype.get=function(e){var t=this.__data__,n=dt(t,e);return n<0?void 0:t[n][1]},pt.prototype.has=function(e){return dt(this.__data__,e)>-1},pt.prototype.set=function(e,t){var n=this.__data__,r=dt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ft=se(k,"Map");function ht(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 vt(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])}}vt.prototype.clear=function(){this.size=0,this.__data__={hash:new ut,map:new(ft||pt),string:new ut}},vt.prototype.delete=function(e){var t=ht(this,e).delete(e);return this.size-=t?1:0,t},vt.prototype.get=function(e){return ht(this,e).get(e)},vt.prototype.has=function(e){return ht(this,e).has(e)},vt.prototype.set=function(e,t){var n=ht(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function mt(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 a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(mt.Cache||vt),n}mt.Cache=vt;var gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bt=/\\(\\)?/g,wt=function(e){var t=mt(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(gt,(function(e,n,r,o){t.push(r?o.replace(bt,"$1"):n||e)})),t})),yt=wt;function It(e){return null==e?"":z(e)}function jt(e,t){return F(e)?e:it(e,t)?[e]:yt(It(e))}function Rt(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ut(e,t){for(var n=0,r=(t=jt(t,e)).length;null!=e&&n<r;)e=e[Rt(t[n++])];return n&&n==r?e:void 0}function _t(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Ct=A?A.isConcatSpreadable:void 0;function Et(e){return F(e)||Ne(e)||!!(Ct&&e&&e[Ct])}function St(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Et),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?St(s,t-1,n,r,o):_t(o,s):r||(o[o.length]=s)}return o}var Pt=Xe(Object.getPrototypeOf,Object),kt=Function.prototype,At=Object.prototype,qt=kt.toString,xt=At.hasOwnProperty,Ot=qt.call(Object);function Nt(e){var t=this.__data__=new pt(e);this.size=t.size}Nt.prototype.clear=function(){this.__data__=new pt,this.size=0},Nt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Nt.prototype.get=function(e){return this.__data__.get(e)},Nt.prototype.has=function(e){return this.__data__.has(e)},Nt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof pt){var r=n.__data__;if(!ft||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new vt(r)}return n.set(e,t),this.size=n.size,this};var Tt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Gt=Tt&&"object"==typeof module&&module&&!module.nodeType&&module,Lt=Gt&&Gt.exports===Tt?k.Buffer:void 0,Dt=Lt?Lt.allocUnsafe:void 0;var Bt=Object.prototype.propertyIsEnumerable,Jt=Object.getOwnPropertySymbols,Ft=Jt?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 a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(Jt(e),(function(t){return Bt.call(e,t)})))}:function(){return[]};function Mt(e){return function(e,t,n){var r=t(e);return F(e)?r:_t(r,n(e))}(e,Qe,Ft)}var Wt=se(k,"DataView"),zt=se(k,"Promise"),Vt=se(k,"Set"),$t="[object Map]",Ht="[object Promise]",Yt="[object Set]",Xt="[object WeakMap]",Kt="[object DataView]",Zt=Q(Wt),Qt=Q(ft),en=Q(zt),tn=Q(Vt),nn=Q(ce),rn=L;(Wt&&rn(new Wt(new ArrayBuffer(1)))!=Kt||ft&&rn(new ft)!=$t||zt&&rn(zt.resolve())!=Ht||Vt&&rn(new Vt)!=Yt||ce&&rn(new ce)!=Xt)&&(rn=function(e){var t=L(e),n="[object Object]"==t?e.constructor:void 0,r=n?Q(n):"";if(r)switch(r){case Zt:return Kt;case Qt:return $t;case en:return Ht;case tn:return Yt;case nn:return Xt}return t});var on=rn,an=k.Uint8Array;function sn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new an(r).set(new an(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function cn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new vt;++t<n;)this.add(e[t])}function un(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}cn.prototype.add=cn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},cn.prototype.has=function(e){return this.__data__.has(e)};function dn(e,t,n,r,o,i){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var l=-1,p=!0,f=2&n?new cn:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var h=e[l],v=t[l];if(r)var m=a?r(v,h,l,t,e,i):r(h,v,l,e,t,i);if(void 0!==m){if(m)continue;p=!1;break}if(f){if(!un(t,(function(e,t){if(a=t,!f.has(a)&&(h===e||o(h,e,n,r,i)))return f.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var fn=A?A.prototype:void 0,hn=fn?fn.valueOf:void 0;var vn=Object.prototype.hasOwnProperty;var mn="[object Arguments]",gn="[object Array]",bn="[object Object]",wn=Object.prototype.hasOwnProperty;function yn(e,t,n,r,o,i){var a=F(e),s=F(t),c=a?gn:on(e),u=s?gn:on(t),d=(c=c==mn?bn:c)==bn,l=(u=u==mn?bn:u)==bn,p=c==u;if(p&&De(e)){if(!De(t))return!1;a=!0,d=!1}if(p&&!d)return i||(i=new Nt),a||$e(e)?dn(e,t,n,r,o,i):function(e,t,n,r,o,i,a){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 an(e),new an(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return je(+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 s=ln;case"[object Set]":var c=1&r;if(s||(s=pn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var d=dn(s(e),s(t),r,o,i,a);return a.delete(e),d;case"[object Symbol]":if(hn)return hn.call(e)==hn.call(t)}return!1}(e,t,c,n,r,o,i);if(!(1&n)){var f=d&&wn.call(e,"__wrapped__"),h=l&&wn.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new Nt),o(v,m,n,r,i)}}return!!p&&(i||(i=new Nt),function(e,t,n,r,o,i){var a=1&n,s=Mt(e),c=s.length;if(c!=Mt(t).length&&!a)return!1;for(var u=c;u--;){var d=s[u];if(!(a?d in t:vn.call(t,d)))return!1}var l=i.get(e),p=i.get(t);if(l&&p)return l==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<c;){var v=e[d=s[u]],m=t[d];if(r)var g=a?r(m,v,d,t,e,i):r(v,m,d,e,t,i);if(!(void 0===g?v===m||o(v,m,n,r,i):g)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function In(e,t,n,r,o){return e===t||(null==e||null==t||!D(e)&&!D(t)?e!=e&&t!=t:yn(e,t,n,r,In,o))}function jn(e){return e==e&&!V(e)}function Rn(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Un(e){var t=function(e){for(var t=Qe(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,jn(o)]}return t}(e);return 1==t.length&&t[0][2]?Rn(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=n[o])[0],u=e[c],d=s[1];if(a&&s[2]){if(void 0===u&&!(c in e))return!1}else{var l=new Nt;if(r)var p=r(u,d,c,e,t,l);if(!(void 0===p?In(d,u,3,r,l):p))return!1}}return!0}(n,e,t)}}function _n(e,t){return null!=e&&t in Object(e)}function Cn(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=jt(t,e)).length,i=!1;++r<o;){var a=Rt(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ee(o)&&ye(a,o)&&(F(e)||Ne(e))}(e,t,_n)}function En(e,t){return it(e)&&jn(t)?Rn(Rt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Ut(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?Cn(n,e):In(t,r,3)}}function Sn(e){return it(e)?(t=Rt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Ut(t,e)}}(e);var t}function Pn(e){return"function"==typeof e?e:null==e?$:"object"==typeof e?F(e)?En(e[0],e[1]):Un(e):Sn(e)}var kn,An=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[kn?a:++r];if(!1===t(o[s],s,o))break}return e};var qn=function(e,t){return function(n,r){if(null==n)return n;if(!Se(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(e,t){return e&&An(e,t,Qe)})),xn=qn;function On(e,t,n){(void 0!==n&&!je(e[t],n)||void 0===n&&!(t in e))&&Ie(e,t,n)}function Nn(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Tn(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),o?Ie(n,s,c):Ue(n,s,c)}return n}(e,nt(e))}function Gn(e,t,n,r,o,i,a){var s=Nn(e,n),c=Nn(t,n),u=a.get(c);if(u)On(e,n,u);else{var d,l=i?i(s,c,n+"",e,t,a):void 0,p=void 0===l;if(p){var f=F(c),h=!f&&De(c),v=!f&&!h&&$e(c);l=c,f||h||v?F(s)?l=s:D(d=s)&&Se(d)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):h?(p=!1,l=function(e,t){if(t)return e.slice();var n=e.length,r=Dt?Dt(n):new e.constructor(n);return e.copy(r),r}(c,!0)):v?(p=!1,l=sn(c,!0)):l=[]:function(e){if(!D(e)||"[object Object]"!=L(e))return!1;var t=Pt(e);if(null===t)return!0;var n=xt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&qt.call(n)==Ot}(c)||Ne(c)?(l=s,Ne(s)?l=Tn(s):V(s)&&!H(s)||(l=function(e){return"function"!=typeof e.constructor||ke(e)?{}:de(Pt(e))}(c))):p=!1}p&&(a.set(c,l),o(l,c,r,i,a),a.delete(c)),On(e,n,l)}}function Ln(e,t,n,r,o){e!==t&&An(t,(function(i,a){if(o||(o=new Nt),V(i))Gn(e,t,a,n,Ln,r,o);else{var s=r?r(Nn(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),On(e,a,s)}}),nt)}var Dn=/[\\^$.*+?()[\]{}|]/g,Bn=RegExp(Dn.source);function Jn(e,t){var n=-1,r=Se(e)?Array(e.length):[];return xn(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Fn(e,t){return St(function(e,t){return(F(e)?J:Jn)(e,Pn(t))}(e,t),1)}var Mn=1/0;function Wn(e,t){return e>t}function zn(e){return"string"==typeof e||!F(e)&&D(e)&&"[object String]"==L(e)}function Vn(e,t){return e&&e.length?function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!B(a):n(a,s)))var s=a,c=i}return c}(e,Pn(t),Wn):void 0}var $n,Hn=($n=function(e,t,n){Ln(e,t,n)},Ce((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=$n.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!V(n))return!1;var r=typeof t;return!!("number"==r?Se(n)&&ye(t,n.length):"string"==r&&t in n)&&je(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&$n(e,a,n,o)}return e}))),Yn=new Function("modulePath","return import(modulePath)"),Xn=function(e,t){return _(void 0,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,Yn("node-fetch")];case 1:return[2,n.sent().default(e,t)]}}))}))};var Kn="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Zn=function(e,t){return _(void 0,void 0,void 0,(function(){var n;return C(this,(function(r){return n=Promise.resolve([]),[2,e.reduce((function(e,n){return e.then((function(e){return t(n).then((function(t){return e.push(t),e}))}))}),n)]}))}))},Qn=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}(i.Writable),er=function(){function e(e,t){this.contextProvider=e,this.agent=t}return e.prototype.getServiceDetails=function(e,t){return _(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/services/").concat(t))]}))}))},e.prototype.getAddonDetails=function(e,t){return _(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/addons/").concat(t))]}))}))},e.prototype.fetch=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o,i,a,s=this;return C(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=Hn({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},U(U({},t),{agent:this.agent})),[4,_a(2)((function(){return _(s,void 0,void 0,(function(){return C(this,(function(t){return[2,Xn(e,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=c.sent()).ok?[3,3]:[4,o.text()];case 2:i=c.sent(),a=n;try{a=JSON.parse(i)}catch(e){a=null!=i?i:n}finally{throw new Error(JSON.stringify(a))}case 3:return[4,o.json()];case 4:return[2,c.sent()]}}))}))},e}(),tr=function(e,t,n){return _(void 0,void 0,void 0,(function(){var r,o,i,a,c;return C(this,(function(u){switch(u.label){case 0:if(r=or(t||"127.0.0.1"),(o=or(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===s.platform()&&(i=function(e){return _(void 0,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,rr.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),a=r,u.label=1;case 1:return a<=o?(c=ir(a),[4,nr(e,c)]):[3,6];case 2:return u.sent()?i?[4,i(c)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,c];case 5:return a+=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."))}}))}))},nr=function(e,t){return new Promise((function(n){var r=new d,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)}))},rr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _(void 0,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,ar("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},or=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},ir=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(".")},ar=function(e,t,n){var o=r(e,t,U({windowsHide:!0},n)),i=new Promise((function(r,i){var a="",s="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(o.stdout&&o.stdout.on("data",(function(e){a+=e})),o.stderr&&o.stderr.on("data",(function(e){s+=e}))),o.on("close",(function(n){var o={code:n,stdout:a,stderr:s};if(0!==n){var c="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(s);i({message:c,result:o})}else r(o)}))}));return{process:o,resultPromise:i}},sr=function(e,t,n){return _(void 0,void 0,void 0,(function(){var r,o;return C(this,(function(i){switch(i.label){case 0:return r=cr(e,10),[4,l.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,l.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,l.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},cr=function(e,t){for(var n,r=p.dirname(e),o=p.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var a=E([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),s=".".concat(a,".").concat(o),c=p.join(r,s);if(!l.existsSync(c))return c}throw new Error("Could not write file to file '".concat(e,"'."))},ur="win32"===process.platform?"\r\n":"\n",dr=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;gr(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 Fn(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return gr(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 hr(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||D(t)&&"[object Number]"==L(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return gr(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=fr(t),i=this.nodes.findIndex((function(e){return"comment"===e.type&&e.line===o}));if(i>=0)this.insertAt(i+1,r);else{var a="blank"!==this.nodes[this.nodes.length-1].type?[lr(),pr(o),r]:[pr(o),r];this.insertAt.apply(this,E([this.nodes.length],a,!1))}}else this.insertAt(this.nodes.length,r);return r},e.prototype.insertAt=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.nodes).splice.apply(t,E([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return U({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=gr(t,"eol").map((function(e){return e.line}));return null!==(e=br(n))&&void 0!==e?e:ur}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=Fn(gr(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=br(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(vr(e),t)},e}(),lr=function(){return{type:"blank",line:""}},pr=function(e){return{type:"comment",line:fr(e)}},fr=function(e){return e.startsWith("#")?e:"# ".concat(e)},hr=function(e,t){return e.map((function(e){switch(e.type){case"entry":var t=e.hosts.map((function(e){var t=e.whitespace,n=e.host;return"".concat(t).concat(n)})).join("");return"".concat(e.ipPrefixWhitespace).concat(e.ip).concat(t);case"blank":case"comment":case"invalid":return e.line;default:return""}})).join(null!=t?t:ur)},vr=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}:mr(e)}))},mr=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,a=Fn(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:a}},gr=function(e,t){return e.filter((function(e){return e.type===t}))},br=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=Vn(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},wr="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",yr=function(){function e(e){this.ast=dr.fromNodes([]);var t={writeMode:"atomic",hostsFile:wr};this.config=U(U({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!zn(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!zn(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(!zn(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!zn(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(!zn(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(!zn(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 _(this,void 0,void 0,(function(){var e;return C(this,(function(t){switch(t.label){case 0:return[4,l.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=dr.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return _(this,void 0,void 0,(function(){var t,n,r,o;return C(this,(function(i){switch(i.label){case 0:switch(t=U(U({},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,sr(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,l.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return _(this,void 0,void 0,(function(){var t,n,r,o;return C(this,(function(i){switch(i.label){case 0:return l.existsSync(this.config.hostsFile)?(t=p.dirname(this.config.hostsFile),n=p.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=p.resolve(t,r),l.existsSync(o)&&!e.rewrite?[3,2]:[4,l.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return _(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),Ir=function(){function e(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(e.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),e.prototype.enter=function(e){return _(this,void 0,void 0,(function(){var t,n=this;return C(this,(function(r){return this._queueLength+=1,t=this.previousPromise.then((function(){return n._queueLength-=1,e()}),(function(){return n._queueLength-=1,e()})),this.previousPromise=t,[2,t]}))}))},e}(),jr=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 Rr=jr(_r),Ur=jr(Cr);function _r(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Cr(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}_r.proto=_r((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return _r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Cr(this)},configurable:!0})})),Rr.strict=Ur;var Er,Sr=function(){},Pr=function(e,t,n){if("function"==typeof t)return Pr(e,null,t);t||(t={}),n=Rr(n||Sr);var r=e._writableState,o=e._readableState,i=t.readable||!1!==t.readable&&e.readable,a=t.writable||!1!==t.writable&&e.writable,s=!1,c=function(){e.writable||u()},u=function(){a=!1,i||n.call(e)},d=function(){i=!1,a||n.call(e)},l=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},p=function(t){n.call(e,t)},f=function(){process.nextTick(h)},h=function(){if(!s)return(!i||o&&o.ended&&!o.destroyed)&&(!a||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},v=function(){e.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?a&&!r&&(e.on("end",c),e.on("close",c)):(e.on("complete",u),e.on("abort",f),e.req?v():e.on("request",v)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",l),e.on("end",d),e.on("finish",u),!1!==t.error&&e.on("error",p),e.on("close",f),function(){s=!0,e.removeListener("complete",u),e.removeListener("abort",f),e.removeListener("request",v),e.req&&e.req.removeListener("finish",u),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",u),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",p),e.removeListener("close",f)}},kr=Pr;try{Er=l}catch(e){}var Ar=function(){},qr=/^v?\.0/.test(process.version),xr=function(e){return"function"==typeof e},Or=function(e,t,n,r){r=Rr(r);var o=!1;e.on("close",(function(){o=!0})),kr(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!!qr&&!!Er&&(e instanceof(Er.ReadStream||Ar)||e instanceof(Er.WriteStream||Ar))&&xr(e.close)}(e)?e.close(Ar):function(e){return e.setHeader&&xr(e.abort)}(e)?e.abort():xr(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},Nr=function(e){e()},Tr=function(e,t){return e.pipe(t)},Gr=function(){var e,t=Array.prototype.slice.call(arguments),n=xr(t[t.length-1]||Ar)&&t.pop()||Ar;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 a=i<t.length-1;return Or(o,a,i>0,(function(t){e||(e=t),t&&r.forEach(Nr),a||(r.forEach(Nr),n(e))}))}));return t.reduce(Tr)};function Lr(e,t){return e(t={exports:{}},t.exports),t.exports}const Dr=["nodebuffer","arraybuffer","fragments"],Br="undefined"!=typeof Blob;Br&&Dr.push("blob");var Jr={BINARY_TYPES:Dr,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Br,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},Fr="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},Mr=process.config&&process.config.variables||{},Wr=!!process.env.PREBUILDS_ONLY,zr=process.versions.modules,Vr=!(!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",$r=process.env.npm_config_arch||s.arch(),Hr=process.env.npm_config_platform||s.platform(),Yr=process.env.LIBC||(function(e){return"linux"===e&&l.existsSync("/etc/alpine-release")}(Hr)?"musl":"glibc"),Xr=process.env.ARM_VERSION||("arm64"===$r?"8":Mr.arm_version)||"",Kr=(process.versions.uv||"").split(".")[0],Zr=Qr;function Qr(e){return Fr(Qr.path(e))}function eo(e){try{return l.readdirSync(e)}catch(e){return[]}}function to(e,t){var n=eo(e).filter(t);return n[0]&&p.join(e,n[0])}function no(e){return/\.node$/.test(e)}function ro(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 oo(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function io(e,t){return e.architectures.length-t.architectures.length}function ao(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 so(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===Kr)&&((!n.armv||n.armv===Xr)&&(!n.libc||n.libc===Yr)))))}}function co(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}}Qr.path=function(e){e=p.resolve(e||".");try{var t=Fr(p.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!Wr){var n=to(p.join(e,"build/Release"),no);if(n)return n;var r=to(p.join(e,"build/Debug"),no);if(r)return r}var o=s(e);if(o)return o;var i=s(p.dirname(process.execPath));if(i)return i;var a=["platform="+Hr,"arch="+$r,"runtime="+Vr,"abi="+zr,"uv="+Kr,Xr?"armv="+Xr:"","libc="+Yr,"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 "+a+"\n loaded from: "+e+"\n");function s(e){var t=eo(p.join(e,"prebuilds")).map(ro).filter(oo(Hr,$r)).sort(io)[0];if(t){var n=p.join(e,"prebuilds",t.name),r=eo(n).map(ao).filter(so(Vr,zr)).sort(co(Vr))[0];return r?p.join(n,r.file):void 0}}},Qr.parseTags=ao,Qr.matchTags=so,Qr.compareTags=co,Qr.parseTuple=ro,Qr.matchTuple=oo,Qr.compareTuples=io;var uo={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]}},lo=Lr((function(e){try{e.exports=Zr(__dirname)}catch(t){e.exports=uo}})),po=Lr((function(e){const{EMPTY_BUFFER:t}=Jr,n=Buffer[Symbol.species];function r(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[i]^t[3&i]}function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(e.exports={concat:function(e,r){if(0===e.length)return t;if(1===e.length)return e[0];const o=Buffer.allocUnsafe(r);let i=0;for(let t=0;t<e.length;t++){const n=e[t];o.set(n,i),i+=n.length}return i<r?new n(o.buffer,o.byteOffset,i):o},mask:r,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let r;return t instanceof ArrayBuffer?r=new n(t):ArrayBuffer.isView(t)?r=new n(t.buffer,t.byteOffset,t.byteLength):(r=Buffer.from(t),e.readOnly=!1),r},unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{const t=lo;e.exports.mask=function(e,n,o,i,a){a<48?r(e,n,o,i,a):t.mask(e,n,o,i,a)},e.exports.unmask=function(e,n){e.length<32?o(e,n):t.unmask(e,n)}}catch(e){}}));po.concat,po.mask,po.toArrayBuffer,po.toBuffer,po.unmask;const fo=Symbol("kDone"),ho=Symbol("kRun");var vo=class{constructor(e){this[fo]=()=>{this.pending--,this[ho]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ho]()}[ho](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[fo])}}};const{kStatusCode:mo}=Jr,go=Buffer[Symbol.species],bo=Buffer.from([0,0,255,255]),wo=Symbol("permessage-deflate"),yo=Symbol("total-length"),Io=Symbol("callback"),jo=Symbol("buffers"),Ro=Symbol("error");let Uo;var _o=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,!Uo){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Uo=new vo(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[Io];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){Uo.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){Uo.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]?w.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=w.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[wo]=this,this._inflate[yo]=0,this._inflate[jo]=[],this._inflate.on("error",So),this._inflate.on("data",Eo)}this._inflate[Io]=n,this._inflate.write(e),t&&this._inflate.write(bo),this._inflate.flush((()=>{const e=this._inflate[Ro];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=po.concat(this._inflate[jo],this._inflate[yo]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[yo]=0,this._inflate[jo]=[],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]?w.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=w.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[yo]=0,this._deflate[jo]=[],this._deflate.on("data",Co)}this._deflate[Io]=n,this._deflate.write(e),this._deflate.flush(w.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=po.concat(this._deflate[jo],this._deflate[yo]);t&&(e=new go(e.buffer,e.byteOffset,e.length-4)),this._deflate[Io]=null,this._deflate[yo]=0,this._deflate[jo]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function Co(e){this[jo].push(e),this[yo]+=e.length}function Eo(e){this[yo]+=e.length,this[wo]._maxPayload<1||this[yo]<=this[wo]._maxPayload?this[jo].push(e):(this[Ro]=new RangeError("Max payload size exceeded"),this[Ro].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ro][mo]=1009,this.removeListener("data",Eo),this.reset())}function So(e){this[wo]._inflate=null,e[mo]=1007,this[Io](e)}var Po=function(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0},ko=Lr((function(e){try{e.exports=Zr(__dirname)}catch(t){e.exports=Po}})),Ao=Lr((function(e){const{isUtf8:t}=y,{hasBlob:n}=Jr;function r(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0}if(e.exports={isBlob:function(e){return n&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:r,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},t)e.exports.isValidUTF8=function(e){return e.length<24?r(e):t(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const t=ko;e.exports.isValidUTF8=function(e){return e.length<32?r(e):t(e)}}catch(e){}}));Ao.isBlob,Ao.isValidStatusCode,Ao.isValidUTF8,Ao.tokenChars;const{Writable:qo}=i,{BINARY_TYPES:xo,EMPTY_BUFFER:Oo,kStatusCode:No,kWebSocket:To}=Jr,{concat:Go,toArrayBuffer:Lo,unmask:Do}=po,{isValidStatusCode:Bo,isValidUTF8:Jo}=Ao,Fo=Buffer[Symbol.species];var Mo=class extends qo{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||xo[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[To]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=new Fo(t.buffer,t.byteOffset+e,t.length-e),new Fo(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new Fo(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do{switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(48&t[0]){return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~t[0]);if(!n||this._extensions[_o.extensionName]){if(this._fin=!(128&~t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"))}this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=!(128&~t[1]),this._isServer){if(!this._masked){return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}else{e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=Oo;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Do(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else{if(this._compressed)return this._state=5,void this.decompress(t,e);t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}}decompress(e,t){this._extensions[_o.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void t(e)}this._fragments.push(n)}this.dataMessage(t),0===this._state&&this.startLoop(t)}))}dataMessage(e){if(!this._fin)return void(this._state=0);const t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?Go(n,t):"arraybuffer"===this._binaryType?Lo(Go(n,t)):"blob"===this._binaryType?new Blob(n):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(e)})))}else{const r=Go(n,t);if(!this._skipUTF8Validation&&!Jo(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(e)})))}}controlMessage(e,t){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)})));else{if(0===e.length)this._loop=!1,this.emit("conclude",1005,Oo),this.end();else{const n=e.readUInt16BE(0);if(!Bo(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new Fo(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Jo(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(e,t,n,r,o){this._loop=!1,this._errored=!0;const i=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,this.createError),i.code=o,i[No]=r,i}};const{randomFillSync:Wo}=m,{EMPTY_BUFFER:zo,kWebSocket:Vo,NOOP:$o}=Jr,{isBlob:Ho,isValidStatusCode:Yo}=Ao,{mask:Xo,toBuffer:Ko}=po,Zo=Symbol("kByteLength"),Qo=Buffer.alloc(4),ei=8192;let ti,ni=ei;class ri{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=$o,this[Vo]=void 0}static frame(e,t){let n,r,o=!1,i=2,a=!1;t.mask&&(n=t.maskBuffer||Qo,t.generateMask?t.generateMask(n):(ni===ei&&(void 0===ti&&(ti=Buffer.alloc(ei)),Wo(ti,0,ei),ni=0),n[0]=ti[ni++],n[1]=ti[ni++],n[2]=ti[ni++],n[3]=ti[ni++]),a=!(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!a||void 0===t[Zo]?(e=Buffer.from(e)).length:t[Zo]:(r=e.length,o=t.mask&&t.readOnly&&!a);let s=r;r>=65536?(i+=8,s=127):r>125&&(i+=2,s=126);const c=Buffer.allocUnsafe(o?r+i:i);return c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=s,126===s?c.writeUInt16BE(r,2):127===s&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),t.mask?(c[1]|=128,c[i-4]=n[0],c[i-3]=n[1],c[i-2]=n[2],c[i-1]=n[3],a?[c,e]:o?(Xo(e,n,c,i,r),[c]):(Xo(e,n,e,0,r),[c,e])):[c,e]}close(e,t,n,r){let o;if(void 0===e)o=zo;else{if("number"!=typeof e||!Yo(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={[Zo]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(ri.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):Ho(e)?(r=e.size,o=!1):(r=(e=Ko(e)).length,o=Ko.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Zo]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};Ho(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,i,n]):this.getBlobData(e,!1,i,n):0!==this._state?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(ri.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):Ho(e)?(r=e.size,o=!1):(r=(e=Ko(e)).length,o=Ko.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Zo]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};Ho(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,i,n]):this.getBlobData(e,!1,i,n):0!==this._state?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(ri.frame(e,i),n)}send(e,t,n){const r=this._extensions[_o.extensionName];let o,i,a=t.binary?2:1,s=t.compress;"string"==typeof e?(o=Buffer.byteLength(e),i=!1):Ho(e)?(o=e.size,i=!1):(o=(e=Ko(e)).length,i=Ko.readOnly),this._firstFragment?(this._firstFragment=!1,s&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=o>=r._threshold),this._compress=s):(s=!1,a=0),t.fin&&(this._firstFragment=!0);const c={[Zo]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:i,rsv1:s};Ho(e)?0!==this._state?this.enqueue([this.getBlobData,e,this._compress,c,n]):this.getBlobData(e,this._compress,c,n):0!==this._state?this.enqueue([this.dispatch,e,this._compress,c,n]):this.dispatch(e,this._compress,c,n)}getBlobData(e,t,n,r){this._bufferedBytes+=n[Zo],this._state=2,e.arrayBuffer().then((e=>{if(this._socket.destroyed){const e=new Error("The socket was closed while the blob was being read");return void process.nextTick(ii,this,e,r)}this._bufferedBytes-=n[Zo];const o=Ko(e);t?this.dispatch(o,t,n,r):(this._state=0,this.sendFrame(ri.frame(o,n),r),this.dequeue())})).catch((e=>{process.nextTick(ai,this,e,r)}))}dispatch(e,t,n,r){if(!t)return void this.sendFrame(ri.frame(e,n),r);const o=this._extensions[_o.extensionName];this._bufferedBytes+=n[Zo],this._state=1,o.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){ii(this,new Error("The socket was closed while data was being compressed"),r)}else this._bufferedBytes-=n[Zo],this._state=0,n.readOnly=!1,this.sendFrame(ri.frame(t,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][Zo],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Zo],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 oi=ri;function ii(e,t,n){"function"==typeof n&&n(t);for(let n=0;n<e._queue.length;n++){const r=e._queue[n],o=r[r.length-1];"function"==typeof o&&o(t)}}function ai(e,t,n){ii(e,t,n),e.onerror(t)}const{kForOnEventAttribute:si,kListener:ci}=Jr,ui=Symbol("kCode"),di=Symbol("kData"),li=Symbol("kError"),pi=Symbol("kMessage"),fi=Symbol("kReason"),hi=Symbol("kTarget"),vi=Symbol("kType"),mi=Symbol("kWasClean");class gi{constructor(e){this[hi]=null,this[vi]=e}get target(){return this[hi]}get type(){return this[vi]}}Object.defineProperty(gi.prototype,"target",{enumerable:!0}),Object.defineProperty(gi.prototype,"type",{enumerable:!0});class bi extends gi{constructor(e,t={}){super(e),this[ui]=void 0===t.code?0:t.code,this[fi]=void 0===t.reason?"":t.reason,this[mi]=void 0!==t.wasClean&&t.wasClean}get code(){return this[ui]}get reason(){return this[fi]}get wasClean(){return this[mi]}}Object.defineProperty(bi.prototype,"code",{enumerable:!0}),Object.defineProperty(bi.prototype,"reason",{enumerable:!0}),Object.defineProperty(bi.prototype,"wasClean",{enumerable:!0});class wi extends gi{constructor(e,t={}){super(e),this[li]=void 0===t.error?null:t.error,this[pi]=void 0===t.message?"":t.message}get error(){return this[li]}get message(){return this[pi]}}Object.defineProperty(wi.prototype,"error",{enumerable:!0}),Object.defineProperty(wi.prototype,"message",{enumerable:!0});class yi extends gi{constructor(e,t={}){super(e),this[di]=void 0===t.data?null:t.data}get data(){return this[di]}}Object.defineProperty(yi.prototype,"data",{enumerable:!0});const Ii={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[si]&&r[ci]===t&&!r[si])return;let r;if("message"===e)r=function(e,n){const r=new yi("message",{data:n?e:e.toString()});r[hi]=this,Ri(t,this,r)};else if("close"===e)r=function(e,n){const r=new bi("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[hi]=this,Ri(t,this,r)};else if("error"===e)r=function(e){const n=new wi("error",{error:e,message:e.message});n[hi]=this,Ri(t,this,n)};else{if("open"!==e)return;r=function(){const e=new gi("open");e[hi]=this,Ri(t,this,e)}}r[si]=!!n[si],r[ci]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[ci]===t&&!n[si]){this.removeListener(e,n);break}}};var ji={CloseEvent:bi,ErrorEvent:wi,Event:gi,EventTarget:Ii,MessageEvent:yi};function Ri(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:Ui}=Ao;function _i(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var Ci={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,a=!1,s=!1,c=-1,u=-1,d=-1,l=0;for(;l<e.length;l++)if(u=e.charCodeAt(l),void 0===n)if(-1===d&&1===Ui[u])-1===c&&(c=l);else if(0===l||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(c,d);44===u?(_i(t,r,o),o=Object.create(null)):n=r,c=d=-1}}else-1===d&&-1!==c&&(d=l);else if(void 0===r)if(-1===d&&1===Ui[u])-1===c&&(c=l);else if(32===u||9===u)-1===d&&-1!==c&&(d=l);else if(59===u||44===u){if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),_i(o,e.slice(c,d),!0),44===u&&(_i(t,n,o),o=Object.create(null),n=void 0),c=d=-1}else{if(61!==u||-1===c||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(c,l),c=d=-1}else if(a){if(1!==Ui[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),a=!1}else if(s)if(1===Ui[u])-1===c&&(c=l);else if(34===u&&-1!==c)s=!1,d=l;else{if(92!==u)throw new SyntaxError(`Unexpected character at index ${l}`);a=!0}else if(34===u&&61===e.charCodeAt(l-1))s=!0;else if(-1===d&&1===Ui[u])-1===c&&(c=l);else if(-1===c||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let a=e.slice(c,d);i&&(a=a.replace(/\\/g,""),i=!1),_i(o,r,a),44===u&&(_i(t,n,o),o=Object.create(null),n=void 0),r=void 0,c=d=-1}}else-1===d&&(d=l);if(-1===c||s||32===u||9===u)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=e.slice(c,d);return void 0===n?_i(t,p,o):(void 0===r?_i(o,p,!0):_i(o,r,i?p.replace(/\\/g,""):p),_i(t,n,o)),t}};const{randomBytes:Ei,createHash:Si}=m,{URL:Pi}=g,{isBlob:ki}=Ao,{BINARY_TYPES:Ai,EMPTY_BUFFER:qi,GUID:xi,kForOnEventAttribute:Oi,kListener:Ni,kStatusCode:Ti,kWebSocket:Gi,NOOP:Li}=Jr,{EventTarget:{addEventListener:Di,removeEventListener:Bi}}=ji,{format:Ji,parse:Fi}=Ci,{toBuffer:Mi}=po,Wi=Symbol("kAborted"),zi=[8,13],Vi=["CONNECTING","OPEN","CLOSING","CLOSED"],$i=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Hi extends e{constructor(e,t,n){super(),this._binaryType=Ai[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=qi,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Hi.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]),Xi(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Ai.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 Mo({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new oi(e,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[Gi]=this,o[Gi]=this,e[Gi]=this,r.on("conclude",na),r.on("drain",ra),r.on("error",oa),r.on("message",aa),r.on("ping",sa),r.on("pong",ca),o.onerror=da,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",pa),e.on("data",fa),e.on("end",ha),e.on("error",va),this._readyState=Hi.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Hi.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[_o.extensionName]&&this._extensions[_o.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Hi.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==Hi.CLOSED)if(this.readyState!==Hi.CONNECTING)this.readyState!==Hi.CLOSING?(this._readyState=Hi.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),la(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";ea(this,this._req,e)}}pause(){this.readyState!==Hi.CONNECTING&&this.readyState!==Hi.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===Hi.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===Hi.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||qi,t,n)):ta(this,e,n)}pong(e,t,n){if(this.readyState===Hi.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===Hi.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||qi,t,n)):ta(this,e,n)}resume(){this.readyState!==Hi.CONNECTING&&this.readyState!==Hi.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===Hi.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!==Hi.OPEN)return void ta(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[_o.extensionName]||(r.compress=!1),this._sender.send(e||qi,r,n)}terminate(){if(this.readyState!==Hi.CLOSED)if(this.readyState!==Hi.CONNECTING)this._socket&&(this._readyState=Hi.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";ea(this,this._req,e)}}}Object.defineProperty(Hi,"CONNECTING",{enumerable:!0,value:Vi.indexOf("CONNECTING")}),Object.defineProperty(Hi.prototype,"CONNECTING",{enumerable:!0,value:Vi.indexOf("CONNECTING")}),Object.defineProperty(Hi,"OPEN",{enumerable:!0,value:Vi.indexOf("OPEN")}),Object.defineProperty(Hi.prototype,"OPEN",{enumerable:!0,value:Vi.indexOf("OPEN")}),Object.defineProperty(Hi,"CLOSING",{enumerable:!0,value:Vi.indexOf("CLOSING")}),Object.defineProperty(Hi.prototype,"CLOSING",{enumerable:!0,value:Vi.indexOf("CLOSING")}),Object.defineProperty(Hi,"CLOSED",{enumerable:!0,value:Vi.indexOf("CLOSED")}),Object.defineProperty(Hi.prototype,"CLOSED",{enumerable:!0,value:Vi.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(Hi.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(Hi.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[Oi])return t[Ni];return null},set(t){for(const t of this.listeners(e))if(t[Oi]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[Oi]:!0})}})})),Hi.prototype.addEventListener=Di,Hi.prototype.removeEventListener=Bi;var Yi=Hi;function Xi(e,t,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:zi[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,!zi.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${zi.join(", ")})`);let i;if(t instanceof Pi)i=t;else try{i=new Pi(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),e._url=i.href;const a="wss:"===i.protocol,s="ws+unix:"===i.protocol;let c;if("ws:"===i.protocol||a||s?s&&!i.pathname?c="The URL's pathname is empty":i.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',c){const t=new SyntaxError(c);if(0===e._redirects)throw t;return void Ki(e,t)}const u=a?443:80,d=Ei(16).toString("base64"),l=a?f.request:h.request,p=new Set;let v,m;if(o.createConnection=o.createConnection||(a?Qi:Zi),o.defaultPort=o.defaultPort||u,o.port=i.port||u,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":d,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new _o(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=Ji({[_o.extensionName]:v.offer()})),n.length){for(const e of n){if("string"!=typeof e||!$i.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}`),s){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=s,e._originalSecure=a,e._originalHostOrSocketPath=s?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=s?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&i.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!a)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),m=e._req=l(o),e._redirects&&e.emit("redirect",e.url,m)}else m=e._req=l(o);o.timeout&&m.on("timeout",(()=>{ea(e,m,"Opening handshake has timed out")})),m.on("error",(t=>{null===m||m[Wi]||(m=e._req=null,Ki(e,t))})),m.on("response",(i=>{const a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects)return void ea(e,m,"Maximum redirects exceeded");let i;m.abort();try{i=new Pi(a,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${a}`);return void Ki(e,n)}Xi(e,i,n,r)}else e.emit("unexpected-response",m,i)||ea(e,m,`Unexpected server response: ${i.statusCode}`)})),m.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==Hi.CONNECTING)return;m=e._req=null;const i=t.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void ea(e,n,"Invalid Upgrade header");const a=Si("sha1").update(d+xi).digest("base64");if(t.headers["sec-websocket-accept"]!==a)return void ea(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"];let c;if(void 0!==s?p.size?p.has(s)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":p.size&&(c="Server sent no subprotocol"),c)return void ea(e,n,c);s&&(e._protocol=s);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void ea(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=Fi(u)}catch(t){return void ea(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==_o.extensionName){return void ea(e,n,"Server indicated an extension that was not requested")}try{v.accept(t[_o.extensionName])}catch(t){return void ea(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[_o.extensionName]=v}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(m,e):m.end()}function Ki(e,t){e._readyState=Hi.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function Zi(e){return e.path=e.socketPath,u.connect(e)}function Qi(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=u.isIP(e.host)?"":e.host),v.connect(e)}function ea(e,t,n){e._readyState=Hi.CLOSING;const r=new Error(n);Error.captureStackTrace(r,ea),t.setHeader?(t[Wi]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Ki,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function ta(e,t,n){if(t){const n=ki(t)?t.size:Mi(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Vi[e.readyState]})`);process.nextTick(n,t)}}function na(e,t){const n=this[Gi];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[Gi]&&(n._socket.removeListener("data",fa),process.nextTick(ua,n._socket),1005===e?n.close():n.close(e,t))}function ra(){const e=this[Gi];e.isPaused||e._socket.resume()}function oa(e){const t=this[Gi];void 0!==t._socket[Gi]&&(t._socket.removeListener("data",fa),process.nextTick(ua,t._socket),t.close(e[Ti])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function ia(){this[Gi].emitClose()}function aa(e,t){this[Gi].emit("message",e,t)}function sa(e){const t=this[Gi];t._autoPong&&t.pong(e,!this._isServer,Li),t.emit("ping",e)}function ca(e){this[Gi].emit("pong",e)}function ua(e){e.resume()}function da(e){const t=this[Gi];t.readyState!==Hi.CLOSED&&(t.readyState===Hi.OPEN&&(t._readyState=Hi.CLOSING,la(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function la(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),3e4)}function pa(){const e=this[Gi];let t;this.removeListener("close",pa),this.removeListener("data",fa),this.removeListener("end",ha),e._readyState=Hi.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[Gi]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",ia),e._receiver.on("finish",ia))}function fa(e){this[Gi]._receiver.write(e)||this.pause()}function ha(){const e=this[Gi];e._readyState=Hi.CLOSING,e._receiver.end(),this.end()}function va(){const e=this[Gi];this.removeListener("error",va),this.on("error",Li),e&&(e._readyState=Hi.CLOSING,this.destroy())}const{Duplex:ma}=i;function ga(e){e.emit("close")}function ba(){!this.destroyed&&this._writableState.finished&&this.destroy()}function wa(e){this.removeListener("error",wa),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var ya,Ia=function(e,t){let n=!0;const r=new ma({...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(ga,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(ga,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",ba),r.on("error",wa),r},ja=function(e){function t(t,n,r,o,i,a){void 0===a&&(a=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.agent=i,s.closeTimeout=a,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=c.createServer(s.handleConnection.bind(s));var u=null==r?void 0:r.altHostnames.map((function(e){return(t=It(t=e))&&Bn.test(t)?t.replace(Dn,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(u,")(:.*$|$)"),"im"),s}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 _(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,o=n.address;e.tcpServer.listen(r,o,(function(){e.emit("tunnel-open",{address:o,port:r}),t({address:o,port:r})}))}else e.tcpServer.listen(0,(function(){var n=e.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:i,port:o},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return _(this,void 0,void 0,(function(){var e,t=this;return C(this,(function(n){switch(n.label){case 0:return e=!1,[4,Promise.race([new Promise((function(n){t.tcpServer.close((function(){e=!0,t.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(e){return setTimeout(e,t.closeTimeout)})).then((function(){e||(t.openConnections.forEach((function(e){e.destroy(),t.openConnections.delete(e)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},t.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=this.endpoint.replace("https:","wss:"),r=new Yi(n,{headers:this.headers,agent:this.agent}),o=Ia(r),i=this.getHeaderTransform();this.rewriteHostHeader&&i?Gr(e,i,o):Gr(e,o),Gr(o,e),r.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),o.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,t=this.hostRegex;return new a({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var a=i.replace(t,"Host: ".concat(e));o(null,Buffer.from(a))}else o(null,n)}})}},t}(t),Ra=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.endpoint=t,i.headers=n,i.bindToAssign=r,i.agent=o,i.protocol="UDP",i.udpSocket=I.createSocket("udp4"),i.handleConnection(),i}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 _(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,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 _(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){e.udpSocket.close((function(){e.emit("tunnel-close"),t()}))}))];case 1:return t.sent(),[2]}}))}))},t.prototype.handleConnection=function(){var e,t=this,n=this.endpoint.replace("https:","wss:"),r=new Yi(n,{headers:this.headers,agent:this.agent}),o=Ia(r);this.udpSocket.on("message",(function(t,n){e=n,o.write(t)})),o.on("data",(function(n){e&&t.udpSocket.send(n,e.port,e.address,(function(e){e&&t.emit("connection-error",e)}))})),this.udpSocket.on("error",(function(e){t.emit("connection-error",e)})),o.on("error",(function(e){t.emit("connection-error",e)})),r.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(t),Ua=function(e){function t(t,r,o,i){var a=e.call(this)||this;return a.contextProvider=t,a.listServices=r,a.listAddons=o,a.agent=i,a.connections=[],a.hostsFileMutex=new Ir,a.ipAllocationMutex=new Ir,a.stopForwarding=function(e){return _(a,void 0,void 0,(function(){var t,n,r,o,i,a,s;return C(this,(function(c){switch(c.label){case 0:return[4,e.tunnel.close()];case 1:return c.sent(),t=e.forwardingContext,n=t.projectId,r=t.type,o=t.id,i=t.hostnames,a=t.ipOnly,i.length>0&&!a?[4,this.unregisterHostnames(null===(s=e.tunnel.bindTo)||void 0===s?void 0:s.address,i)]:[3,3];case 2:c.sent(),c.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(e){var t=e.forwardingContext,i=t.type,a=t.id,s=t.projectId;return a===o&&s===n&&i===r})),1),[2]}}))}))},a.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 n("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return n("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},a.assertStartedWithNodejs=function(){if(!Kn)throw new Error("Port forwarding only possible when started with nodejs")},a.proxyApiClient=new er(t,i),a}return R(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),_(this,void 0,void 0,(function(){var r;return C(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),_(this,void 0,void 0,(function(){var n,r,o,i,a,s=this;return C(this,(function(c){switch(c.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=c.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return o=c.sent(),[4,Promise.all(r.data.services.map((function(e){return _(s,void 0,void 0,(function(){return C(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return i=c.sent(),[4,Promise.all(o.data.addons.map((function(e){return _(s,void 0,void 0,(function(){return C(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:e.id},t)];case 1:return[2,r.sent()]}}))}))})))];case 4:return a=c.sent(),[2,{services:i,addons:a}]}}))}))},t.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),_(this,void 0,void 0,(function(){var r;return C(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),_(this,void 0,void 0,(function(){var n,r,o,i,a,s,c,u=this;return C(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,r=e.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return o=d.sent(),i=o.namespace,a=o.targetDomain,s=o.instances,c=o.ports,0===s.length?[2,[]]:[4,Zn(c,(function(e){var o,c="https://".concat(a,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(s[0].podName,"/port/").concat(e.internalPort),d="".concat(r,".").concat(i,".svc.cluster.local"),l=["".concat(r)];e.name&&l.push("".concat(e.name,".").concat(r)),"HTTP"===e.protocol&&(o={altHostnames:l,targetHostname:d});var p=E([d],l,!0);return u.forwardPort(c,e,p,"service",r,n,t,o)}))];case 2:return[2,d.sent()]}}))}))},t.prototype.withAddonForwarding=function(e,t,n){return void 0===n&&(n=!0),_(this,void 0,void 0,(function(){var r;return C(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),_(this,void 0,void 0,(function(){var n,r,o,i,a=this;return C(this,(function(s){switch(s.label){case 0:return this.assertStartedWithNodejs(),n=e.addonId,r=e.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return o=s.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,Zn((c=i,null!=c&&c.length?St(c,Mn):[]),(function(e){var i=e.podName,s=e.internalHostname,c=e.port;return _(a,void 0,void 0,(function(){var e;return C(this,(function(a){return e="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(c.internalPort),[2,this.forwardPort(e,c,[s],"addon",n,r,t)]}))}))}))];case 2:return[2,s.sent()]}var c}))}))},t.prototype.allocateIpAddress=function(e){return _(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return _(t,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){switch(a.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,tr(e,r,n)];case 1:return o=a.sent(),this.nextIpAddress=ir(or(o)+1),or(this.nextIpAddress)>or(n)&&(this.nextIpAddress=t),[2,o]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,o,i,a,s){var c;return void 0===a&&(a=!0),_(this,void 0,void 0,(function(){var u,d,l,p,f,h,v=this;return C(this,(function(m){switch(m.label){case 0:if(u={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!a&&(d=this.canExecuteWithHostnames()).error)throw new Error("".concat(d.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(i,o,n,r,t,a)];case 1:return l=m.sent(),p="UDP"===t.protocol?new Ra(e,u,l,this.agent):new ja(e,u,s,l,this.agent),a?[3,3]:[4,this.registerHostnames(null===(c=p.bindTo)||void 0===c?void 0:c.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return _(v,void 0,void 0,(function(){return C(this,(function(e){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return f=m.sent(),h={projectId:i,id:o,type:r,hostnames:n,ipOnly:a,port:f.port,address:f.address,protocol:t.protocol,portName:t.name},this.emit("tunnel-open",p,h),p.on("connection-error",(function(e){return v.emit("connection-error",p,h,e)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,h)})),this.connections.push({tunnel:p,forwardingContext:h}),[2,{data:h}]}}))}))},t.prototype.determineSocketAddress=function(e,t,n,r,o,i){return _(this,void 0,void 0,(function(){var a,c,u;return C(this,(function(d){switch(d.label){case 0:return i&&"darwin"===s.platform()?[2,void 0]:(a=this.connections.filter((function(n){return n.forwardingContext.projectId===e&&n.forwardingContext.id===t&&n.forwardingContext.type===r})),(c=null==a?void 0:a.find((function(e){return n.find((function(t){return e.forwardingContext.hostnames.includes(t)}))})))?[2,{address:null==c?void 0:c.forwardingContext.address,port:o.internalPort}]:(u={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(u.address=d.sent(),u.port=o.internalPort,u)]}}))}))},t.prototype.registerHostnames=function(e,t){return _(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,E([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return _(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,E([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return _(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return _(t,void 0,void 0,(function(){var t,n=this;return C(this,(function(r){switch(r.label){case 0:return[4,yr.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,_a(5)((function(){return _(n,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"atomic"})];case 1:return e.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,_a(5)((function(){return _(n,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"standard"})];case 1:return e.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopProjectForwarding=function(e){return _(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return t.forwardingContext.projectId===e.projectId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopServiceForwarding=function(e){return _(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"service"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.serviceId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopAddonForwarding=function(e){return _(this,void 0,void 0,(function(){var t=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"addon"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.addonId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stop=function(){return _(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return _(e,void 0,void 0,(function(){return C(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(t),_a=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return _(void 0,void 0,void 0,(function(){var e;return C(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()}},Ca=function(e){function t(t,n,r,i,a,s,c){void 0===a&&(a=new o.PassThrough),void 0===s&&(s=new o.PassThrough),void 0===c&&(c=new o.PassThrough);var u=e.call(this)||this;return u.baseUrl=t,u.execConfig=n,u.token=r,u.agent=i,u.stdOut=a,u.stdErr=s,u.stdIn=c,u.waitForCommandResult=function(){return _(u,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,e.sent()]}}))}))},u.sendInputToCurrentCommand=function(e){return _(u,void 0,void 0,(function(){var t;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(t=this.duplex)||void 0===t||t.write(this.constructPayloadPacket(e)),[2]}))}))},u.resizeTerminal=function(e){return _(u,void 0,void 0,(function(){var t;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(t=this.duplex)||void 0===t||t.write(JSON.stringify({type:"resize",data:{ttyRows:null==e?void 0:e.rows,ttyColumns:null==e?void 0:e.columns}})),[2]}))}))},u.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},u}return 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 _(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(t,n){var r,o,i;void 0!==e.remote&&n(Error("Command is already running"));var a,s=e.execEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Yi(s,{agent:e.agent});try{e.duplex=Ia(e.remote)}catch(e){throw new Error("Failed to establish connection to command execution proxy: ".concat(e.message))}e.initialAuth(),e.stdIn.on("data",(function(t){var n,r;(null===(n=e.duplex)||void 0===n?void 0:n.writable)&&(null===(r=e.duplex)||void 0===r||r.write(e.constructPayloadPacket(t)))})),null===(r=e.duplex)||void 0===r||r.on("data",(function(t){var n,r,o,i=JSON.parse(t.toString());switch(null==i?void 0:i.type){case"init":var s=i.data;"successful"!==s.auth&&c("Command initialization failed: ".concat(null!==(n=null==s?void 0:s.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":a=i.data,e.emit("command-result",a),null===(r=e.duplex)||void 0===r||r.end();break;case"stdOut":e.emit("std-out-data",i.data),e.stdOut.write(i.data);break;case"stdErr":e.emit("std-err-data",i.data),e.stdErr.write(i.data);break;case"error":c(null===(o=i.data)||void 0===o?void 0:o.message);break;default:var u="unable to parse message: ".concat(JSON.stringify(i));c(u)}})),null===(o=e.duplex)||void 0===o||o.on("end",(function(){e.emit("command-completed"),e.reset(),t(a)})),null===(i=e.duplex)||void 0===i||i.on("error",(function(n){e.emit("error",n),e.emit("command-completed"),e.reset(),t(a)}));var c=function(t){e.emit("error",t),e.reset(),n(new Error(t))};e.emit("command-started")})),[2,this.currentCommand]}))}))},t.prototype.initialAuth=function(){var e,t=this.execConfig,n=t.command,r=t.containerName,o=t.shell,i=t.user,a=t.group,s=t.ttyColumns,c=t.ttyRows,u={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:a,ttyColumns:s,ttyRows:c}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(u))},t.prototype.reset=function(){var e;this.remote=void 0,this.currentCommand=void 0,null===(e=this.duplex)||void 0===e||e.destroy(),this.duplex=void 0},t}(t),Ea=function(){function e(e,t){this.contextProvider=e,this.agent=t,this.assertStartedWithNodejs=function(){if(!Kn)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o;return C(this,(function(i){return n=e.serviceId,r=e.projectId,o=U({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o;return C(this,(function(i){return n=e.serviceId,r=e.projectId,o=U({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o;return C(this,(function(i){return n=e.jobId,r=e.projectId,o=U({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o;return C(this,(function(i){return n=e.jobId,r=e.projectId,o=U({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return _(this,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(U({shell:"none"},e)),n=new Qn,r=new Qn,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 Ca(t,e,n,this.agent)},e}(),Sa=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),Pa=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.baseUrl=t,i.logsConfig=n,i.token=r,i.agent=o,i.stop=function(){return _(i,void 0,void 0,(function(){var e;return C(this,(function(t){if(void 0===this.logSession)throw new Error("No command is running");return null===(e=this.remote)||void 0===e||e.close(),[2]}))}))},i}return R(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.types,r=e.entityId,o=e.entityType,i=e.buildId,a=e.runId,s=e.backupId,c=e.restoreId,u=e.deploymentId,d=e.isBuild,l=e.lineLimit,p=e.projectId,f=e.queryType,h=e.startTime,v=e.endTime,m=e.duration,g=e.direction,b=e.textIncludes,w=e.textNotIncludes,y=e.regexIncludes,I=e.regexNotIncludes,j="/v1/projects/".concat(p,"/"),R=new URLSearchParams;return R.append("queryType",f),void 0!==h&&R.append("startTime",h.toISOString()),void 0!==v&&R.append("endTime",v.toISOString()),void 0!==l&&R.append("lineLimit",l.toString()),void 0!==t&&R.append("containerName",t),void 0!==u&&R.append("deploymentId",u),void 0!==a&&R.append("runId",a),void 0!==i&&R.append("buildId",i),void 0!==b&&R.append("textIncludes",b),void 0!==w&&R.append("textNotIncludes",w),void 0!==y&&R.append("regexIncludes",y),void 0!==I&&R.append("regexNotIncludes",I),void 0!==g&&R.append("direction",g),void 0!==m&&R.append("duration",m.toString()),void 0!==n&&n.forEach((function(e){return R.append("type",e)})),"".concat(j).concat(function(){var e=d?"/build-logs":"/logs";switch(o){case"service":return"services/".concat(r).concat(e);case"job":return"jobs/".concat(r).concat(e);case"addon":return"addons/".concat(r).concat(e);case"addonBackup":return"addons/".concat(r,"/backups/").concat(s).concat(e);case"addonRestore":return"addons/".concat(r,"/backups/").concat(s,"/restores/").concat(c).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(R.toString())},Object.defineProperty(t.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(t.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),t.prototype.start=function(){return _(this,void 0,void 0,(function(){var e=this;return C(this,(function(t){switch(t.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(t,n){var r,o,i,a;void 0!==e.remote&&n(Error("Command is already running"));var s=e.logsEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Yi(s,{agent:e.agent}),null===(r=e.remote)||void 0===r||r.on("message",(function(t){var n,r,o=JSON.parse(t.toString());switch(null==o?void 0:o.type){case"init":var i=o.data;"successful"!==i.auth&&c("Log tail initialization failed: ".concat(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var a=o.data;e.emit("logs-received",a.map(Ma));break;case"error":c(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var s="unable to parse message: ".concat(JSON.stringify(o));c(s)}})),null===(o=e.remote)||void 0===o||o.on("close",(function(){e.emit("close"),e.reset(),t()})),null===(i=e.remote)||void 0===i||i.on("open",(function(){e.emit("open")})),null===(a=e.remote)||void 0===a||a.on("error",(function(n){e.emit("error",n),e.reset(),t()}));var c=function(t){e.emit("error",{message:t}),e.reset(),n(new Error(t))}})),[4,new Promise((function(t){var n;e.remote.on("open",(function(){return t()})),null===(n=e.remote)||void 0===n||n.on("error",(function(){t()}))}))];case 1:return t.sent(),this.initialAuth(),[2,this.logSession]}}))}))},t.prototype.initialAuth=function(){var e,t={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(e=this.remote)||void 0===e||e.send(JSON.stringify(t))},t.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},t}(t),ka=Kn?Xn:window.fetch,Aa=function(){if(Kn)try{return JSON.parse(l.readFileSync(p.join(p.dirname(b(import.meta.url)),"../../package.json")).toString())}catch(e){return{}}return{}},qa=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return _(n,void 0,void 0,(function(){return C(this,(function(t){return[2,this.executeCall(e)]}))}))},this.contextProvider=e}return e.prototype.getDefaultHeaders=function(){var e,t,n=this.contextProvider.getCurrentToken(),r=(null===(e=this.opts)||void 0===e?void 0:e.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(t=Aa())||void 0===t?void 0:t.version).concat(r)}},e.prototype.executeCall=function(e){var t;return _(this,void 0,void 0,(function(){var n,r,o,i,a,s,c,u,d,l,p,f,h=this;return C(this,(function(v){switch(v.label){case 0:if(n=this.method,r=this.opts.agent,o={method:n,headers:this.getDefaultHeaders(),agent:r},!(i=null===(t=this.contextProvider)||void 0===t?void 0:t.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return a="".concat(i).concat(this.endpointUrl(e)),s=this.body(e),c=U(U({url:a},o),{body:s}),[4,Ba(a,U(U({},o),{body:s}))];case 1:return[4,(u=v.sent()).text()];case 2:return d=v.sent(),l=function(){if(200!==u.status){var e=null==p?void 0:p.error,t=(null==e?void 0:e.message)||"",n={status:u.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(h.opts.throwErrorOnHttpErrorCode)throw new Sa(n);return n}},p=function(){try{return JSON.parse(d)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(u.statusText," (").concat(u.status,")\n\tMessage: ").concat(d))}}(),f=l(),[2,{data:null==p?void 0:p.data,rawResponse:u,request:c,error:f,pagination:null==p?void 0:p.pagination}]}}))}))},e}(),xa=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}(qa),Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.all=function(e){return _(t,void 0,void 0,(function(){return C(this,(function(t){return[2,new Da(this,e).getAll()]}))}))},t.call=function(n){return _(t,void 0,void 0,(function(){var t,r=this;return C(this,(function(o){switch(o.label){case 0:return[4,e.prototype.executeCall.call(this,n)];case 1:return t=o.sent(),[2,U(U({},t),{pagination:U(U({},t.pagination),{getNextPage:function(){return _(r,void 0,void 0,(function(){var e,r,o,i,a,s,c,u=this;return C(this,(function(d){return void 0===(null===(s=t.pagination)||void 0===s?void 0:s.cursor)?(e=Object.keys(t.data),r=1===e.length?((a={})[e[0]]=[],a):{},o=U(U({},t),{pagination:U(U({},t.pagination),{count:0}),data:r}),[2,(i=function(e){return U(U({},e),{pagination:U(U({},e.pagination),{getNextPage:function(){return _(u,void 0,void 0,(function(){return C(this,(function(t){return[2,i(e)]}))}))}})})})(o)]):[2,new Da(this,n,null===(c=t.pagination)||void 0===c?void 0:c.cursor).getNext()]}))}))}})})]}}))}))},t}return R(t,e),t}(xa),Na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return R(t,e),t}(qa),Ta=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}(qa),Ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return R(t,e),t}(qa),La=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return R(t,e),t}(qa),Da=function(){function e(e,t,n){void 0===n&&(n=null);var r=this;this.endpoint=e,this.opts=t,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(e.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),e.prototype.getNext=function(){var e,t,n;return _(this,void 0,void 0,(function(){var r,o,i,a,s,c;return C(this,(function(u){switch(u.label){case 0:return[4,this.endpoint.call(U(U({},this.opts),{options:U(U({},null===(e=this.opts)||void 0===e?void 0:e.options),{cursor:null!==(t=this.cursor)&&void 0!==t?t:void 0})}))];case 1:return r=u.sent(),o=r.data,i=r.request,a=r.error,s=r.pagination,c=r.rawResponse,this.cursor=null==s?void 0:s.cursor,this._currentOffset+=null!==(n=null==s?void 0:s.count)&&void 0!==n?n:0,[2,{data:o,request:i,error:a,pagination:s,rawResponse:c}]}}))}))},e.prototype.getAll=function(){var e,t;return _(this,void 0,void 0,(function(){var n,r,o,i,a;return C(this,(function(s){switch(s.label){case 0:n=[],s.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=s.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return i=n.flatMap((function(e){var t=Object.keys(e.data);return 1===t.length?(o=t[0],e.data[t[0]]):e.data})),[2,{data:void 0===o?i:(a={},a[o]=i,a),request:null===(e=n[0])||void 0===e?void 0:e.request,rawResponse:null===(t=n[0])||void 0===t?void 0:t.rawResponse}]}}))}))},e}(),Ba=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 a=function(n){return ka(e,t).then((function(e){o(e)})).catch((function(e){return _(void 0,void 0,void 0,(function(){return C(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,a(n-1)];case 2:return[2,i(e)]}var o}))}))}))};return a(n)}))},Ja=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch log lines over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){return Pa.getLogsEndpoint(e)},t.body=function(){},t}return R(t,e),t}(xa);!function(e){e.CDN="cdn",e.Mesh="mesh",e.Ingress="ingress",e.Runtime="runtime"}(ya||(ya={}));var Fa,Ma=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},Wa=function(e,t){void 0===t&&(t={});var n=this;this.contextProvider=e,this.clientOpts=t,this.getServiceLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.logRange(i,U(U({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logRange(i,U(U({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,U(U({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r,o;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},o={backupId:t.backupId,restoreId:t.restoreId},[2,this.logRange(r,U(U({},n),o),"addonRestore")]}))}))},this.logRange=function(e,t,r){return _(n,void 0,void 0,(function(){var n,o,i,a,s;return C(this,(function(c){switch(c.label){case 0:return n=e.entityId,o=e.projectId,i=U(U({projectId:o,entityId:n,entityType:r},t),{queryType:"range"}),[4,new Ja(this.contextProvider,this.clientOpts).call(i)];case 1:return(a=c.sent()).error?[2,a]:[2,U(U({},a),{data:null===(s=null==a?void 0:a.data)||void 0===s?void 0:s.map(Ma)})]}}))}))},this.tailServiceLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.logTail(i,U(U({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logTail(i,U(U({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,U(U({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return _(n,void 0,void 0,(function(){var t,n,r,o;return C(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},o={backupId:t.backupId,restoreId:t.restoreId},[2,this.logTail(r,U(U({},n),o),"addonRestore")]}))}))},this.logTail=function(e,t,r){return _(n,void 0,void 0,(function(){var n,o,i,a,s;return C(this,(function(c){if(n=e.entityId,o=e.projectId,i=U({queryType:"tail",projectId:o,entityId:n,entityType:r},t),this.assertStartedWithNodejs(),a=this.contextProvider.getCurrentBaseUrl(!0),!(s=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new Pa(a,i,s,this.clientOpts.agent)]}))}))},this.assertStartedWithNodejs=function(){if(!Kn)throw new Error("Command exec only possible when started with nodejs")}},za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch metrics entries over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){var t=e.projectId,n=e.entityId,r=e.entityType,o=e.deploymentId,i=e.runId,a=e.buildId,s=e.isBuild,c=e.queryType,u=e.metricTypes,d=e.startTime,l=e.endTime,p=e.duration,f=e.containerName,h=e.timestamp,v="/v1/projects/".concat(t,"/");var m=new URLSearchParams;return m.append("queryType",c),void 0!==d&&m.append("startTime",d.toISOString()),void 0!==l&&m.append("endTime",l.toISOString()),void 0!==f&&m.append("containerName",f),void 0!==o&&m.append("deploymentId",o),void 0!==i&&m.append("runId",i),void 0!==a&&m.append("buildId",a),void 0!==h&&m.append("timestamp",h.toISOString()),void 0!==p&&m.append("duration",p.toString()),void 0!==u&&u.forEach((function(e){return m.append("metricTypes",e)})),"".concat(v).concat(function(){var e=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(m.toString())},t.body=function(){},t}return R(t,e),t}(xa),Va=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};!function(e){e.Cpu="cpu",e.Memory="memory",e.NetworkIngress="networkIngress",e.NetworkEgress="networkEgress",e.TcpConnectionOpen="tcpConnectionsOpen",e.PvcUsage="diskUsage",e.Requests="requests",e.Http4xxResponses="http4xxResponses",e.Http5xxResponses="http5xxResponses",e.Bandwidth="bandwidth",e.BandwidthVolume="bandwidthVolume"}(Fa||(Fa={}));var $a=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return _(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(e){return _(t,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,U(U({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return _(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(e){return _(t,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.jobId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,U(U({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return _(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(e,n,r){return _(t,void 0,void 0,(function(){var t,o,i;return C(this,(function(a){return t=e.entityId,o=e.projectId,i=U(U({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return _(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(e){return _(t,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.metricsRange(i,U(U({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return _(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(e){return _(t,void 0,void 0,(function(){var t,n,r,o,i;return C(this,(function(a){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.metricsRange(i,U(U({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return _(t,void 0,void 0,(function(){var t,n,r;return C(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(e,n,r){return _(t,void 0,void 0,(function(){var t,o,i;return C(this,(function(a){return t=e.entityId,o=e.projectId,i=U(U({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return _(t,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return[4,new za(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,U(U({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,U(U({},n),{values:n.values.map(Va)})]})))})]}}))}))}},Ha=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}(xa),Ya=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backup destinations saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/backup-destinations".concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Xa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new backup destination to this account.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Create",t.endpointUrl=function(e){return"/v1/backup-destinations"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a backup destination, including secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){return["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return R(t,e),t}(xa),Za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Update",t.endpointUrl=function(e){return["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),Qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Delete",t.endpointUrl=function(e){return["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return R(t,e),t}(Ta),es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backups associated with a backup destinations.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){var t;["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId),"/backups").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),ts=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}(Oa),ns=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}(xa),rs=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}(xa),os=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}(Oa),is=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}(Na),as=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or update a cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),ss=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return R(t,e),t}(xa),cs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),us=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given cluster. Fails if the cluster has associated projects.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Delete",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return R(t,e),t}(Ta),ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of nodes for the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t;["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/cordon")},t.body=function(){},t}return R(t,e),t}(Na),ps=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Drain a node by evicting all running pods.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/drain")},t.body=function(){},t}return R(t,e),t}(Na),fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Uncordon a node on the cluster if it was previously cordoned.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/uncordon")},t.body=function(){},t}return R(t,e),t}(Na),hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists docker registries for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),vs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/docker-registries"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Create",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),gs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given docker registry",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return R(t,e),t}(xa),bs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Update",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(e.parameters.registryId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Delete",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return R(t,e),t}(Ta),ys=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}(Oa),Is=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}(Na),js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),Rs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return R(t,e),t}(xa),Us=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Update",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(e.parameters.integrationId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),_s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given integration. Fails if the integration is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Delete",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return R(t,e),t}(Ta),Cs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider node types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Ss=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}(xa),Ps=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}(Oa),ks=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}(Na),As=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return R(t,e),t}(xa),qs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a domain and each of its registered subdomains.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Delete",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return R(t,e),t}(Ta),xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve certificate data for a domain to verify its contents.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/certificate")},t.body=function(){},t}return R(t,e),t}(xa),Os=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Import a certificate for the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ns=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new subdomain to the domain.",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ts=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Read",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return R(t,e),t}(xa),Gs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from a domain.",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return R(t,e),t}(Ta),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assigns a service port to the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from its assigned service",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){var t;["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign").concat(r)},t.body=function(){},t}return R(t,e),t}(Ta),Bs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes the CDN integration from the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Enables a CDN integration on the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new path to the subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Create",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List paths for a given subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Read",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(){},t}return R(t,e),t}(xa),Ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get subdomain path details.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Read",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return R(t,e),t}(xa),zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return R(t,e),t}(Ta),Vs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a subdomain path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),$s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unassign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(){},t}return R(t,e),t}(Ta),Ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/verify")},t.body=function(){},t}return R(t,e),t}(Na),Xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attempts to verify the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/verify")},t.body=function(){},t}return R(t,e),t}(Na),Ks=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}(Oa),Zs=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}(Na),Qs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return R(t,e),t}(xa),ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Delete",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return R(t,e),t}(Ta),tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pauses a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId),"/pause")},t.body=function(){},t}return R(t,e),t}(Na),nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes a paused log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId),"/resume")},t.body=function(){},t}return R(t,e),t}(Na),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the settings for a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists notification integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return R(t,e),t}(xa),sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(e.parameters.notificationId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return R(t,e),t}(Ta),uc=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}(Oa),dc=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}(Na),lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Views a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read Encrypted",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return R(t,e),t}(xa),pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Delete",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return R(t,e),t}(Ta),fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Update",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(e.parameters.credentialId),"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),hc=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}(xa),vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generate a token for a specific VCS link.",t.withAuth=!0,t.requiredPermissions="Account > Git > Tokens > Read",t.endpointUrl=function(e){var t;["customVCSId","vcsLinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(encodeURIComponent(e.parameters.customVCSId),"/token/").concat(encodeURIComponent(e.parameters.vcsLinkId)).concat(r)},t.body=function(){},t}return R(t,e),t}(Na),mc=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}(Oa),gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of branches for the repo",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t;["vcsService","repositoryOwner","repositoryName"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(encodeURIComponent(e.parameters.vcsService),"/").concat(encodeURIComponent(e.parameters.repositoryOwner),"/").concat(encodeURIComponent(e.parameters.repositoryName),"/branches").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),bc=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}(xa),wc=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}(Oa),yc=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}(Na),Ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Update",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),Rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given project",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId))},t.body=function(){},t}return R(t,e),t}(xa),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given project. Fails if the project isn't empty.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Delete",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId)).concat(r)},t.body=function(){},t}return R(t,e),t}(Ta),_c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of addons belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),Sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return R(t,e),t}(xa),Pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return R(t,e),t}(Ta),Ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about an addon's backup schedules",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","scheduleId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(e.parameters.scheduleId))},t.body=function(){},t}return R(t,e),t}(Ta),Oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of backups for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Initiates a backup for the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return R(t,e),t}(xa),Gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a given backup",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return R(t,e),t}(Ta),Lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the in progress backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort")},t.body=function(){},t}return R(t,e),t}(Na),Dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts an in-progress backup restore.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort-restore").concat(r)},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generates a temporary download link for downloading the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/download-link")},t.body=function(){},t}return R(t,e),t}(xa),Jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores the given addon to the given backup state.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restore").concat(r)},t.body=function(){},t}return R(t,e),t}(Na),Fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of restores for the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restores").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/retain")},t.body=function(){},t}return R(t,e),t}(Na),Wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/containers").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the credentials for connecting to the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/credentials")},t.body=function(){},t}return R(t,e),t}(xa),Vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Imports a database from an external archive or existing live database.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),$c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the network settings for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pause")},t.body=function(){},t}return R(t,e),t}(Na),Yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Reset the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/reset")},t.body=function(){},t}return R(t,e),t}(Na),Xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restart the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restart")},t.body=function(){},t}return R(t,e),t}(Na),Kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of restores for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restores").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resume the given addon if it is paused.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/resume")},t.body=function(){},t}return R(t,e),t}(Na),Qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the allocated resources for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the security rules for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the current addon version including available upgrades and upgrade history.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(){},t}return R(t,e),t}(xa),nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Upgrades the addon to a new version.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of jobs belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),su=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return R(t,e),t}(xa),lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Delete",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return R(t,e),t}(Ta),pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/branches").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists builds for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given job. Given a commit sha, it will build that commit.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),vu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments").concat(r)},t.body=function(){},t}return R(t,e),t}(xa),mu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets build arguments for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments/details")},t.body=function(){},t}return R(t,e),t}(xa),bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return R(t,e),t}(xa),Iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job build",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return R(t,e),t}(Ta),ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/containers").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(){},t}return R(t,e),t}(xa),Uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),_u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(){},t}return R(t,e),t}(xa),Cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pause")},t.body=function(){},t}return R(t,e),t}(Na),Su=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pull-requests").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetches run history for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Starts a new job run for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns data about the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return R(t,e),t}(xa),xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return R(t,e),t}(Ta),Ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment").concat(r)},t.body=function(){},t}return R(t,e),t}(xa),Nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment/details")},t.body=function(){},t}return R(t,e),t}(xa),Gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Scale Job",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates settings for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modify cron job to toggle suspending of its schedule.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists all pipelines for a project",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a pipeline",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId))},t.body=function(){},t}return R(t,e),t}(xa),Fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Mu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of active preview environments for a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a preview environment generated by a preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["projectId","pipelineId","previewId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(e.parameters.previewId))},t.body=function(){},t}return R(t,e),t}(Ta),Vu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of preview template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),$u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return R(t,e),t}(xa),Hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(){},t}return R(t,e),t}(xa),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists runs of a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return R(t,e),t}(xa),Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId),"/abort")},t.body=function(){},t}return R(t,e),t}(Na),ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of secrets belonging to the project",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret including its contents",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t;["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId)).concat(r)},t.body=function(){},t}return R(t,e),t}(xa),id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(){},t}return R(t,e),t}(Ta),ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Link an addon to the secret group or edit the settings of the linked addon.",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a given addon link.",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return R(t,e),t}(xa),ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unlinks an addon from the secret group.",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return R(t,e),t}(Ta),dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret with details about its linked addons",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/details")},t.body=function(){},t}return R(t,e),t}(xa),ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of services belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/build/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/combined/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),Id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(){},t}return R(t,e),t}(xa),jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Delete",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId)).concat(r)},t.body=function(){},t}return R(t,e),t}(Ta),Rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/branches").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the builds for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),_d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments").concat(r)},t.body=function(){},t}return R(t,e),t}(xa),Ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the build arguments for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments/details")},t.body=function(){},t}return R(t,e),t}(xa),Pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given build or combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return R(t,e),t}(xa),qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given service build",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return R(t,e),t}(Ta),xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/containers").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(){},t}return R(t,e),t}(xa),Nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(){},t}return R(t,e),t}(xa),Gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pause")},t.body=function(){},t}return R(t,e),t}(Na),Dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(){},t}return R(t,e),t}(xa),Bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the list of ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pull-requests").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),Fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restarts the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/restart")},t.body=function(){},t}return R(t,e),t}(Na),Md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment").concat(r)},t.body=function(){},t}return R(t,e),t}(xa),zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment/details")},t.body=function(){},t}return R(t,e),t}(xa),$d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Scale Service",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of volumes belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(){},t}return R(t,e),t}(xa),Yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a volume with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return R(t,e),t}(xa),Kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update volume mounts and storage size",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),Zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes this volume and its associated data.",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Delete",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return R(t,e),t}(Ta),Qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Detach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),tl=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}(xa),nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List the resource tags for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/tags".concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Add a new resource tag for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Create",t.endpointUrl=function(e){return"/v1/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update or create a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Ga),il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View details for a given resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Read",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return R(t,e),t}(xa),al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Patch a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(La),sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Delete",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return R(t,e),t}(Ta),cl=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}(Oa),ul=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}(Na),dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId)).concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Update",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId))},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId))},t.body=function(){},t}return R(t,e),t}(Ta),fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Run a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Run",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return R(t,e),t}(Na),hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs").concat(r)},t.body=function(){},t}return R(t,e),t}(Oa),vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return R(t,e),t}(xa),ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > Runs > Abort",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId),"/abort")},t.body=function(){},t}return R(t,e),t}(Na),gl=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 _(this,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,this.writeContext(e)];case 1:return t.sent(),this.contextWrapper=e,[2]}}))}))},e.prototype.addContext=function(e,t){return void 0===t&&(t=!0),_(this,void 0,void 0,(function(){var n,r,o;return C(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=U({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:E(E([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return _(this,void 0,void 0,(function(){var t,n,r,o;return C(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:E([],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 _(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(!this.findContext(e))throw new Error("Context with name ".concat(e," doesn't exist"));return t=this.contextWrapper,n=U(U({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o,i,a;return C(this,(function(s){switch(s.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?U(U({},r),{token:e}):t})),a=U(U({},o),{contexts:i}),[4,this.storeContext(a)];case 1:return s.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return _(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=U(U({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return _(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=U(U({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return _(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=U(U({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return _(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=U(U({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return _(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=U(U({},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 _(this,void 0,void 0,(function(){var t,n;return C(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=U(U({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),bl=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return _(n,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),l.existsSync(e)?[3,2]:[4,l.promises.mkdir(e,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 4:return[2]}}))}))},n.configPath=t||"".concat(s.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return R(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(l.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return _(this,void 0,void 0,(function(){var t;return C(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,l.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 _(this,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return e.sent(),[2]}}))}))},t.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},t}(gl),wl=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 _(this,void 0,void 0,(function(){return C(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(gl),yl=function(e,t){void 0===t&&(t={});var n,r,o,i=this;this.baseUrl=function(){return i.contextProvider.getCurrentBaseUrl()},this.contextProvider=e,this.forwarding=new Ua(e,new ld(e,t),new _c(e,t),t.agent),this.exec=new Ea(e,t.agent),this.logs=new Wa(e,t),this.metrics=new $a(e),this.endpoints={get:(o={},o.addon=((r=new Sc(e,t)).types=new Ha(e,t),r.backupSchedules=new Ac(e,t),r.backups=new Oc(e,t),r.backup=((n=new Tc(e,t)).download=new Bc(e,t),n.restores=new Fc(e,t),n),r.containers=new Wc(e,t),r.credentials=new zc(e,t),r.restores=new Kc(e,t),r.version=new tu(e,t),r),o.backupDestination=new Ka(e,t),o.invoice=function(){var n={};return n.details=new ns(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new ss(e,t),n.dockerRegistry=new gs(e,t),n.integration=new Rs(e,t),n}(),o.dnsId=new Ss(e,t),o.domain=new As(e,t),o.domainCertificate=new xs(e,t),o.subdomain=function(){var n=new Ts(e,t);return n.path=new Ws(e,t),n}(),o.logSink=new Qs(e,t),o.notification=new ac(e,t),o.registryCredentials=new lc(e,t),o.project=new Rc(e,t),o.job=function(){var n=new du(e,t);return n.branches=new pu(e,t),n.builds=new fu(e,t),n.buildArguments=new vu(e,t),n.buildArgumentDetails=new gu(e,t),n.build=new yu(e,t),n.containers=new ju(e,t),n.deployment=new Ru(e,t),n.healthChecks=new _u(e,t),n.pullRequests=new Su(e,t),n.runs=new ku(e,t),n.run=new qu(e,t),n.runtimeEnvironment=new Ou(e,t),n.runtimeEnvironmentDetails=new Tu(e,t),n}(),o.pipeline=new Ju(e,t),o.previewTemplate=new Fu(e,t),o.previewTemplateRun=new $u(e,t),o.releaseFlow=new Hu(e,t),o.releaseFlowRun=new Zu(e,t),o.secret=new od(e,t),o.secretLink=new cd(e,t),o.secretDetails=new dd(e,t),o.service=function(){var n=new Id(e,t);return n.branches=new Rd(e,t),n.builds=new Ud(e,t),n.buildArguments=new Cd(e,t),n.buildArgumentDetails=new Sd(e,t),n.build=new Ad(e,t),n.containers=new xd(e,t),n.deployment=new Od(e,t),n.healthChecks=new Td(e,t),n.ports=new Dd(e,t),n.pullRequests=new Jd(e,t),n.runtimeEnvironment=new Wd(e,t),n.runtimeEnvironmentDetails=new Vd(e,t),n}(),o.volume=new Xd(e,t),o.tag=new il(e,t),o.template=new dl(e,t),o.templateRun=new vl(e,t),o),list:function(){var n={};return n.backupDestinations=new Ya(e,t),n.backupDestinationsBackups=new es(e,t),n.invoices=new ts(e,t),n.cloud=function(){var n={};return n.providers=new rs(e,t),n.clusters=new os(e,t),n.cluster=function(){var n={};return n.nodes=new ds(e,t),n}(),n.dockerRegistry=new hs(e,t),n.integrations=new ys(e,t),n.nodeTypes=new Cs(e,t),n.regions=new Es(e,t),n}(),n.domains=new Ps(e,t),n.subdomain=function(){var n={};return n.path=new Ms(e,t),n}(),n.logSinks=new Ks(e,t),n.notifications=new oc(e,t),n.registryCredentials=new uc(e,t),n.vcs=new hc(e,t),n.repos=new mc(e,t),n.branches=new gc(e,t),n.plans=new bc(e,t),n.projects=new wc(e,t),n.addons=new _c(e,t),n.jobs=new ru(e,t),n.pipelines=new Bu(e,t),n.previewTemplatePreviews=new Wu(e,t),n.previewTemplateRuns=new Vu(e,t),n.releaseFlowRuns=new Ku(e,t),n.secrets=new ed(e,t),n.services=new ld(e,t),n.volumes=new Hd(e,t),n.regions=new tl(e,t),n.tags=new nl(e,t),n.templates=new cl(e,t),n.templateRuns=new hl(e,t),n}(),add:function(){var n={};return n.backupDestination=new Xa(e,t),n.domain=function(){var n={};return n.subdomain=new Ns(e,t),n}(),n.subdomain=function(){var n={};return n.path=new Fs(e,t),n}(),n.registryCredentials=new dc(e,t),n.tag=new rl(e,t),n}(),patch:function(){var n={};return n.backupDestination=new Za(e,t),n.cloud=function(){var n={};return n.cluster=new cs(e,t),n.dockerRegistry=new bs(e,t),n.integration=new Us(e,t),n}(),n.project=new jc(e,t),n.addon=new Pc(e,t),n.job=function(){var n={};return n.cron=new au(e,t),n.manual=new uu(e,t),n}(),n.secret=new rd(e,t),n.service=function(){var n={};return n.build=new hd(e,t),n.combined=new gd(e,t),n.deployment=new yd(e,t),n}(),n.tag=new al(e,t),n}(),delete:function(){var n={};return n.backupDestination=new Qa(e,t),n.cloud=function(){var n={};return n.cluster=new us(e,t),n.dockerRegistry=new ws(e,t),n.integration=new _s(e,t),n}(),n.domain=new qs(e,t),n.subdomain=function(){var n=new Gs(e,t);return n.path=new zs(e,t),n}(),n.logSink=new ec(e,t),n.notification=new cc(e,t),n.registryCredentials=new pc(e,t),n.project=new Uc(e,t),n.addon=function(){var n=new kc(e,t);return n.backupSchedule=new xc(e,t),n}(),n.backup=new Gc(e,t),n.job=new lu(e,t),n.previewTemplatePreview=new zu(e,t),n.secret=new id(e,t),n.secretLink=new ud(e,t),n.service=new jd(e,t),n.volume=new Zd(e,t),n.tag=new sl(e,t),n.template=new pl(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new is(e,t),n.dockerRegistry=new vs(e,t),n.integration=new Is(e,t),n}(),n.domain=new ks(e,t),n.logSink=new Zs(e,t),n.notification=new ic(e,t),n.customVcs=function(){var n={};return n.token=new vc(e,t),n}(),n.project=new yc(e,t),n.addon=function(){var n=new Cc(e,t);return n.backupSchedule=new qc(e,t),n}(),n.job=function(){var n={};return n.cron=new ou(e,t),n.manual=new su(e,t),n}(),n.secret=new td(e,t),n.service=function(){var n={};return n.build=new pd(e,t),n.combined=new vd(e,t),n.deployment=new bd(e,t),n}(),n.volume=new Yd(e,t),n.template=new ul(e,t),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new as(e,t),n.dockerRegistry=new ms(e,t),n.integration=new js(e,t),n}(),n.project=new Ic(e,t),n.addon=new Ec(e,t),n.job=function(){var n={};return n.cron=new iu(e,t),n.manual=new cu(e,t),n}(),n.secret=new nd(e,t),n.service=function(){var n={};return n.build=new fd(e,t),n.combined=new md(e,t),n.deployment=new wd(e,t),n}(),n.tag=new ol(e,t),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new ls(e,t),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new ps(e,t),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new fs(e,t),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new Os(e,t),n.addon=function(){var n={};return n.backup=new Vc(e,t),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Ls(e,t),n.path=new $s(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new Ds(e,t);return n.path=new Hs(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Bs(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Js(e,t),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new Vs(e,t),n}(),n.logSink=new rc(e,t),n.notification=new sc(e,t),n.registryCredentials=new fc(e,t),n.addon=function(){var n={};return n.networkSettings=new $c(e,t),n.security=new eu(e,t),n.version=new nu(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new mu(e,t),n.buildOptions=new bu(e,t),n.buildSource=new wu(e,t),n.deployment=new Uu(e,t),n.healthChecks=new Cu(e,t),n.runtimeEnvironment=new Nu(e,t),n.settings=new Lu(e,t),n}(),n.previewTemplate=new Mu(e,t),n.releaseFlow=new Yu(e,t),n.secret=new ad(e,t),n.secretLink=new sd(e,t),n.service=function(){var n={};return n.buildArguments=new Ed(e,t),n.buildOptions=new Pd(e,t),n.buildSource=new kd(e,t),n.deployment=new Nd(e,t),n.healthChecks=new Gd(e,t),n.ports=new Bd(e,t),n.runtimeEnvironment=new zd(e,t),n}(),n.volume=new Kd(e,t),n.template=new ll(e,t),n}(),verify:function(){var n={};return n.subdomain=new Ys(e,t),n.domain=new Xs(e,t),n}(),pause:function(){var n={};return n.logSink=new tc(e,t),n.addon=new Hc(e,t),n.job=new Eu(e,t),n.service=new Ld(e,t),n}(),resume:function(){var n={};return n.logSink=new nc(e,t),n.addon=new Zc(e,t),n.job=new Pu(e,t),n.service=new Md(e,t),n}(),backup:function(){var n={};return n.addon=new Nc(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Lc(e,t),n.restore=new Dc(e,t),n}(),n.job=function(){var n={};return n.build=new Iu(e,t),n.run=new xu(e,t),n}(),n.releaseFlowRun=new Qu(e,t),n.service=function(){var n={};return n.build=new qd(e,t),n}(),n.templateRun=new ml(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new Jc(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new Mc(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new Yc(e,t),n}(),restart:function(){var n={};return n.addon=new Xc(e,t),n.service=new Fd(e,t),n}(),scale:function(){var n={};return n.addon=new Qc(e,t),n.job=new Gu(e,t),n.service=new $d(e,t),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new hu(e,t),n.run=new Au(e,t),n}(),n.service=function(){var n={};return n.build=new _d(e,t),n}(),n}(),suspend:function(){var n={};return n.job=new Du(e,t),n}(),run:function(){var n={};return n.releaseFlow=new Xu(e,t),n.template=new fl(e,t),n}(),attach:function(){var n={};return n.volume=new Qd(e,t),n}(),detach:function(){var n={};return n.volume=new el(e,t),n}()},this.get=function(){var e={};return e.addon=function(){var e=i.endpoints.get.addon.call;return e.types=i.endpoints.get.addon.types.call,e.backupSchedules=function(){var e=i.endpoints.get.addon.backupSchedules.call;return e.all=i.endpoints.get.addon.backupSchedules.all,e}(),e.backups=function(){var e=i.endpoints.get.addon.backups.call;return e.all=i.endpoints.get.addon.backups.all,e}(),e.backup=function(){var e=i.endpoints.get.addon.backup.call;return e.download=i.endpoints.get.addon.backup.download.call,e.restores=function(){var e=i.endpoints.get.addon.backup.restores.call;return e.all=i.endpoints.get.addon.backup.restores.all,e}(),e.logs=i.logs.getAddonBackupLogs,e.logTail=i.logs.tailAddonBackupLogs,e}(),e.containers=function(){var e=i.endpoints.get.addon.containers.call;return e.all=i.endpoints.get.addon.containers.all,e}(),e.credentials=i.endpoints.get.addon.credentials.call,e.restores=function(){var e=function(){var e=i.endpoints.get.addon.restores.call;return e.all=i.endpoints.get.addon.restores.all,e}();return e.logs=i.logs.getAddonRestoresLogs,e.logTail=i.logs.tailAddonRestoresLogs,e}(),e.version=i.endpoints.get.addon.version.call,e.logs=i.logs.getAddonLogs,e.logTail=i.logs.tailAddonLogs,e.metrics=i.metrics.getAddonMetrics,e.metricsRange=i.metrics.getAddonMetricsRange,e}(),e.backupDestination=i.endpoints.get.backupDestination.call,e.invoice=function(){var e={};return e.details=i.endpoints.get.invoice.details.call,e}(),e.cloud=function(){var e={};return e.cluster=i.endpoints.get.cloud.cluster.call,e.dockerRegistry=i.endpoints.get.cloud.dockerRegistry.call,e.integration=i.endpoints.get.cloud.integration.call,e}(),e.dnsId=i.endpoints.get.dnsId.call,e.domain=i.endpoints.get.domain.call,e.domainCertificate=i.endpoints.get.domainCertificate.call,e.subdomain=function(){var e=i.endpoints.get.subdomain.call;return e.path=i.endpoints.get.subdomain.path.call,e}(),e.logSink=i.endpoints.get.logSink.call,e.notification=i.endpoints.get.notification.call,e.registryCredentials=i.endpoints.get.registryCredentials.call,e.project=i.endpoints.get.project.call,e.job=function(){var e=i.endpoints.get.job.call;return e.branches=function(){var e=i.endpoints.get.job.branches.call;return e.all=i.endpoints.get.job.branches.all,e}(),e.builds=function(){var e=i.endpoints.get.job.builds.call;return e.all=i.endpoints.get.job.builds.all,e}(),e.buildArguments=i.endpoints.get.job.buildArguments.call,e.buildArgumentDetails=i.endpoints.get.job.buildArgumentDetails.call,e.build=i.endpoints.get.job.build.call,e.containers=function(){var e=i.endpoints.get.job.containers.call;return e.all=i.endpoints.get.job.containers.all,e}(),e.deployment=i.endpoints.get.job.deployment.call,e.healthChecks=i.endpoints.get.job.healthChecks.call,e.pullRequests=function(){var e=i.endpoints.get.job.pullRequests.call;return e.all=i.endpoints.get.job.pullRequests.all,e}(),e.runs=function(){var e=i.endpoints.get.job.runs.call;return e.all=i.endpoints.get.job.runs.all,e}(),e.run=i.endpoints.get.job.run.call,e.runtimeEnvironment=i.endpoints.get.job.runtimeEnvironment.call,e.runtimeEnvironmentDetails=i.endpoints.get.job.runtimeEnvironmentDetails.call,e.logs=i.logs.getJobLogs,e.buildLogs=i.logs.getJobBuildLogs,e.logTail=i.logs.tailJobLogs,e.buildLogTail=i.logs.tailJobBuildLogs,e.metrics=i.metrics.getJobMetrics,e.buildMetrics=i.metrics.getJobBuildMetrics,e.metricsRange=i.metrics.getJobMetricsRange,e.buildMetricsRange=i.metrics.getJobBuildMetricsRange,e}(),e.pipeline=i.endpoints.get.pipeline.call,e.previewTemplate=function(){var e=i.endpoints.get.previewTemplate.call;return e.all=i.endpoints.get.previewTemplate.all,e}(),e.previewTemplateRun=i.endpoints.get.previewTemplateRun.call,e.releaseFlow=i.endpoints.get.releaseFlow.call,e.releaseFlowRun=i.endpoints.get.releaseFlowRun.call,e.secret=i.endpoints.get.secret.call,e.secretLink=i.endpoints.get.secretLink.call,e.secretDetails=i.endpoints.get.secretDetails.call,e.service=function(){var e=i.endpoints.get.service.call;return e.branches=function(){var e=i.endpoints.get.service.branches.call;return e.all=i.endpoints.get.service.branches.all,e}(),e.builds=function(){var e=i.endpoints.get.service.builds.call;return e.all=i.endpoints.get.service.builds.all,e}(),e.buildArguments=i.endpoints.get.service.buildArguments.call,e.buildArgumentDetails=i.endpoints.get.service.buildArgumentDetails.call,e.build=i.endpoints.get.service.build.call,e.containers=function(){var e=i.endpoints.get.service.containers.call;return e.all=i.endpoints.get.service.containers.all,e}(),e.deployment=i.endpoints.get.service.deployment.call,e.healthChecks=i.endpoints.get.service.healthChecks.call,e.ports=i.endpoints.get.service.ports.call,e.pullRequests=function(){var e=i.endpoints.get.service.pullRequests.call;return e.all=i.endpoints.get.service.pullRequests.all,e}(),e.runtimeEnvironment=i.endpoints.get.service.runtimeEnvironment.call,e.runtimeEnvironmentDetails=i.endpoints.get.service.runtimeEnvironmentDetails.call,e.logs=i.logs.getServiceLogs,e.buildLogs=i.logs.getServiceBuildLogs,e.logTail=i.logs.tailServiceLogs,e.buildLogTail=i.logs.tailServiceBuildLogs,e.metrics=i.metrics.getServiceMetrics,e.buildMetrics=i.metrics.getServiceBuildMetrics,e.metricsRange=i.metrics.getServiceMetricsRange,e.buildMetricsRange=i.metrics.getServiceBuildMetricsRange,e}(),e.volume=i.endpoints.get.volume.call,e.tag=i.endpoints.get.tag.call,e.template=function(){var e=i.endpoints.get.template.call;return e.all=i.endpoints.get.template.all,e}(),e.templateRun=i.endpoints.get.templateRun.call,e}(),this.list=function(){var e={};return e.backupDestinations=function(){var e=i.endpoints.list.backupDestinations.call;return e.all=i.endpoints.list.backupDestinations.all,e}(),e.backupDestinationsBackups=function(){var e=i.endpoints.list.backupDestinationsBackups.call;return e.all=i.endpoints.list.backupDestinationsBackups.all,e}(),e.invoices=function(){var e=i.endpoints.list.invoices.call;return e.all=i.endpoints.list.invoices.all,e}(),e.cloud=function(){var e={};return e.providers=i.endpoints.list.cloud.providers.call,e.clusters=function(){var e=i.endpoints.list.cloud.clusters.call;return e.all=i.endpoints.list.cloud.clusters.all,e}(),e.cluster=function(){var e={};return e.nodes=function(){var e=i.endpoints.list.cloud.cluster.nodes.call;return e.all=i.endpoints.list.cloud.cluster.nodes.all,e}(),e}(),e.dockerRegistry=function(){var e=i.endpoints.list.cloud.dockerRegistry.call;return e.all=i.endpoints.list.cloud.dockerRegistry.all,e}(),e.integrations=function(){var e=i.endpoints.list.cloud.integrations.call;return e.all=i.endpoints.list.cloud.integrations.all,e}(),e.nodeTypes=function(){var e=i.endpoints.list.cloud.nodeTypes.call;return e.all=i.endpoints.list.cloud.nodeTypes.all,e}(),e.regions=function(){var e=i.endpoints.list.cloud.regions.call;return e.all=i.endpoints.list.cloud.regions.all,e}(),e}(),e.domains=function(){var e=i.endpoints.list.domains.call;return e.all=i.endpoints.list.domains.all,e}(),e.subdomain=function(){var e={};return e.path=i.endpoints.list.subdomain.path.call,e}(),e.logSinks=function(){var e=i.endpoints.list.logSinks.call;return e.all=i.endpoints.list.logSinks.all,e}(),e.notifications=function(){var e=i.endpoints.list.notifications.call;return e.all=i.endpoints.list.notifications.all,e}(),e.registryCredentials=function(){var e=i.endpoints.list.registryCredentials.call;return e.all=i.endpoints.list.registryCredentials.all,e}(),e.vcs=i.endpoints.list.vcs.call,e.repos=function(){var e=i.endpoints.list.repos.call;return e.all=i.endpoints.list.repos.all,e}(),e.branches=function(){var e=i.endpoints.list.branches.call;return e.all=i.endpoints.list.branches.all,e}(),e.plans=i.endpoints.list.plans.call,e.projects=function(){var e=i.endpoints.list.projects.call;return e.all=i.endpoints.list.projects.all,e}(),e.addons=function(){var e=i.endpoints.list.addons.call;return e.all=i.endpoints.list.addons.all,e}(),e.jobs=function(){var e=i.endpoints.list.jobs.call;return e.all=i.endpoints.list.jobs.all,e}(),e.pipelines=function(){var e=i.endpoints.list.pipelines.call;return e.all=i.endpoints.list.pipelines.all,e}(),e.previewTemplatePreviews=function(){var e=i.endpoints.list.previewTemplatePreviews.call;return e.all=i.endpoints.list.previewTemplatePreviews.all,e}(),e.previewTemplateRuns=function(){var e=i.endpoints.list.previewTemplateRuns.call;return e.all=i.endpoints.list.previewTemplateRuns.all,e}(),e.releaseFlowRuns=function(){var e=i.endpoints.list.releaseFlowRuns.call;return e.all=i.endpoints.list.releaseFlowRuns.all,e}(),e.secrets=function(){var e=i.endpoints.list.secrets.call;return e.all=i.endpoints.list.secrets.all,e}(),e.services=function(){var e=i.endpoints.list.services.call;return e.all=i.endpoints.list.services.all,e}(),e.volumes=i.endpoints.list.volumes.call,e.regions=i.endpoints.list.regions.call,e.tags=function(){var e=i.endpoints.list.tags.call;return e.all=i.endpoints.list.tags.all,e}(),e.templates=function(){var e=i.endpoints.list.templates.call;return e.all=i.endpoints.list.templates.all,e}(),e.templateRuns=function(){var e=i.endpoints.list.templateRuns.call;return e.all=i.endpoints.list.templateRuns.all,e}(),e}(),this.add=function(){var e={};return e.backupDestination=i.endpoints.add.backupDestination.call,e.domain=function(){var e={};return e.subdomain=i.endpoints.add.domain.subdomain.call,e}(),e.subdomain=function(){var e={};return e.path=i.endpoints.add.subdomain.path.call,e}(),e.registryCredentials=i.endpoints.add.registryCredentials.call,e.tag=i.endpoints.add.tag.call,e}(),this.patch=function(){var e={};return e.backupDestination=i.endpoints.patch.backupDestination.call,e.cloud=function(){var e={};return e.cluster=i.endpoints.patch.cloud.cluster.call,e.dockerRegistry=i.endpoints.patch.cloud.dockerRegistry.call,e.integration=i.endpoints.patch.cloud.integration.call,e}(),e.project=i.endpoints.patch.project.call,e.addon=i.endpoints.patch.addon.call,e.job=function(){var e={};return e.cron=i.endpoints.patch.job.cron.call,e.manual=i.endpoints.patch.job.manual.call,e}(),e.secret=i.endpoints.patch.secret.call,e.service=function(){var e={};return e.build=i.endpoints.patch.service.build.call,e.combined=i.endpoints.patch.service.combined.call,e.deployment=i.endpoints.patch.service.deployment.call,e}(),e.tag=i.endpoints.patch.tag.call,e}(),this.delete=function(){var e={};return e.backupDestination=i.endpoints.delete.backupDestination.call,e.cloud=function(){var e={};return e.cluster=i.endpoints.delete.cloud.cluster.call,e.dockerRegistry=i.endpoints.delete.cloud.dockerRegistry.call,e.integration=i.endpoints.delete.cloud.integration.call,e}(),e.domain=i.endpoints.delete.domain.call,e.subdomain=function(){var e=i.endpoints.delete.subdomain.call;return e.path=i.endpoints.delete.subdomain.path.call,e}(),e.logSink=i.endpoints.delete.logSink.call,e.notification=i.endpoints.delete.notification.call,e.registryCredentials=i.endpoints.delete.registryCredentials.call,e.project=i.endpoints.delete.project.call,e.addon=function(){var e=i.endpoints.delete.addon.call;return e.backupSchedule=i.endpoints.delete.addon.backupSchedule.call,e}(),e.backup=i.endpoints.delete.backup.call,e.job=i.endpoints.delete.job.call,e.previewTemplatePreview=i.endpoints.delete.previewTemplatePreview.call,e.secret=i.endpoints.delete.secret.call,e.secretLink=i.endpoints.delete.secretLink.call,e.service=i.endpoints.delete.service.call,e.volume=i.endpoints.delete.volume.call,e.tag=i.endpoints.delete.tag.call,e.template=i.endpoints.delete.template.call,e}(),this.create=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.create.cloud.cluster.call,e.dockerRegistry=i.endpoints.create.cloud.dockerRegistry.call,e.integration=i.endpoints.create.cloud.integration.call,e}(),e.domain=i.endpoints.create.domain.call,e.logSink=i.endpoints.create.logSink.call,e.notification=i.endpoints.create.notification.call,e.customVcs=function(){var e={};return e.token=i.endpoints.create.customVcs.token.call,e}(),e.project=i.endpoints.create.project.call,e.addon=function(){var e=i.endpoints.create.addon.call;return e.backupSchedule=i.endpoints.create.addon.backupSchedule.call,e}(),e.job=function(){var e={};return e.cron=i.endpoints.create.job.cron.call,e.manual=i.endpoints.create.job.manual.call,e}(),e.secret=i.endpoints.create.secret.call,e.service=function(){var e={};return e.build=i.endpoints.create.service.build.call,e.combined=i.endpoints.create.service.combined.call,e.deployment=i.endpoints.create.service.deployment.call,e}(),e.volume=i.endpoints.create.volume.call,e.template=i.endpoints.create.template.call,e}(),this.put=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.put.cloud.cluster.call,e.dockerRegistry=i.endpoints.put.cloud.dockerRegistry.call,e.integration=i.endpoints.put.cloud.integration.call,e}(),e.project=i.endpoints.put.project.call,e.addon=i.endpoints.put.addon.call,e.job=function(){var e={};return e.cron=i.endpoints.put.job.cron.call,e.manual=i.endpoints.put.job.manual.call,e}(),e.secret=i.endpoints.put.secret.call,e.service=function(){var e={};return e.build=i.endpoints.put.service.build.call,e.combined=i.endpoints.put.service.combined.call,e.deployment=i.endpoints.put.service.deployment.call,e}(),e.tag=i.endpoints.put.tag.call,e}(),this.cordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.cordon.cloud.cluster.node.call,e}(),e}(),e}(),this.drain=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.drain.cloud.cluster.node.call,e}(),e}(),e}(),this.uncordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.uncordon.cloud.cluster.node.call,e}(),e}(),e}(),this.import=function(){var e={};return e.domainCertificate=i.endpoints.import.domainCertificate.call,e.addon=function(){var e={};return e.backup=i.endpoints.import.addon.backup.call,e}(),e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=i.endpoints.assign.subdomain.service.call,e.path=i.endpoints.assign.subdomain.path.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=function(){var e=i.endpoints.unassign.subdomain.call;return e.path=i.endpoints.unassign.subdomain.path.call,e}(),e}(),this.disable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=i.endpoints.disable.subdomain.cdn.call,e}(),e}(),this.enable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=i.endpoints.enable.subdomain.cdn.call,e}(),e}(),this.update=function(){var e={};return e.subdomain=function(){var e={};return e.path=i.endpoints.update.subdomain.path.call,e}(),e.logSink=i.endpoints.update.logSink.call,e.notification=i.endpoints.update.notification.call,e.registryCredentials=i.endpoints.update.registryCredentials.call,e.addon=function(){var e={};return e.networkSettings=i.endpoints.update.addon.networkSettings.call,e.security=i.endpoints.update.addon.security.call,e.version=i.endpoints.update.addon.version.call,e}(),e.job=function(){var e={};return e.buildArguments=i.endpoints.update.job.buildArguments.call,e.buildOptions=i.endpoints.update.job.buildOptions.call,e.buildSource=i.endpoints.update.job.buildSource.call,e.deployment=i.endpoints.update.job.deployment.call,e.healthChecks=i.endpoints.update.job.healthChecks.call,e.runtimeEnvironment=i.endpoints.update.job.runtimeEnvironment.call,e.settings=i.endpoints.update.job.settings.call,e}(),e.previewTemplate=i.endpoints.update.previewTemplate.call,e.releaseFlow=i.endpoints.update.releaseFlow.call,e.secret=i.endpoints.update.secret.call,e.secretLink=i.endpoints.update.secretLink.call,e.service=function(){var e={};return e.buildArguments=i.endpoints.update.service.buildArguments.call,e.buildOptions=i.endpoints.update.service.buildOptions.call,e.buildSource=i.endpoints.update.service.buildSource.call,e.deployment=i.endpoints.update.service.deployment.call,e.healthChecks=i.endpoints.update.service.healthChecks.call,e.ports=i.endpoints.update.service.ports.call,e.runtimeEnvironment=i.endpoints.update.service.runtimeEnvironment.call,e}(),e.volume=i.endpoints.update.volume.call,e.template=i.endpoints.update.template.call,e}(),this.verify=function(){var e={};return e.subdomain=i.endpoints.verify.subdomain.call,e.domain=i.endpoints.verify.domain.call,e}(),this.pause=function(){var e={};return e.logSink=i.endpoints.pause.logSink.call,e.addon=i.endpoints.pause.addon.call,e.job=i.endpoints.pause.job.call,e.service=i.endpoints.pause.service.call,e}(),this.resume=function(){var e={};return e.logSink=i.endpoints.resume.logSink.call,e.addon=i.endpoints.resume.addon.call,e.job=i.endpoints.resume.job.call,e.service=i.endpoints.resume.service.call,e}(),this.backup=function(){var e={};return e.addon=i.endpoints.backup.addon.call,e}(),this.abort=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.abort.addon.backup.call,e.restore=i.endpoints.abort.addon.restore.call,e}(),e.job=function(){var e={};return e.build=i.endpoints.abort.job.build.call,e.run=i.endpoints.abort.job.run.call,e}(),e.releaseFlowRun=i.endpoints.abort.releaseFlowRun.call,e.service=function(){var e={};return e.build=i.endpoints.abort.service.build.call,e}(),e.templateRun=i.endpoints.abort.templateRun.call,e}(),this.restore=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.restore.addon.backup.call,e}(),e}(),this.retain=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.retain.addon.backup.call,e}(),e}(),this.reset=function(){var e={};return e.addon=i.endpoints.reset.addon.call,e}(),this.restart=function(){var e={};return e.addon=i.endpoints.restart.addon.call,e.service=i.endpoints.restart.service.call,e}(),this.scale=function(){var e={};return e.addon=i.endpoints.scale.addon.call,e.job=i.endpoints.scale.job.call,e.service=i.endpoints.scale.service.call,e}(),this.start=function(){var e={};return e.job=function(){var e={};return e.build=i.endpoints.start.job.build.call,e.run=i.endpoints.start.job.run.call,e}(),e.service=function(){var e={};return e.build=i.endpoints.start.service.build.call,e}(),e}(),this.suspend=function(){var e={};return e.job=i.endpoints.suspend.job.call,e}(),this.run=function(){var e={};return e.releaseFlow=i.endpoints.run.releaseFlow.call,e.template=i.endpoints.run.template.call,e}(),this.attach=function(){var e={};return e.volume=i.endpoints.attach.volume.call,e}(),this.detach=function(){var e={};return e.volume=i.endpoints.detach.volume.call,e}()};export{Lc as AbortAddonBackupEndpoint,Dc as AbortAddonRestoreEndpoint,Iu as AbortJobBuildEndpoint,xu as AbortJobRunEndpoint,Qu as AbortReleaseflowrunEndpoint,qd as AbortServiceBuildEndpoint,ml as AbortTemplaterunEndpoint,Xa as AddBackupdestinationEndpoint,Ns as AddDomainSubdomainEndpoint,dc as AddRegistrycredentialsEndpoint,Fs as AddSubdomainPathEndpoint,rl as AddTagEndpoint,yl as ApiClient,gl as ApiClientContextProvider,bl as ApiClientFileContextProvider,wl as ApiClientInMemoryContextProvider,qa as ApiEndpoint,$s as AssignSubdomainPathEndpoint,Ls as AssignSubdomainServiceEndpoint,Qd as AttachVolumeEndpoint,Nc as BackupAddonEndpoint,ls as CordonCloudClusterNodeEndpoint,qc as CreateAddonBackupscheduleEndpoint,Cc as CreateAddonEndpoint,is as CreateCloudClusterEndpoint,vs as CreateCloudDockerregistryEndpoint,Is as CreateCloudIntegrationEndpoint,vc as CreateCustomvcsTokenEndpoint,ks as CreateDomainEndpoint,ou as CreateJobCronEndpoint,su as CreateJobManualEndpoint,Zs as CreateLogsinkEndpoint,ic as CreateNotificationEndpoint,yc as CreateProjectEndpoint,td as CreateSecretEndpoint,pd as CreateServiceBuildEndpoint,vd as CreateServiceCombinedEndpoint,bd as CreateServiceDeploymentEndpoint,ul as CreateTemplateEndpoint,Yd as CreateVolumeEndpoint,xc as DeleteAddonBackupscheduleEndpoint,kc as DeleteAddonEndpoint,Ta as DeleteApiEndpoint,Gc as DeleteBackupEndpoint,Qa as DeleteBackupdestinationEndpoint,us as DeleteCloudClusterEndpoint,ws as DeleteCloudDockerregistryEndpoint,_s as DeleteCloudIntegrationEndpoint,qs as DeleteDomainEndpoint,lu as DeleteJobEndpoint,ec as DeleteLogsinkEndpoint,cc as DeleteNotificationEndpoint,zu as DeletePreviewtemplatepreviewEndpoint,Uc as DeleteProjectEndpoint,pc as DeleteRegistrycredentialsEndpoint,id as DeleteSecretEndpoint,ud as DeleteSecretlinkEndpoint,jd as DeleteServiceEndpoint,Gs as DeleteSubdomainEndpoint,zs as DeleteSubdomainPathEndpoint,sl as DeleteTagEndpoint,pl as DeleteTemplateEndpoint,Zd as DeleteVolumeEndpoint,el as DetachVolumeEndpoint,Bs as DisableSubdomainCdnEndpoint,ps as DrainCloudClusterNodeEndpoint,Js as EnableSubdomainCdnEndpoint,Ca as ExecCommandStandard,Bc as GetAddonBackupDownloadEndpoint,Tc as GetAddonBackupEndpoint,Fc as GetAddonBackupRestoresEndpoint,Oc as GetAddonBackupsEndpoint,Ac as GetAddonBackupschedulesEndpoint,Wc as GetAddonContainersEndpoint,zc as GetAddonCredentialsEndpoint,Sc as GetAddonEndpoint,Kc as GetAddonRestoresEndpoint,Ha as GetAddonTypesEndpoint,tu as GetAddonVersionEndpoint,xa as GetApiEndpoint,Oa as GetApiEndpointPaginated,Ka as GetBackupdestinationEndpoint,ss as GetCloudClusterEndpoint,gs as GetCloudDockerregistryEndpoint,Rs as GetCloudIntegrationEndpoint,Ss as GetDnsidEndpoint,As as GetDomainEndpoint,xs as GetDomaincertificateEndpoint,ns as GetInvoiceDetailsEndpoint,pu as GetJobBranchesEndpoint,yu as GetJobBuildEndpoint,gu as GetJobBuildargumentdetailsEndpoint,vu as GetJobBuildargumentsEndpoint,fu as GetJobBuildsEndpoint,ju as GetJobContainersEndpoint,Ru as GetJobDeploymentEndpoint,du as GetJobEndpoint,_u as GetJobHealthchecksEndpoint,Su as GetJobPullrequestsEndpoint,qu as GetJobRunEndpoint,ku as GetJobRunsEndpoint,Ou as GetJobRuntimeenvironmentEndpoint,Tu as GetJobRuntimeenvironmentdetailsEndpoint,Qs as GetLogsinkEndpoint,ac as GetNotificationEndpoint,Ju as GetPipelineEndpoint,Fu as GetPreviewtemplateEndpoint,$u as GetPreviewtemplaterunEndpoint,Rc as GetProjectEndpoint,lc as GetRegistrycredentialsEndpoint,Hu as GetReleaseflowEndpoint,Zu as GetReleaseflowrunEndpoint,od as GetSecretEndpoint,dd as GetSecretdetailsEndpoint,cd as GetSecretlinkEndpoint,Rd as GetServiceBranchesEndpoint,Ad as GetServiceBuildEndpoint,Sd as GetServiceBuildargumentdetailsEndpoint,Cd as GetServiceBuildargumentsEndpoint,Ud as GetServiceBuildsEndpoint,xd as GetServiceContainersEndpoint,Od as GetServiceDeploymentEndpoint,Id as GetServiceEndpoint,Td as GetServiceHealthchecksEndpoint,Dd as GetServicePortsEndpoint,Jd as GetServicePullrequestsEndpoint,Wd as GetServiceRuntimeenvironmentEndpoint,Vd as GetServiceRuntimeenvironmentdetailsEndpoint,Ts as GetSubdomainEndpoint,Ws as GetSubdomainPathEndpoint,il as GetTagEndpoint,dl as GetTemplateEndpoint,vl as GetTemplaterunEndpoint,Xd as GetVolumeEndpoint,Vc as ImportAddonBackupEndpoint,Os as ImportDomaincertificateEndpoint,_c as ListAddonsEndpoint,Ya as ListBackupdestinationsEndpoint,es as ListBackupdestinationsbackupsEndpoint,gc as ListBranchesEndpoint,ds as ListCloudClusterNodesEndpoint,os as ListCloudClustersEndpoint,hs as ListCloudDockerregistryEndpoint,ys as ListCloudIntegrationsEndpoint,Cs as ListCloudNodetypesEndpoint,rs as ListCloudProvidersEndpoint,Es as ListCloudRegionsEndpoint,Ps as ListDomainsEndpoint,ts as ListInvoicesEndpoint,ru as ListJobsEndpoint,Ks as ListLogsinksEndpoint,oc as ListNotificationsEndpoint,Bu as ListPipelinesEndpoint,bc as ListPlansEndpoint,Wu as ListPreviewtemplatepreviewsEndpoint,Vu as ListPreviewtemplaterunsEndpoint,wc as ListProjectsEndpoint,tl as ListRegionsEndpoint,uc as ListRegistrycredentialsEndpoint,Ku as ListReleaseflowrunsEndpoint,mc as ListReposEndpoint,ed as ListSecretsEndpoint,ld as ListServicesEndpoint,Ms as ListSubdomainPathEndpoint,nl as ListTagsEndpoint,hl as ListTemplaterunsEndpoint,cl as ListTemplatesEndpoint,hc as ListVcsEndpoint,Hd as ListVolumesEndpoint,ya as LogType,Fa as MetricType,Sa as NorthflankApiCallError,Ea as NorthflankExecCommand,Wa as NorthflankLogFetch,$a as NorthflankMetricFetch,Ua as NorthflankPortForwarder,Pc as PatchAddonEndpoint,La as PatchApiEndpoint,Za as PatchBackupdestinationEndpoint,cs as PatchCloudClusterEndpoint,bs as PatchCloudDockerregistryEndpoint,Us as PatchCloudIntegrationEndpoint,au as PatchJobCronEndpoint,uu as PatchJobManualEndpoint,jc as PatchProjectEndpoint,rd as PatchSecretEndpoint,hd as PatchServiceBuildEndpoint,gd as PatchServiceCombinedEndpoint,yd as PatchServiceDeploymentEndpoint,al as PatchTagEndpoint,Hc as PauseAddonEndpoint,Eu as PauseJobEndpoint,tc as PauseLogsinkEndpoint,Ld as PauseServiceEndpoint,Na as PostApiEndpoint,Ec as PutAddonEndpoint,Ga as PutApiEndpoint,as as PutCloudClusterEndpoint,ms as PutCloudDockerregistryEndpoint,js as PutCloudIntegrationEndpoint,iu as PutJobCronEndpoint,cu as PutJobManualEndpoint,Ic as PutProjectEndpoint,nd as PutSecretEndpoint,fd as PutServiceBuildEndpoint,md as PutServiceCombinedEndpoint,wd as PutServiceDeploymentEndpoint,ol as PutTagEndpoint,Yc as ResetAddonEndpoint,Xc as RestartAddonEndpoint,Fd as RestartServiceEndpoint,Jc as RestoreAddonBackupEndpoint,Zc as ResumeAddonEndpoint,Pu as ResumeJobEndpoint,nc as ResumeLogsinkEndpoint,Md as ResumeServiceEndpoint,Mc as RetainAddonBackupEndpoint,Xu as RunReleaseflowEndpoint,fl as RunTemplateEndpoint,Qc as ScaleAddonEndpoint,Gu as ScaleJobEndpoint,$d as ScaleServiceEndpoint,hu as StartJobBuildEndpoint,Au as StartJobRunEndpoint,_d as StartServiceBuildEndpoint,Du as SuspendJobEndpoint,Ds as UnassignSubdomainEndpoint,Hs as UnassignSubdomainPathEndpoint,fs as UncordonCloudClusterNodeEndpoint,$c as UpdateAddonNetworksettingsEndpoint,eu as UpdateAddonSecurityEndpoint,nu as UpdateAddonVersionEndpoint,mu as UpdateJobBuildargumentsEndpoint,bu as UpdateJobBuildoptionsEndpoint,wu as UpdateJobBuildsourceEndpoint,Uu as UpdateJobDeploymentEndpoint,Cu as UpdateJobHealthchecksEndpoint,Nu as UpdateJobRuntimeenvironmentEndpoint,Lu as UpdateJobSettingsEndpoint,rc as UpdateLogsinkEndpoint,sc as UpdateNotificationEndpoint,Mu as UpdatePreviewtemplateEndpoint,fc as UpdateRegistrycredentialsEndpoint,Yu as UpdateReleaseflowEndpoint,ad as UpdateSecretEndpoint,sd as UpdateSecretlinkEndpoint,Ed as UpdateServiceBuildargumentsEndpoint,Pd as UpdateServiceBuildoptionsEndpoint,kd as UpdateServiceBuildsourceEndpoint,Nd as UpdateServiceDeploymentEndpoint,Gd as UpdateServiceHealthchecksEndpoint,Bd as UpdateServicePortsEndpoint,zd as UpdateServiceRuntimeenvironmentEndpoint,Vs as UpdateSubdomainPathEndpoint,ll as UpdateTemplateEndpoint,Kd as UpdateVolumeEndpoint,Xs as VerifyDomainEndpoint,Ys as VerifySubdomainEndpoint};
|
|
1
|
+
import e,{EventEmitter as t}from"events";import{execSync as n,spawn as r}from"child_process";import*as i from"stream";import o,{Transform as u}from"stream";import s from"http";import a,{fileURLToPath as c}from"url";import d from"https";import*as l from"zlib";import h from"zlib";import p from"os";import*as f from"net";import m,{Socket as v}from"net";import E,{mkdir as A,stat as b,statSync as y,mkdirSync as g}from"fs";import C,{parse as w,dirname as F,resolve as D}from"path";import B from"tls";import I from"crypto";import R,{Buffer as j}from"buffer";import S from"dgram";import{EventEmitter as _}from"node:events";import U from"node:stream";import{StringDecoder as P}from"node:string_decoder";import O,{posix as k,basename as x,win32 as T,join as L}from"node:path";import N from"node:fs";import q from"assert";import M from"node:assert";import{randomBytes as G}from"node:crypto";var z=function(e,t){return z=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])},z(e,t)};function $(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W.apply(this,arguments)};function J(e,t,n,r){return new(n||(n=Promise))((function(i,o){function u(e){try{a(r.next(e))}catch(e){o(e)}}function s(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,s)}a((r=r.apply(e,t||[])).next())}))}function V(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function H(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Z="object"==typeof global&&global&&global.Object===Object&&global,Y="object"==typeof self&&self&&self.Object===Object&&self,K=Z||Y||Function("return this")(),X=K.Symbol,Q=Object.prototype,ee=Q.hasOwnProperty,te=Q.toString,ne=X?X.toStringTag:void 0;var re=Object.prototype.toString;var ie=X?X.toStringTag:void 0;function oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ie&&ie in Object(e)?function(e){var t=ee.call(e,ne),n=e[ne];try{e[ne]=void 0;var r=!0}catch(e){}var i=te.call(e);return r&&(t?e[ne]=n:delete e[ne]),i}(e):function(e){return re.call(e)}(e)}function ue(e){return null!=e&&"object"==typeof e}function se(e){return"symbol"==typeof e||ue(e)&&"[object Symbol]"==oe(e)}function ae(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ce=Array.isArray,de=X?X.prototype:void 0,le=de?de.toString:void 0;function he(e){if("string"==typeof e)return e;if(ce(e))return ae(e,he)+"";if(se(e))return le?le.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function fe(e){return e}function me(e){if(!pe(e))return!1;var t=oe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ve,Ee=K["__core-js_shared__"],Ae=(ve=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+ve:"";var be=Function.prototype.toString;function ye(e){if(null!=e){try{return be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ge=/^\[object .+?Constructor\]$/,Ce=Function.prototype,we=Object.prototype,Fe=Ce.toString,De=we.hasOwnProperty,Be=RegExp("^"+Fe.call(De).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ie(e){return!(!pe(e)||(t=e,Ae&&Ae in t))&&(me(e)?Be:ge).test(ye(e));var t}function Re(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ie(n)?n:void 0}var je=Re(K,"WeakMap"),Se=Object.create,_e=function(){function e(){}return function(t){if(!pe(t))return{};if(Se)return Se(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Ue=Date.now;var Pe,Oe,ke,xe=function(){try{var e=Re(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Te=xe,Le=Te?function(e,t){return Te(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:fe,Ne=(Pe=Le,Oe=0,ke=0,function(){var e=Ue(),t=16-(e-ke);if(ke=e,t>0){if(++Oe>=800)return arguments[0]}else Oe=0;return Pe.apply(void 0,arguments)}),qe=/^(?:0|[1-9]\d*)$/;function Me(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&qe.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e,t,n){"__proto__"==t&&Te?Te(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ze(e,t){return e===t||e!=e&&t!=t}var $e=Object.prototype.hasOwnProperty;function We(e,t,n){var r=e[t];$e.call(e,t)&&ze(r,n)&&(void 0!==n||t in e)||Ge(e,t,n)}var Je=Math.max;function Ve(e,t){return Ne(function(e,t,n){return t=Je(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Je(r.length-t,0),u=Array(o);++i<o;)u[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(u),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,fe),e+"")}function He(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ze(e){return null!=e&&He(e.length)&&!me(e)}var Ye=Object.prototype;function Ke(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ye)}function Xe(e){return ue(e)&&"[object Arguments]"==oe(e)}var Qe=Object.prototype,et=Qe.hasOwnProperty,tt=Qe.propertyIsEnumerable,nt=Xe(function(){return arguments}())?Xe:function(e){return ue(e)&&et.call(e,"callee")&&!tt.call(e,"callee")};var rt="object"==typeof exports&&exports&&!exports.nodeType&&exports,it=rt&&"object"==typeof module&&module&&!module.nodeType&&module,ot=it&&it.exports===rt?K.Buffer:void 0,ut=(ot?ot.isBuffer:void 0)||function(){return!1},st={};st["[object Float32Array]"]=st["[object Float64Array]"]=st["[object Int8Array]"]=st["[object Int16Array]"]=st["[object Int32Array]"]=st["[object Uint8Array]"]=st["[object Uint8ClampedArray]"]=st["[object Uint16Array]"]=st["[object Uint32Array]"]=!0,st["[object Arguments]"]=st["[object Array]"]=st["[object ArrayBuffer]"]=st["[object Boolean]"]=st["[object DataView]"]=st["[object Date]"]=st["[object Error]"]=st["[object Function]"]=st["[object Map]"]=st["[object Number]"]=st["[object Object]"]=st["[object RegExp]"]=st["[object Set]"]=st["[object String]"]=st["[object WeakMap]"]=!1;var at="object"==typeof exports&&exports&&!exports.nodeType&&exports,ct=at&&"object"==typeof module&&module&&!module.nodeType&&module,dt=ct&&ct.exports===at&&Z.process,lt=function(){try{var e=ct&&ct.require&&ct.require("util").types;return e||dt&&dt.binding&&dt.binding("util")}catch(e){}}(),ht=lt&<.isTypedArray,pt=ht?function(e){return function(t){return e(t)}}(ht):function(e){return ue(e)&&He(e.length)&&!!st[oe(e)]},ft=pt,mt=Object.prototype.hasOwnProperty;function vt(e,t){var n=ce(e),r=!n&&nt(e),i=!n&&!r&&ut(e),o=!n&&!r&&!i&&ft(e),u=n||r||i||o,s=u?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],a=s.length;for(var c in e)!t&&!mt.call(e,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Me(c,a))||s.push(c);return s}function Et(e,t){return function(n){return e(t(n))}}var At=Et(Object.keys,Object),bt=Object.prototype.hasOwnProperty;function yt(e){return Ze(e)?vt(e):function(e){if(!Ke(e))return At(e);var t=[];for(var n in Object(e))bt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var gt=Object.prototype.hasOwnProperty;function Ct(e){if(!pe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ke(e),n=[];for(var r in e)("constructor"!=r||!t&>.call(e,r))&&n.push(r);return n}function wt(e){return Ze(e)?vt(e,!0):Ct(e)}var Ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dt=/^\w*$/;function Bt(e,t){if(ce(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!se(e))||(Dt.test(e)||!Ft.test(e)||null!=t&&e in Object(t))}var It=Re(Object,"create");var Rt=Object.prototype.hasOwnProperty;var jt=Object.prototype.hasOwnProperty;function St(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _t(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}St.prototype.clear=function(){this.__data__=It?It(null):{},this.size=0},St.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},St.prototype.get=function(e){var t=this.__data__;if(It){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Rt.call(t,e)?t[e]:void 0},St.prototype.has=function(e){var t=this.__data__;return It?void 0!==t[e]:jt.call(t,e)},St.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=It&&void 0===t?"__lodash_hash_undefined__":t,this};var Ut=Array.prototype.splice;function Pt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pt.prototype.clear=function(){this.__data__=[],this.size=0},Pt.prototype.delete=function(e){var t=this.__data__,n=_t(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ut.call(t,n,1),--this.size,!0)},Pt.prototype.get=function(e){var t=this.__data__,n=_t(t,e);return n<0?void 0:t[n][1]},Pt.prototype.has=function(e){return _t(this.__data__,e)>-1},Pt.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 Ot=Re(K,"Map");function kt(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function 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 St,map:new(Ot||Pt),string:new St}},xt.prototype.delete=function(e){var t=kt(this,e).delete(e);return this.size-=t?1:0,t},xt.prototype.get=function(e){return kt(this,e).get(e)},xt.prototype.has=function(e){return kt(this,e).has(e)},xt.prototype.set=function(e,t){var n=kt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Tt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var u=e.apply(this,r);return n.cache=o.set(i,u)||o,u};return n.cache=new(Tt.Cache||xt),n}Tt.Cache=xt;var Lt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nt=/\\(\\)?/g,qt=function(e){var t=Tt(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(Lt,(function(e,n,r,i){t.push(r?i.replace(Nt,"$1"):n||e)})),t})),Mt=qt;function Gt(e){return null==e?"":he(e)}function zt(e,t){return ce(e)?e:Bt(e,t)?[e]:Mt(Gt(e))}function $t(e){if("string"==typeof e||se(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Wt(e,t){for(var n=0,r=(t=zt(t,e)).length;null!=e&&n<r;)e=e[$t(t[n++])];return n&&n==r?e:void 0}function Jt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Vt=X?X.isConcatSpreadable:void 0;function Ht(e){return ce(e)||nt(e)||!!(Vt&&e&&e[Vt])}function Zt(e,t,n,r,i){var o=-1,u=e.length;for(n||(n=Ht),i||(i=[]);++o<u;){var s=e[o];t>0&&n(s)?t>1?Zt(s,t-1,n,r,i):Jt(i,s):r||(i[i.length]=s)}return i}var Yt=Et(Object.getPrototypeOf,Object),Kt=Function.prototype,Xt=Object.prototype,Qt=Kt.toString,en=Xt.hasOwnProperty,tn=Qt.call(Object);function nn(e){var t=this.__data__=new Pt(e);this.size=t.size}nn.prototype.clear=function(){this.__data__=new Pt,this.size=0},nn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},nn.prototype.get=function(e){return this.__data__.get(e)},nn.prototype.has=function(e){return this.__data__.has(e)},nn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pt){var r=n.__data__;if(!Ot||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 rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,on=rn&&"object"==typeof module&&module&&!module.nodeType&&module,un=on&&on.exports===rn?K.Buffer:void 0,sn=un?un.allocUnsafe:void 0;var an=Object.prototype.propertyIsEnumerable,cn=Object.getOwnPropertySymbols,dn=cn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var u=e[n];t(u,n,e)&&(o[i++]=u)}return o}(cn(e),(function(t){return an.call(e,t)})))}:function(){return[]};function ln(e){return function(e,t,n){var r=t(e);return ce(e)?r:Jt(r,n(e))}(e,yt,dn)}var hn=Re(K,"DataView"),pn=Re(K,"Promise"),fn=Re(K,"Set"),mn="[object Map]",vn="[object Promise]",En="[object Set]",An="[object WeakMap]",bn="[object DataView]",yn=ye(hn),gn=ye(Ot),Cn=ye(pn),wn=ye(fn),Fn=ye(je),Dn=oe;(hn&&Dn(new hn(new ArrayBuffer(1)))!=bn||Ot&&Dn(new Ot)!=mn||pn&&Dn(pn.resolve())!=vn||fn&&Dn(new fn)!=En||je&&Dn(new je)!=An)&&(Dn=function(e){var t=oe(e),n="[object Object]"==t?e.constructor:void 0,r=n?ye(n):"";if(r)switch(r){case yn:return bn;case gn:return mn;case Cn:return vn;case wn:return En;case Fn:return An}return t});var Bn=Dn,In=K.Uint8Array;function Rn(e,t){var n,r,i=t?(n=e.buffer,r=new n.constructor(n.byteLength),new In(r).set(new In(n)),r):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xt;++t<n;)this.add(e[t])}function Sn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}jn.prototype.add=jn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},jn.prototype.has=function(e){return this.__data__.has(e)};function _n(e,t,n,r,i,o){var u=1&n,s=e.length,a=t.length;if(s!=a&&!(u&&a>s))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var l=-1,h=!0,p=2&n?new jn:void 0;for(o.set(e,t),o.set(t,e);++l<s;){var f=e[l],m=t[l];if(r)var v=u?r(m,f,l,t,e,o):r(f,m,l,e,t,o);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!Sn(t,(function(e,t){if(u=t,!p.has(u)&&(f===e||i(f,e,n,r,o)))return p.push(t);var u}))){h=!1;break}}else if(f!==m&&!i(f,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function Un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var On=X?X.prototype:void 0,kn=On?On.valueOf:void 0;var xn=Object.prototype.hasOwnProperty;var Tn="[object Arguments]",Ln="[object Array]",Nn="[object Object]",qn=Object.prototype.hasOwnProperty;function Mn(e,t,n,r,i,o){var u=ce(e),s=ce(t),a=u?Ln:Bn(e),c=s?Ln:Bn(t),d=(a=a==Tn?Nn:a)==Nn,l=(c=c==Tn?Nn:c)==Nn,h=a==c;if(h&&ut(e)){if(!ut(t))return!1;u=!0,d=!1}if(h&&!d)return o||(o=new nn),u||ft(e)?_n(e,t,n,r,i,o):function(e,t,n,r,i,o,u){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||!o(new In(e),new In(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ze(+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 s=Un;case"[object Set]":var a=1&r;if(s||(s=Pn),e.size!=t.size&&!a)return!1;var c=u.get(e);if(c)return c==t;r|=2,u.set(e,t);var d=_n(s(e),s(t),r,i,o,u);return u.delete(e),d;case"[object Symbol]":if(kn)return kn.call(e)==kn.call(t)}return!1}(e,t,a,n,r,i,o);if(!(1&n)){var p=d&&qn.call(e,"__wrapped__"),f=l&&qn.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return o||(o=new nn),i(m,v,n,r,o)}}return!!h&&(o||(o=new nn),function(e,t,n,r,i,o){var u=1&n,s=ln(e),a=s.length;if(a!=ln(t).length&&!u)return!1;for(var c=a;c--;){var d=s[c];if(!(u?d in t:xn.call(t,d)))return!1}var l=o.get(e),h=o.get(t);if(l&&h)return l==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=u;++c<a;){var m=e[d=s[c]],v=t[d];if(r)var E=u?r(v,m,d,t,e,o):r(m,v,d,e,t,o);if(!(void 0===E?m===v||i(m,v,n,r,o):E)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var A=e.constructor,b=t.constructor;A==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,i,o))}function Gn(e,t,n,r,i){return e===t||(null==e||null==t||!ue(e)&&!ue(t)?e!=e&&t!=t:Mn(e,t,n,r,Gn,i))}function zn(e){return e==e&&!pe(e)}function $n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Wn(e){var t=function(e){for(var t=yt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,zn(i)]}return t}(e);return 1==t.length&&t[0][2]?$n(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,u=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var a=(s=n[i])[0],c=e[a],d=s[1];if(u&&s[2]){if(void 0===c&&!(a in e))return!1}else{var l=new nn;if(r)var h=r(c,d,a,e,t,l);if(!(void 0===h?Gn(d,c,3,r,l):h))return!1}}return!0}(n,e,t)}}function Jn(e,t){return null!=e&&t in Object(e)}function Vn(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=zt(t,e)).length,o=!1;++r<i;){var u=$t(t[r]);if(!(o=null!=e&&n(e,u)))break;e=e[u]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&He(i)&&Me(u,i)&&(ce(e)||nt(e))}(e,t,Jn)}function Hn(e,t){return Bt(e)&&zn(t)?$n($t(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Wt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?Vn(n,e):Gn(t,r,3)}}function Zn(e){return Bt(e)?(t=$t(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Wt(t,e)}}(e);var t}function Yn(e){return"function"==typeof e?e:null==e?fe:"object"==typeof e?ce(e)?Hn(e[0],e[1]):Wn(e):Zn(e)}var Kn,Xn=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),u=o.length;u--;){var s=o[Kn?u:++r];if(!1===t(i[s],s,i))break}return e};var Qn=function(e,t){return function(n,r){if(null==n)return n;if(!Ze(n))return e(n,r);for(var i=n.length,o=t?i:-1,u=Object(n);(t?o--:++o<i)&&!1!==r(u[o],o,u););return n}}((function(e,t){return e&&Xn(e,t,yt)})),er=Qn;function tr(e,t,n){(void 0!==n&&!ze(e[t],n)||void 0===n&&!(t in e))&&Ge(e,t,n)}function nr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function rr(e){return function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,u=t.length;++o<u;){var s=t[o],a=r?r(n[s],e[s],s,n,e):void 0;void 0===a&&(a=e[s]),i?Ge(n,s,a):We(n,s,a)}return n}(e,wt(e))}function ir(e,t,n,r,i,o,u){var s=nr(e,n),a=nr(t,n),c=u.get(a);if(c)tr(e,n,c);else{var d,l=o?o(s,a,n+"",e,t,u):void 0,h=void 0===l;if(h){var p=ce(a),f=!p&&ut(a),m=!p&&!f&&ft(a);l=a,p||f||m?ce(s)?l=s:ue(d=s)&&Ze(d)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):f?(h=!1,l=function(e,t){if(t)return e.slice();var n=e.length,r=sn?sn(n):new e.constructor(n);return e.copy(r),r}(a,!0)):m?(h=!1,l=Rn(a,!0)):l=[]:function(e){if(!ue(e)||"[object Object]"!=oe(e))return!1;var t=Yt(e);if(null===t)return!0;var n=en.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Qt.call(n)==tn}(a)||nt(a)?(l=s,nt(s)?l=rr(s):pe(s)&&!me(s)||(l=function(e){return"function"!=typeof e.constructor||Ke(e)?{}:_e(Yt(e))}(a))):h=!1}h&&(u.set(a,l),i(l,a,r,o,u),u.delete(a)),tr(e,n,l)}}function or(e,t,n,r,i){e!==t&&Xn(t,(function(o,u){if(i||(i=new nn),pe(o))ir(e,t,u,n,or,r,i);else{var s=r?r(nr(e,u),o,u+"",e,t,i):void 0;void 0===s&&(s=o),tr(e,u,s)}}),wt)}var ur=/[\\^$.*+?()[\]{}|]/g,sr=RegExp(ur.source);function ar(e,t){var n=-1,r=Ze(e)?Array(e.length):[];return er(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function cr(e,t){return Zt(function(e,t){return(ce(e)?ae:ar)(e,Yn(t))}(e,t),1)}var dr=1/0;function lr(e,t){return e>t}function hr(e){return"string"==typeof e||!ce(e)&&ue(e)&&"[object String]"==oe(e)}function pr(e,t){return e&&e.length?function(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],u=t(o);if(null!=u&&(void 0===s?u==u&&!se(u):n(u,s)))var s=u,a=o}return a}(e,Yn(t),lr):void 0}var fr,mr=(fr=function(e,t,n){or(e,t,n)},Ve((function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=fr.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!pe(n))return!1;var r=typeof t;return!!("number"==r?Ze(n)&&Me(t,n.length):"string"==r&&t in n)&&ze(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var u=t[n];u&&fr(e,u,n,i)}return e})));function vr(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Er(e,t){return e(t={exports:{}},t.exports),t.exports}var Ar=Er((function(e,t){function n(e,t,n){return n.globals&&(e=n.globals[e.name]),new e(`${n.context?n.context:"Value"} ${t}.`)}function r(e,t){if("bigint"==typeof e)throw n(TypeError,"is a BigInt which cannot be converted to a number",t);return t.globals?t.globals.Number(e):Number(e)}function i(e){return s(e>0&&e%1==.5&&!(1&e)||e<0&&e%1==-.5&&!(1&~e)?Math.floor(e):Math.round(e))}function o(e){return s(Math.trunc(e))}function u(e){return e<0?-1:1}function s(e){return 0===e?0:e}function a(e,{unsigned:t}){let a,c;t?(a=0,c=2**e-1):(a=-(2**(e-1)),c=2**(e-1)-1);const d=2**e,l=2**(e-1);return(e,h={})=>{let p=r(e,h);if(p=s(p),h.enforceRange){if(!Number.isFinite(p))throw n(TypeError,"is not a finite number",h);if(p=o(p),p<a||p>c)throw n(TypeError,`is outside the accepted range of ${a} to ${c}, inclusive`,h);return p}return!Number.isNaN(p)&&h.clamp?(p=Math.min(Math.max(p,a),c),p=i(p),p):Number.isFinite(p)&&0!==p?(p=o(p),p>=a&&p<=c?p:(p=function(e,t){const n=e%t;return u(t)!==u(n)?n+t:n}(p,d),!t&&p>=l?p-d:p)):0}}function c(e,{unsigned:t}){const u=Number.MAX_SAFE_INTEGER,a=t?0:Number.MIN_SAFE_INTEGER,c=t?BigInt.asUintN:BigInt.asIntN;return(t,d={})=>{let l=r(t,d);if(l=s(l),d.enforceRange){if(!Number.isFinite(l))throw n(TypeError,"is not a finite number",d);if(l=o(l),l<a||l>u)throw n(TypeError,`is outside the accepted range of ${a} to ${u}, inclusive`,d);return l}if(!Number.isNaN(l)&&d.clamp)return l=Math.min(Math.max(l,a),u),l=i(l),l;if(!Number.isFinite(l)||0===l)return 0;let h=BigInt(o(l));return h=c(e,h),Number(h)}}t.any=e=>e,t.undefined=()=>{},t.boolean=e=>Boolean(e),t.byte=a(8,{unsigned:!1}),t.octet=a(8,{unsigned:!0}),t.short=a(16,{unsigned:!1}),t["unsigned short"]=a(16,{unsigned:!0}),t.long=a(32,{unsigned:!1}),t["unsigned long"]=a(32,{unsigned:!0}),t["long long"]=c(64,{unsigned:!1}),t["unsigned long long"]=c(64,{unsigned:!0}),t.double=(e,t={})=>{const i=r(e,t);if(!Number.isFinite(i))throw n(TypeError,"is not a finite floating-point value",t);return i},t["unrestricted double"]=(e,t={})=>r(e,t),t.float=(e,t={})=>{const i=r(e,t);if(!Number.isFinite(i))throw n(TypeError,"is not a finite floating-point value",t);if(Object.is(i,-0))return i;const o=Math.fround(i);if(!Number.isFinite(o))throw n(TypeError,"is outside the range of a single-precision floating-point value",t);return o},t["unrestricted float"]=(e,t={})=>{const n=r(e,t);return isNaN(n)||Object.is(n,-0)?n:Math.fround(n)},t.DOMString=(e,t={})=>{if(t.treatNullAsEmptyString&&null===e)return"";if("symbol"==typeof e)throw n(TypeError,"is a symbol, which cannot be converted to a string",t);return(t.globals?t.globals.String:String)(e)},t.ByteString=(e,r={})=>{const i=t.DOMString(e,r);let o;for(let e=0;void 0!==(o=i.codePointAt(e));++e)if(o>255)throw n(TypeError,"is not a valid ByteString",r);return i},t.USVString=(e,n={})=>{const r=t.DOMString(e,n),i=r.length,o=[];for(let e=0;e<i;++e){const t=r.charCodeAt(e);if(t<55296||t>57343)o.push(String.fromCodePoint(t));else if(56320<=t&&t<=57343)o.push(String.fromCodePoint(65533));else if(e===i-1)o.push(String.fromCodePoint(65533));else{const n=r.charCodeAt(e+1);if(56320<=n&&n<=57343){const r=1023&t,i=1023&n;o.push(String.fromCodePoint(65536+1024*r+i)),++e}else o.push(String.fromCodePoint(65533))}}return o.join("")},t.object=(e,t={})=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)throw n(TypeError,"is not an object",t);return e};const d=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,l="function"==typeof SharedArrayBuffer?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get:null;function h(e){try{return d.call(e),!0}catch{return!1}}function p(e){try{return l.call(e),!0}catch{return!1}}function f(e){try{return new Uint8Array(e),!1}catch{return!0}}t.ArrayBuffer=(e,t={})=>{if(!h(e)){if(t.allowShared&&!p(e))throw n(TypeError,"is not an ArrayBuffer or SharedArrayBuffer",t);throw n(TypeError,"is not an ArrayBuffer",t)}if(f(e))throw n(TypeError,"is a detached ArrayBuffer",t);return e};const m=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;t.DataView=(e,t={})=>{try{m.call(e)}catch(e){throw n(TypeError,"is not a DataView",t)}if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is backed by a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is backed by a detached ArrayBuffer",t);return e};const v=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get;[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach((e=>{const{name:r}=e,i=/^[AEIOU]/u.test(r)?"an":"a";t[r]=(e,t={})=>{if(!ArrayBuffer.isView(e)||v.call(e)!==r)throw n(TypeError,`is not ${i} ${r} object`,t);if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",t);return e}})),t.ArrayBufferView=(e,t={})=>{if(!ArrayBuffer.isView(e))throw n(TypeError,"is not a view on an ArrayBuffer or SharedArrayBuffer",t);if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",t);return e},t.BufferSource=(e,t={})=>{if(ArrayBuffer.isView(e)){if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",t);return e}if(!t.allowShared&&!h(e))throw n(TypeError,"is not an ArrayBuffer or a view on one",t);if(t.allowShared&&!p(e)&&!h(e))throw n(TypeError,"is not an ArrayBuffer, SharedArrayBuffer, or a view on one",t);if(f(e))throw n(TypeError,"is a detached ArrayBuffer",t);return e},t.DOMTimeStamp=t["unsigned long long"]}));Ar.any,Ar.undefined,Ar.octet,Ar.DOMString,Ar.ByteString,Ar.USVString,Ar.object,Ar.ArrayBuffer,Ar.DataView,Ar.ArrayBufferView,Ar.BufferSource,Ar.DOMTimeStamp;var br=Er((function(e,t){const n=Function.prototype.call.bind(Object.prototype.hasOwnProperty);const r=Symbol("wrapper"),i=Symbol("impl"),o=Symbol("SameObject caches"),u=Symbol.for("[webidl2js] constructor registry"),s=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);function a(e){if(n(e,u))return e[u];const t=Object.create(null);t["%Object.prototype%"]=e.Object.prototype,t["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf((new e.Array)[Symbol.iterator]()));try{t["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(e.eval("(async function* () {})").prototype))}catch{t["%AsyncIteratorPrototype%"]=s}return e[u]=t,t}function c(e){return e?e[r]:null}function d(e){return e?e[i]:null}const l=Symbol("internal");const h=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;const p=Symbol("supports property index"),f=Symbol("supported property indices"),m=Symbol("supports property name"),v=Symbol("supported property names"),E=Symbol("indexed property get"),A=Symbol("indexed property set new"),b=Symbol("indexed property set existing"),y=Symbol("named property get"),g=Symbol("named property set new"),C=Symbol("named property set existing"),w=Symbol("named property delete"),F=Symbol("async iterator get the next iteration result"),D=Symbol("async iterator return steps"),B=Symbol("async iterator initialization steps"),I=Symbol("async iterator end of iteration");e.exports={isObject:function(e){return"object"==typeof e&&null!==e||"function"==typeof e},hasOwn:n,define:function(e,t){for(const n of Reflect.ownKeys(t)){const r=Reflect.getOwnPropertyDescriptor(t,n);if(r&&!Reflect.defineProperty(e,n,r))throw new TypeError(`Cannot redefine property: ${String(n)}`)}},newObjectInRealm:function(e,t){const n=a(e);return Object.defineProperties(Object.create(n["%Object.prototype%"]),Object.getOwnPropertyDescriptors(t))},wrapperSymbol:r,implSymbol:i,getSameObject:function(e,t,n){return e[o]||(e[o]=Object.create(null)),t in e[o]||(e[o][t]=n()),e[o][t]},ctorRegistrySymbol:u,initCtorRegistry:a,wrapperForImpl:c,implForWrapper:d,tryWrapperForImpl:function(e){const t=c(e);return t||e},tryImplForWrapper:function(e){const t=d(e);return t||e},iterInternalSymbol:l,isArrayBuffer:function(e){try{return h.call(e),!0}catch(e){return!1}},isArrayIndexPropName:function(e){if("string"!=typeof e)return!1;const t=e>>>0;return t!==2**32-1&&e===`${t}`},supportsPropertyIndex:p,supportedPropertyIndices:f,supportsPropertyName:m,supportedPropertyNames:v,indexedGet:E,indexedSetNew:A,indexedSetExisting:b,namedGet:y,namedSetNew:g,namedSetExisting:C,namedDelete:w,asyncIteratorNext:F,asyncIteratorReturn:D,asyncIteratorInit:B,asyncIteratorEOI:I,iteratorResult:function([e,t],n){let r;switch(n){case"key":r=e;break;case"value":r=t;break;case"key+value":r=[e,t]}return{value:r,done:!1}}}}));const yr=2147483647,gr=36,Cr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},wr=Math.floor,Fr=String.fromCharCode;function Dr(e){throw new RangeError(Cr[e])}function Br(e){const t=[];let n=0;const r=e.length;for(;n<r;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}const Ir=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},Rr=function(e,t,n){let r=0;for(e=n?wr(e/700):e>>1,e+=wr(e/t);e>455;r+=gr)e=wr(e/35);return wr(r+36*e/(e+38))},jr=function(e){const t=[],n=e.length;let r=0,i=128,o=72,u=e.lastIndexOf("-");u<0&&(u=0);for(let n=0;n<u;++n)e.charCodeAt(n)>=128&&Dr("not-basic"),t.push(e.charCodeAt(n));for(let a=u>0?u+1:0;a<n;){const u=r;for(let t=1,i=gr;;i+=gr){a>=n&&Dr("invalid-input");const u=(s=e.charCodeAt(a++))>=48&&s<58?s-48+26:s>=65&&s<91?s-65:s>=97&&s<123?s-97:gr;u>=gr&&Dr("invalid-input"),u>wr((yr-r)/t)&&Dr("overflow"),r+=u*t;const c=i<=o?1:i>=o+26?26:i-o;if(u<c)break;const d=gr-c;t>wr(yr/d)&&Dr("overflow"),t*=d}const c=t.length+1;o=Rr(r-u,c,0==u),wr(r/c)>yr-i&&Dr("overflow"),i+=wr(r/c),r%=c,t.splice(r++,0,i)}var s;return String.fromCodePoint(...t)},Sr=function(e){const t=[],n=(e=Br(e)).length;let r=128,i=0,o=72;for(const n of e)n<128&&t.push(Fr(n));const u=t.length;let s=u;for(u&&t.push("-");s<n;){let n=yr;for(const t of e)t>=r&&t<n&&(n=t);const a=s+1;n-r>wr((yr-i)/a)&&Dr("overflow"),i+=(n-r)*a,r=n;for(const n of e)if(n<r&&++i>yr&&Dr("overflow"),n===r){let e=i;for(let n=gr;;n+=gr){const r=n<=o?1:n>=o+26?26:n-o;if(e<r)break;const i=e-r,u=gr-r;t.push(Fr(Ir(r+i%u,0))),e=wr(i/u)}t.push(Fr(Ir(e,0))),o=Rr(i,a,s===u),i=0,++s}++i,++r}return t.join("")},_r=jr,Ur=Sr;var Pr,Or={combiningMarks:/[\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\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\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-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{11002}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11082}\u{110B0}-\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{11134}\u{11145}\u{11146}\u{11173}\u{11180}-\u{11182}\u{111B3}-\u{111C0}\u{111C9}-\u{111CC}\u{111CE}\u{111CF}\u{1122C}-\u{11237}\u{1123E}\u{11241}\u{112DF}-\u{112EA}\u{11300}-\u{11303}\u{1133B}\u{1133C}\u{1133E}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11357}\u{11362}\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113B8}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11435}-\u{11446}\u{1145E}\u{114B0}-\u{114C3}\u{115AF}-\u{115B5}\u{115B8}-\u{115C0}\u{115DC}\u{115DD}\u{11630}-\u{11640}\u{116AB}-\u{116B7}\u{1171D}-\u{1172B}\u{1182C}-\u{1183A}\u{11930}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{1193E}\u{11940}\u{11942}\u{11943}\u{119D1}-\u{119D7}\u{119DA}-\u{119E0}\u{119E4}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A39}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A5B}\u{11A8A}-\u{11A99}\u{11C2F}-\u{11C36}\u{11C38}-\u{11C3F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D8A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D97}\u{11EF3}-\u{11EF6}\u{11F00}\u{11F01}\u{11F03}\u{11F34}-\u{11F3A}\u{11F3E}-\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F51}-\u{16F87}\u{16F8F}-\u{16F92}\u{16FE4}\u{16FF0}\u{16FF1}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]/u,combiningClassVirama:/[\u094D\u09CD\u0A4D\u0ACD\u0B4D\u0BCD\u0C4D\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E3A\u0EBA\u0F84\u1039\u103A\u1714\u1715\u1734\u17D2\u1A60\u1B44\u1BAA\u1BAB\u1BF2\u1BF3\u2D7F\uA806\uA82C\uA8C4\uA953\uA9C0\uAAF6\uABED\u{10A3F}\u{11046}\u{11070}\u{1107F}\u{110B9}\u{11133}\u{11134}\u{111C0}\u{11235}\u{112EA}\u{1134D}\u{113CE}-\u{113D0}\u{11442}\u{114C2}\u{115BF}\u{1163F}\u{116B6}\u{1172B}\u{11839}\u{1193D}\u{1193E}\u{119E0}\u{11A34}\u{11A47}\u{11A99}\u{11C3F}\u{11D44}\u{11D45}\u{11D97}\u{11F41}\u{11F42}\u{1612F}]/u,validZWNJ:/[\u0620\u0626\u0628\u062A-\u062E\u0633-\u063F\u0641-\u0647\u0649\u064A\u066E\u066F\u0678-\u0687\u069A-\u06BF\u06C1\u06C2\u06CC\u06CE\u06D0\u06D1\u06FA-\u06FC\u06FF\u0712-\u0714\u071A-\u071D\u071F-\u0727\u0729\u072B\u072D\u072E\u074E-\u0758\u075C-\u076A\u076D-\u0770\u0772\u0775-\u0777\u077A-\u077F\u07CA-\u07EA\u0841-\u0845\u0848\u084A-\u0853\u0855\u0860\u0862-\u0865\u0868\u0886\u0889-\u088D\u08A0-\u08A9\u08AF\u08B0\u08B3-\u08B8\u08BA-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA872\u{10AC0}-\u{10AC4}\u{10ACD}\u{10AD3}-\u{10ADC}\u{10ADE}-\u{10AE0}\u{10AEB}-\u{10AEE}\u{10B80}\u{10B82}\u{10B86}-\u{10B88}\u{10B8A}\u{10B8B}\u{10B8D}\u{10B90}\u{10BAD}\u{10BAE}\u{10D00}-\u{10D21}\u{10D23}\u{10EC3}\u{10EC4}\u{10F30}-\u{10F32}\u{10F34}-\u{10F44}\u{10F51}-\u{10F53}\u{10F70}-\u{10F73}\u{10F76}-\u{10F81}\u{10FB0}\u{10FB2}\u{10FB3}\u{10FB8}\u{10FBB}\u{10FBC}\u{10FBE}\u{10FBF}\u{10FC1}\u{10FC4}\u{10FCA}\u{10FCB}\u{1E900}-\u{1E943}][\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*\u200C[\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*[\u0620\u0622-\u063F\u0641-\u064A\u066E\u066F\u0671-\u0673\u0675-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u077F\u07CA-\u07EA\u0840-\u0858\u0860\u0862-\u0865\u0867-\u086A\u0870-\u0882\u0886\u0889-\u088E\u08A0-\u08AC\u08AE-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA871\u{10AC0}-\u{10AC5}\u{10AC7}\u{10AC9}\u{10ACA}\u{10ACE}-\u{10AD6}\u{10AD8}-\u{10AE1}\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B80}-\u{10B91}\u{10BA9}-\u{10BAE}\u{10D01}-\u{10D23}\u{10EC2}-\u{10EC4}\u{10F30}-\u{10F44}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}\u{10FB2}-\u{10FB6}\u{10FB8}-\u{10FBF}\u{10FC1}-\u{10FC4}\u{10FC9}\u{10FCA}\u{1E900}-\u{1E943}]/u,bidiDomain:/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,bidiS1LTR:/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCEF}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D800}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]/u,bidiS1RTL:/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,bidiS2:/^[\0-\x08\x0E-\x1B!-@\[-`\{-\x84\x86-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02B9\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u036F\u0374\u0375\u037E\u0384\u0385\u0387\u03F6\u0483-\u0489\u058A\u058D-\u058F\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u0897-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09F2\u09F3\u09FB\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AF1\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0BF3-\u0BFA\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C78-\u0C7E\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E3F\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39-\u0F3D\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1390-\u1399\u1400\u169B\u169C\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DB\u17DD\u17F0-\u17F9\u1800-\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1940\u1944\u1945\u19DE-\u19FF\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u200B-\u200D\u200F-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20C0\u20D0-\u20F0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189-\u218B\u2190-\u2335\u237B-\u2394\u2396-\u2429\u2440-\u244A\u2460-\u249B\u24EA-\u26AB\u26AD-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF9-\u2CFF\u2D7F\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u302A-\u302D\u3030\u3036\u3037\u303D-\u303F\u3099-\u309C\u30A0\u30FB\u31C0-\u31E5\u31EF\u321D\u321E\u3250-\u325F\u327C-\u327E\u32B1-\u32BF\u32CC-\u32CF\u3377-\u337A\u33DE\u33DF\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA60D-\uA60F\uA66F-\uA67F\uA69E\uA69F\uA6F0\uA6F1\uA700-\uA721\uA788\uA802\uA806\uA80B\uA825\uA826\uA828-\uA82C\uA838\uA839\uA874-\uA877\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uAB6A\uAB6B\uABE5\uABE8\uABED\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10101}\u{10140}-\u{1018C}\u{10190}-\u{1019C}\u{101A0}\u{101FD}\u{102E0}-\u{102FB}\u{10376}-\u{1037A}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{1091F}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A38}-\u{10A3A}\u{10A3F}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE6}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B39}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D27}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D69}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAB}-\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10EFC}-\u{10F27}\u{10F30}-\u{10F59}\u{10F70}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11001}\u{11038}-\u{11046}\u{11052}-\u{11065}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{11660}-\u{1166C}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{11FD5}-\u{11FF1}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE2}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CC00}-\u{1CCD5}\u{1CCF0}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D1E9}\u{1D1EA}\u{1D200}-\u{1D245}\u{1D300}-\u{1D356}\u{1D6C1}\u{1D6DB}\u{1D6FB}\u{1D715}\u{1D735}\u{1D74F}\u{1D76F}\u{1D789}\u{1D7A9}\u{1D7C3}\u{1D7CE}-\u{1D7FF}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E2FF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8D6}\u{1E900}-\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F10F}\u{1F12F}\u{1F16A}-\u{1F16F}\u{1F1AD}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*$/u,bidiS3:/[0-9\xB2\xB3\xB9\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\u{102E1}-\u{102FB}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}][\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\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u,bidiS4EN:/[0-9\xB2\xB3\xB9\u06F0-\u06F9\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFF10-\uFF19\u{102E1}-\u{102FB}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}]/u,bidiS4AN:/[\u0600-\u0605\u0660-\u0669\u066B\u066C\u06DD\u0890\u0891\u08E2\u{10D30}-\u{10D39}\u{10D40}-\u{10D49}\u{10E60}-\u{10E7E}]/u,bidiS5:/^[\0-\x08\x0E-\x1B!-\x84\x86-\u0377\u037A-\u037F\u0384-\u038A\u038C\u038E-\u03A1\u03A3-\u052F\u0531-\u0556\u0559-\u058A\u058D-\u058F\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0606\u0607\u0609\u060A\u060C\u060E-\u061A\u064B-\u065F\u066A\u0670\u06D6-\u06DC\u06DE-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07F6-\u07F9\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E3A\u0E3F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FDA\u1000-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u13A0-\u13F5\u13F8-\u13FD\u1400-\u167F\u1681-\u169C\u16A0-\u16F8\u1700-\u1715\u171F-\u1736\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u1800-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE-\u1A1B\u1A1E-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1AB0-\u1ACE\u1B00-\u1B4C\u1B4E-\u1BF3\u1BFC-\u1C37\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD0-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u200B-\u200E\u2010-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2071\u2074-\u208E\u2090-\u209C\u20A0-\u20C0\u20D0-\u20F0\u2100-\u218B\u2190-\u2429\u2440-\u244A\u2460-\u2B73\u2B76-\u2B95\u2B97-\u2CF3\u2CF9-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u303F\u3041-\u3096\u3099-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31E5\u31EF-\u321E\u3220-\uA48C\uA490-\uA4C6\uA4D0-\uA62B\uA640-\uA6F7\uA700-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA82C\uA830-\uA839\uA840-\uA877\uA880-\uA8C5\uA8CE-\uA8D9\uA8E0-\uA953\uA95F-\uA97C\uA980-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAAC2\uAADB-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB6B\uAB70-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1E\uFB29\uFD3E-\uFD4F\uFDCF\uFDFD-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}-\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1018E}\u{10190}-\u{1019C}\u{101A0}\u{101D0}-\u{101FD}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E0}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{1037A}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{1091F}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10B39}-\u{10B3F}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6E}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{1104D}\u{11052}-\u{11075}\u{1107F}-\u{110C2}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11100}-\u{11134}\u{11136}-\u{11147}\u{11150}-\u{11176}\u{11180}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{11241}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112EA}\u{112F0}-\u{112F9}\u{11300}-\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133B}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D5}\u{113D7}\u{113D8}\u{113E1}\u{113E2}\u{11400}-\u{1145B}\u{1145D}-\u{11461}\u{11480}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B5}\u{115B8}-\u{115DD}\u{11600}-\u{11644}\u{11650}-\u{11659}\u{11660}-\u{1166C}\u{11680}-\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171D}-\u{1172B}\u{11730}-\u{11746}\u{11800}-\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D7}\u{119DA}-\u{119E4}\u{11A00}-\u{11A47}\u{11A50}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C36}\u{11C38}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D47}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF8}\u{11F00}-\u{11F10}\u{11F12}-\u{11F3A}\u{11F3E}-\u{11F5A}\u{11FB0}\u{11FC0}-\u{11FF1}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{13455}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF0}-\u{16AF5}\u{16B00}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F4F}-\u{16F87}\u{16F8F}-\u{16F9F}\u{16FE0}-\u{16FE4}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}-\u{1BCA3}\u{1CC00}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D1EA}\u{1D200}-\u{1D245}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D300}-\u{1D356}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D7CB}\u{1D7CE}-\u{1DA8B}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E030}-\u{1E06D}\u{1E08F}\u{1E100}-\u{1E12C}\u{1E130}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AE}\u{1E2C0}-\u{1E2F9}\u{1E2FF}\u{1E4D0}-\u{1E4F9}\u{1E5D0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F1AD}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]*$/u,bidiS6:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u06F0-\u06F9\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u2488-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCF9}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F100}-\u{1F10A}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}][\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\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u},kr={STATUS_MAPPING:{mapped:1,valid:2,disallowed:3,deviation:6,ignored:7}},xr=(Pr=Object.freeze({__proto__:null}))&&Pr.default||Pr;const{STATUS_MAPPING:Tr}=kr;function Lr(e){return/[^\x00-\x7F]/u.test(e)}function Nr(e){let t=0,n=xr.length-1;for(;t<=n;){const r=Math.floor((t+n)/2),i=xr[r],o=Array.isArray(i[0])?i[0][0]:i[0],u=Array.isArray(i[0])?i[0][1]:i[0];if(o<=e&&u>=e)return i.slice(1);o>e?n=r-1:t=r+1}return null}function qr(e,{checkHyphens:t,checkBidi:n,checkJoiners:r,transitionalProcessing:i,useSTD3ASCIIRules:o,isBidi:u}){if(0===e.length)return!0;if(e.normalize("NFC")!==e)return!1;const s=Array.from(e);if(t&&("-"===s[2]&&"-"===s[3]||e.startsWith("-")||e.endsWith("-")))return!1;if(!t&&e.startsWith("xn--"))return!1;if(e.includes("."))return!1;if(Or.combiningMarks.test(s[0]))return!1;for(const e of s){const t=e.codePointAt(0),[n]=Nr(t);if(i){if(n!==Tr.valid)return!1}else if(n!==Tr.valid&&n!==Tr.deviation)return!1;if(o&&t<=127&&!/^(?:[a-z]|[0-9]|-)$/u.test(e))return!1}if(r){let e=0;for(const[t,n]of s.entries())if(""===n||""===n){if(t>0){if(Or.combiningClassVirama.test(s[t-1]))continue;if(""===n){const n=s.indexOf("",t+1),r=n<0?s.slice(e):s.slice(e,n);if(Or.validZWNJ.test(r.join(""))){e=t+1;continue}}}return!1}}if(n&&u){let t;if(Or.bidiS1LTR.test(s[0]))t=!1;else{if(!Or.bidiS1RTL.test(s[0]))return!1;t=!0}if(t){if(!Or.bidiS2.test(e)||!Or.bidiS3.test(e)||Or.bidiS4EN.test(e)&&Or.bidiS4AN.test(e))return!1}else if(!Or.bidiS5.test(e)||!Or.bidiS6.test(e))return!1}return!0}function Mr(e,t){let n=function(e,{transitionalProcessing:t}){let n="";for(const r of e){const[e,i]=Nr(r.codePointAt(0));switch(e){case Tr.disallowed:n+=r;break;case Tr.ignored:break;case Tr.mapped:n+=t&&"ẞ"===r?"ss":i;break;case Tr.deviation:n+=t?i:r;break;case Tr.valid:n+=r}}return n}(e,t);n=n.normalize("NFC");const r=n.split("."),i=function(e){const t=e.map((e=>{if(e.startsWith("xn--"))try{return _r(e.substring(4))}catch{return""}return e})).join(".");return Or.bidiDomain.test(t)}(r);let o=!1;for(const[e,n]of r.entries()){let u=n,s=t.transitionalProcessing;if(u.startsWith("xn--")){if(Lr(u)){o=!0;continue}try{u=_r(u.substring(4))}catch{if(!t.ignoreInvalidPunycode){o=!0;continue}}r[e]=u,""!==u&&Lr(u)||(o=!0),s=!1}if(o)continue;qr(u,{...t,transitionalProcessing:s,isBidi:i})||(o=!0)}return{string:r.join("."),error:o}}var Gr={toASCII:function(e,{checkHyphens:t=!1,checkBidi:n=!1,checkJoiners:r=!1,useSTD3ASCIIRules:i=!1,verifyDNSLength:o=!1,transitionalProcessing:u=!1,ignoreInvalidPunycode:s=!1}={}){const a=Mr(e,{checkHyphens:t,checkBidi:n,checkJoiners:r,useSTD3ASCIIRules:i,transitionalProcessing:u,ignoreInvalidPunycode:s});let c=a.string.split(".");if(c=c.map((e=>{if(Lr(e))try{return`xn--${Ur(e)}`}catch{a.error=!0}return e})),o){const e=c.join(".").length;(e>253||0===e)&&(a.error=!0);for(let e=0;e<c.length;++e)if(c[e].length>63||0===c[e].length){a.error=!0;break}}return a.error?null:c.join(".")},toUnicode:function(e,{checkHyphens:t=!1,checkBidi:n=!1,checkJoiners:r=!1,useSTD3ASCIIRules:i=!1,transitionalProcessing:o=!1,ignoreInvalidPunycode:u=!1}={}){const s=Mr(e,{checkHyphens:t,checkBidi:n,checkJoiners:r,useSTD3ASCIIRules:i,transitionalProcessing:o,ignoreInvalidPunycode:u});return{domain:s.string,error:s.error}}};function zr(e){return e>=48&&e<=57}function $r(e){return e>=65&&e<=90||e>=97&&e<=122}var Wr={isASCIIDigit:zr,isASCIIAlpha:$r,isASCIIAlphanumeric:function(e){return $r(e)||zr(e)},isASCIIHex:function(e){return zr(e)||e>=65&&e<=70||e>=97&&e<=102}};const Jr=new TextEncoder,Vr=new TextDecoder("utf-8",{ignoreBOM:!0});var Hr={utf8Encode:function(e){return Jr.encode(e)},utf8DecodeWithoutBOM:function(e){return Vr.decode(e)}};const{isASCIIHex:Zr}=Wr,{utf8Encode:Yr}=Hr;function Kr(e){return e.codePointAt(0)}function Xr(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t=`0${t}`),`%${t}`}function Qr(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;++r){const i=e[r];if(37!==i)t[n++]=i;else if(37!==i||Zr(e[r+1])&&Zr(e[r+2])){const i=parseInt(String.fromCodePoint(e[r+1],e[r+2]),16);t[n++]=i,r+=2}else t[n++]=i}return t.slice(0,n)}function ei(e){return e<=31||e>126}const ti=new Set([Kr(" "),Kr('"'),Kr("<"),Kr(">"),Kr("`")]);const ni=new Set([Kr(" "),Kr('"'),Kr("#"),Kr("<"),Kr(">")]);function ri(e){return ei(e)||ni.has(e)}const ii=new Set([Kr("?"),Kr("`"),Kr("{"),Kr("}"),Kr("^")]);function oi(e){return ri(e)||ii.has(e)}const ui=new Set([Kr("/"),Kr(":"),Kr(";"),Kr("="),Kr("@"),Kr("["),Kr("\\"),Kr("]"),Kr("|")]);function si(e){return oi(e)||ui.has(e)}const ai=new Set([Kr("$"),Kr("%"),Kr("&"),Kr("+"),Kr(",")]);const ci=new Set([Kr("!"),Kr("'"),Kr("("),Kr(")"),Kr("~")]);function di(e,t){const n=Yr(e);let r="";for(const e of n)t(e)?r+=Xr(e):r+=String.fromCharCode(e);return r}var li={isC0ControlPercentEncode:ei,isFragmentPercentEncode:function(e){return ei(e)||ti.has(e)},isQueryPercentEncode:ri,isSpecialQueryPercentEncode:function(e){return ri(e)||e===Kr("'")},isPathPercentEncode:oi,isUserinfoPercentEncode:si,isURLEncodedPercentEncode:function(e){return function(e){return si(e)||ai.has(e)}(e)||ci.has(e)},percentDecodeString:function(e){return Qr(Yr(e))},percentDecodeBytes:Qr,utf8PercentEncodeString:function(e,t,n=!1){let r="";for(const i of e)r+=n&&" "===i?"+":di(i,t);return r},utf8PercentEncodeCodePoint:function(e,t){return di(String.fromCodePoint(e),t)}},hi=Er((function(e){const{utf8DecodeWithoutBOM:t}=Hr,{percentDecodeString:n,utf8PercentEncodeCodePoint:r,utf8PercentEncodeString:i,isC0ControlPercentEncode:o,isFragmentPercentEncode:u,isQueryPercentEncode:s,isSpecialQueryPercentEncode:a,isPathPercentEncode:c,isUserinfoPercentEncode:d}=li;function l(e){return e.codePointAt(0)}const h={ftp:21,file:null,http:80,https:443,ws:80,wss:443},p=Symbol("failure");function f(e){return[...e].length}function m(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function v(e){return"."===e||"%2e"===e.toLowerCase()}function E(e){return 2===e.length&&Wr.isASCIIAlpha(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function A(e){return-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)}function b(e){return void 0!==h[e]}function y(e){return b(e.scheme)}function g(e){return!b(e.scheme)}function C(e){return h[e]}function w(e){if(""===e)return p;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;let n=/[^0-7]/u;return 10===t&&(n=/[^0-9]/u),16===t&&(n=/[^0-9A-Fa-f]/u),n.test(e)?p:parseInt(e,t)}function F(e,r=!1){if("["===e[0])return"]"!==e[e.length-1]?p:function(e){const t=[0,0,0,0,0,0,0,0];let n=0,r=null,i=0;if((e=Array.from(e,(e=>e.codePointAt(0))))[i]===l(":")){if(e[i+1]!==l(":"))return p;i+=2,++n,r=n}for(;i<e.length;){if(8===n)return p;if(e[i]===l(":")){if(null!==r)return p;++i,++n,r=n;continue}let o=0,u=0;for(;u<4&&Wr.isASCIIHex(e[i]);)o=16*o+parseInt(m(e,i),16),++i,++u;if(e[i]===l(".")){if(0===u)return p;if(i-=u,n>6)return p;let r=0;for(;void 0!==e[i];){let o=null;if(r>0){if(!(e[i]===l(".")&&r<4))return p;++i}if(!Wr.isASCIIDigit(e[i]))return p;for(;Wr.isASCIIDigit(e[i]);){const t=parseInt(m(e,i));if(null===o)o=t;else{if(0===o)return p;o=10*o+t}if(o>255)return p;++i}t[n]=256*t[n]+o,++r,2!==r&&4!==r||++n}if(4!==r)return p;break}if(e[i]===l(":")){if(++i,void 0===e[i])return p}else if(void 0!==e[i])return p;t[n]=o,++n}if(null!==r){let e=n-r;for(n=7;0!==n&&e>0;){const i=t[r+e-1];t[r+e-1]=t[n],t[n]=i,--n,--e}}else if(null===r&&8!==n)return p;return t}(e.substring(1,e.length-1));if(r)return function(e){if(A(e))return p;return i(e,o)}(e);const u=function(e,t=!1){const n=Gr.toASCII(e,{checkHyphens:t,checkBidi:!0,checkJoiners:!0,useSTD3ASCIIRules:t,transitionalProcessing:!1,verifyDNSLength:t,ignoreInvalidPunycode:!1});if(null===n)return p;if(!t){if(""===n)return p;if(A(r=n)||-1!==r.search(/[\u0000-\u001F]|%|\u007F/u))return p}var r;return n}(t(n(e)));return u===p?p:function(e){const t=e.split(".");if(""===t[t.length-1]){if(1===t.length)return!1;t.pop()}const n=t[t.length-1];if(w(n)!==p)return!0;if(/^[0-9]+$/u.test(n))return!0;return!1}(u)?function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return p;const n=[];for(const e of t){const t=w(e);if(t===p)return p;n.push(t)}for(let e=0;e<n.length-1;++e)if(n[e]>255)return p;if(n[n.length-1]>=256**(5-n.length))return p;let r=n.pop(),i=0;for(const e of n)r+=e*256**(3-i),++i;return r}(u):u}function D(e){return"number"==typeof e?function(e){let t="",n=e;for(let e=1;e<=4;++e)t=String(n%256)+t,4!==e&&(t=`.${t}`),n=Math.floor(n/256);return t}(e):e instanceof Array?`[${function(e){let t="";const n=function(e){let t=null,n=1,r=null,i=0;for(let o=0;o<e.length;++o)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n?r:t}(e);let r=!1;for(let i=0;i<=7;++i)r&&0===e[i]||(r&&(r=!1),n!==i?(t+=e[i].toString(16),7!==i&&(t+=":")):(t+=0===i?"::":":",r=!0));return t}(e)}]`:e}function B(e){const{path:t}=e;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/u.test(n))||t.pop())}function I(e){return""!==e.username||""!==e.password}function R(e){return"string"==typeof e.path}function j(e,t,n,r,i){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=n||"utf-8",this.stateOverride=i,this.url=r,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};const e=function(e){let t=0,n=e.length;for(;t<n&&!(e.charCodeAt(t)>32);++t);for(;n>t&&!(e.charCodeAt(n-1)>32);--n);return e.substring(t,n)}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const o=function(e){return e.replace(/\u0009|\u000A|\u000D/gu,"")}(this.input);for(o!==this.input&&(this.parseError=!0),this.input=o,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,(e=>e.codePointAt(0)));this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),n=this[`parse ${this.state}`](e,t);if(!n)break;if(n===p){this.failure=!0;break}}}j.prototype["parse scheme start"]=function(e,t){if(Wr.isASCIIAlpha(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,p;this.state="no scheme",--this.pointer}return!0},j.prototype["parse scheme"]=function(e,t){if(Wr.isASCIIAlphanumeric(e)||e===l("+")||e===l("-")||e===l("."))this.buffer+=t.toLowerCase();else if(e===l(":")){if(this.stateOverride){if(y(this.url)&&!b(this.buffer))return!1;if(!y(this.url)&&b(this.buffer))return!1;if((I(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&""===this.url.host)return!1}if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===C(this.url.scheme)&&(this.url.port=null),!1;this.buffer="","file"===this.url.scheme?(this.input[this.pointer+1]===l("/")&&this.input[this.pointer+2]===l("/")||(this.parseError=!0),this.state="file"):y(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":y(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===l("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else{if(this.stateOverride)return this.parseError=!0,p;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},j.prototype["parse no scheme"]=function(e){return null===this.base||R(this.base)&&e!==l("#")?p:(R(this.base)&&e===l("#")?(this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},j.prototype["parse special relative or authority"]=function(e){return e===l("/")&&this.input[this.pointer+1]===l("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},j.prototype["parse path or authority"]=function(e){return e===l("/")?this.state="authority":(this.state="path",--this.pointer),!0},j.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,e===l("/")?this.state="relative slash":y(this.url)&&e===l("\\")?(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(),this.url.query=this.base.query,e===l("?")?(this.url.query="",this.state="query"):e===l("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0},j.prototype["parse relative slash"]=function(e){return!y(this.url)||e!==l("/")&&e!==l("\\")?e===l("/")?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):(e===l("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},j.prototype["parse special authority slashes"]=function(e){return e===l("/")&&this.input[this.pointer+1]===l("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},j.prototype["parse special authority ignore slashes"]=function(e){return e!==l("/")&&e!==l("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0},j.prototype["parse authority"]=function(e,t){if(e===l("@")){this.parseError=!0,this.atFlag&&(this.buffer=`%40${this.buffer}`),this.atFlag=!0;const e=f(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(e===l(":")&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=r(e,d);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||e===l("/")||e===l("?")||e===l("#")||y(this.url)&&e===l("\\")){if(this.atFlag&&""===this.buffer)return this.parseError=!0,p;this.pointer-=f(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},j.prototype["parse hostname"]=j.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(e!==l(":")||this.arrFlag)if(isNaN(e)||e===l("/")||e===l("?")||e===l("#")||y(this.url)&&e===l("\\")){if(--this.pointer,y(this.url)&&""===this.buffer)return this.parseError=!0,p;if(this.stateOverride&&""===this.buffer&&(I(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=F(this.buffer,g(this.url));if(e===p)return p;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else e===l("[")?this.arrFlag=!0:e===l("]")&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,p;if("hostname"===this.stateOverride)return!1;const e=F(this.buffer,g(this.url));if(e===p)return p;this.url.host=e,this.buffer="",this.state="port"}return!0},j.prototype["parse port"]=function(e,t){if(Wr.isASCIIDigit(e))this.buffer+=t;else{if(!(isNaN(e)||e===l("/")||e===l("?")||e===l("#")||y(this.url)&&e===l("\\")||this.stateOverride))return this.parseError=!0,p;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>65535)return this.parseError=!0,p;this.url.port=e===C(this.url.scheme)?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}return!0};const S=new Set([l("/"),l("\\"),l("?"),l("#")]);function _(e,t){const n=e.length-t;return n>=2&&(r=e[t],i=e[t+1],Wr.isASCIIAlpha(r)&&(i===l(":")||i===l("|")))&&(2===n||S.has(e[t+2]));var r,i}function U(e){if(R(e))return e.path;let t="";for(const n of e.path)t+=`/${n}`;return t}j.prototype["parse file"]=function(e){return this.url.scheme="file",this.url.host="",e===l("/")||e===l("\\")?(e===l("\\")&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===l("?")?(this.url.query="",this.state="query"):e===l("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,_(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):B(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0},j.prototype["parse file slash"]=function(e){var t;return e===l("/")||e===l("\\")?(e===l("\\")&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(!_(this.input,this.pointer)&&(2===(t=this.base.path[0]).length&&Wr.isASCIIAlpha(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},j.prototype["parse file host"]=function(e,t){if(isNaN(e)||e===l("/")||e===l("\\")||e===l("?")||e===l("#"))if(--this.pointer,!this.stateOverride&&E(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=F(this.buffer,g(this.url));if(e===p)return p;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},j.prototype["parse path start"]=function(e){return y(this.url)?(e===l("\\")&&(this.parseError=!0),this.state="path",e!==l("/")&&e!==l("\\")&&--this.pointer):this.stateOverride||e!==l("?")?this.stateOverride||e!==l("#")?void 0!==e?(this.state="path",e!==l("/")&&--this.pointer):this.stateOverride&&null===this.url.host&&this.url.path.push(""):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},j.prototype["parse path"]=function(e){return isNaN(e)||e===l("/")||y(this.url)&&e===l("\\")||!this.stateOverride&&(e===l("?")||e===l("#"))?(y(this.url)&&e===l("\\")&&(this.parseError=!0),!function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!v(this.buffer)||e===l("/")||y(this.url)&&e===l("\\")?v(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&E(this.buffer)&&(this.buffer=`${this.buffer[0]}:`),this.url.path.push(this.buffer)):this.url.path.push(""):(B(this.url),e===l("/")||y(this.url)&&e===l("\\")||this.url.path.push("")),this.buffer="",e===l("?")&&(this.url.query="",this.state="query"),e===l("#")&&(this.url.fragment="",this.state="fragment")):(e!==l("%")||Wr.isASCIIHex(this.input[this.pointer+1])&&Wr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=r(e,c)),!0},j.prototype["parse opaque path"]=function(e){if(e===l("?"))this.url.query="",this.state="query";else if(e===l("#"))this.url.fragment="",this.state="fragment";else if(e===l(" ")){const e=this.input[this.pointer+1];e===l("?")||e===l("#")?this.url.path+="%20":this.url.path+=" "}else isNaN(e)||e===l("%")||(this.parseError=!0),e!==l("%")||Wr.isASCIIHex(this.input[this.pointer+1])&&Wr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path+=r(e,o));return!0},j.prototype["parse query"]=function(e,t){if(y(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8"),!this.stateOverride&&e===l("#")||isNaN(e)){const t=y(this.url)?a:s;this.url.query+=i(this.buffer,t),this.buffer="",e===l("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(e)||(e!==l("%")||Wr.isASCIIHex(this.input[this.pointer+1])&&Wr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t);return!0},j.prototype["parse fragment"]=function(e){return isNaN(e)||(e!==l("%")||Wr.isASCIIHex(this.input[this.pointer+1])&&Wr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=r(e,u)),!0},e.exports.serializeURL=function(e,t){let n=`${e.scheme}:`;return null!==e.host&&(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=`:${e.password}`),n+="@"),n+=D(e.host),null!==e.port&&(n+=`:${e.port}`)),null===e.host&&!R(e)&&e.path.length>1&&""===e.path[0]&&(n+="/."),n+=U(e),null!==e.query&&(n+=`?${e.query}`),t||null===e.fragment||(n+=`#${e.fragment}`),n},e.exports.serializePath=U,e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":{const n=e.exports.parseURL(U(t));return null===n||"http"!==n.scheme&&"https"!==n.scheme?"null":e.exports.serializeURLOrigin(n)}case"ftp":case"http":case"https":case"ws":case"wss":return function(e){let t=`${e.scheme}://`;return t+=D(e.host),null!==e.port&&(t+=`:${e.port}`),t}({scheme:t.scheme,host:t.host,port:t.port});default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new j(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?null:n.url},e.exports.setTheUsername=function(e,t){e.username=i(t,d)},e.exports.setThePassword=function(e,t){e.password=i(t,d)},e.exports.serializeHost=D,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||"file"===e.scheme},e.exports.hasAnOpaquePath=R,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})}}));hi.serializeURL,hi.serializePath,hi.serializeURLOrigin,hi.basicURLParse,hi.setTheUsername,hi.setThePassword,hi.serializeHost,hi.cannotHaveAUsernamePasswordPort,hi.hasAnOpaquePath,hi.serializeInteger,hi.parseURL;const{utf8Encode:pi,utf8DecodeWithoutBOM:fi}=Hr,{percentDecodeBytes:mi,utf8PercentEncodeString:vi,isURLEncodedPercentEncode:Ei}=li;function Ai(e){return e.codePointAt(0)}function bi(e,t,n){let r=e.indexOf(t);for(;r>=0;)e[r]=n,r=e.indexOf(t,r+1);return e}var yi={parseUrlencodedString:function(e){return function(e){const t=function(e,t){const n=[];let r=0,i=e.indexOf(t);for(;i>=0;)n.push(e.slice(r,i)),r=i+1,i=e.indexOf(t,r);return r!==e.length&&n.push(e.slice(r)),n}(e,Ai("&")),n=[];for(const e of t){if(0===e.length)continue;let t,r;const i=e.indexOf(Ai("="));i>=0?(t=e.slice(0,i),r=e.slice(i+1)):(t=e,r=new Uint8Array(0)),t=bi(t,43,32),r=bi(r,43,32);const o=fi(mi(t)),u=fi(mi(r));n.push([o,u])}return n}(pi(e))},serializeUrlencoded:function(e){let t="";for(const[n,r]of e.entries()){0!==n&&(t+="&"),t+=`${vi(r[0],Ei,!0)}=${vi(r[1],Ei,!0)}`}return t}},gi=(e,t,{context:n="The provided value"}={})=>{if("function"!=typeof t)throw new e.TypeError(n+" is not a function");function r(...r){const i=br.tryWrapperForImpl(this);let o;for(let e=0;e<r.length;e++)r[e]=br.tryWrapperForImpl(r[e]);return o=Reflect.apply(t,i,r),o=Ar.any(o,{context:n,globals:e}),o}return r.construct=(...r)=>{for(let e=0;e<r.length;e++)r[e]=br.tryWrapperForImpl(r[e]);let i=Reflect.construct(t,r);return i=Ar.any(i,{context:n,globals:e}),i},r[br.wrapperSymbol]=t,r.objectReference=t,r},Ci=class{constructor(e,t,{doNotStripQMark:n=!1}){let r=t[0];if(this._list=[],this._url=null,n||"string"!=typeof r||"?"!==r[0]||(r=r.slice(1)),Array.isArray(r))for(const e of r){if(2!==e.length)throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([e[0],e[1]])}else if("object"==typeof r&&null===Object.getPrototypeOf(r))for(const e of Object.keys(r)){const t=r[e];this._list.push([e,t])}else this._list=yi.parseUrlencodedString(r)}_updateSteps(){if(null!==this._url){let e=yi.serializeUrlencoded(this._list);""===e&&(e=null),this._url._url.query=e}}get size(){return this._list.length}append(e,t){this._list.push([e,t]),this._updateSteps()}delete(e,t){let n=0;for(;n<this._list.length;)this._list[n][0]!==e||void 0!==t&&this._list[n][1]!==t?n++:this._list.splice(n,1);this._updateSteps()}get(e){for(const t of this._list)if(t[0]===e)return t[1];return null}getAll(e){const t=[];for(const n of this._list)n[0]===e&&t.push(n[1]);return t}has(e,t){for(const n of this._list)if(n[0]===e&&(void 0===t||n[1]===t))return!0;return!1}set(e,t){let n=!1,r=0;for(;r<this._list.length;)this._list[r][0]===e?n?this._list.splice(r,1):(n=!0,this._list[r][1]=t,r++):r++;n||this._list.push([e,t]),this._updateSteps()}sort(){this._list.sort(((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0)),this._updateSteps()}[Symbol.iterator](){return this._list[Symbol.iterator]()}toString(){return yi.serializeUrlencoded(this._list)}},wi={implementation:Ci},Fi=Er((function(e,t){const n=br.newObjectInRealm,r=br.implSymbol,i=br.ctorRegistrySymbol,o="URLSearchParams";function u(e,t){let n;return void 0!==t&&(n=t.prototype),br.isObject(n)||(n=e[i].URLSearchParams.prototype),Object.create(n)}t.is=e=>br.isObject(e)&&br.hasOwn(e,r)&&e[r]instanceof wi.implementation,t.isImpl=e=>br.isObject(e)&&e instanceof wi.implementation,t.convert=(e,n,{context:r="The provided value"}={})=>{if(t.is(n))return br.implForWrapper(n);throw new e.TypeError(`${r} is not of type 'URLSearchParams'.`)},t.createDefaultIterator=(e,t,n)=>{const r=e[i]["URLSearchParams Iterator"],o=Object.create(r);return Object.defineProperty(o,br.iterInternalSymbol,{value:{target:t,kind:n,index:0},configurable:!0}),o},t.create=(e,n,r)=>{const i=u(e);return t.setup(i,e,n,r)},t.createImpl=(e,n,r)=>{const i=t.create(e,n,r);return br.implForWrapper(i)},t._internalSetup=(e,t)=>{},t.setup=(e,n,i=[],o={})=>(o.wrapper=e,t._internalSetup(e,n),Object.defineProperty(e,r,{value:new wi.implementation(n,i,o),configurable:!0}),e[r][br.wrapperSymbol]=e,wi.init&&wi.init(e[r]),e),t.new=(e,n)=>{const i=u(e,n);return t._internalSetup(i,e),Object.defineProperty(i,r,{value:Object.create(wi.implementation.prototype),configurable:!0}),i[r][br.wrapperSymbol]=i,wi.init&&wi.init(i[r]),i[r]};const s=new Set(["Window","Worker"]);t.install=(e,i)=>{if(!i.some((e=>s.has(e))))return;const u=br.initCtorRegistry(e);class a{constructor(){const n=[];{let t=arguments[0];if(void 0!==t)if(br.isObject(t))if(void 0!==t[Symbol.iterator]){if(!br.isObject(t))throw new e.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");{const n=[],r=t;for(let t of r){if(!br.isObject(t))throw new e.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");{const n=[],r=t;for(let t of r)t=Ar.USVString(t,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:e}),n.push(t);t=n}n.push(t)}t=n}}else{if(!br.isObject(t))throw new e.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");{const n=Object.create(null);for(const r of Reflect.ownKeys(t)){const i=Object.getOwnPropertyDescriptor(t,r);if(i&&i.enumerable){let i=r;i=Ar.USVString(i,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:e});let o=t[r];o=Ar.USVString(o,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:e}),n[i]=o}}t=n}}else t=Ar.USVString(t,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:e});else t="";n.push(t)}return t.setup(Object.create(new.target.prototype),e,n)}append(n,i){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new e.TypeError(`Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);const u=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:e}),u.push(t)}{let t=arguments[1];t=Ar.USVString(t,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:e}),u.push(t)}return br.tryWrapperForImpl(o[r].append(...u))}delete(n){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:e}),o.push(t)}{let t=arguments[1];void 0!==t&&(t=Ar.USVString(t,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:e})),o.push(t)}return br.tryWrapperForImpl(i[r].delete(...o))}get(n){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:e}),o.push(t)}return i[r].get(...o)}getAll(n){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:e}),o.push(t)}return br.tryWrapperForImpl(i[r].getAll(...o))}has(n){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const o=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:e}),o.push(t)}{let t=arguments[1];void 0!==t&&(t=Ar.USVString(t,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:e})),o.push(t)}return i[r].has(...o)}set(n,i){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new e.TypeError(`Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);const u=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:e}),u.push(t)}{let t=arguments[1];t=Ar.USVString(t,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:e}),u.push(t)}return br.tryWrapperForImpl(o[r].set(...u))}sort(){const n=null!=this?this:e;if(!t.is(n))throw new e.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return br.tryWrapperForImpl(n[r].sort())}toString(){const n=null!=this?this:e;if(!t.is(n))throw new e.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return n[r].toString()}keys(){if(!t.is(this))throw new e.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return t.createDefaultIterator(e,this,"key")}values(){if(!t.is(this))throw new e.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return t.createDefaultIterator(e,this,"value")}entries(){if(!t.is(this))throw new e.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return t.createDefaultIterator(e,this,"key+value")}forEach(n){if(!t.is(this))throw new e.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");n=gi(e,n,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});const i=arguments[1];let o=Array.from(this[r]),u=0;for(;u<o.length;){const[e,t]=o[u].map(br.tryWrapperForImpl);n.call(i,t,e,this),o=Array.from(this[r]),u++}}get size(){const n=null!=this?this:e;if(!t.is(n))throw new e.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return n[r].size}}Object.defineProperties(a.prototype,{append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0},size:{enumerable:!0},[Symbol.toStringTag]:{value:"URLSearchParams",configurable:!0},[Symbol.iterator]:{value:a.prototype.entries,configurable:!0,writable:!0}}),u[o]=a,u["URLSearchParams Iterator"]=Object.create(u["%IteratorPrototype%"],{[Symbol.toStringTag]:{configurable:!0,value:"URLSearchParams Iterator"}}),br.define(u["URLSearchParams Iterator"],{next(){const t=this&&this[br.iterInternalSymbol];if(!t)throw new e.TypeError("next() called on a value that is not a URLSearchParams iterator object");const{target:i,kind:o,index:u}=t,s=Array.from(i[r]);if(u>=s.length)return n(e,{value:void 0,done:!0});const a=s[u];return t.index=u+1,n(e,br.iteratorResult(a.map(br.tryWrapperForImpl),o))}}),Object.defineProperty(e,o,{configurable:!0,writable:!0,value:a})}}));Fi.is,Fi.isImpl,Fi.convert,Fi.createDefaultIterator,Fi.create,Fi.createImpl,Fi._internalSetup,Fi.setup,Fi.install;var Di={implementation:class e{constructor(e,[t,n]){let r=null;if(void 0!==n&&(r=hi.basicURLParse(n),null===r))throw new TypeError(`Invalid base URL: ${n}`);const i=hi.basicURLParse(t,{baseURL:r});if(null===i)throw new TypeError(`Invalid URL: ${t}`);const o=null!==i.query?i.query:"";this._url=i,this._query=Fi.createImpl(e,[o],{doNotStripQMark:!0}),this._query._url=this}static parse(t,n,r){try{return new e(t,[n,r])}catch{return null}}static canParse(e,t){let n=null;if(void 0!==t&&(n=hi.basicURLParse(t),null===n))return!1;return null!==hi.basicURLParse(e,{baseURL:n})}get href(){return hi.serializeURL(this._url)}set href(e){const t=hi.basicURLParse(e);if(null===t)throw new TypeError(`Invalid URL: ${e}`);this._url=t,this._query._list.splice(0);const{query:n}=t;null!==n&&(this._query._list=yi.parseUrlencodedString(n))}get origin(){return hi.serializeURLOrigin(this._url)}get protocol(){return`${this._url.scheme}:`}set protocol(e){hi.basicURLParse(`${e}:`,{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){hi.cannotHaveAUsernamePasswordPort(this._url)||hi.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){hi.cannotHaveAUsernamePasswordPort(this._url)||hi.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?hi.serializeHost(e.host):`${hi.serializeHost(e.host)}:${hi.serializeInteger(e.port)}`}set host(e){hi.hasAnOpaquePath(this._url)||hi.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":hi.serializeHost(this._url.host)}set hostname(e){hi.hasAnOpaquePath(this._url)||hi.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":hi.serializeInteger(this._url.port)}set port(e){hi.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:hi.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return hi.serializePath(this._url)}set pathname(e){hi.hasAnOpaquePath(this._url)||(this._url.path=[],hi.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 t.query=null,void(this._query._list=[]);const n="?"===e[0]?e.substring(1):e;t.query="",hi.basicURLParse(n,{url:t,stateOverride:"query"}),this._query._list=yi.parseUrlencodedString(n)}get searchParams(){return this._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="",hi.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},Bi=Er((function(e,t){const n=br.implSymbol,r=br.ctorRegistrySymbol;function i(e,t){let n;return void 0!==t&&(n=t.prototype),br.isObject(n)||(n=e[r].URL.prototype),Object.create(n)}t.is=e=>br.isObject(e)&&br.hasOwn(e,n)&&e[n]instanceof Di.implementation,t.isImpl=e=>br.isObject(e)&&e instanceof Di.implementation,t.convert=(e,n,{context:r="The provided value"}={})=>{if(t.is(n))return br.implForWrapper(n);throw new e.TypeError(`${r} is not of type 'URL'.`)},t.create=(e,n,r)=>{const o=i(e);return t.setup(o,e,n,r)},t.createImpl=(e,n,r)=>{const i=t.create(e,n,r);return br.implForWrapper(i)},t._internalSetup=(e,t)=>{},t.setup=(e,r,i=[],o={})=>(o.wrapper=e,t._internalSetup(e,r),Object.defineProperty(e,n,{value:new Di.implementation(r,i,o),configurable:!0}),e[n][br.wrapperSymbol]=e,Di.init&&Di.init(e[n]),e),t.new=(e,r)=>{const o=i(e,r);return t._internalSetup(o,e),Object.defineProperty(o,n,{value:Object.create(Di.implementation.prototype),configurable:!0}),o[n][br.wrapperSymbol]=o,Di.init&&Di.init(o[n]),o[n]};const o=new Set(["Window","Worker"]);t.install=(e,r)=>{if(!r.some((e=>o.has(e))))return;const i=br.initCtorRegistry(e);class u{constructor(n){if(arguments.length<1)throw new e.TypeError(`Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`);const r=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to construct 'URL': parameter 1",globals:e}),r.push(t)}{let t=arguments[1];void 0!==t&&(t=Ar.USVString(t,{context:"Failed to construct 'URL': parameter 2",globals:e})),r.push(t)}return t.setup(Object.create(new.target.prototype),e,r)}toJSON(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return r[n].toJSON()}get href(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get href' called on an object that is not a valid instance of URL.");return r[n].href}set href(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set href' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:e}),i[n].href=r}toString(){if(!t.is(this))throw new e.TypeError("'toString' called on an object that is not a valid instance of URL.");return this[n].href}get origin(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get origin' called on an object that is not a valid instance of URL.");return r[n].origin}get protocol(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return r[n].protocol}set protocol(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set protocol' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:e}),i[n].protocol=r}get username(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get username' called on an object that is not a valid instance of URL.");return r[n].username}set username(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set username' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:e}),i[n].username=r}get password(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get password' called on an object that is not a valid instance of URL.");return r[n].password}set password(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set password' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:e}),i[n].password=r}get host(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get host' called on an object that is not a valid instance of URL.");return r[n].host}set host(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set host' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:e}),i[n].host=r}get hostname(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return r[n].hostname}set hostname(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set hostname' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:e}),i[n].hostname=r}get port(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get port' called on an object that is not a valid instance of URL.");return r[n].port}set port(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set port' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:e}),i[n].port=r}get pathname(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return r[n].pathname}set pathname(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set pathname' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:e}),i[n].pathname=r}get search(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get search' called on an object that is not a valid instance of URL.");return r[n].search}set search(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set search' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:e}),i[n].search=r}get searchParams(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return br.getSameObject(this,"searchParams",(()=>br.tryWrapperForImpl(r[n].searchParams)))}get hash(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get hash' called on an object that is not a valid instance of URL.");return r[n].hash}set hash(r){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set hash' called on an object that is not a valid instance of URL.");r=Ar.USVString(r,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:e}),i[n].hash=r}static parse(t){if(arguments.length<1)throw new e.TypeError(`Failed to execute 'parse' on 'URL': 1 argument required, but only ${arguments.length} present.`);const n=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'parse' on 'URL': parameter 1",globals:e}),n.push(t)}{let t=arguments[1];void 0!==t&&(t=Ar.USVString(t,{context:"Failed to execute 'parse' on 'URL': parameter 2",globals:e})),n.push(t)}return br.tryWrapperForImpl(Di.implementation.parse(e,...n))}static canParse(t){if(arguments.length<1)throw new e.TypeError(`Failed to execute 'canParse' on 'URL': 1 argument required, but only ${arguments.length} present.`);const n=[];{let t=arguments[0];t=Ar.USVString(t,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:e}),n.push(t)}{let t=arguments[1];void 0!==t&&(t=Ar.USVString(t,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:e})),n.push(t)}return Di.implementation.canParse(...n)}}Object.defineProperties(u.prototype,{toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0},[Symbol.toStringTag]:{value:"URL",configurable:!0}}),Object.defineProperties(u,{parse:{enumerable:!0},canParse:{enumerable:!0}}),i.URL=u,Object.defineProperty(e,"URL",{configurable:!0,writable:!0,value:u}),r.includes("Window")&&Object.defineProperty(e,"webkitURL",{configurable:!0,writable:!0,value:u})}}));Bi.is,Bi.isImpl,Bi.convert,Bi.create,Bi.createImpl,Bi._internalSetup,Bi.setup,Bi.install;var Ii={URL:Bi,URLSearchParams:Fi};const{URL:Ri,URLSearchParams:ji}=Ii,Si={Array:Array,Object:Object,Promise:Promise,String:String,TypeError:TypeError};Ri.install(Si,["Window"]),ji.install(Si,["Window"]);var _i={URL:Si.URL,URLSearchParams:Si.URLSearchParams,parseURL:hi.parseURL,basicURLParse:hi.basicURLParse,serializeURL:hi.serializeURL,serializePath:hi.serializePath,serializeHost:hi.serializeHost,serializeInteger:hi.serializeInteger,serializeURLOrigin:hi.serializeURLOrigin,setTheUsername:hi.setTheUsername,setThePassword:hi.setThePassword,cannotHaveAUsernamePasswordPort:hi.cannotHaveAUsernamePasswordPort,hasAnOpaquePath:hi.hasAnOpaquePath,percentDecodeString:li.percentDecodeString,percentDecodeBytes:li.percentDecodeBytes};const Ui=o.Readable,Pi=Symbol("buffer"),Oi=Symbol("type");class ki{constructor(){this[Oi]="";const e=arguments[0],t=arguments[1],n=[];let r=0;if(e){const t=e,i=Number(t.length);for(let e=0;e<i;e++){const i=t[e];let o;o=i instanceof Buffer?i:ArrayBuffer.isView(i)?Buffer.from(i.buffer,i.byteOffset,i.byteLength):i instanceof ArrayBuffer?Buffer.from(i):i instanceof ki?i[Pi]:Buffer.from("string"==typeof i?i:String(i)),r+=o.length,n.push(o)}}this[Pi]=Buffer.concat(n);let i=t&&void 0!==t.type&&String(t.type).toLowerCase();i&&!/[^\u0020-\u007E]/.test(i)&&(this[Oi]=i)}get size(){return this[Pi].length}get type(){return this[Oi]}text(){return Promise.resolve(this[Pi].toString())}arrayBuffer(){const e=this[Pi],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new Ui;return e._read=function(){},e.push(this[Pi]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],n=arguments[1];let r,i;r=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),i=void 0===n?e:n<0?Math.max(e+n,0):Math.min(n,e);const o=Math.max(i-r,0),u=this[Pi].slice(r,r+o),s=new ki([],{type:arguments[2]});return s[Pi]=u,s}}function xi(e,t,n){Error.call(this,e),this.message=e,this.type=t,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let Ti;Object.defineProperties(ki.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(ki.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),xi.prototype=Object.create(Error.prototype),xi.prototype.constructor=xi,xi.prototype.name="FetchError";try{Ti=require("encoding").convert}catch(e){}const Li=Symbol("Body internals"),Ni=o.PassThrough;function qi(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let i=void 0===r?0:r;var u=n.timeout;let s=void 0===u?0:u;null==e?e=null:Gi(e)?e=Buffer.from(e.toString()):zi(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 o||(e=Buffer.from(String(e)))),this[Li]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=s,e instanceof o&&e.on("error",(function(e){const n="AbortError"===e.name?e:new xi(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[Li].error=n}))}function Mi(){var e=this;if(this[Li].disturbed)return qi.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Li].disturbed=!0,this[Li].error)return qi.Promise.reject(this[Li].error);let t=this.body;if(null===t)return qi.Promise.resolve(Buffer.alloc(0));if(zi(t)&&(t=t.stream()),Buffer.isBuffer(t))return qi.Promise.resolve(t);if(!(t instanceof o))return qi.Promise.resolve(Buffer.alloc(0));let n=[],r=0,i=!1;return new qi.Promise((function(o,u){let s;e.timeout&&(s=setTimeout((function(){i=!0,u(new xi(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,u(t)):u(new xi(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&r+t.length>e.size)return i=!0,void u(new xi(`content size at ${e.url} over limit: ${e.size}`,"max-size"));r+=t.length,n.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(s);try{o(Buffer.concat(n,r))}catch(t){u(new xi(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function Gi(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 zi(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 $i(e){let t,n,r=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof o&&"function"!=typeof r.getBoundary&&(t=new Ni,n=new Ni,r.pipe(t),r.pipe(n),e[Li].body=t,r=n),r}function Wi(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":Gi(e)?"application/x-www-form-urlencoded;charset=UTF-8":zi(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 o?null:"text/plain;charset=UTF-8"}function Ji(e){const t=e.body;return null===t?0:zi(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}qi.prototype={get body(){return this[Li].body},get bodyUsed(){return this[Li].disturbed},arrayBuffer(){return Mi.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 Mi.call(this).then((function(t){return Object.assign(new ki([],{type:e.toLowerCase()}),{[Pi]:t})}))},json(){var e=this;return Mi.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return qi.Promise.reject(new xi(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return Mi.call(this).then((function(e){return e.toString()}))},buffer(){return Mi.call(this)},textConverted(){var e=this;return Mi.call(this).then((function(t){return function(e,t){if("function"!=typeof Ti)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=t.get("content-type");let r,i,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));i=e.slice(0,1024).toString(),!r&&i&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(i));!r&&i&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(i),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(i),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&i&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(i));r&&(o=r.pop(),"gb2312"!==o&&"gbk"!==o||(o="gb18030"));return Ti(e,"UTF-8",o).toString()}(t,e.headers)}))}},Object.defineProperties(qi.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),qi.mixIn=function(e){for(const t of Object.getOwnPropertyNames(qi.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(qi.prototype,t);Object.defineProperty(e,t,n)}},qi.Promise=global.Promise;const Vi=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Hi=/[^\t\x20-\x7e\x80-\xff]/;function Zi(e){if(e=`${e}`,Vi.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function Yi(e){if(e=`${e}`,Hi.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function Ki(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const Xi=Symbol("map");class Qi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[Xi]=Object.create(null),e instanceof Qi){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){Zi(e=`${e}`);const t=Ki(this[Xi],e);return void 0===t?null:this[Xi][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=eo(this),r=0;for(;r<n.length;){var i=n[r];const o=i[0],u=i[1];e.call(t,u,o,this),n=eo(this),r++}}set(e,t){t=`${t}`,Zi(e=`${e}`),Yi(t);const n=Ki(this[Xi],e);this[Xi][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,Zi(e=`${e}`),Yi(t);const n=Ki(this[Xi],e);void 0!==n?this[Xi][n].push(t):this[Xi][e]=[t]}has(e){return Zi(e=`${e}`),void 0!==Ki(this[Xi],e)}delete(e){Zi(e=`${e}`);const t=Ki(this[Xi],e);void 0!==t&&delete this[Xi][t]}raw(){return this[Xi]}keys(){return no(this,"key")}values(){return no(this,"value")}[Symbol.iterator](){return no(this,"key+value")}}function eo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[Xi]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[Xi][t].join(", ")}:function(t){return[t.toLowerCase(),e[Xi][t].join(", ")]})}Qi.prototype.entries=Qi.prototype[Symbol.iterator],Object.defineProperty(Qi.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Qi.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 to=Symbol("internal");function no(e,t){const n=Object.create(ro);return n[to]={target:e,kind:t,index:0},n}const ro=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==ro)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[to];const t=e.target,n=e.kind,r=e.index,i=eo(t,n);return r>=i.length?{value:void 0,done:!0}:(this[to].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function io(e){const t=Object.assign({__proto__:null},e[Xi]),n=Ki(e[Xi],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(ro,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const oo=Symbol("Response internals"),uo=s.STATUS_CODES;class so{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};qi.call(this,e,t);const n=t.status||200,r=new Qi(t.headers);if(null!=e&&!r.has("Content-Type")){const t=Wi(e);t&&r.append("Content-Type",t)}this[oo]={url:t.url,status:n,statusText:t.statusText||uo[n],headers:r,counter:t.counter}}get url(){return this[oo].url||""}get status(){return this[oo].status}get ok(){return this[oo].status>=200&&this[oo].status<300}get redirected(){return this[oo].counter>0}get statusText(){return this[oo].statusText}get headers(){return this[oo].headers}clone(){return new so($i(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}qi.mixIn(so.prototype),Object.defineProperties(so.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(so.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const ao=Symbol("Request internals"),co=a.URL||_i.URL,lo=a.parse,ho=a.format;function po(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new co(e).toString()),lo(e)}const fo="destroy"in o.Readable.prototype;function mo(e){return"object"==typeof e&&"object"==typeof e[ao]}class vo{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mo(e)?t=po(e.url):(t=e&&e.href?po(e.href):po(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||mo(e)&&null!==e.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:mo(e)&&null!==e.body?$i(e):null;qi.call(this,i,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const o=new Qi(n.headers||e.headers||{});if(null!=i&&!o.has("Content-Type")){const e=Wi(i);e&&o.append("Content-Type",e)}let u=mo(e)?e.signal:null;if("signal"in n&&(u=n.signal),null!=u&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(u))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[ao]={method:r,redirect:n.redirect||e.redirect||"follow",headers:o,parsedURL:t,signal:u},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[ao].method}get url(){return ho(this[ao].parsedURL)}get headers(){return this[ao].headers}get redirect(){return this[ao].redirect}get signal(){return this[ao].signal}clone(){return new vo(this)}}function Eo(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}qi.mixIn(vo.prototype),Object.defineProperty(vo.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(vo.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Eo.prototype=Object.create(Error.prototype),Eo.prototype.constructor=Eo,Eo.prototype.name="AbortError";const Ao=a.URL||_i.URL,bo=o.PassThrough;function yo(e,t){if(!yo.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return qi.Promise=yo.Promise,new yo.Promise((function(n,r){const i=new vo(e,t),u=function(e){const t=e[ao].parsedURL,n=new Qi(e[ao].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof o.Readable&&!fo)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=Ji(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 i=e.agent;return"function"==typeof i&&(i=i(t)),n.has("Connection")||i||n.set("Connection","close"),Object.assign({},t,{method:e.method,headers:io(n),agent:i})}(i),a=("https:"===u.protocol?d:s).request,c=i.signal;let l=null;const p=function(){let e=new Eo("The user aborted a request.");r(e),i.body&&i.body instanceof o.Readable&&i.body.destroy(e),l&&l.body&&l.body.emit("error",e)};if(c&&c.aborted)return void p();const f=function(){p(),E()},m=a(u);let v;function E(){m.abort(),c&&c.removeEventListener("abort",f),clearTimeout(v)}c&&c.addEventListener("abort",f),i.timeout&&m.once("socket",(function(e){v=setTimeout((function(){r(new xi(`network timeout at: ${i.url}`,"request-timeout")),E()}),i.timeout)})),m.on("error",(function(e){r(new xi(`request to ${i.url} failed, reason: ${e.message}`,"system",e)),E()})),m.on("response",(function(e){clearTimeout(v);const t=function(e){const t=new Qi;for(const n of Object.keys(e))if(!Vi.test(n))if(Array.isArray(e[n]))for(const r of e[n])Hi.test(r)||(void 0===t[Xi][n]?t[Xi][n]=[r]:t[Xi][n].push(r));else Hi.test(e[n])||(t[Xi][n]=[e[n]]);return t}(e.headers);if(yo.isRedirect(e.statusCode)){const o=t.get("Location");let u=null;try{u=null===o?null:new Ao(o,i.url).toString()}catch(e){if("manual"!==i.redirect)return r(new xi(`uri requested responds with an invalid redirect URL: ${o}`,"invalid-redirect")),void E()}switch(i.redirect){case"error":return r(new xi(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),void E();case"manual":if(null!==u)try{t.set("Location",u)}catch(e){r(e)}break;case"follow":if(null===u)break;if(i.counter>=i.follow)return r(new xi(`maximum redirect reached at: ${i.url}`,"max-redirect")),void E();const o={headers:new Qi(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};if(!function(e,t){const n=new Ao(t).hostname,r=new Ao(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(i.url,u))for(const e of["authorization","www-authenticate","cookie","cookie2"])o.headers.delete(e);return 303!==e.statusCode&&i.body&&null===Ji(i)?(r(new xi("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void E()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==i.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),n(yo(new vo(u,o))),void E())}}e.once("end",(function(){c&&c.removeEventListener("abort",f)}));let o=e.pipe(new bo);const u={url:i.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:i.size,timeout:i.timeout,counter:i.counter},s=t.get("Content-Encoding");if(!i.compress||"HEAD"===i.method||null===s||204===e.statusCode||304===e.statusCode)return l=new so(o,u),void n(l);const a={flush:h.Z_SYNC_FLUSH,finishFlush:h.Z_SYNC_FLUSH};if("gzip"==s||"x-gzip"==s)return o=o.pipe(h.createGunzip(a)),l=new so(o,u),void n(l);if("deflate"!=s&&"x-deflate"!=s){if("br"==s&&"function"==typeof h.createBrotliDecompress)return o=o.pipe(h.createBrotliDecompress()),l=new so(o,u),void n(l);l=new so(o,u),n(l)}else{e.pipe(new bo).once("data",(function(e){o=8==(15&e[0])?o.pipe(h.createInflate()):o.pipe(h.createInflateRaw()),l=new so(o,u),n(l)}))}})),function(e,t){const n=t.body;null===n?e.end():zi(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(m,i)}))}yo.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},yo.Promise=global.Promise;var go="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Co=go?yo:window.fetch;var wo=function(e){return Array.isArray(e)?e:[e]},Fo=function(e,t){return J(void 0,void 0,void 0,(function(){var n;return V(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)]}))}))},Do=function(e){function t(t){void 0===t&&(t=8192);var n=e.call(this)||this;return n.bufferDefaultSize=t,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return $(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.getContentsAsString=function(e,t){void 0===e&&(e="utf8");var n=this.buffer.toString(e,0,Math.min(t||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},t.prototype.adaptBuffer=function(e){if(this.buffer.length-this.size<e){var t=Math.ceil((e-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*t);this.buffer.copy(n,0,0,this.size),this.buffer=n}},t.prototype._write=function(e,t,n){this.adaptBuffer(e.length),e.copy(this.buffer,this.size,0),this._size+=e.length,n()},t}(o.Writable),Bo=function(){function e(e,t){this.contextProvider=e,this.agent=t}return e.prototype.getServiceDetails=function(e,t){return J(this,void 0,void 0,(function(){return V(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 J(this,void 0,void 0,(function(){return V(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 J(this,void 0,void 0,(function(){var n,r,i,o,u,s=this;return V(this,(function(a){switch(a.label){case 0:return n="Error while trying to connect, please try again.",r=mr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},W(W({},t),{agent:this.agent})),[4,Za(2)((function(){return J(s,void 0,void 0,(function(){return V(this,(function(t){return[2,Co(e,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(i=a.sent()).ok?[3,3]:[4,i.text()];case 2:o=a.sent(),u=n;try{u=JSON.parse(o)}catch(e){u=null!=o?o:n}finally{throw new Error(JSON.stringify(u))}case 3:return[4,i.json()];case 4:return[2,a.sent()]}}))}))},e}(),Io=function(e,t,n){return J(void 0,void 0,void 0,(function(){var r,i,o,u,s;return V(this,(function(a){switch(a.label){case 0:if(r=So(t||"127.0.0.1"),(i=So(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===p.platform()&&(o=function(e){return J(void 0,void 0,void 0,(function(){var t;return V(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,jo.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),u=r,a.label=1;case 1:return u<=i?(s=_o(u),[4,Ro(e,s)]):[3,6];case 2:return a.sent()?o?[4,o(s)]:[3,4]:[3,5];case 3:a.sent(),a.label=4;case 4:return[2,s];case 5:return u+=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."))}}))}))},Ro=function(e,t){return new Promise((function(n){var r=new v,i=!1;r.on("connect",(function(){i=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){i=!1,r.destroy()})),r.on("error",(function(){i=!1})),r.on("close",(function(){n(!i)})),t?r.connect(e,t):r.connect(e)}))},jo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return J(void 0,void 0,void 0,(function(){return V(this,(function(t){switch(t.label){case 0:return[4,Uo("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},So=function(e){var t=e.split(".").reverse();if(4!==t.length)throw new Error("Invalid ip address: ".concat(e));for(var n=0,r=0;r<4;r+=1){var i=Number.parseInt(t[r],10);if(i<0||i>255)throw new Error("Invalid ip address: ".concat(e));n+=i<<8*r}return n},_o=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(".")},Uo=function(e,t,n){var i=r(e,t,W({windowsHide:!0},n)),o=new Promise((function(r,o){var u="",s="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(i.stdout&&i.stdout.on("data",(function(e){u+=e})),i.stderr&&i.stderr.on("data",(function(e){s+=e}))),i.on("close",(function(n){var i={code:n,stdout:u,stderr:s};if(0!==n){var a="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(s);o({message:a,result:i})}else r(i)}))}));return{process:i,resultPromise:o}},Po=function(e,t,n){return J(void 0,void 0,void 0,(function(){var r,i;return V(this,(function(o){switch(o.label){case 0:return r=Oo(e,10),[4,E.promises.writeFile(r,t,n)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,4,,6]),[4,E.promises.rename(r,e)];case 3:return o.sent(),[3,6];case 4:return i=o.sent(),[4,E.promises.unlink(r).catch((function(){}))];case 5:throw o.sent(),i;case 6:return[2]}}))}))},Oo=function(e,t){for(var n,r=C.dirname(e),i=C.basename(e),o=0;null===(n=o<t)||void 0===n||n;o+=1){var u=H([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),s=".".concat(u,".").concat(i),a=C.join(r,s);if(!E.existsSync(a))return a}throw new Error("Could not write file to file '".concat(e,"'."))},ko="win32"===process.platform?"\r\n":"\n",xo=function(){function e(e,t){this.nodes=e,this.config=t}return e.prototype.add=function(e,t,n){var r=this;if(0===t.length)return this;var i=this.findOrCreateEntry(e,n);return t.forEach((function(e){if(!i.hosts.find((function(t){return t.host===e}))){var t=1;0===i.hosts.length&&(t=r.config.indent-"".concat(i.ipPrefixWhitespace).concat(i.ip).length),i.hosts.push({whitespace:" ".repeat(t<1?1:t),host:e})}})),this},e.prototype.remove=function(e,t){var n=this;return this.findEntries(e).forEach((function(e){t.forEach((function(t){var r=e.hosts.findIndex((function(e){return e.host===t}));r<0||(0===r&&void 0!==e.hosts[1]&&(e.hosts[1].whitespace=e.hosts[0].whitespace),e.hosts.splice(r,1),0===e.hosts.length&&n.removeEntry(e))}))})),this},e.prototype.removeHosts=function(e){var t=this;zo(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 cr(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return zo(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 qo(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||ue(t)&&"[object Number]"==oe(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return zo(this.nodes,"entry").filter((function(t){return t.ip===e}))},e.prototype.findOrCreateEntry=function(e,t){var n=this.findEntries(e)[0];if(n)return n;var r=this.makeEntry(e);if(t){var i=No(t),o=this.nodes.findIndex((function(e){return"comment"===e.type&&e.line===i}));if(o>=0)this.insertAt(o+1,r);else{var u="blank"!==this.nodes[this.nodes.length-1].type?[To(),Lo(i),r]:[Lo(i),r];this.insertAt.apply(this,H([this.nodes.length],u,!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,H([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return W({type:"entry",ip:e,ipPrefixWhitespace:n,hosts:[]},t)},e.fromNodes=function(t,n){var r,i;return new e(t.filter((function(e){return"eol"!==e.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var e,n=zo(t,"eol").map((function(e){return e.line}));return null!==(e=$o(n))&&void 0!==e?e:ko}(),indent:null!==(i=null==n?void 0:n.indent)&&void 0!==i?i:function(){var e,n=cr(zo(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=$o(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(Mo(e),t)},e}(),To=function(){return{type:"blank",line:""}},Lo=function(e){return{type:"comment",line:No(e)}},No=function(e){return e.startsWith("#")?e:"# ".concat(e)},qo=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:ko)},Mo=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}:Go(e)}))},Go=function(e){var t=e.match(/^(\s*)(\S+)(.+)?$/);if(!t)return{type:"invalid",line:e};var n=t[1],r=t[2],i=t.slice(3),o=!1,u=cr(i.filter((function(e){return void 0!==e})),(function(e){var t=e.match(/(\s+)(\S+)/g);return t?t.map((function(e){var t=e.match(/^(\s+)(\S+)$/);t||(o=!0);var n=null!=t?t:[];return{whitespace:n[1],host:n[2]}})):(o=!0,[])}));return o?{type:"invalid",line:e}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:u}},zo=function(e,t){return e.filter((function(e){return e.type===t}))},$o=function(e){var t=new Map;e.forEach((function(e){var n;t.set(e,(null!==(n=t.get(e))&&void 0!==n?n:0)+1)}));var n=pr(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},Wo="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",Jo=function(){function e(e){this.ast=xo.fromNodes([]);var t={writeMode:"atomic",hostsFile:Wo};this.config=W(W({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!hr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!hr(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(!hr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!hr(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(!hr(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(!hr(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 J(this,void 0,void 0,(function(){var e;return V(this,(function(t){switch(t.label){case 0:return[4,E.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=xo.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return J(this,void 0,void 0,(function(){var t,n,r,i;return V(this,(function(o){switch(o.label){case 0:switch(t=W(W({},this.config),e),n=t.hostsFile,r=t.writeMode,i=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,Po(n,i)];case 2:case 4:return o.sent(),[3,6];case 3:return[4,E.promises.writeFile(n,i)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return J(this,void 0,void 0,(function(){var t,n,r,i;return V(this,(function(o){switch(o.label){case 0:return E.existsSync(this.config.hostsFile)?(t=C.dirname(this.config.hostsFile),n=C.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),i=C.resolve(t,r),E.existsSync(i)&&!e.rewrite?[3,2]:[4,E.promises.copyFile(this.config.hostsFile,i)]):[2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},e.load=function(t){return J(this,void 0,void 0,(function(){return V(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),Vo=function(){function e(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(e.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),e.prototype.enter=function(e){return J(this,void 0,void 0,(function(){var t,n=this;return V(this,(function(r){return this._queueLength+=1,t=this.previousPromise.then((function(){return n._queueLength-=1,e()}),(function(){return n._queueLength-=1,e()})),this.previousPromise=t,[2,t]}))}))},e}(),Ho=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}};var Zo=Ho(Ko),Yo=Ho(Xo);function Ko(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Xo(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}Ko.proto=Ko((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Ko(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Xo(this)},configurable:!0})})),Zo.strict=Yo;var Qo,eu=function(){},tu=function(e,t,n){if("function"==typeof t)return tu(e,null,t);t||(t={}),n=Zo(n||eu);var r=e._writableState,i=e._readableState,o=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,s=!1,a=function(){e.writable||c()},c=function(){u=!1,o||n.call(e)},d=function(){o=!1,u||n.call(e)},l=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},h=function(t){n.call(e,t)},p=function(){process.nextTick(f)},f=function(){if(!s)return(!o||i&&i.ended&&!i.destroyed)&&(!u||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},m=function(){e.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?u&&!r&&(e.on("end",a),e.on("close",a)):(e.on("complete",c),e.on("abort",p),e.req?m():e.on("request",m)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),!1!==t.error&&e.on("error",h),e.on("close",p),function(){s=!0,e.removeListener("complete",c),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",h),e.removeListener("close",p)}},nu=tu;try{Qo=E}catch(e){}var ru=function(){},iu=/^v?\.0/.test(process.version),ou=function(e){return"function"==typeof e},uu=function(e,t,n,r){r=Zo(r);var i=!1;e.on("close",(function(){i=!0})),nu(e,{readable:t,writable:n},(function(e){if(e)return r(e);i=!0,r()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return!!iu&&!!Qo&&(e instanceof(Qo.ReadStream||ru)||e instanceof(Qo.WriteStream||ru))&&ou(e.close)}(e)?e.close(ru):function(e){return e.setHeader&&ou(e.abort)}(e)?e.abort():ou(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},su=function(e){e()},au=function(e,t){return e.pipe(t)},cu=function(){var e,t=Array.prototype.slice.call(arguments),n=ou(t[t.length-1]||ru)&&t.pop()||ru;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(i,o){var u=o<t.length-1;return uu(i,u,o>0,(function(t){e||(e=t),t&&r.forEach(su),u||(r.forEach(su),n(e))}))}));return t.reduce(au)};const du=["nodebuffer","arraybuffer","fragments"],lu="undefined"!=typeof Blob;lu&&du.push("blob");var hu={BINARY_TYPES:du,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:lu,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},pu="function"==typeof __webpack_require__?__non_webpack_require__:vr,fu=process.config&&process.config.variables||{},mu=!!process.env.PREBUILDS_ONLY,vu=process.versions.modules,Eu=!(!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",Au=process.env.npm_config_arch||p.arch(),bu=process.env.npm_config_platform||p.platform(),yu=process.env.LIBC||(function(e){return"linux"===e&&E.existsSync("/etc/alpine-release")}(bu)?"musl":"glibc"),gu=process.env.ARM_VERSION||("arm64"===Au?"8":fu.arm_version)||"",Cu=(process.versions.uv||"").split(".")[0],wu=Fu;function Fu(e){return pu(Fu.resolve(e))}function Du(e){try{return E.readdirSync(e)}catch(e){return[]}}function Bu(e,t){var n=Du(e).filter(t);return n[0]&&C.join(e,n[0])}function Iu(e){return/\.node$/.test(e)}function Ru(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 ju(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function Su(e,t){return e.architectures.length-t.architectures.length}function _u(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function Uu(e,t){return function(n){return null!=n&&(!(n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n))&&(!(n.abi&&n.abi!==t&&!n.napi)&&((!n.uv||n.uv===Cu)&&((!n.armv||n.armv===gu)&&(!n.libc||n.libc===yu)))))}}function Pu(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}}Fu.resolve=Fu.path=function(e){e=C.resolve(e||".");try{var t=pu(C.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!mu){var n=Bu(C.join(e,"build/Release"),Iu);if(n)return n;var r=Bu(C.join(e,"build/Debug"),Iu);if(r)return r}var i=s(e);if(i)return i;var o=s(C.dirname(process.execPath));if(o)return o;var u=["platform="+bu,"arch="+Au,"runtime="+Eu,"abi="+vu,"uv="+Cu,gu?"armv="+gu:"","libc="+yu,"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 "+u+"\n loaded from: "+e+"\n");function s(e){var t=Du(C.join(e,"prebuilds")).map(Ru).filter(ju(bu,Au)).sort(Su)[0];if(t){var n=C.join(e,"prebuilds",t.name),r=Du(n).map(_u).filter(Uu(Eu,vu)).sort(Pu(Eu))[0];return r?C.join(n,r.file):void 0}}},Fu.parseTags=_u,Fu.matchTags=Uu,Fu.compareTags=Pu,Fu.parseTuple=Ru,Fu.matchTuple=ju,Fu.compareTuples=Su;var Ou=Er((function(e){const t="function"==typeof __webpack_require__?__non_webpack_require__:vr;"function"==typeof t.addon?e.exports=t.addon.bind(t):e.exports=wu}));var ku={mask:(e,t,n,r,i)=>{for(var o=0;o<i;o++)n[r+o]=e[o]^t[3&o]},unmask:(e,t)=>{const n=e.length;for(var r=0;r<n;r++)e[r]^=t[3&r]}},xu=Er((function(e){try{e.exports=Ou(__dirname)}catch(t){e.exports=ku}})),Tu=Er((function(e){const{EMPTY_BUFFER:t}=hu,n=Buffer[Symbol.species];function r(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[o]^t[3&o]}function i(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(e.exports={concat:function(e,r){if(0===e.length)return t;if(1===e.length)return e[0];const i=Buffer.allocUnsafe(r);let o=0;for(let t=0;t<e.length;t++){const n=e[t];i.set(n,o),o+=n.length}return o<r?new n(i.buffer,i.byteOffset,o):i},mask:r,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let r;return t instanceof ArrayBuffer?r=new n(t):ArrayBuffer.isView(t)?r=new n(t.buffer,t.byteOffset,t.byteLength):(r=Buffer.from(t),e.readOnly=!1),r},unmask:i},!process.env.WS_NO_BUFFER_UTIL)try{const t=xu;e.exports.mask=function(e,n,i,o,u){u<48?r(e,n,i,o,u):t.mask(e,n,i,o,u)},e.exports.unmask=function(e,n){e.length<32?i(e,n):t.unmask(e,n)}}catch(e){}}));Tu.concat,Tu.mask,Tu.toArrayBuffer,Tu.toBuffer,Tu.unmask;const Lu=Symbol("kDone"),Nu=Symbol("kRun");var qu=class{constructor(e){this[Lu]=()=>{this.pending--,this[Nu]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Nu]()}[Nu](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[Lu])}}};const{kStatusCode:Mu}=hu,Gu=Buffer[Symbol.species],zu=Buffer.from([0,0,255,255]),$u=Symbol("permessage-deflate"),Wu=Symbol("total-length"),Ju=Symbol("callback"),Vu=Symbol("buffers"),Hu=Symbol("error");let Zu;var Yu=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,!Zu){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Zu=new qu(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[Ju];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){Zu.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){Zu.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]?h.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=h.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[$u]=this,this._inflate[Wu]=0,this._inflate[Vu]=[],this._inflate.on("error",Qu),this._inflate.on("data",Xu)}this._inflate[Ju]=n,this._inflate.write(e),t&&this._inflate.write(zu),this._inflate.flush((()=>{const e=this._inflate[Hu];if(e)return this._inflate.close(),this._inflate=null,void n(e);const i=Tu.concat(this._inflate[Vu],this._inflate[Wu]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Wu]=0,this._inflate[Vu]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,i)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?h.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=h.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[Wu]=0,this._deflate[Vu]=[],this._deflate.on("data",Ku)}this._deflate[Ju]=n,this._deflate.write(e),this._deflate.flush(h.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=Tu.concat(this._deflate[Vu],this._deflate[Wu]);t&&(e=new Gu(e.buffer,e.byteOffset,e.length-4)),this._deflate[Ju]=null,this._deflate[Wu]=0,this._deflate[Vu]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function Ku(e){this[Vu].push(e),this[Wu]+=e.length}function Xu(e){this[Wu]+=e.length,this[$u]._maxPayload<1||this[Wu]<=this[$u]._maxPayload?this[Vu].push(e):(this[Hu]=new RangeError("Max payload size exceeded"),this[Hu].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Hu][Mu]=1009,this.removeListener("data",Xu),this.reset())}function Qu(e){this[$u]._inflate=null,this[Hu]?this[Ju](this[Hu]):(e[Mu]=1007,this[Ju](e))}var es=function(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0},ts=Er((function(e){try{e.exports=Ou(__dirname)}catch(t){e.exports=es}})),ns=Er((function(e){const{isUtf8:t}=R,{hasBlob:n}=hu;function r(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}else n++;return!0}if(e.exports={isBlob:function(e){return n&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:r,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},t)e.exports.isValidUTF8=function(e){return e.length<24?r(e):t(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const t=ts;e.exports.isValidUTF8=function(e){return e.length<32?r(e):t(e)}}catch(e){}}));ns.isBlob,ns.isValidStatusCode,ns.isValidUTF8,ns.tokenChars;const{Writable:rs}=o,{BINARY_TYPES:is,EMPTY_BUFFER:os,kStatusCode:us,kWebSocket:ss}=hu,{concat:as,toArrayBuffer:cs,unmask:ds}=Tu,{isValidStatusCode:ls,isValidUTF8:hs}=ns,ps=Buffer[Symbol.species];var fs=class extends rs{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||is[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[ss]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=new ps(t.buffer,t.byteOffset+e,t.length-e),new ps(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new ps(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do{switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(48&t[0]){return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~t[0]);if(!n||this._extensions[Yu.extensionName]){if(this._fin=!(128&~t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"))}this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=!(128&~t[1]),this._isServer){if(!this._masked){return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}else{e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=os;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])&&ds(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else{if(this._compressed)return this._state=5,void this.decompress(t,e);t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}}decompress(e,t){this._extensions[Yu.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void t(e)}this._fragments.push(n)}this.dataMessage(t),0===this._state&&this.startLoop(t)}))}dataMessage(e){if(!this._fin)return void(this._state=0);const t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?as(n,t):"arraybuffer"===this._binaryType?cs(as(n,t)):"blob"===this._binaryType?new Blob(n):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(e)})))}else{const r=as(n,t);if(!this._skipUTF8Validation&&!hs(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(e)})))}}controlMessage(e,t){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)})));else{if(0===e.length)this._loop=!1,this.emit("conclude",1005,os),this.end();else{const n=e.readUInt16BE(0);if(!ls(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new ps(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!hs(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;const o=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=i,o[us]=r,o}};const{randomFillSync:ms}=I,{EMPTY_BUFFER:vs,kWebSocket:Es,NOOP:As}=hu,{isBlob:bs,isValidStatusCode:ys}=ns,{mask:gs,toBuffer:Cs}=Tu,ws=Symbol("kByteLength"),Fs=Buffer.alloc(4),Ds=8192;let Bs,Is=Ds;class Rs{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=As,this[Es]=void 0}static frame(e,t){let n,r,i=!1,o=2,u=!1;t.mask&&(n=t.maskBuffer||Fs,t.generateMask?t.generateMask(n):(Is===Ds&&(void 0===Bs&&(Bs=Buffer.alloc(Ds)),ms(Bs,0,Ds),Is=0),n[0]=Bs[Is++],n[1]=Bs[Is++],n[2]=Bs[Is++],n[3]=Bs[Is++]),u=0===(n[0]|n[1]|n[2]|n[3]),o=6),"string"==typeof e?r=t.mask&&!u||void 0===t[ws]?(e=Buffer.from(e)).length:t[ws]:(r=e.length,i=t.mask&&t.readOnly&&!u);let s=r;r>=65536?(o+=8,s=127):r>125&&(o+=2,s=126);const a=Buffer.allocUnsafe(i?r+o:o);return a[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(a[0]|=64),a[1]=s,126===s?a.writeUInt16BE(r,2):127===s&&(a[2]=a[3]=0,a.writeUIntBE(r,4,6)),t.mask?(a[1]|=128,a[o-4]=n[0],a[o-3]=n[1],a[o-2]=n[2],a[o-1]=n[3],u?[a,e]:i?(gs(e,n,a,o,r),[a]):(gs(e,n,e,0,r),[a,e])):[a,e]}close(e,t,n,r){let i;if(void 0===e)i=vs;else{if("number"!=typeof e||!ys(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==t&&t.length){const n=Buffer.byteLength(t);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+n),i.writeUInt16BE(e,0),"string"==typeof t?i.write(t,2):i.set(t,2)}else i=Buffer.allocUnsafe(2),i.writeUInt16BE(e,0)}const o={[ws]:i.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,i,!1,o,r]):this.sendFrame(Rs.frame(i,o),r)}ping(e,t,n){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):bs(e)?(r=e.size,i=!1):(r=(e=Cs(e)).length,i=Cs.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[ws]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};bs(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,o,n]):this.getBlobData(e,!1,o,n):0!==this._state?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(Rs.frame(e,o),n)}pong(e,t,n){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):bs(e)?(r=e.size,i=!1):(r=(e=Cs(e)).length,i=Cs.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[ws]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};bs(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,o,n]):this.getBlobData(e,!1,o,n):0!==this._state?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(Rs.frame(e,o),n)}send(e,t,n){const r=this._extensions[Yu.extensionName];let i,o,u=t.binary?2:1,s=t.compress;"string"==typeof e?(i=Buffer.byteLength(e),o=!1):bs(e)?(i=e.size,o=!1):(i=(e=Cs(e)).length,o=Cs.readOnly),this._firstFragment?(this._firstFragment=!1,s&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=i>=r._threshold),this._compress=s):(s=!1,u=0),t.fin&&(this._firstFragment=!0);const a={[ws]:i,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:o,rsv1:s};bs(e)?0!==this._state?this.enqueue([this.getBlobData,e,this._compress,a,n]):this.getBlobData(e,this._compress,a,n):0!==this._state?this.enqueue([this.dispatch,e,this._compress,a,n]):this.dispatch(e,this._compress,a,n)}getBlobData(e,t,n,r){this._bufferedBytes+=n[ws],this._state=2,e.arrayBuffer().then((e=>{if(this._socket.destroyed){const e=new Error("The socket was closed while the blob was being read");return void process.nextTick(Ss,this,e,r)}this._bufferedBytes-=n[ws];const i=Cs(e);t?this.dispatch(i,t,n,r):(this._state=0,this.sendFrame(Rs.frame(i,n),r),this.dequeue())})).catch((e=>{process.nextTick(_s,this,e,r)}))}dispatch(e,t,n,r){if(!t)return void this.sendFrame(Rs.frame(e,n),r);const i=this._extensions[Yu.extensionName];this._bufferedBytes+=n[ws],this._state=1,i.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){Ss(this,new Error("The socket was closed while data was being compressed"),r)}else this._bufferedBytes-=n[ws],this._state=0,n.readOnly=!1,this.sendFrame(Rs.frame(t,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][ws],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][ws],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 js=Rs;function Ss(e,t,n){"function"==typeof n&&n(t);for(let n=0;n<e._queue.length;n++){const r=e._queue[n],i=r[r.length-1];"function"==typeof i&&i(t)}}function _s(e,t,n){Ss(e,t,n),e.onerror(t)}const{kForOnEventAttribute:Us,kListener:Ps}=hu,Os=Symbol("kCode"),ks=Symbol("kData"),xs=Symbol("kError"),Ts=Symbol("kMessage"),Ls=Symbol("kReason"),Ns=Symbol("kTarget"),qs=Symbol("kType"),Ms=Symbol("kWasClean");class Gs{constructor(e){this[Ns]=null,this[qs]=e}get target(){return this[Ns]}get type(){return this[qs]}}Object.defineProperty(Gs.prototype,"target",{enumerable:!0}),Object.defineProperty(Gs.prototype,"type",{enumerable:!0});class zs extends Gs{constructor(e,t={}){super(e),this[Os]=void 0===t.code?0:t.code,this[Ls]=void 0===t.reason?"":t.reason,this[Ms]=void 0!==t.wasClean&&t.wasClean}get code(){return this[Os]}get reason(){return this[Ls]}get wasClean(){return this[Ms]}}Object.defineProperty(zs.prototype,"code",{enumerable:!0}),Object.defineProperty(zs.prototype,"reason",{enumerable:!0}),Object.defineProperty(zs.prototype,"wasClean",{enumerable:!0});class $s extends Gs{constructor(e,t={}){super(e),this[xs]=void 0===t.error?null:t.error,this[Ts]=void 0===t.message?"":t.message}get error(){return this[xs]}get message(){return this[Ts]}}Object.defineProperty($s.prototype,"error",{enumerable:!0}),Object.defineProperty($s.prototype,"message",{enumerable:!0});class Ws extends Gs{constructor(e,t={}){super(e),this[ks]=void 0===t.data?null:t.data}get data(){return this[ks]}}Object.defineProperty(Ws.prototype,"data",{enumerable:!0});const Js={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[Us]&&r[Ps]===t&&!r[Us])return;let r;if("message"===e)r=function(e,n){const r=new Ws("message",{data:n?e:e.toString()});r[Ns]=this,Hs(t,this,r)};else if("close"===e)r=function(e,n){const r=new zs("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Ns]=this,Hs(t,this,r)};else if("error"===e)r=function(e){const n=new $s("error",{error:e,message:e.message});n[Ns]=this,Hs(t,this,n)};else{if("open"!==e)return;r=function(){const e=new Gs("open");e[Ns]=this,Hs(t,this,e)}}r[Us]=!!n[Us],r[Ps]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[Ps]===t&&!n[Us]){this.removeListener(e,n);break}}};var Vs={CloseEvent:zs,ErrorEvent:$s,Event:Gs,EventTarget:Js,MessageEvent:Ws};function Hs(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:Zs}=ns;function Ys(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var Ks={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,r,i=Object.create(null),o=!1,u=!1,s=!1,a=-1,c=-1,d=-1,l=0;for(;l<e.length;l++)if(c=e.charCodeAt(l),void 0===n)if(-1===d&&1===Zs[c])-1===a&&(a=l);else if(0===l||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(a,d);44===c?(Ys(t,r,i),i=Object.create(null)):n=r,a=d=-1}}else-1===d&&-1!==a&&(d=l);else if(void 0===r)if(-1===d&&1===Zs[c])-1===a&&(a=l);else if(32===c||9===c)-1===d&&-1!==a&&(d=l);else if(59===c||44===c){if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),Ys(i,e.slice(a,d),!0),44===c&&(Ys(t,n,i),i=Object.create(null),n=void 0),a=d=-1}else{if(61!==c||-1===a||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(a,l),a=d=-1}else if(u){if(1!==Zs[c])throw new SyntaxError(`Unexpected character at index ${l}`);-1===a?a=l:o||(o=!0),u=!1}else if(s)if(1===Zs[c])-1===a&&(a=l);else if(34===c&&-1!==a)s=!1,d=l;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${l}`);u=!0}else if(34===c&&61===e.charCodeAt(l-1))s=!0;else if(-1===d&&1===Zs[c])-1===a&&(a=l);else if(-1===a||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let u=e.slice(a,d);o&&(u=u.replace(/\\/g,""),o=!1),Ys(i,r,u),44===c&&(Ys(t,n,i),i=Object.create(null),n=void 0),r=void 0,a=d=-1}}else-1===d&&(d=l);if(-1===a||s||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const h=e.slice(a,d);return void 0===n?Ys(t,h,i):(void 0===r?Ys(i,h,!0):Ys(i,r,o?h.replace(/\\/g,""):h),Ys(t,n,i)),t}};const{randomBytes:Xs,createHash:Qs}=I,{URL:ea}=a,{isBlob:ta}=ns,{BINARY_TYPES:na,EMPTY_BUFFER:ra,GUID:ia,kForOnEventAttribute:oa,kListener:ua,kStatusCode:sa,kWebSocket:aa,NOOP:ca}=hu,{EventTarget:{addEventListener:da,removeEventListener:la}}=Vs,{format:ha,parse:pa}=Ks,{toBuffer:fa}=Tu,ma=Symbol("kAborted"),va=[8,13],Ea=["CONNECTING","OPEN","CLOSING","CLOSED"],Aa=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class ba extends e{constructor(e,t,n){super(),this._binaryType=na[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ra,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=ba.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]),ga(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){na.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 fs({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),i=new js(e,this._extensions,n.generateMask);this._receiver=r,this._sender=i,this._socket=e,r[aa]=this,i[aa]=this,e[aa]=this,r.on("conclude",Ia),r.on("drain",Ra),r.on("error",ja),r.on("message",_a),r.on("ping",Ua),r.on("pong",Pa),i.onerror=ka,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ta),e.on("data",La),e.on("end",Na),e.on("error",qa),this._readyState=ba.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=ba.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[Yu.extensionName]&&this._extensions[Yu.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=ba.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==ba.CLOSED)if(this.readyState!==ba.CONNECTING)this.readyState!==ba.CLOSING?(this._readyState=ba.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),xa(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";Da(this,this._req,e)}}pause(){this.readyState!==ba.CONNECTING&&this.readyState!==ba.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===ba.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===ba.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||ra,t,n)):Ba(this,e,n)}pong(e,t,n){if(this.readyState===ba.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===ba.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||ra,t,n)):Ba(this,e,n)}resume(){this.readyState!==ba.CONNECTING&&this.readyState!==ba.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===ba.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!==ba.OPEN)return void Ba(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Yu.extensionName]||(r.compress=!1),this._sender.send(e||ra,r,n)}terminate(){if(this.readyState!==ba.CLOSED)if(this.readyState!==ba.CONNECTING)this._socket&&(this._readyState=ba.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";Da(this,this._req,e)}}}Object.defineProperty(ba,"CONNECTING",{enumerable:!0,value:Ea.indexOf("CONNECTING")}),Object.defineProperty(ba.prototype,"CONNECTING",{enumerable:!0,value:Ea.indexOf("CONNECTING")}),Object.defineProperty(ba,"OPEN",{enumerable:!0,value:Ea.indexOf("OPEN")}),Object.defineProperty(ba.prototype,"OPEN",{enumerable:!0,value:Ea.indexOf("OPEN")}),Object.defineProperty(ba,"CLOSING",{enumerable:!0,value:Ea.indexOf("CLOSING")}),Object.defineProperty(ba.prototype,"CLOSING",{enumerable:!0,value:Ea.indexOf("CLOSING")}),Object.defineProperty(ba,"CLOSED",{enumerable:!0,value:Ea.indexOf("CLOSED")}),Object.defineProperty(ba.prototype,"CLOSED",{enumerable:!0,value:Ea.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(ba.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(ba.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[oa])return t[ua];return null},set(t){for(const t of this.listeners(e))if(t[oa]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[oa]:!0})}})})),ba.prototype.addEventListener=da,ba.prototype.removeEventListener=la;var ya=ba;function ga(e,t,n,r){const i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:va[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=i.autoPong,!va.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${va.join(", ")})`);let o;if(t instanceof ea)o=t;else try{o=new ea(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===o.protocol?o.protocol="ws:":"https:"===o.protocol&&(o.protocol="wss:"),e._url=o.href;const u="wss:"===o.protocol,a="ws+unix:"===o.protocol;let c;if("ws:"===o.protocol||u||a?a&&!o.pathname?c="The URL's pathname is empty":o.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',c){const t=new SyntaxError(c);if(0===e._redirects)throw t;return void Ca(e,t)}const l=u?443:80,h=Xs(16).toString("base64"),p=u?d.request:s.request,f=new Set;let m,v;if(i.createConnection=i.createConnection||(u?Fa:wa),i.defaultPort=i.defaultPort||l,i.port=o.port||l,i.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=o.pathname+o.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(m=new Yu(!0!==i.perMessageDeflate?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=ha({[Yu.extensionName]:m.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Aa.test(e)||f.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(e)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(o.username||o.password)&&(i.auth=`${o.username}:${o.password}`),a){const e=i.path.split(":");i.socketPath=e[0],i.path=e[1]}if(i.followRedirects){if(0===e._redirects){e._originalIpc=a,e._originalSecure=u,e._originalHostOrSocketPath=a?i.socketPath:o.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&&i.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&o.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!u)&&(delete i.headers.authorization,delete i.headers.cookie,t||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),v=e._req=p(i),e._redirects&&e.emit("redirect",e.url,v)}else v=e._req=p(i);i.timeout&&v.on("timeout",(()=>{Da(e,v,"Opening handshake has timed out")})),v.on("error",(t=>{null===v||v[ma]||(v=e._req=null,Ca(e,t))})),v.on("response",(o=>{const u=o.headers.location,s=o.statusCode;if(u&&i.followRedirects&&s>=300&&s<400){if(++e._redirects>i.maxRedirects)return void Da(e,v,"Maximum redirects exceeded");let o;v.abort();try{o=new ea(u,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${u}`);return void Ca(e,n)}ga(e,o,n,r)}else e.emit("unexpected-response",v,o)||Da(e,v,`Unexpected server response: ${o.statusCode}`)})),v.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==ba.CONNECTING)return;v=e._req=null;const o=t.headers.upgrade;if(void 0===o||"websocket"!==o.toLowerCase())return void Da(e,n,"Invalid Upgrade header");const u=Qs("sha1").update(h+ia).digest("base64");if(t.headers["sec-websocket-accept"]!==u)return void Da(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"];let a;if(void 0!==s?f.size?f.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":f.size&&(a="Server sent no subprotocol"),a)return void Da(e,n,a);s&&(e._protocol=s);const c=t.headers["sec-websocket-extensions"];if(void 0!==c){if(!m){return void Da(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=pa(c)}catch(t){return void Da(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==Yu.extensionName){return void Da(e,n,"Server indicated an extension that was not requested")}try{m.accept(t[Yu.extensionName])}catch(t){return void Da(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[Yu.extensionName]=m}e.setSocket(n,r,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})})),i.finishRequest?i.finishRequest(v,e):v.end()}function Ca(e,t){e._readyState=ba.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function wa(e){return e.path=e.socketPath,m.connect(e)}function Fa(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=m.isIP(e.host)?"":e.host),B.connect(e)}function Da(e,t,n){e._readyState=ba.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Da),t.setHeader?(t[ma]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Ca,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function Ba(e,t,n){if(t){const n=ta(t)?t.size:fa(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Ea[e.readyState]})`);process.nextTick(n,t)}}function Ia(e,t){const n=this[aa];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[aa]&&(n._socket.removeListener("data",La),process.nextTick(Oa,n._socket),1005===e?n.close():n.close(e,t))}function Ra(){const e=this[aa];e.isPaused||e._socket.resume()}function ja(e){const t=this[aa];void 0!==t._socket[aa]&&(t._socket.removeListener("data",La),process.nextTick(Oa,t._socket),t.close(e[sa])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function Sa(){this[aa].emitClose()}function _a(e,t){this[aa].emit("message",e,t)}function Ua(e){const t=this[aa];t._autoPong&&t.pong(e,!this._isServer,ca),t.emit("ping",e)}function Pa(e){this[aa].emit("pong",e)}function Oa(e){e.resume()}function ka(e){const t=this[aa];t.readyState!==ba.CLOSED&&(t.readyState===ba.OPEN&&(t._readyState=ba.CLOSING,xa(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function xa(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),3e4)}function Ta(){const e=this[aa];let t;this.removeListener("close",Ta),this.removeListener("data",La),this.removeListener("end",Na),e._readyState=ba.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[aa]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",Sa),e._receiver.on("finish",Sa))}function La(e){this[aa]._receiver.write(e)||this.pause()}function Na(){const e=this[aa];e._readyState=ba.CLOSING,e._receiver.end(),this.end()}function qa(){const e=this[aa];this.removeListener("error",qa),this.on("error",ca),e&&(e._readyState=ba.CLOSING,this.destroy())}const{Duplex:Ma}=o;function Ga(e){e.emit("close")}function za(){!this.destroyed&&this._writableState.finished&&this.destroy()}function $a(e){this.removeListener("error",$a),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Wa=function(e,t){let n=!0;const r=new Ma({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,n){const i=!n&&r._readableState.objectMode?t.toString():t;r.push(i)||e.pause()})),e.once("error",(function(e){r.destroyed||(n=!1,r.destroy(e))})),e.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(t,i){if(e.readyState===e.CLOSED)return i(t),void process.nextTick(Ga,r);let o=!1;e.once("error",(function(e){o=!0,i(e)})),e.once("close",(function(){o||i(t),process.nextTick(Ga,r)})),n&&e.terminate()},r._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){r._final(t)}))},r._read=function(){e.isPaused&&e.resume()},r._write=function(t,n,i){e.readyState!==e.CONNECTING?e.send(t,i):e.once("open",(function(){r._write(t,n,i)}))},r.on("end",za),r.on("error",$a),r},Ja=function(e){function t(t,n,r,i,o,u){void 0===u&&(u=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=i,s.agent=o,s.closeTimeout=u,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=f.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=Gt(t=e))&&sr.test(t)?t.replace(ur,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return $(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return J(this,void 0,void 0,(function(){var e=this;return V(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,i=n.address;e.tcpServer.listen(r,i,(function(){e.emit("tunnel-open",{address:i,port:r}),t({address:i,port:r})}))}else e.tcpServer.listen(0,(function(){var n=e.tcpServer.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:o,port:i},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return J(this,void 0,void 0,(function(){var e,t=this;return V(this,(function(n){switch(n.label){case 0:return e=!1,[4,Promise.race([new Promise((function(n){t.tcpServer.close((function(){e=!0,t.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(e){return setTimeout(e,t.closeTimeout)})).then((function(){e||(t.openConnections.forEach((function(e){e.destroy(),t.openConnections.delete(e)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},t.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=this.endpoint.replace("https:","wss:"),r=new ya(n,{headers:this.headers,agent:this.agent}),i=Wa(r),o=this.getHeaderTransform();this.rewriteHostHeader&&o?cu(e,o,i):cu(e,i),cu(i,e),r.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),i.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t.prototype.getHeaderTransform=function(){var e=function(e,t,n){var r=Buffer.from(n),i=Buffer.from(e);return t.forEach((function(e){i=function(e,t,n){var r=Buffer.from(t),i=e.indexOf(r);if(-1===i)return e;var o=e.subarray(0,i),u=e.subarray(i+r.length);return Buffer.concat([o,n,u])}(i,e,r)})),i};if(this.rewriteHostHeader){var t=this.rewriteHostHeader,n=t.targetHostname,r=t.altHostnames,i=this.hostRegex;return new u({transform:function(t,o,u){var s=t.toString();if(s.split("\n",1)[0].includes("HTTP")&&i.test(s)){var a=r.map((function(e){return"Host: ".concat(e)}));u(null,e(t,a,"Host: ".concat(n)))}else u(null,t)}})}},t}(t),Va=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.endpoint=t,o.headers=n,o.bindToAssign=r,o.agent=i,o.protocol="UDP",o.udpSocket=S.createSocket("udp4"),o.handleConnection(),o}return $(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return J(this,void 0,void 0,(function(){var e=this;return V(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,i=n.address;e.udpSocket.bind(r,i,(function(){e.emit("tunnel-open",{address:i,port:r}),t({address:i,port:r})}))}else e.udpSocket.bind(0,(function(){var n=e.udpSocket.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:o,port:i},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return J(this,void 0,void 0,(function(){var e=this;return V(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){e.udpSocket.close((function(){e.emit("tunnel-close"),t()}))}))];case 1:return t.sent(),[2]}}))}))},t.prototype.handleConnection=function(){var e,t=this,n=this.endpoint.replace("https:","wss:"),r=new ya(n,{headers:this.headers,agent:this.agent}),i=Wa(r);this.udpSocket.on("message",(function(t,n){e=n,i.write(t)})),i.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)})),i.on("error",(function(e){t.emit("connection-error",e)})),r.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(t),Ha=function(e){function t(t,r,i,o){var u=e.call(this)||this;return u.contextProvider=t,u.listServices=r,u.listAddons=i,u.agent=o,u.connections=[],u.hostsFileMutex=new Vo,u.ipAllocationMutex=new Vo,u.stopForwarding=function(e){return J(u,void 0,void 0,(function(){var t,n,r,i,o,u,s;return V(this,(function(a){switch(a.label){case 0:return[4,e.tunnel.close()];case 1:return a.sent(),t=e.forwardingContext,n=t.projectId,r=t.type,i=t.id,o=t.hostnames,u=t.ipOnly,o.length>0&&!u?[4,this.unregisterHostnames(null===(s=e.tunnel.bindTo)||void 0===s?void 0:s.address,o)]:[3,3];case 2:a.sent(),a.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(e){var t=e.forwardingContext,o=t.type,u=t.id,s=t.projectId;return u===i&&s===n&&o===r})),1),[2]}}))}))},u.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 n("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return n("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},u.assertStartedWithNodejs=function(){if(!go)throw new Error("Port forwarding only possible when started with nodejs")},u.proxyApiClient=new Bo(t,o),u}return $(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),J(this,void 0,void 0,(function(){var r;return V(this,(function(i){switch(i.label){case 0:return[4,this.forwardProject(e,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopProjectForwarding(e)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardProject=function(e,t){return void 0===t&&(t=!0),J(this,void 0,void 0,(function(){var n,r,i,o,u,s=this;return V(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=a.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return i=a.sent(),[4,Promise.all(r.data.services.map((function(e){return J(s,void 0,void 0,(function(){return V(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return o=a.sent(),[4,Promise.all(i.data.addons.map((function(e){return J(s,void 0,void 0,(function(){return V(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 u=a.sent(),[2,{services:o,addons:u}]}}))}))},t.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),J(this,void 0,void 0,(function(){var r;return V(this,(function(i){switch(i.label){case 0:return[4,this.forwardService(e,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopServiceForwarding(e)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardService=function(e,t){return void 0===t&&(t=!0),J(this,void 0,void 0,(function(){var n,r,i,o,u,s,a,c=this;return V(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,r=e.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return i=d.sent(),o=i.namespace,u=i.targetDomain,s=i.instances,a=i.ports,0===s.length?[2,[]]:[4,Fo(a,(function(e){var i,a="https://".concat(u,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(s[0].podName,"/port/").concat(e.internalPort),d="".concat(r,".").concat(o,".svc.cluster.local"),l=["".concat(r)];e.name&&l.push("".concat(e.name,".").concat(r)),"HTTP"===e.protocol&&(i={altHostnames:l,targetHostname:d});var h=H([d],l,!0);return c.forwardPort(a,e,h,"service",r,n,t,i)}))];case 2:return[2,d.sent()]}}))}))},t.prototype.withAddonForwarding=function(e,t,n){return void 0===n&&(n=!0),J(this,void 0,void 0,(function(){var r;return V(this,(function(i){switch(i.label){case 0:return[4,this.forwardAddon(e,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopAddonForwarding(e)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardAddon=function(e,t){return void 0===t&&(t=!0),J(this,void 0,void 0,(function(){var n,r,i,o,u=this;return V(this,(function(s){switch(s.label){case 0:return this.assertStartedWithNodejs(),n=e.addonId,r=e.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return i=s.sent(),o=i.instances.map((function(e){var t=e.podName,n=e.internalHostname;return e.ports.map((function(e){return{podName:t,internalHostname:n,port:e}}))})),[4,Fo((a=o,null!=a&&a.length?Zt(a,dr):[]),(function(e){var o=e.podName,s=e.internalHostname,a=e.port;return J(u,void 0,void 0,(function(){var e;return V(this,(function(u){return e="https://".concat(i.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(o,"/port/").concat(a.internalPort),[2,this.forwardPort(e,a,[s],"addon",n,r,t)]}))}))}))];case 2:return[2,s.sent()]}var a}))}))},t.prototype.allocateIpAddress=function(e){return J(this,void 0,void 0,(function(){var t=this;return V(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return J(t,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){switch(u.label){case 0:return t="127.24.1.1",n="127.24.255.255",r=null!==(o=this.nextIpAddress)&&void 0!==o?o:t,[4,Io(e,r,n)];case 1:return i=u.sent(),this.nextIpAddress=_o(So(i)+1),So(this.nextIpAddress)>So(n)&&(this.nextIpAddress=t),[2,i]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,i,o,u,s){var a;return void 0===u&&(u=!0),J(this,void 0,void 0,(function(){var c,d,l,h,p,f,m=this;return V(this,(function(v){switch(v.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!u&&(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(o,i,n,r,t,u)];case 1:return l=v.sent(),h="UDP"===t.protocol?new Va(e,c,l,this.agent):new Ja(e,c,s,l,this.agent),u?[3,3]:[4,this.registerHostnames(null===(a=h.bindTo)||void 0===a?void 0:a.address,n)];case 2:v.sent(),v.label=3;case 3:return h.on("connection-accept",(function(){return m.emit("connection-accept",h)})),h.on("connection-close",(function(){return J(m,void 0,void 0,(function(){return V(this,(function(e){return[2,this.emit("connection-close",h)]}))}))})),[4,h.open()];case 4:return p=v.sent(),f={projectId:o,id:i,type:r,hostnames:n,ipOnly:u,port:p.port,address:p.address,protocol:t.protocol,portName:t.name},this.emit("tunnel-open",h,f),h.on("connection-error",(function(e){return m.emit("connection-error",h,f,e)})),h.on("tunnel-close",(function(){return m.emit("tunnel-close",h,f)})),this.connections.push({tunnel:h,forwardingContext:f}),[2,{data:f}]}}))}))},t.prototype.determineSocketAddress=function(e,t,n,r,i,o){return J(this,void 0,void 0,(function(){var u,s,a;return V(this,(function(c){switch(c.label){case 0:return o&&"darwin"===p.platform()?[2,void 0]:(u=this.connections.filter((function(n){return n.forwardingContext.projectId===e&&n.forwardingContext.id===t&&n.forwardingContext.type===r})),(s=null==u?void 0:u.find((function(e){return n.find((function(t){return e.forwardingContext.hostnames.includes(t)}))})))?[2,{address:null==s?void 0:s.forwardingContext.address,port:i.internalPort}]:(a={},[4,this.allocateIpAddress(i.internalPort)]));case 1:return[2,(a.address=c.sent(),a.port=i.internalPort,a)]}}))}))},t.prototype.registerHostnames=function(e,t){return J(this,void 0,void 0,(function(){return V(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,H([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return J(this,void 0,void 0,(function(){return V(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,H([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return J(this,void 0,void 0,(function(){var t=this;return V(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return J(t,void 0,void 0,(function(){var t,n=this;return V(this,(function(r){switch(r.label){case 0:return[4,Jo.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,Za(5)((function(){return J(n,void 0,void 0,(function(){return V(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,Za(5)((function(){return J(n,void 0,void 0,(function(){return V(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 J(this,void 0,void 0,(function(){var t=this;return V(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 J(this,void 0,void 0,(function(){var t=this;return V(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 J(this,void 0,void 0,(function(){var t=this;return V(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 J(this,void 0,void 0,(function(){var e=this;return V(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return J(e,void 0,void 0,(function(){return V(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(t),Za=function(e,t){return void 0===t&&(t=50),function(n){var r=e,i=function(){return J(void 0,void 0,void 0,(function(){var e;return V(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,4]),[4,n()];case 1:return[2,o.sent()];case 2:if(e=o.sent(),r<=0)throw e;return r-=1,[4,new Promise((function(e){return setTimeout((function(){return e()}),t)}))];case 3:return o.sent(),[2,i()];case 4:return[2]}}))}))};return i()}},Ya=function(e){function t(t,n,r,o,u,s,a){void 0===u&&(u=new i.PassThrough),void 0===s&&(s=new i.PassThrough),void 0===a&&(a=new i.PassThrough);var c=e.call(this)||this;return c.baseUrl=t,c.execConfig=n,c.token=r,c.agent=o,c.stdOut=u,c.stdErr=s,c.stdIn=a,c.waitForCommandResult=function(){return J(c,void 0,void 0,(function(){return V(this,(function(e){switch(e.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,e.sent()]}}))}))},c.sendInputToCurrentCommand=function(e){return J(c,void 0,void 0,(function(){var t;return V(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(t=this.duplex)||void 0===t||t.write(this.constructPayloadPacket(e)),[2]}))}))},c.resizeTerminal=function(e){return J(c,void 0,void 0,(function(){var t;return V(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(t=this.duplex)||void 0===t||t.write(JSON.stringify({type:"resize",data:{ttyRows:null==e?void 0:e.rows,ttyColumns:null==e?void 0:e.columns}})),[2]}))}))},c.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},c.stdInEndPacket=JSON.stringify({type:"stdInEnd"}),c}return $(t,e),Object.defineProperty(t.prototype,"execEndpoint",{get:function(){var e=this.execConfig,t=e.entityId,n=e.entityType,r=e.projectId,i="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(i).concat(function(){switch(n){case"service":return"services/".concat(t);case"job":return"jobs/".concat(t);case"addon":return"addons/".concat(t);case"build":return"builds/".concat(t);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),t.prototype.start=function(){return J(this,void 0,void 0,(function(){var e=this;return V(this,(function(t){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(t,n){var r,i,o;void 0!==e.remote&&n(Error("Command is already running"));var u,s=e.execEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new ya(s,{agent:e.agent});try{e.duplex=Wa(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)))})),e.stdIn.on("end",(function(){var t,n;(null===(t=e.duplex)||void 0===t?void 0:t.writable)&&(null===(n=e.duplex)||void 0===n||n.write(e.stdInEndPacket))})),null===(r=e.duplex)||void 0===r||r.on("data",(function(t){var n,r,i,o,s,c=JSON.parse(t.toString());switch(null==c?void 0:c.type){case"init":var d=c.data;"successful"!==d.auth?a("Command initialization failed: ".concat(null!==(n=null==d?void 0:d.message)&&void 0!==n?n:"Reason unknown")):e.emit("auth-success",u);break;case"completion":u=c.data,e.emit("command-result",u),null===(r=e.duplex)||void 0===r||r.end();break;case"stdOut":e.emit("std-out-data",c.data),e.stdOut.write(c.data,null===(i=e.execConfig)||void 0===i?void 0:i.encoding);break;case"stdErr":e.emit("std-err-data",c.data),e.stdErr.write(c.data,null===(o=e.execConfig)||void 0===o?void 0:o.encoding);break;case"error":a(null===(s=c.data)||void 0===s?void 0:s.message);break;default:var l="unable to parse message: ".concat(JSON.stringify(c));a(l)}})),null===(i=e.duplex)||void 0===i||i.on("end",(function(){e.emit("command-completed"),e.reset(),t(u)})),null===(o=e.duplex)||void 0===o||o.on("error",(function(n){e.emit("error",n),e.emit("command-completed"),e.reset(),t(u)}));var a=function(t){e.emit("error",t),e.reset(),n(new Error(t))};e.emit("command-started")})),[2,this.currentCommand]}))}))},t.prototype.initialAuth=function(){var e,t=this.execConfig,n=t.command,r=t.containerName,i=t.shell,o=t.user,u=t.group,s=t.encoding,a=t.tty,c=t.ttyColumns,d=t.ttyRows,l={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:i,user:o,group:u,encoding:s,tty:a,ttyColumns:c,ttyRows:d}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(l))},t.prototype.reset=function(){var e;this.remote=void 0,this.currentCommand=void 0,null===(e=this.duplex)||void 0===e||e.destroy(),this.duplex=void 0},t}(t),Ka=function(){function e(e,t){this.contextProvider=e,this.agent=t,this.assertStartedWithNodejs=function(){if(!go)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){return n=e.serviceId,r=e.projectId,i=W({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(i)]}))}))},e.prototype.execServiceSession=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=e.serviceId,r=e.projectId,i=W({projectId:r,entityId:n,entityType:"service"},t),[4,this.shellSession(i)];case 1:return[2,o.sent()]}}))}))},e.prototype.execJobCommand=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){return n=e.jobId,r=e.projectId,i=W({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(i)]}))}))},e.prototype.execJobSession=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=e.jobId,r=e.projectId,i=W({projectId:r,entityId:n,entityType:"job"},t),[4,this.shellSession(i)];case 1:return[2,o.sent()]}}))}))},e.prototype.execCommand=function(e){return J(this,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){switch(i.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(W({shell:"none"},e)),n=new Do,r=new Do,t.stdOut.pipe(n),t.stdErr.pipe(r),t.on("error",(function(e){throw new Error(e)})),[4,t.start()];case 1:return[2,{commandResult:i.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},e.prototype.shellSession=function(e){return J(this,void 0,void 0,(function(){var t,n;return V(this,(function(r){switch(r.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(e),n=new Promise((function(e){t.on("auth-success",(function(){e()}))})),t.start(),[4,n];case 1:return r.sent(),[2,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 Ya(t,e,n,this.agent)},e}();const Xa="object"==typeof process&&process?process:{stdout:null,stderr:null},Qa=e=>!!e&&"object"==typeof e&&(e instanceof Tc||e instanceof U||ec(e)||tc(e)),ec=e=>!!e&&"object"==typeof e&&e instanceof _&&"function"==typeof e.pipe&&e.pipe!==U.Writable.prototype.pipe,tc=e=>!!e&&"object"==typeof e&&e instanceof _&&"function"==typeof e.write&&"function"==typeof e.end,nc=Symbol("EOF"),rc=Symbol("maybeEmitEnd"),ic=Symbol("emittedEnd"),oc=Symbol("emittingEnd"),uc=Symbol("emittedError"),sc=Symbol("closed"),ac=Symbol("read"),cc=Symbol("flush"),dc=Symbol("flushChunk"),lc=Symbol("encoding"),hc=Symbol("decoder"),pc=Symbol("flowing"),fc=Symbol("paused"),mc=Symbol("resume"),vc=Symbol("buffer"),Ec=Symbol("pipes"),Ac=Symbol("bufferLength"),bc=Symbol("bufferPush"),yc=Symbol("bufferShift"),gc=Symbol("objectMode"),Cc=Symbol("destroyed"),wc=Symbol("error"),Fc=Symbol("emitData"),Dc=Symbol("emitEnd"),Bc=Symbol("emitEnd2"),Ic=Symbol("async"),Rc=Symbol("abort"),jc=Symbol("aborted"),Sc=Symbol("signal"),_c=Symbol("dataListeners"),Uc=Symbol("discarded"),Pc=e=>Promise.resolve().then(e),Oc=e=>e();class kc{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[mc](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class xc extends kc{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit("error",e),e.on("error",this.proxyErrors)}}class Tc extends _{[pc]=!1;[fc]=!1;[Ec]=[];[vc]=[];[gc];[lc];[Ic];[hc];[nc]=!1;[ic]=!1;[oc]=!1;[sc]=!1;[uc]=null;[Ac]=0;[Cc]=!1;[Sc];[jc]=!1;[_c]=0;[Uc]=!1;writable=!0;readable=!0;constructor(...e){const t=e[0]||{};if(super(),t.objectMode&&"string"==typeof t.encoding)throw new TypeError("Encoding and objectMode may not be used together");t.objectMode?(this[gc]=!0,this[lc]=null):(e=>!e.objectMode&&!!e.encoding&&"buffer"!==e.encoding)(t)?(this[lc]=t.encoding,this[gc]=!1):(this[gc]=!1,this[lc]=null),this[Ic]=!!t.async,this[hc]=this[lc]?new P(this[lc]):null,t&&!0===t.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[vc]}),t&&!0===t.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Ec]});const{signal:n}=t;n&&(this[Sc]=n,n.aborted?this[Rc]():n.addEventListener("abort",(()=>this[Rc]())))}get bufferLength(){return this[Ac]}get encoding(){return this[lc]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[gc]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ic]}set async(e){this[Ic]=this[Ic]||!!e}[Rc](){this[jc]=!0,this.emit("abort",this[Sc]?.reason),this.destroy(this[Sc]?.reason)}get aborted(){return this[jc]}set aborted(e){}write(e,t,n){if(this[jc])return!1;if(this[nc])throw new Error("write after end");if(this[Cc])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(n=t,t="utf8"),t||(t="utf8");const r=this[Ic]?Pc:Oc;if(!this[gc]&&!Buffer.isBuffer(e))if(i=e,!Buffer.isBuffer(i)&&ArrayBuffer.isView(i))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if((e=>e instanceof ArrayBuffer||!!e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e))e=Buffer.from(e);else if("string"!=typeof e)throw new Error("Non-contiguous data written to non-objectMode stream");var i;return this[gc]?(this[pc]&&0!==this[Ac]&&this[cc](!0),this[pc]?this.emit("data",e):this[bc](e),0!==this[Ac]&&this.emit("readable"),n&&r(n),this[pc]):e.length?("string"!=typeof e||t===this[lc]&&!this[hc]?.lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[lc]&&(e=this[hc].write(e)),this[pc]&&0!==this[Ac]&&this[cc](!0),this[pc]?this.emit("data",e):this[bc](e),0!==this[Ac]&&this.emit("readable"),n&&r(n),this[pc]):(0!==this[Ac]&&this.emit("readable"),n&&r(n),this[pc])}read(e){if(this[Cc])return null;if(this[Uc]=!1,0===this[Ac]||0===e||e&&e>this[Ac])return this[rc](),null;this[gc]&&(e=null),this[vc].length>1&&!this[gc]&&(this[vc]=[this[lc]?this[vc].join(""):Buffer.concat(this[vc],this[Ac])]);const t=this[ac](e||null,this[vc][0]);return this[rc](),t}[ac](e,t){if(this[gc])this[yc]();else{const n=t;e===n.length||null===e?this[yc]():"string"==typeof n?(this[vc][0]=n.slice(e),t=n.slice(0,e),this[Ac]-=e):(this[vc][0]=n.subarray(e),t=n.subarray(0,e),this[Ac]-=e)}return this.emit("data",t),this[vc].length||this[nc]||this.emit("drain"),t}end(e,t,n){return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t="utf8"),void 0!==e&&this.write(e,t),n&&this.once("end",n),this[nc]=!0,this.writable=!1,!this[pc]&&this[fc]||this[rc](),this}[mc](){this[Cc]||(this[_c]||this[Ec].length||(this[Uc]=!0),this[fc]=!1,this[pc]=!0,this.emit("resume"),this[vc].length?this[cc]():this[nc]?this[rc]():this.emit("drain"))}resume(){return this[mc]()}pause(){this[pc]=!1,this[fc]=!0,this[Uc]=!1}get destroyed(){return this[Cc]}get flowing(){return this[pc]}get paused(){return this[fc]}[bc](e){this[gc]?this[Ac]+=1:this[Ac]+=e.length,this[vc].push(e)}[yc](){return this[gc]?this[Ac]-=1:this[Ac]-=this[vc][0].length,this[vc].shift()}[cc](e=!1){do{}while(this[dc](this[yc]())&&this[vc].length);e||this[vc].length||this[nc]||this.emit("drain")}[dc](e){return this.emit("data",e),this[pc]}pipe(e,t){if(this[Cc])return e;this[Uc]=!1;const n=this[ic];return t=t||{},e===Xa.stdout||e===Xa.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[Ec].push(t.proxyErrors?new xc(this,e,t):new kc(this,e,t)),this[Ic]?Pc((()=>this[mc]())):this[mc]()),e}unpipe(e){const t=this[Ec].find((t=>t.dest===e));t&&(1===this[Ec].length?(this[pc]&&0===this[_c]&&(this[pc]=!1),this[Ec]=[]):this[Ec].splice(this[Ec].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);if("data"===e)this[Uc]=!1,this[_c]++,this[Ec].length||this[pc]||this[mc]();else if("readable"===e&&0!==this[Ac])super.emit("readable");else if((e=>"end"===e||"finish"===e||"prefinish"===e)(e)&&this[ic])super.emit(e),this.removeAllListeners(e);else if("error"===e&&this[uc]){const e=t;this[Ic]?Pc((()=>e.call(this,this[uc]))):e.call(this,this[uc])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){const n=super.off(e,t);return"data"===e&&(this[_c]=this.listeners("data").length,0!==this[_c]||this[Uc]||this[Ec].length||(this[pc]=!1)),n}removeAllListeners(e){const t=super.removeAllListeners(e);return"data"!==e&&void 0!==e||(this[_c]=0,this[Uc]||this[Ec].length||(this[pc]=!1)),t}get emittedEnd(){return this[ic]}[rc](){this[oc]||this[ic]||this[Cc]||0!==this[vc].length||!this[nc]||(this[oc]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[sc]&&this.emit("close"),this[oc]=!1)}emit(e,...t){const n=t[0];if("error"!==e&&"close"!==e&&e!==Cc&&this[Cc])return!1;if("data"===e)return!(!this[gc]&&!n)&&(this[Ic]?(Pc((()=>this[Fc](n))),!0):this[Fc](n));if("end"===e)return this[Dc]();if("close"===e){if(this[sc]=!0,!this[ic]&&!this[Cc])return!1;const e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[uc]=n,super.emit(wc,n);const e=!(this[Sc]&&!this.listeners("error").length)&&super.emit("error",n);return this[rc](),e}if("resume"===e){const e=super.emit("resume");return this[rc](),e}if("finish"===e||"prefinish"===e){const t=super.emit(e);return this.removeAllListeners(e),t}const r=super.emit(e,...t);return this[rc](),r}[Fc](e){for(const t of this[Ec])!1===t.dest.write(e)&&this.pause();const t=!this[Uc]&&super.emit("data",e);return this[rc](),t}[Dc](){return!this[ic]&&(this[ic]=!0,this.readable=!1,this[Ic]?(Pc((()=>this[Bc]())),!0):this[Bc]())}[Bc](){if(this[hc]){const e=this[hc].end();if(e){for(const t of this[Ec])t.dest.write(e);this[Uc]||super.emit("data",e)}}for(const e of this[Ec])e.end();const e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){const e=Object.assign([],{dataLength:0});this[gc]||(e.dataLength=0);const t=this.promise();return this.on("data",(t=>{e.push(t),this[gc]||(e.dataLength+=t.length)})),await t,e}async concat(){if(this[gc])throw new Error("cannot concat in objectMode");const e=await this.collect();return this[lc]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(Cc,(()=>t(new Error("stream destroyed")))),this.on("error",(e=>t(e))),this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[Uc]=!1;let e=!1;const t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[nc])return t();let r,i;const o=e=>{this.off("data",u),this.off("end",s),this.off(Cc,a),t(),i(e)},u=e=>{this.off("error",o),this.off("end",s),this.off(Cc,a),this.pause(),r({value:e,done:!!this[nc]})},s=()=>{this.off("error",o),this.off("data",u),this.off(Cc,a),t(),r({done:!0,value:void 0})},a=()=>o(new Error("stream destroyed"));return new Promise(((e,t)=>{i=t,r=e,this.once(Cc,a),this.once("error",o),this.once("end",s),this.once("data",u)}))},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Uc]=!1;let e=!1;const t=()=>(this.pause(),this.off(wc,t),this.off(Cc,t),this.off("end",t),e=!0,{done:!0,value:void 0});return this.once("end",t),this.once(wc,t),this.once(Cc,t),{next:()=>{if(e)return t();const n=this.read();return null===n?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[Cc])return e?this.emit("error",e):this.emit(Cc),this;this[Cc]=!0,this[Uc]=!0,this[vc].length=0,this[Ac]=0;return"function"!=typeof this.close||this[sc]||this.close(),e?this.emit("error",e):this.emit(Cc),this}static get isStream(){return Qa}}const Lc=E.writev,Nc=Symbol("_autoClose"),qc=Symbol("_close"),Mc=Symbol("_ended"),Gc=Symbol("_fd"),zc=Symbol("_finished"),$c=Symbol("_flags"),Wc=Symbol("_flush"),Jc=Symbol("_handleChunk"),Vc=Symbol("_makeBuf"),Hc=Symbol("_mode"),Zc=Symbol("_needDrain"),Yc=Symbol("_onerror"),Kc=Symbol("_onopen"),Xc=Symbol("_onread"),Qc=Symbol("_onwrite"),ed=Symbol("_open"),td=Symbol("_path"),nd=Symbol("_pos"),rd=Symbol("_queue"),id=Symbol("_read"),od=Symbol("_readSize"),ud=Symbol("_reading"),sd=Symbol("_remain"),ad=Symbol("_size"),cd=Symbol("_write"),dd=Symbol("_writing"),ld=Symbol("_defaultFlag"),hd=Symbol("_errored");class pd extends Tc{[hd]=!1;[Gc];[td];[od];[ud]=!1;[ad];[sd];[Nc];constructor(e,t){if(super(t=t||{}),this.readable=!0,this.writable=!1,"string"!=typeof e)throw new TypeError("path must be a string");this[hd]=!1,this[Gc]="number"==typeof t.fd?t.fd:void 0,this[td]=e,this[od]=t.readSize||16777216,this[ud]=!1,this[ad]="number"==typeof t.size?t.size:1/0,this[sd]=this[ad],this[Nc]="boolean"!=typeof t.autoClose||t.autoClose,"number"==typeof this[Gc]?this[id]():this[ed]()}get fd(){return this[Gc]}get path(){return this[td]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[ed](){E.open(this[td],"r",((e,t)=>this[Kc](e,t)))}[Kc](e,t){e?this[Yc](e):(this[Gc]=t,this.emit("open",t),this[id]())}[Vc](){return Buffer.allocUnsafe(Math.min(this[od],this[sd]))}[id](){if(!this[ud]){this[ud]=!0;const e=this[Vc]();if(0===e.length)return process.nextTick((()=>this[Xc](null,0,e)));E.read(this[Gc],e,0,e.length,null,((e,t,n)=>this[Xc](e,t,n)))}}[Xc](e,t,n){this[ud]=!1,e?this[Yc](e):this[Jc](t,n)&&this[id]()}[qc](){if(this[Nc]&&"number"==typeof this[Gc]){const e=this[Gc];this[Gc]=void 0,E.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}[Yc](e){this[ud]=!0,this[qc](),this.emit("error",e)}[Jc](e,t){let n=!1;return this[sd]-=e,e>0&&(n=super.write(e<t.length?t.subarray(0,e):t)),(0===e||this[sd]<=0)&&(n=!1,this[qc](),super.end()),n}emit(e,...t){switch(e){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[Gc]&&this[id](),!1;case"error":return!this[hd]&&(this[hd]=!0,super.emit(e,...t));default:return super.emit(e,...t)}}}class fd extends pd{[ed](){let e=!0;try{this[Kc](null,E.openSync(this[td],"r")),e=!1}finally{e&&this[qc]()}}[id](){let e=!0;try{if(!this[ud]){for(this[ud]=!0;;){const e=this[Vc](),t=0===e.length?0:E.readSync(this[Gc],e,0,e.length,null);if(!this[Jc](t,e))break}this[ud]=!1}e=!1}finally{e&&this[qc]()}}[qc](){if(this[Nc]&&"number"==typeof this[Gc]){const e=this[Gc];this[Gc]=void 0,E.closeSync(e),this.emit("close")}}}class md extends e{readable=!1;writable=!0;[hd]=!1;[dd]=!1;[Mc]=!1;[rd]=[];[Zc]=!1;[td];[Hc];[Nc];[Gc];[ld];[$c];[zc]=!1;[nd];constructor(e,t){super(t=t||{}),this[td]=e,this[Gc]="number"==typeof t.fd?t.fd:void 0,this[Hc]=void 0===t.mode?438:t.mode,this[nd]="number"==typeof t.start?t.start:void 0,this[Nc]="boolean"!=typeof t.autoClose||t.autoClose;const n=void 0!==this[nd]?"r+":"w";this[ld]=void 0===t.flags,this[$c]=void 0===t.flags?n:t.flags,void 0===this[Gc]&&this[ed]()}emit(e,...t){if("error"===e){if(this[hd])return!1;this[hd]=!0}return super.emit(e,...t)}get fd(){return this[Gc]}get path(){return this[td]}[Yc](e){this[qc](),this[dd]=!0,this.emit("error",e)}[ed](){E.open(this[td],this[$c],this[Hc],((e,t)=>this[Kc](e,t)))}[Kc](e,t){this[ld]&&"r+"===this[$c]&&e&&"ENOENT"===e.code?(this[$c]="w",this[ed]()):e?this[Yc](e):(this[Gc]=t,this.emit("open",t),this[dd]||this[Wc]())}end(e,t){return e&&this.write(e,t),this[Mc]=!0,this[dd]||this[rd].length||"number"!=typeof this[Gc]||this[Qc](null,0),this}write(e,t){return"string"==typeof e&&(e=Buffer.from(e,t)),this[Mc]?(this.emit("error",new Error("write() after end()")),!1):void 0===this[Gc]||this[dd]||this[rd].length?(this[rd].push(e),this[Zc]=!0,!1):(this[dd]=!0,this[cd](e),!0)}[cd](e){E.write(this[Gc],e,0,e.length,this[nd],((e,t)=>this[Qc](e,t)))}[Qc](e,t){e?this[Yc](e):(void 0!==this[nd]&&"number"==typeof t&&(this[nd]+=t),this[rd].length?this[Wc]():(this[dd]=!1,this[Mc]&&!this[zc]?(this[zc]=!0,this[qc](),this.emit("finish")):this[Zc]&&(this[Zc]=!1,this.emit("drain"))))}[Wc](){if(0===this[rd].length)this[Mc]&&this[Qc](null,0);else if(1===this[rd].length)this[cd](this[rd].pop());else{const e=this[rd];this[rd]=[],Lc(this[Gc],e,this[nd],((e,t)=>this[Qc](e,t)))}}[qc](){if(this[Nc]&&"number"==typeof this[Gc]){const e=this[Gc];this[Gc]=void 0,E.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}}class vd extends md{[ed](){let e;if(this[ld]&&"r+"===this[$c])try{e=E.openSync(this[td],this[$c],this[Hc])}catch(e){if("ENOENT"===e?.code)return this[$c]="w",this[ed]();throw e}else e=E.openSync(this[td],this[$c],this[Hc]);this[Kc](null,e)}[qc](){if(this[Nc]&&"number"==typeof this[Gc]){const e=this[Gc];this[Gc]=void 0,E.closeSync(e),this.emit("close")}}[cd](e){let t=!0;try{this[Qc](null,E.writeSync(this[Gc],e,0,e.length,this[nd])),t=!1}finally{if(t)try{this[qc]()}catch{}}}}const Ed=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),Ad=e=>{const t=Ed.get(e);return t||e},bd=(e={})=>{if(!e)return{};const t={};for(const[n,r]of Object.entries(e)){t[Ad(n)]=r}return void 0===t.chmod&&!1===t.noChmod&&(t.chmod=!0),delete t.noChmod,t},yd=(e,t,n,r,i)=>Object.assign(((o=[],u,s)=>{Array.isArray(o)&&(u=o,o={}),"function"==typeof u&&(s=u,u=void 0),u=u?Array.from(u):[];const a=bd(o);if(i?.(a,u),(c=a).sync&&c.file){if("function"==typeof s)throw new TypeError("callback not supported for sync tar functions");return e(a,u)}if((e=>!e.sync&&!!e.file)(a)){const e=t(a,u),n=s||void 0;return n?e.then((()=>n()),n):e}if((e=>!!e.sync&&!e.file)(a)){if("function"==typeof s)throw new TypeError("callback not supported for sync tar functions");return n(a,u)}if((e=>!e.sync&&!e.file)(a)){if("function"==typeof s)throw new TypeError("callback only supported with file option");return r(a,u)}throw new Error("impossible options??");var c}),{syncFile:e,asyncFile:t,syncNoFile:n,asyncNoFile:r,validate:i}),gd="object"==typeof process&&process?process:{stdout:null,stderr:null},Cd=e=>!!e&&"object"==typeof e&&(e instanceof ul||e instanceof U||wd(e)||Fd(e)),wd=e=>!!e&&"object"==typeof e&&e instanceof _&&"function"==typeof e.pipe&&e.pipe!==U.Writable.prototype.pipe,Fd=e=>!!e&&"object"==typeof e&&e instanceof _&&"function"==typeof e.write&&"function"==typeof e.end,Dd=Symbol("EOF"),Bd=Symbol("maybeEmitEnd"),Id=Symbol("emittedEnd"),Rd=Symbol("emittingEnd"),jd=Symbol("emittedError"),Sd=Symbol("closed"),_d=Symbol("read"),Ud=Symbol("flush"),Pd=Symbol("flushChunk"),Od=Symbol("encoding"),kd=Symbol("decoder"),xd=Symbol("flowing"),Td=Symbol("paused"),Ld=Symbol("resume"),Nd=Symbol("buffer"),qd=Symbol("pipes"),Md=Symbol("bufferLength"),Gd=Symbol("bufferPush"),zd=Symbol("bufferShift"),$d=Symbol("objectMode"),Wd=Symbol("destroyed"),Jd=Symbol("error"),Vd=Symbol("emitData"),Hd=Symbol("emitEnd"),Zd=Symbol("emitEnd2"),Yd=Symbol("async"),Kd=Symbol("abort"),Xd=Symbol("aborted"),Qd=Symbol("signal"),el=Symbol("dataListeners"),tl=Symbol("discarded"),nl=e=>Promise.resolve().then(e),rl=e=>e();class il{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Ld](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class ol extends il{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit("error",e),e.on("error",this.proxyErrors)}}class ul extends _{[xd]=!1;[Td]=!1;[qd]=[];[Nd]=[];[$d];[Od];[Yd];[kd];[Dd]=!1;[Id]=!1;[Rd]=!1;[Sd]=!1;[jd]=null;[Md]=0;[Wd]=!1;[Qd];[Xd]=!1;[el]=0;[tl]=!1;writable=!0;readable=!0;constructor(...e){const t=e[0]||{};if(super(),t.objectMode&&"string"==typeof t.encoding)throw new TypeError("Encoding and objectMode may not be used together");t.objectMode?(this[$d]=!0,this[Od]=null):(e=>!e.objectMode&&!!e.encoding&&"buffer"!==e.encoding)(t)?(this[Od]=t.encoding,this[$d]=!1):(this[$d]=!1,this[Od]=null),this[Yd]=!!t.async,this[kd]=this[Od]?new P(this[Od]):null,t&&!0===t.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Nd]}),t&&!0===t.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[qd]});const{signal:n}=t;n&&(this[Qd]=n,n.aborted?this[Kd]():n.addEventListener("abort",(()=>this[Kd]())))}get bufferLength(){return this[Md]}get encoding(){return this[Od]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[$d]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Yd]}set async(e){this[Yd]=this[Yd]||!!e}[Kd](){this[Xd]=!0,this.emit("abort",this[Qd]?.reason),this.destroy(this[Qd]?.reason)}get aborted(){return this[Xd]}set aborted(e){}write(e,t,n){if(this[Xd])return!1;if(this[Dd])throw new Error("write after end");if(this[Wd])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(n=t,t="utf8"),t||(t="utf8");const r=this[Yd]?nl:rl;if(!this[$d]&&!Buffer.isBuffer(e))if(i=e,!Buffer.isBuffer(i)&&ArrayBuffer.isView(i))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if((e=>e instanceof ArrayBuffer||!!e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e))e=Buffer.from(e);else if("string"!=typeof e)throw new Error("Non-contiguous data written to non-objectMode stream");var i;return this[$d]?(this[xd]&&0!==this[Md]&&this[Ud](!0),this[xd]?this.emit("data",e):this[Gd](e),0!==this[Md]&&this.emit("readable"),n&&r(n),this[xd]):e.length?("string"!=typeof e||t===this[Od]&&!this[kd]?.lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Od]&&(e=this[kd].write(e)),this[xd]&&0!==this[Md]&&this[Ud](!0),this[xd]?this.emit("data",e):this[Gd](e),0!==this[Md]&&this.emit("readable"),n&&r(n),this[xd]):(0!==this[Md]&&this.emit("readable"),n&&r(n),this[xd])}read(e){if(this[Wd])return null;if(this[tl]=!1,0===this[Md]||0===e||e&&e>this[Md])return this[Bd](),null;this[$d]&&(e=null),this[Nd].length>1&&!this[$d]&&(this[Nd]=[this[Od]?this[Nd].join(""):Buffer.concat(this[Nd],this[Md])]);const t=this[_d](e||null,this[Nd][0]);return this[Bd](),t}[_d](e,t){if(this[$d])this[zd]();else{const n=t;e===n.length||null===e?this[zd]():"string"==typeof n?(this[Nd][0]=n.slice(e),t=n.slice(0,e),this[Md]-=e):(this[Nd][0]=n.subarray(e),t=n.subarray(0,e),this[Md]-=e)}return this.emit("data",t),this[Nd].length||this[Dd]||this.emit("drain"),t}end(e,t,n){return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t="utf8"),void 0!==e&&this.write(e,t),n&&this.once("end",n),this[Dd]=!0,this.writable=!1,!this[xd]&&this[Td]||this[Bd](),this}[Ld](){this[Wd]||(this[el]||this[qd].length||(this[tl]=!0),this[Td]=!1,this[xd]=!0,this.emit("resume"),this[Nd].length?this[Ud]():this[Dd]?this[Bd]():this.emit("drain"))}resume(){return this[Ld]()}pause(){this[xd]=!1,this[Td]=!0,this[tl]=!1}get destroyed(){return this[Wd]}get flowing(){return this[xd]}get paused(){return this[Td]}[Gd](e){this[$d]?this[Md]+=1:this[Md]+=e.length,this[Nd].push(e)}[zd](){return this[$d]?this[Md]-=1:this[Md]-=this[Nd][0].length,this[Nd].shift()}[Ud](e=!1){do{}while(this[Pd](this[zd]())&&this[Nd].length);e||this[Nd].length||this[Dd]||this.emit("drain")}[Pd](e){return this.emit("data",e),this[xd]}pipe(e,t){if(this[Wd])return e;this[tl]=!1;const n=this[Id];return t=t||{},e===gd.stdout||e===gd.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[qd].push(t.proxyErrors?new ol(this,e,t):new il(this,e,t)),this[Yd]?nl((()=>this[Ld]())):this[Ld]()),e}unpipe(e){const t=this[qd].find((t=>t.dest===e));t&&(1===this[qd].length?(this[xd]&&0===this[el]&&(this[xd]=!1),this[qd]=[]):this[qd].splice(this[qd].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);if("data"===e)this[tl]=!1,this[el]++,this[qd].length||this[xd]||this[Ld]();else if("readable"===e&&0!==this[Md])super.emit("readable");else if((e=>"end"===e||"finish"===e||"prefinish"===e)(e)&&this[Id])super.emit(e),this.removeAllListeners(e);else if("error"===e&&this[jd]){const e=t;this[Yd]?nl((()=>e.call(this,this[jd]))):e.call(this,this[jd])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){const n=super.off(e,t);return"data"===e&&(this[el]=this.listeners("data").length,0!==this[el]||this[tl]||this[qd].length||(this[xd]=!1)),n}removeAllListeners(e){const t=super.removeAllListeners(e);return"data"!==e&&void 0!==e||(this[el]=0,this[tl]||this[qd].length||(this[xd]=!1)),t}get emittedEnd(){return this[Id]}[Bd](){this[Rd]||this[Id]||this[Wd]||0!==this[Nd].length||!this[Dd]||(this[Rd]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Sd]&&this.emit("close"),this[Rd]=!1)}emit(e,...t){const n=t[0];if("error"!==e&&"close"!==e&&e!==Wd&&this[Wd])return!1;if("data"===e)return!(!this[$d]&&!n)&&(this[Yd]?(nl((()=>this[Vd](n))),!0):this[Vd](n));if("end"===e)return this[Hd]();if("close"===e){if(this[Sd]=!0,!this[Id]&&!this[Wd])return!1;const e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[jd]=n,super.emit(Jd,n);const e=!(this[Qd]&&!this.listeners("error").length)&&super.emit("error",n);return this[Bd](),e}if("resume"===e){const e=super.emit("resume");return this[Bd](),e}if("finish"===e||"prefinish"===e){const t=super.emit(e);return this.removeAllListeners(e),t}const r=super.emit(e,...t);return this[Bd](),r}[Vd](e){for(const t of this[qd])!1===t.dest.write(e)&&this.pause();const t=!this[tl]&&super.emit("data",e);return this[Bd](),t}[Hd](){return!this[Id]&&(this[Id]=!0,this.readable=!1,this[Yd]?(nl((()=>this[Zd]())),!0):this[Zd]())}[Zd](){if(this[kd]){const e=this[kd].end();if(e){for(const t of this[qd])t.dest.write(e);this[tl]||super.emit("data",e)}}for(const e of this[qd])e.end();const e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){const e=Object.assign([],{dataLength:0});this[$d]||(e.dataLength=0);const t=this.promise();return this.on("data",(t=>{e.push(t),this[$d]||(e.dataLength+=t.length)})),await t,e}async concat(){if(this[$d])throw new Error("cannot concat in objectMode");const e=await this.collect();return this[Od]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(Wd,(()=>t(new Error("stream destroyed")))),this.on("error",(e=>t(e))),this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[tl]=!1;let e=!1;const t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[Dd])return t();let r,i;const o=e=>{this.off("data",u),this.off("end",s),this.off(Wd,a),t(),i(e)},u=e=>{this.off("error",o),this.off("end",s),this.off(Wd,a),this.pause(),r({value:e,done:!!this[Dd]})},s=()=>{this.off("error",o),this.off("data",u),this.off(Wd,a),t(),r({done:!0,value:void 0})},a=()=>o(new Error("stream destroyed"));return new Promise(((e,t)=>{i=t,r=e,this.once(Wd,a),this.once("error",o),this.once("end",s),this.once("data",u)}))},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[tl]=!1;let e=!1;const t=()=>(this.pause(),this.off(Jd,t),this.off(Wd,t),this.off("end",t),e=!0,{done:!0,value:void 0});return this.once("end",t),this.once(Jd,t),this.once(Wd,t),{next:()=>{if(e)return t();const n=this.read();return null===n?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[Wd])return e?this.emit("error",e):this.emit(Wd),this;this[Wd]=!0,this[tl]=!0,this[Nd].length=0,this[Md]=0;return"function"!=typeof this.close||this[Sd]||this.close(),e?this.emit("error",e):this.emit(Wd),this}static get isStream(){return Cd}}const sl=h.constants||{ZLIB_VERNUM:4736},al=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},sl)),cl=j.concat,dl=Object.getOwnPropertyDescriptor(j,"concat"),ll=e=>e,hl=!0===dl?.writable||void 0!==dl?.set?e=>{j.concat=e?ll:cl}:e=>{},pl=Symbol("_superWrite");class fl extends Error{code;errno;constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const ml=Symbol("flushFlag");class vl extends ul{#e=!1;#t=!1;#n;#r;#i;#o;#u;get sawError(){return this.#e}get handle(){return this.#o}get flushFlag(){return this.#n}constructor(e,t){if(!e||"object"!=typeof e)throw new TypeError("invalid options for ZlibBase constructor");super(e),this.#n=e.flush??0,this.#r=e.finishFlush??0,this.#i=e.fullFlushFlag??0;try{this.#o=new l[t](e)}catch(e){throw new fl(e)}this.#u=e=>{this.#e||(this.#e=!0,this.close(),this.emit("error",e))},this.#o?.on("error",(e=>this.#u(new fl(e)))),this.once("end",(()=>this.close))}close(){this.#o&&(this.#o.close(),this.#o=void 0,this.emit("close"))}reset(){if(!this.#e)return q(this.#o,"zlib binding closed"),this.#o.reset?.()}flush(e){this.ended||("number"!=typeof e&&(e=this.#i),this.write(Object.assign(j.alloc(0),{[ml]:e})))}end(e,t,n){return"function"==typeof e&&(n=e,t=void 0,e=void 0),"function"==typeof t&&(n=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#r),this.#t=!0,super.end(n)}get ended(){return this.#t}[pl](e){return super.write(e)}write(e,t,n){if("function"==typeof t&&(n=t,t="utf8"),"string"==typeof e&&(e=j.from(e,t)),this.#e)return;q(this.#o,"zlib binding closed");const r=this.#o._handle,i=r.close;r.close=()=>{};const o=this.#o.close;let u,s;this.#o.close=()=>{},hl(!0);try{const t="number"==typeof e[ml]?e[ml]:this.#n;u=this.#o._processChunk(e,t),hl(!1)}catch(e){hl(!1),this.#u(new fl(e))}finally{this.#o&&(this.#o._handle=r,r.close=i,this.#o.close=o,this.#o.removeAllListeners("error"))}if(this.#o&&this.#o.on("error",(e=>this.#u(new fl(e)))),u)if(Array.isArray(u)&&u.length>0){const e=u[0];s=this[pl](j.from(e));for(let e=1;e<u.length;e++)s=this[pl](u[e])}else s=this[pl](j.from(u));return n&&n(),s}}class El extends vl{#s;#a;constructor(e,t){(e=e||{}).flush=e.flush||al.Z_NO_FLUSH,e.finishFlush=e.finishFlush||al.Z_FINISH,e.fullFlushFlag=al.Z_FULL_FLUSH,super(e,t),this.#s=e.level,this.#a=e.strategy}params(e,t){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#s!==e||this.#a!==t){this.flush(al.Z_SYNC_FLUSH),q(this.handle,"zlib binding closed");const n=this.handle.flush;this.handle.flush=(e,t)=>{"function"==typeof e&&(t=e,e=this.flushFlag),this.flush(e),t?.()};try{this.handle.params(e,t)}finally{this.handle.flush=n}this.handle&&(this.#s=e,this.#a=t)}}}}class Al extends El{#c;constructor(e){super(e,"Gzip"),this.#c=e&&!!e.portable}[pl](e){return this.#c?(this.#c=!1,e[9]=255,super[pl](e)):super[pl](e)}}class bl extends El{constructor(e){super(e,"Unzip")}}class yl extends vl{constructor(e,t){(e=e||{}).flush=e.flush||al.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||al.BROTLI_OPERATION_FINISH,e.fullFlushFlag=al.BROTLI_OPERATION_FLUSH,super(e,t)}}class gl extends yl{constructor(e){super(e,"BrotliCompress")}}class Cl extends yl{constructor(e){super(e,"BrotliDecompress")}}class wl{tail;head;length=0;static create(e=[]){return new wl(e)}constructor(e=[]){for(const t of e)this.push(t)}*[Symbol.iterator](){for(let e=this.head;e;e=e.next)yield e.value}removeNode(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");const t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),this.length--,e.next=void 0,e.prev=void 0,e.list=void 0,t}unshiftNode(e){if(e===this.head)return;e.list&&e.list.removeNode(e);const t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}pushNode(e){if(e===this.tail)return;e.list&&e.list.removeNode(e);const t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}push(...e){for(let t=0,n=e.length;t<n;t++)Dl(this,e[t]);return this.length}unshift(...e){for(var t=0,n=e.length;t<n;t++)Bl(this,e[t]);return this.length}pop(){if(!this.tail)return;const e=this.tail.value,t=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,t.list=void 0,this.length--,e}shift(){if(!this.head)return;const e=this.head.value,t=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,t.list=void 0,this.length--,e}forEach(e,t){t=t||this;for(let n=this.head,r=0;n;r++)e.call(t,n.value,r,this),n=n.next}forEachReverse(e,t){t=t||this;for(let n=this.tail,r=this.length-1;n;r--)e.call(t,n.value,r,this),n=n.prev}get(e){let t=0,n=this.head;for(;n&&t<e;t++)n=n.next;if(t===e&&n)return n.value}getReverse(e){let t=0,n=this.tail;for(;n&&t<e;t++)n=n.prev;if(t===e&&n)return n.value}map(e,t){t=t||this;const n=new wl;for(let r=this.head;r;)n.push(e.call(t,r.value,this)),r=r.next;return n}mapReverse(e,t){t=t||this;var n=new wl;for(let r=this.tail;r;)n.push(e.call(t,r.value,this)),r=r.prev;return n}reduce(e,t){let n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;r;i++)n=e(n,r.value,i),r=r.next;return n}reduceReverse(e,t){let n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(let t=this.length-1;r;t--)n=e(n,r.value,t),r=r.prev;return n}toArray(){const e=new Array(this.length);for(let t=0,n=this.head;n;t++)e[t]=n.value,n=n.next;return e}toArrayReverse(){const e=new Array(this.length);for(let t=0,n=this.tail;n;t++)e[t]=n.value,n=n.prev;return e}slice(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);const n=new wl;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);let r=this.head,i=0;for(i=0;r&&i<e;i++)r=r.next;for(;r&&i<t;i++,r=r.next)n.push(r.value);return n}sliceReverse(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);const n=new wl;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);let r=this.length,i=this.tail;for(;i&&r>t;r--)i=i.prev;for(;i&&r>e;r--,i=i.prev)n.push(i.value);return n}splice(e,t=0,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);let r=this.head;for(let t=0;r&&t<e;t++)r=r.next;const i=[];for(let e=0;r&&e<t;e++)i.push(r.value),r=this.removeNode(r);r?r!==this.tail&&(r=r.prev):r=this.tail;for(const e of n)r=Fl(this,r,e);return i}reverse(){const e=this.head,t=this.tail;for(let t=e;t;t=t.prev){const e=t.prev;t.prev=t.next,t.next=e}return this.head=t,this.tail=e,this}}function Fl(e,t,n){const r=t,i=t?t.next:e.head,o=new Il(n,r,i,e);return void 0===o.next&&(e.tail=o),void 0===o.prev&&(e.head=o),e.length++,o}function Dl(e,t){e.tail=new Il(t,e.tail,void 0,e),e.head||(e.head=e.tail),e.length++}function Bl(e,t){e.head=new Il(t,void 0,e.head,e),e.tail||(e.tail=e.head),e.length++}class Il{list;next;prev;value;constructor(e,t,n,r){this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=void 0,n?(n.prev=this,this.next=n):this.next=void 0}}const Rl=(e,t)=>{t[0]=128;for(var n=t.length;n>1;n--)t[n-1]=255&e,e=Math.floor(e/256)},jl=(e,t)=>{t[0]=255;var n=!1;e*=-1;for(var r=t.length;r>1;r--){var i=255&e;e=Math.floor(e/256),n?t[r-1]=Ul(i):0===i?t[r-1]=0:(n=!0,t[r-1]=Pl(i))}},Sl=e=>{for(var t=e.length,n=0,r=!1,i=t-1;i>-1;i--){var o,u=Number(e[i]);r?o=Ul(u):0===u?o=u:(r=!0,o=Pl(u)),0!==o&&(n-=o*Math.pow(256,t-i-1))}return n},_l=e=>{for(var t=e.length,n=0,r=t-1;r>-1;r--){var i=Number(e[r]);0!==i&&(n+=i*Math.pow(256,t-r-1))}return n},Ul=e=>255&(255^e),Pl=e=>1+(255^e)&255,Ol=e=>kl.has(e),kl=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),xl=new Map(Array.from(kl).map((e=>[e[1],e[0]])));class Tl{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#d="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(e,t=0,n,r){Buffer.isBuffer(e)?this.decode(e,t||0,n,r):e&&this.#l(e)}decode(e,t,n,r){if(t||(t=0),!(e&&e.length>=t+512))throw new Error("need 512 bytes for header");this.path=Nl(e,t,100),this.mode=Gl(e,t+100,8),this.uid=Gl(e,t+108,8),this.gid=Gl(e,t+116,8),this.size=Gl(e,t+124,12),this.mtime=ql(e,t+136,12),this.cksum=Gl(e,t+148,12),r&&this.#l(r,!0),n&&this.#l(n);const i=Nl(e,t+156,1);if(Ol(i)&&(this.#d=i||"0"),"0"===this.#d&&"/"===this.path.slice(-1)&&(this.#d="5"),"5"===this.#d&&(this.size=0),this.linkpath=Nl(e,t+157,100),"ustar\x0000"===e.subarray(t+257,t+265).toString())if(this.uname=Nl(e,t+265,32),this.gname=Nl(e,t+297,32),this.devmaj=Gl(e,t+329,8)??0,this.devmin=Gl(e,t+337,8)??0,0!==e[t+475]){const n=Nl(e,t+345,155);this.path=n+"/"+this.path}else{const n=Nl(e,t+345,130);n&&(this.path=n+"/"+this.path),this.atime=ql(e,t+476,12),this.ctime=ql(e,t+488,12)}let o=256;for(let n=t;n<t+148;n++)o+=e[n];for(let n=t+156;n<t+512;n++)o+=e[n];this.cksumValid=o===this.cksum,void 0===this.cksum&&256===o&&(this.nullBlock=!0)}#l(e,t=!1){Object.assign(this,Object.fromEntries(Object.entries(e).filter((([e,n])=>!(null==n||"path"===e&&t||"linkpath"===e&&t||"global"===e)))))}encode(e,t=0){if(e||(e=this.block=Buffer.alloc(512)),"Unsupported"===this.#d&&(this.#d="0"),!(e.length>=t+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=Ll(this.path||"",n),i=r[0],o=r[1];this.needPax=!!r[2],this.needPax=Kl(e,t,100,i)||this.needPax,this.needPax=Wl(e,t+100,8,this.mode)||this.needPax,this.needPax=Wl(e,t+108,8,this.uid)||this.needPax,this.needPax=Wl(e,t+116,8,this.gid)||this.needPax,this.needPax=Wl(e,t+124,12,this.size)||this.needPax,this.needPax=Zl(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this.#d.charCodeAt(0),this.needPax=Kl(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=Kl(e,t+265,32,this.uname)||this.needPax,this.needPax=Kl(e,t+297,32,this.gname)||this.needPax,this.needPax=Wl(e,t+329,8,this.devmaj)||this.needPax,this.needPax=Wl(e,t+337,8,this.devmin)||this.needPax,this.needPax=Kl(e,t+345,n,o)||this.needPax,0!==e[t+475]?this.needPax=Kl(e,t+345,155,o)||this.needPax:(this.needPax=Kl(e,t+345,130,o)||this.needPax,this.needPax=Zl(e,t+476,12,this.atime)||this.needPax,this.needPax=Zl(e,t+488,12,this.ctime)||this.needPax);let u=256;for(let n=t;n<t+148;n++)u+=e[n];for(let n=t+156;n<t+512;n++)u+=e[n];return this.cksum=u,Wl(e,t+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#d?this.#d:kl.get(this.#d)}get typeKey(){return this.#d}set type(e){const t=String(xl.get(e));if(Ol(t)||"Unsupported"===t)this.#d=t;else{if(!Ol(e))throw new TypeError("invalid entry type: "+e);this.#d=e}}}const Ll=(e,t)=>{const n=100;let r,i=e,o="";const u=k.parse(e).root||".";if(Buffer.byteLength(i)<n)r=[i,o,!1];else{o=k.dirname(i),i=k.basename(i);do{Buffer.byteLength(i)<=n&&Buffer.byteLength(o)<=t?r=[i,o,!1]:Buffer.byteLength(i)>n&&Buffer.byteLength(o)<=t?r=[i.slice(0,99),o,!0]:(i=k.join(k.basename(o),i),o=k.dirname(o))}while(o!==u&&void 0===r);r||(r=[e.slice(0,99),"",!0])}return r},Nl=(e,t,n)=>e.subarray(t,t+n).toString("utf8").replace(/\0.*/,""),ql=(e,t,n)=>Ml(Gl(e,t,n)),Ml=e=>void 0===e?void 0:new Date(1e3*e),Gl=(e,t,n)=>128&Number(e[t])?(e=>{const t=e[0],n=128===t?_l(e.subarray(1,e.length)):255===t?Sl(e):null;if(null===n)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n})(e.subarray(t,t+n)):zl(e,t,n),zl=(e,t,n)=>{return r=parseInt(e.subarray(t,t+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?void 0:r;var r},$l={12:8589934591,8:2097151},Wl=(e,t,n,r)=>void 0!==r&&(r>$l[n]||r<0?(((e,t)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");e<0?jl(e,t):Rl(e,t)})(r,e.subarray(t,t+n)),!0):(Jl(e,t,n,r),!1)),Jl=(e,t,n,r)=>e.write(Vl(r,n),t,n,"ascii"),Vl=(e,t)=>Hl(Math.floor(e).toString(8),t),Hl=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0",Zl=(e,t,n,r)=>void 0!==r&&Wl(e,t,n,r.getTime()/1e3),Yl=new Array(156).join("\0"),Kl=(e,t,n,r)=>void 0!==r&&(e.write(r+Yl,t,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);class Xl{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(e,t=!1){this.atime=e.atime,this.charset=e.charset,this.comment=e.comment,this.ctime=e.ctime,this.dev=e.dev,this.gid=e.gid,this.global=t,this.gname=e.gname,this.ino=e.ino,this.linkpath=e.linkpath,this.mtime=e.mtime,this.nlink=e.nlink,this.path=e.path,this.size=e.size,this.uid=e.uid,this.uname=e.uname}encode(){const e=this.encodeBody();if(""===e)return Buffer.allocUnsafe(0);const t=Buffer.byteLength(e),n=512*Math.ceil(1+t/512),r=Buffer.allocUnsafe(n);for(let e=0;e<512;e++)r[e]=0;new Tl({path:("PaxHeader/"+x(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:t,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(e,512,t,"utf8");for(let e=t+512;e<r.length;e++)r[e]=0;return r}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(void 0===this[e])return"";const t=this[e],n=" "+("dev"===e||"ino"===e||"nlink"===e?"SCHILY.":"")+e+"="+(t instanceof Date?t.getTime()/1e3:t)+"\n",r=Buffer.byteLength(n);let i=Math.floor(Math.log(r)/Math.log(10))+1;r+i>=Math.pow(10,i)&&(i+=1);return i+r+n}static parse(e,t,n=!1){return new Xl(Ql(eh(e),t),n)}}const Ql=(e,t)=>t?Object.assign({},t,e):e,eh=e=>e.replace(/\n$/,"").split("\n").reduce(th,Object.create(null)),th=(e,t)=>{const n=parseInt(t,10);if(n!==Buffer.byteLength(t)+1)return e;const r=(t=t.slice((n+" ").length)).split("="),i=r.shift();if(!i)return e;const o=i.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),u=r.join("=");return e[o]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(o)?new Date(1e3*Number(u)):/^[0-9]+$/.test(u)?+u:u,e},nh="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?e=>e:e=>e&&e.replace(/\\/g,"/");class rh extends ul{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(e,t,n){switch(super({}),this.pause(),this.extended=t,this.globalExtended=n,this.header=e,this.remain=e.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=e.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!e.path)throw new Error("no path provided for tar.ReadEntry");this.path=nh(e.path),this.mode=e.mode,this.mode&&(this.mode=4095&this.mode),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=this.remain,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath?nh(e.linkpath):void 0,this.uname=e.uname,this.gname=e.gname,t&&this.#l(t),n&&this.#l(n,!0)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-t),this.blockRemain=Math.max(0,r-t),!!this.ignore||(n>=t?super.write(e):super.write(e.subarray(0,n)))}#l(e,t=!1){e.path&&(e.path=nh(e.path)),e.linkpath&&(e.linkpath=nh(e.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(e).filter((([e,n])=>!(null==n||"path"===e&&t)))))}}const ih=(e,t,n,r={})=>{e.file&&(r.file=e.file),e.cwd&&(r.cwd=e.cwd),r.code=n instanceof Error&&n.code||t,r.tarCode=t,e.strict||!1===r.recoverable?n instanceof Error?e.emit("error",Object.assign(n,r)):e.emit("error",Object.assign(new Error(`${t}: ${n}`),r)):(n instanceof Error&&(r=Object.assign(n,r),n=n.message),e.emit("warn",t,n,r))},oh=Buffer.from([31,139]),uh=Symbol("state"),sh=Symbol("writeEntry"),ah=Symbol("readEntry"),ch=Symbol("nextEntry"),dh=Symbol("processEntry"),lh=Symbol("extendedHeader"),hh=Symbol("globalExtendedHeader"),ph=Symbol("meta"),fh=Symbol("emitMeta"),mh=Symbol("buffer"),vh=Symbol("queue"),Eh=Symbol("ended"),Ah=Symbol("emittedEnd"),bh=Symbol("emit"),yh=Symbol("unzip"),gh=Symbol("consumeChunk"),Ch=Symbol("consumeChunkSub"),wh=Symbol("consumeBody"),Fh=Symbol("consumeMeta"),Dh=Symbol("consumeHeader"),Bh=Symbol("consuming"),Ih=Symbol("bufferConcat"),Rh=Symbol("maybeEnd"),jh=Symbol("writing"),Sh=Symbol("aborted"),_h=Symbol("onDone"),Uh=Symbol("sawValidEntry"),Ph=Symbol("sawNullBlock"),Oh=Symbol("sawEOF"),kh=Symbol("closeStream"),xh=()=>!0;class Th extends t{file;strict;maxMetaEntrySize;filter;brotli;writable=!0;readable=!1;[vh]=new wl;[mh];[ah];[sh];[uh]="begin";[ph]="";[lh];[hh];[Eh]=!1;[yh];[Sh]=!1;[Uh];[Ph]=!1;[Oh]=!1;[jh]=!1;[Bh]=!1;[Ah]=!1;constructor(e={}){super(),this.file=e.file||"",this.on(_h,(()=>{"begin"!==this[uh]&&!1!==this[Uh]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")})),e.ondone?this.on(_h,e.ondone):this.on(_h,(()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")})),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||1048576,this.filter="function"==typeof e.filter?e.filter:xh;const t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=e.gzip||void 0===e.brotli?!!t&&void 0:e.brotli,this.on("end",(()=>this[kh]())),"function"==typeof e.onwarn&&this.on("warn",e.onwarn),"function"==typeof e.onReadEntry&&this.on("entry",e.onReadEntry)}warn(e,t,n={}){ih(this,e,t,n)}[Dh](e,t){let n;void 0===this[Uh]&&(this[Uh]=!1);try{n=new Tl(e,t,this[lh],this[hh])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(n.nullBlock)this[Ph]?(this[Oh]=!0,"begin"===this[uh]&&(this[uh]="header"),this[bh]("eof")):(this[Ph]=!0,this[bh]("nullBlock"));else if(this[Ph]=!1,n.cksumValid)if(n.path){const e=n.type;if(/^(Symbolic)?Link$/.test(e)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(/^(Symbolic)?Link$/.test(e)||/^(Global)?ExtendedHeader$/.test(e)||!n.linkpath){const e=this[sh]=new rh(n,this[lh],this[hh]);if(!this[Uh])if(e.remain){const t=()=>{e.invalid||(this[Uh]=!0)};e.on("end",t)}else this[Uh]=!0;e.meta?e.size>this.maxMetaEntrySize?(e.ignore=!0,this[bh]("ignoredEntry",e),this[uh]="ignore",e.resume()):e.size>0&&(this[ph]="",e.on("data",(e=>this[ph]+=e)),this[uh]="meta"):(this[lh]=void 0,e.ignore=e.ignore||!this.filter(e.path,e),e.ignore?(this[bh]("ignoredEntry",e),this[uh]=e.remain?"ignore":"header",e.resume()):(e.remain?this[uh]="body":(this[uh]="header",e.end()),this[ah]?this[vh].push(e):(this[vh].push(e),this[ch]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[kh](){queueMicrotask((()=>this.emit("close")))}[dh](e){let t=!0;if(e)if(Array.isArray(e)){const[t,...n]=e;this.emit(t,...n)}else this[ah]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",(()=>this[ch]())),t=!1);else this[ah]=void 0,t=!1;return t}[ch](){do{}while(this[dh](this[vh].shift()));if(!this[vh].length){const e=this[ah];!e||e.flowing||e.size===e.remain?this[jh]||this.emit("drain"):e.once("drain",(()=>this.emit("drain")))}}[wh](e,t){const n=this[sh];if(!n)throw new Error("attempt to consume body without entry??");const r=n.blockRemain??0,i=r>=e.length&&0===t?e:e.subarray(t,t+r);return n.write(i),n.blockRemain||(this[uh]="header",this[sh]=void 0,n.end()),i.length}[Fh](e,t){const n=this[sh],r=this[wh](e,t);return!this[sh]&&n&&this[fh](n),r}[bh](e,t,n){this[vh].length||this[ah]?this[vh].push([e,t,n]):this.emit(e,t,n)}[fh](e){switch(this[bh]("meta",this[ph]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[lh]=Xl.parse(this[ph],this[lh],!1);break;case"GlobalExtendedHeader":this[hh]=Xl.parse(this[ph],this[hh],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{const e=this[lh]??Object.create(null);this[lh]=e,e.path=this[ph].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{const e=this[lh]||Object.create(null);this[lh]=e,e.linkpath=this[ph].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+e.type)}}abort(e){this[Sh]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e,t,n){if("function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,"string"==typeof t?t:"utf8")),this[Sh])return n?.(),!1;if((void 0===this[yh]||void 0===this.brotli&&!1===this[yh])&&e){if(this[mh]&&(e=Buffer.concat([this[mh],e]),this[mh]=void 0),e.length<oh.length)return this[mh]=e,n?.(),!0;for(let t=0;void 0===this[yh]&&t<oh.length;t++)e[t]!==oh[t]&&(this[yh]=!1);const t=void 0===this.brotli;if(!1===this[yh]&&t)if(e.length<512){if(!this[Eh])return this[mh]=e,n?.(),!0;this.brotli=!0}else try{new Tl(e.subarray(0,512)),this.brotli=!1}catch(e){this.brotli=!0}if(void 0===this[yh]||!1===this[yh]&&this.brotli){const t=this[Eh];this[Eh]=!1,this[yh]=void 0===this[yh]?new bl({}):new Cl({}),this[yh].on("data",(e=>this[gh](e))),this[yh].on("error",(e=>this.abort(e))),this[yh].on("end",(()=>{this[Eh]=!0,this[gh]()})),this[jh]=!0;const r=!!this[yh][t?"end":"write"](e);return this[jh]=!1,n?.(),r}}this[jh]=!0,this[yh]?this[yh].write(e):this[gh](e),this[jh]=!1;const r=!this[vh].length&&(!this[ah]||this[ah].flowing);return r||this[vh].length||this[ah]?.once("drain",(()=>this.emit("drain"))),n?.(),r}[Ih](e){e&&!this[Sh]&&(this[mh]=this[mh]?Buffer.concat([this[mh],e]):e)}[Rh](){if(this[Eh]&&!this[Ah]&&!this[Sh]&&!this[Bh]){this[Ah]=!0;const e=this[sh];if(e&&e.blockRemain){const t=this[mh]?this[mh].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[mh]&&e.write(this[mh]),e.end()}this[bh](_h)}}[gh](e){if(this[Bh]&&e)this[Ih](e);else if(e||this[mh]){if(e){if(this[Bh]=!0,this[mh]){this[Ih](e);const t=this[mh];this[mh]=void 0,this[Ch](t)}else this[Ch](e);for(;this[mh]&&this[mh]?.length>=512&&!this[Sh]&&!this[Oh];){const e=this[mh];this[mh]=void 0,this[Ch](e)}this[Bh]=!1}}else this[Rh]();this[mh]&&!this[Eh]||this[Rh]()}[Ch](e){let t=0;const n=e.length;for(;t+512<=n&&!this[Sh]&&!this[Oh];)switch(this[uh]){case"begin":case"header":this[Dh](e,t),t+=512;break;case"ignore":case"body":t+=this[wh](e,t);break;case"meta":t+=this[Fh](e,t);break;default:throw new Error("invalid state: "+this[uh])}t<n&&(this[mh]?this[mh]=Buffer.concat([e.subarray(t),this[mh]]):this[mh]=e.subarray(t))}end(e,t,n){return"function"==typeof e&&(n=e,t=void 0,e=void 0),"function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,t)),n&&this.once("finish",n),this[Sh]||(this[yh]?(e&&this[yh].write(e),this[yh].end()):(this[Eh]=!0,void 0===this.brotli&&(e=e||Buffer.alloc(0)),e&&this.write(e),this[Rh]())),this}}const Lh=e=>{let t=e.length-1,n=-1;for(;t>-1&&"/"===e.charAt(t);)n=t,t--;return-1===n?e:e.slice(0,n)},Nh=(e,t)=>{const n=new Map(t.map((e=>[Lh(e),!0]))),r=e.filter,i=(e,t="")=>{const r=t||w(e).root||".";let o;if(e===r)o=!1;else{const t=n.get(e);o=void 0!==t?t:i(F(e),r)}return n.set(e,o),o};e.filter=r?(e,t)=>r(e,t)&&i(Lh(e)):e=>i(Lh(e))},qh=yd((e=>{const t=new Th(e),n=e.file;let r;try{const i=N.statSync(n),o=e.maxReadSize||16777216;if(i.size<o)t.end(N.readFileSync(n));else{let e=0;const u=Buffer.allocUnsafe(o);for(r=N.openSync(n,"r");e<i.size;){const n=N.readSync(r,u,0,o,e);e+=n,t.write(u.subarray(0,n))}t.end()}}finally{if("number"==typeof r)try{N.closeSync(r)}catch(e){}}}),((e,t)=>{const n=new Th(e),r=e.maxReadSize||16777216,i=e.file,o=new Promise(((e,t)=>{n.on("error",t),n.on("end",e),N.stat(i,((e,o)=>{if(e)t(e);else{const e=new pd(i,{readSize:r,size:o.size});e.on("error",t),e.pipe(n)}}))}));return o}),(e=>new Th(e)),(e=>new Th(e)),((e,t)=>{t?.length&&Nh(e,t),e.noResume||(e=>{const t=e.onReadEntry;e.onReadEntry=t?e=>{t(e),e.resume()}:e=>e.resume()})(e)})),Mh=(e,t,n)=>(e&=4095,n&&(e=-19&e|384),t&&(256&e&&(e|=64),32&e&&(e|=8),4&e&&(e|=1)),e),{isAbsolute:Gh,parse:zh}=T,$h=e=>{let t="",n=zh(e);for(;Gh(e)||n.root;){const r="/"===e.charAt(0)&&"//?/"!==e.slice(0,4)?"/":n.root;e=e.slice(r.length),t+=r,n=zh(e)}return[t,e]},Wh=["|","<",">","?",":"],Jh=Wh.map((e=>String.fromCharCode(61440+e.charCodeAt(0)))),Vh=new Map(Wh.map(((e,t)=>[e,Jh[t]]))),Hh=new Map(Jh.map(((e,t)=>[e,Wh[t]]))),Zh=e=>Wh.reduce(((e,t)=>e.split(t).join(Vh.get(t))),e),Yh=(e,t)=>t?(e=nh(e).replace(/^\.(\/|$)/,""),Lh(t)+"/"+e):nh(e),Kh=Symbol("process"),Xh=Symbol("file"),Qh=Symbol("directory"),ep=Symbol("symlink"),tp=Symbol("hardlink"),np=Symbol("header"),rp=Symbol("read"),ip=Symbol("lstat"),op=Symbol("onlstat"),up=Symbol("onread"),sp=Symbol("onreadlink"),ap=Symbol("openfile"),cp=Symbol("onopenfile"),dp=Symbol("close"),lp=Symbol("mode"),hp=Symbol("awaitDrain"),pp=Symbol("ondrain"),fp=Symbol("prefix");class mp extends ul{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#h=!1;constructor(e,t={}){const n=bd(t);super(),this.path=nh(e),this.portable=!!n.portable,this.maxReadSize=n.maxReadSize||16777216,this.linkCache=n.linkCache||new Map,this.statCache=n.statCache||new Map,this.preservePaths=!!n.preservePaths,this.cwd=nh(n.cwd||process.cwd()),this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.mtime=n.mtime,this.prefix=n.prefix?nh(n.prefix):void 0,this.onWriteEntry=n.onWriteEntry,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){const[e,t]=$h(this.path);e&&"string"==typeof t&&(this.path=t,r=e)}var i;this.win32=!!n.win32||"win32"===process.platform,this.win32&&(this.path=(i=this.path.replace(/\\/g,"/"),Jh.reduce(((e,t)=>e.split(t).join(Hh.get(t))),i)),e=e.replace(/\\/g,"/")),this.absolute=nh(n.absolute||C.resolve(this.cwd,e)),""===this.path&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});const o=this.statCache.get(this.absolute);o?this[op](o):this[ip]()}warn(e,t,n={}){return ih(this,e,t,n)}emit(e,...t){return"error"===e&&(this.#h=!0),super.emit(e,...t)}[ip](){E.lstat(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[op](t)}))}[op](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=Ap(e),this.emit("stat",e),this[Kh]()}[Kh](){switch(this.type){case"File":return this[Xh]();case"Directory":return this[Qh]();case"SymbolicLink":return this[ep]();default:return this.end()}}[lp](e){return Mh(e,"Directory"===this.type,this.portable)}[fp](e){return Yh(e,this.prefix)}[np](){if(!this.stat)throw new Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new Tl({path:this[fp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[fp](this.linkpath):this.linkpath,mode:this[lp](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Xl({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[fp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[fp](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());const e=this.header?.block;if(!e)throw new Error("failed to encode header");super.write(e)}[Qh](){if(!this.stat)throw new Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[np](),this.end()}[ep](){E.readlink(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[sp](t)}))}[sp](e){this.linkpath=nh(e),this[np](),this.end()}[tp](e){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=nh(C.relative(this.cwd,e)),this.stat.size=0,this[np](),this.end()}[Xh](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){const e=`${this.stat.dev}:${this.stat.ino}`,t=this.linkCache.get(e);if(0===t?.indexOf(this.cwd))return this[tp](t);this.linkCache.set(e,this.absolute)}if(this[np](),0===this.stat.size)return this.end();this[ap]()}[ap](){E.open(this.absolute,"r",((e,t)=>{if(e)return this.emit("error",e);this[cp](t)}))}[cp](e){if(this.fd=e,this.#h)return this[dp]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[rp]()}[rp](){const{fd:e,buf:t,offset:n,length:r,pos:i}=this;if(void 0===e||void 0===t)throw new Error("cannot read file without first opening");E.read(e,t,n,r,i,((e,t)=>{if(e)return this[dp]((()=>this.emit("error",e)));this[up](t)}))}[dp](e=()=>{}){void 0!==this.fd&&E.close(this.fd,e)}[up](e){if(e<=0&&this.remain>0){const e=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[dp]((()=>this.emit("error",e)))}if(e>this.remain){const e=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[dp]((()=>this.emit("error",e)))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(e===this.remain)for(let t=e;t<this.length&&e<this.blockRemain;t++)this.buf[t+this.offset]=0,e++,this.remain++;const t=0===this.offset&&e===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+e);this.write(t)?this[pp]():this[hp]((()=>this[pp]()))}[hp](e){this.once("drain",e)}write(e,t,n){if("function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,"string"==typeof t?t:"utf8")),this.blockRemain<e.length){const e=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",e)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e,null,n)}[pp](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[dp]((e=>e?this.emit("error",e):this.end()));if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[rp]()}}class vp extends mp{sync=!0;[ip](){this[op](E.lstatSync(this.absolute))}[ep](){this[sp](E.readlinkSync(this.absolute))}[ap](){this[cp](E.openSync(this.absolute,"r"))}[rp](){let e=!0;try{const{fd:t,buf:n,offset:r,length:i,pos:o}=this;if(void 0===t||void 0===n)throw new Error("fd and buf must be set in READ method");const u=E.readSync(t,n,r,i,o);this[up](u),e=!1}finally{if(e)try{this[dp]((()=>{}))}catch(e){}}}[hp](e){e()}[dp](e=()=>{}){void 0!==this.fd&&E.closeSync(this.fd),e()}}class Ep extends ul{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(e,t,n={}){return ih(this,e,t,n)}constructor(e,t={}){const n=bd(t);super(),this.preservePaths=!!n.preservePaths,this.portable=!!n.portable,this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.onWriteEntry=n.onWriteEntry,this.readEntry=e;const{type:r}=e;if("Unsupported"===r)throw new Error("writing entry that should be ignored");this.type=r,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=n.prefix,this.path=nh(e.path),this.mode=void 0!==e.mode?this[lp](e.mode):void 0,this.uid=this.portable?void 0:e.uid,this.gid=this.portable?void 0:e.gid,this.uname=this.portable?void 0:e.uname,this.gname=this.portable?void 0:e.gname,this.size=e.size,this.mtime=this.noMtime?void 0:n.mtime||e.mtime,this.atime=this.portable?void 0:e.atime,this.ctime=this.portable?void 0:e.ctime,this.linkpath=void 0!==e.linkpath?nh(e.linkpath):void 0,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let i=!1;if(!this.preservePaths){const[e,t]=$h(this.path);e&&"string"==typeof t&&(this.path=t,i=e)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.onWriteEntry?.(this),this.header=new Tl({path:this[fp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[fp](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new Xl({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[fp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[fp](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());const o=this.header?.block;if(!o)throw new Error("failed to encode header");super.write(o),e.pipe(this)}[fp](e){return Yh(e,this.prefix)}[lp](e){return Mh(e,"Directory"===this.type,this.portable)}write(e,t,n){"function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,"string"==typeof t?t:"utf8"));const r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e,n)}end(e,t,n){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof e&&(n=e,t=void 0,e=void 0),"function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,t??"utf8")),n&&this.once("finish",n),e?super.end(e,n):super.end(n),this}}const Ap=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";class bp{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(e,t){this.path=e||"./",this.absolute=t}}const yp=Buffer.alloc(1024),gp=Symbol("onStat"),Cp=Symbol("ended"),wp=Symbol("queue"),Fp=Symbol("current"),Dp=Symbol("process"),Bp=Symbol("processing"),Ip=Symbol("processJob"),Rp=Symbol("jobs"),jp=Symbol("jobDone"),Sp=Symbol("addFSEntry"),_p=Symbol("addTarEntry"),Up=Symbol("stat"),Pp=Symbol("readdir"),Op=Symbol("onreaddir"),kp=Symbol("pipe"),xp=Symbol("entry"),Tp=Symbol("entryOpt"),Lp=Symbol("writeEntryClass"),Np=Symbol("write"),qp=Symbol("ondrain");class Mp extends ul{opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[Lp];onWriteEntry;[wp];[Rp]=0;[Bp]=!1;[Cp]=!1;constructor(e={}){if(super(),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=nh(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this.onWriteEntry=e.onWriteEntry,this[Lp]=mp,"function"==typeof e.onwarn&&this.on("warn",e.onwarn),this.portable=!!e.portable,e.gzip||e.brotli){if(e.gzip&&e.brotli)throw new TypeError("gzip and brotli are mutually exclusive");if(e.gzip&&("object"!=typeof e.gzip&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new Al(e.gzip)),e.brotli&&("object"!=typeof e.brotli&&(e.brotli={}),this.zip=new gl(e.brotli)),!this.zip)throw new Error("impossible");const t=this.zip;t.on("data",(e=>super.write(e))),t.on("end",(()=>super.end())),t.on("drain",(()=>this[qp]())),this.on("resume",(()=>t.resume()))}else this.on("drain",this[qp]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,e.mtime&&(this.mtime=e.mtime),this.filter="function"==typeof e.filter?e.filter:()=>!0,this[wp]=new wl,this[Rp]=0,this.jobs=Number(e.jobs)||4,this[Bp]=!1,this[Cp]=!1}[Np](e){return super.write(e)}add(e){return this.write(e),this}end(e,t,n){return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e&&this.add(e),this[Cp]=!0,this[Dp](),n&&n(),this}write(e){if(this[Cp])throw new Error("write after end");return e instanceof rh?this[_p](e):this[Sp](e),this.flowing}[_p](e){const t=nh(C.resolve(this.cwd,e.path));if(this.filter(e.path,e)){const n=new bp(e.path,t);n.entry=new Ep(e,this[Tp](n)),n.entry.on("end",(()=>this[jp](n))),this[Rp]+=1,this[wp].push(n)}else e.resume();this[Dp]()}[Sp](e){const t=nh(C.resolve(this.cwd,e));this[wp].push(new bp(e,t)),this[Dp]()}[Up](e){e.pending=!0,this[Rp]+=1;const t=this.follow?"stat":"lstat";E[t](e.absolute,((t,n)=>{e.pending=!1,this[Rp]-=1,t?this.emit("error",t):this[gp](e,n)}))}[gp](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[Dp]()}[Pp](e){e.pending=!0,this[Rp]+=1,E.readdir(e.absolute,((t,n)=>{if(e.pending=!1,this[Rp]-=1,t)return this.emit("error",t);this[Op](e,n)}))}[Op](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[Dp]()}[Dp](){if(!this[Bp]){this[Bp]=!0;for(let e=this[wp].head;e&&this[Rp]<this.jobs;e=e.next)if(this[Ip](e.value),e.value.ignore){const t=e.next;this[wp].removeNode(e),e.next=t}this[Bp]=!1,this[Cp]&&!this[wp].length&&0===this[Rp]&&(this.zip?this.zip.end(yp):(super.write(yp),super.end()))}}get[Fp](){return this[wp]&&this[wp].head&&this[wp].head.value}[jp](e){this[wp].shift(),this[Rp]-=1,this[Dp]()}[Ip](e){if(!e.pending)if(e.entry)e!==this[Fp]||e.piped||this[kp](e);else{if(!e.stat){const t=this.statCache.get(e.absolute);t?this[gp](e,t):this[Up](e)}if(e.stat&&!e.ignore){if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){const t=this.readdirCache.get(e.absolute);if(t?this[Op](e,t):this[Pp](e),!e.readdir)return}e.entry=this[xp](e),e.entry?e!==this[Fp]||e.piped||this[kp](e):e.ignore=!0}}}[Tp](e){return{onwarn:(e,t,n)=>this.warn(e,t,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[xp](e){this[Rp]+=1;try{return new this[Lp](e.path,this[Tp](e)).on("end",(()=>this[jp](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[qp](){this[Fp]&&this[Fp].entry&&this[Fp].entry.resume()}[kp](e){e.piped=!0,e.readdir&&e.readdir.forEach((t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Sp](r+t)}));const t=e.entry,n=this.zip;if(!t)throw new Error("cannot pipe without source");n?t.on("data",(e=>{n.write(e)||t.pause()})):t.on("data",(e=>{super.write(e)||t.pause()}))}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(e,t,n={}){ih(this,e,t,n)}}class Gp extends Mp{sync=!0;constructor(e){super(e),this[Lp]=vp}pause(){}resume(){}[Up](e){const t=this.follow?"statSync":"lstatSync";this[gp](e,E[t](e.absolute))}[Pp](e){this[Op](e,E.readdirSync(e.absolute))}[kp](e){const t=e.entry,n=this.zip;if(e.readdir&&e.readdir.forEach((t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Sp](r+t)})),!t)throw new Error("Cannot pipe without source");n?t.on("data",(e=>{n.write(e)})):t.on("data",(e=>{super[Np](e)}))}}const zp=(e,t)=>{t.forEach((t=>{"@"===t.charAt(0)?qh({file:O.resolve(e.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:t=>e.add(t)}):e.add(t)})),e.end()},$p=async(e,t)=>{for(let n=0;n<t.length;n++){const r=String(t[n]);"@"===r.charAt(0)?await qh({file:O.resolve(String(e.cwd),r.slice(1)),noResume:!0,onReadEntry:t=>{e.add(t)}}):e.add(r)}e.end()},Wp=yd(((e,t)=>{const n=new Gp(e),r=new vd(e.file,{mode:e.mode||438});n.pipe(r),zp(n,t)}),((e,t)=>{const n=new Mp(e),r=new md(e.file,{mode:e.mode||438});n.pipe(r);const i=new Promise(((e,t)=>{r.on("error",t),r.on("close",e),n.on("error",t)}));return $p(n,t),i}),((e,t)=>{const n=new Gp(e);return zp(n,t),n}),((e,t)=>{const n=new Mp(e);return $p(n,t),n}),((e,t)=>{if(!t?.length)throw new TypeError("no paths specified to add to archive")})),Jp="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:Vp,O_TRUNC:Hp,O_WRONLY:Zp}=E.constants,Yp=Number(process.env.__FAKE_FS_O_FILENAME__)||E.constants.UV_FS_O_FILEMAP||0,Kp=Yp|Hp|Vp|Zp,Xp=Jp&&!!Yp?e=>e<524288?Kp:"w":()=>"w",Qp=(e,t,n)=>{try{return N.lchownSync(e,t,n)}catch(e){if("ENOENT"!==e?.code)throw e}},ef=(e,t,n,r)=>{N.lchown(e,t,n,(e=>{r(e&&"ENOENT"!==e?.code?e:null)}))},tf=(e,t,n,r,i)=>{if(t.isDirectory())nf(O.resolve(e,t.name),n,r,(o=>{if(o)return i(o);const u=O.resolve(e,t.name);ef(u,n,r,i)}));else{const o=O.resolve(e,t.name);ef(o,n,r,i)}},nf=(e,t,n,r)=>{N.readdir(e,{withFileTypes:!0},((i,o)=>{if(i){if("ENOENT"===i.code)return r();if("ENOTDIR"!==i.code&&"ENOTSUP"!==i.code)return r(i)}if(i||!o.length)return ef(e,t,n,r);let u=o.length,s=null;const a=i=>{if(!s)return i?r(s=i):0===--u?ef(e,t,n,r):void 0};for(const r of o)tf(e,r,t,n,a)}))},rf=(e,t,n,r)=>{t.isDirectory()&&of(O.resolve(e,t.name),n,r),Qp(O.resolve(e,t.name),n,r)},of=(e,t,n)=>{let r;try{r=N.readdirSync(e,{withFileTypes:!0})}catch(r){const i=r;if("ENOENT"===i?.code)return;if("ENOTDIR"===i?.code||"ENOTSUP"===i?.code)return Qp(e,t,n);throw i}for(const i of r)rf(e,i,t,n);return Qp(e,t,n)},uf=e=>{if(e)if("object"==typeof e)e={mode:511,...e};else if("number"==typeof e)e={mode:e};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8)}}else e={mode:511};const t=e,n=e.fs||{};return e.mkdir=e.mkdir||n.mkdir||A,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,n)=>new Promise(((r,i)=>t.mkdir(e,n,((e,t)=>e?i(e):r(t))))),e.stat=e.stat||n.stat||b,e.statAsync=e.statAsync?e.statAsync:async e=>new Promise(((n,r)=>t.stat(e,((e,t)=>e?r(e):n(t))))),e.statSync=e.statSync||n.statSync||y,e.mkdirSync=e.mkdirSync||n.mkdirSync||g,t},sf=(e,t,n)=>{const r=F(e),i={...uf(t),recursive:!1};if(r===e)try{return i.mkdirSync(e,i)}catch(e){if(e&&"EISDIR"!==e.code)throw e;return}try{return i.mkdirSync(e,i),n||e}catch(t){const o=t;if(o&&"ENOENT"===o.code)return sf(e,i,sf(r,i,n));if(o&&"EEXIST"!==o.code&&o&&"EROFS"!==o.code)throw t;try{if(!i.statSync(e).isDirectory())throw t}catch(e){throw t}}},af=Object.assign((async(e,t,n)=>{const r=uf(t);r.recursive=!1;const i=F(e);return i===e?r.mkdirAsync(e,r).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):r.mkdirAsync(e,r).then((()=>n||e),(async t=>{const o=t;if(o&&"ENOENT"===o.code)return af(i,r).then((t=>af(e,r,t)));if(o&&"EEXIST"!==o.code&&"EROFS"!==o.code)throw t;return r.statAsync(e).then((e=>{if(e.isDirectory())return n;throw t}),(()=>{throw t}))}))}),{sync:sf}),cf=async(e,t,n)=>{if(n!==t)return e.statAsync(t).then((e=>e.isDirectory()?n:void 0),(n=>n&&"ENOENT"===n.code?cf(e,F(t),t):void 0))},df=(e,t,n)=>{if(n!==t)try{return e.statSync(t).isDirectory()?n:void 0}catch(n){return n&&"ENOENT"===n.code?df(e,F(t),t):void 0}},lf=(e,t)=>{const n=uf(t);n.recursive=!0;if(F(e)===e)return n.mkdirSync(e,n);const r=df(n,e);try{return n.mkdirSync(e,n),r}catch(t){if(t&&"ENOENT"===t.code)return sf(e,n);throw t}},hf=Object.assign((async(e,t)=>{const n={...uf(t),recursive:!0};return F(e)===e?await n.mkdirAsync(e,n):cf(n,e).then((t=>n.mkdirAsync(e,n).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return af(e,n);throw t}))))}),{sync:lf}),pf=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,ff=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=D(e),"win32"===pf){const t=/[*|"<>?:]/,{root:n}=w(e);if(t.test(e.substring(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},mf=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),vf=+mf[0]>10||10===+mf[0]&&+mf[1]>=12,Ef=vf?e=>uf(e).mkdirSync===g:()=>!1,Af=Object.assign(vf?e=>uf(e).mkdir===A:()=>!1,{sync:Ef}),bf=(e,t)=>{e=ff(e);const n=uf(t);return Ef(n)?lf(e,n):sf(e,n)},yf=Object.assign((async(e,t)=>{e=ff(e);const n=uf(t);return Af(n)?hf(e,n):af(e,n)}),{mkdirpSync:bf,mkdirpNative:hf,mkdirpNativeSync:lf,mkdirpManual:af,mkdirpManualSync:sf,sync:bf,native:hf,nativeSync:lf,manual:af,manualSync:sf,useNative:Af,useNativeSync:Ef});class gf extends Error{path;code;syscall="chdir";constructor(e,t){super(`${t}: Cannot cd into '${e}'`),this.path=e,this.code=t}get name(){return"CwdError"}}class Cf extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(e,t){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=e,this.path=t}get name(){return"SymlinkError"}}const wf=(e,t)=>e.get(nh(t)),Ff=(e,t,n)=>e.set(nh(t),n),Df=(e,t,n)=>{e=nh(e);const r=t.umask??18,i=448|t.mode,o=0!==(i&r),u=t.uid,s=t.gid,a="number"==typeof u&&"number"==typeof s&&(u!==t.processUid||s!==t.processGid),c=t.preserve,d=t.unlink,l=t.cache,h=nh(t.cwd),p=(t,r)=>{t?n(t):(Ff(l,e,!0),r&&a?nf(r,u,s,(e=>p(e))):o?E.chmod(e,i,n):n())};if(l&&!0===wf(l,e))return p();if(e===h)return((e,t)=>{E.stat(e,((n,r)=>{!n&&r.isDirectory()||(n=new gf(e,n?.code||"ENOTDIR")),t(n)}))})(e,p);if(c)return yf(e,{mode:i}).then((e=>p(null,e??void 0)),p);const f=nh(O.relative(h,e)).split("/");Bf(h,f,i,l,d,h,void 0,p)},Bf=(e,t,n,r,i,o,u,s)=>{if(!t.length)return s(null,u);const a=t.shift(),c=nh(O.resolve(e+"/"+a));if(wf(r,c))return Bf(c,t,n,r,i,o,u,s);E.mkdir(c,n,If(c,t,n,r,i,o,u,s))},If=(e,t,n,r,i,o,u,s)=>a=>{a?E.lstat(e,((c,d)=>{if(c)c.path=c.path&&nh(c.path),s(c);else if(d.isDirectory())Bf(e,t,n,r,i,o,u,s);else if(i)E.unlink(e,(a=>{if(a)return s(a);E.mkdir(e,n,If(e,t,n,r,i,o,u,s))}));else{if(d.isSymbolicLink())return s(new Cf(e,e+"/"+t.join("/")));s(a)}})):Bf(e,t,n,r,i,o,u=u||e,s)},Rf=(e,t)=>{e=nh(e);const n=t.umask??18,r=448|t.mode,i=0!==(r&n),o=t.uid,u=t.gid,s="number"==typeof o&&"number"==typeof u&&(o!==t.processUid||u!==t.processGid),a=t.preserve,c=t.unlink,d=t.cache,l=nh(t.cwd),h=t=>{Ff(d,e,!0),t&&s&&of(t,o,u),i&&E.chmodSync(e,r)};if(d&&!0===wf(d,e))return h();if(e===l)return(e=>{let t,n=!1;try{n=E.statSync(e).isDirectory()}catch(e){t=e?.code}finally{if(!n)throw new gf(e,t??"ENOTDIR")}})(l),h();if(a)return h(bf(e,r)??void 0);const p=nh(O.relative(l,e)).split("/");let f;for(let e=p.shift(),t=l;e&&(t+="/"+e);e=p.shift())if(t=nh(O.resolve(t)),!wf(d,t))try{E.mkdirSync(t,r),f=f||t,Ff(d,t,!0)}catch(e){const n=E.lstatSync(t);if(n.isDirectory()){Ff(d,t,!0);continue}if(c){E.unlinkSync(t),E.mkdirSync(t,r),f=f||t,Ff(d,t,!0);continue}if(n.isSymbolicLink())return new Cf(t,t+"/"+p.join("/"))}return h(f)},jf=Object.create(null),{hasOwnProperty:Sf}=Object.prototype,_f=e=>(Sf.call(jf,e)||(jf[e]=e.normalize("NFD")),jf[e]),Uf="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);class Pf{#p=new Map;#f=new Map;#m=new Set;reserve(e,t){e=Uf?["win32 parallelization disabled"]:e.map((e=>Lh(L(_f(e))).toLowerCase()));const n=new Set(e.map((e=>(e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>{const n=e[e.length-1];return void 0!==n&&(t=L(n,t)),e.push(t||"/"),e}),[]);return t})(e))).reduce(((e,t)=>e.concat(t))));this.#f.set(t,{dirs:n,paths:e});for(const n of e){const e=this.#p.get(n);e?e.push(t):this.#p.set(n,[t])}for(const e of n){const n=this.#p.get(e);if(n){const e=n[n.length-1];e instanceof Set?e.add(t):n.push(new Set([t]))}else this.#p.set(e,[new Set([t])])}return this.#v(t)}#E(e){const t=this.#f.get(e);if(!t)throw new Error("function does not have any path reservations");return{paths:t.paths.map((e=>this.#p.get(e))),dirs:[...t.dirs].map((e=>this.#p.get(e)))}}check(e){const{paths:t,dirs:n}=this.#E(e);return t.every((t=>t&&t[0]===e))&&n.every((t=>t&&t[0]instanceof Set&&t[0].has(e)))}#v(e){return!(this.#m.has(e)||!this.check(e))&&(this.#m.add(e),e((()=>this.#A(e))),!0)}#A(e){if(!this.#m.has(e))return!1;const t=this.#f.get(e);if(!t)throw new Error("invalid reservation");const{paths:n,dirs:r}=t,i=new Set;for(const t of n){const n=this.#p.get(t);if(!n||n?.[0]!==e)continue;const r=n[1];if(r)if(n.shift(),"function"==typeof r)i.add(r);else for(const e of r)i.add(e);else this.#p.delete(t)}for(const t of r){const n=this.#p.get(t),r=n?.[0];if(n&&r instanceof Set)if(1!==r.size||1!==n.length)if(1===r.size){n.shift();const e=n[0];"function"==typeof e&&i.add(e)}else r.delete(e);else this.#p.delete(t)}return this.#m.delete(e),i.forEach((e=>this.#v(e))),!0}}const Of=Symbol("onEntry"),kf=Symbol("checkFs"),xf=Symbol("checkFs2"),Tf=Symbol("pruneCache"),Lf=Symbol("isReusable"),Nf=Symbol("makeFs"),qf=Symbol("file"),Mf=Symbol("directory"),Gf=Symbol("link"),zf=Symbol("symlink"),$f=Symbol("hardlink"),Wf=Symbol("unsupported"),Jf=Symbol("checkPath"),Vf=Symbol("mkdir"),Hf=Symbol("onError"),Zf=Symbol("pending"),Yf=Symbol("pend"),Kf=Symbol("unpend"),Xf=Symbol("ended"),Qf=Symbol("maybeClose"),em=Symbol("skip"),tm=Symbol("doChown"),nm=Symbol("uid"),rm=Symbol("gid"),im=Symbol("checkedCwd"),om="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),um=(e,t,n)=>void 0!==e&&e===e>>>0?e:void 0!==t&&t===t>>>0?t:n,sm=e=>Lh(nh(_f(e))).toLowerCase();class am extends Th{[Xf]=!1;[im]=!1;[Zf]=0;reservations=new Pf;transform;writable=!0;readable=!1;dirCache;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(e={}){if(e.ondone=()=>{this[Xf]=!0,this[Qf]()},super(e),this.transform=e.transform,this.dirCache=e.dirCache||new Map,this.chmod=!!e.chmod,"number"==typeof e.uid||"number"==typeof e.gid){if("number"!=typeof e.uid||"number"!=typeof e.gid)throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;void 0===e.preserveOwner&&"number"!=typeof e.uid?this.preserveOwner=!(!process.getuid||0!==process.getuid()):this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:1024,this.forceChown=!0===e.forceChown,this.win32=!!e.win32||om,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=nh(O.resolve(e.cwd||process.cwd())),this.strip=Number(e.strip)||0,this.processUmask=this.chmod?"number"==typeof e.processUmask?e.processUmask:process.umask():0,this.umask="number"==typeof e.umask?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",(e=>this[Of](e)))}warn(e,t,n={}){return"TAR_BAD_ARCHIVE"!==e&&"TAR_ABORT"!==e||(n.recoverable=!1),super.warn(e,t,n)}[Qf](){this[Xf]&&0===this[Zf]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[Jf](e){const t=nh(e.path),n=t.split("/");if(this.strip){if(n.length<this.strip)return!1;if("Link"===e.type){const t=nh(String(e.linkpath)).split("/");if(!(t.length>=this.strip))return!1;e.linkpath=t.slice(this.strip).join("/")}n.splice(0,this.strip),e.path=n.join("/")}if(isFinite(this.maxDepth)&&n.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:t,depth:n.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(n.includes("..")||om&&/^[a-z]:\.\.$/i.test(n[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;const[r,i]=$h(t);r&&(e.path=String(i),this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:e,path:t}))}if(O.isAbsolute(e.path)?e.absolute=nh(O.resolve(e.path)):e.absolute=nh(O.resolve(this.cwd,e.path)),!this.preservePaths&&"string"==typeof e.absolute&&0!==e.absolute.indexOf(this.cwd+"/")&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:nh(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&"Directory"!==e.type&&"GNUDumpDir"!==e.type)return!1;if(this.win32){const{root:t}=O.win32.parse(String(e.absolute));e.absolute=t+Zh(String(e.absolute).slice(t.length));const{root:n}=O.win32.parse(e.path);e.path=n+Zh(e.path.slice(n.length))}return!0}[Of](e){if(!this[Jf](e))return e.resume();switch(M.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=448|e.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[kf](e);default:return this[Wf](e)}}[Hf](e,t){"CwdError"===e.name?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[Kf](),t.resume())}[Vf](e,t,n){Df(nh(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t},n)}[tm](e){return this.forceChown||this.preserveOwner&&("number"==typeof e.uid&&e.uid!==this.processUid||"number"==typeof e.gid&&e.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[nm](e){return um(this.uid,e.uid,this.processUid)}[rm](e){return um(this.gid,e.gid,this.processGid)}[qf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.fmode,r=new md(String(e.absolute),{flags:Xp(e.size),mode:n,autoClose:!1});r.on("error",(n=>{r.fd&&N.close(r.fd,(()=>{})),r.write=()=>!0,this[Hf](n,e),t()}));let i=1;const o=n=>{if(n)return r.fd&&N.close(r.fd,(()=>{})),this[Hf](n,e),void t();0===--i&&void 0!==r.fd&&N.close(r.fd,(n=>{n?this[Hf](n,e):this[Kf](),t()}))};r.on("finish",(()=>{const t=String(e.absolute),n=r.fd;if("number"==typeof n&&e.mtime&&!this.noMtime){i++;const r=e.atime||new Date,u=e.mtime;N.futimes(n,r,u,(e=>e?N.utimes(t,r,u,(t=>o(t&&e))):o()))}if("number"==typeof n&&this[tm](e)){i++;const r=this[nm](e),u=this[rm](e);"number"==typeof r&&"number"==typeof u&&N.fchown(n,r,u,(e=>e?N.chown(t,r,u,(t=>o(t&&e))):o()))}o()}));const u=this.transform&&this.transform(e)||e;u!==e&&(u.on("error",(n=>{this[Hf](n,e),t()})),e.pipe(u)),u.pipe(r)}[Mf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.dmode;this[Vf](String(e.absolute),n,(n=>{if(n)return this[Hf](n,e),void t();let r=1;const i=()=>{0===--r&&(t(),this[Kf](),e.resume())};e.mtime&&!this.noMtime&&(r++,N.utimes(String(e.absolute),e.atime||new Date,e.mtime,i)),this[tm](e)&&(r++,N.chown(String(e.absolute),Number(this[nm](e)),Number(this[rm](e)),i)),i()}))}[Wf](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[zf](e,t){this[Gf](e,String(e.linkpath),"symlink",t)}[$f](e,t){const n=nh(O.resolve(this.cwd,String(e.linkpath)));this[Gf](e,n,"link",t)}[Yf](){this[Zf]++}[Kf](){this[Zf]--,this[Qf]()}[em](e){this[Kf](),e.resume()}[Lf](e,t){return"File"===e.type&&!this.unlink&&t.isFile()&&t.nlink<=1&&!om}[kf](e){this[Yf]();const t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,(t=>this[xf](e,t)))}[Tf](e){"SymbolicLink"===e.type?(e=>{for(const t of e.keys())e.delete(t)})(this.dirCache):"Directory"!==e.type&&((e,t)=>{t=sm(t);for(const n of e.keys()){const r=sm(n);r!==t&&0!==r.indexOf(t+"/")||e.delete(n)}})(this.dirCache,String(e.absolute))}[xf](e,t){this[Tf](e);const n=n=>{this[Tf](e),t(n)},r=()=>{this[Vf](this.cwd,this.dmode,(t=>{if(t)return this[Hf](t,e),void n();this[im]=!0,i()}))},i=()=>{if(e.absolute!==this.cwd){const t=nh(O.dirname(String(e.absolute)));if(t!==this.cwd)return this[Vf](t,this.dmode,(t=>{if(t)return this[Hf](t,e),void n();o()}))}o()},o=()=>{N.lstat(String(e.absolute),((t,r)=>{if(r&&(this.keep||this.newer&&r.mtime>(e.mtime??r.mtime)))return this[em](e),void n();if(t||this[Lf](e,r))return this[Nf](null,e,n);if(r.isDirectory()){if("Directory"===e.type){const t=t=>this[Nf](t??null,e,n);return this.chmod&&e.mode&&(4095&r.mode)!==e.mode?N.chmod(String(e.absolute),Number(e.mode),t):t()}if(e.absolute!==this.cwd)return N.rmdir(String(e.absolute),(t=>this[Nf](t??null,e,n)))}if(e.absolute===this.cwd)return this[Nf](null,e,n);((e,t)=>{if(!om)return N.unlink(e,t);const n=e+".DELETE."+G(16).toString("hex");N.rename(e,n,(e=>{if(e)return t(e);N.unlink(n,t)}))})(String(e.absolute),(t=>this[Nf](t??null,e,n)))}))};this[im]?i():r()}[Nf](e,t,n){if(e)return this[Hf](e,t),void n();switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[qf](t,n);case"Link":return this[$f](t,n);case"SymbolicLink":return this[zf](t,n);case"Directory":case"GNUDumpDir":return this[Mf](t,n)}}[Gf](e,t,n,r){N[n](t,String(e.absolute),(t=>{t?this[Hf](t,e):(this[Kf](),e.resume()),r()}))}}const cm=e=>{try{return[null,e()]}catch(e){return[e,null]}};class dm extends am{sync=!0;[Nf](e,t){return super[Nf](e,t,(()=>{}))}[kf](e){if(this[Tf](e),!this[im]){const t=this[Vf](this.cwd,this.dmode);if(t)return this[Hf](t,e);this[im]=!0}if(e.absolute!==this.cwd){const t=nh(O.dirname(String(e.absolute)));if(t!==this.cwd){const n=this[Vf](t,this.dmode);if(n)return this[Hf](n,e)}}const[t,n]=cm((()=>N.lstatSync(String(e.absolute))));if(n&&(this.keep||this.newer&&n.mtime>(e.mtime??n.mtime)))return this[em](e);if(t||this[Lf](e,n))return this[Nf](null,e);if(n.isDirectory()){if("Directory"===e.type){const t=this.chmod&&e.mode&&(4095&n.mode)!==e.mode,[r]=t?cm((()=>{N.chmodSync(String(e.absolute),Number(e.mode))})):[];return this[Nf](r,e)}const[t]=cm((()=>N.rmdirSync(String(e.absolute))));this[Nf](t,e)}const[r]=e.absolute===this.cwd?[]:cm((()=>(e=>{if(!om)return N.unlinkSync(e);const t=e+".DELETE."+G(16).toString("hex");N.renameSync(e,t),N.unlinkSync(t)})(String(e.absolute))));this[Nf](r,e)}[qf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.fmode,r=n=>{let r;try{N.closeSync(i)}catch(e){r=e}(n||r)&&this[Hf](n||r,e),t()};let i;try{i=N.openSync(String(e.absolute),Xp(e.size),n)}catch(e){return r(e)}const o=this.transform&&this.transform(e)||e;o!==e&&(o.on("error",(t=>this[Hf](t,e))),e.pipe(o)),o.on("data",(e=>{try{N.writeSync(i,e,0,e.length)}catch(e){r(e)}})),o.on("end",(()=>{let t=null;if(e.mtime&&!this.noMtime){const n=e.atime||new Date,r=e.mtime;try{N.futimesSync(i,n,r)}catch(i){try{N.utimesSync(String(e.absolute),n,r)}catch(e){t=i}}}if(this[tm](e)){const n=this[nm](e),r=this[rm](e);try{N.fchownSync(i,Number(n),Number(r))}catch(i){try{N.chownSync(String(e.absolute),Number(n),Number(r))}catch(e){t=t||i}}}r(t)}))}[Mf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.dmode,r=this[Vf](String(e.absolute),n);if(r)return this[Hf](r,e),void t();if(e.mtime&&!this.noMtime)try{N.utimesSync(String(e.absolute),e.atime||new Date,e.mtime)}catch(r){}if(this[tm](e))try{N.chownSync(String(e.absolute),Number(this[nm](e)),Number(this[rm](e)))}catch(r){}t(),e.resume()}[Vf](e,t){try{return Rf(nh(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[Gf](e,t,n,r){const i=`${n}Sync`;try{N[i](t,String(e.absolute)),r(),e.resume()}catch(t){return this[Hf](t,e)}}}const lm=yd((e=>{const t=new dm(e),n=e.file,r=N.statSync(n),i=e.maxReadSize||16777216;new fd(n,{readSize:i,size:r.size}).pipe(t)}),((e,t)=>{const n=new am(e),r=e.maxReadSize||16777216,i=e.file,o=new Promise(((e,t)=>{n.on("error",t),n.on("close",e),N.stat(i,((e,o)=>{if(e)t(e);else{const e=new pd(i,{readSize:r,size:o.size});e.on("error",t),e.pipe(n)}}))}));return o}),(e=>new dm(e)),(e=>new am(e)),((e,t)=>{t?.length&&Nh(e,t)})),hm=(e,t,n,r,i)=>{const o=new vd(e.file,{fd:r,start:n});t.pipe(o),pm(t,i)},pm=(e,t)=>{t.forEach((t=>{"@"===t.charAt(0)?qh({file:O.resolve(e.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:t=>e.add(t)}):e.add(t)})),e.end()},fm=async(e,t)=>{for(let n=0;n<t.length;n++){const r=String(t[n]);"@"===r.charAt(0)?await qh({file:O.resolve(String(e.cwd),r.slice(1)),noResume:!0,onReadEntry:t=>e.add(t)}):e.add(r)}e.end()},mm=yd(((e,t)=>{const n=new Gp(e);let r,i,o=!0;try{try{r=N.openSync(e.file,"r+")}catch(t){if("ENOENT"!==t?.code)throw t;r=N.openSync(e.file,"w+")}const u=N.fstatSync(r),s=Buffer.alloc(512);e:for(i=0;i<u.size;i+=512){for(let e=0,t=0;e<512;e+=t){if(t=N.readSync(r,s,e,s.length-e,i+e),0===i&&31===s[0]&&139===s[1])throw new Error("cannot append to compressed archives");if(!t)break e}const t=new Tl(s);if(!t.cksumValid)break;const n=512*Math.ceil((t.size||0)/512);if(i+n+512>u.size)break;i+=n,e.mtimeCache&&t.mtime&&e.mtimeCache.set(String(t.path),t.mtime)}o=!1,hm(e,n,i,r,t)}finally{if(o)try{N.closeSync(r)}catch(e){}}}),((e,t)=>{t=Array.from(t);const n=new Mp(e),r=new Promise(((r,i)=>{n.on("error",i);let o="r+";const u=(s,a)=>s&&"ENOENT"===s.code&&"r+"===o?(o="w+",N.open(e.file,o,u)):s||!a?i(s):void N.fstat(a,((o,u)=>{if(o)return N.close(a,(()=>i(o)));((t,n,r)=>{const i=(e,n)=>{e?N.close(t,(t=>r(e))):r(null,n)};let o=0;if(0===n)return i(null,0);let u=0;const s=Buffer.alloc(512),a=(r,c)=>{if(r||void 0===c)return i(r);if(u+=c,u<512&&c)return N.read(t,s,u,s.length-u,o+u,a);if(0===o&&31===s[0]&&139===s[1])return i(new Error("cannot append to compressed archives"));if(u<512)return i(null,o);const d=new Tl(s);if(!d.cksumValid)return i(null,o);const l=512*Math.ceil((d.size??0)/512);return o+l+512>n?i(null,o):(o+=l+512,o>=n?i(null,o):(e.mtimeCache&&d.mtime&&e.mtimeCache.set(String(d.path),d.mtime),u=0,void N.read(t,s,0,512,o,a)))};N.read(t,s,0,512,o,a)})(a,u.size,((o,u)=>{if(o)return i(o);const s=new md(e.file,{fd:a,start:u});n.pipe(s),s.on("error",i),s.on("close",r),fm(n,t)}))}));N.open(e.file,o,u)}));return r}),(()=>{throw new TypeError("file is required")}),(()=>{throw new TypeError("file is required")}),((e,t)=>{if(!e.file)throw new TypeError("file is required");if(e.gzip||e.brotli||e.file.endsWith(".br")||e.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!t?.length)throw new TypeError("no paths specified to add/replace")}));yd(mm.syncFile,mm.asyncFile,mm.syncNoFile,mm.asyncNoFile,((e,t=[])=>{mm.validate?.(e,t),vm(e)}));const vm=e=>{const t=e.filter;e.mtimeCache||(e.mtimeCache=new Map),e.filter=t?(n,r)=>t(n,r)&&!((e.mtimeCache?.get(n)??r.mtime??0)>(r.mtime??0)):(t,n)=>!((e.mtimeCache?.get(t)??n.mtime??0)>(n.mtime??0))};function Em(e){return Array.isArray(e)?e:[e]}const Am=/^\s+$/,bm=/(?:[^\\]|^)\\$/,ym=/^\\!/,gm=/^\\#/,Cm=/\r?\n/g,wm=/^\.*\/|^\.+$/;let Fm="node-ignore";"undefined"!=typeof Symbol&&(Fm=Symbol.for("node-ignore"));const Dm=Fm,Bm=/([0-z])-([0-z])/g,Im=()=>!1,Rm=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:n}=t;return t.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${i}`:"]"===i&&r.length%2==0?`[${(e=>e.replace(Bm,((e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:"")))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],jm=Object.create(null),Sm=e=>"string"==typeof e;class _m{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}}const Um=(e,t)=>{const n=e;let r=!1;0===e.indexOf("!")&&(r=!0,e=e.substr(1));const i=((e,t)=>{let n=jm[e];return n||(n=Rm.reduce(((t,[n,r])=>t.replace(n,r.bind(e))),e),jm[e]=n),t?new RegExp(n,"i"):new RegExp(n)})(e=e.replace(ym,"!").replace(gm,"#"),t);return new _m(n,e,r,i)},Pm=(e,t)=>{throw new t(e)},Om=(e,t,n)=>{if(!Sm(e))return n(`path must be a string, but got \`${t}\``,TypeError);if(!e)return n("path must not be empty",TypeError);if(Om.isNotRelative(e)){return n(`path should be a ${"`path.relative()`d"} string, but got "${t}"`,RangeError)}return!0},km=e=>wm.test(e);Om.isNotRelative=km,Om.convert=e=>e;class xm{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){var r,i,o;r=this,i=Dm,o=!0,Object.defineProperty(r,i,{value:o}),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[Dm])return this._rules=this._rules.concat(e._rules),void(this._added=!0);if((e=>e&&Sm(e)&&!Am.test(e)&&!bm.test(e)&&0!==e.indexOf("#"))(e)){const t=Um(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,Em(Sm(e)?(e=>e.split(Cm))(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach((i=>{const{negative:o}=i;if(r===o&&n!==r||o&&!n&&!r&&!t)return;i.regex.test(e)&&(n=!o,r=o)})),{ignored:n,unignored:r}}_test(e,t,n,r){const i=e&&Om.convert(e);return Om(i,e,this._allowRelativePaths?Im:Pm),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split("/")),r.pop(),!r.length)return t[e]=this._testOne(e,n);const i=this._t(r.join("/")+"/",t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return Em(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const Tm=e=>new xm(e);Tm.isPathValid=e=>Om(e&&Om.convert(e),e,Im),Tm.default=Tm;var Lm=Tm;if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");Om.convert=e;const t=/^[a-z]:\//i;Om.isNotRelative=e=>t.test(e)||km(e)}var Nm,qm=function(){function e(e,t){var n=this;if(this.exec=e,this.parameters=t,this.defaultEncoding="base64",this.getFileIgnoreFilter=function(e){if(void 0!==e){var t=Lm({allowRelativePaths:!0}).add(e);return function(e){return!t.ignores(e)}}},this.getTarTransformFn=function(e,t){return function(n){n.path=n.path.replace(e,t)}},this.ensureDirRemote=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){switch(i.label){case 0:return t=["mkdir","-p",e],[4,this.runCommand(t)];case 1:if(n=i.sent(),"Success"!==(null===(r=null==n?void 0:n.commandResult)||void 0===r?void 0:r.status))throw new Error("Failed creating remote directory.");return[2]}}))}))},this.ensureTarCmd=function(){return J(n,void 0,void 0,(function(){var e,t,n;return V(this,(function(r){switch(r.label){case 0:return e=["tar","--version"],[4,this.runCommand(e)];case 1:if(t=r.sent(),"Success"!==(null===(n=null==t?void 0:t.commandResult)||void 0===n?void 0:n.status))throw new Error("Tar command not found on remote container. Required for file copy.");return[2]}}))}))},this.pathExistsRemote=function(e){return J(n,void 0,void 0,(function(){var t;return V(this,(function(n){switch(n.label){case 0:return t=["test","-e",e],[4,this.runCommand(t)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.checkIsDirRemote=function(e){return J(n,void 0,void 0,(function(){var t;return V(this,(function(n){switch(n.label){case 0:return t=["test","-d",e],[4,this.runCommand(t)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.runCommand=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i,o,u,s,a,c;return V(this,(function(d){switch(d.label){case 0:return n=(t=this).exec,r=t.parameters,i=r.projectId,o=r.resourceId,u=r.resourceType,s=r.containerName,a={command:e,shell:"none",containerName:s},"service"!==u?[3,2]:[4,n.execServiceCommand({projectId:i,serviceId:o},a)];case 1:return c=d.sent(),[3,4];case 2:return[4,n.execJobCommand({projectId:i,jobId:o},a)];case 3:c=d.sent(),d.label=4;case 4:return[2,c]}}))}))},this.runSession=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i,o,u,s,a,c;return V(this,(function(d){switch(d.label){case 0:return n=(t=this).exec,r=t.parameters,i=r.projectId,o=r.resourceId,u=r.resourceType,s=r.containerName,a={command:e,shell:"none",tty:!1,encoding:this.defaultEncoding,containerName:s},"service"!==u?[3,2]:[4,n.execServiceSession({projectId:i,serviceId:o},a)];case 1:return c=d.sent(),[3,4];case 2:return[4,n.execJobSession({projectId:i,jobId:o},a)];case 3:c=d.sent(),d.label=4;case 4:return[2,c]}}))}))},!["service","job"].includes(t.resourceType))throw new Error("Invalid resource type: ".concat(t.resourceType,", only 'service' and 'job' supported"))}return e.prototype.uploadFiles=function(e,t,n){return J(this,void 0,void 0,(function(){var r,i,o,u,s,a,c,d,l,h,p,f;return V(this,(function(m){switch(m.label){case 0:if(void 0===e||!E.existsSync(e))throw new Error("Local path '".concat(e,"' does not exists but is required for uploads."));return r=E.lstatSync(e).isFile(),i=r?C.dirname(e):e,o=r?C.basename(e):".",u=r&&void 0!==t&&""!==C.extname(t),s=u?C.dirname(t):null!=t?t:i,a=void 0!==t?C.basename(t):o,c=Wp({gzip:{encoding:this.defaultEncoding},cwd:i,filter:this.getFileIgnoreFilter(n),preservePaths:!0,onWriteEntry:u?this.getTarTransformFn(o,a):void 0},wo(o)),[4,this.ensureTarCmd()];case 1:return m.sent(),[4,this.ensureDirRemote(s)];case 2:return m.sent(),d=H(H(["tar","-xzvf","-"],["--no-same-owner"],!0),["-C",s],!1),[4,this.runSession(d)];case 3:return l=m.sent(),h=new Do,p=new Do,l.stdErr.pipe(h),l.stdOut.pipe(p),c.pipe(l.stdIn),[4,l.waitForCommandResult()];case 4:if("Success"!==(null==(f=m.sent())?void 0:f.status))throw new Error("Failed to upload file to container: ".concat(null==f?void 0:f.message,", error details: ").concat(h.getContentsAsString(),"; ").concat(p.getContentsAsString()));return r?[2,{type:Nm.FILE_UPLOAD,sourceDirectory:i,sourceFile:o,targetDirectory:s,targetFile:a}]:[2,{type:Nm.DIRECTORY_UPLOAD,sourceDirectory:i,targetDirectory:s}]}}))}))},e.prototype.downloadFiles=function(e,t,n){return J(this,void 0,void 0,(function(){var r,i,o,u,s,a,c,d,l,h,p,f,m,v;return V(this,(function(A){switch(A.label){case 0:return(r=void 0===e)?[3,2]:[4,this.pathExistsRemote(e)];case 1:r=!A.sent(),A.label=2;case 2:if(r)throw new Error("Remote path '".concat(e,"' does not exists but is required for downloads."));return[4,this.checkIsDirRemote(e)];case 3:return i=A.sent(),o=i?e:C.dirname(e),u=i?".":C.basename(e),s=void 0!==t&&""!==C.extname(t),a=!i&&s?C.basename(t):u,(c=void 0!==t?s?C.dirname(t):t:".")&&E.mkdirSync(c,{recursive:!0}),d=wo(null!=n?n:[]).map((function(e){return"--exclude=".concat(e)})),l=H(H(["tar","-zcf","-"],["--no-same-owner"],!0),d,!0),h=H(H([],l,!0),["-C",o,u],!1),[4,this.runSession(h)];case 4:return p=A.sent(),f=lm({cwd:c,gzip:{encoding:this.defaultEncoding},onReadEntry:a?this.getTarTransformFn(u,a):void 0}),m=new Do,p.stdErr.pipe(m),p.stdOut.pipe(f),[4,p.waitForCommandResult()];case 5:if("Success"!==(null==(v=A.sent())?void 0:v.status))throw new Error("Failed to download file from container: ".concat(null==v?void 0:v.message,", error details: ").concat(m.getContentsAsString()));return i?[2,{type:Nm.DIRECTORY_DOWNLOAD,sourceDirectory:o,targetDirectory:c}]:[2,{type:Nm.FILE_DOWNLOAD,sourceDirectory:o,sourceFile:u,targetDirectory:c,targetFile:a}]}}))}))},e}();!function(e){e.DIRECTORY_UPLOAD="directory-upload",e.FILE_UPLOAD="file-upload",e.DIRECTORY_DOWNLOAD="directory-download",e.FILE_DOWNLOAD="file-download"}(Nm||(Nm={}));var Mm,Gm=function(){function e(e,t){this.exec=e,this.stdIgnoreList=["*.*~"],t&&(this.stdIgnoreList=t)}return e.prototype.downloadServiceFiles=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=e.serviceId,r=e.projectId,i={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(i,t,"download")];case 1:return[2,o.sent()]}}))}))},e.prototype.uploadServiceFiles=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=e.serviceId,r=e.projectId,i={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(i,t,"upload")];case 1:return[2,o.sent()]}}))}))},e.prototype.downloadJobFiles=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=e.jobId,r=e.projectId,i={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(i,t,"download")];case 1:return[2,o.sent()]}}))}))},e.prototype.uploadJobFiles=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:return n=e.jobId,r=e.projectId,i={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(i,t,"upload")];case 1:return[2,o.sent()]}}))}))},e.prototype.copy=function(e,t,n){var r;return J(this,void 0,void 0,(function(){var i,o;return V(this,(function(u){switch(u.label){case 0:switch(i=new qm(this.exec,W(W({},e),{containerName:t.containerName})),o=H(H([],null!==(r=t.ignoreList)&&void 0!==r?r:[],!0),this.stdIgnoreList,!0),n){case"download":return[3,1];case"upload":return[3,3]}return[3,5];case 1:return[4,i.downloadFiles(t.remotePath,t.localPath,o)];case 2:case 4:return[2,u.sent()];case 3:return[4,i.uploadFiles(t.localPath,t.remotePath,o)];case 5:return[2]}}))}))},e}(),zm=function(e){function t(t){var n=this.constructor,r=e.call(this,t.message)||this;r.name="NorthflankApiCallError",r.message=t.message,r.status=t.status,r.id=t.id,r.details=t.details;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i,r}return $(t,e),t}(Error),$m=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.baseUrl=t,o.logsConfig=n,o.token=r,o.agent=i,o.stop=function(){return J(o,void 0,void 0,(function(){var e;return V(this,(function(t){if(void 0===this.logSession)throw new Error("No command is running");return null===(e=this.remote)||void 0===e||e.close(),[2]}))}))},o}return $(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.types,r=e.entityId,i=e.entityType,o=e.buildId,u=e.runId,s=e.backupId,a=e.restoreId,c=e.deploymentId,d=e.isBuild,l=e.lineLimit,h=e.projectId,p=e.queryType,f=e.startTime,m=e.endTime,v=e.duration,E=e.direction,A=e.textIncludes,b=e.textNotIncludes,y=e.regexIncludes,g=e.regexNotIncludes,C="/v1/projects/".concat(h,"/"),w=new URLSearchParams;return w.append("queryType",p),void 0!==f&&w.append("startTime",f.toISOString()),void 0!==m&&w.append("endTime",m.toISOString()),void 0!==l&&w.append("lineLimit",l.toString()),void 0!==t&&w.append("containerName",t),void 0!==c&&w.append("deploymentId",c),void 0!==u&&w.append("runId",u),void 0!==o&&w.append("buildId",o),void 0!==A&&w.append("textIncludes",A),void 0!==b&&w.append("textNotIncludes",b),void 0!==y&&w.append("regexIncludes",y),void 0!==g&&w.append("regexNotIncludes",g),void 0!==E&&w.append("direction",E),void 0!==v&&w.append("duration",v.toString()),void 0!==n&&n.forEach((function(e){return w.append("type",e)})),"".concat(C).concat(function(){var e=d?"/build-logs":"/logs";switch(i){case"service":return"services/".concat(r).concat(e);case"job":return"jobs/".concat(r).concat(e);case"addon":return"addons/".concat(r).concat(e);case"addonBackup":return"addons/".concat(r,"/backups/").concat(s).concat(e);case"addonRestore":return"addons/".concat(r,"/backups/").concat(s,"/restores/").concat(a).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(i))}}(),"?").concat(w.toString())},Object.defineProperty(t.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(t.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),t.prototype.start=function(){return J(this,void 0,void 0,(function(){var e=this;return V(this,(function(t){switch(t.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(t,n){var r,i,o,u;void 0!==e.remote&&n(Error("Command is already running"));var s=e.logsEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new ya(s,{agent:e.agent}),null===(r=e.remote)||void 0===r||r.on("message",(function(t){var n,r,i=JSON.parse(t.toString());switch(null==i?void 0:i.type){case"init":var o=i.data;"successful"!==o.auth&&a("Log tail initialization failed: ".concat(null!==(n=null==o?void 0:o.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var u=i.data;e.emit("logs-received",u.map(rv));break;case"error":a(null===(r=i.data)||void 0===r?void 0:r.message);break;default:var s="unable to parse message: ".concat(JSON.stringify(i));a(s)}})),null===(i=e.remote)||void 0===i||i.on("close",(function(){e.emit("close"),e.reset(),t()})),null===(o=e.remote)||void 0===o||o.on("open",(function(){e.emit("open")})),null===(u=e.remote)||void 0===u||u.on("error",(function(n){e.emit("error",n),e.reset(),t()}));var a=function(t){e.emit("error",{message:t}),e.reset(),n(new Error(t))}})),[4,new Promise((function(t){var n;e.remote.on("open",(function(){return t()})),null===(n=e.remote)||void 0===n||n.on("error",(function(){t()}))}))];case 1:return t.sent(),this.initialAuth(),[2,this.logSession]}}))}))},t.prototype.initialAuth=function(){var e,t={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(e=this.remote)||void 0===e||e.send(JSON.stringify(t))},t.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},t}(t),Wm=function(){if(go)try{return JSON.parse(E.readFileSync(C.join(C.dirname(c(import.meta.url)),"../../package.json")).toString())}catch(e){return{}}return{}},Jm=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return J(n,void 0,void 0,(function(){return V(this,(function(t){return[2,this.executeCall(e)]}))}))},this.contextProvider=e}return e.prototype.getDefaultHeaders=function(){var e,t,n=this.contextProvider.getCurrentToken(),r=(null===(e=this.opts)||void 0===e?void 0:e.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(t=Wm())||void 0===t?void 0:t.version).concat(r)}},e.prototype.executeCall=function(e){var t;return J(this,void 0,void 0,(function(){var n,r,i,o,u,s,a,c,d,l,h,p,f=this;return V(this,(function(m){switch(m.label){case 0:if(n=this.method,r=this.opts.agent,i={method:n,headers:this.getDefaultHeaders(),agent:r},!(o=null===(t=this.contextProvider)||void 0===t?void 0:t.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return u="".concat(o).concat(this.endpointUrl(e)),s=this.body(e),a=W(W({url:u},i),{body:s}),[4,ev(u,W(W({},i),{body:s}))];case 1:return[4,(c=m.sent()).text()];case 2:return d=m.sent(),l=function(){if(200!==c.status){var e=null==h?void 0:h.error,t=(null==e?void 0:e.message)||"",n={status:c.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(f.opts.throwErrorOnHttpErrorCode)throw new zm(n);return n}},h=function(){try{return JSON.parse(d)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(c.statusText," (").concat(c.status,")\n\tMessage: ").concat(d))}}(),p=l(),[2,{data:null==h?void 0:h.data,rawResponse:c,request:a,error:p,pagination:null==h?void 0:h.pagination}]}}))}))},e}(),Vm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return $(t,e),t}(Jm),Hm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.all=function(e){return J(t,void 0,void 0,(function(){return V(this,(function(t){return[2,new Qm(this,e).getAll()]}))}))},t.call=function(n){return J(t,void 0,void 0,(function(){var t,r=this;return V(this,(function(i){switch(i.label){case 0:return[4,e.prototype.executeCall.call(this,n)];case 1:return t=i.sent(),[2,W(W({},t),{pagination:W(W({},t.pagination),{getNextPage:function(){return J(r,void 0,void 0,(function(){var e,r,i,o,u,s,a,c=this;return V(this,(function(d){return void 0===(null===(s=t.pagination)||void 0===s?void 0:s.cursor)?(e=Object.keys(t.data),r=1===e.length?((u={})[e[0]]=[],u):{},i=W(W({},t),{pagination:W(W({},t.pagination),{count:0}),data:r}),[2,(o=function(e){return W(W({},e),{pagination:W(W({},e.pagination),{getNextPage:function(){return J(c,void 0,void 0,(function(){return V(this,(function(t){return[2,o(e)]}))}))}})})})(i)]):[2,new Qm(this,n,null===(a=t.pagination)||void 0===a?void 0:a.cursor).getNext()]}))}))}})})]}}))}))},t}return $(t,e),t}(Vm),Zm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return $(t,e),t}(Jm),Ym=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return $(t,e),t}(Jm),Km=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return $(t,e),t}(Jm),Xm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return $(t,e),t}(Jm),Qm=function(){function e(e,t,n){void 0===n&&(n=null);var r=this;this.endpoint=e,this.opts=t,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(e.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),e.prototype.getNext=function(){var e,t,n;return J(this,void 0,void 0,(function(){var r,i,o,u,s,a;return V(this,(function(c){switch(c.label){case 0:return[4,this.endpoint.call(W(W({},this.opts),{options:W(W({},null===(e=this.opts)||void 0===e?void 0:e.options),{cursor:null!==(t=this.cursor)&&void 0!==t?t:void 0})}))];case 1:return r=c.sent(),i=r.data,o=r.request,u=r.error,s=r.pagination,a=r.rawResponse,this.cursor=null==s?void 0:s.cursor,this._currentOffset+=null!==(n=null==s?void 0:s.count)&&void 0!==n?n:0,[2,{data:i,request:o,error:u,pagination:s,rawResponse:a}]}}))}))},e.prototype.getAll=function(){var e,t;return J(this,void 0,void 0,(function(){var n,r,i,o,u;return V(this,(function(s){switch(s.label){case 0:n=[],s.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=s.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return o=n.flatMap((function(e){var t=Object.keys(e.data);return 1===t.length?(i=t[0],e.data[t[0]]):e.data})),[2,{data:void 0===i?o:(u={},u[i]=o,u),request:null===(e=n[0])||void 0===e?void 0:e.request,rawResponse:null===(t=n[0])||void 0===t?void 0:t.rawResponse}]}}))}))},e}(),ev=function(e,t,n,r){return void 0===t&&(t={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(i,o){var u=function(n){return Co(e,t).then((function(e){i(e)})).catch((function(e){return J(void 0,void 0,void 0,(function(){return V(this,(function(t){switch(t.label){case 0:return n>0?[4,(i=r,new Promise((function(e){setTimeout((function(){e()}),i)})))]:[3,2];case 1:return t.sent(),[2,u(n-1)];case 2:return[2,o(e)]}var i}))}))}))};return u(n)}))},tv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch log lines over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){return $m.getLogsEndpoint(e)},t.body=function(){},t}return $(t,e),t}(Vm);!function(e){e.CDN="cdn",e.Mesh="mesh",e.Ingress="ingress",e.Runtime="runtime"}(Mm||(Mm={}));var nv,rv=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},iv=function(e,t){void 0===t&&(t={});var n=this;this.contextProvider=e,this.clientOpts=t,this.getServiceLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.projectId,i=t.serviceId,o={entityId:i,projectId:r},[2,this.logRange(o,W(W({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.projectId,i=t.jobId,o={entityId:i,projectId:r},[2,this.logRange(o,W(W({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,W(W({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i;return V(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},i={backupId:t.backupId,restoreId:t.restoreId},[2,this.logRange(r,W(W({},n),i),"addonRestore")]}))}))},this.logRange=function(e,t,r){return J(n,void 0,void 0,(function(){var n,i,o,u,s;return V(this,(function(a){switch(a.label){case 0:return n=e.entityId,i=e.projectId,o=W(W({projectId:i,entityId:n,entityType:r},t),{queryType:"range"}),[4,new tv(this.contextProvider,this.clientOpts).call(o)];case 1:return(u=a.sent()).error?[2,u]:[2,W(W({},u),{data:null===(s=null==u?void 0:u.data)||void 0===s?void 0:s.map(rv)})]}}))}))},this.tailServiceLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.serviceId,i=t.projectId,o={entityId:r,projectId:i},[2,this.logTail(o,W(W({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.projectId,i=t.jobId,o={entityId:i,projectId:r},[2,this.logTail(o,W(W({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,W(W({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return J(n,void 0,void 0,(function(){var t,n,r,i;return V(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},i={backupId:t.backupId,restoreId:t.restoreId},[2,this.logTail(r,W(W({},n),i),"addonRestore")]}))}))},this.logTail=function(e,t,r){return J(n,void 0,void 0,(function(){var n,i,o,u,s;return V(this,(function(a){if(n=e.entityId,i=e.projectId,o=W({queryType:"tail",projectId:i,entityId:n,entityType:r},t),this.assertStartedWithNodejs(),u=this.contextProvider.getCurrentBaseUrl(!0),!(s=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new $m(u,o,s,this.clientOpts.agent)]}))}))},this.assertStartedWithNodejs=function(){if(!go)throw new Error("Command exec only possible when started with nodejs")}},ov=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch metrics entries over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){var t=e.projectId,n=e.entityId,r=e.entityType,i=e.deploymentId,o=e.runId,u=e.buildId,s=e.isBuild,a=e.queryType,c=e.metricTypes,d=e.startTime,l=e.endTime,h=e.duration,p=e.containerName,f=e.timestamp,m="/v1/projects/".concat(t,"/");var v=new URLSearchParams;return v.append("queryType",a),void 0!==d&&v.append("startTime",d.toISOString()),void 0!==l&&v.append("endTime",l.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==i&&v.append("deploymentId",i),void 0!==o&&v.append("runId",o),void 0!==u&&v.append("buildId",u),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==h&&v.append("duration",h.toString()),void 0!==c&&c.forEach((function(e){return v.append("metricTypes",e)})),"".concat(m).concat(function(){var e=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},t.body=function(){},t}return $(t,e),t}(Vm),uv=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};!function(e){e.Cpu="cpu",e.Memory="memory",e.NetworkIngress="networkIngress",e.NetworkEgress="networkEgress",e.TcpConnectionOpen="tcpConnectionsOpen",e.PvcUsage="diskUsage",e.Requests="requests",e.Http4xxResponses="http4xxResponses",e.Http5xxResponses="http5xxResponses",e.Bandwidth="bandwidth",e.BandwidthVolume="bandwidthVolume"}(nv||(nv={}));var sv=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return J(t,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(e){return J(t,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.serviceId,i=t.projectId,o={entityId:r,projectId:i},[2,this.metricsSingle(o,W(W({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return J(t,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(e){return J(t,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.jobId,i=t.projectId,o={entityId:r,projectId:i},[2,this.metricsSingle(o,W(W({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return J(t,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(e,n,r){return J(t,void 0,void 0,(function(){var t,i,o;return V(this,(function(u){return t=e.entityId,i=e.projectId,o=W(W({projectId:i,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(o)]}))}))},this.getServiceMetricsRange=function(e){return J(t,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(e){return J(t,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.projectId,i=t.serviceId,o={entityId:i,projectId:r},[2,this.metricsRange(o,W(W({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return J(t,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(e){return J(t,void 0,void 0,(function(){var t,n,r,i,o;return V(this,(function(u){return t=e.parameters,n=e.options,r=t.projectId,i=t.jobId,o={entityId:i,projectId:r},[2,this.metricsRange(o,W(W({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return J(t,void 0,void 0,(function(){var t,n,r;return V(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(e,n,r){return J(t,void 0,void 0,(function(){var t,i,o;return V(this,(function(u){return t=e.entityId,i=e.projectId,o=W(W({projectId:i,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(o)]}))}))},this.getMetrics=function(e){return J(t,void 0,void 0,(function(){var t;return V(this,(function(n){switch(n.label){case 0:return[4,new ov(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,W(W({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,W(W({},n),{values:n.values.map(uv)})]})))})]}}))}))}},av=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the available addon types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/addon-types"},t.body=function(){},t}return $(t,e),t}(Vm),cv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backup destinations saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/backup-destinations".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),dv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new backup destination to this account.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Create",t.endpointUrl=function(e){return"/v1/backup-destinations"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),lv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a backup destination, including secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){return["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return $(t,e),t}(Vm),hv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Update",t.endpointUrl=function(e){return["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),pv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Delete",t.endpointUrl=function(e){return["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return $(t,e),t}(Ym),fv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backups associated with a backup destinations.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){var t;["backupDestinationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId),"/backups").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),mv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of past invoices",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),vv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},t.body=function(){},t}return $(t,e),t}(Vm),Ev=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud providers",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/cloud-providers"},t.body=function(){},t}return $(t,e),t}(Vm),Av=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists clusters for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),bv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),yv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or update a cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),gv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return $(t,e),t}(Vm),Cv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),wv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given cluster. Fails if the cluster has associated projects.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Delete",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return $(t,e),t}(Ym),Fv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of nodes for the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t;["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Dv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/cordon")},t.body=function(){},t}return $(t,e),t}(Zm),Bv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Drain a node by evicting all running pods.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/drain")},t.body=function(){},t}return $(t,e),t}(Zm),Iv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Uncordon a node on the cluster if it was previously cordoned.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/uncordon")},t.body=function(){},t}return $(t,e),t}(Zm),Rv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists docker registries for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),jv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/docker-registries"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Sv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Create",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),_v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given docker registry",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return $(t,e),t}(Vm),Uv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Update",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(e.parameters.registryId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),Pv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Delete",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return $(t,e),t}(Ym),Ov=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),kv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),xv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),Tv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return $(t,e),t}(Vm),Lv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Update",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(e.parameters.integrationId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),Nv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given integration. Fails if the integration is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Delete",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return $(t,e),t}(Ym),qv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider node types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Mv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Gv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the partially random string used when generating host names for the authenticated account.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return"/v1/dns-id"},t.body=function(){},t}return $(t,e),t}(Vm),zv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available domains",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/domains".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),$v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Registers a new domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return"/v1/domains"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Wv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return $(t,e),t}(Vm),Jv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a domain and each of its registered subdomains.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Delete",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return $(t,e),t}(Ym),Vv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve certificate data for a domain to verify its contents.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/certificate")},t.body=function(){},t}return $(t,e),t}(Vm),Hv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Import a certificate for the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Zv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new subdomain to the domain.",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Yv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Read",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return $(t,e),t}(Vm),Kv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from a domain.",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return $(t,e),t}(Ym),Xv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assigns a service port to the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Qv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from its assigned service",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){var t;["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign").concat(r)},t.body=function(){},t}return $(t,e),t}(Ym),eE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes the CDN integration from the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),tE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Enables a CDN integration on the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),nE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new path to the subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Create",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),rE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List paths for a given subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Read",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(){},t}return $(t,e),t}(Vm),iE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get subdomain path details.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Read",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return $(t,e),t}(Vm),oE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return $(t,e),t}(Ym),uE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a subdomain path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),sE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),aE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unassign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(){},t}return $(t,e),t}(Ym),cE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Subdomains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/verify")},t.body=function(){},t}return $(t,e),t}(Zm),dE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attempts to verify the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(encodeURIComponent(e.parameters.domain),"/verify")},t.body=function(){},t}return $(t,e),t}(Zm),lE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of log sinks added to this account.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),hE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Create",t.endpointUrl=function(e){return"/v1/integrations/log-sinks"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),pE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return $(t,e),t}(Vm),fE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Delete",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return $(t,e),t}(Ym),mE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pauses a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId),"/pause")},t.body=function(){},t}return $(t,e),t}(Zm),vE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes a paused log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId),"/resume")},t.body=function(){},t}return $(t,e),t}(Zm),EE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the settings for a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(e.parameters.logSinkId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),AE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists notification integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),bE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),yE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return $(t,e),t}(Vm),gE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(e.parameters.notificationId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),CE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return $(t,e),t}(Ym),wE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the container registry credentials saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),FE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new set of container registry credentials to this account.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Create",t.endpointUrl=function(e){return"/v1/integrations/registries"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),DE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Views a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read Encrypted",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return $(t,e),t}(Vm),BE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Delete",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return $(t,e),t}(Ym),IE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Update",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(e.parameters.credentialId),"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),RE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists linked version control providers",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){return"/v1/integrations/vcs"},t.body=function(){},t}return $(t,e),t}(Vm),jE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generate a token for a specific VCS link.",t.withAuth=!0,t.requiredPermissions="Account > Git > Tokens > Read",t.endpointUrl=function(e){var t;["customVCSId","vcsLinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(encodeURIComponent(e.parameters.customVCSId),"/token/").concat(encodeURIComponent(e.parameters.vcsLinkId)).concat(r)},t.body=function(){},t}return $(t,e),t}(Zm),SE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of repositories accessible to this account",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),_E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of branches for the repo",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t;["vcsService","repositoryOwner","repositoryName"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(encodeURIComponent(e.parameters.vcsService),"/").concat(encodeURIComponent(e.parameters.repositoryOwner),"/").concat(encodeURIComponent(e.parameters.repositoryName),"/branches").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),UE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available billing plans",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/plans"},t.body=function(){},t}return $(t,e),t}(Vm),PE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists projects for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),OE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),kE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),xE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Update",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),TE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given project",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId))},t.body=function(){},t}return $(t,e),t}(Vm),LE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given project. Fails if the project isn't empty.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Delete",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId)).concat(r)},t.body=function(){},t}return $(t,e),t}(Ym),NE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of addons belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),qE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),ME=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),GE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return $(t,e),t}(Vm),zE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),$E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return $(t,e),t}(Ym),WE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about an addon's backup schedules",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),JE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),VE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","scheduleId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(e.parameters.scheduleId))},t.body=function(){},t}return $(t,e),t}(Ym),HE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of backups for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),ZE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Initiates a backup for the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),YE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return $(t,e),t}(Vm),KE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a given backup",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return $(t,e),t}(Ym),XE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the in progress backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort")},t.body=function(){},t}return $(t,e),t}(Zm),QE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts an in-progress backup restore.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort-restore").concat(r)},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),eA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generates a temporary download link for downloading the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/download-link")},t.body=function(){},t}return $(t,e),t}(Vm),tA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores the given addon to the given backup state.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restore").concat(r)},t.body=function(){},t}return $(t,e),t}(Zm),nA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of restores for the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restores").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),rA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/retain")},t.body=function(){},t}return $(t,e),t}(Zm),iA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/containers").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),oA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the credentials for connecting to the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/credentials")},t.body=function(){},t}return $(t,e),t}(Vm),uA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Imports a database from an external archive or existing live database.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),sA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the network settings for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),aA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pause")},t.body=function(){},t}return $(t,e),t}(Zm),cA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Reset the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/reset")},t.body=function(){},t}return $(t,e),t}(Zm),dA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restart the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restart")},t.body=function(){},t}return $(t,e),t}(Zm),lA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of restores for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restores").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),hA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resume the given addon if it is paused.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/resume")},t.body=function(){},t}return $(t,e),t}(Zm),pA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the allocated resources for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),fA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the security rules for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),mA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the current addon version including available upgrades and upgrade history.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(){},t}return $(t,e),t}(Vm),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["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),EA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of jobs belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),AA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),bA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),yA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),gA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),CA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),wA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),FA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return $(t,e),t}(Vm),DA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Delete",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return $(t,e),t}(Ym),BA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/branches").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),IA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists builds for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),RA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given job. Given a commit sha, it will build that commit.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),jA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments").concat(r)},t.body=function(){},t}return $(t,e),t}(Vm),SA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets build arguments for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),_A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments/details")},t.body=function(){},t}return $(t,e),t}(Vm),UA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),PA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),OA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return $(t,e),t}(Vm),kA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job build",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return $(t,e),t}(Ym),xA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/containers").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),TA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(){},t}return $(t,e),t}(Vm),LA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),NA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(){},t}return $(t,e),t}(Vm),qA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),MA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pause")},t.body=function(){},t}return $(t,e),t}(Zm),GA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pull-requests").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),zA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),$A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetches run history for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),WA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Starts a new job run for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),JA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns data about the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return $(t,e),t}(Vm),VA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return $(t,e),t}(Ym),HA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment").concat(r)},t.body=function(){},t}return $(t,e),t}(Vm),ZA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),YA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Jobs > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment/details")},t.body=function(){},t}return $(t,e),t}(Vm),KA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Scale Job",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),XA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates settings for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),QA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modify cron job to toggle suspending of its schedule.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),eb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists all pipelines for a project",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),tb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a pipeline",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId))},t.body=function(){},t}return $(t,e),t}(Vm),nb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),rb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),ib=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of active preview environments for a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),ob=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a preview environment generated by a preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["projectId","pipelineId","previewId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(e.parameters.previewId))},t.body=function(){},t}return $(t,e),t}(Ym),ub=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of preview template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),sb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return $(t,e),t}(Vm),ab=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(){},t}return $(t,e),t}(Vm),cb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),db=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),lb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists runs of a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),hb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return $(t,e),t}(Vm),pb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId),"/abort")},t.body=function(){},t}return $(t,e),t}(Zm),fb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of secrets belonging to the project",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),mb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),vb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),Eb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),Ab=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret including its contents",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t;["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId)).concat(r)},t.body=function(){},t}return $(t,e),t}(Vm),bb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(){},t}return $(t,e),t}(Ym),yb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),gb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Link an addon to the secret group or edit the settings of the linked addon.",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Cb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a given addon link.",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return $(t,e),t}(Vm),wb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unlinks an addon from the secret group.",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return $(t,e),t}(Ym),Fb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret with details about its linked addons",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/details")},t.body=function(){},t}return $(t,e),t}(Vm),Db=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of services belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Bb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Ib=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),Rb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/build/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),jb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Sb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),_b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/combined/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),Ub=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Pb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),Ob=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),kb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(){},t}return $(t,e),t}(Vm),xb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Delete",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId)).concat(r)},t.body=function(){},t}return $(t,e),t}(Ym),Tb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/branches").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Lb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the builds for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Nb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),qb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments").concat(r)},t.body=function(){},t}return $(t,e),t}(Vm),Mb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the build arguments for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Gb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments/details")},t.body=function(){},t}return $(t,e),t}(Vm),zb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),$b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given build or combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Wb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return $(t,e),t}(Vm),Jb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given service build",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return $(t,e),t}(Ym),Vb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/containers").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Hb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(){},t}return $(t,e),t}(Vm),Zb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Yb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(){},t}return $(t,e),t}(Vm),Kb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Xb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pause")},t.body=function(){},t}return $(t,e),t}(Zm),Qb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(){},t}return $(t,e),t}(Vm),ey=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the list of ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),ty=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pull-requests").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),ny=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restarts the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/restart")},t.body=function(){},t}return $(t,e),t}(Zm),ry=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),iy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment").concat(r)},t.body=function(){},t}return $(t,e),t}(Vm),oy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),uy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Secrets > Services > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment/details")},t.body=function(){},t}return $(t,e),t}(Vm),sy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Scale Service",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),ay=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of volumes belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(){},t}return $(t,e),t}(Vm),cy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a volume with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),dy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return $(t,e),t}(Vm),ly=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update volume mounts and storage size",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),hy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes this volume and its associated data.",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Delete",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return $(t,e),t}(Ym),py=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),fy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Detach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),my=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available project regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/regions"},t.body=function(){},t}return $(t,e),t}(Vm),vy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List the resource tags for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/tags".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Ey=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Add a new resource tag for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Create",t.endpointUrl=function(e){return"/v1/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Ay=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update or create a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Km),by=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View details for a given resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Read",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return $(t,e),t}(Vm),yy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Patch a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Xm),gy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Delete",t.endpointUrl=function(e){return["resourceTagId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return $(t,e),t}(Ym),Cy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of templates",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates".concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),wy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return"/v1/templates"},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Fy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId)).concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),Dy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Update",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId))},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),By=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId))},t.body=function(){},t}return $(t,e),t}(Ym),Iy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Run a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Run",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return $(t,e),t}(Zm),Ry=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs").concat(r)},t.body=function(){},t}return $(t,e),t}(Hm),jy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return $(t,e),t}(Vm),Sy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > Runs > Abort",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId),"/abort")},t.body=function(){},t}return $(t,e),t}(Zm),_y=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 J(this,void 0,void 0,(function(){return V(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),J(this,void 0,void 0,(function(){var n,r,i;return V(this,(function(o){switch(o.label){case 0:if(t||void 0===this.findContext(e.name))return[3,1];throw new Error("Context with name ".concat(e.name," already exists"));case 1:return[4,this.removeContext(e.name)];case 2:o.sent(),o.label=3;case 3:return n=W({host:"https://api.northflank.com"},e),r=this.contextWrapper,i={current:n.name,contexts:H(H([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(i)];case 4:return o.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return J(this,void 0,void 0,(function(){var t,n,r,i;return V(this,(function(o){switch(o.label){case 0:return t=this.contextWrapper,n=t.contexts.filter((function(t){return t.name!==e})),r=t.current===e?void 0:t.current,i={current:r,contexts:H([],n,!0),lastUpdateCheck:t.lastUpdateCheck},[4,this.storeContext(i)];case 1:return o.sent(),[2]}}))}))},e.prototype.getCurrentContext=function(){var e=this.contextWrapper.current;return void 0===e?e:this.findContext(e)},e.prototype.findContext=function(e){return this.contextWrapper.contexts.find((function(t){return t.name===e}))},e.prototype.getCurrentBaseUrl=function(e){var t=this.getCurrentContext();if(!0===e&&!(null==t?void 0:t.host))throw new Error("Context (".concat(null==t?void 0:t.name,") doesn't have a target API host. Please login again."));return null==t?void 0:t.host},e.prototype.getCurrentProjectName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.project},e.prototype.getCurrentName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.name},e.prototype.getCurrentToken=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.token},e.prototype.getCurrentServiceName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.service},e.prototype.getCurrentJobName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.job},e.prototype.getCurrentPlanId=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.plan},e.prototype.getCurrentRegion=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.region},e.prototype.useContext=function(e){return J(this,void 0,void 0,(function(){var t,n;return V(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=W(W({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return J(this,void 0,void 0,(function(){var n,r,i,o,u;return V(this,(function(s){switch(s.label){case 0:if(n=null!=t?t:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(t," doesn't exist"));return i=this.contextWrapper,o=i.contexts.map((function(t){return t.name===n?W(W({},r),{token:e}):t})),u=W(W({},i),{contexts:o}),[4,this.storeContext(u)];case 1:return s.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return J(this,void 0,void 0,(function(){var t,n;return V(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=W(W({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return J(this,void 0,void 0,(function(){var t,n;return V(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=W(W({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return J(this,void 0,void 0,(function(){var t,n;return V(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=W(W({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return J(this,void 0,void 0,(function(){var t,n;return V(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=W(W({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return J(this,void 0,void 0,(function(){var t,n;return V(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=W(W({},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 J(this,void 0,void 0,(function(){var t,n;return V(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=W(W({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),Uy=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return J(n,void 0,void 0,(function(){var t;return V(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),E.existsSync(e)?[3,2]:[4,E.promises.mkdir(e,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 4:return[2]}}))}))},n.configPath=t||"".concat(p.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return $(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(E.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return J(this,void 0,void 0,(function(){var t;return V(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,E.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 J(this,void 0,void 0,(function(){return V(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}(_y),Py=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return $(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return J(this,void 0,void 0,(function(){return V(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(_y),Oy=function(e,t){void 0===t&&(t={});var n,r,i,o=this;this.baseUrl=function(){return o.contextProvider.getCurrentBaseUrl()},this.contextProvider=e,this.forwarding=new Ha(e,new Db(e,t),new NE(e,t),t.agent),this.exec=new Ka(e,t.agent),this.logs=new iv(e,t),this.metrics=new sv(e),this.fileCopy=new Gm(this.exec),this.endpoints={get:(i={},i.addon=((r=new GE(e,t)).types=new av(e,t),r.backupSchedules=new WE(e,t),r.backups=new HE(e,t),r.backup=((n=new YE(e,t)).download=new eA(e,t),n.restores=new nA(e,t),n),r.containers=new iA(e,t),r.credentials=new oA(e,t),r.restores=new lA(e,t),r.version=new mA(e,t),r),i.backupDestination=new lv(e,t),i.invoice=function(){var n={};return n.details=new vv(e,t),n}(),i.cloud=function(){var n={};return n.cluster=new gv(e,t),n.dockerRegistry=new _v(e,t),n.integration=new Tv(e,t),n}(),i.dnsId=new Gv(e,t),i.domain=new Wv(e,t),i.domainCertificate=new Vv(e,t),i.subdomain=function(){var n=new Yv(e,t);return n.path=new iE(e,t),n}(),i.logSink=new pE(e,t),i.notification=new yE(e,t),i.registryCredentials=new DE(e,t),i.project=new TE(e,t),i.job=function(){var n=new FA(e,t);return n.branches=new BA(e,t),n.builds=new IA(e,t),n.buildArguments=new jA(e,t),n.buildArgumentDetails=new _A(e,t),n.build=new OA(e,t),n.containers=new xA(e,t),n.deployment=new TA(e,t),n.healthChecks=new NA(e,t),n.pullRequests=new GA(e,t),n.runs=new $A(e,t),n.run=new JA(e,t),n.runtimeEnvironment=new HA(e,t),n.runtimeEnvironmentDetails=new YA(e,t),n}(),i.pipeline=new tb(e,t),i.previewTemplate=new nb(e,t),i.previewTemplateRun=new sb(e,t),i.releaseFlow=new ab(e,t),i.releaseFlowRun=new hb(e,t),i.secret=new Ab(e,t),i.secretLink=new Cb(e,t),i.secretDetails=new Fb(e,t),i.service=function(){var n=new kb(e,t);return n.branches=new Tb(e,t),n.builds=new Lb(e,t),n.buildArguments=new qb(e,t),n.buildArgumentDetails=new Gb(e,t),n.build=new Wb(e,t),n.containers=new Vb(e,t),n.deployment=new Hb(e,t),n.healthChecks=new Yb(e,t),n.ports=new Qb(e,t),n.pullRequests=new ty(e,t),n.runtimeEnvironment=new iy(e,t),n.runtimeEnvironmentDetails=new uy(e,t),n}(),i.volume=new dy(e,t),i.tag=new by(e,t),i.template=new Fy(e,t),i.templateRun=new jy(e,t),i),list:function(){var n={};return n.backupDestinations=new cv(e,t),n.backupDestinationsBackups=new fv(e,t),n.invoices=new mv(e,t),n.cloud=function(){var n={};return n.providers=new Ev(e,t),n.clusters=new Av(e,t),n.cluster=function(){var n={};return n.nodes=new Fv(e,t),n}(),n.dockerRegistry=new Rv(e,t),n.integrations=new Ov(e,t),n.nodeTypes=new qv(e,t),n.regions=new Mv(e,t),n}(),n.domains=new zv(e,t),n.subdomain=function(){var n={};return n.path=new rE(e,t),n}(),n.logSinks=new lE(e,t),n.notifications=new AE(e,t),n.registryCredentials=new wE(e,t),n.vcs=new RE(e,t),n.repos=new SE(e,t),n.branches=new _E(e,t),n.plans=new UE(e,t),n.projects=new PE(e,t),n.addons=new NE(e,t),n.jobs=new EA(e,t),n.pipelines=new eb(e,t),n.previewTemplatePreviews=new ib(e,t),n.previewTemplateRuns=new ub(e,t),n.releaseFlowRuns=new lb(e,t),n.secrets=new fb(e,t),n.services=new Db(e,t),n.volumes=new ay(e,t),n.regions=new my(e,t),n.tags=new vy(e,t),n.templates=new Cy(e,t),n.templateRuns=new Ry(e,t),n}(),add:function(){var n={};return n.backupDestination=new dv(e,t),n.domain=function(){var n={};return n.subdomain=new Zv(e,t),n}(),n.subdomain=function(){var n={};return n.path=new nE(e,t),n}(),n.registryCredentials=new FE(e,t),n.tag=new Ey(e,t),n}(),patch:function(){var n={};return n.backupDestination=new hv(e,t),n.cloud=function(){var n={};return n.cluster=new Cv(e,t),n.dockerRegistry=new Uv(e,t),n.integration=new Lv(e,t),n}(),n.project=new xE(e,t),n.addon=new zE(e,t),n.job=function(){var n={};return n.cron=new yA(e,t),n.manual=new wA(e,t),n}(),n.secret=new Eb(e,t),n.service=function(){var n={};return n.build=new Rb(e,t),n.combined=new _b(e,t),n.deployment=new Ob(e,t),n}(),n.tag=new yy(e,t),n}(),delete:function(){var n={};return n.backupDestination=new pv(e,t),n.cloud=function(){var n={};return n.cluster=new wv(e,t),n.dockerRegistry=new Pv(e,t),n.integration=new Nv(e,t),n}(),n.domain=new Jv(e,t),n.subdomain=function(){var n=new Kv(e,t);return n.path=new oE(e,t),n}(),n.logSink=new fE(e,t),n.notification=new CE(e,t),n.registryCredentials=new BE(e,t),n.project=new LE(e,t),n.addon=function(){var n=new $E(e,t);return n.backupSchedule=new VE(e,t),n}(),n.backup=new KE(e,t),n.job=new DA(e,t),n.previewTemplatePreview=new ob(e,t),n.secret=new bb(e,t),n.secretLink=new wb(e,t),n.service=new xb(e,t),n.volume=new hy(e,t),n.tag=new gy(e,t),n.template=new By(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new bv(e,t),n.dockerRegistry=new jv(e,t),n.integration=new kv(e,t),n}(),n.domain=new $v(e,t),n.logSink=new hE(e,t),n.notification=new bE(e,t),n.customVcs=function(){var n={};return n.token=new jE(e,t),n}(),n.project=new OE(e,t),n.addon=function(){var n=new qE(e,t);return n.backupSchedule=new JE(e,t),n}(),n.job=function(){var n={};return n.cron=new AA(e,t),n.manual=new gA(e,t),n}(),n.secret=new mb(e,t),n.service=function(){var n={};return n.build=new Bb(e,t),n.combined=new jb(e,t),n.deployment=new Ub(e,t),n}(),n.volume=new cy(e,t),n.template=new wy(e,t),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new yv(e,t),n.dockerRegistry=new Sv(e,t),n.integration=new xv(e,t),n}(),n.project=new kE(e,t),n.addon=new ME(e,t),n.job=function(){var n={};return n.cron=new bA(e,t),n.manual=new CA(e,t),n}(),n.secret=new vb(e,t),n.service=function(){var n={};return n.build=new Ib(e,t),n.combined=new Sb(e,t),n.deployment=new Pb(e,t),n}(),n.tag=new Ay(e,t),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Dv(e,t),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Bv(e,t),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Iv(e,t),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new Hv(e,t),n.addon=function(){var n={};return n.backup=new uA(e,t),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Xv(e,t),n.path=new sE(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new Qv(e,t);return n.path=new aE(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new eE(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new tE(e,t),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new uE(e,t),n}(),n.logSink=new EE(e,t),n.notification=new gE(e,t),n.registryCredentials=new IE(e,t),n.addon=function(){var n={};return n.networkSettings=new sA(e,t),n.security=new fA(e,t),n.version=new vA(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new SA(e,t),n.buildOptions=new UA(e,t),n.buildSource=new PA(e,t),n.deployment=new LA(e,t),n.healthChecks=new qA(e,t),n.runtimeEnvironment=new ZA(e,t),n.settings=new XA(e,t),n}(),n.previewTemplate=new rb(e,t),n.releaseFlow=new cb(e,t),n.secret=new yb(e,t),n.secretLink=new gb(e,t),n.service=function(){var n={};return n.buildArguments=new Mb(e,t),n.buildOptions=new zb(e,t),n.buildSource=new $b(e,t),n.deployment=new Zb(e,t),n.healthChecks=new Kb(e,t),n.ports=new ey(e,t),n.runtimeEnvironment=new oy(e,t),n}(),n.volume=new ly(e,t),n.template=new Dy(e,t),n}(),verify:function(){var n={};return n.subdomain=new cE(e,t),n.domain=new dE(e,t),n}(),pause:function(){var n={};return n.logSink=new mE(e,t),n.addon=new aA(e,t),n.job=new MA(e,t),n.service=new Xb(e,t),n}(),resume:function(){var n={};return n.logSink=new vE(e,t),n.addon=new hA(e,t),n.job=new zA(e,t),n.service=new ry(e,t),n}(),backup:function(){var n={};return n.addon=new ZE(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new XE(e,t),n.restore=new QE(e,t),n}(),n.job=function(){var n={};return n.build=new kA(e,t),n.run=new VA(e,t),n}(),n.releaseFlowRun=new pb(e,t),n.service=function(){var n={};return n.build=new Jb(e,t),n}(),n.templateRun=new Sy(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new tA(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new rA(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new cA(e,t),n}(),restart:function(){var n={};return n.addon=new dA(e,t),n.service=new ny(e,t),n}(),scale:function(){var n={};return n.addon=new pA(e,t),n.job=new KA(e,t),n.service=new sy(e,t),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new RA(e,t),n.run=new WA(e,t),n}(),n.service=function(){var n={};return n.build=new Nb(e,t),n}(),n}(),suspend:function(){var n={};return n.job=new QA(e,t),n}(),run:function(){var n={};return n.releaseFlow=new db(e,t),n.template=new Iy(e,t),n}(),attach:function(){var n={};return n.volume=new py(e,t),n}(),detach:function(){var n={};return n.volume=new fy(e,t),n}(),download:function(){var e={};return e.service=function(){var e={};return e.files=o.fileCopy.downloadServiceFiles.bind(o.fileCopy),e}(),e.job=function(){var e={};return e.files=o.fileCopy.downloadJobFiles.bind(o.fileCopy),e}(),e}(),upload:function(){var e={};return e.service=function(){var e={};return e.files=o.fileCopy.uploadServiceFiles.bind(o.fileCopy),e}(),e.job=function(){var e={};return e.files=o.fileCopy.uploadJobFiles.bind(o.fileCopy),e}(),e}()},this.download=function(){var e={};return e.service=function(){var e={};return e.files=o.endpoints.download.service.files,e}(),e.job=function(){var e={};return e.files=o.endpoints.download.job.files,e}(),e}(),this.upload=function(){var e={};return e.service=function(){var e={};return e.files=o.endpoints.upload.service.files,e}(),e.job=function(){var e={};return e.files=o.endpoints.upload.job.files,e}(),e}(),this.get=function(){var e={};return e.addon=function(){var e=o.endpoints.get.addon.call;return e.types=o.endpoints.get.addon.types.call,e.backupSchedules=function(){var e=o.endpoints.get.addon.backupSchedules.call;return e.all=o.endpoints.get.addon.backupSchedules.all,e}(),e.backups=function(){var e=o.endpoints.get.addon.backups.call;return e.all=o.endpoints.get.addon.backups.all,e}(),e.backup=function(){var e=o.endpoints.get.addon.backup.call;return e.download=o.endpoints.get.addon.backup.download.call,e.restores=function(){var e=o.endpoints.get.addon.backup.restores.call;return e.all=o.endpoints.get.addon.backup.restores.all,e}(),e.logs=o.logs.getAddonBackupLogs,e.logTail=o.logs.tailAddonBackupLogs,e}(),e.containers=function(){var e=o.endpoints.get.addon.containers.call;return e.all=o.endpoints.get.addon.containers.all,e}(),e.credentials=o.endpoints.get.addon.credentials.call,e.restores=function(){var e=function(){var e=o.endpoints.get.addon.restores.call;return e.all=o.endpoints.get.addon.restores.all,e}();return e.logs=o.logs.getAddonRestoresLogs,e.logTail=o.logs.tailAddonRestoresLogs,e}(),e.version=o.endpoints.get.addon.version.call,e.logs=o.logs.getAddonLogs,e.logTail=o.logs.tailAddonLogs,e.metrics=o.metrics.getAddonMetrics,e.metricsRange=o.metrics.getAddonMetricsRange,e}(),e.backupDestination=o.endpoints.get.backupDestination.call,e.invoice=function(){var e={};return e.details=o.endpoints.get.invoice.details.call,e}(),e.cloud=function(){var e={};return e.cluster=o.endpoints.get.cloud.cluster.call,e.dockerRegistry=o.endpoints.get.cloud.dockerRegistry.call,e.integration=o.endpoints.get.cloud.integration.call,e}(),e.dnsId=o.endpoints.get.dnsId.call,e.domain=o.endpoints.get.domain.call,e.domainCertificate=o.endpoints.get.domainCertificate.call,e.subdomain=function(){var e=o.endpoints.get.subdomain.call;return e.path=o.endpoints.get.subdomain.path.call,e}(),e.logSink=o.endpoints.get.logSink.call,e.notification=o.endpoints.get.notification.call,e.registryCredentials=o.endpoints.get.registryCredentials.call,e.project=o.endpoints.get.project.call,e.job=function(){var e=o.endpoints.get.job.call;return e.branches=function(){var e=o.endpoints.get.job.branches.call;return e.all=o.endpoints.get.job.branches.all,e}(),e.builds=function(){var e=o.endpoints.get.job.builds.call;return e.all=o.endpoints.get.job.builds.all,e}(),e.buildArguments=o.endpoints.get.job.buildArguments.call,e.buildArgumentDetails=o.endpoints.get.job.buildArgumentDetails.call,e.build=o.endpoints.get.job.build.call,e.containers=function(){var e=o.endpoints.get.job.containers.call;return e.all=o.endpoints.get.job.containers.all,e}(),e.deployment=o.endpoints.get.job.deployment.call,e.healthChecks=o.endpoints.get.job.healthChecks.call,e.pullRequests=function(){var e=o.endpoints.get.job.pullRequests.call;return e.all=o.endpoints.get.job.pullRequests.all,e}(),e.runs=function(){var e=o.endpoints.get.job.runs.call;return e.all=o.endpoints.get.job.runs.all,e}(),e.run=o.endpoints.get.job.run.call,e.runtimeEnvironment=o.endpoints.get.job.runtimeEnvironment.call,e.runtimeEnvironmentDetails=o.endpoints.get.job.runtimeEnvironmentDetails.call,e.logs=o.logs.getJobLogs,e.buildLogs=o.logs.getJobBuildLogs,e.logTail=o.logs.tailJobLogs,e.buildLogTail=o.logs.tailJobBuildLogs,e.metrics=o.metrics.getJobMetrics,e.buildMetrics=o.metrics.getJobBuildMetrics,e.metricsRange=o.metrics.getJobMetricsRange,e.buildMetricsRange=o.metrics.getJobBuildMetricsRange,e}(),e.pipeline=o.endpoints.get.pipeline.call,e.previewTemplate=function(){var e=o.endpoints.get.previewTemplate.call;return e.all=o.endpoints.get.previewTemplate.all,e}(),e.previewTemplateRun=o.endpoints.get.previewTemplateRun.call,e.releaseFlow=o.endpoints.get.releaseFlow.call,e.releaseFlowRun=o.endpoints.get.releaseFlowRun.call,e.secret=o.endpoints.get.secret.call,e.secretLink=o.endpoints.get.secretLink.call,e.secretDetails=o.endpoints.get.secretDetails.call,e.service=function(){var e=o.endpoints.get.service.call;return e.branches=function(){var e=o.endpoints.get.service.branches.call;return e.all=o.endpoints.get.service.branches.all,e}(),e.builds=function(){var e=o.endpoints.get.service.builds.call;return e.all=o.endpoints.get.service.builds.all,e}(),e.buildArguments=o.endpoints.get.service.buildArguments.call,e.buildArgumentDetails=o.endpoints.get.service.buildArgumentDetails.call,e.build=o.endpoints.get.service.build.call,e.containers=function(){var e=o.endpoints.get.service.containers.call;return e.all=o.endpoints.get.service.containers.all,e}(),e.deployment=o.endpoints.get.service.deployment.call,e.healthChecks=o.endpoints.get.service.healthChecks.call,e.ports=o.endpoints.get.service.ports.call,e.pullRequests=function(){var e=o.endpoints.get.service.pullRequests.call;return e.all=o.endpoints.get.service.pullRequests.all,e}(),e.runtimeEnvironment=o.endpoints.get.service.runtimeEnvironment.call,e.runtimeEnvironmentDetails=o.endpoints.get.service.runtimeEnvironmentDetails.call,e.logs=o.logs.getServiceLogs,e.buildLogs=o.logs.getServiceBuildLogs,e.logTail=o.logs.tailServiceLogs,e.buildLogTail=o.logs.tailServiceBuildLogs,e.metrics=o.metrics.getServiceMetrics,e.buildMetrics=o.metrics.getServiceBuildMetrics,e.metricsRange=o.metrics.getServiceMetricsRange,e.buildMetricsRange=o.metrics.getServiceBuildMetricsRange,e}(),e.volume=o.endpoints.get.volume.call,e.tag=o.endpoints.get.tag.call,e.template=function(){var e=o.endpoints.get.template.call;return e.all=o.endpoints.get.template.all,e}(),e.templateRun=o.endpoints.get.templateRun.call,e}(),this.list=function(){var e={};return e.backupDestinations=function(){var e=o.endpoints.list.backupDestinations.call;return e.all=o.endpoints.list.backupDestinations.all,e}(),e.backupDestinationsBackups=function(){var e=o.endpoints.list.backupDestinationsBackups.call;return e.all=o.endpoints.list.backupDestinationsBackups.all,e}(),e.invoices=function(){var e=o.endpoints.list.invoices.call;return e.all=o.endpoints.list.invoices.all,e}(),e.cloud=function(){var e={};return e.providers=o.endpoints.list.cloud.providers.call,e.clusters=function(){var e=o.endpoints.list.cloud.clusters.call;return e.all=o.endpoints.list.cloud.clusters.all,e}(),e.cluster=function(){var e={};return e.nodes=function(){var e=o.endpoints.list.cloud.cluster.nodes.call;return e.all=o.endpoints.list.cloud.cluster.nodes.all,e}(),e}(),e.dockerRegistry=function(){var e=o.endpoints.list.cloud.dockerRegistry.call;return e.all=o.endpoints.list.cloud.dockerRegistry.all,e}(),e.integrations=function(){var e=o.endpoints.list.cloud.integrations.call;return e.all=o.endpoints.list.cloud.integrations.all,e}(),e.nodeTypes=function(){var e=o.endpoints.list.cloud.nodeTypes.call;return e.all=o.endpoints.list.cloud.nodeTypes.all,e}(),e.regions=function(){var e=o.endpoints.list.cloud.regions.call;return e.all=o.endpoints.list.cloud.regions.all,e}(),e}(),e.domains=function(){var e=o.endpoints.list.domains.call;return e.all=o.endpoints.list.domains.all,e}(),e.subdomain=function(){var e={};return e.path=o.endpoints.list.subdomain.path.call,e}(),e.logSinks=function(){var e=o.endpoints.list.logSinks.call;return e.all=o.endpoints.list.logSinks.all,e}(),e.notifications=function(){var e=o.endpoints.list.notifications.call;return e.all=o.endpoints.list.notifications.all,e}(),e.registryCredentials=function(){var e=o.endpoints.list.registryCredentials.call;return e.all=o.endpoints.list.registryCredentials.all,e}(),e.vcs=o.endpoints.list.vcs.call,e.repos=function(){var e=o.endpoints.list.repos.call;return e.all=o.endpoints.list.repos.all,e}(),e.branches=function(){var e=o.endpoints.list.branches.call;return e.all=o.endpoints.list.branches.all,e}(),e.plans=o.endpoints.list.plans.call,e.projects=function(){var e=o.endpoints.list.projects.call;return e.all=o.endpoints.list.projects.all,e}(),e.addons=function(){var e=o.endpoints.list.addons.call;return e.all=o.endpoints.list.addons.all,e}(),e.jobs=function(){var e=o.endpoints.list.jobs.call;return e.all=o.endpoints.list.jobs.all,e}(),e.pipelines=function(){var e=o.endpoints.list.pipelines.call;return e.all=o.endpoints.list.pipelines.all,e}(),e.previewTemplatePreviews=function(){var e=o.endpoints.list.previewTemplatePreviews.call;return e.all=o.endpoints.list.previewTemplatePreviews.all,e}(),e.previewTemplateRuns=function(){var e=o.endpoints.list.previewTemplateRuns.call;return e.all=o.endpoints.list.previewTemplateRuns.all,e}(),e.releaseFlowRuns=function(){var e=o.endpoints.list.releaseFlowRuns.call;return e.all=o.endpoints.list.releaseFlowRuns.all,e}(),e.secrets=function(){var e=o.endpoints.list.secrets.call;return e.all=o.endpoints.list.secrets.all,e}(),e.services=function(){var e=o.endpoints.list.services.call;return e.all=o.endpoints.list.services.all,e}(),e.volumes=o.endpoints.list.volumes.call,e.regions=o.endpoints.list.regions.call,e.tags=function(){var e=o.endpoints.list.tags.call;return e.all=o.endpoints.list.tags.all,e}(),e.templates=function(){var e=o.endpoints.list.templates.call;return e.all=o.endpoints.list.templates.all,e}(),e.templateRuns=function(){var e=o.endpoints.list.templateRuns.call;return e.all=o.endpoints.list.templateRuns.all,e}(),e}(),this.add=function(){var e={};return e.backupDestination=o.endpoints.add.backupDestination.call,e.domain=function(){var e={};return e.subdomain=o.endpoints.add.domain.subdomain.call,e}(),e.subdomain=function(){var e={};return e.path=o.endpoints.add.subdomain.path.call,e}(),e.registryCredentials=o.endpoints.add.registryCredentials.call,e.tag=o.endpoints.add.tag.call,e}(),this.patch=function(){var e={};return e.backupDestination=o.endpoints.patch.backupDestination.call,e.cloud=function(){var e={};return e.cluster=o.endpoints.patch.cloud.cluster.call,e.dockerRegistry=o.endpoints.patch.cloud.dockerRegistry.call,e.integration=o.endpoints.patch.cloud.integration.call,e}(),e.project=o.endpoints.patch.project.call,e.addon=o.endpoints.patch.addon.call,e.job=function(){var e={};return e.cron=o.endpoints.patch.job.cron.call,e.manual=o.endpoints.patch.job.manual.call,e}(),e.secret=o.endpoints.patch.secret.call,e.service=function(){var e={};return e.build=o.endpoints.patch.service.build.call,e.combined=o.endpoints.patch.service.combined.call,e.deployment=o.endpoints.patch.service.deployment.call,e}(),e.tag=o.endpoints.patch.tag.call,e}(),this.delete=function(){var e={};return e.backupDestination=o.endpoints.delete.backupDestination.call,e.cloud=function(){var e={};return e.cluster=o.endpoints.delete.cloud.cluster.call,e.dockerRegistry=o.endpoints.delete.cloud.dockerRegistry.call,e.integration=o.endpoints.delete.cloud.integration.call,e}(),e.domain=o.endpoints.delete.domain.call,e.subdomain=function(){var e=o.endpoints.delete.subdomain.call;return e.path=o.endpoints.delete.subdomain.path.call,e}(),e.logSink=o.endpoints.delete.logSink.call,e.notification=o.endpoints.delete.notification.call,e.registryCredentials=o.endpoints.delete.registryCredentials.call,e.project=o.endpoints.delete.project.call,e.addon=function(){var e=o.endpoints.delete.addon.call;return e.backupSchedule=o.endpoints.delete.addon.backupSchedule.call,e}(),e.backup=o.endpoints.delete.backup.call,e.job=o.endpoints.delete.job.call,e.previewTemplatePreview=o.endpoints.delete.previewTemplatePreview.call,e.secret=o.endpoints.delete.secret.call,e.secretLink=o.endpoints.delete.secretLink.call,e.service=o.endpoints.delete.service.call,e.volume=o.endpoints.delete.volume.call,e.tag=o.endpoints.delete.tag.call,e.template=o.endpoints.delete.template.call,e}(),this.create=function(){var e={};return e.cloud=function(){var e={};return e.cluster=o.endpoints.create.cloud.cluster.call,e.dockerRegistry=o.endpoints.create.cloud.dockerRegistry.call,e.integration=o.endpoints.create.cloud.integration.call,e}(),e.domain=o.endpoints.create.domain.call,e.logSink=o.endpoints.create.logSink.call,e.notification=o.endpoints.create.notification.call,e.customVcs=function(){var e={};return e.token=o.endpoints.create.customVcs.token.call,e}(),e.project=o.endpoints.create.project.call,e.addon=function(){var e=o.endpoints.create.addon.call;return e.backupSchedule=o.endpoints.create.addon.backupSchedule.call,e}(),e.job=function(){var e={};return e.cron=o.endpoints.create.job.cron.call,e.manual=o.endpoints.create.job.manual.call,e}(),e.secret=o.endpoints.create.secret.call,e.service=function(){var e={};return e.build=o.endpoints.create.service.build.call,e.combined=o.endpoints.create.service.combined.call,e.deployment=o.endpoints.create.service.deployment.call,e}(),e.volume=o.endpoints.create.volume.call,e.template=o.endpoints.create.template.call,e}(),this.put=function(){var e={};return e.cloud=function(){var e={};return e.cluster=o.endpoints.put.cloud.cluster.call,e.dockerRegistry=o.endpoints.put.cloud.dockerRegistry.call,e.integration=o.endpoints.put.cloud.integration.call,e}(),e.project=o.endpoints.put.project.call,e.addon=o.endpoints.put.addon.call,e.job=function(){var e={};return e.cron=o.endpoints.put.job.cron.call,e.manual=o.endpoints.put.job.manual.call,e}(),e.secret=o.endpoints.put.secret.call,e.service=function(){var e={};return e.build=o.endpoints.put.service.build.call,e.combined=o.endpoints.put.service.combined.call,e.deployment=o.endpoints.put.service.deployment.call,e}(),e.tag=o.endpoints.put.tag.call,e}(),this.cordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=o.endpoints.cordon.cloud.cluster.node.call,e}(),e}(),e}(),this.drain=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=o.endpoints.drain.cloud.cluster.node.call,e}(),e}(),e}(),this.uncordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=o.endpoints.uncordon.cloud.cluster.node.call,e}(),e}(),e}(),this.import=function(){var e={};return e.domainCertificate=o.endpoints.import.domainCertificate.call,e.addon=function(){var e={};return e.backup=o.endpoints.import.addon.backup.call,e}(),e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=o.endpoints.assign.subdomain.service.call,e.path=o.endpoints.assign.subdomain.path.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=function(){var e=o.endpoints.unassign.subdomain.call;return e.path=o.endpoints.unassign.subdomain.path.call,e}(),e}(),this.disable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=o.endpoints.disable.subdomain.cdn.call,e}(),e}(),this.enable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=o.endpoints.enable.subdomain.cdn.call,e}(),e}(),this.update=function(){var e={};return e.subdomain=function(){var e={};return e.path=o.endpoints.update.subdomain.path.call,e}(),e.logSink=o.endpoints.update.logSink.call,e.notification=o.endpoints.update.notification.call,e.registryCredentials=o.endpoints.update.registryCredentials.call,e.addon=function(){var e={};return e.networkSettings=o.endpoints.update.addon.networkSettings.call,e.security=o.endpoints.update.addon.security.call,e.version=o.endpoints.update.addon.version.call,e}(),e.job=function(){var e={};return e.buildArguments=o.endpoints.update.job.buildArguments.call,e.buildOptions=o.endpoints.update.job.buildOptions.call,e.buildSource=o.endpoints.update.job.buildSource.call,e.deployment=o.endpoints.update.job.deployment.call,e.healthChecks=o.endpoints.update.job.healthChecks.call,e.runtimeEnvironment=o.endpoints.update.job.runtimeEnvironment.call,e.settings=o.endpoints.update.job.settings.call,e}(),e.previewTemplate=o.endpoints.update.previewTemplate.call,e.releaseFlow=o.endpoints.update.releaseFlow.call,e.secret=o.endpoints.update.secret.call,e.secretLink=o.endpoints.update.secretLink.call,e.service=function(){var e={};return e.buildArguments=o.endpoints.update.service.buildArguments.call,e.buildOptions=o.endpoints.update.service.buildOptions.call,e.buildSource=o.endpoints.update.service.buildSource.call,e.deployment=o.endpoints.update.service.deployment.call,e.healthChecks=o.endpoints.update.service.healthChecks.call,e.ports=o.endpoints.update.service.ports.call,e.runtimeEnvironment=o.endpoints.update.service.runtimeEnvironment.call,e}(),e.volume=o.endpoints.update.volume.call,e.template=o.endpoints.update.template.call,e}(),this.verify=function(){var e={};return e.subdomain=o.endpoints.verify.subdomain.call,e.domain=o.endpoints.verify.domain.call,e}(),this.pause=function(){var e={};return e.logSink=o.endpoints.pause.logSink.call,e.addon=o.endpoints.pause.addon.call,e.job=o.endpoints.pause.job.call,e.service=o.endpoints.pause.service.call,e}(),this.resume=function(){var e={};return e.logSink=o.endpoints.resume.logSink.call,e.addon=o.endpoints.resume.addon.call,e.job=o.endpoints.resume.job.call,e.service=o.endpoints.resume.service.call,e}(),this.backup=function(){var e={};return e.addon=o.endpoints.backup.addon.call,e}(),this.abort=function(){var e={};return e.addon=function(){var e={};return e.backup=o.endpoints.abort.addon.backup.call,e.restore=o.endpoints.abort.addon.restore.call,e}(),e.job=function(){var e={};return e.build=o.endpoints.abort.job.build.call,e.run=o.endpoints.abort.job.run.call,e}(),e.releaseFlowRun=o.endpoints.abort.releaseFlowRun.call,e.service=function(){var e={};return e.build=o.endpoints.abort.service.build.call,e}(),e.templateRun=o.endpoints.abort.templateRun.call,e}(),this.restore=function(){var e={};return e.addon=function(){var e={};return e.backup=o.endpoints.restore.addon.backup.call,e}(),e}(),this.retain=function(){var e={};return e.addon=function(){var e={};return e.backup=o.endpoints.retain.addon.backup.call,e}(),e}(),this.reset=function(){var e={};return e.addon=o.endpoints.reset.addon.call,e}(),this.restart=function(){var e={};return e.addon=o.endpoints.restart.addon.call,e.service=o.endpoints.restart.service.call,e}(),this.scale=function(){var e={};return e.addon=o.endpoints.scale.addon.call,e.job=o.endpoints.scale.job.call,e.service=o.endpoints.scale.service.call,e}(),this.start=function(){var e={};return e.job=function(){var e={};return e.build=o.endpoints.start.job.build.call,e.run=o.endpoints.start.job.run.call,e}(),e.service=function(){var e={};return e.build=o.endpoints.start.service.build.call,e}(),e}(),this.suspend=function(){var e={};return e.job=o.endpoints.suspend.job.call,e}(),this.run=function(){var e={};return e.releaseFlow=o.endpoints.run.releaseFlow.call,e.template=o.endpoints.run.template.call,e}(),this.attach=function(){var e={};return e.volume=o.endpoints.attach.volume.call,e}(),this.detach=function(){var e={};return e.volume=o.endpoints.detach.volume.call,e}()};export{XE as AbortAddonBackupEndpoint,QE as AbortAddonRestoreEndpoint,kA as AbortJobBuildEndpoint,VA as AbortJobRunEndpoint,pb as AbortReleaseflowrunEndpoint,Jb as AbortServiceBuildEndpoint,Sy as AbortTemplaterunEndpoint,dv as AddBackupdestinationEndpoint,Zv as AddDomainSubdomainEndpoint,FE as AddRegistrycredentialsEndpoint,nE as AddSubdomainPathEndpoint,Ey as AddTagEndpoint,Oy as ApiClient,_y as ApiClientContextProvider,Uy as ApiClientFileContextProvider,Py as ApiClientInMemoryContextProvider,Jm as ApiEndpoint,sE as AssignSubdomainPathEndpoint,Xv as AssignSubdomainServiceEndpoint,py as AttachVolumeEndpoint,ZE as BackupAddonEndpoint,Nm as CopyType,Dv as CordonCloudClusterNodeEndpoint,JE as CreateAddonBackupscheduleEndpoint,qE as CreateAddonEndpoint,bv as CreateCloudClusterEndpoint,jv as CreateCloudDockerregistryEndpoint,kv as CreateCloudIntegrationEndpoint,jE as CreateCustomvcsTokenEndpoint,$v as CreateDomainEndpoint,AA as CreateJobCronEndpoint,gA as CreateJobManualEndpoint,hE as CreateLogsinkEndpoint,bE as CreateNotificationEndpoint,OE as CreateProjectEndpoint,mb as CreateSecretEndpoint,Bb as CreateServiceBuildEndpoint,jb as CreateServiceCombinedEndpoint,Ub as CreateServiceDeploymentEndpoint,wy as CreateTemplateEndpoint,cy as CreateVolumeEndpoint,VE as DeleteAddonBackupscheduleEndpoint,$E as DeleteAddonEndpoint,Ym as DeleteApiEndpoint,KE as DeleteBackupEndpoint,pv as DeleteBackupdestinationEndpoint,wv as DeleteCloudClusterEndpoint,Pv as DeleteCloudDockerregistryEndpoint,Nv as DeleteCloudIntegrationEndpoint,Jv as DeleteDomainEndpoint,DA as DeleteJobEndpoint,fE as DeleteLogsinkEndpoint,CE as DeleteNotificationEndpoint,ob as DeletePreviewtemplatepreviewEndpoint,LE as DeleteProjectEndpoint,BE as DeleteRegistrycredentialsEndpoint,bb as DeleteSecretEndpoint,wb as DeleteSecretlinkEndpoint,xb as DeleteServiceEndpoint,Kv as DeleteSubdomainEndpoint,oE as DeleteSubdomainPathEndpoint,gy as DeleteTagEndpoint,By as DeleteTemplateEndpoint,hy as DeleteVolumeEndpoint,fy as DetachVolumeEndpoint,eE as DisableSubdomainCdnEndpoint,Bv as DrainCloudClusterNodeEndpoint,tE as EnableSubdomainCdnEndpoint,Ya as ExecCommandStandard,eA as GetAddonBackupDownloadEndpoint,YE as GetAddonBackupEndpoint,nA as GetAddonBackupRestoresEndpoint,HE as GetAddonBackupsEndpoint,WE as GetAddonBackupschedulesEndpoint,iA as GetAddonContainersEndpoint,oA as GetAddonCredentialsEndpoint,GE as GetAddonEndpoint,lA as GetAddonRestoresEndpoint,av as GetAddonTypesEndpoint,mA as GetAddonVersionEndpoint,Vm as GetApiEndpoint,Hm as GetApiEndpointPaginated,lv as GetBackupdestinationEndpoint,gv as GetCloudClusterEndpoint,_v as GetCloudDockerregistryEndpoint,Tv as GetCloudIntegrationEndpoint,Gv as GetDnsidEndpoint,Wv as GetDomainEndpoint,Vv as GetDomaincertificateEndpoint,vv as GetInvoiceDetailsEndpoint,BA as GetJobBranchesEndpoint,OA as GetJobBuildEndpoint,_A as GetJobBuildargumentdetailsEndpoint,jA as GetJobBuildargumentsEndpoint,IA as GetJobBuildsEndpoint,xA as GetJobContainersEndpoint,TA as GetJobDeploymentEndpoint,FA as GetJobEndpoint,NA as GetJobHealthchecksEndpoint,GA as GetJobPullrequestsEndpoint,JA as GetJobRunEndpoint,$A as GetJobRunsEndpoint,HA as GetJobRuntimeenvironmentEndpoint,YA as GetJobRuntimeenvironmentdetailsEndpoint,pE as GetLogsinkEndpoint,yE as GetNotificationEndpoint,tb as GetPipelineEndpoint,nb as GetPreviewtemplateEndpoint,sb as GetPreviewtemplaterunEndpoint,TE as GetProjectEndpoint,DE as GetRegistrycredentialsEndpoint,ab as GetReleaseflowEndpoint,hb as GetReleaseflowrunEndpoint,Ab as GetSecretEndpoint,Fb as GetSecretdetailsEndpoint,Cb as GetSecretlinkEndpoint,Tb as GetServiceBranchesEndpoint,Wb as GetServiceBuildEndpoint,Gb as GetServiceBuildargumentdetailsEndpoint,qb as GetServiceBuildargumentsEndpoint,Lb as GetServiceBuildsEndpoint,Vb as GetServiceContainersEndpoint,Hb as GetServiceDeploymentEndpoint,kb as GetServiceEndpoint,Yb as GetServiceHealthchecksEndpoint,Qb as GetServicePortsEndpoint,ty as GetServicePullrequestsEndpoint,iy as GetServiceRuntimeenvironmentEndpoint,uy as GetServiceRuntimeenvironmentdetailsEndpoint,Yv as GetSubdomainEndpoint,iE as GetSubdomainPathEndpoint,by as GetTagEndpoint,Fy as GetTemplateEndpoint,jy as GetTemplaterunEndpoint,dy as GetVolumeEndpoint,uA as ImportAddonBackupEndpoint,Hv as ImportDomaincertificateEndpoint,NE as ListAddonsEndpoint,cv as ListBackupdestinationsEndpoint,fv as ListBackupdestinationsbackupsEndpoint,_E as ListBranchesEndpoint,Fv as ListCloudClusterNodesEndpoint,Av as ListCloudClustersEndpoint,Rv as ListCloudDockerregistryEndpoint,Ov as ListCloudIntegrationsEndpoint,qv as ListCloudNodetypesEndpoint,Ev as ListCloudProvidersEndpoint,Mv as ListCloudRegionsEndpoint,zv as ListDomainsEndpoint,mv as ListInvoicesEndpoint,EA as ListJobsEndpoint,lE as ListLogsinksEndpoint,AE as ListNotificationsEndpoint,eb as ListPipelinesEndpoint,UE as ListPlansEndpoint,ib as ListPreviewtemplatepreviewsEndpoint,ub as ListPreviewtemplaterunsEndpoint,PE as ListProjectsEndpoint,my as ListRegionsEndpoint,wE as ListRegistrycredentialsEndpoint,lb as ListReleaseflowrunsEndpoint,SE as ListReposEndpoint,fb as ListSecretsEndpoint,Db as ListServicesEndpoint,rE as ListSubdomainPathEndpoint,vy as ListTagsEndpoint,Ry as ListTemplaterunsEndpoint,Cy as ListTemplatesEndpoint,RE as ListVcsEndpoint,ay as ListVolumesEndpoint,Mm as LogType,nv as MetricType,zm as NorthflankApiCallError,Ka as NorthflankExecCommand,Gm as NorthflankFileCopy,iv as NorthflankLogFetch,sv as NorthflankMetricFetch,Ha as NorthflankPortForwarder,zE as PatchAddonEndpoint,Xm as PatchApiEndpoint,hv as PatchBackupdestinationEndpoint,Cv as PatchCloudClusterEndpoint,Uv as PatchCloudDockerregistryEndpoint,Lv as PatchCloudIntegrationEndpoint,yA as PatchJobCronEndpoint,wA as PatchJobManualEndpoint,xE as PatchProjectEndpoint,Eb as PatchSecretEndpoint,Rb as PatchServiceBuildEndpoint,_b as PatchServiceCombinedEndpoint,Ob as PatchServiceDeploymentEndpoint,yy as PatchTagEndpoint,aA as PauseAddonEndpoint,MA as PauseJobEndpoint,mE as PauseLogsinkEndpoint,Xb as PauseServiceEndpoint,Zm as PostApiEndpoint,ME as PutAddonEndpoint,Km as PutApiEndpoint,yv as PutCloudClusterEndpoint,Sv as PutCloudDockerregistryEndpoint,xv as PutCloudIntegrationEndpoint,bA as PutJobCronEndpoint,CA as PutJobManualEndpoint,kE as PutProjectEndpoint,vb as PutSecretEndpoint,Ib as PutServiceBuildEndpoint,Sb as PutServiceCombinedEndpoint,Pb as PutServiceDeploymentEndpoint,Ay as PutTagEndpoint,cA as ResetAddonEndpoint,dA as RestartAddonEndpoint,ny as RestartServiceEndpoint,tA as RestoreAddonBackupEndpoint,hA as ResumeAddonEndpoint,zA as ResumeJobEndpoint,vE as ResumeLogsinkEndpoint,ry as ResumeServiceEndpoint,rA as RetainAddonBackupEndpoint,db as RunReleaseflowEndpoint,Iy as RunTemplateEndpoint,pA as ScaleAddonEndpoint,KA as ScaleJobEndpoint,sy as ScaleServiceEndpoint,RA as StartJobBuildEndpoint,WA as StartJobRunEndpoint,Nb as StartServiceBuildEndpoint,QA as SuspendJobEndpoint,Qv as UnassignSubdomainEndpoint,aE as UnassignSubdomainPathEndpoint,Iv as UncordonCloudClusterNodeEndpoint,sA as UpdateAddonNetworksettingsEndpoint,fA as UpdateAddonSecurityEndpoint,vA as UpdateAddonVersionEndpoint,SA as UpdateJobBuildargumentsEndpoint,UA as UpdateJobBuildoptionsEndpoint,PA as UpdateJobBuildsourceEndpoint,LA as UpdateJobDeploymentEndpoint,qA as UpdateJobHealthchecksEndpoint,ZA as UpdateJobRuntimeenvironmentEndpoint,XA as UpdateJobSettingsEndpoint,EE as UpdateLogsinkEndpoint,gE as UpdateNotificationEndpoint,rb as UpdatePreviewtemplateEndpoint,IE as UpdateRegistrycredentialsEndpoint,cb as UpdateReleaseflowEndpoint,yb as UpdateSecretEndpoint,gb as UpdateSecretlinkEndpoint,Mb as UpdateServiceBuildargumentsEndpoint,zb as UpdateServiceBuildoptionsEndpoint,$b as UpdateServiceBuildsourceEndpoint,Zb as UpdateServiceDeploymentEndpoint,Kb as UpdateServiceHealthchecksEndpoint,ey as UpdateServicePortsEndpoint,oy as UpdateServiceRuntimeenvironmentEndpoint,uE as UpdateSubdomainPathEndpoint,Dy as UpdateTemplateEndpoint,ly as UpdateVolumeEndpoint,dE as VerifyDomainEndpoint,cE as VerifySubdomainEndpoint};
|