code-server
Version:
Run VS Code on a remote server.
2 lines • 723 kB
JavaScript
(()=>{var e,t={7907:(e,t,n)=>{var r,i=Object.create,o=Object.defineProperty,s=Object.defineProperties,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))p.call(t,n)&&f(e,n,t[n]);if(l)for(var n of l(t))h.call(t,n)&&f(e,n,t[n]);return e},m=(e,t)=>s(e,c(t)),v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of u(t))!p.call(e,i)&&i!==n&&o(e,i,{get:()=>t[i],enumerable:!(r=a(t,i))||r.enumerable});return e},_=(e,t,n)=>(n=null!=e?i(d(e)):{},y(!t&&e&&e.__esModule?n:o(n,"default",{value:e,enumerable:!0}),e)),b=v(((e,t)=>{"use strict";var n=function(){function e(){}return e.info=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.enableDebug&&console.info(e.TAG+t,n)},e.warn=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.disableWarnings||console.warn(e.TAG+t,n)},e.enableDebug=!1,e.disableWarnings=!1,e.disableErrors=!1,e.TAG="ApplicationInsights:",e}();t.exports=n})),S=v((e=>{"use strict";var t=e&&e.__assign||function(){return(t=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}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScopeManager=e.OpenTelemetryScopeManagerWrapper=void 0;var r=vr(),i=n(8614),o=function(){function e(){}return e.prototype.active=function(){var e=this,n=r.CorrelationContextManager.getCurrentContext();return t(t({},n),{getValue:function(t){return e._activeSymbol?t===e._activeSymbol&&n:(e._activeSymbol=t,n)},setValue:function(){}})},e.prototype.with=function(t,n){var i=t.parentSpanId,o=t.name,s=e._spanToContext(t,i,o);return r.CorrelationContextManager.runWithContext(s,n)()},e.prototype.bind=function(e){return"function"==typeof e?r.CorrelationContextManager.wrapCallback(e):(e instanceof i.EventEmitter&&r.CorrelationContextManager.wrapEmitter(e),e)},e.prototype.enable=function(){return r.CorrelationContextManager.enable(),this},e.prototype.disable=function(){return r.CorrelationContextManager.disable(),this},e._spanToContext=function(e,n,i){var o=n?"|"+e.spanContext().traceId+"."+n+".":e.spanContext().traceId,s=t(t({},e.spanContext()),{traceFlags:e.spanContext().traceFlags});return r.CorrelationContextManager.spanToContextObject(s,o,i)},e}();e.OpenTelemetryScopeManagerWrapper=o,e.AsyncScopeManager=new o})),E=v(((e,t)=>{var n;e=t.exports=K,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],o=e.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=s++;o[l]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[u]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[u]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var y=s++,_="v?"+o[l]+o[f]+"?"+o[v]+"?";o[y]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[v]+"?",S=s++;o[S]="^"+b+"$";var E=s++;o[E]="((?:<|>)?=?)";var C=s++;o[C]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var R=s++;o[R]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[v]+"?)?)?";var w=s++;o[w]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var D=s++;o[D]="^"+o[E]+"\\s*"+o[R]+"$";var P=s++;o[P]="^"+o[E]+"\\s*"+o[w]+"$";var I=s++;o[I]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=s++;o[O]="(?:~>?)";var x=s++;o[x]="(\\s*)"+o[O]+"\\s+",i[x]=new RegExp(o[x],"g");var A=s++;o[A]="^"+o[O]+o[R]+"$";var k=s++;o[k]="^"+o[O]+o[w]+"$";var N=s++;o[N]="(?:\\^)";var M=s++;o[M]="(\\s*)"+o[N]+"\\s+",i[M]=new RegExp(o[M],"g");var L=s++;o[L]="^"+o[N]+o[R]+"$";var j=s++;o[j]="^"+o[N]+o[w]+"$";var q=s++;o[q]="^"+o[E]+"\\s*("+b+")$|^$";var F=s++;o[F]="^"+o[E]+"\\s*("+_+")$|^$";var H=s++;o[H]="(\\s*)"+o[E]+"\\s*("+b+"|"+o[R]+")",i[H]=new RegExp(o[H],"g");var U=s++;o[U]="^\\s*("+o[R]+")\\s+-\\s+("+o[R]+")\\s*$";var $=s++;o[$]="^\\s*("+o[w]+")\\s+-\\s+("+o[w]+")\\s*$";var V,B=s++;for(o[B]="(<|>)?=?\\s*\\*",V=0;V<35;V++)n(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[S]:i[y]).test(e))return null;try{return new K(e,t)}catch{return null}}function K(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[S]:i[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}e.parse=G,e.valid=function(e,t){var n=G(e,t);return n?n.version:null},e.clean=function(e,t){var n=G(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=K,K.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},K.prototype.toString=function(){return this.version},K.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof K||(e=new K(e,this.options)),this.compareMain(e)||this.comparePre(e)},K.prototype.compareMain=function(e){return e instanceof K||(e=new K(e,this.options)),z(this.major,e.major)||z(this.minor,e.minor)||z(this.patch,e.patch)},K.prototype.comparePre=function(e){if(e instanceof K||(e=new K(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return z(r,i)}while(++t)},K.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new K(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(J(e,t))return null;var n=G(e),r=G(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=z;var W=/^[0-9]+$/;function z(e,t){var n=W.test(e),r=W.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function X(e,t,n){return new K(e,n).compare(new K(t,n))}function Y(e,t,n){return X(e,t,n)>0}function Q(e,t,n){return X(e,t,n)<0}function J(e,t,n){return 0===X(e,t,n)}function Z(e,t,n){return 0!==X(e,t,n)}function ee(e,t,n){return X(e,t,n)>=0}function te(e,t,n){return X(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return J(e,n,r);case"!=":return Z(e,n,r);case">":return Y(e,n,r);case">=":return ee(e,n,r);case"<":return Q(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return z(t,e)},e.major=function(e,t){return new K(e,t).major},e.minor=function(e,t){return new K(e,t).minor},e.patch=function(e,t){return new K(e,t).patch},e.compare=X,e.compareLoose=function(e,t){return X(e,t,!0)},e.rcompare=function(e,t,n){return X(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Y,e.lt=Q,e.eq=J,e.neq=Z,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,c,u,l,d,p){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ce(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==ie&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new oe(t,n)}catch{return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,c;switch(e=new K(e,r),t=new oe(t,r),n){case">":i=Y,o=te,s=Q,a=">",c=">=";break;case"<":i=Q,o=ee,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var u=0;u<t.set.length;++u){var l=t.set[u],d=null,p=null;if(l.forEach((function(e){e.semver===ie&&(e=new re(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[q]:i[F],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new K(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[$]:i[U];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[H],"$1$2$3"),n("comparator trim",e,i[H]),e=(e=(e=e.replace(i[x],"$1~")).replace(i[M],"$1^")).split(/\s+/).join(" ");var o=t?i[q]:i[F],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[j]:i[L];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[k]:i[A];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[P]:i[D];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=se(i),u=c||se(o),l=u||se(s);return"="===r&&l&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[B],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t<this.set.length;t++)if(ce(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new oe(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new K(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new oe(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new K(r=e,n))})),r},e.minVersion=function(e,t){e=new oe(e,t);var n=new K("0.0.0");if(e.test(n)||(n=new K("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new K(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Y(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return le(e,t,"<",n)},e.gtr=function(e,t,n){return le(e,t,">",n)},e.outside=le,e.prerelease=function(e,t){var n=G(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[I]);return null==t?null:G(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),C=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makePatchingRequire=void 0;var t=n(5622),r=E(),i=n(2282),o=Object.keys(process.binding("natives")),s=i.prototype.require;e.makePatchingRequire=function(e){var n={};return function(a){var c=s.apply(this,arguments);if(e[a]){var u=i._resolveFilename(a,this);if(n.hasOwnProperty(u))return n[u];var l=void 0;if(o.indexOf(a)<0)try{l=s.call(this,t.join(a,"package.json")).version}catch{return c}else l=process.version.substring(1);var d=l.indexOf("-");d>=0&&(l=l.substring(0,d));for(var p=c,h=0,f=e[a];h<f.length;h++){var g=f[h];r.satisfies(l,g.versionSpecifier)&&(p=g.patch(p,u))}return n[u]=p}return c}}})),T=v(((e,t)=>{t.exports={name:"diagnostic-channel",version:"1.0.0",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"tslint -c tslint.json -p tsconfig.json",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^5.3.0"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",tslint:"^5.0.0",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}})),R=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.channel=e.makePatchingRequire=void 0;var t=C(),r=C();Object.defineProperty(e,"makePatchingRequire",{enumerable:!0,get:function(){return r.makePatchingRequire}});var i=function(e){return!0},o=function(){function e(){this.version=T().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var r={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,n.forEach((function(e){var t=e.listener,n=e.filter;try{n&&n(!0)&&t(r)}catch{}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,n){void 0===n&&(n=i),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:n})},e.prototype.unsubscribe=function(e,t,n){void 0===n&&(n=i);var r=this.subscribers[e];if(r)for(var o=0;o<r.length;++o)if(r[o].listener===t&&r[o].filter===n)return r.splice(o,1),!0;return!1},e.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(e){return e},Object.getOwnPropertyNames(this.knownPatches).forEach((function(t){return delete e.knownPatches[t]}))},e.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},e.prototype.addContextPreservation=function(e){var t=this.contextPreservationFunction;this.contextPreservationFunction=function(n){return e(t(n))}},e.prototype.registerMonkeyPatch=function(e,t){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(t)},e.prototype.getPatchesObject=function(){return this.knownPatches},e}();global.diagnosticsSource||(global.diagnosticsSource=new o,n(2282).prototype.require=t.makePatchingRequire(global.diagnosticsSource.getPatchesObject())),e.channel=global.diagnosticsSource})),w=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),D=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._globalThis=void 0,e._globalThis="object"==typeof globalThis?globalThis:global})),P=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(D(),e)})),I=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(P(),e)})),O=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.0.3"})),x=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompatible=e._makeCompatibilityCheck=void 0;var t=O(),n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function r(e){var t=new Set([e]),r=new Set,i=e.match(n);if(!i)return function(){return!1};var o=+i[1],s=+i[2],a=+i[3];if(null!=i[4])return function(t){return t===e};function c(e){return r.add(e),!1}function u(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var i=e.match(n);if(!i)return c(e);var l=+i[1],d=+i[2],p=+i[3];return null!=i[4]||o!==l?c(e):0===o?s===d&&a<=p?u(e):c(e):s<=d?u(e):c(e)}}e._makeCompatibilityCheck=r,e.isCompatible=r(t.VERSION)})),A=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unregisterGlobal=e.getGlobal=e.registerGlobal=void 0;var t=I(),n=O(),r=x(),i=n.VERSION.split(".")[0],o=Symbol.for("opentelemetry.js.api."+i),s=t._globalThis;e.registerGlobal=function(e,t,r,i){var a;void 0===i&&(i=!1);var c=s[o]=null!==(a=s[o])&&void 0!==a?a:{version:n.VERSION};if(!i&&c[e]){var u=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(u.stack||u.message),!1}return c.version!==n.VERSION?(u=new Error("@opentelemetry/api: All API registration versions must match"),r.error(u.stack||u.message),!1):(c[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+n.VERSION+"."),!0)},e.getGlobal=function(e){var t,n,i=null===(t=s[o])||void 0===t?void 0:t.version;if(i&&r.isCompatible(i))return null===(n=s[o])||void 0===n?void 0:n[e]},e.unregisterGlobal=function(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+n.VERSION+".");var r=s[o];r&&delete r[e]}})),k=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagComponentLogger=void 0;var t=A(),n=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("verbose",this._namespace,e)},e}();function r(e,n,r){var i=t.getGlobal("diag");if(i)return r.unshift(n),i[e].apply(i,r)}e.DiagComponentLogger=n})),N=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiagLogLevel=void 0,(t=e.DiagLogLevel||(e.DiagLogLevel={}))[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})),M=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogLevelDiagLogger=void 0;var t=N();e.createLogLevelDiagLogger=function(e,n){function r(t,r){var i=n[t];return"function"==typeof i&&e>=r?i.bind(n):function(){}}return e<t.DiagLogLevel.NONE?e=t.DiagLogLevel.NONE:e>t.DiagLogLevel.ALL&&(e=t.DiagLogLevel.ALL),n=n||{},{error:r("error",t.DiagLogLevel.ERROR),warn:r("warn",t.DiagLogLevel.WARN),info:r("info",t.DiagLogLevel.INFO),debug:r("debug",t.DiagLogLevel.DEBUG),verbose:r("verbose",t.DiagLogLevel.VERBOSE)}}})),L=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagAPI=void 0;var t=k(),n=M(),r=N(),i=A(),o=function(){function e(){function e(e){return function(){var t=i.getGlobal("diag");if(t)return t[e].apply(t,arguments)}}var o=this;o.setLogger=function(e,t){var s,a;if(void 0===t&&(t=r.DiagLogLevel.INFO),e===o){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return o.error(null!==(s=c.stack)&&void 0!==s?s:c.message),!1}var u=i.getGlobal("diag"),l=n.createLogLevelDiagLogger(t,e);if(u){var d=null!==(a=(new Error).stack)&&void 0!==a?a:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+d),l.warn("Current logger will overwrite one already registered from "+d)}return i.registerGlobal("diag",l,o,!0)},o.disable=function(){i.unregisterGlobal("diag",o)},o.createComponentLogger=function(e){return new t.DiagComponentLogger(e)},o.verbose=e("verbose"),o.debug=e("debug"),o.info=e("info"),o.warn=e("warn"),o.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();e.DiagAPI=o})),j=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaggageImpl=void 0;var t=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){return[e[0],e[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=new e(this._entries),i=0,o=t;i<o.length;i++){var s=o[i];r._entries.delete(s)}return r},e.prototype.clear=function(){return new e},e}();e.BaggageImpl=t})),q=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataSymbol=void 0,e.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")})),F=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataFromString=e.createBaggage=void 0;var t=L(),n=j(),r=q(),i=t.DiagAPI.instance();e.createBaggage=function(e){return void 0===e&&(e={}),new n.BaggageImpl(new Map(Object.entries(e)))},e.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(i.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:r.baggageEntryMetadataSymbol,toString:function(){return e}}}})),H=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),U=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),$=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagConsoleLogger=void 0;var t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];e.DiagConsoleLogger=function(){function e(e){return function(){var t=arguments;if(console){var n=console[e];if("function"!=typeof n&&(n=console.log),"function"==typeof n)return n.apply(console,t)}}}for(var n=0;n<t.length;n++)this[t[n].n]=e(t[n].c)}})),V=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n($(),e),n(N(),e)})),B=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTextMapSetter=e.defaultTextMapGetter=void 0,e.defaultTextMapGetter={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},e.defaultTextMapSetter={set:function(e,t,n){null!=e&&(e[t]=n)}}})),G=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),K=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),W=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ROOT_CONTEXT=e.createContextKey=void 0,e.createContextKey=function(e){return Symbol.for(e)};e.ROOT_CONTEXT=new function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}})),z=v((e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.NoopContextManager=void 0;var n=W(),r=function(){function e(){}return e.prototype.active=function(){return n.ROOT_CONTEXT},e.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,t([r],i))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}();e.NoopContextManager=r})),X=v((e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.ContextAPI=void 0;var n=z(),r=A(),i=L(),o="context",s=new n.NoopContextManager,a=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return r.registerGlobal(o,e,i.DiagAPI.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,t([e,n,r],o))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return r.getGlobal(o)||s},e.prototype.disable=function(){this._getContextManager().disable(),r.unregisterGlobal(o,i.DiagAPI.instance())},e}();e.ContextAPI=a})),Y=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TraceFlags=void 0,(t=e.TraceFlags||(e.TraceFlags={}))[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})),Q=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=void 0;var t=Y();e.INVALID_SPANID="0000000000000000",e.INVALID_TRACEID="00000000000000000000000000000000",e.INVALID_SPAN_CONTEXT={traceId:e.INVALID_TRACEID,spanId:e.INVALID_SPANID,traceFlags:t.TraceFlags.NONE}})),J=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NonRecordingSpan=void 0;var t=Q(),n=function(){function e(e){void 0===e&&(e=t.INVALID_SPAN_CONTEXT),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}();e.NonRecordingSpan=n})),Z=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSpanContext=e.setSpanContext=e.deleteSpan=e.setSpan=e.getSpan=void 0;var t=W(),n=J(),r=t.createContextKey("OpenTelemetry Context Key SPAN");function i(e){return e.getValue(r)||void 0}function o(e,t){return e.setValue(r,t)}e.getSpan=i,e.setSpan=o,e.deleteSpan=function(e){return e.deleteValue(r)},e.setSpanContext=function(e,t){return o(e,new n.NonRecordingSpan(t))},e.getSpanContext=function(e){var t;return null===(t=i(e))||void 0===t?void 0:t.spanContext()}})),ee=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSpanContext=e.isSpanContextValid=e.isValidSpanId=e.isValidTraceId=void 0;var t=Q(),n=J(),r=/^([0-9a-f]{32})$/i,i=/^[0-9a-f]{16}$/i;function o(e){return r.test(e)&&e!==t.INVALID_TRACEID}function s(e){return i.test(e)&&e!==t.INVALID_SPANID}e.isValidTraceId=o,e.isValidSpanId=s,e.isSpanContextValid=function(e){return o(e.traceId)&&s(e.spanId)},e.wrapSpanContext=function(e){return new n.NonRecordingSpan(e)}})),te=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracer=void 0;var t=X(),n=Z(),r=J(),i=ee(),o=t.ContextAPI.getInstance(),s=function(){function e(){}return e.prototype.startSpan=function(e,t,o){if(Boolean(null==t?void 0:t.root))return new r.NonRecordingSpan;var s=o&&n.getSpanContext(o);return function(e){return"object"==typeof e&&"string"==typeof e.spanId&&"string"==typeof e.traceId&&"number"==typeof e.traceFlags}(s)&&i.isSpanContextValid(s)?new r.NonRecordingSpan(s):new r.NonRecordingSpan},e.prototype.startActiveSpan=function(e,t,r,i){var s,a,c;if(!(arguments.length<2)){2===arguments.length?c=t:3===arguments.length?(s=t,c=r):(s=t,a=r,c=i);var u=a??o.active(),l=this.startSpan(e,s,u),d=n.setSpan(u,l);return o.with(d,c,void 0,l)}},e}();e.NoopTracer=s})),ne=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracer=void 0;var t=new(te().NoopTracer),n=function(){function e(e,t,n){this._provider=e,this.name=t,this.version=n}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version);return e?(this._delegate=e,this._delegate):t},e}();e.ProxyTracer=n})),re=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracerProvider=void 0;var t=te(),n=function(){function e(){}return e.prototype.getTracer=function(e,n){return new t.NoopTracer},e}();e.NoopTracerProvider=n})),ie=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracerProvider=void 0;var t=ne(),n=new(re().NoopTracerProvider),r=function(){function e(){}return e.prototype.getTracer=function(e,n){var r;return null!==(r=this.getDelegateTracer(e,n))&&void 0!==r?r:new t.ProxyTracer(this,e,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:n},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t)},e}();e.ProxyTracerProvider=r})),oe=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),se=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SamplingDecision=void 0,(t=e.SamplingDecision||(e.SamplingDecision={}))[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})),ae=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ce=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanKind=void 0,(t=e.SpanKind||(e.SpanKind={}))[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})),ue=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),le=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),de=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanStatusCode=void 0,(t=e.SpanStatusCode||(e.SpanStatusCode={}))[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})),pe=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),he=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),fe=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ge=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),me=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceAPI=void 0;var t=A(),n=ie(),r=ee(),i=Z(),o=L(),s="trace",a=function(){function e(){this._proxyTracerProvider=new n.ProxyTracerProvider,this.wrapSpanContext=r.wrapSpanContext,this.isSpanContextValid=r.isSpanContextValid,this.deleteSpan=i.deleteSpan,this.getSpan=i.getSpan,this.getSpanContext=i.getSpanContext,this.setSpan=i.setSpan,this.setSpanContext=i.setSpanContext}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var n=t.registerGlobal(s,this._proxyTracerProvider,o.DiagAPI.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},e.prototype.getTracerProvider=function(){return t.getGlobal(s)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){t.unregisterGlobal(s,o.DiagAPI.instance()),this._proxyTracerProvider=new n.ProxyTracerProvider},e}();e.TraceAPI=a})),ve=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTextMapPropagator=void 0;var t=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}();e.NoopTextMapPropagator=t})),ye=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteBaggage=e.setBaggage=e.getBaggage=void 0;var t=W().createContextKey("OpenTelemetry Baggage Key");e.getBaggage=function(e){return e.getValue(t)||void 0},e.setBaggage=function(e,n){return e.setValue(t,n)},e.deleteBaggage=function(e){return e.deleteValue(t)}})),_e=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropagationAPI=void 0;var t=A(),n=ve(),r=B(),i=ye(),o=F(),s=L(),a="propagation",c=new n.NoopTextMapPropagator,u=function(){function e(){this.createBaggage=o.createBaggage,this.getBaggage=i.getBaggage,this.setBaggage=i.setBaggage,this.deleteBaggage=i.deleteBaggage}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return t.registerGlobal(a,e,s.DiagAPI.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=r.defaultTextMapSetter),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=r.defaultTextMapGetter),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){t.unregisterGlobal(a,s.DiagAPI.instance())},e.prototype._getGlobalPropagator=function(){return t.getGlobal(a)||c},e}();e.PropagationAPI=u})),be=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.diag=e.propagation=e.trace=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.baggageEntryMetadataFromString=void 0,n(w(),e);var r=F();Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return r.baggageEntryMetadataFromString}}),n(H(),e),n(U(),e),n(V(),e),n(B(),e),n(G(),e),n(K(),e),n(ne(),e),n(ie(),e),n(oe(),e),n(se(),e),n(ae(),e),n(ce(),e),n(ue(),e),n(le(),e),n(de(),e),n(Y(),e),n(pe(),e),n(he(),e),n(fe(),e);var i=ee();Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return i.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return i.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return i.isValidSpanId}});var o=Q();Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return o.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return o.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return o.INVALID_SPAN_CONTEXT}}),n(W(),e),n(ge(),e);var s=X();e.context=s.ContextAPI.getInstance();var a=me();e.trace=a.TraceAPI.getInstance();var c=_e();e.propagation=c.PropagationAPI.getInstance();var u=L();e.diag=u.DiagAPI.instance(),e.default={trace:e.trace,context:e.context,propagation:e.propagation,diag:e.diag}})),Se=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTracingSuppressed=e.unsuppressTracing=e.suppressTracing=void 0;var t=be().createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");e.suppressTracing=function(e){return e.setValue(t,!0)},e.unsuppressTracing=function(e){return e.deleteValue(t)},e.isTracingSuppressed=function(e){return!0===e.getValue(t)}})),Ee=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BAGGAGE_MAX_TOTAL_LENGTH=e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=e.BAGGAGE_MAX_NAME_VALUE_PAIRS=e.BAGGAGE_HEADER=e.BAGGAGE_ITEMS_SEPARATOR=e.BAGGAGE_PROPERTIES_SEPARATOR=e.BAGGAGE_KEY_PAIR_SEPARATOR=void 0,e.BAGGAGE_KEY_PAIR_SEPARATOR="=",e.BAGGAGE_PROPERTIES_SEPARATOR=";",e.BAGGAGE_ITEMS_SEPARATOR=",",e.BAGGAGE_HEADER="baggage",e.BAGGAGE_MAX_NAME_VALUE_PAIRS=180,e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096,e.BAGGAGE_MAX_TOTAL_LENGTH=8192})),Ce=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseKeyPairsIntoRecord=e.parsePairKeyValue=e.getKeyPairs=e.serializeKeyPairs=void 0;var t=be(),n=Ee();e.serializeKeyPairs=e=>e.reduce(((e,t)=>{let r=`${e}${""!==e?n.BAGGAGE_ITEMS_SEPARATOR:""}${t}`;return r.length>n.BAGGAGE_MAX_TOTAL_LENGTH?e:r}),""),e.getKeyPairs=e=>e.getAllEntries().map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`)),e.parsePairKeyValue=e=>{let r=e.split(n.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let i=r.shift();if(!i)return;let o=i.split(n.BAGGAGE_KEY_PAIR_SEPARATOR);if(2!==o.length)return;let s,a=decodeURIComponent(o[0].trim()),c=decodeURIComponent(o[1].trim());return r.length>0&&(s=t.baggageEntryMetadataFromString(r.join(n.BAGGAGE_PROPERTIES_SEPARATOR))),{key:a,value:c,metadata:s}},e.parseKeyPairsIntoRecord=t=>"string"!=typeof t||0===t.length?{}:t.split(n.BAGGAGE_ITEMS_SEPARATOR).map((t=>e.parsePairKeyValue(t))).filter((e=>void 0!==e&&e.value.length>0)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})})),Te=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpBaggagePropagator=void 0;var t=be(),n=Se(),r=Ee(),i=Ce();e.HttpBaggagePropagator=class{inject(e,o,s){let a=t.propagation.getBaggage(e);if(!a||n.isTracingSuppressed(e))return;let c=i.getKeyPairs(a).filter((e=>e.length<=r.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS)).slice(0,r.BAGGAGE_MAX_NAME_VALUE_PAIRS),u=i.serializeKeyPairs(c);u.length>0&&s.set(o,r.BAGGAGE_HEADER,u)}extract(e,n,o){let s=o.get(n,r.BAGGAGE_HEADER);if(!s)return e;let a={};return 0===s.length||(s.split(r.BAGGAGE_ITEMS_SEPARATOR).forEach((e=>{let t=i.parsePairKeyValue(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),a[t.key]=e}})),0===Object.entries(a).length)?e:t.propagation.setBaggage(e,t.propagation.createBaggage(a))}fields(){return[r.BAGGAGE_HEADER]}}})),Re=v((e=>{"use strict";function t(e){return null==e||(Array.isArray(e)?function(e){let t;for(let r of e)if(null!=r){if(!t){if(n(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}(e):n(e))}function n(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.isAttributeValue=e.sanitizeAttributes=void 0,e.sanitizeAttributes=function(e){let n={};if(null==e||"object"!=typeof e)return n;for(let[r,i]of Object.entries(e))t(i)&&(Array.isArray(i)?n[r]=i.slice():n[r]=i);return n},e.isAttributeValue=t})),we=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loggingErrorHandler=void 0;var t=be();e.loggingErrorHandler=function(){return e=>{t.diag.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){let t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach((e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}})),De=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalErrorHandler=e.setGlobalErrorHandler=void 0;var t=we().loggingErrorHandler();e.setGlobalErrorHandler=function(e){t=e},e.globalErrorHandler=e=>{try{t(e)}catch{}}})),Pe=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TracesSamplerValues=void 0,(t=e.TracesSamplerValues||(e.TracesSamplerValues={})).AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})),Ie=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEnvironment=e.DEFAULT_ENVIRONMENT=void 0;var t=be(),n=Pe(),r=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT"];function i(e){return r.indexOf(e)>-1}var o=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function s(e){return o.indexOf(e)>-1}function a(e,t,n,r=-1/0,i=1/0){if(typeof n[e]<"u"){let o=Number(n[e]);isNaN(o)||(t[e]=o<r?r:o>i?i:o)}}function c(e,t,n,r=","){let i=n[e];"string"==typeof i&&(t[e]=i.split(r).map((e=>e.trim())))}e.DEFAULT_ENVIRONMENT={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:t.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"none",OTEL_TRACES_SAMPLER:n.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:""};var u={ALL:t.DiagLogLevel.ALL,VERBOSE:t.DiagLogLevel.VERBOSE,DEBUG:t.DiagLogLevel.DEBUG,INFO:t.DiagLogLevel.INFO,WARN:t.DiagLogLevel.WARN,ERROR:t.DiagLogLevel.ERROR,NONE:t.DiagLogLevel.NONE};function l(e,t,n){let r=n[e];if("string"==typeof r){let n=u[r.toUpperCase()];null!=n&&(t[e]=n)}}e.parseEnvironment=function(t){let n={};for(let r in e.DEFAULT_ENVIRONMENT){let e=r;switch(e){case"OTEL_LOG_LEVEL":l(e,n,t);break;default:if(i(e))a(e,n,t);else if(s(e))c(e,n,t);else{let r=t[e];typeof r<"u"&&null!==r&&(n[e]=String(r))}}}return n}})),Oe=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=void 0;var t=n(2087),r=Ie();e.getEnv=function(){let e=r.parseEnvironment(process.env);return Object.assign({HOSTNAME:t.hostname()},r.DEFAULT_ENVIRONMENT,e)}})),xe=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBase64=void 0,e.hexToBase64=function(e){let t=e.length,n="";for(let r=0;r<t;r+=2){let t=e.substring(r,r+2),i=parseInt(t,16);n+=String.fromCharCode(i)}return Buffer.from(n,"ascii").toString("base64")}})),Ae=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomIdGenerator=void 0,e.RandomIdGenerator=class{constructor(){this.generateTraceId=n(16),this.generateSpanId=n(8)}};var t=Buffer.allocUnsafe(16);function n(e){return function(){for(let n=0;n<e/4;n++)t.writeUInt32BE(Math.random()*2**32>>>0,4*n);for(let n=0;n<e&&!(t[n]>0);n++)n===e-1&&(t[e-1]=1);return t.toString("hex",0,e)}}})),ke=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.otperformance=void 0;var t=n(630);e.otperformance=t.performance})),Ne=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="0.23.0"})),Me=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RpcGrpcStatusCodeValues=e.MessagingOperationValues=e.MessagingDestinationKindValues=e.HttpFlavorValues=e.NetTransportValues=e.FaasInvokedProviderValues=e.FaasDocumentOperationValues=e.FaasTriggerValues=e.DbCassandraConsistencyLevelValues=e.DbSystemValues=e.SemanticAttributes=void 0,e.SemanticAttributes={DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_METHOD:"rpc.jsonrpc.method",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message"},(t=e.DbSystemValues||(e.DbSystemValues={})).OTHER_SQL="other_sql",t.MSSQL="mssql",t.MYSQL="mysql",t.ORACLE="oracle",t.DB2="db2",t.POSTGRESQL="postgresql",t.REDSHIFT="redshift",t.HIVE="hive",t.CLOUDSCAPE="cloudscape",t.HSQLDB="hsqldb",t.PROGRESS="progress",t.MAXDB="maxdb",t.HANADB="hanadb",t.INGRES="ingres",t.FIRSTSQL="firstsql",t.EDB="edb",t.CACHE="cache",t.ADABAS="adabas",t.FIREBIRD="firebird",t.DERBY="derby",t.FILEMAKER="filemaker",t.INFORMIX="informix",t.INSTANTDB="instantdb",t.INTERBASE="interbase",t.MARIADB="mariadb",t.NETEZZA="netezza",t.PERVASIVE="pervasive",t.POINTBASE="pointbase",t.SQLITE="sqlite",t.SYBASE="sybase",t.TERADATA="teradata",t.VERTICA="vertica",t.H2="h2",t.COLDFUSION="coldfusion",t.CASSANDRA="cassandra",t.HBASE="hbase",t.MONGODB="mongodb",t.REDIS="redis",t.COUCHBASE="couchbase",t.COUCHDB="couchdb",t.COSMOSDB="cosmosdb",t.DYNAMODB="dynamodb",t.NEO4J="neo4j",t.GEODE="geode",t.ELASTICSEARCH="elasticsearch",t.MEMCACHED="memcached",t.COCKROACHDB="cockroachdb",function(e){e.ALL="all",e.EACH_QUORUM="each_quorum",e.QUORUM="quorum",e.LOCAL_QUORUM="local_quorum",e.ONE="one",e.TWO="two",e.THREE="three",e.LOCAL_ONE="local_one",e.ANY="any",e.SERIAL="serial",e.LOCAL_SERIAL="local_serial"}(e.DbCassandraConsistencyLevelValues||(e.DbCassandraConsistencyLevelValues={})),function(e){e.DATASOURCE="datasource",e.HTTP="http",e.PUBSUB="pubsub",e.TIMER="timer",e.OTHER="other"}(e.FaasTriggerValues||(e.FaasTriggerValues={})),function(e){e.INSERT="insert",e.EDIT="edit",e.DELETE="delete"}(e.FaasDocumentOperationValues||(e.FaasDocumentOperationValues={})),function(e){e.AWS="aws",e.AZURE="azure",e.GCP="gcp"}(e.FaasInvokedProviderValues||(e.FaasInvokedProviderValues={})),function(e){e.IP_TCP="ip_tcp",e.IP_UDP="ip_udp",e.IP="ip",e.UNIX="unix",e.PIPE="pipe",e.INPROC="inproc",e.OTHER="other"}(e.NetTransportValues||(e.NetTransportValues={})),function(e){e.HTTP_1_0="1.0",e.HTTP_1_1="1.1",e.HTTP_2_0="2.0",e.SPDY="SPDY",e.QUIC="QUIC"}(e.HttpFlavorValues||(e.HttpFlavorValues={})),function(e){e.QUEUE="queue",e.TOPIC="topic"}(e.MessagingDestinationKindValues||(e.MessagingDestinationKindValues={})),function(e){e.RECEIVE="receive",e.PROCESS="process"}(e.MessagingOperationValues||(e.MessagingOperationValues={})),function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"}(e.RpcGrpcStatusCodeValues||(e.RpcGrpcStatusCodeValues={}))})),Le=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Me(),e)})),je=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetrySdkLanguageValues=e.OsTypeValues=e.HostArchValues=e.AwsEcsLaunchtypeValues=e.CloudPlatformValues=e.CloudProviderValues=e.ResourceAttributes=void 0,e.ResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},(t=e.CloudProviderValues||(e.CloudProviderValues={})).AWS="aws",t.AZURE="azure",t.GCP="gcp",function(e){e.AWS_EC2="aws_ec2",e.AWS_ECS="aws_ecs",e.AWS_EKS="aws_eks",e.AWS_LAMBDA="aws_lambda",e.AWS_ELASTIC_BEANSTALK="aws_elastic_beanstalk",e.AZURE_VM="azure_vm",e.AZURE_CONTAINER_INSTANCES="azure_container_instances",e.AZURE_AKS="azure_aks",e.AZURE_FUNCTIONS="azure_functions",e.AZURE_APP_SERVICE="azure_app_service",e.GCP_COMPUTE_ENGINE="gcp_compute_engine",e.GCP_CLOUD_RUN="gcp_cloud_run",e.GCP_KUBERNETES_ENGINE="gcp_kubernetes_engine",e.GCP_CLOUD_FUNCTIONS="gcp_cloud_functions",e.GCP_APP_ENGINE="gcp_app_engine"}(e.CloudPlatformValues||(e.CloudPlatformValues={})),function(e){e.EC2="ec2",e.FARGATE="fargate"}(e.AwsEcsLaunchtypeValues||(e.AwsEcsLaunchtypeValues={})),function(e){e.AMD64="amd64",e.ARM32="arm32",e.ARM64="arm64",e.IA64="ia64",e.PPC32="ppc32",e.PPC64="ppc64",e.X86="x86"}(e.HostArchValues||(e.HostArchValues={})),function(e){e.WINDOWS="windows",e.LINUX="linux",e.DARWIN="darwin",e.FREEBSD="freebsd",e.NETBSD="netbsd",e.OPENBSD="openbsd",e.DRAGONFLYBSD="dragonflybsd",e.HPUX="hpux",e.AIX="aix",e.SOLARIS="solaris",e.Z_OS="z_os"}(e.OsTypeValues||(e.OsTypeValues={})),function(e){e.CPP="cpp",e.DOTNET="dotnet",e.ERLANG="erlang",e.GO="go",e.JAVA="java",e.NODEJS="nodejs",e.PHP="php",e.PYTHON="python",e.RUBY="ruby",e.WEBJS="webjs"}(e.TelemetrySdkLanguageValues||(e.TelemetrySdkLanguageValues={}))})),qe=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(je(),e)})),Fe=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Le(),e),n(qe(),e)})),He=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDK_INFO=void 0;var t=Ne(),n=Fe();e.SDK_INFO={[n.ResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[n.ResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[n.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.TelemetrySdkLanguageValues.NODEJS,[n.ResourceAttributes.TELEMETRY_SDK_VERSION]:t.VERSION}})),Ue=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unrefTimer=void 0,e.unrefTimer=function(e){e.unref()}})),$e=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Oe(),e),n(xe(),e),n(Ae(),e),n(ke(),e),n(He(),e),n(Ue(),e)})),Ve=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n($e(),e)})),Be=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeInput=e.isTimeInputHrTime=e.hrTimeToMicroseconds=e.hrTimeToMilliseconds=e.hrTimeToNanoseconds=e.hrTimeToTimeStamp=e.hrTimeDuration=e.timeInputToHrTime=e.hrTime=void 0;var t=Ve(),n=Math.pow(10,9);function r(e){let t=e/1e3,r=Math.trunc(t);return[r,Number((t-r).toFixed(9))*n]}function i(){let e=t.otperformance.timeOrigin;if("number"!=typeof e){let n=t.otperformance;e=n.timing&&n.timing.fetchStart}return e}function o(e){let o=r(i()),s=r("number"==typeof e?e:t.otperformance.now()),a=o[0]+s[0],c=o[1]+s[1];return c>n&&(c-=n,a+=1),[a,c]}function s(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}e.hrTime=o,e.timeInputToHrTime=function(e){if(s(e))return e;if("number"==typeof e)return e<i()?o(e):r(e);if(e instanceof Date)return r(e.getTime());throw TypeError("Invalid input type")},e.hrTimeDuration=function(e,t){let r=t[0]-e[0],i=t[1]-e[1];return i<0&&(r-=1,i+=n),[r,i]},e.hrTimeToTimeStamp=function(e){let t=`${"0".repeat(9)}${e[1]}Z`,n=t.substr(t.length-9-1);return new Date(1e3*e[0]).toISOString().replace("000Z",n)},e.hrTimeToNanoseconds=function(e){return e[0]*n+e[1]},e.hrTimeToMilliseconds=function(e){return Math.round(1e3*e[0]+e[1]/1e6)},e.hrTimeToMicroseconds=function(e){return Math.round(1e6*e[0]+e[1]/1e3)},e.isTimeInputHrTime=s,e.isTimeInput=function(e){return s(e)||"number"==typeof e||e instanceof Date}})),Ge=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ke=v((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ExportResultCode=void 0,(t=e.ExportResultCode||(e.ExportResultCode={}))[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})),We=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePropagator=void 0;var t=be();e.CompositePropagator=class{constructor(e={}){var t;this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((e=>"function"==typeof e.fields?e.fields():[])).reduce(((e,t)=>e.concat(t)),[])))}inject(e,n,r){for(let i of this._propagators)try{i.inject(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}}extract(e,n,r){return this._propagators.reduce(((e,i)=>{try{return i.extract(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return e}),e)}fields(){return this._fields.slice()}}})),ze=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateValue=e.validateKey=void 0;var t="[_0-9a-z-*/]",n=new RegExp(`^(?:[a-z]${t}{0,255}|[a-z0-9]${t}{0,240}@[a-z]${t}{0,13})$`),r=/^[ -~]{0,255}[!-~]$/,i=/,|=/;e.validateKey=function(e){return n.test(e)},e.validateValue=function(e){return r.test(e)&&!i.test(e)}})),Xe=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceState=void 0;var t=ze(),n=class{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>(e.push(t+"="+this.get(t)),e)),[]).join(",")}_parse(e){e.length>512||(this._internalState=e.split(",").reverse().reduce(((e,n)=>{let r=n.trim(),i=r.indexOf("=");if(-1!==i){let o=r.slice(0,i),s=r.slice(i+1,n.length);t.validateKey(o)&&t.validateValue(s)&&e.set(o,s)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new n;return e._internalState=new Map(this._internalState),e}};e.TraceState=n})),Ye=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpTraceContextPropagator=e.parseTraceParent=e.TRACE_STATE_HEADER=e.TRACE_PARENT_HEADER=void 0;var t=be(),n=Se(),r=Xe();e.TRACE_PARENT_HEADER="traceparent",e.TRACE_STATE_HEADER="tracestate";var i=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function o(e){let t=i.exec(e);return!t||"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}e.parseTraceParent=o,e.HttpTraceContextPropagator=class{inject(r,i,o){let s=t.trace.getSpanContext(r);if(!s||n.isTracingSuppressed(r)||!t.isSpanContextValid(s))return;let a=`00-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||t.TraceFlags.NONE).toString(16)}`;o.set(i,e.TRACE_PARENT_HEADER,a),s.traceState&&o.set(i,e.TRACE_STATE_HEADER,s.traceState.serialize())}extract(n,i,s){let a=s.get(i,e.TRACE_PARENT_HEADER);if(!a)return n;let c=Array.isArray(a)?a[0]:a;if("string"!=typeof c)return n;let u=o(c);if(!u)return n;u.isRemote=!0;let l=s.get(i,e.TRACE_STATE_HEADER);if(l){let e=Array.isArray(l)?l.join(","):l;u.traceState=new r.TraceState("string"==typeof e?e:void 0)}return t.trace.setSpanContext(n,u)}fields(){return[e.TRACE_PARENT_HEADER,e.TRACE_STATE_HEADER]}}})),Qe=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Je=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRPCMetadata=e.deleteRPCMetadata=e.setRPCMetadata=e.RPCType=void 0;var t=be().createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");(e.RPCType||(e.RPCType={})).HTTP="http",e.setRPCMetadata=function(e,n){return e.setValue(t,n)},e.deleteRPCMetadata=function(e){return e.deleteValue(t)},e.getRPCMetadata=function(e){return e.getValue(t)}})),Ze=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOffSampler=void 0;var t=be();e.AlwaysOffSampler=class{shouldSample(){return{decision:t.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}})),et=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOnSampler=void 0;var t=be();e.AlwaysOnSampler=class{shouldSample(){return{decision:t.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}})),tt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParentBasedSampler=void 0;var t=be(),n=De(),r=Ze(),i=et();e.ParentBasedSampler=class{constructor(e){var t,o,s,a;this._root=e.root,this._root||(n.globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new i.AlwaysOnSampler),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new i.AlwaysOnSampler,this._remoteParentNotSampled=null!==(o=e.remoteParentNotSampled)&&void 0!==o?o:new r.AlwaysOffSampler,this._localParentSampled=null!==(s=e.localParentSampled)&&void 0!==s?s:new i.AlwaysOnSampler,this._localParentNotSampled=null!==(a=e.localParentNotSampled)&&void 0!==a?a:new r.AlwaysOffSampler}shouldSample(e,n,r,i,o,s){let a=t.trace.getSpanContext(e);return a&&t.isSpanContextValid(a)?a.isRemote?a.traceFlags&t.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,s):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,s):a.traceFlags&t.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,s):this._localParentNotSampled.shouldSample(e,n,r,i,o,s):this._root.shouldSample(e,n,r,i,o,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}})),nt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceIdRatioBasedSampler=void 0;var t=be();e.TraceIdRatioBasedSampler=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}shouldSample(e,n){return{decision:t.isValidTraceId(n)&&this._accumulate(n)<this._upperBound?t.SamplingDecision.RECORD_AND_SAMPLED:t.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){let r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t}}})),rt=v((e=>{"use strict";function t(e,t){return"string"==typeof t?e===t:t.test(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.isUrlIgnored=e.urlMatches=void 0,e.urlMatches=t,e.isUrlIgnored=function(e,n){if(!n)return!1;for(let r of n)if(t(e,r))return!0;return!1}})),it=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWrapped=void 0,e.isWrapped=function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}})),ot=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.baggageUtils=void 0,n(Te(),e),n(Re(),e),n(De(),e),n(we(),e),n(Be(),e),n(Ge(),e),n(Ke(),e),n(Ne(),e),e.baggageUtils=Ce(),n(Ve(),e),n(We(),e),n(Ye(),e),n(Qe(),e),n(Je(),e),n(Ze(),e),n(et(),e),n(tt(),e),n(nt(),e),n(Se(),e),n(Xe(),e),n(Ie(),e),n(Pe(),e),n(rt(),e),n(it(),e),n(Ne(),e)})),st=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionEventName=void 0,e.ExceptionEventName="exception"})),at=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0;var t=be(),n=ot(),r=Fe(),i=st();e.Span=class{constructor(e,r,i,o,s,a,c=[],u=n.hrTime()){this.attributes={},this.links=[],this.events=[],this.status={code:t.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=o,this.parentSpanId=a,this.kind=s,this.links=c,this.startTime=n.timeInputToHrTime(u),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}spanContext(){return this._spanContext}setAttribute(e,r){return null==r||this._isSpanEnded()?this:0===e.length?(t.diag.warn(`Invalid attribute key: ${e}`),this):n.isAttributeValue(r)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=r),this):(t.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}addEvent(e,r,i){return this._isSpanEnded()||(this.events.length>=this._spanLimits.eventCountLimit&&(t.diag.warn("Dropping extra events."),this.events.shift()),n.isTimeInput(r)&&(typeof i>"u"&&(i=r),r=void 0),typeof i>"u"&&(i=n.hrTime()),this.events.push({name:e,attributes:r,time:n.timeInputToHrTime(i)})),this}setStatus(e){return this._isSpanEnded()||(this.status=e),this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e=n.hrTime()){this._isSpanEnded()?t.diag.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=n.timeInputToHrTime(e),this._duration=n.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0&&t.diag.warn("Inconsistent start and end time, startTime > endTime",this.startTime,this.endTime),this._spanProcessor.onEnd(this))}isRecording(){return!1===this._ended}recordException(e,o=n.hrTime()){let s={};"string"==typeof e?s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?s[r.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(s[r.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(s[r.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),s[r.SemanticAttributes.EXCEPTION_TYPE]||s[r.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(i.ExceptionEventName,s,o):t.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}_isSpanEnded(){return this._ended&&t.diag.warn("Can not execute the operation on ended Span {traceId: %s, spanId: %s}",this._spanContext.traceId,this._spanContext.spanId),this._ended}}})),ct=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildSamplerFromEnv=e.DEFAULT_CONFIG=void 0;var t=be(),n=ot(),r=n.getEnv(),i=n.TracesSamplerValues.AlwaysOn;function o(e=n.getEnv()){switch(e.OTEL_TRACES_SAMPLER){case n.TracesSamplerValues.AlwaysOn:return new n.AlwaysOnSampler;case n.TracesSamplerValues.AlwaysOff:return new n.AlwaysOffSampler;case n.TracesSamplerValues.ParentBasedAlwaysOn:return new n.ParentBasedSampler({root:new n.AlwaysOnSampler});case n.TracesSamplerValues.ParentBasedAlwaysOff:return new n.ParentBasedSampler({root:new n.AlwaysOffSampler});case n.TracesSamplerValues.TraceIdRatio:return new n.TraceIdRatioBasedSampler(s(e));case n.TracesSamplerValues.ParentBasedTraceIdRatio:return new n.ParentBasedSampler({root:new n.TraceIdRatioBasedSampler(s(e))});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${e.OTEL_TRACES_SAMPLER} invalid, defaulting to ${i}".`),new n.AlwaysOnSampler}}function s(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return t.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;let n=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to 1.`),1):n<0||n>1?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to 1.`),1):n}e.DEFAULT_CONFIG={sampler:o(r),forceFlushTimeoutMillis:3e4,spanLimits:{attributeCountLimit:n.getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:n.getEnv().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:n.getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT}},e.buildSamplerFromEnv=o})),ut=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConfig=void 0;var t=ct();e.mergeConfig=function(e){let n={sampler:t.buildSamplerFromEnv()},r=Object.assign({},t.DEFAULT_CONFIG,n,e);return r.spanLimits=Object.assign({},t.DEFAULT_CONFIG.spanLimits,e.spanLimits||{}),r}})),lt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tracer=void 0;var t=be(),n=ot(),r=at(),i=ut();e.Tracer=class{constructor(e,t,r){this._tracerProvider=r;let o=i.mergeConfig(t);this._sampler=o.sampler,this._spanLimits=o.spanLimits,this._idGenerator=t.idGenerator||new n.RandomIdGenerator,this.resource=r.resource,this.instrumentationLibrary=e}startSpan(e,i={},o=t.context.active()){var s,a;if(n.isTracingSuppressed(o))return t.diag.debug("Instrumentation suppressed, returning Noop Span"),t.trace.wrapSpanContext(t.INVALID_SPAN_CONTEXT);let c,u,l,d=function(e,n){if(!e.root)return t.trace.getSpanContext(n)}(i,o),p=this._idGenerator.generateSpanId();d&&t.trace.isSpanContextValid(d)?(c=d.traceId,u=d.traceState,l=d.spanId):c=this._idGenerator.generateTraceId();let h=null!==(s=i.kind)&&void 0!==s?s:t.SpanKind.INTERNAL,f=null!==(a=i.links)&&void 0!==a?a:[],g=n.sanitizeAttributes(i.attributes),m=this._sampler.shouldSample(i.root?t.trace.setSpanContext(o,t.INVALID_SPAN_CONTEXT):o,c,e,h,g,f),v={traceId:c,spanId:p,traceFlags:m.decision===t.SamplingDecision.RECORD_AND_SAMPLED?t.TraceFlags.SAMPLED:t.TraceFlags.NONE,traceState:u};if(m.decision===t.SamplingDecision.NOT_RECORD)return t.diag.debug("Recording is off, propagating context in a non-recording span"),t.trace.wrapSpanContext(v);let y=new r.Span(this,o,e,v,h,l,f,i.startTime);return y.setAttributes(Object.assign(g,m.attributes)),y}startActiveSpan(e,n,r,i){let o,s,a;if(arguments.length<2)return;2===arguments.length?a=n:3===arguments.length?(o=n,a=r):(o=n,s=r,a=i);let c=s??t.context.active(),u=this.startSpan(e,o,c),l=t.trace.setSpan(c,u);return t.context.with(l,a,void 0,u)}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}})),dt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultServiceName=void 0,e.defaultServiceName=function(){return`unknown_service:${process.argv0}`}})),pt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectResources=void 0;var t=yt(),r=be(),i=n(1669);e.detectResources=async(e={})=>{let n=Object.assign(e),i=await Promise.all((n.detectors||[]).map((async e=>{try{let t=await e.detect(n);return r.diag.debug(`${e.constructor.name} found resource.`,t),t}catch(n){return r.diag.debug(`${e.constructor.name} failed: ${n.message}`),t.Resource.empty()}})));return o(i),i.reduce(((e,t)=>e.merge(t)),t.Resource.empty())};var o=e=>{e.forEach((e=>{if(Object.keys(e.attributes).length>0){let t=i.inspect(e.attributes,{depth:2,breakLength:1/0,sorted:!0,compact:!1});r.diag.verbose(t)}}))}})),ht=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envDetector=void 0;var t=be(),n=ot(),r=Fe(),i=St();e.envDetector=new class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}async detect(e){let o={},s=n.getEnv(),a=s.OTEL_RESOURCE_ATTRIBUTES,c=s.OTEL_SERVICE_NAME;if(a)try{let e=this._parseResourceAttributes(a);Object.assign(o,e)}catch(e){t.diag.debug(`EnvDetector failed: ${e.message}`)}return c&&(o[r.ResourceAttributes.SERVICE_NAME]=c),new i.Resource(o)}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR,-1);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2!==n.length)continue;let[r,i]=n;if(r=r.trim(),i=i.trim().split('^"|"$').join(""),!this._isValidAndNotEmpty(r))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(i))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[r]=i}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isPrintableString(e)}_isPrintableString(e){for(let t=0;t<e.length;t++){let n=e.charAt(t);if(n<=" "||n>="~")return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}}})),ft=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processDetector=void 0;var t=be(),n=Fe(),r=St();e.processDetector=new class{async detect(e){let t={[n.ResourceAttributes.PROCESS_PID]:process.pid,[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title||"",[n.ResourceAttributes.PROCESS_COMMAND]:process.argv[1]||"",[n.ResourceAttributes.PROCESS_COMMAND_LINE]:process.argv.join(" ")||""};return this._getResourceAttributes(t,e)}_getResourceAttributes(e,i){return""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]||""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_PATH]||""===e[n.ResourceAttributes.PROCESS_COMMAND]||""===e[n.ResourceAttributes.PROCESS_COMMAND_LINE]?(t.diag.debug("ProcessDetector failed: Unable to find required process resources. "),r.Resource.empty()):new r.Resource(Object.assign({},e))}}})),gt=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ht(),e),n(ft(),e)})),mt=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(dt(),e),n(pt(),e),n(gt(),e)})),vt=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(mt(),e)})),yt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Resource=void 0;var t=Fe(),n=ot(),r=vt(),i=class{constructor(e){this.attributes=e}static empty(){return i.EMPTY}static default(){return new i({[t.ResourceAttributes.SERVICE_NAME]:r.defaultServiceName(),[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE],[t.ResourceAttributes.TELEMETRY_SDK_NAME]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_NAME],[t.ResourceAttributes.TELEMETRY_SDK_VERSION]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_VERSION]})}merge(e){if(!e||!Object.keys(e.attributes).length)return this;let t=Object.assign({},this.attributes,e.attributes);return new i(t)}};e.Resource=i,i.EMPTY=new i({})})),_t=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),bt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),St=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(yt(),e),n(vt(),e),n(_t(),e),n(bt(),e)})),Et=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSpanProcessor=void 0;var t=ot();e.MultiSpanProcessor=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise((n=>{Promise.all(e).then((()=>{n()})).catch((e=>{t.globalErrorHandler(e||new Error("MultiSpanProcessor: forceFlush failed")),n()}))}))}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise(((t,n)=>{Promise.all(e).then((()=>{t()}),n)}))}}})),Ct=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopSpanProcessor=void 0,e.NoopSpanProcessor=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}})),Tt=v(((e,t)=>{var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var l="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,p=l||d||Function("return this")(),h="object"==typeof e&&e&&!e.nodeType&&e,f=h&&"object"==typeof t&&t&&!t.nodeType&&t,g=f&&f.exports===h,m=g&&l.process,v=function(){try{return f&&f.require&&f.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),y=v&&v.isTypedArray;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)}var b,S=Array.prototype,E=Function.prototype,C=Object.prototype,T=p["__core-js_shared__"],R=E.toString,w=C.hasOwnProperty,D=(b=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",P=C.toString,I=R.call(Object),O=RegExp("^"+R.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=g?p.Buffer:void 0,A=p.Symbol,k=p.Uint8Array,N=(x&&x.allocUnsafe,function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object)),M=Object.create,L=C.propertyIsEnumerable,j=S.splice,q=A?A.toStringTag:void 0,F=function(){try{var e=oe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),H=x?x.isBuffer:void 0,U=Math.max,$=Date.now,V=oe(p,"Map"),B=oe(Object,"create"),G=function(){function e(){}return function(t){if(!ve(t))return{};if(M)return M(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(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 W(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 z(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 X(e){var t=this.__data__=new W(e);this.size=t.size}function Y(e,t,n){(void 0!==n&&!le(e[t],n)||void 0===n&&!(t in e))&&Z(e,t,n)}function Q(e,t,n){var r=e[t];(!w.call(e,t)||!le(r,n)||void 0===n&&!(t in e))&&Z(e,t,n)}function J(e,t){for(var n=e.length;n--;)if(le(e[n][0],t))return n;return-1}function Z(e,t,n){"__proto__"==t&&F?F(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}K.prototype.clear=function(){this.__data__=B?B(null):{},this.size=0},K.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K.prototype.get=function(e){var t=this.__data__;if(B){var r=t[e];return r===n?void 0:r}return w.call(t,e)?t[e]:void 0},K.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:w.call(t,e)},K.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?n:t,this},W.prototype.clear=function(){this.__data__=[],this.size=0},W.prototype.delete=function(e){var t=this.__data__,n=J(t,e);return!(n<0||(n==t.length-1?t.pop():j.call(t,n,1),--this.size,0))},W.prototype.get=function(e){var t=this.__data__,n=J(t,e);return n<0?void 0:t[n][1]},W.prototype.has=function(e){return J(this.__data__,e)>-1},W.prototype.set=function(e,t){var n=this.__data__,r=J(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},z.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(V||W),string:new K}},z.prototype.delete=function(e){var t=ie(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return ie(this,e).get(e)},z.prototype.has=function(e){return ie(this,e).has(e)},z.prototype.set=function(e,t){var n=ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new W,this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof W){var r=n.__data__;if(!V||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new z(r)}return n.set(e,t),this.size=n.size,this};var ee=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var a=o[++r];if(!1===t(i[a],a,i))break}return e};function te(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?function(e){var t=w.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch{}var i=P.call(e);return r&&(t?e[q]=n:delete e[q]),i}(e):function(e){return P.call(e)}(e)}function ne(e){return ye(e)&&te(e)==i}function re(e,t,n,r,i){e!==t&&ee(t,(function(o,a){if(i||(i=new X),ve(o))!function(e,t,n,r,i,o,a){var c=ce(e,n),u=ce(t,n),l=a.get(u);if(l)Y(e,n,l);else{var d=o?o(c,u,n+"",e,t,a):void 0,p=void 0===d;if(p){var h=pe(u),f=!h&&fe(u),g=!h&&!f&&_e(u);d=u,h||f||g?pe(c)?d=c:function(e){return ye(e)&&he(e)}(c)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(c):f?(p=!1,d=function(e,t){return e.slice()}(u)):g?(p=!1,d=function(e,t){var n=function(e){var t=new e.constructor(e.byteLength);return new k(t).set(new k(e)),t}(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}(u)):d=[]:function(e){if(!ye(e)||te(e)!=s)return!1;var t=N(e);if(null===t)return!0;var n=w.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&R.call(n)==I}(u)||de(u)?(d=c,de(c)?d=function(e){return function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],c=void 0;void 0===c&&(c=e[a]),i?Z(n,a,c):Q(n,a,c)}return n}(e,be(e))}(c):(!ve(c)||ge(c))&&(d=function(e){return"function"!=typeof e.constructor||ae(e)?{}:G(N(e))}(u))):p=!1}p&&(a.set(u,d),i(d,u,r,o,a),a.delete(u)),Y(e,n,d)}}(e,t,a,n,re,r,i);else{var c=r?r(ce(e,a),o,a+"",e,t,i):void 0;void 0===c&&(c=o),Y(e,a,c)}}),be)}function ie(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ve(e)||function(e){return!!D&&D in e}(e))&&(ge(e)?O:a).test(function(e){if(null!=e){try{return R.call(e)}catch{}try{return e+""}catch{}}return""}(e))}(n)?n:void 0}function se(e,t){var n=typeof e;return!!(t=t??r)&&("number"==n||"symbol"!=n&&c.test(e))&&e>-1&&e%1==0&&e<t}function ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}function ce(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ue=function(e){var t=0,n=0;return function(){var r=$(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:Ee(t),writable:!0})}:Ce);function le(e,t){return e===t||e!=e&&t!=t}var de=ne(function(){return arguments}())?ne:function(e){return ye(e)&&w.call(e,"callee")&&!L.call(e,"callee")},pe=Array.isArray;function he(e){return null!=e&&me(e.length)&&!ge(e)}var fe=H||function(){return!1};function ge(e){if(!ve(e))return!1;var t=te(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function me(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ye(e){return null!=e&&"object"==typeof e}var _e=y?function(e){return function(t){return e(t)}}(y):function(e){return ye(e)&&me(e.length)&&!!u[te(e)]};function be(e){return he(e)?function(e,t){var n=pe(e),r=!n&&de(e),i=!n&&!r&&fe(e),o=!n&&!r&&!i&&_e(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var u in e)(t||w.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||se(u,c)))&&a.push(u);return a}(e,!0):function(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ae(e),n=[];for(var r in e)"constructor"==r&&(t||!w.call(e,r))||n.push(r);return n}(e)}var Se=function(e){return function(e,t){return ue(function(e,t,n){return t=U(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=U(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),_(e,this,a)}}(e,t,Ce),e+"")}((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?he(n)&&se(t,n.length):"string"==r&&t in n)&&le(n[t],e)}(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r)}return t}))}((function(e,t,n){re(e,t,n)}));function Ee(e){return function(){return e}}function Ce(e){return e}t.exports=Se})),Rt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessorBase=void 0;var t=be(),n=ot();e.BatchSpanProcessorBase=class{constructor(e,t){this._exporter=e,this._finishedSpans=[],this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve();let r=n.getEnv();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT}forceFlush(){return this._isShutdown?this._shuttingDownPromise:this._flushAll()}onStart(e){}onEnd(e){this._isShutdown||this._addToBuffer(e)}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this.onShutdown())).then((()=>this._flushAll())).then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}_addToBuffer(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())}_flushAll(){return new Promise(((e,t)=>{let n=[];for(let e=0,t=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then((()=>{e()})).catch(t)}))}_flushOneBatch(){return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise(((e,r)=>{let i=setTimeout((()=>{r(new Error("Timeout"))}),this._exportTimeoutMillis);t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export(this._finishedSpans.splice(0,this._maxExportBatchSize),(t=>{var o;clearTimeout(i),t.code===n.ExportResultCode.SUCCESS?e():r(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))}))}))}_maybeStartTimer(){void 0===this._timer&&(this._timer=setTimeout((()=>{this._flushOneBatch().then((()=>{this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())})).catch((e=>{n.globalErrorHandler(e)}))}),this._scheduledDelayMillis),n.unrefTimer(this._timer))}_clearTimer(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}})),wt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessor=void 0;var t=Rt(),n=class extends t.BatchSpanProcessorBase{onShutdown(){}};e.BatchSpanProcessor=n})),Dt=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(wt(),e)})),Pt=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Dt(),e)})),It=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTracerProvider=e.ForceFlushState=void 0;var t,n,r=be(),i=ot(),o=St(),s=qt(),a=ct(),c=Et(),u=Ct(),l=Tt(),d=Pt();(n=t=e.ForceFlushState||(e.ForceFlushState={}))[n.resolved=0]="resolved",n[n.timeout=1]="timeout",n[n.error=2]="error",n[n.unresolved=3]="unresolved";var p=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let n=l({},a.DEFAULT_CONFIG,e);this.resource=null!==(t=n.resource)&&void 0!==t?t:o.Resource.empty(),this.resource=o.Resource.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});let r=this._buildExporterFromEnv();if(void 0!==r){let e=new d.BatchSpanProcessor(r);this.activeSpanProcessor=e}else this.activeSpanProcessor=new u.NoopSpanProcessor}getTracer(e,t){let n=`${e}@${t||""}`;return this._tracers.has(n)||this._tracers.set(n,new s.Tracer({name:e,version:t},this._config,this)),this._tracers.get(n)}addSpanProcessor(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((e=>r.diag.error("Error while trying to shutdown current span processor",e))),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new c.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){r.trace.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&r.context.setGlobalContextManager(e.contextManager),e.propagator&&r.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map((n=>new Promise((r=>{let i,o=setTimeout((()=>{r(new Error(`Span processor did not completed within timeout period of ${e} ms`)),i=t.timeout}),e);n.forceFlush().then((()=>{clearTimeout(o),i!==t.timeout&&(i=t.resolved,r(i))})).catch((e=>{clearTimeout(o),i=t.error,r(e)}))}))));return new Promise(((e,r)=>{Promise.all(n).then((n=>{let i=n.filter((e=>e!==t.resolved));i.length>0?r(i):e()})).catch((e=>r([e])))}))}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return null===(t=p._registeredPropagators.get(e))||void 0===t?void 0:t()}_getSpanExporter(e){var t;return null===(t=p._registeredExporters.get(e))||void 0===t?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(i.getEnv().OTEL_PROPAGATORS)),t=e.map((e=>{let t=this._getPropagator(e);return t||r.diag.warn(`Propagator "${e}" requested through environment variable is unavailable.`),t})).reduce(((e,t)=>(t&&e.push(t),e)),[]);if(0!==t.length)return 1===e.length?t[0]:new i.CompositePropagator({propagators:t})}_buildExporterFromEnv(){let e=i.getEnv().OTEL_TRACES_EXPORTER;if("none"===e)return;let t=this._getSpanExporter(e);return t||r.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};e.BasicTracerProvider=p,p._registeredPropagators=new Map([["tracecontext",()=>new i.HttpTraceContextPropagator],["baggage",()=>new i.HttpBaggagePropagator]]),p._registeredExporters=new Map})),Ot=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleSpanExporter=void 0;var t=ot();e.ConsoleSpanExporter=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),Promise.resolve()}_exportInfo(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:t.hrTimeToMicroseconds(e.startTime),duration:t.hrTimeToMicroseconds(e.duration),attributes:e.attributes,status:e.status,events:e.events}}_sendSpans(e,n){for(let t of e)console.log(this._exportInfo(t));if(n)return n({code:t.ExportResultCode.SUCCESS})}}})),xt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemorySpanExporter=void 0;var t=ot();e.InMemorySpanExporter=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,n){if(this._stopped)return n({code:t.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout((()=>n({code:t.ExportResultCode.SUCCESS})),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}})),At=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),kt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSpanProcessor=void 0;var t=be(),n=ot();e.SimpleSpanProcessor=class{constructor(e){this._exporter=e,this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve()}forceFlush(){return Promise.resolve()}onStart(e){}onEnd(e){this._isShutdown||t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export([e],(e=>{var t;e.code!==n.ExportResultCode.SUCCESS&&n.globalErrorHandler(null!==(t=e.error)&&void 0!==t?t:new Error(`SimpleSpanProcessor: span export failed (status ${e})`))}))}))}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}}})),Nt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Mt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Lt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),jt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),qt=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(lt(),e),n(It(),e),n(Pt(),e),n(Ot(),e),n(xt(),e),n(At(),e),n(kt(),e),n(Nt(),e),n(Ct(),e),n(at(),e),n(Mt(),e),n(Lt(),e),n(jt(),e)})),Ft=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.azureCoreTracing=e.AzureMonitorSymbol=void 0;var t=R();e.AzureMonitorSymbol="Azure_Monitor_Tracer";var n=!1;e.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(r){if(n)return r;try{var i=qt(),o=be(),s=(new i.BasicTracerProvider).getTracer("applicationinsights tracer"),a=r.setTracer;r.setTracer=function(n){var r=n.startSpan;n.startSpan=function(e,n,i){var o=r.call(this,e,n,i),s=o.end;return o.end=function(){var e=s.apply(this,arguments);return t.channel.publish("azure-coretracing",o),e},o},n[e.AzureMonitorSymbol]=!0,a.call(this,n)},o.trace.getSpan(o.context.active()),r.setTracer(s),n=!0}catch{}return r}},e.enable=function(){t.channel.registerMonkeyPatch("@azure/core-tracing",e.azureCoreTracing)}})),Ht=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.bunyan=void 0;var t=R();e.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var n=e.prototype._emit;return e.prototype._emit=function(e,r){var i=n.apply(this,arguments);if(!r){var o=i;o||(o=n.call(this,e,!0)),t.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},e.enable=function(){t.channel.registerMonkeyPatch("bunyan",e.bunyan)}})),Ut=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.console=void 0;var t=R(),r=n(2413);e.console={versionSpecifier:">= 4.0.0",patch:function(e){var n=new r.Writable,i=new r.Writable;n.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n}),!0},i.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n,stderr:!0}),!0};for(var o=new e.Console(n,i),s=function(t){var n=e[t];n&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch{}return n.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a<c.length;a++)s(c[a]);return e}},e.enable=function(){t.channel.registerMonkeyPatch("console",e.console),n(7082)}})),$t=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongoCore=void 0;var t=R();e.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=n.apply(this,arguments),r=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=t.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=t.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},e.enable=function(){t.channel.registerMonkeyPatch("mongodb-core",e.mongoCore)}})),Vt=v((e=>{"use strict";var t=e&&e.__assign||function(){return(t=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}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongo330=e.mongo3=e.mongo2=void 0;var n=R();e.mongo2={versionSpecifier:">= 2.0.0 <= 3.0.5",patch:function(e){var r=e.instrument({operationIdGenerator:{next:function(){return n.channel.bindToContext((function(e){return e()}))}}}),i={};return r.on("started",(function(e){i[e.requestId]||(i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},e.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var r=e.instrument(),i={},o={};return r.on("started",(function(e){i[e.requestId]||(o[e.requestId]=n.channel.bindToContext((function(e){return e()})),i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete o[e.requestId])})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete o[e.requestId])})),e}},e.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=n.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=n.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e}}(e);var t=e.instrument(),r={},i={};return t.on("started",(function(e){r[e.requestId]||(i[e.requestId]=n.channel.bindToContext((function(e){return e()})),r[e.requestId]=e)})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete i[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete i[e.requestId])})),e}},e.enable=function(){n.channel.registerMonkeyPatch("mongodb",e.mongo2),n.channel.registerMonkeyPatch("mongodb",e.mongo3),n.channel.registerMonkeyPatch("mongodb",e.mongo330)}})),Bt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mysql=void 0;var t=R(),r=n(5622);e.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,i){var o=function(e,n){return function(n,r){var i=e[n];i&&(e[n]=function(){for(var e=arguments.length-1,n=arguments.length-1;n>=0;--n){if("function"==typeof arguments[n]){e=n;break}if(typeof arguments[n]<"u")break}var o=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof o&&(r?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=t.channel.bindToContext(r(s,o))):arguments[e]=t.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=n(2729)(r.dirname(i)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return s(a)(e)})),o(a)("createQuery",(function(e,n){return function(r){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;t.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:r,duration:o,time:e.startDate}),n.apply(this,arguments)}}));var c=n(9668)(r.dirname(i)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return s(c)(e)})),e}},e.enable=function(){t.channel.registerMonkeyPatch("mysql",e.mysql)}})),Gt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgresPool1=void 0;var t=R();e.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var n=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=t.channel.bindToContext(e)),n.apply(this,arguments)},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg-pool",e.postgresPool1)}})),Kt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgres7=e.postgres6=void 0;var t=R(),r=n(8614);e.postgres6={versionSpecifier:"6.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},u=process.hrtime();function l(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(u);if(c.result=i&&{rowCount:i.rowCount,command:i.command},c.error=n,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",c),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(c.query.preparable={text:e,args:n},s=l(s)):(c.query.text=e,s?s=l(s):n=l(n)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=l(s):n?n=l(n):e.callback=l(e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments)},e}},e.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c=this,u=!!s,l={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime();function p(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(d);if(l.result=i&&{rowCount:i.rowCount,command:i.command},l.error=n,l.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",l),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(l.query.preparable={text:e,args:n},s=(u="function"==typeof s)?p(s):s):(l.query.text=e,s?s=(u="function"==typeof s)?p(s):s:n=(u="function"==typeof n)?p(n):n):("string"==typeof e.name?l.query.plan=e.name:e.values instanceof Array?l.query.preparable={text:e.text,args:e.values}:l.query.text=e.text,s?(u="function"==typeof s,s=p(s)):n?n=(u="function"==typeof n)?p(n):n:(u="function"==typeof e.callback,e.callback=u?p(e.callback):e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments),u?a:a.then((function(e){return p()(void 0,e),new c._Promise((function(t,n){t(e)}))})).catch((function(e){return p()(e,void 0),new c._Promise((function(t,n){n(e)}))}))},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg",e.postgres6),t.channel.registerMonkeyPatch("pg",e.postgres7)}})),Wt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.redis=void 0;var t=R();e.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var r=e.callback;if(!r||!r.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;e.callback=t.channel.bindToContext((function(n,a){var c=process.hrtime(o),u=1e3*c[0]+c[1]/1e6|0;t.channel.publish("redis",{duration:u,address:i,commandObj:e,err:n,result:a,time:s}),"function"==typeof r&&r.apply(this,arguments)})),e.callback.pubsubBound=!0}}return n.call(this,e)},e}},e.enable=function(){t.channel.registerMonkeyPatch("redis",e.redis)}})),zt=v((e=>{"use strict";var t=e&&e.__assign||function(){return(t=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}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=void 0;var n=R();e.tedious={versionSpecifier:">= 6.0.0 < 9.0.0",patch:function(e){var r=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){function e(e){var r=process.hrtime(),i={query:{},database:{host:null,port:null},result:null,error:null,duration:0};return n.channel.bindToContext((function(o,s,a){var c=process.hrtime(r);i=t(t({},i),{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!o&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:o,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),n.channel.publish("tedious",i),e.call(this,o,s,a)}))}var i=arguments[0];arguments[0].callback=e(i.callback),r.apply(this,arguments)},e}},e.enable=function(){n.channel.registerMonkeyPatch("tedious",e.tedious)}})),Xt=v((e=>{"use strict";var t,n=e&&e.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,n)},function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),r=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.winston2=e.winston3=void 0;var i=R();e.winston3={versionSpecifier:"3.x",patch:function(e){var t=function(e){function t(t,n){var r=e.call(this,n)||this;return r.winston=t,r}return n(t,e),t.prototype.log=function(e,t){var n=e.message,o=e.level,s=e.meta,a=r(e,["message","level","meta"]);o="function"==typeof Symbol.for?e[Symbol.for("level")]:o,n=e instanceof Error?e:n;var c=function(e,t){return null!=e.config.npm.levels[t]?"npm":null!=e.config.syslog.levels[t]?"syslog":"unknown"}(this.winston,o);for(var u in s=s||{},a)a.hasOwnProperty(u)&&(s[u]=a[u]);i.channel.publish("winston",{message:n,level:o,levelKind:c,meta:s}),t()},t}(e.Transport);function o(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);this.add(new t(e,{level:n}))}var s=e.createLogger;e.createLogger=function(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);var a=s.apply(this,arguments);a.add(new t(e,{level:n}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),o.apply(this,arguments)},a};var a=e.configure;return e.configure=function(){a.apply(this,arguments),o.apply(this,arguments)},e.add(new t(e)),e}},e.winston2={versionSpecifier:"2.x",patch:function(e){var t,n=e.Logger.prototype.log,r=function(n,r,o){var s;return s=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",i.channel.publish("winston",{level:n,message:r,meta:o,levelKind:s}),r};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==r&&(this.filters=this.filters.filter((function(e){return e!==r})),this.filters.push(r)):this.filters=[r],n.apply(this,arguments)},e}},e.enable=function(){i.channel.registerMonkeyPatch("winston",e.winston2),i.channel.registerMonkeyPatch("winston",e.winston3)}})),Yt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=e.pgPool=e.pg=e.winston=e.redis=e.mysql=e.mongodb=e.mongodbCore=e.console=e.bunyan=e.azuresdk=void 0;var t=Ft();e.azuresdk=t;var n=Ht();e.bunyan=n;var r=Ut();e.console=r;var i=$t();e.mongodbCore=i;var o=Vt();e.mongodb=o;var s=Bt();e.mysql=s;var a=Gt();e.pgPool=a;var c=Kt();e.pg=c;var u=Wt();e.redis=u;var l=zt();e.tedious=l;var d=Xt();e.winston=d,e.enable=function(){n.enable(),r.enable(),i.enable(),o.enable(),s.enable(),c.enable(),a.enable(),u.enable(),d.enable(),t.enable(),l.enable()}})),Qt=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextPreservation=e.IsInitialized=void 0;var t=S(),n=b();e.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL;var r,i,o,s,a="DiagnosticChannel";if(e.IsInitialized){for(s in r=Yt(),i=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),o={bunyan:r.bunyan,console:r.console,mongodb:r.mongodb,mongodbCore:r.mongodbCore,mysql:r.mysql,redis:r.redis,pg:r.pg,pgPool:r.pgPool,winston:r.winston,azuresdk:r.azuresdk})-1===i.indexOf(s)&&(o[s].enable(),n.info(a,"Subscribed to "+s+" events"));i.length>0&&n.info(a,"Some modules will not be patched",i)}else n.info(a,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");e.registerContextPreservation=function(n){if(e.IsInitialized){var r=R();r.channel.addContextPreservation(n),r.channel.spanContextPropagator=t.AsyncScopeManager}}})),Jt=v(((e,t)=>{"use strict";t.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}})),Zt=v(((e,t)=>{"use strict";var r=e&&e.__assign||function(){return(r=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}).apply(this,arguments)},i=n(8605),o=n(7211),s=n(8835),a=n(7619),c=b(),u=Jt(),l=function(){function e(){}return e.getCookie=function(t,n){var r="";if(t&&t.length&&"string"==typeof n)for(var i=t+"=",o=n.split(";"),s=0;s<o.length;s++)if(n=o[s],(n=e.trim(n))&&0===n.indexOf(i)){r=n.substring(i.length,o[s].length);break}return r},e.trim=function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,""):""},e.int32ArrayToBase64=function(e){var t=function(e,t){return String.fromCharCode(e>>t&255)},n=e.map((function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)})).join(""),r=(Buffer.from?Buffer.from(n,"binary"):new Buffer(n,"binary")).toString("base64");return r.substr(0,r.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i<4;i++)r+=n[15&(t=e.random32())]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var o=n[8+4*Math.random()|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+o+r.substr(16,3)+r.substr(19,12)},e.w3cSpanId=function(){return e.w3cTraceId().substring(16)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,n=n.length<2?"0"+n:n,(i>0?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var n={};for(var r in t){var i="",o=t[r],s=typeof o;if(e.isPrimitive(o))i=o.toString();else if(null===o||"undefined"===s)i="";else{if("function"===s){c.info("key: "+r+" was function; will not serialize");continue}var a=e.isArray(o)?o:e.extractObject(o);try{i=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){i=o.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return n}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||0==n.length||!t)return!0;for(var r=0;r<n.length;r++)if(new RegExp(n[r].replace(/\./g,".").replace(/\*/g,".*")).test(s.parse(t).hostname))return!1;return!0},e.getCorrelationContextTarget=function(e,t){var n=e.headers&&e.headers[u.requestContextHeader];if(n)for(var r=n.split(","),i=0;i<r.length;++i){var o=r[i].split("=");if(2==o.length&&o[0]==t)return o[1]}},e.makeRequest=function(t,n,a,u){n&&0===n.indexOf("//")&&(n="https:"+n);var l=s.parse(n),d=r(r({},a),{host:l.hostname,port:l.port,path:l.pathname}),p=void 0;if("https:"===l.protocol&&(p=t.proxyHttpsUrl||void 0),"http:"===l.protocol&&(p=t.proxyHttpUrl||void 0),p){0===p.indexOf("//")&&(p="http:"+p);var h=s.parse(p);"https:"===h.protocol?(c.info("Proxies that use HTTPS are not supported"),p=void 0):d=r(r({},d),{host:h.hostname,port:h.port||"80",path:n,headers:r(r({},d.headers),{Host:l.hostname})})}var f="https:"===l.protocol&&!p;return f&&void 0!==t.httpsAgent?d.agent=t.httpsAgent:f||void 0===t.httpAgent?f&&(d.agent=e.tlsRestrictedAgent):d.agent=t.httpAgent,f?o.request(d,u):i.request(d,u)},e.safeIncludeCorrelationHeader=function(t,n,r){var i;if("string"==typeof r)i=r;else if(r instanceof Array)i=r.join(",");else if(r&&"function"==typeof r.toString)try{i=r.toString()}catch(e){c.warn("Outgoing request-context header could not be read. Correlation of requests may be lost.",e,r)}i?e.addCorrelationIdHeaderFromString(t,n,i):n.setHeader(u.requestContextHeader,u.requestContextSourceKey+"="+t.config.correlationId)},e.dumpObj=function(e){var t=Object.prototype.toString.call(e);return t+("[object Error]"===t?"{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":JSON.stringify(e))},e.addCorrelationIdHeaderFromString=function(e,t,n){var r=n.split(","),i=u.requestContextSourceKey+"=";r.some((function(e){return e.substring(0,i.length)===i}))||t.setHeader(u.requestContextHeader,n+","+u.requestContextSourceKey+"="+e.config.correlationId)},e.MAX_PROPERTY_LENGTH=8192,e.tlsRestrictedAgent=new o.Agent({keepAlive:!0,maxSockets:25,secureOptions:a.SSL_OP_NO_SSLv2|a.SSL_OP_NO_SSLv3|a.SSL_OP_NO_TLSv1|a.SSL_OP_NO_TLSv1_1}),e}();t.exports=l})),en=v(((e,t)=>{"use strict";var n=Zt(),r=b(),i=function(){function e(){}return e.queryCorrelationId=function(t,i){var o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))i(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(i);else{e.pendingLookups[o]=[i];var s=function(){if(e.pendingLookups[o]){var i={method:"GET",disableAppInsightsAutoCollection:!0};r.info(e.TAG,i);var a=n.makeRequest(t,o,i,(function(n){if(200===n.statusCode){var i="";n.setEncoding("utf-8"),n.on("data",(function(e){i+=e})),n.on("end",(function(){r.info(e.TAG,i);var t=e.correlationIdPrefix+i;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach((function(e){return e(t)})),delete e.pendingLookups[o]}))}else n.statusCode>=400&&n.statusCode<500?(e.completedLookups[o]=void 0,delete e.pendingLookups[o]):setTimeout(s,t.correlationIdRetryIntervalMs)}));a&&(a.on("error",(function(t){r.warn(e.TAG,t)})),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,n){var r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[r];i&&(e.pendingLookups[r]=i.filter((function(e){return e!=n})),0==e.pendingLookups[r].length&&delete e.pendingLookups[r])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+n.w3cTraceId()+"."},e.appendSuffix=function(t,r,i){if(t.length+r.length<e.requestIdMaxLength)return t+r+i;var o=e.requestIdMaxLength-9;if(t.length>o)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(r=n.randomu32().toString(16);r.length<8;)r="0"+r;return t.substring(0,o)+r+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=n.randomu32(),e}();t.exports=i})),tn=v(((e,t)=>{"use strict";var n=Zt(),r=en(),i=function(){function e(t,i){if(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.version=e.DEFAULT_VERSION,t&&"string"==typeof t)if(t.split(",").length>1)this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16);else{var o=t.trim().split("-"),s=o.length;s>=4?(this.version=o[0],this.traceId=o[1],this.spanId=o[2],this.traceFlag=o[3]):(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId()),"00"===this.version&&4!==s&&(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),"ff"===this.version&&(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=e.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.traceId=n.w3cTraceId()),e.isValidTraceId(this.traceId)||(this.traceId=n.w3cTraceId()),e.isValidSpanId(this.spanId)||(this.spanId=n.w3cTraceId().substr(0,16),this.traceId=n.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(i){this.parentId=i.slice();var a=r.getRootId(i);e.isValidTraceId(a)||(this.legacyRootId=a,a=n.w3cTraceId()),-1!==i.indexOf("|")&&(i=i.substring(1+i.substring(0,i.length-1).lastIndexOf("."),i.length-1)),this.traceId=a,this.spanId=i}else this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.formatOpenTelemetryTraceFlags=function(e){var t="0"+e.toString(16);return t.substring(t.length-2)},e.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},e.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},e.prototype.updateSpanId=function(){this.spanId=n.w3cTraceId().substr(0,16)},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}();t.exports=i})),nn=v(((e,t)=>{"use strict";var n=function(){function e(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return e.prototype.toString=function(){var e=this.fieldmap;return e&&0!=e.length?e.join(", "):null},e.validateKeyChars=function(e){var t=e.split("@");if(2==t.length){var n=t[0].trim(),r=t[1].trim(),i=Boolean(n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/)),o=Boolean(r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/));return i&&o}return 1==t.length&&Boolean(e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/))},e.prototype.parseHeader=function(t){var n=[],r={},i=t.split(",");if(i.length>32)return null;for(var o=0,s=i;o<s.length;o++){var a=s[o].trim();if(0!==a.length){var c=a.split("=");if(2!==c.length||!e.validateKeyChars(c[0])||r[c[0]])return null;r[c[0]]=!0,n.push(a)}}return n},e.strict=!0,e}();t.exports=n})),rn=v(((e,t)=>{"use strict";t.exports=function(){}})),on=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),sn=v(((e,t)=>{"use strict";t.exports=function(){}})),an=v(((e,t)=>{"use strict";t.exports=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}})),cn=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return e.call(this)||this}return r(t,e),t}(sn());t.exports=i})),un=v(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Measurement=0]="Measurement",r[r.Aggregation=1]="Aggregation",t.exports=n})),ln=v(((e,t)=>{"use strict";var n=un();t.exports=function(){this.kind=n.Measurement}})),dn=v(((e,t)=>{"use strict";t.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}})),pn=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),hn=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),fn=v(((e,t)=>{"use strict";t.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}})),gn=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return r(t,e),t}(rn());t.exports=i})),mn=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return r(t,e),t}(rn());t.exports=i})),vn=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(pn());t.exports=i})),yn=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),_n=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),bn=v(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical",t.exports=n})),Sn=v(((e,t)=>{"use strict";t.exports=function(){}})),En=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AvailabilityData=on(),e.Base=sn(),e.ContextTagKeys=an(),e.Data=cn(),e.DataPoint=ln(),e.DataPointType=un(),e.Domain=rn(),e.Envelope=dn(),e.EventData=pn(),e.ExceptionData=hn(),e.ExceptionDetails=fn(),e.MessageData=gn(),e.MetricData=mn(),e.PageViewData=vn(),e.RemoteDependencyData=yn(),e.RequestData=_n(),e.SeverityLevel=bn(),e.StackFrame=Sn()})),Cn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.domainSupportsProperties=e.RemoteDependencyDataConstants=void 0;var t=En(),n=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();e.RemoteDependencyDataConstants=n,e.domainSupportsProperties=function(e){return"properties"in e||e instanceof t.EventData||e instanceof t.ExceptionData||e instanceof t.MessageData||e instanceof t.MetricData||e instanceof t.PageViewData||e instanceof t.RemoteDependencyData||e instanceof t.RequestData}})),Tn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Rn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),wn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Dn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Pn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),In=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),On=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),xn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),An=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),kn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Nn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Mn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ln=v((e=>{"use strict";var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryType=e.TelemetryTypeString=e.baseTypeToTelemetryType=e.telemetryTypeToBaseType=void 0,e.telemetryTypeToBaseType=function(e){switch(e){case t.Event:return"EventData";case t.Exception:return"ExceptionData";case t.Trace:return"MessageData";case t.Metric:return"MetricData";case t.Request:return"RequestData";case t.Dependency:return"RemoteDependencyData";case t.Availability:return"AvailabilityData";case t.PageView:return"PageViewData"}},e.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return t.Event;case"ExceptionData":return t.Exception;case"MessageData":return t.Trace;case"MetricData":return t.Metric;case"RequestData":return t.Request;case"RemoteDependencyData":return t.Dependency;case"AvailabilityData":return t.Availability;case"PageViewData":return t.PageView}},e.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},(n=t=e.TelemetryType||(e.TelemetryType={}))[n.Event=0]="Event",n[n.Exception=1]="Exception",n[n.Trace=2]="Trace",n[n.Metric=3]="Metric",n[n.Request=4]="Request",n[n.Dependency=5]="Dependency",n[n.Availability=6]="Availability",n[n.PageView=7]="PageView"})),jn=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Tn(),e),n(Rn(),e),n(wn(),e),n(Dn(),e),n(Pn(),e),n(In(),e),n(On(),e),n(xn(),e),n(An(),e),n(kn(),e),n(Nn(),e),n(Mn(),e),n(Ln(),e)})),qn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Fn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Hn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Un=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),$n=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Vn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Bn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Gn=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Kn=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(qn(),e),n(Fn(),e),n(Hn(),e),n(Un(),e),n($n(),e),n(Vn(),e),n(Bn(),e),n(Gn(),e)})),Wn=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Cn(),e),n(En(),e),n(jn(),e),n(Kn(),e)})),zn=v(((e,t)=>{"use strict";var n=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var r=this.properties||{};if(t)if("string"==typeof t)r.error=t;else if(t instanceof Error)r.error=t.message;else if("object"==typeof t)for(var i in t)r[i]=t[i]&&t[i].toString&&t[i].toString();this.properties=r},e.prototype._isSuccess=function(){return 0<this.statusCode&&this.statusCode<400},e}();t.exports=n})),Xn=v(((e,t)=>{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(8835),s=Wn(),a=Zt(),c=Jt(),u=zn(),l=en(),d=nn(),p=tn(),h=function(e){function t(t,n){var r=e.call(this)||this;return t&&(r.method=t.method,r.url=r._getAbsoluteUrl(t),r.startTime=+new Date,r.socketRemoteAddress=t.socket&&t.socket.remoteAddress,r.parseHeaders(t,n),t.connection&&(r.connectionRemoteAddress=t.connection.remoteAddress,r.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),r}return i(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+o.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e&&e.time?t.time=e.time:this.startTime&&(t.time=new Date(this.startTime)),e){for(var n in e)t[n]||(t[n]=e[n]);if(e.properties)for(var n in e.properties)t.properties[n]=e.properties[n]}return t},t.prototype.getRequestTags=function(e){var n={};for(var r in e)n[r]=e[r];return n[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),n[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),n[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),n[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),n[t.keys.operationName]=this.getOperationName(e),n[t.keys.operationParentId]=this.getOperationParentId(e),n[t.keys.operationId]=this.getOperationId(e),n},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+o.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype.getTraceparent=function(){return this.traceparent},t.prototype.getTracestate=function(){return this.tracestate},t.prototype.getLegacyRootId=function(){return this.legacyRootId},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,n=o.parse(e.url),r=n.pathname,i=n.search,s=t||"https"==e.headers["x-forwarded-proto"]?"https":"http";return o.format({protocol:s,host:e.headers.host,pathname:r,search:i})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var n=e.exec(t);if(n)return n[0]},n=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!n&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(n="127.0.0.1"),n},t.prototype._getId=function(e){var n=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(a.getCookie(e,n))},t.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=a.getCorrelationContextTarget(e,c.requestContextSourceKey),e.headers){var n=e.headers[c.traceStateHeader]?e.headers[c.traceStateHeader].toString():null,r=e.headers[c.traceparentHeader]?e.headers[c.traceparentHeader].toString():null,i=e.headers[c.requestIdHeader]?e.headers[c.requestIdHeader].toString():null,o=e.headers[c.parentIdHeader]?e.headers[c.parentIdHeader].toString():null,s=e.headers[c.rootIdHeader]?e.headers[c.rootIdHeader].toString():null;this.correlationContextHeader=e.headers[c.correlationContextHeader]?e.headers[c.correlationContextHeader].toString():null,l.w3cEnabled&&(r||n)?(this.traceparent=new p(r?r.toString():null),this.tracestate=r&&n&&new d(n?n.toString():null),this.setBackCompatFromThisTraceContext()):i?l.w3cEnabled?(this.traceparent=new p(null,i),this.setBackCompatFromThisTraceContext()):(this.parentId=i,this.requestId=l.generateRequestId(this.parentId),this.operationId=l.getRootId(this.requestId)):l.w3cEnabled?(this.traceparent=new p,this.traceparent.parentId=o,this.traceparent.legacyRootId=s||o,this.setBackCompatFromThisTraceContext()):(this.parentId=o,this.requestId=l.generateRequestId(s||this.parentId),this.correlationContextHeader=null,this.operationId=l.getRootId(this.requestId)),t&&(this.requestId=t,this.operationId=l.getRootId(this.requestId))}},t.parseId=function(e){var t=e.split("|");return t.length>0?t[0]:""},t.keys=new s.ContextTagKeys,t}(u);t.exports=h})),Yn=v(((e,t)=>{var n;e=t.exports=K,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],o=e.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=s++;o[l]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[u]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[u]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var y=s++,_="v?"+o[l]+o[f]+"?"+o[v]+"?";o[y]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[v]+"?",S=s++;o[S]="^"+b+"$";var E=s++;o[E]="((?:<|>)?=?)";var C=s++;o[C]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var R=s++;o[R]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[v]+"?)?)?";var w=s++;o[w]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var D=s++;o[D]="^"+o[E]+"\\s*"+o[R]+"$";var P=s++;o[P]="^"+o[E]+"\\s*"+o[w]+"$";var I=s++;o[I]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=s++;o[O]="(?:~>?)";var x=s++;o[x]="(\\s*)"+o[O]+"\\s+",i[x]=new RegExp(o[x],"g");var A=s++;o[A]="^"+o[O]+o[R]+"$";var k=s++;o[k]="^"+o[O]+o[w]+"$";var N=s++;o[N]="(?:\\^)";var M=s++;o[M]="(\\s*)"+o[N]+"\\s+",i[M]=new RegExp(o[M],"g");var L=s++;o[L]="^"+o[N]+o[R]+"$";var j=s++;o[j]="^"+o[N]+o[w]+"$";var q=s++;o[q]="^"+o[E]+"\\s*("+b+")$|^$";var F=s++;o[F]="^"+o[E]+"\\s*("+_+")$|^$";var H=s++;o[H]="(\\s*)"+o[E]+"\\s*("+b+"|"+o[R]+")",i[H]=new RegExp(o[H],"g");var U=s++;o[U]="^\\s*("+o[R]+")\\s+-\\s+("+o[R]+")\\s*$";var $=s++;o[$]="^\\s*("+o[w]+")\\s+-\\s+("+o[w]+")\\s*$";var V,B=s++;for(o[B]="(<|>)?=?\\s*\\*",V=0;V<35;V++)n(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[S]:i[y]).test(e))return null;try{return new K(e,t)}catch{return null}}function K(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[S]:i[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}e.parse=G,e.valid=function(e,t){var n=G(e,t);return n?n.version:null},e.clean=function(e,t){var n=G(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=K,K.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},K.prototype.toString=function(){return this.version},K.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof K||(e=new K(e,this.options)),this.compareMain(e)||this.comparePre(e)},K.prototype.compareMain=function(e){return e instanceof K||(e=new K(e,this.options)),z(this.major,e.major)||z(this.minor,e.minor)||z(this.patch,e.patch)},K.prototype.comparePre=function(e){if(e instanceof K||(e=new K(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return z(r,i)}while(++t)},K.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new K(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(J(e,t))return null;var n=G(e),r=G(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=z;var W=/^[0-9]+$/;function z(e,t){var n=W.test(e),r=W.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function X(e,t,n){return new K(e,n).compare(new K(t,n))}function Y(e,t,n){return X(e,t,n)>0}function Q(e,t,n){return X(e,t,n)<0}function J(e,t,n){return 0===X(e,t,n)}function Z(e,t,n){return 0!==X(e,t,n)}function ee(e,t,n){return X(e,t,n)>=0}function te(e,t,n){return X(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return J(e,n,r);case"!=":return Z(e,n,r);case">":return Y(e,n,r);case">=":return ee(e,n,r);case"<":return Q(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return z(t,e)},e.major=function(e,t){return new K(e,t).major},e.minor=function(e,t){return new K(e,t).minor},e.patch=function(e,t){return new K(e,t).patch},e.compare=X,e.compareLoose=function(e,t){return X(e,t,!0)},e.rcompare=function(e,t,n){return X(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Y,e.lt=Q,e.eq=J,e.neq=Z,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,c,u,l,d,p){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ce(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==ie&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new oe(t,n)}catch{return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,c;switch(e=new K(e,r),t=new oe(t,r),n){case">":i=Y,o=te,s=Q,a=">",c=">=";break;case"<":i=Q,o=ee,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var u=0;u<t.set.length;++u){var l=t.set[u],d=null,p=null;if(l.forEach((function(e){e.semver===ie&&(e=new re(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[q]:i[F],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new K(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[$]:i[U];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[H],"$1$2$3"),n("comparator trim",e,i[H]),e=(e=(e=e.replace(i[x],"$1~")).replace(i[M],"$1^")).split(/\s+/).join(" ");var o=t?i[q]:i[F],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[j]:i[L];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[k]:i[A];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[P]:i[D];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=se(i),u=c||se(o),l=u||se(s);return"="===r&&l&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[B],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t<this.set.length;t++)if(ce(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new oe(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new K(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new oe(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new K(r=e,n))})),r},e.minVersion=function(e,t){e=new oe(e,t);var n=new K("0.0.0");if(e.test(n)||(n=new K("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new K(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Y(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return le(e,t,"<",n)},e.gtr=function(e,t,n){return le(e,t,">",n)},e.outside=le,e.prerelease=function(e,t){var n=G(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[I]);return null==t?null:G(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),Qn=v(((e,t)=>{"use strict";function n(e){return"function"==typeof e}var r=console.error.bind(console);function i(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function o(e){e&&e.logger&&(n(e.logger)?r=e.logger:r("new logger isn't a function, not replacing"))}function s(e,t,o){if(e&&e[t]){if(!o)return r("no wrapper function"),void r((new Error).stack);if(n(e[t])&&n(o)){var s=e[t],a=o(s,t);return i(a,"__original",s),i(a,"__unwrap",(function(){e[t]===a&&i(e,t,s)})),i(a,"__wrapped",!0),i(e,t,a),a}r("original object and wrapper must be functions")}else r("no original function "+t+" to wrap")}function a(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void r("no original to unwrap to -- has "+t+" already been unwrapped?"):(r("no function to unwrap."),void r((new Error).stack))}o.wrap=s,o.massWrap=function(e,t,n){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t,n)}))})):r("must provide one or more functions to wrap on modules")},o.unwrap=a,o.massUnwrap=function(e,t){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){a(e,t)}))})):r("must provide one or more functions to unwrap on modules")},t.exports=o})),Jn=v(((e,t)=>{"use strict";var n=Qn(),r=n.wrap,i=n.unwrap,o="wrap@before";function s(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function a(e,t){var n;return n=e._events&&e._events[t],Array.isArray(n)||(n=n?[n]:[]),n}function c(e,t){if(e){var n=e;if("function"==typeof e)n=t(e);else if(Array.isArray(e)){n=[];for(var r=0;r<e.length;r++)n[r]=t(e[r])}return n}}t.exports=function(e,t,n){if(!(e&&e.on&&e.addListener&&e.removeListener&&e.emit))throw new Error("can only wrap real EEs");if(!t)throw new Error("must have function to run on listener addition");if(!n)throw new Error("must have function to wrap listeners when emitting");function u(e){return function(t,n){var i=a(this,t).slice();try{var s=e.call(this,t,n);return function(e,t,n){var r=a(e,t).filter((function(e){return-1===n.indexOf(e)}));r.length>0&&function(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r],s=e[o];if("function"==typeof s)s(i);else if(Array.isArray(s))for(var a=s.length,c=0;c<a;c++)s[c](i)}}(e,r)}(this,t,i),s}finally{this.on.__wrapped||r(this,"on",u),this.addListener.__wrapped||r(this,"addListener",u)}}}e[o]?"function"==typeof e[o]?s(e,o,[e[o],t]):Array.isArray(e[o])&&e[o].push(t):s(e,o,t),e.__wrapped||(r(e,"addListener",u),r(e,"on",u),r(e,"emit",(function(e){return function(t){if(!this._events||!this._events[t])return e.apply(this,arguments);var o=this._events[t];function s(e){return function(){this._events[t]=o;try{return e.apply(this,arguments)}finally{o=this._events[t],this._events[t]=c(o,n)}}}r(this,"removeListener",s);try{return this._events[t]=c(o,n),e.apply(this,arguments)}finally{i(this,"removeListener"),this._events[t]=o}}})),s(e,"__unwrap",(function(){i(e,"addListener"),i(e,"on"),i(e,"emit"),delete e[o],delete e.__wrapped})),s(e,"__wrapped",!0))}})),Zn=v(((e,t)=>{"use strict";var r=n(1669),i=n(2357),o=Jn(),s=n(7303),a="cls@contexts",c="error@context",u=process.env.DEBUG_CLS_HOOKED,l=-1;function d(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function h(e){let t=p(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function f(...e){u&&process._rawDebug(`${r.format(...e)}`)}t.exports={getNamespace:p,createNamespace:function(e){i.ok(e,"namespace must be given a name."),u&&f(`NS-CREATING NAMESPACE (${e})`);let t=new d(e);return t.id=l,s.createHook({init(n,i,o,a){if(l=s.executionAsyncId(),t.active)t._contexts.set(n,t.active),u&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${i}] (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`);else if(0===l){let o=s.triggerAsyncId(),c=t._contexts.get(o);c?(t._contexts.set(n,c),u&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)):u&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}if(u&&"PROMISE"===i){f(r.inspect(a,{showHidden:!0}));let s=a.parentId;f(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${s} asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}},before(n){let i;if(l=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(l),i){if(u){let o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`),t._indent+=2}t.enter(i)}else if(u){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${n} currentUid:${l} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${r.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(n){let i;if(l=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(l),i){if(u){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}t.exit(i)}else if(u){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${n} currentUid:${l} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}},destroy(n){if(l=s.executionAsyncId(),u){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${l} asyncId:${n} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(t._contexts.get(l))}`)}t._contexts.delete(n)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:h,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){h(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},d.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,u&&f(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+l+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),t},d.prototype.get=function(e){if(this.active){if(u){let t=s.executionAsyncId(),n=s.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);f(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+l+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),f(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${l} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} active:${r.inspect(this.active)}`)}return this.active[e]}if(u){let t=s.currentId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${l} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length}`)}},d.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=l,u){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${l} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} context:${r.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},d.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(u){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${l} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} context:${r.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[c]=t),e}finally{if(u){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${l} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} ${r.inspect(t)}`)}this.exit(t)}},d.prototype.runAndReturn=function(e){let t;return this.run((function(n){t=e(n)})),t},d.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return u&&f("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+l+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(u&&f("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+l+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,u&&f("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+l+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},d.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},d.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),u){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${l} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}this._set.push(this.active),this.active=e},d.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),u){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${l} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(u&&f("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},d.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},d.prototype.fromException=function(e){return e[c]},process.namespaces={}})),er=v(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=process.nextTick;process.nextTick=function(){if(!t.enabled)return r.apply(process,arguments);let i=new Array(arguments.length);for(let e=0;e<arguments.length;e++)i[e]=arguments[e];let o=i[0];if("function"!=typeof o)throw new TypeError("callback is not a function");let s=new n,a=--t.counter;return e.init.call(s,a,0,null,null),i[0]=function(){e.pre.call(s,a);let t=!0;try{o.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(s,a,!0),e.destroy.call(null,a)}))}e.post.call(s,a,!1),e.destroy.call(null,a)},r.apply(process,i)}}})),tr=v(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=global.Promise,i=r.prototype.then;function o(t,n,r,i){return"function"!=typeof t?i?function(t){return function(n){return e.destroy.call(null,t),n}}(r):function(t){return function(n){throw e.destroy.call(null,t),n}}(r):function(){e.pre.call(n,r);try{return t.apply(this,arguments)}finally{e.post.call(n,r,!1),e.destroy.call(null,r)}}}r.prototype.then=function(r,s){if(!t.enabled)return i.call(this,r,s);let a=new n,c=--t.counter;return e.init.call(a,c,0,null,null),i.call(this,o(r,a,c,!0),o(s,a,c,!1))}}})),nr=v(((e,t)=>{"use strict";var r=n(8213);function i(){}function o(){}function s(){}var a=new Map,c=new Map,u=new Map,l=null,d=!1;function p(e,t,n,i,o,s,a){let c=r[n],u=r[i];r[n]=function(){if(!t.enabled)return c.apply(r,arguments);let n=new Array(arguments.length);for(let e=0;e<arguments.length;e++)n[e]=arguments[e];let i=n[0];if("function"!=typeof i)throw new TypeError('"callback" argument must be a function');let u,p=new o,h=--t.counter;return e.init.call(p,h,0,null,null),n[0]=function(){l=u,e.pre.call(p,h);let t=!0;try{i.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(p,h,!0),s.delete(u),e.destroy.call(null,h)}))}e.post.call(p,h,!1),l=null,(a||d)&&(d=!1,s.delete(u),e.destroy.call(null,h))},u=c.apply(r,n),s.set(u,h),u},r[i]=function(t){if(l===t&&null!==t)d=!0;else if(s.has(t)){let n=s.get(t);s.delete(t),e.destroy.call(null,n)}u.apply(r,arguments)}}t.exports=function(){p(this._hooks,this._state,"setTimeout","clearTimeout",i,a,!0),p(this._hooks,this._state,"setInterval","clearInterval",o,c,!1),p(this._hooks,this._state,"setImmediate","clearImmediate",s,u,!0),global.setTimeout=r.setTimeout,global.setInterval=r.setInterval,global.setImmediate=r.setImmediate,global.clearTimeout=r.clearTimeout,global.clearInterval=r.clearInterval,global.clearImmediate=r.clearImmediate}})),rr=v(((e,t)=>{t.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen <amwebdk@gmail.com>",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}})),ir=v(((e,t)=>{"use strict";var n=process.binding("async_wrap"),r=n.Providers.TIMERWRAP,i={nextTick:er(),promise:tr(),timers:nr()},o=new Set;function s(){this.enabled=!1,this.counter=0}function a(){let e=this.initFns=[],t=this.preFns=[],n=this.postFns=[],i=this.destroyFns=[];this.init=function(t,n,i,s){if(n!==r)for(let r of e)r(t,this,n,i,s);else o.add(t)},this.pre=function(e){if(!o.has(e))for(let n of t)n(e,this)},this.post=function(e,t){if(!o.has(e))for(let r of n)r(e,this,t)},this.destroy=function(e){if(o.has(e))o.delete(e);else for(let t of i)t(e)}}function c(e,t){let n=e.indexOf(t);-1!==n&&e.splice(n,1)}function u(){this._state=new s,this._hooks=new a,this.version=rr().version,this.providers=n.Providers;for(let e of Object.keys(i))i[e].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),n.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}a.prototype.add=function(e){e.init&&this.initFns.push(e.init),e.pre&&this.preFns.push(e.pre),e.post&&this.postFns.push(e.post),e.destroy&&this.destroyFns.push(e.destroy)},a.prototype.remove=function(e){e.init&&c(this.initFns,e.init),e.pre&&c(this.preFns,e.pre),e.post&&c(this.postFns,e.post),e.destroy&&c(this.destroyFns,e.destroy)},t.exports=u,u.prototype.addHooks=function(e){this._hooks.add(e)},u.prototype.removeHooks=function(e){this._hooks.remove(e)},u.prototype.enable=function(){this._state.enabled=!0,n.enable()},u.prototype.disable=function(){this._state.enabled=!1,n.disable()}})),or=v(((e,t)=>{t.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen <amwebdk@gmail.com>",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}})),sr=v(((e,t)=>{t.exports=function(e,t){var n=[];n.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return"<error: "+e+">"}catch{return"<error>"}}}(e));for(var r=0;r<t.length;r++){var i,o=t[r];try{i=o.toString()}catch(e){try{i="<error: "+e+">"}catch{i="<error>"}}n.push(" at "+i)}return n.join("\n")}})),ar=v(((e,t)=>{var n=sr();function r(){this.extend=new s,this.filter=new s,this.format=new a,this.version=or().version}var i=!1;r.prototype.callSite=function e(t){t||(t={}),i=!0;var n={};Error.captureStackTrace(n,e);var r=n.stack;return i=!1,r=r.slice(t.slice||0),t.extend&&(r=this.extend._modify(n,r)),t.filter&&(r=this.filter._modify(n,r)),r};var o=new r;function s(){this._modifiers=[]}function a(){this._formater=n,this._previous=void 0}s.prototype._modify=function(e,t){for(var n=0,r=this._modifiers.length;n<r;n++)t=this._modifiers[n](e,t);return t},s.prototype.attach=function(e){this._modifiers.push(e)},s.prototype.deattach=function(e){var t=this._modifiers.indexOf(e);return-1!==t&&(this._modifiers.splice(t,1),!0)},a.prototype.replace=function(e){e?this._formater=e:this.restore()},a.prototype.restore=function(){this._formater=n,this._previous=void 0},a.prototype._backup=function(){this._previous=this._formater},a.prototype._roolback=function(){this._previous===n?this.replace(void 0):this.replace(this._previous),this._previous=void 0},Error.prepareStackTrace&&o.format.replace(Error.prepareStackTrace);var c=!1;function u(e,t){if(i)return t;if(c)return n(e,t);var r=t.concat();r=o.extend._modify(e,r),r=(r=o.filter._modify(e,r)).slice(0,Error.stackTraceLimit),Object.isExtensible(e)&&void 0===Object.getOwnPropertyDescriptor(e,"callSite")&&(e.callSite={original:t,mutated:r}),c=!0;var s=o.format._formater(e,r);return c=!1,s}Object.defineProperty(Error,"prepareStackTrace",{get:function(){return u},set:function(e){e===u?o.format._roolback():(o.format._backup(),o.format.replace(e))}}),Object.defineProperty(Error.prototype,"callSite",{get:function(){return this.stack,this.callSite},set:function(e){Object.defineProperty(this,"callSite",{value:e,writable:!0,configurable:!0})},configurable:!0}),t.exports=o})),cr=v(((e,t)=>{if(global._stackChain){if(global._stackChain.version!==or().version)throw new Error("Conflicting version of stack-chain found");t.exports=global._stackChain}else t.exports=global._stackChain=ar()})),ur=v(((e,t)=>{"use strict";var n=ir();if(global._asyncHook){if(global._asyncHook.version!==rr().version)throw new Error("Conflicting version of async-hook-jl found");t.exports=global._asyncHook}else cr().filter.attach((function(e,t){return t.filter((function(e){let t=e.getFileName();return!(t&&t.slice(0,__dirname.length)===__dirname)}))})),t.exports=global._asyncHook=new n})),lr=v(((e,t)=>{"use strict";var r=n(1669),i=n(2357),o=Jn(),s=ur(),a="cls@contexts",c="error@context",u=[];for(let e in s.providers)u[s.providers[e]]=e;var l,d,p=process.env.DEBUG_CLS_HOOKED,h=-1;function f(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function g(e){return process.namespaces[e]}function m(e){let t=g(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function v(e){process.env.DEBUG&&process._rawDebug(e)}function y(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(t.exports={getNamespace:g,createNamespace:function(e){i.ok(e,"namespace must be given a name."),p&&v("CREATING NAMESPACE "+e);let t=new f(e);return t.id=h,s.addHooks({init(n,i,o,s,a){h=n,s?(t._contexts.set(n,t._contexts.get(s)),p&&v("PARENTID: "+e+" uid:"+n+" parent:"+s+" provider:"+o)):t._contexts.set(h,t.active),p&&v("INIT "+e+" uid:"+n+" parent:"+s+" provider:"+u[o]+" active:"+r.inspect(t.active,!0))},pre(n,i){h=n;let o=t._contexts.get(n);o?(p&&v(" PRE "+e+" uid:"+n+" handle:"+y(i)+" context:"+r.inspect(o)),t.enter(o)):p&&v(" PRE MISSING CONTEXT "+e+" uid:"+n+" handle:"+y(i))},post(n,i){h=n;let o=t._contexts.get(n);o?(p&&v(" POST "+e+" uid:"+n+" handle:"+y(i)+" context:"+r.inspect(o)),t.exit(o)):p&&v(" POST MISSING CONTEXT "+e+" uid:"+n+" handle:"+y(i))},destroy(n){h=n,p&&v("DESTROY "+e+" uid:"+n+" context:"+r.inspect(t._contexts.get(h))+" active:"+r.inspect(t.active,!0)),t._contexts.delete(n)}}),process.namespaces[e]=t,t},destroyNamespace:m,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){m(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},f.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return p&&v(" SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0)),this.active[e]=t,t},f.prototype.get=function(e){if(this.active)return p&&v(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0)),this.active[e];p&&v(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0))},f.prototype.createContext=function(){p&&v(" CREATING Context: "+this.name+" uid:"+h+" len:"+this._set.length+" active:"+r.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=h,p&&v(" CREATED Context: "+this.name+" uid:"+h+" len:"+this._set.length+" context:"+r.inspect(e,!0,2,!0)),e},f.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return p&&v(" BEFORE RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),e(t),t}catch(e){throw e&&(e[c]=t),e}finally{p&&v(" AFTER RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t)}},f.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},f.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return p&&v(" BEFORE runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(p&&v(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,p&&v(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},f.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},f.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),p&&v(" ENTER "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+r.inspect(e)),this._set.push(this.active),this.active=e},f.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),p&&v(" EXIT "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+r.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(p&&v("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},f.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},f.prototype.fromException=function(e){return e[c]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),p)for(d in(l=cr()).filter._modifiers)l.filter.deattach(d)})),dr=v(((e,t)=>{"use strict";var n=Yn();process&&n.gte(process.versions.node,"8.0.0")?t.exports=Zn():t.exports=lr()})),pr=v(((e,t)=>{var n;e=t.exports=K,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],o=e.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=s++;o[l]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[u]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[u]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var v=s++;o[v]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var y=s++,_="v?"+o[l]+o[f]+"?"+o[v]+"?";o[y]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[v]+"?",S=s++;o[S]="^"+b+"$";var E=s++;o[E]="((?:<|>)?=?)";var C=s++;o[C]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var R=s++;o[R]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[v]+"?)?)?";var w=s++;o[w]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[g]+")?"+o[v]+"?)?)?";var D=s++;o[D]="^"+o[E]+"\\s*"+o[R]+"$";var P=s++;o[P]="^"+o[E]+"\\s*"+o[w]+"$";var I=s++;o[I]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=s++;o[O]="(?:~>?)";var x=s++;o[x]="(\\s*)"+o[O]+"\\s+",i[x]=new RegExp(o[x],"g");var A=s++;o[A]="^"+o[O]+o[R]+"$";var k=s++;o[k]="^"+o[O]+o[w]+"$";var N=s++;o[N]="(?:\\^)";var M=s++;o[M]="(\\s*)"+o[N]+"\\s+",i[M]=new RegExp(o[M],"g");var L=s++;o[L]="^"+o[N]+o[R]+"$";var j=s++;o[j]="^"+o[N]+o[w]+"$";var q=s++;o[q]="^"+o[E]+"\\s*("+b+")$|^$";var F=s++;o[F]="^"+o[E]+"\\s*("+_+")$|^$";var H=s++;o[H]="(\\s*)"+o[E]+"\\s*("+b+"|"+o[R]+")",i[H]=new RegExp(o[H],"g");var U=s++;o[U]="^\\s*("+o[R]+")\\s+-\\s+("+o[R]+")\\s*$";var $=s++;o[$]="^\\s*("+o[w]+")\\s+-\\s+("+o[w]+")\\s*$";var V,B=s++;for(o[B]="(<|>)?=?\\s*\\*",V=0;V<35;V++)n(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[S]:i[y]).test(e))return null;try{return new K(e,t)}catch{return null}}function K(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[S]:i[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}e.parse=G,e.valid=function(e,t){var n=G(e,t);return n?n.version:null},e.clean=function(e,t){var n=G(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=K,K.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},K.prototype.toString=function(){return this.version},K.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof K||(e=new K(e,this.options)),this.compareMain(e)||this.comparePre(e)},K.prototype.compareMain=function(e){return e instanceof K||(e=new K(e,this.options)),z(this.major,e.major)||z(this.minor,e.minor)||z(this.patch,e.patch)},K.prototype.comparePre=function(e){if(e instanceof K||(e=new K(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return z(r,i)}while(++t)},K.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new K(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(J(e,t))return null;var n=G(e),r=G(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=z;var W=/^[0-9]+$/;function z(e,t){var n=W.test(e),r=W.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function X(e,t,n){return new K(e,n).compare(new K(t,n))}function Y(e,t,n){return X(e,t,n)>0}function Q(e,t,n){return X(e,t,n)<0}function J(e,t,n){return 0===X(e,t,n)}function Z(e,t,n){return 0!==X(e,t,n)}function ee(e,t,n){return X(e,t,n)>=0}function te(e,t,n){return X(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return J(e,n,r);case"!=":return Z(e,n,r);case">":return Y(e,n,r);case">=":return ee(e,n,r);case"<":return Q(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return z(t,e)},e.major=function(e,t){return new K(e,t).major},e.minor=function(e,t){return new K(e,t).minor},e.patch=function(e,t){return new K(e,t).patch},e.compare=X,e.compareLoose=function(e,t){return X(e,t,!0)},e.rcompare=function(e,t,n){return X(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Y,e.lt=Q,e.eq=J,e.neq=Z,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,r,i,o,s,a,c,u,l,d,p){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(l)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+l+"-"+d:"<="+a)).trim()}function ce(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==ie&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new oe(t,n)}catch{return!1}return t.test(e)}function le(e,t,n,r){var i,o,s,a,c;switch(e=new K(e,r),t=new oe(t,r),n){case">":i=Y,o=te,s=Q,a=">",c=">=";break;case"<":i=Q,o=ee,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var u=0;u<t.set.length;++u){var l=t.set[u],d=null,p=null;if(l.forEach((function(e){e.semver===ie&&(e=new re(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[q]:i[F],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new K(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[$]:i[U];e=e.replace(r,ae),n("hyphen replace",e),e=e.replace(i[H],"$1$2$3"),n("comparator trim",e,i[H]),e=(e=(e=e.replace(i[x],"$1~")).replace(i[M],"$1^")).split(/\s+/).join(" ");var o=t?i[q]:i[F],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[j]:i[L];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[k]:i[A];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),se(r)?a="":se(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":se(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[P]:i[D];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=se(i),u=c||se(o),l=u||se(s);return"="===r&&l&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[B],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t<this.set.length;t++)if(ce(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new oe(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new K(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new oe(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new K(r=e,n))})),r},e.minVersion=function(e,t){e=new oe(e,t);var n=new K("0.0.0");if(e.test(n)||(n=new K("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new K(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Y(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return le(e,t,"<",n)},e.gtr=function(e,t,n){return le(e,t,">",n)},e.outside=le,e.prerelease=function(e,t){var n=G(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[I]);return null==t?null:G(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),hr=v(((e,t)=>{var n,r,i,o,s,a=Qn().wrap,c=[],u=0,l=!1,d=[];function p(e,t){var n=e.length,r=t.length,i=[];if(0===n&&0===r)return i;for(var o=0;o<n;o++)i[o]=e[o];if(0===r)return i;for(var s=0;s<r;s++){var a=!0;for(o=0;o<n;o++)if(e[o].uid===t[s].uid){a=!1;break}a&&i.push(t[s])}return i}function h(e,t){"function"==typeof e.create&&(this.create=e.create,this.flags|=1),"function"==typeof e.before&&(this.before=e.before,this.flags|=2),"function"==typeof e.after&&(this.after=e.after,this.flags|=4),"function"==typeof e.error&&(this.error=e.error,this.flags|=8),this.uid=++u,this.data=void 0===t?null:t}function f(e,t){if("object"!=typeof e||!e)throw new TypeError("callbacks argument must be an object");return e instanceof h?e:new h(e,t)}process._fatalException?(i=!1,n=function(e){var t=c.length;if(i||0===t)return!1;var n=!1;i=!0;for(var r=0;r<t;++r){var s=c[r];if(0!=(8&s.flags)){var a=o&&o[s.uid];n=s.error(a,e)||n}}return i=!1,d.length>0&&(c=d.pop()),o=void 0,n&&!l},r=function(e,t,n){var r=[];l=!0;for(var i=0;i<n;++i){var s=t[i];if(r[s.uid]=s.data,0!=(1&s.flags)){var a=s.create(s.data);void 0!==a&&(r[s.uid]=a)}}return l=!1,function(){o=r,d.push(c),c=p(t,c),l=!0;for(var i=0;i<n;++i)(2&t[i].flags)>0&&t[i].before(this,r[t[i].uid]);l=!1;var s=e.apply(this,arguments);for(l=!0,i=0;i<n;++i)(4&t[i].flags)>0&&t[i].after(this,r[t[i].uid]);return l=!1,c=d.pop(),o=void 0,s}},a(process,"_fatalException",(function(e){return function(t){return n(t)||e(t)}}))):(s=!1,n=function(e){if(s)throw e;for(var t=!1,n=c.length,r=0;r<n;++r){var i=c[r];0!=(8&i.flags)&&(t=i.error(null,e)||t)}if(!t&&l)throw e},r=function(e,t,r){var i=[];l=!0;for(var o=0;o<r;++o){var a=t[o];if(i[a.uid]=a.data,0!=(1&a.flags)){var u=a.create(a.data);void 0!==u&&(i[a.uid]=u)}}return l=!1,function(){var o,a=!1,u=!1;d.push(c),c=p(t,c),l=!0;for(var h=0;h<r;++h)(2&t[h].flags)>0&&t[h].before(this,i[t[h].uid]);l=!1;try{o=e.apply(this,arguments)}catch(e){for(a=!0,h=0;h<r;++h)if(0!=(8&c[h].flags))try{u=c[h].error(i[t[h].uid],e)||u}catch(e){throw s=!0,e}if(!u)throw process.removeListener("uncaughtException",n),process._originalNextTick((function(){process.addListener("uncaughtException",n)})),e}finally{if(!a||u){for(l=!0,h=0;h<r;++h)(4&t[h].flags)>0&&t[h].after(this,i[t[h].uid]);l=!1}c=d.pop()}return o}},process.addListener("uncaughtException",n)),h.prototype.create=void 0,h.prototype.before=void 0,h.prototype.after=void 0,h.prototype.error=void 0,h.prototype.data=void 0,h.prototype.uid=0,h.prototype.flags=0,process.createAsyncListener=f,process.addAsyncListener=function(e,t){var n;n=e instanceof h?e:f(e,t);for(var r=!1,i=0;i<c.length;i++)if(n===c[i]){r=!0;break}return r||c.push(n),n},process.removeAsyncListener=function(e){for(var t=0;t<c.length;t++)if(e===c[t]){c.splice(t,1);break}},t.exports=function(e){var t=c.length;if(0===t)return e;for(var n=c.slice(),i=0;i<t;++i)if(n[i].flags>0)return r(e,n,t);return function(e,t,n){l=!0;for(var r=0;r<n;++r){var i=t[r];i.create&&i.create(i.data)}return l=!1,function(){d.push(c),c=p(t,c);var n=e.apply(this,arguments);return c=d.pop(),n}}(e,n,t)}})),fr=v(((e,t)=>{"use strict";t.exports=(e,t)=>class extends e{constructor(e){var n,r;super((function(e,o){n=this,r=[function(n){return t(i,!1),e(n)},function(e){return t(i,!1),o(e)}]}));var i=this;try{e.apply(n,r)}catch(e){r[1](e)}return i}}})),gr=v((()=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var e=Qn(),t=pr(),r=e.wrap,i=e.massWrap,o=hr(),s=n(1669),a=t.gte(process.version,"6.0.0"),c=t.gte(process.version,"7.0.0"),u=t.gte(process.version,"8.0.0"),l=t.gte(process.version,"11.0.0"),d=n(1631);function p(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=o(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=o(this._handle.onconnection))}}}function h(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=o(t._originalOnread)}}c&&!d._normalizeArgs?d._normalizeArgs=function(e){if(0===e.length)return[{},null];var t=e[0],n={};"object"==typeof t&&null!==t?n=t:function(e){return"string"==typeof e&&!1===function(e){return(e=Number(e))>=0&&e}(e)}(t)?n.path=t:(n.port=t,e.length>1&&"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"!=typeof r?[n,null]:[n,r]}:!c&&!d._normalizeConnectArgs&&(d._normalizeConnectArgs=function(e){var t={};"object"==typeof e[0]&&null!==e[0]?t=e[0]:"string"==typeof e[0]&&!1===function(e){return(e=Number(e))>=0&&e}(e[0])?t.path=e[0]:(t.port=e[0],"string"==typeof e[1]&&(t.host=e[1]));var n=e[e.length-1];return"function"==typeof n?[t,n]:[t]}),"_setUpListenHandle"in d.Server.prototype?r(d.Server.prototype,"_setUpListenHandle",p):r(d.Server.prototype,"_listen2",p),r(d.Socket.prototype,"connect",(function(e){return function(){var t;(t=u&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:c?d._normalizeArgs(arguments):d._normalizeConnectArgs(arguments))[1]&&(t[1]=o(t[1]));var n=e.apply(this,t);return h(this),n}}));var f=n(8605);r(f.Agent.prototype,"addRequest",(function(e){return function(t){var n=t.onSocket;return t.onSocket=o((function(e){return h(e),n.apply(this,arguments)})),e.apply(this,arguments)}}));var g=n(3129);function m(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=o(e._handle.onread),r(e._handle,"close",O))})),e._handle&&(e._handle.onexit=o(e._handle.onexit))}g.ChildProcess?r(g.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return m(this),t}})):i(g,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return m(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var v=[];process._nextDomainTick&&v.push("_nextDomainTick"),process._tickDomainCallback&&v.push("_tickDomainCallback"),i(process,v,I),r(process,"nextTick",O);var y=["setTimeout","setInterval"];global.setImmediate&&y.push("setImmediate");var _=n(8213),b=global.setTimeout===_.setTimeout;i(_,y,O),b&&i(global,y,O);var S=n(881);i(S,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],I),S.resolveNaptr&&r(S,"resolveNaptr",I);var E,C,T,R=n(5747);i(R,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],I),R.lchown&&r(R,"lchown",I),R.lchmod&&r(R,"lchmod",I),R.ftruncate&&r(R,"ftruncate",I);try{E=n(8761)}catch{}E&&E.Deflate&&E.Deflate.prototype&&((C=Object.getPrototypeOf(E.Deflate.prototype))._transform?r(C,"_transform",I):C.write&&C.flush&&C.end&&i(C,["write","flush","end"],I));try{T=n(6417)}catch{}T&&(w=["pbkdf2","randomBytes"],l||w.push("pseudoRandomBytes"),i(T,w,I));var w,D,P=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();function I(e){var t=function(){var t,n=arguments.length-1;if("function"==typeof arguments[n]){t=Array(arguments.length);for(var r=0;r<arguments.length-1;r++)t[r]=arguments[r];t[n]=o(arguments[n])}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=o(r)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof i&&(i=o(i)),e.call(this,n,r,i))};case 4:return function(n,r,i,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof s&&(s=o(s)),e.call(this,n,r,i,s))};case 5:return function(n,r,i,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof a&&(a=o(a)),e.call(this,n,r,i,s,a))};case 6:return function(n,r,i,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof c&&(c=o(c)),e.call(this,n,r,i,s,a,c))};default:return t}}function O(e){var t=function(){var t;if("function"==typeof arguments[0]){(t=Array(arguments.length))[0]=o(arguments[0]);for(var n=1;n<arguments.length;n++)t[n]=arguments[n]}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i))};case 4:return function(n,r,i,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s))};case 5:return function(n,r,i,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s,a))};case 6:return function(n,r,i,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s,a,c))};default:return t}}P&&(D=process.addAsyncListener({create:function(){P=!1}}),global.Promise.resolve(!0).then((function(){P=!1})),process.removeAsyncListener(D)),P&&function(){var e=global.Promise;function t(r){if(!(this instanceof t))return e(r);if("function"!=typeof r)return new e(r);var i,o,s=new e((function(e,t){i=this,o=[function(t){return n(s,!1),e(t)},function(e){return n(s,!1),t(e)}]}));s.__proto__=t.prototype;try{r.apply(i,o)}catch(e){o[1](e)}return s}function n(e,t){(!e.__asl_wrapper||t)&&(e.__asl_wrapper=o(i))}function i(t,r,o,s){var a;try{return{returnVal:a=r.call(t,o),error:!1}}catch(e){return{errorVal:e,error:!0}}finally{a instanceof e?s.__asl_wrapper=function(){var e=a.__asl_wrapper||i;return e.apply(this,arguments)}:n(s,!0)}}function c(e){return function(){var t=this,n=e.apply(t,Array.prototype.map.call(arguments,r));return n.__asl_wrapper=function(e,r,o,s){return t.__asl_wrapper?(t.__asl_wrapper(e,(function(){}),null,n),n.__asl_wrapper(e,r,o,s)):i(e,r,o,s)},n;function r(e){return"function"!=typeof e?e:o((function(r){var o=(t.__asl_wrapper||i)(this,e,r,n);if(o.error)throw o.errorVal;return o.returnVal}))}}}s.inherits(t,e),r(e.prototype,"then",c),e.prototype.chain&&r(e.prototype,"chain",c),a?global.Promise=fr()(e,n):(["all","race","reject","resolve","accept","defer"].forEach((function(n){"function"==typeof e[n]&&(t[n]=e[n])})),global.Promise=t)}()})),mr=v(((e,t)=>{"use strict";var r=n(2357),i=Jn(),o="cls@contexts",s="error@context";function a(e){this.name=e,this.active=null,this._set=[],this.id=null}function c(e){return process.namespaces[e]}function u(e){var t=c(e);r.ok(t,"can't delete nonexistent namespace!"),r.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function l(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){u(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||gr(),a.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},a.prototype.get=function(e){if(this.active)return this.active[e]},a.prototype.createContext=function(){return Object.create(this.active)},a.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[s]=t),e}finally{this.exit(t)}},a.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},a.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[s]=t),e}finally{n.exit(t)}}},a.prototype.enter=function(e){r.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},a.prototype.exit=function(e){if(r.ok(e,"context must be provided for exiting"),this.active===e)return r.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);r.ok(t>=0,"context not currently entered; can't exit"),r.ok(t,"can't remove top context"),this._set.splice(t,1)},a.prototype.bindEmitter=function(e){r.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,n="context@"+this.name;i(e,(function(e){!e||(e[o]||(e[o]=Object.create(null)),e[o][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[o])return e;var t=e,n=e[o];return Object.keys(n).forEach((function(e){var r=n[e];t=r.namespace.bind(t,r.context)})),t}))},a.prototype.fromException=function(e){return e[s]},process.namespaces||l(),t.exports={getNamespace:c,createNamespace:function(e){r.ok(e,"namespace must be given a name!");var t=new a(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,n){n&&t.enter(n)},after:function(e,n){n&&t.exit(n)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:u,reset:l}})),vr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorrelationContextManager=void 0;var t=b(),n=Qt(),r=tn(),i=nn(),o=Xn(),s=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,n,r,i,o){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new a(r)}:null},e.spanToContextObject=function(t,n,i){var o=new r;return o.traceId=t.traceId,o.spanId=t.spanId,o.traceFlag=r.formatOpenTelemetryTraceFlags(t.traceFlags)||r.DEFAULT_TRACE_FLAG,o.parentId=n,e.generateContextObject(o.traceId,o.parentId,i,null,o)},e.runWithContext=function(t,n){var r;return e.enabled?e.session.bind(n,((r={})[e.CONTEXT_NAME]=t,r))():n()},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t,n){var r;return e.enabled?e.session.bind(t,n?((r={})[e.CONTEXT_NAME]=n,r):void 0):t},e.enable=function(t){if(!this.enabled){if(!this.isNodeVersionCompatible())return void(this.enabled=!1);e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,typeof this.cls>"u"&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=dr():this.cls=mr()),e.session=this.cls.createNamespace("AI-CLS-Session"),n.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0}},e.startOperation=function(n,s){var a=n&&n.traceContext||null,c=n&&n.traceId?n:null,u=n&&n.headers;if(c){var l=new r("00-"+c.traceId+"-"+c.spanId+"-01"),d=new i(c.traceState?c.traceState.serialize():null);return e.generateContextObject(c.traceId,"|"+c.traceId+"."+c.spanId+".","string"==typeof s?s:"",void 0,l,d)}if(a){l=new r(a.traceparent),d=new i(a.tracestate);var p="object"==typeof s?new o(s):null;return e.generateContextObject(l.traceId,l.parentId,"string"==typeof s?s:p.getOperationName({}),p&&p.getCorrelationContextHeader()||void 0,l,d)}return u?(l=new r(u.traceparent?u.traceparent.toString():null),d=new i(u.tracestate?u.tracestate.toString():null),p=new o(n),e.generateContextObject(l.traceId,l.parentId,p.getOperationName({}),p.getCorrelationContextHeader(),l,d)):(t.warn("startOperation was called with invalid arguments",arguments),null)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,r=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&n)&&r},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();e.CorrelationContextManager=s;var a=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t<this.props.length;++t){var n=this.props[t];if(n.key===e)return n.value}},e.prototype.setProperty=function(n,r){if(e.bannedCharacters.test(n)||e.bannedCharacters.test(r))t.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+n+" and value: "+r);else{for(var i=0;i<this.props.length;++i){var o=this.props[i];if(o.key===n)return void(o.value=r)}this.props.push({key:n,value:r})}},e.bannedCharacters=/[,=]/,e}()})),yr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=Wn(),n=R(),r=[],i=function(e){var n=e.data.message;r.forEach((function(r){n instanceof Error?r.trackException({exception:n}):(n.lastIndexOf("\n")==n.length-1&&(n=n.substring(0,n.length-1)),r.trackTrace({message:n,severity:e.data.stderr?t.SeverityLevel.Warning:t.SeverityLevel.Information}))}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("console",i),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("console",i)},e.dispose=function(){n.channel.unsubscribe("console",i),r=[]}})),_r=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=Wn(),n=R(),r=[],i={10:t.SeverityLevel.Verbose,20:t.SeverityLevel.Verbose,30:t.SeverityLevel.Information,40:t.SeverityLevel.Warning,50:t.SeverityLevel.Error,60:t.SeverityLevel.Critical},o=function(e){var t=e.data.result;r.forEach((function(n){var r=i[e.data.level];t instanceof Error?n.trackException({exception:t}):n.trackTrace({message:t,severity:r})}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("bunyan",o),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("bunyan",o)},e.dispose=function(){n.channel.unsubscribe("bunyan",o),r=[]}})),br=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=Wn(),n=R(),r=[],i={syslog:function(e){var n={emerg:t.SeverityLevel.Critical,alert:t.SeverityLevel.Critical,crit:t.SeverityLevel.Critical,error:t.SeverityLevel.Error,warning:t.SeverityLevel.Warning,notice:t.SeverityLevel.Information,info:t.SeverityLevel.Information,debug:t.SeverityLevel.Verbose};return void 0===n[e]?t.SeverityLevel.Information:n[e]},npm:function(e){var n={error:t.SeverityLevel.Error,warn:t.SeverityLevel.Warning,info:t.SeverityLevel.Information,verbose:t.SeverityLevel.Verbose,debug:t.SeverityLevel.Verbose,silly:t.SeverityLevel.Verbose};return void 0===n[e]?t.SeverityLevel.Information:n[e]},unknown:function(e){return t.SeverityLevel.Information}},o=function(e){var t=e.data.message;r.forEach((function(n){if(t instanceof Error)n.trackException({exception:t,properties:e.data.meta});else{var r=i[e.data.levelKind](e.data.level);n.trackTrace({message:t,severity:r,properties:e.data.meta})}}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("winston",o),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("winston",o)},e.dispose=function(){n.channel.unsubscribe("winston",o),r=[]}})),Sr=v(((e,t)=>{"use strict";var n=Qt(),r=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){n.IsInitialized&&(yr().enable(e&&t,this._client),_r().enable(e,this._client),br().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();t.exports=r})),Er=v(((e,t)=>{"use strict";var n=function(){function e(t){if(e.INSTANCE)throw new Error("Exception tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t;var n=process.versions.node.split(".");e._canUseUncaughtExceptionMonitor=parseInt(n[0])>13||13===parseInt(n[0])&&parseInt(n[1])>=7}return e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.enable=function(t){var n=this;if(t){if(this._isInitialized=!0,!this._exceptionListenerHandle){var r=function(t,r,i){void 0===i&&(i=new Error(e._FALLBACK_ERROR_MESSAGE)),n._client.trackException({exception:i}),n._client.flush({isAppCrashing:!0}),t&&r&&1===process.listeners(r).length&&(console.error(i),process.exit(1))};e._canUseUncaughtExceptionMonitor?(this._exceptionListenerHandle=r.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle)):(this._exceptionListenerHandle=r.bind(this,!0,e.UNCAUGHT_EXCEPTION_HANDLER_NAME),this._rejectionListenerHandle=r.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.on(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle))}}else this._exceptionListenerHandle&&(e._canUseUncaughtExceptionMonitor?process.removeListener(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle):(process.removeListener(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.removeListener(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle)),this._exceptionListenerHandle=void 0,this._rejectionListenerHandle=void 0,delete this._exceptionListenerHandle,delete this._rejectionListenerHandle)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.INSTANCE=null,e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME="uncaughtExceptionMonitor",e.UNCAUGHT_EXCEPTION_HANDLER_NAME="uncaughtException",e.UNHANDLED_REJECTION_HANDLER_NAME="unhandledRejection",e._RETHROW_EXIT_MESSAGE="Application Insights Rethrow Exception Handler",e._FALLBACK_ERROR_MESSAGE="A promise was rejected without providing an error. Application Insights generated this error stack for you.",e._canUseUncaughtExceptionMonitor=!1,e}();t.exports=n})),Cr=v((e=>{"use strict";var t,n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HeartBeatMetricName=e.DependencyTypeName=e.SpanAttribute=e.TelemetryTypeStringToQuickPulseDocumentType=e.TelemetryTypeStringToQuickPulseType=e.QuickPulseType=e.QuickPulseDocumentType=e.PerformanceToQuickPulseCounter=e.MetricId=e.PerformanceCounter=e.QuickPulseCounter=e.DEFAULT_LIVEMETRICS_HOST=e.DEFAULT_LIVEMETRICS_ENDPOINT=e.DEFAULT_BREEZE_ENDPOINT=void 0,e.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",(r=n=e.QuickPulseCounter||(e.QuickPulseCounter={})).COMMITTED_BYTES="\\Memory\\Committed Bytes",r.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",r.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",r.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",r.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",r.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",r.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",r.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",r.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec",function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(i=e.PerformanceCounter||(e.PerformanceCounter={})),function(e){e.REQUESTS_DURATION="requests/duration",e.DEPENDENCIES_DURATION="dependencies/duration",e.EXCEPTIONS_COUNT="exceptions/count",e.TRACES_COUNT="traces/count"}(e.MetricId||(e.MetricId={})),e.PerformanceToQuickPulseCounter=((t={})[i.PROCESSOR_TIME]=n.PROCESSOR_TIME,t[i.REQUEST_RATE]=n.REQUEST_RATE,t[i.REQUEST_DURATION]=n.REQUEST_DURATION,t[n.COMMITTED_BYTES]=n.COMMITTED_BYTES,t[n.REQUEST_FAILURE_RATE]=n.REQUEST_FAILURE_RATE,t[n.DEPENDENCY_RATE]=n.DEPENDENCY_RATE,t[n.DEPENDENCY_FAILURE_RATE]=n.DEPENDENCY_FAILURE_RATE,t[n.DEPENDENCY_DURATION]=n.DEPENDENCY_DURATION,t[n.EXCEPTION_RATE]=n.EXCEPTION_RATE,t),e.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"},e.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"},e.TelemetryTypeStringToQuickPulseType={EventData:e.QuickPulseType.Event,ExceptionData:e.QuickPulseType.Exception,MessageData:e.QuickPulseType.Trace,MetricData:e.QuickPulseType.Metric,RequestData:e.QuickPulseType.Request,RemoteDependencyData:e.QuickPulseType.Dependency,AvailabilityData:e.QuickPulseType.Availability,PageViewData:e.QuickPulseType.PageView},e.TelemetryTypeStringToQuickPulseDocumentType={EventData:e.QuickPulseDocumentType.Event,ExceptionData:e.QuickPulseDocumentType.Exception,MessageData:e.QuickPulseDocumentType.Trace,MetricData:e.QuickPulseDocumentType.Metric,RequestData:e.QuickPulseDocumentType.Request,RemoteDependencyData:e.QuickPulseDocumentType.Dependency,AvailabilityData:e.QuickPulseDocumentType.Availability,PageViewData:e.QuickPulseDocumentType.PageView},e.SpanAttribute={HttpHost:"http.host",HttpMethod:"http.method",HttpPort:"http.port",HttpStatusCode:"http.status_code",HttpUrl:"http.url",HttpUserAgent:"http.user_agent",GrpcMethod:"grpc.method",GrpcService:"rpc.service"},e.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc"},e.HeartBeatMetricName="HeartBeat"})),Tr=v(((e,t)=>{"use strict";var r=n(2087),i=Cr(),o=function(){function e(t,n,r){void 0===n&&(n=6e4),void 0===r&&(r=!1),this._lastIntervalRequestExecutionTime=0,this._lastIntervalDependencyExecutionTime=0,e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t,this._collectionInterval=n,this._enableLiveMetricsCounters=r}return e.prototype.enable=function(t,n){var i=this;this._isEnabled=t,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),t?this._handle||(this._lastCpus=r.cpus(),this._lastRequests={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},this._lastDependencies={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},this._lastExceptions={totalExceptionCount:e._totalExceptionCount,time:+new Date},"function"==typeof process.cpuUsage&&(this._lastAppCpuUsage=process.cpuUsage()),this._lastHrtime=process.hrtime(),this._collectionInterval=n||this._collectionInterval,this._handle=setInterval((function(){return i.trackPerformance()}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countRequest=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalRequestExecutionTime+=r,!1===n&&e._totalFailedRequestCount++,e._totalRequestCount++}},e.countException=function(){e._totalExceptionCount++},e.countDependency=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalDependencyExecutionTime+=r,!1===n&&e._totalFailedDependencyCount++,e._totalDependencyCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPerformance=function(){this._trackCpu(),this._trackMemory(),this._trackNetwork(),this._trackDependencyRate(),this._trackExceptionRate()},e.prototype._trackCpu=function(){var e=r.cpus();if(e&&e.length&&this._lastCpus&&e.length===this._lastCpus.length){for(var t=0,n=0,o=0,s=0,a=0,c=0;e&&c<e.length;c++){var u=e[c],l=this._lastCpus[c],d=(u.model,u.speed,u.times),p=l.times;t+=d.user-p.user||0,n+=d.sys-p.sys||0,o+=d.nice-p.nice||0,s+=d.idle-p.idle||0,a+=d.irq-p.irq||0}var h=void 0;if("function"==typeof process.cpuUsage){var f=process.cpuUsage(),g=process.hrtime(),m=f.user-this._lastAppCpuUsage.user+(f.system-this._lastAppCpuUsage.system)||0;typeof this._lastHrtime<"u"&&2===this._lastHrtime.length&&(h=100*m/((1e6*(g[0]-this._lastHrtime[0])+(g[1]-this._lastHrtime[1])/1e3||0)*e.length)),this._lastAppCpuUsage=f,this._lastHrtime=g}var v=t+n+o+s+a||1;this._client.trackMetric({name:i.PerformanceCounter.PROCESSOR_TIME,value:(v-s)/v*100}),this._client.trackMetric({name:i.PerformanceCounter.PROCESS_TIME,value:h||t/v*100})}this._lastCpus=e},e.prototype._trackMemory=function(){var e=r.freemem(),t=process.memoryUsage().rss,n=r.totalmem()-e;this._client.trackMetric({name:i.PerformanceCounter.PRIVATE_BYTES,value:t}),this._client.trackMetric({name:i.PerformanceCounter.AVAILABLE_BYTES,value:e}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.COMMITTED_BYTES,value:n})},e.prototype._trackNetwork=function(){var t=this._lastRequests,n={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},r=n.totalRequestCount-t.totalRequestCount||0,o=n.totalFailedRequestCount-t.totalFailedRequestCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalRequestExecutionTime-this._lastIntervalRequestExecutionTime)/r||0;if(this._lastIntervalRequestExecutionTime=e._intervalRequestExecutionTime,s>0){var u=r/a,l=o/a;this._client.trackMetric({name:i.PerformanceCounter.REQUEST_RATE,value:u}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.PerformanceCounter.REQUEST_DURATION,value:c}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.REQUEST_FAILURE_RATE,value:l})}this._lastRequests=n},e.prototype._trackDependencyRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastDependencies,n={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},r=n.totalDependencyCount-t.totalDependencyCount||0,o=n.totalFailedDependencyCount-t.totalFailedDependencyCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalDependencyExecutionTime-this._lastIntervalDependencyExecutionTime)/r||0;if(this._lastIntervalDependencyExecutionTime=e._intervalDependencyExecutionTime,s>0){var u=r/a,l=o/a;this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_RATE,value:u}),this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_FAILURE_RATE,value:l}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_DURATION,value:c})}this._lastDependencies=n}},e.prototype._trackExceptionRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastExceptions,n={totalExceptionCount:e._totalExceptionCount,time:+new Date},r=n.totalExceptionCount-t.totalExceptionCount||0,o=n.time-t.time;if(o>0){var s=r/(o/1e3);this._client.trackMetric({name:i.QuickPulseCounter.EXCEPTION_RATE,value:s})}this._lastExceptions=n}},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e._totalRequestCount=0,e._totalFailedRequestCount=0,e._totalDependencyCount=0,e._totalFailedDependencyCount=0,e._totalExceptionCount=0,e._intervalDependencyExecutionTime=0,e._intervalRequestExecutionTime=0,e}();t.exports=o})),Rr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AggregatedMetricCounter=void 0;e.AggregatedMetricCounter=function(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}})),wr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreaggregatedMetricPropertyNames=void 0,e.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}})),Dr=v(((e,t)=>{"use strict";var n=e&&e.__assign||function(){return(n=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}).apply(this,arguments)},r=Cr(),i=Rr(),o=wr(),s=function(){function e(t,n){void 0===n&&(n=6e4),e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,e._dependencyCountersCollection=[],e._requestCountersCollection=[],e._exceptionCountersCollection=[],e._traceCountersCollection=[],this._client=t,this._collectionInterval=n}return e.prototype.enable=function(e,t){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._collectionInterval=t||this._collectionInterval,this._handle=setInterval((function(){return n.trackPreAggregatedMetrics()}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countException=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._exceptionCountersCollection).totalCount++},e.countTrace=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._traceCountersCollection).totalCount++},e.countRequest=function(t,n){if(e.isEnabled()){var r,i=e._getAggregatedCounter(n,this._requestCountersCollection);if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}i.intervalExecutionTime+=r,i.totalCount++}},e.countDependency=function(t,n){if(e.isEnabled()){var r,i=e._getAggregatedCounter(n,this._dependencyCountersCollection);if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}i.intervalExecutionTime+=r,i.totalCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPreAggregatedMetrics=function(){this._trackRequestMetrics(),this._trackDependencyMetrics(),this._trackExceptionMetrics(),this._trackTraceMetrics()},e._getAggregatedCounter=function(e,t){for(var n=!1,r=0;r<t.length;r++){if(e===t[r].dimensions)return t[r];if(Object.keys(e).length===Object.keys(t[r].dimensions).length){for(var o in e)if(e[o]!=t[r].dimensions[o]){n=!0;break}if(!n)return t[r];n=!1}}var s=new i.AggregatedMetricCounter(e);return t.push(s),s},e.prototype._trackRequestMetrics=function(){for(var t=0;t<e._requestCountersCollection.length;t++){var n=e._requestCountersCollection[t];n.time=+new Date;var i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime,s=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/i||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,o>0&&i>0&&this._trackPreAggregatedMetric({name:"Server response time",dimensions:n.dimensions,value:s,count:i,aggregationInterval:o,metricType:r.MetricId.REQUESTS_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackDependencyMetrics=function(){for(var t=0;t<e._dependencyCountersCollection.length;t++){var n=e._dependencyCountersCollection[t];n.time=+new Date;var i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime,s=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/i||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,o>0&&i>0&&this._trackPreAggregatedMetric({name:"Dependency duration",dimensions:n.dimensions,value:s,count:i,aggregationInterval:o,metricType:r.MetricId.DEPENDENCIES_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackExceptionMetrics=function(){for(var t=0;t<e._exceptionCountersCollection.length;t++){var n=e._exceptionCountersCollection[t],i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime;this._trackPreAggregatedMetric({name:"Exceptions",dimensions:n.dimensions,value:i,count:i,aggregationInterval:o,metricType:r.MetricId.EXCEPTIONS_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackTraceMetrics=function(){for(var t=0;t<e._traceCountersCollection.length;t++){var n=e._traceCountersCollection[t],i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime;this._trackPreAggregatedMetric({name:"Traces",dimensions:n.dimensions,value:i,count:i,aggregationInterval:o,metricType:r.MetricId.TRACES_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackPreAggregatedMetric=function(e){var t={};for(var r in e.dimensions)t[o.PreaggregatedMetricPropertyNames[r]]=e.dimensions[r];t=n(n({},t),{"_MS.MetricId":e.metricType,"_MS.AggregationIntervalMs":String(e.aggregationInterval),"_MS.IsAutocollected":"True"});var i={name:e.name,value:e.value,count:e.count,properties:t,kind:"Aggregation"};this._client.trackMetric(i)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e}();t.exports=s})),Pr=v(((e,t)=>{"use strict";var r=n(2087),i=n(5747),o=n(5622),s=Wn(),a=b(),c=function(){function e(e){this.keys=new s.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||o.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.appVersion[t]=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=r&&r.hostname(),this.tags[this.keys.deviceOSVersion]=r&&r.type()+" "+r.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=r&&r.arch(),this.tags["ai.device.osPlatform"]=r&&r.platform()},e.prototype._loadInternalContext=function(){var t=o.resolve(__dirname,"../../package.json");if(!e.sdkVersion){e.sdkVersion="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.sdkVersion=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();t.exports=c})),Ir=v(((e,t)=>{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(8835),s=Wn(),a=Zt(),c=Jt(),u=zn(),l=en(),d=function(e){function t(n,r){var i=e.call(this)||this;return r&&r.method&&n&&(i.method=r.method,i.url=t._getUrlFromRequestOptions(n,r),i.startTime=+new Date),i}return i(t,e),t.prototype.onError=function(e){this._setStatus(void 0,e)},t.prototype.onResponse=function(e){this._setStatus(e.statusCode,void 0),this.correlationId=a.getCorrelationContextTarget(e,c.requestContextTargetKey)},t.prototype.getDependencyTelemetry=function(e,t){var n=o.parse(this.url);n.search=void 0,n.hash=void 0;var r=this.method.toUpperCase()+" "+n.pathname,i=s.RemoteDependencyDataConstants.TYPE_HTTP,a=n.hostname;n.port&&(a+=":"+n.port),this.correlationId?(i=s.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==l.correlationIdPrefix&&(a+=" | "+this.correlationId)):i=s.RemoteDependencyDataConstants.TYPE_HTTP;var c={id:t,name:r,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:i,target:a};if(e&&e.time?c.time=e.time:this.startTime&&(c.time=new Date(this.startTime)),e){for(var u in e)c[u]||(c[u]=e[u]);if(e.properties)for(var u in e.properties)c.properties[u]=e.properties[u]}return c},t._getUrlFromRequestOptions=function(e,t){if("string"==typeof e)if(0===e.indexOf("http://")||0===e.indexOf("https://"))e=o.parse(e);else{var n=o.parse(e);e="443"===n.host?o.parse("https://"+e):o.parse("http://"+e)}else{if(e&&"function"==typeof o.URL&&e instanceof o.URL)return o.format(e);var r=e;e={},r&&Object.keys(r).forEach((function(t){e[t]=r[t]}))}if(e.path){var i=o.parse(e.path);e.pathname=i.pathname,e.search=i.search}return e.host&&e.port&&!o.parse("http://"+e.host).port&&e.port&&(e.hostname=e.host,delete e.host),e.protocol=e.protocol||t.agent&&t.agent.protocol||t.protocol||void 0,e.hostname=e.hostname||"localhost",o.format(e)},t}(u);t.exports=d})),Or=v((e=>{"use strict";var t=e&&e.__assign||function(){return(t=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}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.spanToTelemetryContract=void 0;var n=be(),r=Cr();function i(e){var n=t({},e);return Object.keys(r.SpanAttribute).forEach((function(e){delete n[e]})),n}e.spanToTelemetryContract=function(e){var o="|"+e.spanContext().traceId+"."+e.spanContext().spanId+".",s=Math.round(1e3*e._duration[0]+e._duration[1]/1e6),a=e.attributes["peer.address"]?e.attributes["peer.address"].toString():"",c=e.attributes.component?e.attributes.component.toString():"",u=c.toUpperCase()===r.DependencyTypeName.Http||!!e.attributes[r.SpanAttribute.HttpUrl],l=c.toLowerCase()===r.DependencyTypeName.Grpc;if(u){var d=e.attributes[r.SpanAttribute.HttpMethod]||"GET",p=new URL(e.attributes[r.SpanAttribute.HttpUrl].toString()),h=e.attributes[r.SpanAttribute.HttpHost]||p.host,f=e.attributes[r.SpanAttribute.HttpPort]||p.port||null,g=d+" "+(p.pathname||"/"),m=r.DependencyTypeName.Http,v=f?(h+":"+f).toString():h.toString(),y=p.toString(),_=e.attributes[r.SpanAttribute.HttpStatusCode]||e.status.code||0;return{id:o,name:g,dependencyTypeName:m,target:v,data:y,success:_<400,duration:s,url:y,resultCode:String(_),properties:i(e.attributes)}}if(l){d=e.attributes[r.SpanAttribute.GrpcMethod]||"rpc";var b=e.attributes[r.SpanAttribute.GrpcService],S=b?d+" "+b:e.name;return{id:o,duration:s,name:S,target:b.toString(),data:b.toString()||S,url:b.toString()||S,dependencyTypeName:r.DependencyTypeName.Grpc,resultCode:String(e.status.code||0),success:0===e.status.code,properties:i(e.attributes)}}var E=e.name,C=e.links&&e.links.map((function(e){return{operation_Id:e.context.traceId,id:e.context.spanId}}));return{id:o,duration:s,name:E,target:a,data:a||E,url:a||E,dependencyTypeName:e.kind===n.SpanKind.INTERNAL?r.DependencyTypeName.InProc:c||e.name,resultCode:String(e.status.code||0),success:0===e.status.code,properties:t(t({},i(e.attributes)),{"_MS.links":C||void 0})}}})),xr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=be(),n=R(),r=tn(),i=Or(),o=S(),s=[];e.subscriber=function(e){var n=e.data,a=i.spanToTelemetryContract(n),c=n.spanContext(),u=new r;u.traceId=c.traceId,u.spanId=c.spanId,u.traceFlag=r.formatOpenTelemetryTraceFlags(c.traceFlags),u.parentId=n.parentSpanId?"|"+c.traceId+"."+n.parentSpanId+".":null,o.AsyncScopeManager.with(n,(function(){s.forEach((function(e){n.kind===t.SpanKind.SERVER?e.trackRequest(a):(n.kind===t.SpanKind.CLIENT||n.kind===t.SpanKind.INTERNAL)&&e.trackDependency(a)}))}))},e.enable=function(t,r){t?(0===s.length&&n.channel.subscribe("azure-coretracing",e.subscriber),s.push(r)):0===(s=s.filter((function(e){return e!=r}))).length&&n.channel.unsubscribe("azure-coretracing",e.subscriber)}})),Ar=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=R(),n=[];e.subscriber=function(e){"ismaster"!==e.data.event.commandName&&n.forEach((function(t){var n=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:n,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",time:e.data.startedData.time,dependencyTypeName:"mongodb"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("mongodb",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("mongodb",e.subscriber)}})),kr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=R(),n=[];e.subscriber=function(e){n.forEach((function(t){var n=e.data.query||{},r=n.sql||"Unknown query",i=!e.data.err,o=(n._connection||{}).config||{},s=o.socketPath?o.socketPath:(o.host||"localhost")+":"+o.port;t.trackDependency({target:s,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"mysql"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("mysql",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("mysql",e.subscriber)}})),Nr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=R(),n=[];e.subscriber=function(e){n.forEach((function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",time:e.data.time,dependencyTypeName:"redis"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("redis",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("redis",e.subscriber)}})),Mr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=R(),n=[];e.subscriber=function(e){n.forEach((function(t){var n=e.data.query,r=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!e.data.error,o=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:o,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"postgres"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("postgres",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("postgres",e.subscriber)}})),Lr=v(((e,t)=>{"use strict";var r=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},i=n(8605),o=n(7211),s=b(),a=Zt(),c=Jt(),u=Ir(),l=vr(),d=en(),p=tn(),h=Qt(),f=function(){function e(t){if(e.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),h.IsInitialized&&(xr().enable(!0,this._client),Ar().enable(e,this._client),kr().enable(e,this._client),Nr().enable(e,this._client),Mr().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=i.request,s=o.request,a=function(n,r){var i=!r[e.disableCollectionRequestOption]&&!n[e.alreadyAutoCollectedFlag];r.headers&&r.headers["user-agent"]&&-1!==r.headers["user-agent"].toString().indexOf("azsdk-js")&&(i=!1),n[e.alreadyAutoCollectedFlag]=!0,n&&r&&i&&(l.CorrelationContextManager.wrapEmitter(n),e.trackRequest(t._client,{options:r,request:n}))};i.request=function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];var s=n.call.apply(n,r([i,e],t));return a(s,e),s},o.request=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=s.call.apply(s,r([o,e],t));return a(i,e),i},i.get=function(e){for(var t,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var s=(t=i.request).call.apply(t,r([i,e],n));return s.end(),s},o.get=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(t=o.request).call.apply(t,r([o,e],n));return s.end(),s}},e.trackRequest=function(t,n){if(n.options&&n.request&&t){var r,i,o=new u(n.options,n.request),h=l.CorrelationContextManager.getCurrentContext();if(h&&h.operation&&h.operation.traceparent&&p.isValidTraceId(h.operation.traceparent.traceId)?(h.operation.traceparent.updateSpanId(),r=h.operation.traceparent.getBackCompatRequestId()):d.w3cEnabled?(i=(g=new p).toString(),r=g.getBackCompatRequestId()):r=h&&h.operation&&h.operation.parentId+e.requestNumber+++".",a.canIncludeCorrelationHeader(t,o.getUrl())&&n.request.getHeader&&n.request.setHeader&&t.config&&t.config.correlationId){var f=n.request.getHeader(c.requestContextHeader);try{a.safeIncludeCorrelationHeader(t,n.request,f)}catch(e){s.warn("Request-Context header could not be set. Correlation of requests may be lost",e)}if(h&&h.operation)try{if(n.request.setHeader(c.requestIdHeader,r),t.config.ignoreLegacyHeaders||(n.request.setHeader(c.parentIdHeader,h.operation.id),n.request.setHeader(c.rootIdHeader,r)),i||h.operation.traceparent)n.request.setHeader(c.traceparentHeader,i||h.operation.traceparent.toString());else if(d.w3cEnabled){var g=(new p).toString();n.request.setHeader(c.traceparentHeader,g)}if(h.operation.tracestate){var m=h.operation.tracestate.toString();m&&n.request.setHeader(c.traceStateHeader,m)}var v=h.customProperties.serializeToHeader();v&&n.request.setHeader(c.correlationContextHeader,v)}catch(e){s.warn("Correlation headers could not be set. Correlation of requests may be lost.",e)}}n.request.on&&(n.request.on("response",(function(e){o.onResponse(e);var i=o.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects["http.ClientResponse"]=e,t.trackDependency(i)})),n.request.on("error",(function(e){o.onError(e);var i=o.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects.Error=e,t.trackDependency(i)})),n.request.on("abort",(function(){o.onError(new Error);var e=o.getDependencyTelemetry(n,r);e.contextObjects=e.contextObjects||{},e.contextObjects["http.RequestOptions"]=n.options,e.contextObjects["http.ClientRequest"]=n.request,t.trackDependency(e)})))}else s.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!n.options,!n.request,!t)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.disableCollectionRequestOption="disableAppInsightsAutoCollection",e.requestNumber=1,e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=f})),jr=v(((e,t)=>{"use strict";var r=n(2087),i=Cr(),o=Zt(),s=Pr(),a=Lr(),c=function(){function e(t){this._collectionInterval=9e5,this._vmData={},this._azInst_vmId="",this._azInst_subscriptionId="",this._azInst_osType="",e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t}return e.prototype.enable=function(e,t){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._handle=setInterval((function(){return n.trackHeartBeat(t,(function(){}))}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=null)},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackHeartBeat=function(e,t){var n=this,o=!1,a={},c=s.sdkVersion;a.sdk=c,a.osType=r.type(),process.env.WEBSITE_SITE_NAME?(a.appSrv_SiteName=process.env.WEBSITE_SITE_NAME||"",a.appSrv_wsStamp=process.env.WEBSITE_HOME_STAMPNAME||"",a.appSrv_wsHost=process.env.WEBSITE_HOSTNAME||""):process.env.FUNCTIONS_WORKER_RUNTIME?a.azfunction_appId=process.env.WEBSITE_HOSTNAME:e&&(void 0===this._isVM?(o=!0,this._getAzureComputeMetadata(e,(function(){n._isVM&&Object.keys(n._vmData).length>0&&(a.azInst_vmId=n._vmData.vmId||"",a.azInst_subscriptionId=n._vmData.subscriptionId||"",a.azInst_osType=n._vmData.osType||"",n._azInst_vmId=n._vmData.vmId||"",n._azInst_subscriptionId=n._vmData.subscriptionId||"",n._azInst_osType=n._vmData.osType||""),n._client.trackMetric({name:i.HeartBeatMetricName,value:0,properties:a}),t()}))):this._isVM&&(a.azInst_vmId=this._azInst_vmId,a.azInst_subscriptionId=this._azInst_subscriptionId,a.azInst_osType=this._azInst_osType)),o||(this._client.trackMetric({name:i.HeartBeatMetricName,value:0,properties:a}),t())},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.prototype._getAzureComputeMetadata=function(e,t){var n,r=this,i=((n={method:"GET"})[a.disableCollectionRequestOption]=!0,n.headers={Metadata:"True"},n),s=o.makeRequest(e,"http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01&format=json",i,(function(e){if(200===e.statusCode){r._isVM=!0;var n="";e.on("data",(function(e){n+=e})),e.on("end",(function(){r._vmData=r._isJSON(n)?JSON.parse(n):{},t()}))}else t()}));s&&(s.on("error",(function(e){e&&e.message&&e.message.indexOf("ENETUNREACH")>-1&&(r._isVM=!1),t()})),s.end())},e.prototype._isJSON=function(e){try{return JSON.parse(e)&&!!e}catch{return!1}},e}();t.exports=c})),qr=v(((e,t)=>{"use strict";var r=n(8605),i=n(7211),o=b(),s=Zt(),a=Jt(),c=Xn(),u=vr(),l=Tr(),d=function(){function e(t){if(e.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||l.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},e.prototype.useAutoCorrelation=function(e,t){e&&!this._isAutoCorrelating?u.CorrelationContextManager.enable(t):!e&&this._isAutoCorrelating&&u.CorrelationContextManager.disable(),this._isAutoCorrelating=e},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},e.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return u.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=function(n){if(n){if("function"!=typeof n)throw new Error("onRequest handler must be a function");return function(r,i){u.CorrelationContextManager.wrapEmitter(r),u.CorrelationContextManager.wrapEmitter(i);var o=r&&!r[e.alreadyAutoCollectedFlag];if(r&&o){var s=new c(r),a=t._generateCorrelationContext(s);u.CorrelationContextManager.runWithContext(a,(function(){t._isEnabled&&(r[e.alreadyAutoCollectedFlag]=!0,e.trackRequest(t._client,{request:r,response:i},s)),"function"==typeof n&&n(r,i)}))}else"function"==typeof n&&n(r,i)}}},o=function(e){var t=e.addListener.bind(e);e.addListener=function(e,r){switch(e){case"request":case"checkContinue":return t(e,n(r));default:return t(e,r)}},e.on=e.addListener},s=r.createServer;r.createServer=function(e,t){if(t&&"function"==typeof t){var r=s(e,n(t));return o(r),r}return r=s(n(e)),o(r),r};var a=i.createServer;i.createServer=function(e,t){var r=a(e,n(t));return o(r),r}},e.trackRequestSync=function(t,n){if(n.request&&n.response&&t){e.addResponseCorrelationIdHeader(t,n.response);var r=u.CorrelationContextManager.getCurrentContext(),i=new c(n.request,r&&r.operation.parentId);r&&(r.operation.id=i.getOperationId(t.context.tags)||r.operation.id,r.operation.name=i.getOperationName(t.context.tags)||r.operation.name,r.operation.parentId=i.getRequestId()||r.operation.parentId,r.customProperties.addHeaderData(i.getCorrelationContextHeader())),e.endRequest(t,i,n,n.duration,n.error)}else o.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!n.request,!n.response,!t)},e.trackRequest=function(t,n,r){if(n.request&&n.response&&t){var i=u.CorrelationContextManager.getCurrentContext(),a=r||new c(n.request,i&&i.operation.parentId);s.canIncludeCorrelationHeader(t,a.getUrl())&&e.addResponseCorrelationIdHeader(t,n.response),i&&!r&&(i.operation.id=a.getOperationId(t.context.tags)||i.operation.id,i.operation.name=a.getOperationName(t.context.tags)||i.operation.name,i.operation.parentId=a.getOperationParentId(t.context.tags)||i.operation.parentId,i.customProperties.addHeaderData(a.getCorrelationContextHeader())),n.response.once&&n.response.once("finish",(function(){e.endRequest(t,a,n,null,null)})),n.request.on&&n.request.on("error",(function(r){e.endRequest(t,a,n,null,r)})),n.request.on&&n.request.on("aborted",(function(){e.endRequest(t,a,n,null,"The request has been aborted and the network socket has closed.")}))}else o.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!n.request,!n.response,!t)},e.addResponseCorrelationIdHeader=function(e,t){if(e.config&&e.config.correlationId&&t.getHeader&&t.setHeader&&!t.headersSent){var n=t.getHeader(a.requestContextHeader);s.safeIncludeCorrelationHeader(e,t,n)}},e.endRequest=function(e,t,n,r,i){i?t.onError(i,r):t.onResponse(n.response,r);var o=t.getRequestTelemetry(n);if(o.tagOverrides=t.getRequestTags(e.context.tags),n.tagOverrides)for(var s in n.tagOverrides)o.tagOverrides[s]=n.tagOverrides[s];var a=t.getLegacyRootId();a&&(o.properties.ai_legacyRootId=a),o.contextObjects=o.contextObjects||{},o.contextObjects["http.ServerRequest"]=n.request,o.contextObjects["http.ServerResponse"]=n.response,e.trackRequest(o)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1,u.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=d})),Fr=v(((e,t)=>{"use strict";var r=e&&e.__assign||function(){return(r=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}).apply(this,arguments)},i=n(2087),o=Wn(),s=Cr(),a=Zt(),c=b(),u=a.w3cTraceId(),l=function(){function e(){}return e.createQuickPulseEnvelope=function(e,t,n,r){var o=i&&"function"==typeof i.hostname&&i.hostname()||"Unknown",s=r.tags&&r.keys&&r.keys.cloudRoleInstance&&r.tags[r.keys.cloudRoleInstance]||o,a=r.tags&&r.keys&&r.keys.cloudRole&&r.tags[r.keys.cloudRole]||null;return{Documents:t.length>0?t:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:r.tags[r.keys.internalSdkVersion],StreamId:u,MachineName:o,Instance:s,RoleName:a}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case o.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case o.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case o.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case o.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case o.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.name;return r(r({},n),{Name:i})},e.createQuickPulseTraceDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.severityLevel||0;return r(r({},n),{Message:t.data.baseData.message,SeverityLevel:o.SeverityLevel[i]})},e.createQuickPulseExceptionDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.exceptions,o="",s="",a="";return i&&i.length>0&&(i[0].parsedStack&&i[0].parsedStack.length>0?i[0].parsedStack.forEach((function(e){o+=e.assembly+"\n"})):i[0].stack&&i[0].stack.length>0&&(o=i[0].stack),s=i[0].message,a=i[0].typeName),r(r({},n),{Exception:o,ExceptionMessage:s,ExceptionType:a})},e.createQuickPulseRequestDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Success:i.success,Duration:i.duration,ResponseCode:i.responseCode,OperationName:i.name})},e.createQuickPulseDependencyDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Target:i.target,Success:i.success,Duration:i.duration,ResultCode:i.resultCode,CommandName:i.data,OperationName:n.OperationId,DependencyTypeName:i.type})},e.createQuickPulseDocument=function(t){var n,r;return t.data.baseType?(r=s.TelemetryTypeStringToQuickPulseType[t.data.baseType],n=s.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):c.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:n,__type:r,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],n=e.data.baseData.measurements||{};for(var r in n)if(n.hasOwnProperty(r)){var i={key:r,value:n[r]};t.push(i)}var o=e.data.baseData.properties||{};for(var r in o)o.hasOwnProperty(r)&&(i={key:r,value:o[r]},t.push(i));return t},e.keys=new o.ContextTagKeys,e}();t.exports=l})),Hr=v(((e,t)=>{"use strict";t.exports={getTransmissionTime:function(){return 1e4*(Date.now()+621355968e5)}}})),Ur=v(((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=n(7211),s=Lr(),a=b(),c=Hr(),u=Zt(),l="x-ms-qps-service-polling-interval-hint",d="x-ms-qps-service-endpoint-redirect",p=function(){function e(e){this._config=e,this._consecutiveErrors=0}return e.prototype.ping=function(e,t,n){var r=[{name:"x-ms-qps-stream-id",value:e.StreamId},{name:"x-ms-qps-machine-name",value:e.MachineName},{name:"x-ms-qps-role-name",value:e.RoleName},{name:"x-ms-qps-instance-name",value:e.Instance},{name:"x-ms-qps-invariant-version",value:e.InvariantVersion.toString()}];this._submitData(e,t,n,"ping",r)},e.prototype.post=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this._submitData([e],t,n,"post")];case 1:return r.sent(),[2]}}))}))},e.prototype._submitData=function(e,t,n,a,p){return r(this,void 0,void 0,(function(){var r,h,f,g,m,v=this;return i(this,(function(i){return r=JSON.stringify(e),(g={})[s.disableCollectionRequestOption]=!0,g.host=t&&t.length>0?t:this._config.quickPulseHost,g.method="POST",g.path="/QuickPulseService.svc/"+a+"?ikey="+this._config.instrumentationKey,g.headers=((m={Expect:"100-continue"})["x-ms-qps-transmission-time"]=c.getTransmissionTime(),m["Content-Type"]="application/json",m["Content-Length"]=Buffer.byteLength(r),m),h=g,p&&p.length>0&&p.forEach((function(e){return h.headers[e.name]=e.value})),this._config.httpsAgent?h.agent=this._config.httpsAgent:h.agent=u.tlsRestrictedAgent,(f=o.request(h,(function(e){if(200==e.statusCode){var t="true"===e.headers["x-ms-qps-subscribed"],r=e.headers[d]?e.headers[d].toString():null,i=e.headers[l]?parseInt(e.headers[l].toString()):null;v._consecutiveErrors=0,n(t,e,r,i)}else v._onError("StatusCode:"+e.statusCode+" StatusMessage:"+e.statusMessage),n()}))).on("error",(function(e){v._onError(e),n()})),f.write(r),f.end(),[2]}))}))},e.prototype._onError=function(t){this._consecutiveErrors++;var n="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN==0?(n="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",a.warn(e.TAG,n,t)):a.info(e.TAG,n,t)},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();t.exports=p})),$r=v(((e,t)=>{"use strict";var n=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},r=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=b(),o=Fr(),s=Ur(),a=Cr(),c=Pr(),u=function(){function e(e,t){this._isCollectingData=!1,this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0,this._metrics={},this._documents=[],this._collectors=[],this._redirectedHost=null,this._pollingIntervalHint=-1,this.config=e,this.context=t||new c,this._sender=new s(this.config),this._isEnabled=!1}return e.prototype.addCollector=function(e){this._collectors.push(e)},e.prototype.trackMetric=function(e){this._addMetric(e)},e.prototype.addDocument=function(e){var t=o.telemetryEnvelopeToQuickPulseDocument(e);t&&this._documents.push(t)},e.prototype.enable=function(e){e&&!this._isEnabled?(this._isEnabled=!0,this._goQuickPulse()):!e&&this._isEnabled&&(this._isEnabled=!1,clearTimeout(this._handle),this._handle=void 0)},e.prototype.enableCollectors=function(e){this._collectors.forEach((function(t){t.enable(e)}))},e.prototype._addMetric=function(e){var t=e.value,n=e.count||1,r=a.PerformanceToQuickPulseCounter[e.name];r&&(this._metrics[r]?(this._metrics[r].Value=(this._metrics[r].Value*this._metrics[r].Weight+t*n)/(this._metrics[r].Weight+n),this._metrics[r].Weight+=n):(this._metrics[r]=o.createQuickPulseMetric(e),this._metrics[r].Name=r,this._metrics[r].Weight=1))},e.prototype._resetQuickPulseBuffer=function(){delete this._metrics,this._metrics={},this._documents.length=0},e.prototype._goQuickPulse=function(){return n(this,void 0,void 0,(function(){var t,n,i,s,a=this;return r(this,(function(r){switch(r.label){case 0:return t=Object.keys(this._metrics).map((function(e){return a._metrics[e]})),n=o.createQuickPulseEnvelope(t,this._documents.slice(),this.config,this.context),this._resetQuickPulseBuffer(),this._isCollectingData?[4,this._post(n)]:[3,2];case 1:return r.sent(),[3,3];case 2:this._ping(n),r.label=3;case 3:return i=this._pollingIntervalHint>0?this._pollingIntervalHint:e.PING_INTERVAL,s=this._isCollectingData?e.POST_INTERVAL:i,this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,s=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(s=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),s),this._handle.unref(),[2]}}))}))},e.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},e.prototype._post=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return t.sent(),[2]}}))}))},e.prototype._quickPulseDone=function(e,t,n,r){null!=e?(this._isCollectingData!==e&&(i.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,n&&n.length>0&&(this._redirectedHost=n,i.info("Redirecting endpoint to: ",n)),r&&r>0&&(this._pollingIntervalHint=r),t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();t.exports=u})),Vr=v(((e,t)=>{"use strict";var n=Cr(),r=function(){function e(){}return e.parse=function(t){if(!t)return{};var r=t.split(e._FIELDS_SEPARATOR).reduce((function(t,n){var r=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===r.length){var i=r[0].toLowerCase(),o=r[1];t[i]=o}return t}),{});if(Object.keys(r).length>0){if(r.endpointsuffix){var i=r.location?r.location+".":"";r.ingestionendpoint=r.ingestionendpoint||"https://"+i+"dc."+r.endpointsuffix,r.liveendpoint=r.liveendpoint||"https://"+i+"live."+r.endpointsuffix}r.ingestionendpoint=r.ingestionendpoint||n.DEFAULT_BREEZE_ENDPOINT,r.liveendpoint=r.liveendpoint||n.DEFAULT_LIVEMETRICS_ENDPOINT}return r},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();t.exports=r})),Br=v(((e,t)=>{"use strict";var r=en(),i=Vr(),o=(b(),Cr()),s=n(8835),a=function(){function e(t){var n=this;this.endpointBase=o.DEFAULT_BREEZE_ENDPOINT;var r=process.env[e.ENV_connectionString],a=i.parse(t),c=i.parse(r),u=!a.instrumentationkey&&Object.keys(a).length>0?null:t;this.instrumentationKey=a.instrumentationkey||u||c.instrumentationkey||e._getInstrumentationKey(),e._validateInstrumentationKey(this.instrumentationKey),this.endpointUrl=(a.ingestionendpoint||c.ingestionendpoint||this.endpointBase)+"/v2.1/track",this.maxBatchSize=250,this.maxBatchIntervalMs=15e3,this.disableAppInsights=!1,this.samplingPercentage=100,this.correlationIdRetryIntervalMs=3e4,this.correlationHeaderExcludedDomains=["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.setCorrelationId=function(e){return n.correlationId=e},this.proxyHttpUrl=process.env[e.ENV_http_proxy]||void 0,this.proxyHttpsUrl=process.env[e.ENV_https_proxy]||void 0,this.httpAgent=void 0,this.httpsAgent=void 0,this.profileQueryEndpoint=a.ingestionendpoint||c.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this.endpointBase,this._quickPulseHost=a.liveendpoint||c.liveendpoint||process.env[e.ENV_quickPulseHost]||o.DEFAULT_LIVEMETRICS_HOST,this._quickPulseHost.match(/^https?:\/\//)&&(this._quickPulseHost=s.parse(this._quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){r.cancelCorrelationIdQuery(this,this.setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=r.correlationIdPrefix,r.queryCorrelationId(this,this.setCorrelationId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickPulseHost",{get:function(){return this._quickPulseHost},set:function(e){this._quickPulseHost=e},enumerable:!1,configurable:!0}),e._getInstrumentationKey=function(){var t=process.env[e.ENV_iKey]||process.env[e.ENV_azurePrefix+e.ENV_iKey]||process.env[e.legacy_ENV_iKey]||process.env[e.ENV_azurePrefix+e.legacy_ENV_iKey];if(!t||""==t)throw new Error("Instrumentation key not found, pass the key in the config to this method or set the key in the environment variable APPINSIGHTS_INSTRUMENTATIONKEY before starting the server");return t},e._validateInstrumentationKey=function(e){return new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e.ENV_connectionString="APPLICATIONINSIGHTS_CONNECTION_STRING",e.ENV_nativeMetricsDisablers="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",e.ENV_nativeMetricsDisableAll="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",e.ENV_http_proxy="http_proxy",e.ENV_https_proxy="https_proxy",e}();t.exports=a})),Gr=v((e=>{"use strict";var t=e&&e.__assign||function(){return(t=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}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCollectNativePerformance=void 0;var r=Br(),i=Pr(),o=b(),s=function(){function e(t){this._disabledMetrics={},e.INSTANCE&&e.INSTANCE.dispose(),e.INSTANCE=this,this._client=t}return e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>=6},e.prototype.enable=function(t,r,i){var s=this;if(void 0===r&&(r={}),void 0===i&&(i=6e4),e.isNodeVersionCompatible()){if(null==e._metricsAvailable&&t&&!this._isInitialized)try{var a=n(6591);e._emitter=new a,e._metricsAvailable=!0,o.info("Native metrics module successfully loaded!")}catch{return void(e._metricsAvailable=!1)}this._isEnabled=t,this._disabledMetrics=r,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),this._isEnabled&&e._emitter?(e._emitter.enable(!0,i),this._handle||(this._handle=setInterval((function(){return s._trackNativeMetrics()}),i),this._handle.unref())):e._emitter&&(e._emitter.enable(!1),this._handle&&(clearInterval(this._handle),this._handle=void 0))}},e.prototype.dispose=function(){this.enable(!1)},e.parseEnabled=function(e){var n=process.env[r.ENV_nativeMetricsDisableAll],i=process.env[r.ENV_nativeMetricsDisablers];if(n)return{isEnabled:!1,disabledMetrics:{}};if(i){var o=i.split(","),s={};if(o.length>0)for(var a=0,c=o;a<c.length;a++)s[c[a]]=!0;return"object"==typeof e?{isEnabled:!0,disabledMetrics:t(t({},e),s)}:{isEnabled:e,disabledMetrics:s}}return"boolean"==typeof e?{isEnabled:e,disabledMetrics:{}}:{isEnabled:!0,disabledMetrics:e}},e.prototype._trackNativeMetrics=function(){var e=!0;"object"!=typeof this._isEnabled&&(e=this._isEnabled),e&&(this._trackGarbageCollection(),this._trackEventLoop(),this._trackHeapUsage())},e.prototype._trackGarbageCollection=function(){var t;if(!this._disabledMetrics.gc){var n=e._emitter.getGCData();for(var r in n){var o=n[r].metrics,s=r+" Garbage Collection Duration",a=Math.sqrt(o.sumSquares/o.count-Math.pow(o.total/o.count,2))||0;this._client.trackMetric({name:s,value:o.total,count:o.count,max:o.max,min:o.min,stdDev:a,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)})}}},e.prototype._trackEventLoop=function(){var t;if(!this._disabledMetrics.loop){var n=e._emitter.getLoopData().loopUsage;if(0!=n.count){var r=Math.sqrt(n.sumSquares/n.count-Math.pow(n.total/n.count,2))||0;this._client.trackMetric({name:"Event Loop CPU Time",value:n.total,count:n.count,min:n.min,max:n.max,stdDev:r,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)})}}},e.prototype._trackHeapUsage=function(){var e,t,n;if(!this._disabledMetrics.heap){var r=process.memoryUsage(),o=r.heapUsed,s=r.heapTotal,a=r.rss;this._client.trackMetric({name:"Memory Usage (Heap)",value:o,count:1,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,e)}),this._client.trackMetric({name:"Memory Total (Heap)",value:s,count:1,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)}),this._client.trackMetric({name:"Memory Usage (Non-Heap)",value:a-s,count:1,tagOverrides:(n={},n[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,n)})}},e}();e.AutoCollectNativePerformance=s})),Kr=v(((e,t)=>{"use strict";var n=b(),r=function(){function e(e,t,n,r){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=n,this._sender=r}return e.prototype.setUseDiskRetryCaching=function(e,t,n){this._sender.setDiskRetryMode(e,t,n)},e.prototype.send=function(e){var t=this;if(!this._isDisabled()){if(!e)return void n.warn("Cannot send null/undefined telemetry");if(this._buffer.push(e),this._buffer.length>=this._getBatchSize())return void this.triggerSend(!1);!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout((function(){t._timeoutHandle=null,t.triggerSend(!1)}),this._getBatchIntervalMs()))}},e.prototype.triggerSend=function(e,t){var n=this._buffer.length<1;n||(e?(this._sender.saveOnCrash(this._buffer),"function"==typeof t&&t("data saved on crash")):this._sender.send(this._buffer,t)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&"function"==typeof t&&t("no data to send")},e}();t.exports=r})),Wr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.azureRoleEnvironmentTelemetryProcessor=void 0,e.azureRoleEnvironmentTelemetryProcessor=function(e,t){process.env.WEBSITE_SITE_NAME&&(e.tags[t.keys.cloudRole]=process.env.WEBSITE_SITE_NAME)}})),zr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSamplingHashCode=e.samplingTelemetryProcessor=void 0;var t=Wn();function n(e){var t=2147483647,n=5381;if(!e)return 0;for(;e.length<8;)e+=e;for(var r=0;r<e.length;r++)n=((n<<5)+n|0)+e.charCodeAt(r)|0;return(n=n<=-2147483648?t:Math.abs(n))/t*100}e.samplingTelemetryProcessor=function(e,r){var i=e.sampleRate;return!!(null==i||i>=100||e.data&&t.TelemetryType.Metric===t.baseTypeToTelemetryType(e.data.baseType))||(r.correlationContext&&r.correlationContext.operation?n(r.correlationContext.operation.id)<i:100*Math.random()<i)},e.getSamplingHashCode=n})),Xr=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.performanceMetricsTelemetryProcessor=void 0;var t=Tr(),n=Wn();e.performanceMetricsTelemetryProcessor=function(e,r){switch(r&&r.addDocument(e),e.data.baseType){case n.TelemetryTypeString.Exception:t.countException();break;case n.TelemetryTypeString.Request:var i=e.data.baseData;t.countRequest(i.duration,i.success);break;case n.TelemetryTypeString.Dependency:var o=e.data.baseData;t.countDependency(o.duration,o.success)}return!0}})),Yr=v((e=>{"use strict";var t=e&&e.__assign||function(){return(t=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}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.preAggregatedMetricsTelemetryProcessor=void 0;var n=Wn(),r=Dr(),i=Wn();e.preAggregatedMetricsTelemetryProcessor=function(e,o){if(r.isEnabled())switch(e.data.baseType){case i.TelemetryTypeString.Exception:var s=e.data.baseData;s.properties=t(t({},s.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Exceptions', Ver:'1.1')"});var a={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole]};r.countException(a);break;case i.TelemetryTypeString.Trace:var c=e.data.baseData;c.properties=t(t({},c.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Traces', Ver:'1.1')"});var u={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],traceSeverityLevel:n.SeverityLevel[c.severity]};r.countTrace(u);break;case i.TelemetryTypeString.Request:var l=e.data.baseData;l.properties=t(t({},l.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"});var d={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],operationSynthetic:e.tags[o.keys.operationSyntheticSource],requestSuccess:l.success,requestResultCode:l.responseCode};r.countRequest(l.duration,d);break;case i.TelemetryTypeString.Dependency:var p=e.data.baseData;p.properties=t(t({},p.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Dependencies', Ver:'1.1')"});var h={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],operationSynthetic:e.tags[o.keys.operationSyntheticSource],dependencySuccess:p.success,dependencyType:p.type,dependencyTarget:p.target,dependencyResultCode:p.resultCode};r.countDependency(p.duration,h)}return!0}})),Qr=v((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wr(),e),n(zr(),e),n(Xr(),e),n(Yr(),e)})),Jr=v(((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=n(5747),s=n(2087),a=n(5622),c=n(8761),u=n(3129),l=b(),d=Lr(),p=Zt(),h=function(){function e(t,n,r){if(this._redirectedHost=null,this._config=t,this._onSuccess=n,this._onError=r,this._enableDiskRetryMode=!1,this._resendInterval=e.WAIT_BETWEEN_RESEND,this._maxBytesOnDisk=e.MAX_BYTES_ON_DISK,this._numConsecutiveFailures=0,this._numConsecutiveRedirects=0,this._resendTimer=null,this._fileCleanupTimer=null,this._tempDir=a.join(s.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey),!e.OS_PROVIDES_FILE_PROTECTION)if(e.USE_ICACLS){try{e.OS_PROVIDES_FILE_PROTECTION=o.existsSync(e.ICACLS_PATH)}catch{}e.OS_PROVIDES_FILE_PROTECTION||l.warn(e.TAG,"Could not find ICACLS in expected location! This is necessary to use disk retry mode on Windows.")}else e.OS_PROVIDES_FILE_PROTECTION=!0}return e.prototype.setDiskRetryMode=function(t,n,r){var i=this;this._enableDiskRetryMode=e.OS_PROVIDES_FILE_PROTECTION&&t,"number"==typeof n&&n>=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,l.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref()):this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer)},e.prototype.send=function(t,n){return r(this,void 0,void 0,(function(){var r,o,s,a,u=this;return i(this,(function(i){return t&&(r=this._redirectedHost||this._config.endpointUrl,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},s="",t.forEach((function(e){var t=u._stringify(e);"string"==typeof t&&(s+=t+"\n")})),s.length>0&&(s=s.substring(0,s.length-1)),a=Buffer.from?Buffer.from(s):new Buffer(s),c.gzip(a,(function(i,s){var c=s;i?(l.warn(i),c=a,o.headers["Content-Length"]=a.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=s.length.toString()),l.info(e.TAG,o),o[d.disableCollectionRequestOption]=!0;var h=p.makeRequest(u._config,r,o,(function(r){r.setEncoding("utf-8");var i="";r.on("data",(function(e){i+=e})),r.on("end",(function(){if(u._numConsecutiveFailures=0,u._enableDiskRetryMode)if(200===r.statusCode)u._resendTimer||(u._resendTimer=setTimeout((function(){u._resendTimer=null,u._sendFirstFileOnDisk()}),u._resendInterval),u._resendTimer.unref());else if(u._isRetriable(r.statusCode))try{var o=JSON.parse(i),s=[];o.errors.forEach((function(e){u._isRetriable(e.statusCode)&&s.push(t[e.index])})),s.length>0&&u._storeToDisk(s)}catch{u._storeToDisk(t)}if(307===r.statusCode||308===r.statusCode)if(u._numConsecutiveRedirects++,u._numConsecutiveRedirects<10){var a=r.headers.location?r.headers.location.toString():null;a&&(u._redirectedHost=a,u.send(t,n))}else"function"==typeof n&&n("Error sending telemetry because of circular redirects.");else u._numConsecutiveRedirects=0,"function"==typeof n&&n(i),l.info(e.TAG,i),"function"==typeof u._onSuccess&&u._onSuccess(i)}))}));h.on("error",(function(r){if(u._numConsecutiveFailures++,!u._enableDiskRetryMode||u._numConsecutiveFailures>0&&u._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var i="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";u._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+u._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),l.warn(e.TAG,i,p.dumpObj(r))}else i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",l.info(e.TAG,i,p.dumpObj(r));u._onErrorHelper(r),"function"==typeof n&&(r&&n(p.dumpObj(r)),n("Error sending telemetry")),u._enableDiskRetryMode&&u._storeToDisk(t)})),h.write(c),h.end()}))),[2]}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(this._stringify(e))},e.prototype._isRetriable=function(e){return 206===e||408===e||429===e||439===e||500===e||503===e},e.prototype._runICACLS=function(t,n){var r=u.spawn(e.ICACLS_PATH,t,{windowsHide:!0});r.on("error",(function(e){return n(e)})),r.on("close",(function(e,t){return n(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))}))},e.prototype._runICACLSSync=function(t){if(!u.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var n=u.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(n.error)throw n.error;if(0!==n.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var n=u.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),r="";n.stdout.on("data",(function(e){return r+=e})),n.on("error",(function(e){return t(e,null)})),n.on("close",(function(n,i){return e.ACL_IDENTITY=r&&r.trim(),t(0===n?null:new Error("Getting ACL identity did not succeed (PS returned code "+n+")"),e.ACL_IDENTITY)}))},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(u.spawnSync){var t=u.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,n){var r=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?n(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity((function(i,o){if(i)return e.ACLED_DIRECTORIES[t]=!1,n(i);r._runICACLS(r._getACLArguments(t,o),(function(r){return e.ACLED_DIRECTORIES[t]=!r,n(r)}))}))):n(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var n=this;o.lstat(e,(function(r,i){r&&"ENOENT"===r.code?o.mkdir(e,(function(r){r&&"EEXIST"!==r.code?t(r):n._applyACLRules(e,t)})):!r&&i.isDirectory()?n._applyACLRules(e,t):t(r||new Error("Path existed but was not a directory"))}))},e.prototype._getShallowDirectorySize=function(e,t){o.readdir(e,(function(n,r){if(n)return t(n,-1);var i=null,s=0,c=0;if(0!==r.length)for(var u=0;u<r.length;u++)o.stat(a.join(e,r[u]),(function(e,n){c++,e?i=e:n.isFile()&&(s+=n.size),c===r.length&&t(i,i?-1:s)}));else t(null,0)}))},e.prototype._getShallowDirectorySizeSync=function(e){for(var t=o.readdirSync(e),n=0,r=0;r<t.length;r++)n+=o.statSync(a.join(e,t[r])).size;return n},e.prototype._storeToDisk=function(t){var n=this;l.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),this._confirmDirExists(this._tempDir,(function(r){if(r)return l.warn(e.TAG,"Error while checking/creating directory: "+(r&&r.message)),void n._onErrorHelper(r);n._getShallowDirectorySize(n._tempDir,(function(r,i){if(r||i<0)return l.warn(e.TAG,"Error while checking directory size: "+(r&&r.message)),void n._onErrorHelper(r);if(i>n._maxBytesOnDisk)l.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+i);else{var s=(new Date).getTime()+".ai.json",c=a.join(n._tempDir,s);l.info(e.TAG,"saving data to disk at: "+c),o.writeFile(c,n._stringify(t),{mode:384},(function(e){return n._onErrorHelper(e)}))}}))}))},e.prototype._storeToDiskSync=function(t){try{l.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),o.existsSync(this._tempDir)||o.mkdirSync(this._tempDir),this._applyACLRulesSync(this._tempDir);var n=this._getShallowDirectorySizeSync(this._tempDir);if(n>this._maxBytesOnDisk)return void l.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+n);var r=(new Date).getTime()+".ai.json",i=a.join(this._tempDir,r);l.info(e.TAG,"saving data before crash to disk at: "+i),o.writeFileSync(i,t,{mode:384})}catch(t){l.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var e=this;o.exists(this._tempDir,(function(t){t&&o.readdir(e._tempDir,(function(t,n){if(t)e._onErrorHelper(t);else if((n=n.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0){var r=n[0],i=a.join(e._tempDir,r);o.readFile(i,(function(t,n){t?e._onErrorHelper(t):o.unlink(i,(function(t){if(t)e._onErrorHelper(t);else try{var r=JSON.parse(n.toString());e.send(r)}catch(e){l.warn("Failed to read persisted file",e)}}))}))}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){l.warn("Failed to serialize payload",t,e)}},e.prototype._fileCleanupTask=function(){var t=this;o.exists(this._tempDir,(function(n){n&&o.readdir(t._tempDir,(function(n,r){n?t._onErrorHelper(n):(r=r.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0&&r.forEach((function(n){var r=new Date(parseInt(n.split(".ai.json")[0]));if(new Date(+new Date-e.FILE_RETEMPTION_PERIOD)>r){var i=a.join(t._tempDir,n);o.unlink(i,(function(e){e&&t._onErrorHelper(e)}))}}))}))}))},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===s.type(),e}();t.exports=h})),Zr=v(((e,t)=>{"use strict";var n=Wn(),r=Zt(),i=vr(),o=function(){function e(){}return e.createEnvelope=function(t,i,o,s,a){var c=null;switch(i){case n.TelemetryType.Trace:c=e.createTraceData(t);break;case n.TelemetryType.Dependency:c=e.createDependencyData(t);break;case n.TelemetryType.Event:c=e.createEventData(t);break;case n.TelemetryType.Exception:c=e.createExceptionData(t);break;case n.TelemetryType.Request:c=e.createRequestData(t);break;case n.TelemetryType.Metric:c=e.createMetricData(t);break;case n.TelemetryType.Availability:c=e.createAvailabilityData(t);break;case n.TelemetryType.PageView:c=e.createPageViewData(t)}if(o&&n.domainSupportsProperties(c.baseData)){if(c&&c.baseData)if(c.baseData.properties)for(var u in o)c.baseData.properties[u]||(c.baseData.properties[u]=o[u]);else c.baseData.properties=o;c.baseData.properties=r.validateStringMap(c.baseData.properties)}var l=a&&a.instrumentationKey||"",d=new n.Envelope;return d.data=c,d.iKey=l,d.name="Microsoft.ApplicationInsights."+l.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(s,t.tagOverrides),d.time=(new Date).toISOString(),d.ver=1,d.sampleRate=a?a.samplingPercentage:100,i===n.TelemetryType.Metric&&(d.sampleRate=100),d},e.createTraceData=function(e){var t=new n.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Information:t.severityLevel=e.severity;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Trace),r.baseData=t,r},e.createDependencyData=function(e){var t=new n.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=r.w3cTraceId();var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Dependency),i.baseData=t,i},e.createEventData=function(e){var t=new n.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Event),r.baseData=t,r},e.createExceptionData=function(e){var t=new n.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var i=e.exception.stack,o=new n.ExceptionDetails;o.message=e.exception.message,o.typeName=e.exception.name,o.parsedStack=this.parseStack(i),o.hasFullStack=r.isArray(o.parsedStack)&&o.parsedStack.length>0,t.exceptions.push(o);var s=new n.Data;return s.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Exception),s.baseData=t,s},e.createRequestData=function(e){var t=new n.RequestData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=r.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Request),i.baseData=t,i},e.createMetricData=function(e){var t=new n.MetricData;t.metrics=[];var r=new n.DataPoint;r.count=isNaN(e.count)?1:e.count,r.kind=n.DataPointType.Aggregation,r.max=isNaN(e.max)?e.value:e.max,r.min=isNaN(e.min)?e.value:e.min,r.name=e.name,r.stdDev=isNaN(e.stdDev)?0:e.stdDev,r.value=e.value,t.metrics.push(r),t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new n.AvailabilityData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Availability),i.baseData=t,i},e.createPageViewData=function(e){var t=new n.PageViewData;t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.PageView),i.baseData=t,i},e.getTags=function(e,t){var n=i.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var o in e.tags)r[o]=e.tags[o];if(t)for(var o in t)r[o]=t[o];return n&&(r[e.keys.operationId]=r[e.keys.operationId]||n.operation.id,r[e.keys.operationName]=r[e.keys.operationName]||n.operation.name,r[e.keys.operationParentId]=r[e.keys.operationParentId]||n.operation.parentId),r},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,o=0;o<=n.length;o++){var a=n[o];if(s.regex.test(a)){var c=new s(n[o],r++);i+=c.sizeInBytes,t.push(c)}}if(i>32768)for(var u=0,l=t.length-1,d=0,p=u,h=l;u<l;){if((d+=t[u].sizeInBytes+t[l].sizeInBytes)>32768){var f=h-p+1;t.splice(p,f);break}p=u,h=l,u++,l--}}return t},e}(),s=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="<no_method>",this.assembly=r.trim(t);var i=t.match(e.regex);i&&i.length>=5&&(this.method=r.trim(i[2])||this.method,this.fileName=r.trim(i[4])||"<no_filename>",this.line=parseInt(i[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();t.exports=o})),ei=v(((e,t)=>{"use strict";var r=n(8835),i=Br(),o=Pr(),s=Wn(),a=Kr(),c=Qr(),u=vr(),l=Jr(),d=Zt(),p=b(),h=Zr(),f=function(){function e(e){this._telemetryProcessors=[],this._enableAzureProperties=!1;var t=new i(e);this.config=t,this.context=new o,this.commonProperties={};var n=new l(this.config);this.channel=new a((function(){return t.disableAppInsights}),(function(){return t.maxBatchSize}),(function(){return t.maxBatchIntervalMs}),n)}return e.prototype.trackAvailability=function(e){this.track(e,s.TelemetryType.Availability)},e.prototype.trackPageView=function(e){this.track(e,s.TelemetryType.PageView)},e.prototype.trackTrace=function(e){this.track(e,s.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,s.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!d.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,s.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,s.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,s.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=r.parse(e.data).host),this.track(e,s.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&s.telemetryTypeToBaseType(t)){var n=h.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString()),this._enableAzureProperties&&c.azureRoleEnvironmentTelemetryProcessor(n,this.context);var r=this.runTelemetryProcessors(n,e.contextObjects);r=r&&c.samplingTelemetryProcessor(n,{correlationContext:u.CorrelationContextManager.getCurrentContext()}),c.preAggregatedMetricsTelemetryProcessor(n,this.context),r&&(c.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),this.channel.send(n))}else p.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.setAutoPopulateAzureProperties=function(e){this._enableAzureProperties=e},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var n=!0,r=this._telemetryProcessors.length;if(0===r)return n;(t=t||{}).correlationContext=u.CorrelationContextManager.getCurrentContext();for(var i=0;i<r;++i)try{var o=this._telemetryProcessors[i];if(o&&!1===o.apply(null,[e,t])){n=!1;break}}catch(t){n=!0,p.warn("One of telemetry processors failed, telemetry item will be sent.",t,e)}return n&&(e&&e.tags&&(e.tags=d.validateStringMap(e.tags)),e&&e.data&&e.data.baseData&&e.data.baseData.properties&&(e.data.baseData.properties=d.validateStringMap(e.data.baseData.properties))),n},e}();t.exports=f})),ti=v(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=ei(),o=qr(),s=Lr(),a=b(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?o.trackRequestSync(this,e):a.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&a.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?o.trackRequest(this,e):a.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?s.trackRequest(this,e):a.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(i);t.exports=c})),ni=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ri=v((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.Configuration=e.wrapWithCorrelationContext=e.startOperation=e.getCorrelationContext=e.start=e.setup=e.liveMetricsClient=e.defaultClient=e.DistributedTracingModes=void 0;var t,n,r=vr(),i=Sr(),o=Er(),s=Tr(),a=Dr(),c=jr(),u=Lr(),l=qr(),d=en(),p=b(),h=$r(),f=Gr();e.TelemetryClient=ti(),e.Contracts=Wn(),e.azureFunctionsTypes=ni(),(n=t=e.DistributedTracingModes||(e.DistributedTracingModes={}))[n.AI=0]="AI",n[n.AI_AND_W3C=1]="AI_AND_W3C";var g,m,v,y,_,S,E,C,T,R,w,D=!0,P=!1,I=!0,O=!0,x=!0,A=!1,k=!0,N=!0,M=!0,L=!0,j=!1,q=!0,F=void 0,H=void 0,U=!1;function $(){return e.defaultClient?(U=!0,v.enable(D,P),y.enable(I),_.enable(O),S.enable(x),E.enable(A,e.defaultClient.config),C.enable(q,m),T.useAutoCorrelation(L,g),T.enable(k),R.enable(N),e.liveMetricsClient&&j&&e.liveMetricsClient.enable(j)):p.warn("Start cannot be called before setup"),V}e.setup=function(t){return e.defaultClient?p.info("The default client is already setup"):(e.defaultClient=new e.TelemetryClient(t),v=new i(e.defaultClient),y=new o(e.defaultClient),_=new s(e.defaultClient),S=new a(e.defaultClient),E=new c(e.defaultClient),T=new l(e.defaultClient),R=new u(e.defaultClient),C||(C=new f.AutoCollectNativePerformance(e.defaultClient))),e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(M,F,H),V},e.start=$,e.getCorrelationContext=function(){return L?r.CorrelationContextManager.getCurrentContext():null},e.startOperation=function(e,t){return r.CorrelationContextManager.startOperation(e,t)},e.wrapWithCorrelationContext=function(e,t){return r.CorrelationContextManager.wrapCallback(e,t)};var V=function(){function n(){}return n.setDistributedTracingMode=function(e){return d.w3cEnabled=e===t.AI_AND_W3C,n},n.setAutoCollectConsole=function(e,t){return void 0===t&&(t=!1),D=e,P=t,U&&v.enable(e,t),n},n.setAutoCollectExceptions=function(e){return I=e,U&&y.enable(e),n},n.setAutoCollectPerformance=function(e,t){void 0===t&&(t=!0),O=e;var r=f.AutoCollectNativePerformance.parseEnabled(t);return q=r.isEnabled,m=r.disabledMetrics,U&&(_.enable(e),C.enable(r.isEnabled,r.disabledMetrics)),n},n.setAutoCollectPreAggregatedMetrics=function(e){return x=e,U&&S.enable(e),n},n.setAutoCollectHeartbeat=function(t){return A=t,U&&E.enable(t,e.defaultClient.config),n},n.setAutoCollectRequests=function(e){return k=e,U&&T.enable(e),n},n.setAutoCollectDependencies=function(e){return N=e,U&&R.enable(e),n},n.setAutoDependencyCorrelation=function(e,t){return L=e,g=t,U&&T.useAutoCorrelation(e,t),n},n.setUseDiskRetryCaching=function(t,r,i){return M=t,F=r,H=i,e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(t,r,i),n},n.setInternalLogging=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!0),p.enableDebug=e,p.disableWarnings=!t,n},n.setSendLiveMetrics=function(t){return void 0===t&&(t=!1),e.defaultClient?(!e.liveMetricsClient&&t?(e.liveMetricsClient=new h(e.defaultClient.config,null),w=new s(e.liveMetricsClient,1e3,!0),e.liveMetricsClient.addCollector(w),e.defaultClient.quickPulseClient=e.liveMetricsClient):e.liveMetricsClient&&e.liveMetricsClient.enable(t),j=t,n):(p.warn("Live metrics client cannot be setup without the default client"),n)},n.start=$,n}();e.Configuration=V,e.dispose=function(){d.w3cEnabled=!0,e.defaultClient=null,U=!1,v&&v.dispose(),y&&y.dispose(),_&&_.dispose(),S&&S.dispose(),E&&E.dispose(),C&&C.dispose(),T&&T.dispose(),R&&R.dispose(),e.liveMetricsClient&&(e.liveMetricsClient.enable(!1),j=!1,e.liveMetricsClient=void 0)}})),ii={};((e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})})(ii,{default:()=>ui}),e.exports=(r=ii,y(o({},"__esModule",{value:!0}),r));var oi=_(n(2087)),si=_(n(7549)),ai=_(n(7211)),ci=class{constructor(e){this.vscodeAPI=e}getTelemetryLevel(){try{let e=this.vscodeAPI.env.telemetryConfiguration;return e.isUsageEnabled&&e.isErrorsEnabled&&e.isCrashEnabled?"on":e.isErrorsEnabled&&e.isCrashEnabled?"error":"off"}catch{return void 0!==this.vscodeAPI.env.isTelemetryEnabled?this.vscodeAPI.env.isTelemetryEnabled?"on":"off":this.vscodeAPI.workspace.getConfiguration("telemetry").get("enableTelemetry")?"on":"off"}}static applyReplacements(e,t){for(let n of Object.keys(e))for(let r of t)r.lookup.test(n)&&(void 0!==r.replacementString?e[n]=r.replacementString:delete e[n])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getInstance(e){return ci._instance||(ci._instance=new ci(e)),ci._instance}},ui=class extends class{constructor(e,t,n,r,i,o){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=n,this.osShim=r,this.vscodeAPI=i,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!o,this.updateUserOptStatus(),void 0!==i.env.onDidChangeTelemetryEnabled?(this.disposables.push(i.env.onDidChangeTelemetryEnabled((()=>this.updateUserOptStatus()))),this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))):this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))}updateUserOptStatus(){let e=ci.getInstance(this.vscodeAPI).getTelemetryLevel();this.userOptIn="on"===e,this.errorOptIn="error"===e||this.userOptIn,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach((n=>{0===e.indexOf(`${n}`)&&(t=n)})),t}get extension(){return void 0===this._extension&&(this._extension=this.vscodeAPI.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let n={};for(let r in e)n[r]=t(r,e[r]);return n}shouldSendErrorTelemetry(){return!(!1===this.errorOptIn||this.firstParty&&this.vscodeAPI.env.remoteName&&"other"===this.cleanRemoteName(this.vscodeAPI.env.remoteName))}getCommonProperties(){let e={};if(e["common.os"]=this.osShim.platform,e["common.nodeArch"]=this.osShim.architecture,e["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,this.vscodeAPI&&this.vscodeAPI.env){switch(e["common.vscodemachineid"]=this.vscodeAPI.env.machineId,e["common.vscodesessionid"]=this.vscodeAPI.env.sessionId,e["common.vscodeversion"]=this.vscodeAPI.version,e["common.isnewappinstall"]=this.vscodeAPI.env.isNewAppInstall?this.vscodeAPI.env.isNewAppInstall.toString():"false",e["common.product"]=this.vscodeAPI.env.appHost,this.vscodeAPI.env.uiKind){case this.vscodeAPI.UIKind.Web:e["common.uikind"]="web";break;case this.vscodeAPI.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(this.vscodeAPI.env.remoteName)}return e}anonymizeFilePaths(e,t){let n;if(null==e)return"";let r=[];""!==this.vscodeAPI.env.appRoot&&r.push(new RegExp(this.vscodeAPI.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let i=e;if(t){let t=[];for(let i of r)for(;(n=i.exec(e))&&n;)t.push([n.index,i.lastIndex]);let o=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,a=0;for(i="";(n=s.exec(e))&&n;)n[0]&&!o.test(n[0])&&t.every((([e,t])=>n.index<e||n.index>=t))&&(i+=e.substring(a,n.index)+"<REDACTED: user-file-path>",a=s.lastIndex);a<e.length&&(i+=e.substr(a))}for(let e of r)i=i.replace(e,"");return i}removePropertiesWithPossibleUserInfo(e){if("object"!=typeof e)return;let t={};for(let n of Object.keys(e)){let r=e[n];if(!r)continue;let i=/@[a-zA-Z0-9-.]+/,o=/xox[pbaors]-[a-zA-Z0-9]+-[a-zA-Z0-9-]+?/;/(key|token|sig|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/.test(r.toLowerCase())?t[n]="<REDACTED: secret>":i.test(r)?t[n]="<REDACTED: email>":o.test(r)?t[n]="<REDACTED: token>":t[n]=r}return t}get telemetryLevel(){switch(ci.getInstance(this.vscodeAPI).getTelemetryLevel()){case"on":return"all";case"error":return"error";case"off":return"off"}}internalSendTelemetryEvent(e,t,n,r,i){if((this.userOptIn||i)&&""!==e){if(t=g(g({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!0,!1)}sendRawTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!1,!1)}sendDangerousTelemetryEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryEvent(e,t,n,r,!0)}internalSendTelemetryErrorEvent(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&""!==e){if(t=g(g({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryErrorEvent(e,t,n){this.internalSendTelemetryErrorEvent(e,t,n,!0,!1)}sendDangerousTelemetryErrorEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryErrorEvent(e,t,n,r,!0)}internalSendTelemetryException(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&e){if(t=g(g({},t),this.getCommonProperties()),r){let n=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));e.stack&&(e.stack=this.anonymizeFilePaths(e.stack,this.firstParty)),t=this.removePropertiesWithPossibleUserInfo(n)}t=t??{},n=n??{},this.telemetryAppender.logException(e,{properties:t,measurements:n})}}sendTelemetryException(e,t,n){this.internalSendTelemetryException(e,t,n,!0,!1)}sendDangerousTelemetryException(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryException(e,t,n,r,!0)}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map((e=>e.dispose())))}}{constructor(e,t,r,i,o){let s=e=>(async(e,t)=>{let n;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";let t=await Promise.resolve().then((()=>_(ri())));t.defaultClient?(n=new t.TelemetryClient(e),n.channel.setUseDiskRetryCaching(!0)):(t.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),n=t.defaultClient),si&&si.env&&(n.context.tags[n.context.keys.userId]=si.env.machineId,n.context.tags[n.context.keys.sessionId]=si.env.sessionId,n.context.tags[n.context.keys.cloudRole]=si.env.appName,n.context.tags[n.context.keys.cloudRoleInstance]=si.env.appName),e&&0===e.indexOf("AIF-")&&(n.config.endpointUrl="https://mobile.events.data.microsoft.com/collect/v1")}catch(e){return Promise.reject("Failed to initialize app insights!\n"+e.message)}return null!=t&&t.length&&function(e,t){e.addTelemetryProcessor((e=>(Array.isArray(e.tags)?e.tags.forEach((e=>ci.applyReplacements(e,t))):e.tags&&ci.applyReplacements(e.tags,t),e.data.baseData&&ci.applyReplacements(e.data.baseData,t),!0)))}(n,t),{logEvent:(e,t)=>{try{null==n||n.trackEvent({name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{try{null==n||n.trackException({exception:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log exception to app insights!\n"+e.message)}},flush:async()=>{try{null==n||n.flush()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,o);ci.shouldUseOneDataSystemSDK(r)&&(s=e=>(async(e,t,r)=>{let i=await(async(e,t,r)=>{let i=await Promise.all([n.e(493),n.e(278)]).then(n.bind(n,9278)),o=await Promise.all([n.e(493),n.e(201)]).then(n.bind(n,1201)),s=new i.AppInsightsCore,a=new o.PostChannel,c={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[a]]};if(r){c.extensionConfig={};let e={alwaysUseXhrOverride:!0,httpXHROverride:r};c.extensionConfig[a.identifier]=e}let u=t.workspace.getConfiguration("telemetry").get("internalTesting");return s.initialize(c,[]),s.addTelemetryInitializer((e=>{!u||(e.ext=e.ext??{},e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)})),s})(e,t,r);return{logEvent:(e,t)=>{try{null==i||i.track({name:e,baseData:{name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{throw new Error("1DS SDK does not support logging exceptions, please use logEvent for exception tracking")},flush:async()=>{try{null==i||i.unload()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,si,{sendPOST:(e,t)=>{let n={method:"POST",headers:m(g({},e.headers),{"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)})};try{let r=ai.request(e.urlString,n,(e=>{e.on("data",(function(n){t(e.statusCode??200,e.headers,n.toString())})),e.on("error",(function(){t(0,{})}))}));r.write(e.data),r.end()}catch{t(0,{})}}}));let a=new class{constructor(e,t){this._instantiationStatus=0,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):2!==this._instantiationStatus&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):2!==this._instantiationStatus&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await this._telemetryClient.flush(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach((({eventName:e,data:t})=>this.logEvent(e,t))),this._eventQueue=[],this._exceptionQueue.forEach((({exception:e,data:t})=>this.logException(e,t))),this._exceptionQueue=[]}instantiateAppender(){0===this._instantiationStatus&&(this._instantiationStatus=1,this._clientFactory(this._key).then((e=>{this._telemetryClient=e,this._instantiationStatus=2,this._flushQueues()})).catch((e=>{console.error(e),this._instantiationStatus=2})))}}(r,s);r&&(0===r.indexOf("AIF-")||ci.shouldUseOneDataSystemSDK(r))&&(i=!0),super(e,t,a,{release:oi.release(),platform:oi.platform(),architecture:oi.arch()},si,i)}}},2729:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=2729,e.exports=t},9668:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=9668,e.exports=t},838:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(r=[],o=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(e,l+1)):1==r.length?a=[r.pop(),u]:((i=r.pop())<o&&(o=i,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;r.length&&(a=[o,s])}return a}e.exports=t,t.range=r},5457:(e,t,n)=>{var r=n(4044),i=n(838);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),v(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(u)}(e),!0).map(d)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",u="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function d(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(u).join(".")}function p(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,s=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var c=p(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function h(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function m(e,t){return e>=t}function v(e,t){var n=[],o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),d=c||u,y=o.body.indexOf(",")>=0;if(!d&&!y)return o.post.match(/,.*\}/)?v(e=o.pre+"{"+o.body+a+o.post):[e];if(d)s=o.body.split(/\.\./);else if(1===(s=p(o.body)).length&&1===(s=v(s[0],!1).map(h)).length)return(S=o.post.length?v(o.post,!1):[""]).map((function(e){return o.pre+s[0]+e}));var _,b=o.pre,S=o.post.length?v(o.post,!1):[""];if(d){var E=l(s[0]),C=l(s[1]),T=Math.max(s[0].length,s[1].length),R=3==s.length?Math.abs(l(s[2])):1,w=g;C<E&&(R*=-1,w=m);var D=s.some(f);_=[];for(var P=E;w(P,C);P+=R){var I;if(u)"\\"===(I=String.fromCharCode(P))&&(I="");else if(I=String(P),D){var O=T-I.length;if(O>0){var x=new Array(O+1).join("0");I=P<0?"-"+x+I.slice(1):x+I}}_.push(I)}}else _=r(s,(function(e){return v(e,!1)}));for(var A=0;A<_.length;A++)for(var k=0;k<S.length;k++){var N=b+_[A]+S[k];(!t||d||N)&&n.push(N)}return n}},4044:e=>{e.exports=function(e,n){for(var r=[],i=0;i<e.length;i++){var o=n(e[i],i);t(o)?r.push.apply(r,o):r.push(o)}return r};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},5295:(e,t,n)=>{"use strict";const r=n(7372),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1,g=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(m(e,t)){if(y(e,r),!e[a])return}else n&&(e[h]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},v=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[o]-=n.length,e[p].delete(n.key),e[d].removeNode(t)}};class _{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const b=(e,t,n,r)=>{let i=n.value;m(e,i)&&(y(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,v(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),v(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;b(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;b(this,e,n,t),n=r}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach((e=>this[u](e.key,e.value))),this[p]=new Map,this[d]=new r,this[o]=0}dump(){return this[d].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[p].has(e)){if(a>this[i])return y(this,this[p].get(e)),!1;const s=this[p].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),v(this),!0}const h=new _(e,t,a,r,n);return h.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=h.length,this[d].unshift(h),this[p].set(e,this[d].head),v(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach(((e,t)=>g(this,t,!1)))}}},3707:(e,t,n)=>{e.exports=p,p.Minimatch=h;var r={sep:"/"};try{r=n(5622)}catch(e){}var i=p.GLOBSTAR=h.GLOBSTAR={},o=n(5457),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c="[^/]*?",u="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),l=/\/+/;function d(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach((function(e){n[e]=t[e]})),Object.keys(e).forEach((function(t){n[t]=e[t]})),n}function p(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new h(t,n).match(e))}function h(e,t){if(!(this instanceof h))return new h(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==r.sep&&(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function f(e,t){if(t||(t=this instanceof h?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:o(e)}p.filter=function(e,t){return t=t||{},function(n,r,i){return p(n,e,t)}},p.defaults=function(e){if(!e||!Object.keys(e).length)return p;var t=p,n=function(n,r,i){return t.minimatch(n,r,d(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,d(e,r))},n},h.defaults=function(e){return e&&Object.keys(e).length?p.defaults(e).Minimatch:h},h.prototype.debug=function(){},h.prototype.make=function(){if(!this._made){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(l)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n}else this.empty=!0;else this.comment=!0}},h.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(!this.options.nonegate){for(var r=0,i=e.length;r<i&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}},p.braceExpand=function(e,t){return f(e,t)},h.prototype.braceExpand=f,h.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,o="",l=!!n.nocase,d=!1,p=[],h=[],f=!1,m=-1,v=-1,y="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=this;function b(){if(r){switch(r){case"*":o+=c,l=!0;break;case"?":o+=a,l=!0;break;default:o+="\\"+r}_.debug("clearStateChar %j %j",r,o),r=!1}}for(var S,E=0,C=e.length;E<C&&(S=e.charAt(E));E++)if(this.debug("%s\t%s %s %j",e,E,o,S),d&&u[S])o+="\\"+S,d=!1;else switch(S){case"/":return!1;case"\\":b(),d=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,E,o,S),f){this.debug(" in class"),"!"===S&&E===v+1&&(S="^"),o+=S;continue}_.debug("call clearStateChar %j",r),b(),r=S,n.noext&&b();continue;case"(":if(f){o+="(";continue}if(!r){o+="\\(";continue}p.push({type:r,start:E-1,reStart:o.length,open:s[r].open,close:s[r].close}),o+="!"===r?"(?:(?!(?:":"(?:",this.debug("plType %j %j",r,o),r=!1;continue;case")":if(f||!p.length){o+="\\)";continue}b(),l=!0;var T=p.pop();o+=T.close,"!"===T.type&&h.push(T),T.reEnd=o.length;continue;case"|":if(f||!p.length||d){o+="\\|",d=!1;continue}b(),o+="|";continue;case"[":if(b(),f){o+="\\"+S;continue}f=!0,v=E,m=o.length,o+=S;continue;case"]":if(E===v+1||!f){o+="\\"+S,d=!1;continue}if(f){var R=e.substring(v+1,E);try{RegExp("["+R+"]")}catch(e){var w=this.parse(R,g);o=o.substr(0,m)+"\\["+w[0]+"\\]",l=l||w[1],f=!1;continue}}l=!0,f=!1,o+=S;continue;default:b(),d?d=!1:!u[S]||"^"===S&&f||(o+="\\"),o+=S}for(f&&(R=e.substr(v+1),w=this.parse(R,g),o=o.substr(0,m)+"\\["+w[0],l=l||w[1]),T=p.pop();T;T=p.pop()){var D=o.slice(T.reStart+T.open.length);this.debug("setting tail",o,T),D=D.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,n){return n||(n="\\"),t+t+n+"|"})),this.debug("tail=%j\n %s",D,D,T,o);var P="*"===T.type?c:"?"===T.type?a:"\\"+T.type;l=!0,o=o.slice(0,T.reStart)+P+"\\("+D}b(),d&&(o+="\\\\");var I=!1;switch(o.charAt(0)){case".":case"[":case"(":I=!0}for(var O=h.length-1;O>-1;O--){var x=h[O],A=o.slice(0,x.reStart),k=o.slice(x.reStart,x.reEnd-8),N=o.slice(x.reEnd-8,x.reEnd),M=o.slice(x.reEnd);N+=M;var L=A.split("(").length-1,j=M;for(E=0;E<L;E++)j=j.replace(/\)[+*?]?/,"");var q="";""===(M=j)&&t!==g&&(q="$"),o=A+k+M+q+N}if(""!==o&&l&&(o="(?=.)"+o),I&&(o=y+o),t===g)return[o,l];if(!l)return e.replace(/\\(.)/g,"$1");var F=n.nocase?"i":"";try{var H=new RegExp("^"+o+"$",F)}catch(e){return new RegExp("$.")}return H._glob=e,H._src=o,H};var g={};p.makeRe=function(e,t){return new h(e,t||{}).makeRe()},h.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===i?n:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(e){this.regexp=!1}return this.regexp},p.match=function(e,t,n){var r=new h(t,n=n||{});return e=e.filter((function(e){return r.match(e)})),r.options.nonull&&!e.length&&e.push(t),e},h.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==r.sep&&(e=e.split(r.sep).join("/")),e=e.split(l),this.debug(this.pattern,"split",e);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=e.length-1;o>=0&&!(i=e[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=e;if(n.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},h.prototype.matchOne=function(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u,l=t[s],d=e[o];if(this.debug(t,l,d),!1===l)return!1;if(l===i){this.debug("GLOBSTAR",[t,l,d]);var p=o,h=s+1;if(h===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!r.dot&&"."===e[o].charAt(0))return!1;return!0}for(;p<a;){var f=e[p];if(this.debug("\nglobstar while",e,p,t,h,f),this.matchOne(e.slice(p),t.slice(h),n))return this.debug("globstar found match!",p,a,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==a))}if("string"==typeof l?(u=r.nocase?d.toLowerCase()===l.toLowerCase():d===l,this.debug("string match",l,d,u)):(u=d.match(l),this.debug("pattern match",l,d,u)),!u)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},3893:(e,t,n)=>{(()=>{var e={46:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:n}={}){return new Promise(((r,i)=>{function o(){null==n||n.removeEventListener("abort",o),e.removeListener(t,s),e.removeListener("error",a)}function s(...e){o(),r(e)}function a(e){o(),i(e)}null==n||n.addEventListener("abort",o),e.on(t,s),e.on("error",a)}))}},54:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(361),o=r(n(374)),s=r(n(304)),a=o.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function u(e,t){return new u.Agent(e,t)}!function(e){class t extends i.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,i=null;const o=n.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{i=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",u(e)},d=e=>{r||(null!==i&&(clearTimeout(i),i=null),u(e))},p=t=>{if(r)return;if(null!=i&&(clearTimeout(i),i=null),o=t,Boolean(o)&&"function"==typeof o.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var o;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(i=setTimeout(l,o)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(p,d)}catch(e){Promise.reject(e).catch(d)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(u||(u={})),e.exports=u},304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,i)=>{e.call(this,t,n,((e,t)=>{e?i(e):r(t)}))}))}}},370:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(808)),s=i(n(404)),a=i(n(310)),c=i(n(374)),u=i(n(46)),l=n(54),d=(0,c.default)("http-proxy-agent");class p extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("Creating new HttpProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this,i=a.default.parse(e.path);let c;if(i.protocol||(i.protocol="http:"),i.hostname||(i.hostname=t.hostname||t.host||null),null==i.port&&(t.port,1)&&(i.port=String(t.port)),"80"===i.port&&(i.port=""),e.path=a.default.format(i),n.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`),r?(d("Creating `tls.Socket`: %o",n),c=s.default.connect(n)):(d("Creating `net.Socket`: %o",n),c=o.default.connect(n)),e._header){let t,n;d("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(d("Patching connection write() output buffer with updated header"),t=e.output[0],n=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(n),d("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(d("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,n=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(n),d("Output buffer: %o",e.outputData[0].data))}return yield(0,u.default)(c,"connect"),c}))}}t.default=p},201:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(370));function i(e){return new r.default(e)}!function(e){e.HttpProxyAgent=r.default,e.prototype=r.default.prototype}(i||(i={})),e.exports=i},146:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(808)),s=i(n(404)),a=i(n(310)),c=i(n(491)),u=i(n(374)),l=n(54),d=i(n(829)),p=u.default("https-proxy-agent:agent");class h extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");p("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this;let i;r?(p("Creating `tls.Socket`: %o",n),i=s.default.connect(n)):(p("Creating `net.Socket`: %o",n),i=o.default.connect(n));const a=Object.assign({},n.headers);let u=`CONNECT ${t.host}:${t.port} HTTP/1.1\r\n`;n.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:h,secureEndpoint:g}=t;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,g)||(l+=`:${h}`),a.Host=l,a.Connection="close";for(const e of Object.keys(a))u+=`${e}: ${a[e]}\r\n`;const m=d.default(i);i.write(`${u}\r\n`);const{statusCode:v,buffered:y}=yield m;if(200===v){if(e.once("socket",f),t.secureEndpoint){const e=t.servername||t.host;if(!e)throw new Error('Could not determine "servername"');return p("Upgrading socket connection to TLS"),s.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(t,"host","hostname","path","port")),{socket:i,servername:e}))}return i}i.destroy();const _=new o.default.Socket;return _.readable=!0,e.once("socket",(e=>{p("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(y),e.push(null)})),_}))}}function f(e){e.resume()}t.default=h},18:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(146));function i(e){return new r.default(e)}!function(e){e.HttpsProxyAgent=r.default,e.prototype=r.default.prototype}(i||(i={})),e.exports=i},829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(374)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,n)=>{let r=0;const o=[];function s(){const n=e.read();n?function(e){o.push(e),r+=e.length;const n=Buffer.concat(o,r);if(-1===n.indexOf("\r\n\r\n"))return i("have not received end of HTTP headers yet..."),void s();const a=n.toString("ascii",0,n.indexOf("\r\n")),c=+a.split(" ")[1];i("got proxy server response: %o",a),t({statusCode:c,buffered:n})}(n):e.once("readable",s)}function a(e){i("onclose had error %o",e)}function c(){i("onend")}e.on("error",(function t(r){e.removeListener("end",c),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",s),i("onerror %o",r),n(r)})),e.on("close",a),e.on("end",c),s()}))}},539:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=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}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorStatusDescription=t.xhr=t.configure=void 0;var i=n(310),o=n(687),s=n(685),a=n(796),c=n(472),u=n(18),l=n(201);if(process.env.VSCODE_NLS_CONFIG){var d=process.env.VSCODE_NLS_CONFIG;c.config(JSON.parse(d))}var p=c.loadMessageBundle(),h=void 0,f=!0;function g(e){var t;return new Promise((function(n,r){var a=(0,i.parse)(e.url),c={hostname:a.hostname,agent:!!e.agent&&e.agent,port:a.port?parseInt(a.port):"https:"===a.protocol?443:80,path:a.path,method:e.type||"GET",headers:e.headers,rejectUnauthorized:"boolean"!=typeof e.strictSSL||e.strictSSL};e.user&&e.password&&(c.auth=e.user+":"+e.password);var u=function(r){if(r.statusCode>=300&&r.statusCode<400&&e.followRedirects&&e.followRedirects>0&&r.headers.location){var o=r.headers.location;o.startsWith("/")&&(o=(0,i.format)({protocol:a.protocol,hostname:a.hostname,port:a.port,pathname:o})),n(g(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){return Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}({},e,{url:o,followRedirects:e.followRedirects-1})))}else n({req:t,res:r})};(t="https:"===a.protocol?o.request(c,u):s.request(c,u)).on("error",r),e.timeout&&t.setTimeout(e.timeout),e.data&&t.write(e.data),t.end()}))}t.configure=function(e,t){h=e,f=t},t.xhr=function(e){return"boolean"!=typeof(e=r({},e)).strictSSL&&(e.strictSSL=f),e.agent||(e.agent=function(e,t){void 0===t&&(t={});var n=(0,i.parse)(e),r=t.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}(n);if(!r)return null;var o=(0,i.parse)(r);if(!/^https?:$/.test(o.protocol))return null;var s={host:o.hostname,port:Number(o.port),auth:o.auth,rejectUnauthorized:"boolean"!=typeof t.strictSSL||t.strictSSL,protocol:o.protocol};return"http:"===n.protocol?l(s):u(s)}(e.url,{proxyUrl:h,strictSSL:f})),"number"!=typeof e.followRedirects&&(e.followRedirects=5),g(e).then((function(n){return new Promise((function(r,o){var s,c,u=n.res,l=u,d=!1,h=u.headers&&u.headers["content-encoding"];if(h&&(s=e.type,c=n.res.statusCode,!("HEAD"===s||c>=100&&c<200||204===c||304===c))){var f={flush:a.constants.Z_SYNC_FLUSH,finishFlush:a.constants.Z_SYNC_FLUSH};if("gzip"===h){var g=a.createGunzip(f);u.pipe(g),l=g}else if("deflate"===h){var m=a.createInflate(f);u.pipe(m),l=m}}var v=[];l.on("data",(function(e){return v.push(e)})),l.on("end",(function(){if(!d){if(d=!0,e.followRedirects>0&&(u.statusCode>=300&&u.statusCode<=303||307===u.statusCode)){var n=u.headers.location;if(n.startsWith("/")){var s=(0,i.parse)(e.url);n=(0,i.format)({protocol:s.protocol,hostname:s.hostname,port:s.port,pathname:n})}if(n){var a={type:e.type,url:n,user:e.user,password:e.password,headers:e.headers,timeout:e.timeout,followRedirects:e.followRedirects-1,data:e.data};return void(0,t.xhr)(a).then(r,o)}}var c=Buffer.concat(v),l={responseText:c.toString(),body:c,status:u.statusCode,headers:u.headers||{}};u.statusCode>=200&&u.statusCode<300||1223===u.statusCode?r(l):o(l)}})),l.on("error",(function(t){var n={responseText:p("error","Unable to access {0}. Error: {1}",e.url,t.message),body:Buffer.concat(v),status:500,headers:{}};d=!0,o(n)}))}))}),(function(t){var n;return n=e.agent?p("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",e.url,t.message):p("error.cannot.connect","Unable to connect to {0}. Error: {1}",e.url,t.message),Promise.reject({responseText:n,body:Buffer.concat([]),status:404,headers:{}})}))},t.getErrorStatusDescription=function(e){if(!(e<400))switch(e){case 400:return p("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return p("status.401","Unauthorized. The server is refusing to respond.");case 403:return p("status.403","Forbidden. The server is refusing to respond.");case 404:return p("status.404","Not Found. The requested location could not be found.");case 405:return p("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return p("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return p("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return p("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return p("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return p("status.410","Gone. The requested page is no longer available.");case 411:return p("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return p("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return p("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return p("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return p("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return p("status.500","Internal Server Error.");case 501:return p("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 503:return p("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return p("status.416","HTTP status code {0}",e)}}},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,i,o,s=n(926);function a(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],i=n[r],o=e;return"string"==typeof i?o=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(o=String(i)),o}))}(o=t.MessageFormat||(t.MessageFormat={})).file="file",o.bundle="bundle",o.both="both",(i=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",i.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(r||(r={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return c(t,n)},t.loadMessageBundle=function(e){return s.default().loadMessageBundle(e)},t.config=function(e){return s.default().config(e)}},926:(e,t)=>{"use strict";var n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=void 0;var r=n(17),i=n(147),o=n(926),s=n(800),a=n(800);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object Number]"===l.call(e)}function p(e){return"[object String]"===l.call(e)}function h(e){return JSON.parse(i.readFileSync(e,"utf8"))}function f(e){return function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return d(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):s.format(e[t],r):p(n)?(console.warn("Message "+n+" didn't get externalized correctly."),s.format(n,r)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function g(e,t){return c[e]=t,t}function m(e){try{return function(e){var t=h(r.join(e,"nls.metadata.json")),n=Object.create(null);for(var i in t){var o=t[i];n[i]=o.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function v(e,t){var n;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{n=function(e,t){var n,o,s,a=r.join(u.cacheRoot,e.id+"-"+e.hash+".json"),c=!1,l=!1;try{return n=JSON.parse(i.readFileSync(a,{encoding:"utf8",flag:"r"})),o=a,s=new Date,i.utimes(o,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),i.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle "+a+" failed.")})),c=!0}}if(!(n=function(e,t){var n=u.translationsConfig[e.id];if(n){var i=h(n).contents,o=h(r.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in o){var c=o[a],l=i[e.outDir+"/"+a];if(l){for(var d=[],f=0;f<c.keys.length;f++){var g=c.keys[f],m=l[p(g)?g:g.key];void 0===m&&(m=c.messages[f]),d.push(m)}s[a]=d}else s[a]=c.messages}return s}}(e,t))||c)return n;if(l)try{i.writeFileSync(a,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(u.languagePackSupport)return m(t);var o=function(e){for(var t=u.language;t;){var n=r.join(e,"nls.bundle."+t+".json");if(i.existsSync(n))return n;var o=t.lastIndexOf("-");t=o>0?t.substring(0,o):void 0}if(void 0===t&&(n=r.join(e,"nls.bundle.json"),i.existsSync(n)))return n}(t);if(o)try{return h(o)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=m(t)}return n}function y(e){if(!e)return s.localize;var t=r.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=r.dirname(e);t=r.join(n,"nls.metadata.header.json"),!i.existsSync(t);){var o=r.dirname(n);if(o===n){t=void 0;break}n=o}return t}(e);if(n){var o=r.dirname(n),a=c[o];if(void 0===a)try{var l=JSON.parse(i.readFileSync(n,"utf8"));try{var d=v(l,o);a=g(o,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=g(o,null)}}catch(e){console.error("Failed to read header file",e),a=g(o,null)}if(a){var p=e.substr(o.length+1).replace(/\\/g,"/"),m=a.nlsBundle[p];return void 0===m?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):f(m)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var y=h(function(e){var t;if(u.cacheLanguageResolution&&t)t=t;else{if(s.isPseudo||!u.language)t=".nls.json";else for(var n=u.language;n;){var r=".nls."+n+".json";if(i.existsSync(e+r)){t=r;break}var o=n.lastIndexOf("-");o>0?n=n.substring(0,o):(t=".nls.json",n=null)}u.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(y)?f(y):s.isDefined(y.messages)&&s.isDefined(y.keys)?f(y.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}function _(e){return e&&(p(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),s.setPseudo("pseudo"===u.locale),y}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},p(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];p(n)&&(t=n)}if(p(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),p(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),p(e._languagePackId)&&(u.languagePackId=e._languagePackId),p(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=h(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var o=r.dirname(e._corruptedFile);i.exists(o,(function(t){t&&i.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}s.setPseudo("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=y,t.config=_,o.default.install(Object.freeze({loadMessageBundle:y,config:_}))},374:(e,t)=>{function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n}},491:e=>{"use strict";e.exports=n(2357)},361:e=>{"use strict";e.exports=n(8614)},147:e=>{"use strict";e.exports=n(5747)},685:e=>{"use strict";e.exports=n(8605)},687:e=>{"use strict";e.exports=n(7211)},808:e=>{"use strict";e.exports=n(1631)},17:e=>{"use strict";e.exports=n(5622)},404:e=>{"use strict";e.exports=n(4016)},310:e=>{"use strict";e.exports=n(8835)},796:e=>{"use strict";e.exports=n(8761)}},r={},i=function t(n){var i=r[n];if(void 0!==i)return i.exports;var o=r[n]={exports:{}};return e[n].call(o.exports,o,o.exports,t),o.exports}(539),o=t;for(var s in i)o[s]=i[s];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})()},3134:(e,t,n)=>{const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new d(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new d(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&s||a||u}}e.exports=i;const o=n(8716),{re:s,t:a}=n(9022),c=n(5452),u=n(6830),l=n(9510),d=n(7374)},7374:(e,t,n)=>{class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!f(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=i.get(t);if(n)return n;const r=this.options.loose,o=r?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(o,D(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],d),a("comparator trim",e);let c=(e=(e=(e=e.replace(u[l.TILDETRIM],p)).replace(u[l.CARETTRIM],h)).split(/\s+/).join(" ")).split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>w(e,this.options)));r&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const g=new Map,m=c.map((e=>new s(e,this.options)));for(const e of m){if(f(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const y=[...g.values()];return i.set(t,y),y}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>m(n,t)&&e.set.some((e=>m(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const i=new(n(5295))({max:1e3}),o=n(8716),s=n(3134),a=n(6830),c=n(9510),{re:u,t:l,comparatorTrimReplace:d,tildeTrimReplace:p,caretTrimReplace:h}=n(9022),f=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},v=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=C(e,t),a("xrange",e),e=R(e,t),a("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{const n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,((t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),y(n)?s="":y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{a("caret",e,t);const n=t.loose?u[l.CARETLOOSE]:u[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,s)=>{let c;return a("caret",e,t,n,i,o,s),y(n)?c="":y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(o)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",c),c}))},C=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>T(e,t))).join(" ")),T=(e,t)=>{e=e.trim();const n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,((n,r,i,o,s,c)=>{a("xRange",e,n,r,i,o,s,c);const u=y(i),l=u||y(o),d=l||y(s),p=d;return"="===r&&p&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),"<"===r&&(c="-0"),n=`${r+i}.${o}.${s}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",n),n}))},R=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),w=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),D=e=>(t,n,r,i,o,s,a,c,u,l,d,p,h)=>`${n=y(r)?"":y(i)?`>=${r}.0.0${e?"-0":""}`:y(o)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=y(u)?"":y(l)?`<${+u+1}.0.0-0`:y(d)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${d}-${p}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},9510:(e,t,n)=>{const r=n(6830),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=n(39),{re:s,t:a}=n(9022),c=n(8716),{compareIdentifiers:u}=n(8822);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return u(n,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],i=e.build[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return u(n,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},6457:(e,t,n)=>{const r=n(5692);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},5452:(e,t,n)=>{const r=n(8565),i=n(3328),o=n(2260),s=n(6579),a=n(290),c=n(5891);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return i(e,n,u);case">":return o(e,n,u);case">=":return s(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},9469:(e,t,n)=>{const r=n(9510),i=n(5692),{re:o,t:s}=n(9022);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},1868:(e,t,n)=>{const r=n(9510);e.exports=(e,t,n)=>{const i=new r(e,n),o=new r(t,n);return i.compare(o)||i.compareBuild(o)}},5919:(e,t,n)=>{const r=n(3992);e.exports=(e,t)=>r(e,t,!0)},3992:(e,t,n)=>{const r=n(9510);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},1007:(e,t,n)=>{const r=n(5692),i=n(8565);e.exports=(e,t)=>{if(i(e,t))return null;{const n=r(e),i=r(t),o=n.prerelease.length||i.prerelease.length,s=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==i[e])return s+e;return a}}},8565:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>0===r(e,t,n)},2260:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)>0},6579:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)>=0},515:(e,t,n)=>{const r=n(9510);e.exports=(e,t,n,i)=>{"string"==typeof n&&(i=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,i).version}catch(e){return null}}},290:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)<0},5891:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(e,t,n)<=0},2611:(e,t,n)=>{const r=n(9510);e.exports=(e,t)=>new r(e,t).major},6319:(e,t,n)=>{const r=n(9510);e.exports=(e,t)=>new r(e,t).minor},3328:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>0!==r(e,t,n)},5692:(e,t,n)=>{const{MAX_LENGTH:r}=n(39),{re:i,t:o}=n(9022),s=n(9510),a=n(8716);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},7368:(e,t,n)=>{const r=n(9510);e.exports=(e,t)=>new r(e,t).patch},7794:(e,t,n)=>{const r=n(5692);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9114:(e,t,n)=>{const r=n(3992);e.exports=(e,t,n)=>r(t,e,n)},3843:(e,t,n)=>{const r=n(1868);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},9845:(e,t,n)=>{const r=n(7374);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},8753:(e,t,n)=>{const r=n(1868);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},398:(e,t,n)=>{const r=n(5692);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},8873:(e,t,n)=>{const r=n(9022);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(39).SEMVER_SPEC_VERSION,SemVer:n(9510),compareIdentifiers:n(8822).compareIdentifiers,rcompareIdentifiers:n(8822).rcompareIdentifiers,parse:n(5692),valid:n(398),clean:n(6457),inc:n(515),diff:n(1007),major:n(2611),minor:n(6319),patch:n(7368),prerelease:n(7794),compare:n(3992),rcompare:n(9114),compareLoose:n(5919),compareBuild:n(1868),sort:n(8753),rsort:n(3843),gt:n(2260),lt:n(290),eq:n(8565),neq:n(3328),gte:n(6579),lte:n(5891),cmp:n(5452),coerce:n(9469),Comparator:n(3134),Range:n(7374),satisfies:n(9845),toComparators:n(8384),maxSatisfying:n(6369),minSatisfying:n(2663),minVersion:n(75),validRange:n(9178),outside:n(9434),gtr:n(8237),ltr:n(9860),intersects:n(8258),simplifyRange:n(3607),subset:n(2199)}},39:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},6830:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},8822:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},8716:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},9022:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(39),i=n(6830),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let c=0;const u=(e,t,n)=>{const r=c++;i(e,r,t),a[e]=r,s[r]=t,o[r]=new RegExp(t,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),u("FULL",`^${s[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),u("LOOSE",`^${s[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),u("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},8237:(e,t,n)=>{const r=n(9434);e.exports=(e,t,n)=>r(e,t,">",n)},8258:(e,t,n)=>{const r=n(7374);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},9860:(e,t,n)=>{const r=n(9434);e.exports=(e,t,n)=>r(e,t,"<",n)},6369:(e,t,n)=>{const r=n(9510),i=n(7374);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},2663:(e,t,n)=>{const r=n(9510),i=n(7374);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},75:(e,t,n)=>{const r=n(9510),i=n(7374),o=n(2260);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},9434:(e,t,n)=>{const r=n(9510),i=n(3134),{ANY:o}=i,s=n(7374),a=n(9845),c=n(2260),u=n(290),l=n(5891),d=n(6579);e.exports=(e,t,n,p)=>{let h,f,g,m,v;switch(e=new r(e,p),t=new s(t,p),n){case">":h=c,f=l,g=u,m=">",v=">=";break;case"<":h=u,f=d,g=c,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let s=null,a=null;if(r.forEach((e=>{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,h(e.semver,s.semver,p)?s=e:g(e.semver,a.semver,p)&&(a=e)})),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===v&&g(e,a.semver))return!1}return!0}},3607:(e,t,n)=>{const r=n(9845),i=n(3992);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const c=e.sort(((e,t)=>i(e,t,n)));for(const e of c)r(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}},2199:(e,t,n)=>{const r=n(7374),i=n(3134),{ANY:o}=i,s=n(9845),a=n(3992),c=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new i(">=0.0.0")]}const r=new Set;let c,d,p,h,f,g,m;for(const t of e)">"===t.operator||">="===t.operator?c=u(c,t,n):"<"===t.operator||"<="===t.operator?d=l(d,t,n):r.add(t.semver);if(r.size>1)return null;if(c&&d){if(p=a(c.semver,d.semver,n),p>0)return null;if(0===p&&(">="!==c.operator||"<="!==d.operator))return null}for(const e of r){if(c&&!s(e,String(c),n))return null;if(d&&!s(e,String(d),n))return null;for(const r of t)if(!s(e,String(r),n))return!1;return!0}let v=!(!d||n.includePrerelease||!d.semver.prerelease.length)&&d.semver,y=!(!c||n.includePrerelease||!c.semver.prerelease.length)&&c.semver;v&&1===v.prerelease.length&&"<"===d.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,c)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),">"===e.operator||">="===e.operator){if(h=u(c,e,n),h===e&&h!==c)return!1}else if(">="===c.operator&&!s(c.semver,String(e),n))return!1;if(d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(f=l(d,e,n),f===e&&f!==d)return!1}else if("<="===d.operator&&!s(d.semver,String(e),n))return!1;if(!e.operator&&(d||c)&&0!==p)return!1}return!(c&&g&&!d&&0!==p||d&&m&&!c&&0!==p||y||v)},u=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=c(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},8384:(e,t,n)=>{const r=n(7374);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9178:(e,t,n)=>{const r=n(7374);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},5748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFormat=t.TraceValues=t.Trace=t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=void 0;const r=n(5285);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(5164);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const o=n(8159);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return o.Disposable}});const s=n(345);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(7770);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(4806);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const u=n(9248);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const l=n(6336);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return l.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return l.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}});const d=n(8094);t.RAL=d.default},7770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(8094),i=n(8472),o=n(345);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},6336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(8094),i=n(8472),o=n(5285),s=n(5164),a=n(345),c=n(7770);var u,l,d,p,h,f,g,m,v,y,_,b,S,E,C;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(l=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new o.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(p||(p={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(h=t.Trace||(t.Trace={})),(C=t.TraceValues||(t.TraceValues={})).Off="off",C.Messages="messages",C.Compact="compact",C.Verbose="verbose",function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(f=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));class T extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,T.prototype)}}t.ConnectionError=T,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(y=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&i.func(t.createCancellationTokenSource)}}(_=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(u.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(b=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:_.Message,sender:b.Message}),e.is=function(e){const t=e;return t&&_.is(t.receiver)&&b.is(t.sender)}}(S=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(S.is(t.cancellationStrategy)||y.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(E||(E={})),t.createMessageConnection=function(e,n,y,_){const b=void 0!==y?y:t.NullLogger;let C=0,R=0,w=0;const D="2.0";let P;const I=new Map;let O;const x=new Map,A=new Map;let k,N,M=new s.LinkedMap,L=new Map,j=new Set,q=new Map,F=h.Off,H=f.Text,U=E.New;const $=new a.Emitter,V=new a.Emitter,B=new a.Emitter,G=new a.Emitter,K=new a.Emitter,W=_&&_.cancellationStrategy?_.cancellationStrategy:S.Message;function z(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function X(e){}function Y(){return U===E.Listening}function Q(){return U===E.Closed}function J(){return U===E.Disposed}function Z(){U!==E.New&&U!==E.Listening||(U=E.Closed,V.fire(void 0))}function ee(){k||0===M.size||(k=(0,r.default)().timer.setImmediate((()=>{k=void 0,function(){if(0===M.size)return;const e=M.shift();try{o.Message.isRequest(e)?function(e){if(J())return;function t(t,r,i){const s={jsonrpc:D,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,re(s,r,i),n.write(s).catch((()=>b.error("Sending response failed.")))}function r(t,r,i){const o={jsonrpc:D,id:e.id,error:t.toJson()};re(o,r,i),n.write(o).catch((()=>b.error("Sending response failed.")))}!function(e){if(F!==h.Off&&N)if(H===f.Text){let t;F!==h.Verbose&&F!==h.Compact||!e.params||(t=`Params: ${ne(e.params)}\n\n`),N.log(`Received request '${e.method} - (${e.id})'.`,t)}else oe("receive-request",e)}(e);const s=I.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||P){const s=e.id??String(Date.now()),l=W.receiver.createCancellationTokenSource(s);null!==e.id&&j.has(e.id)&&l.cancel(),null!==e.id&&q.set(s,l);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else P&&(d=P(e.method,e.params,l.token));const p=d;d?p.then?p.then((n=>{q.delete(s),t(n,e.method,u)}),(t=>{q.delete(s),t instanceof o.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(q.delete(s),t(d,e.method,u)):(q.delete(s),function(t,r,i){void 0===t&&(t=null);const o={jsonrpc:D,id:e.id,result:t};re(o,r,i),n.write(o).catch((()=>b.error("Sending response failed.")))}(d,e.method,u))}catch(n){q.delete(s),n instanceof o.ResponseError?t(n,e.method,u):n&&i.string(n.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):o.Message.isNotification(e)?function(e){if(J())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return j.delete(t),void ie(e)}{const r=x.get(e.method);r&&(n=r.handler,t=r.type)}if(n||O)try{if(ie(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&l.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else O&&O(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else B.fire(e)}(e):o.Message.isResponse(e)?function(e){if(!J())if(null===e.id)e.error?b.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const t=e.id,n=L.get(t);if(function(e,t){if(F!==h.Off&&N)if(H===f.Text){let n;if(F!==h.Verbose&&F!==h.Compact||(e.error&&e.error.data?n=`Error data: ${ne(e.error.data)}\n\n`:e.result?n=`Result: ${ne(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";N.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else N.log(`Received response ${e.id} without active response promise.`,n)}else oe("receive-response",e)}(e,n),void 0!==n){L.delete(t);try{if(e.error){const t=e.error;n.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void b.error("Received empty message.");b.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,n=L.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{ee()}}()})))}e.onClose(Z),e.onError((function(e){$.fire([e,void 0,void 0])})),n.onClose(Z),n.onError((function(e){$.fire(e)}));const te=e=>{try{if(o.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,r=z(t),i=M.get(r);if(o.Message.isRequest(i)){const o=_?.connectionStrategy,s=o&&o.cancelUndispatched?o.cancelUndispatched(i,X):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return M.delete(r),q.delete(t),s.id=i.id,re(s,e.method,Date.now()),void n.write(s).catch((()=>b.error("Sending response for canceled message failed.")))}const s=q.get(t);if(void 0!==s)return s.cancel(),void ie(e);j.add(t)}!function(e,t){var n;o.Message.isRequest(t)?e.set(z(t.id),t):o.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++R).toString(),t)}(M,e)}finally{ee()}};function ne(e){if(null!=e)switch(F){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function re(e,t,n){if(F!==h.Off&&N)if(H===f.Text){let r;F!==h.Verbose&&F!==h.Compact||(e.error&&e.error.data?r=`Error data: ${ne(e.error.data)}\n\n`:e.result?r=`Result: ${ne(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),N.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else oe("send-response",e)}function ie(e){if(F!==h.Off&&N&&e.method!==m.type.method)if(H===f.Text){let t;F!==h.Verbose&&F!==h.Compact||(t=e.params?`Params: ${ne(e.params)}\n\n`:"No parameters provided.\n\n"),N.log(`Received notification '${e.method}'.`,t)}else oe("receive-notification",e)}function oe(e,t){if(!N||F===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};N.log(n)}function se(){if(Q())throw new T(v.Closed,"Connection is closed.");if(J())throw new T(v.Disposed,"Connection is disposed.")}function ae(e){return void 0===e?null:e}function ce(e){return null===e?void 0:e}function ue(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function le(e,t){switch(e){case o.ParameterStructures.auto:return ue(t)?ce(t):[ae(t)];case o.ParameterStructures.byName:if(!ue(t))throw new Error("Received parameters by name but param is not an object literal.");return ce(t);case o.ParameterStructures.byPosition:return[ae(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function de(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=le(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(ae(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const pe={sendNotification:(e,...t)=>{let r,s;if(se(),i.string(e)){r=e;const n=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const u=c-i;switch(u){case 0:s=void 0;break;case 1:s=le(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map((e=>ae(e)))}}else{const n=t;r=e.method,s=de(e,n)}const a={jsonrpc:D,method:r,params:s};return function(e){if(F!==h.Off&&N)if(H===f.Text){let t;F!==h.Verbose&&F!==h.Compact||(t=e.params?`Params: ${ne(e.params)}\n\n`:"No parameters provided.\n\n"),N.log(`Sending notification '${e.method}'.`,t)}else oe("send-notification",e)}(a),n.write(a).catch((()=>b.error("Sending notification failed.")))},onNotification:(e,t)=>{let n;return se(),i.func(e)?O=e:t&&(i.string(e)?(n=e,x.set(e,{type:void 0,handler:t})):(n=e.method,x.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?x.delete(n):O=void 0}}},onProgress:(e,t,n)=>{if(A.has(t))throw new Error(`Progress handler for token ${t} already registered`);return A.set(t,n),{dispose:()=>{A.delete(t)}}},sendProgress:(e,t,n)=>pe.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:G.event,sendRequest:(e,...t)=>{let r,s,a;if(se(),function(){if(!Y())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let u=0,l=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const p=d-u;switch(p){case 0:s=void 0;break;case 1:s=le(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Received ${p} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>ae(e)))}}else{const n=t;r=e.method,s=de(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const u=C++;let l;return a&&(l=a.onCancellationRequested((()=>{const e=W.sender.sendCancellation(pe,u);return void 0===e?(b.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{b.log(`Sending cancellation messages for id ${u} failed`)}))}))),new Promise(((e,t)=>{const i={jsonrpc:D,id:u,method:r,params:s};let a={method:r,timerStart:Date.now(),resolve:t=>{e(t),W.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),W.sender.cleanup(u),l?.dispose()}};!function(e){if(F!==h.Off&&N)if(H===f.Text){let t;F!==h.Verbose&&F!==h.Compact||!e.params||(t=`Params: ${ne(e.params)}\n\n`),N.log(`Sending request '${e.method} - (${e.id})'.`,t)}else oe("send-request",e)}(i);try{n.write(i).catch((()=>b.error("Sending request failed.")))}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&L.set(u,a)}))},onRequest:(e,t)=>{se();let n=null;return p.is(e)?(n=void 0,P=e):i.string(e)?(n=null,void 0!==t&&(n=e,I.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,I.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?I.delete(n):P=void 0)}}},hasPendingResponse:()=>L.size>0,trace:async(e,t,n)=>{let r=!1,o=f.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||f.Text)),F=e,H=o,N=F===h.Off?void 0:t,!r||Q()||J()||await pe.sendNotification(g.type,{value:h.toString(e)})},onError:$.event,onClose:V.event,onUnhandledNotification:B.event,onDispose:K.event,end:()=>{n.end()},dispose:()=>{if(J())return;U=E.Disposed,K.fire(void 0);const t=new o.ResponseError(o.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of L.values())e.reject(t);L=new Map,q=new Map,j=new Set,M=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{se(),function(){if(Y())throw new T(v.AlreadyListening,"Connection is already listening")}(),U=E.Listening,e.listen(te)},inspect:()=>{(0,r.default)().console.log("inspect")}};return pe.onNotification(m.type,(e=>{if(F===h.Off||!N)return;const t=F===h.Verbose||F===h.Compact;N.log(e.message,t?e.verbose:void 0)})),pe.onNotification(d.type,(e=>{const t=A.get(e.token);t?t(e.value):G.fire(e)})),pe}},8159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(8094);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{t.push(n[o].apply(i[o],e))}catch(e){(0,r.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class o{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},8472:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},5164:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r=t.Touch||(t.Touch={}));class i{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i,t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5506:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,n=0,r=0;e:for(;t<this._chunks.length;){const i=this._chunks[t];for(n=0;n<i.length;){switch(i[n]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,n++;break e;default:e=0}break;default:e=0}n++}r+=i.byteLength,t++}if(4!==e)return;const i=this._read(r+n),o=new Map,s=this.toString(i,"ascii").split("\r\n");if(s.length<2)return o;for(let e=0;e<s.length-2;e++){const t=s[e],n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");const r=t.substr(0,n),i=t.substr(n+1).trim();o.set(r,i)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},4806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(8094),i=n(8472),o=n(345);var s;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)};class a{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let o;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(o=e.contentTypeDecoder,s.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===o&&(o=(0,r.default)().applicationJson.decoder,s.set(o.name,o)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:o,contentTypeDecoders:s}}}(s||(s={})),t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},9248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(8094),i=n(8472),o=n(6791),s=n(345);var a;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)};class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},5285:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(8472);var i,o;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i=t.ErrorCodes||(t.ErrorCodes={}));class s extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},(o=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},o.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},o.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},8094:(e,t)=>{"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},6791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(8094);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},1694:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=n(3590);o.default.install();const s=n(5748),a=n(5622),c=n(2087),u=n(6417),l=n(1631);i(n(5748),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),s.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=d;class p extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=p;class h extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,o.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=h;class f extends s.WriteableStreamMessageWriter{constructor(e,t){super((0,o.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=f;class g extends s.ReadableStreamMessageReader{constructor(e,t){super((0,o.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=g;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super((0,o.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const v=process.env.XDG_RUNTIME_DIR,y=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=(0,u.randomBytes)(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=v?a.join(v,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const n=y.get(process.platform);return void 0!==n&&t.length>=n&&(0,o.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((i,o)=>{let s=(0,l.createServer)((e=>{s.close(),n([new h(e,t),new f(e,t)])}));s.on("error",o),s.listen(e,(()=>{s.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e);return[new h(n,t),new f(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((i,o)=>{const s=(0,l.createServer)((e=>{s.close(),n([new h(e,t),new f(e,t)])}));s.on("error",o),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e,"127.0.0.1");return[new h(n,t),new f(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=s.NullLogger);const i=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new g(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(i,o,n,r)}},3590:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8094),i=n(1669),o=n(8159),s=n(5506);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new i.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),o.Disposable.create((()=>this.stream.off("data",e)))}}class u{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,r)=>{const i=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,i):this.stream.write(e,i)}))}end(){this.stream.end()}}const l=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new i.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new c(e),asWritableStream:e=>new u(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function d(){return l}!function(e){e.install=function(){r.default.install(l)}}(d||(d={})),t.default=d},2659:(e,t,n)=>{"use strict";e.exports=n(1694)},9562:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticPullMode=t.vsdiag=void 0,i(n(7745),t),i(n(497),t);var o=n(7443);Object.defineProperty(t,"vsdiag",{enumerable:!0,get:function(){return o.vsdiag}}),Object.defineProperty(t,"DiagnosticPullMode",{enumerable:!0,get:function(){return o.DiagnosticPullMode}}),i(n(5760),t)},7973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){const r=this.client,o=this.middleware,s=(e,t,n)=>{const o=r.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return r.sendRequest(i.CallHierarchyPrepareRequest.type,o,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyItems(e,n)),(e=>r.handleFailedRequest(i.CallHierarchyPrepareRequest.type,n,e,null)))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyIncomingCallsRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t)),(e=>n.handleFailedRequest(i.CallHierarchyIncomingCallsRequest.type,t,e,null)))};return r.provideCallHierarchyIncomingCalls?r.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyOutgoingCallsRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t)),(e=>n.handleFailedRequest(i.CallHierarchyOutgoingCallsRequest.type,t,e,null)))};return r.provideCallHierarchyOutgoingCalls?r.provideCallHierarchyOutgoingCalls(e,t,o):o(e,t)}}class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,o.ensure)((0,o.ensure)(t,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.callHierarchyProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[r.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.CallHierarchyFeature=a},5760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.BaseLanguageClient=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const r=n(7549),i=n(7745),o=n(317),s=n(5356),a=n(2116),c=n(8005),u=n(7435),l=n(6181),d=n(497),p=n(7443),h=n(7172),f=n(4103),g=n(5610),m=n(491),v=n(9446),y=n(1258),_=n(1432),b=n(7317),S=n(1690),E=n(8447),C=n(9929),T=n(2155),R=n(4453),w=n(9368),D=n(2865),P=n(7272),I=n(3520),O=n(9190),x=n(7506),A=n(9764),k=n(7201),N=n(5828),M=n(807),L=n(9732),j=n(9314),q=n(4915),F=n(7973),H=n(1845),U=n(392),$=n(2550),V=n(4042),B=n(2275),G=n(863);var K,W,z,X,Y,Q,J;!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(K=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(W=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(z=t.CloseAction||(t.CloseAction={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(X=t.State||(t.State={})),(J=t.SuspendMode||(t.SuspendMode={})).off="off",J.on="on";class Z{constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:W.Continue}:{action:W.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:z.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:z.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:z.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(Y||(Y={})),(t.MessageTransports||(t.MessageTransports={})).is=function(e){return e&&i.MessageReader.is(e.reader)&&i.MessageWriter.is(e.writer)};class ee{constructor(e,t,n){this._traceFormat=i.TraceFormat.Text,this._diagnosticQueue=new Map,this._diagnosticQueueState={state:"idle"},this._features=[],this._dynamicFeatures=new Map,this.workspaceEditLock=new c.Semaphore(1),this._id=e,this._name=t;const r={isTrusted:!1,supportHtml:!1};void 0!==(n=n||{}).markdown&&(r.isTrusted=!0===n.markdown.isTrusted,r.supportHtml=!0===n.markdown.supportHtml),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??K.Error,stdioEncoding:n.stdioEncoding??"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler??this.createDefaultErrorHandler(n.connectionOptions?.maxRestartCount),middleware:n.middleware??{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:r,diagnosticPullOptions:n.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:n.notebookDocumentOptions??{}},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Y.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new i.Emitter,this._stateChangeEmitter=new i.Emitter,this._trace=i.Trace.Off,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=o.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=r.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case Y.Starting:return X.Starting;case Y.Running:return X.Running;default:return X.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new i.ResponseError(i.ErrorCodes.ConnectionInactive,"Client is not running"));try{const n=await this.$start();return await this.forceDocumentSync(),n.sendRequest(e,...t)}catch(t){throw this.error(`Sending request ${a.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){const n="string"==typeof e?e:e.method;this._requestHandlers.set(n,t);const r=this.activeConnection();let i;return void 0!==r?(this._requestDisposables.set(n,r.onRequest(e,t)),i={dispose:()=>{const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),i={dispose:()=>{this._pendingRequestHandlers.delete(n);const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}),{dispose:()=>{this._requestHandlers.delete(n),i.dispose()}}}async sendNotification(e,t){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new i.ResponseError(i.ErrorCodes.ConnectionInactive,"Client is not running"));try{const n=await this.$start();return await this.forceDocumentSync(),n.sendNotification(e,t)}catch(t){throw this.error(`Sending notification ${a.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){const n="string"==typeof e?e:e.method;this._notificationHandlers.set(n,t);const r=this.activeConnection();let i;return void 0!==r?(this._notificationDisposables.set(n,r.onNotification(e,t)),i={dispose:()=>{const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),i={dispose:()=>{this._pendingNotificationHandlers.delete(n);const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}),{dispose:()=>{this._notificationHandlers.delete(n),i.dispose()}}}async sendProgress(e,t,n){if(this.$state===Y.StartFailed||this.$state===Y.Stopping||this.$state===Y.Stopped)return Promise.reject(new i.ResponseError(i.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}onProgress(e,t,n){this._progressHandlers.set(t,{type:e,handler:n});const r=this.activeConnection();let o;const s=this._clientOptions.middleware?.handleWorkDoneProgress,a=i.WorkDoneProgress.is(e)&&void 0!==s?e=>{s(t,e,(()=>n(e)))}:n;return void 0!==r?(this._progressDisposables.set(t,r.onProgress(e,t,a)),o={dispose:()=>{const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:n}),o={dispose:()=>{this._pendingProgressHandlers.delete(t);const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),o.dispose()}}}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new Z(this,e??4)}async setTrace(e){this._trace=e;const t=this.activeConnection();void 0!==t&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof i.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}info(e,t,n=!0){this.outputChannel.appendLine(`[Info - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=K.Info&&this.showNotificationMessage(i.MessageType.Info,e)}warn(e,t,n=!0){this.outputChannel.appendLine(`[Warn - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=K.Warn&&this.showNotificationMessage(i.MessageType.Warning,e)}error(e,t,n=!0){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),("force"===n||n&&this._clientOptions.revealOutputChannelOn<=K.Error)&&this.showNotificationMessage(i.MessageType.Error,e)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===i.MessageType.Error?r.window.showErrorMessage:e===i.MessageType.Warning?r.window.showWarningMessage:r.window.showInformationMessage)(t,"Go to output").then((e=>{void 0!==e&&this.outputChannel.show(!0)}))}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===Y.Initial||this.$state===Y.Stopping||this.$state===Y.Stopped}needsStop(){return this.$state===Y.Starting||this.$state===Y.Running}activeConnection(){return this.$state===Y.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===Y.Running}async start(){if("disposing"===this._disposed||"disposed"===this._disposed)throw new Error("Client got disposed and can't be restarted.");if(this.$state===Y.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(void 0!==this._onStart)return this._onStart;const[e,t,n]=this.createOnStartPromise();this._onStart=e,void 0===this._diagnostics&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?r.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):r.languages.createDiagnosticCollection());for(const[e,t]of this._notificationHandlers)this._pendingNotificationHandlers.has(e)||this._pendingNotificationHandlers.set(e,t);for(const[e,t]of this._requestHandlers)this._pendingRequestHandlers.has(e)||this._pendingRequestHandlers.set(e,t);for(const[e,t]of this._progressHandlers)this._pendingProgressHandlers.has(e)||this._pendingProgressHandlers.set(e,t);this.$state=Y.Starting;try{const e=await this.createConnection();e.onNotification(i.LogMessageNotification.type,(e=>{switch(e.type){case i.MessageType.Error:this.error(e.message,void 0,!1);break;case i.MessageType.Warning:this.warn(e.message,void 0,!1);break;case i.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}})),e.onNotification(i.ShowMessageNotification.type,(e=>{switch(e.type){case i.MessageType.Error:r.window.showErrorMessage(e.message);break;case i.MessageType.Warning:r.window.showWarningMessage(e.message);break;case i.MessageType.Info:r.window.showInformationMessage(e.message);break;default:r.window.showInformationMessage(e.message)}})),e.onRequest(i.ShowMessageRequest.type,(e=>{let t;switch(e.type){case i.MessageType.Error:t=r.window.showErrorMessage;break;case i.MessageType.Warning:t=r.window.showWarningMessage;break;case i.MessageType.Info:t=r.window.showInformationMessage;break;default:t=r.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)})),e.onNotification(i.TelemetryEventNotification.type,(e=>{this._telemetryEmitter.fire(e)})),e.onRequest(i.ShowDocumentRequest.type,(async e=>{const t=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await r.env.openExternal(t)};{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await r.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!1}}},n=this._clientOptions.middleware.window?.showDocument;return void 0!==n?n(e,t):t(e)})),e.listen(),await this.initialize(e),t()}catch(e){this.$state=Y.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,e,"force"),n(e)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise(((n,r)=>{e=n,t=r})),e,t]}async initialize(e){this.refreshTrace(e,!1);const t=this._clientOptions.initializationOptions,[n,o]=void 0!==this._clientOptions.workspaceFolder?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:r.env.appName,version:r.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(r.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:i.Trace.toString(this._trace),workspaceFolders:o};if(this.fillInitializeParams(s),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,s);{const t=u.generateUuid(),n=new l.ProgressPart(e,t);s.workDoneToken=t;try{const t=await this.doInitialize(e,s);return n.done(),t}catch(e){throw n.cancel(),e}}}async doInitialize(e,t){try{const n=await e.initialize(t);if(void 0!==n.capabilities.positionEncoding&&n.capabilities.positionEncoding!==i.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);let r;this._initializeResult=n,this.$state=Y.Running,a.number(n.capabilities.textDocumentSync)?r=n.capabilities.textDocumentSync===i.TextDocumentSyncKind.None?{openClose:!1,change:i.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:n.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==n.capabilities.textDocumentSync&&null!==n.capabilities.textDocumentSync&&(r=n.capabilities.textDocumentSync),this._capabilities=Object.assign({},n.capabilities,{resolvedTextDocumentSync:r}),e.onNotification(i.PublishDiagnosticsNotification.type,(e=>this.handleDiagnostics(e))),e.onRequest(i.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(i.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(i.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e)));for(const[t,n]of this._pendingNotificationHandlers)this._notificationDisposables.set(t,e.onNotification(t,n));this._pendingNotificationHandlers.clear();for(const[t,n]of this._pendingRequestHandlers)this._requestDisposables.set(t,e.onRequest(t,n));this._pendingRequestHandlers.clear();for(const[t,n]of this._pendingProgressHandlers)this._progressDisposables.set(t,e.onProgress(n.type,t,n.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(i.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),n}catch(t){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):this.stop():t instanceof i.ResponseError&&t.data&&t.data.retry?r.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((t=>{t&&"retry"===t.id?this.initialize(e):this.stop()})):(t&&t.message&&r.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){let e=r.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown("stop",e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t){if(this.$state===Y.Stopped||this.$state===Y.Initial)return;if(this.$state===Y.Stopping){if(void 0!==this._onStop)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}const n=this.activeConnection();if(void 0===n||this.$state!==Y.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Y.Stopping,this.cleanUp(e);const r=new Promise((e=>{(0,i.RAL)().timer.setTimeout(e,t)})),o=(async e=>(await e.shutdown(),await e.exit(),e))(n);return this._onStop=Promise.race([r,o]).then((e=>{if(void 0===e)throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out");e.end(),e.dispose()}),(e=>{throw this.error("Stopping server failed",e,!1),e})).finally((()=>{this.$state=Y.Stopped,"stop"===e&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()}))}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();const t=this._listeners.splice(0,this._listeners.length);for(const e of t)e.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(const e of Array.from(this._features.entries()).map((e=>e[1])).reverse())e.dispose();"stop"===e&&void 0!==this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0),void 0!==this._idleInterval&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){void 0!==this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){const t=this;async function n(e){return t._fileEvents.push(e),t._fileEventDelayer.trigger((async()=>{const e=await t.$start();await t.forceDocumentSync();const n=e.sendNotification(i.DidChangeWatchedFilesNotification.type,{changes:t._fileEvents});return t._fileEvents=[],n}))}const r=this.clientOptions.middleware?.workspace;(r?.didChangeWatchedFile?r.didChangeWatchedFile(e,n):n(e)).catch((e=>{t.error("Notify file events failed.",e)}))}async forceDocumentSync(){return void 0===this._didChangeTextDocumentFeature&&(this._didChangeTextDocumentFeature=this._dynamicFeatures.get(i.DidChangeTextDocumentNotification.type.method)),this._didChangeTextDocumentFeature.forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;const t=e.uri;"busy"===this._diagnosticQueueState.state&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,i.RAL)().timer.setImmediate((()=>{this.workDiagnosticQueue()}))}workDiagnosticQueue(){if("busy"===this._diagnosticQueueState.state)return;const e=this._diagnosticQueue.entries().next();if(!0===e.done)return;const[t,n]=e.value;this._diagnosticQueue.delete(t);const i=new r.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(n,i.token).then((e=>{if(!i.token.isCancellationRequested){const n=this._p2c.asUri(t),r=this.clientOptions.middleware;r.handleDiagnostics?r.handleDiagnostics(n,e,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(n,e)}})).finally((()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()}))}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}async $start(){if(this.$state===Y.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();const e=this.activeConnection();if(void 0===e)throw new Error("Starting server failed");return e}async createConnection(){const e=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=function(e,t,n,r,o){let s=-1;const c=new te,u=(0,i.createProtocolConnection)(e,t,c,o);return u.onError((e=>{n(e[0],e[1],e[2])})),u.onClose(r),{get lastUsed(){return s},resetLastUsed:()=>{s=-1},listen:()=>u.listen(),sendRequest:(e,...t)=>(s=Date.now(),u.sendRequest(e,...t)),onRequest:(e,t)=>u.onRequest(e,t),hasPendingResponse:()=>u.hasPendingResponse(),sendNotification:(e,t)=>(s=Date.now(),u.sendNotification(e,t)),onNotification:(e,t)=>u.onNotification(e,t),onProgress:u.onProgress,sendProgress:u.sendProgress,trace:(e,t,n)=>{const r={sendNotification:!1,traceFormat:i.TraceFormat.Text};return void 0===n?u.trace(e,t,r):(a.boolean(n),u.trace(e,t,n))},initialize:e=>(s=Date.now(),u.sendRequest(i.InitializeRequest.type,e)),shutdown:()=>(s=Date.now(),u.sendRequest(i.ShutdownRequest.type,void 0)),exit:()=>(s=Date.now(),u.sendNotification(i.ExitNotification.type)),end:()=>u.end(),dispose:()=>u.dispose()}}(e.reader,e.writer,((e,t,n)=>{this.handleConnectionError(e,t,n)}),(()=>{this.handleConnectionClosed()}),this._clientOptions.connectionOptions),this._connection}handleConnectionClosed(){if(this.$state===Y.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:z.DoNotRestart};if(this.$state!==Y.Stopping)try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===z.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,"force"),this.cleanUp("stop"),this.$state===Y.Starting?this.$state=Y.StartFailed:this.$state=Y.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===z.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart."),this.cleanUp("restart"),this.$state=Y.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch((e=>this.error("Restarting server failed",e,"force"))))}handleConnectionError(e,t,n){const r=this._clientOptions.errorHandler.error(e,t,n);r.action===W.Shutdown&&(this.error(r.message??`Client ${this._name}: connection to server is erroring. Shutting down server.`,void 0,"force"),this.stop().catch((e=>{this.error("Stopping server failed",e,!1)})))}hookConfigurationChanged(e){this._listeners.push(r.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)})))}refreshTrace(e,t=!1){const n=r.workspace.getConfiguration(this._id);let o=i.Trace.Off,s=i.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=i.Trace.fromString(e):(o=i.Trace.fromString(n.get("trace.server.verbosity","off")),s=i.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch((e=>{this.error("Updating trace failed with error",e,!1)}))}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n],t&&this._dynamicFeatures.get(i.DidChangeWatchedFilesNotification.type.method).registerRaw(u.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),d.DynamicFeature.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){const t=this.getFeature(i.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof h.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){this.registerFeature(new f.ConfigurationFeature(this)),this.registerFeature(new g.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this.registerFeature(new g.DidChangeTextDocumentFeature(this)),this.registerFeature(new g.WillSaveFeature(this)),this.registerFeature(new g.WillSaveWaitUntilFeature(this)),this.registerFeature(new g.DidSaveTextDocumentFeature(this)),this.registerFeature(new g.DidCloseTextDocumentFeature(this,this._syncedDocuments)),this.registerFeature(new O.FileSystemWatcherFeature(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new m.CompletionItemFeature(this)),this.registerFeature(new v.HoverFeature(this)),this.registerFeature(new _.SignatureHelpFeature(this)),this.registerFeature(new y.DefinitionFeature(this)),this.registerFeature(new C.ReferencesFeature(this)),this.registerFeature(new b.DocumentHighlightFeature(this)),this.registerFeature(new S.DocumentSymbolFeature(this)),this.registerFeature(new E.WorkspaceSymbolFeature(this)),this.registerFeature(new T.CodeActionFeature(this)),this.registerFeature(new R.CodeLensFeature(this)),this.registerFeature(new w.DocumentFormattingFeature(this)),this.registerFeature(new w.DocumentRangeFormattingFeature(this)),this.registerFeature(new w.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new D.RenameFeature(this)),this.registerFeature(new P.DocumentLinkFeature(this)),this.registerFeature(new I.ExecuteCommandFeature(this)),this.registerFeature(new f.SyncConfigurationFeature(this)),this.registerFeature(new k.TypeDefinitionFeature(this)),this.registerFeature(new A.ImplementationFeature(this)),this.registerFeature(new x.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new N.WorkspaceFoldersFeature(this)),this.registerFeature(new M.FoldingRangeFeature(this)),this.registerFeature(new L.DeclarationFeature(this)),this.registerFeature(new j.SelectionRangeFeature(this)),this.registerFeature(new q.ProgressFeature(this)),this.registerFeature(new F.CallHierarchyFeature(this)),this.registerFeature(new H.SemanticTokensFeature(this)),this.registerFeature(new $.LinkedEditingFeature(this)),this.registerFeature(new U.DidCreateFilesFeature(this)),this.registerFeature(new U.DidRenameFilesFeature(this)),this.registerFeature(new U.DidDeleteFilesFeature(this)),this.registerFeature(new U.WillCreateFilesFeature(this)),this.registerFeature(new U.WillRenameFilesFeature(this)),this.registerFeature(new U.WillDeleteFilesFeature(this)),this.registerFeature(new V.TypeHierarchyFeature(this)),this.registerFeature(new B.InlineValueFeature(this)),this.registerFeature(new G.InlayHintsFeature(this)),this.registerFeature(new p.DiagnosticFeature(this)),this.registerFeature(new h.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(Q.createAll(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,d.ensure)(e,"workspace").applyEdit=!0;const t=(0,d.ensure)((0,d.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[i.ResourceOperationKind.Create,i.ResourceOperationKind.Rename,i.ResourceOperationKind.Delete],t.failureHandling=i.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=(0,d.ensure)((0,d.ensure)(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[i.DiagnosticTag.Unnecessary,i.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const r=(0,d.ensure)(e,"window");(0,d.ensure)(r,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,d.ensure)(r,"showDocument").support=!0;const o=(0,d.ensure)(e,"general");o.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(ee.RequestsToCancelOnContentModified)},o.regularExpressions={engine:"ECMAScript",version:"ES2020"},o.markdown={parser:"marked",version:"1.1.0"},o.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(o.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)a.func(e.preInitialize)&&e.preInitialize(this._capabilities,t);for(const e of this._features)e.initialize(this._capabilities,t)}async handleRegistrationRequest(e){if(this.isRunning())for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const n=t.registerOptions??{};n.documentSelector=n.documentSelector??this._clientOptions.documentSelector;const r={id:t.id,registerOptions:n};try{e.register(r)}catch(e){return Promise.reject(e)}}else for(const t of e.registrations)this._ignoredRegistrations.add(t.id)}async handleUnregistrationRequest(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;const e=this._dynamicFeatures.get(t.method);if(!e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}}async handleApplyWorkspaceEdit(e){const t=e.edit,n=await this.workspaceEditLock.lock((()=>this._p2c.asWorkspaceEdit(t))),o=new Map;r.workspace.textDocuments.forEach((e=>o.set(e.uri.toString(),e)));let s=!1;if(t.documentChanges)for(const e of t.documentChanges)if(i.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=o.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){s=!0;break}}return s?Promise.resolve({applied:!1}):a.asPromise(r.workspace.applyEdit(n).then((e=>({applied:e}))))}handleFailedRequest(e,t,n,o,s=!0){if(n instanceof i.ResponseError){if(n.code===i.ErrorCodes.PendingResponseRejected||n.code===i.ErrorCodes.ConnectionInactive)return o;if(n.code===i.LSPErrorCodes.RequestCancelled||n.code===i.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested)return o;throw void 0!==n.data?new d.LSPCancellationError(n.data):new r.CancellationError}if(n.code===i.LSPErrorCodes.ContentModified){if(ee.RequestsToCancelOnContentModified.has(e.method))throw new r.CancellationError;return o}}throw this.error(`Request ${e.method} failed.`,n,s),n}}t.BaseLanguageClient=ee,ee.RequestsToCancelOnContentModified=new Set([i.SemanticTokensRequest.method,i.SemanticTokensRangeRequest.method,i.SemanticTokensDeltaRequest.method]);class te{error(e){(0,i.RAL)().console.error(e)}warn(e){(0,i.RAL)().console.warn(e)}info(e){(0,i.RAL)().console.info(e)}log(e){(0,i.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[]}}(Q=t.ProposedFeatures||(t.ProposedFeatures={}))},2155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const r=n(7549),i=n(7745),o=n(7435),s=n(497);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,i.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[i.CodeActionKind.Empty,i.CodeActionKind.QuickFix,i.CodeActionKind.Refactor,i.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorRewrite,i.CodeActionKind.Source,i.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!1}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideCodeActions:(e,t,n,r)=>{const o=this._client,s=async(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:await o.code2ProtocolConverter.asCodeActionContext(n,r)};return o.sendRequest(i.CodeActionRequest.type,s,r).then((e=>r.isCancellationRequested||null==e?null:o.protocol2CodeConverter.asCodeActionResult(e,r)),(e=>o.handleFailedRequest(i.CodeActionRequest.type,r,e,null)))},a=o.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,r,s):s(e,t,n,r)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,r=this._client.middleware,o=async(e,t)=>n.sendRequest(i.CodeActionResolveRequest.type,await n.code2ProtocolConverter.asCodeAction(e,t),t).then((r=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeAction(r,t)),(r=>n.handleFailedRequest(i.CodeActionResolveRequest.type,t,r,e)));return r.resolveCodeAction?r.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[r.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),n]}}t.CodeActionFeature=a},317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const r=n(7549),i=n(7745),o=n(2116),s=n(8005),a=n(1143),c=n(225),u=n(8552),l=n(1219),d=n(6965),p=n(7400),h=n(9551),f=n(6832),g=n(134);var m;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(m||(m={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function v(e){return{uri:t(e.uri)}}function y(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function _(e){switch(e){case r.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case r.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case r.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function b(e){switch(e){case r.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case r.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function S(e){switch(e){case r.SignatureHelpTriggerKind.Invoke:return i.SignatureHelpTriggerKind.Invoked;case r.SignatureHelpTriggerKind.TriggerCharacter:return i.SignatureHelpTriggerKind.TriggerCharacter;case r.SignatureHelpTriggerKind.ContentChange:return i.SignatureHelpTriggerKind.ContentChange}}function E(e){return{label:e.label}}function C(e){return{label:e.label,parameters:(t=e.parameters,t.map(E))};var t}function T(e){return{line:e.line,character:e.character}}function R(e){return null==e?e:{line:e.line>i.uinteger.MAX_VALUE?i.uinteger.MAX_VALUE:e.line,character:e.character>i.uinteger.MAX_VALUE?i.uinteger.MAX_VALUE:e.character}}function w(e){return null==e?e:{start:R(e.start),end:R(e.end)}}function D(e){return null==e?e:i.Location.create(n(e.uri),w(e.range))}function P(e){switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function I(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function O(e){return{message:e.message,location:D(e.location)}}function x(e){const t=i.Diagnostic.create(w(e.range),e.message),r=e instanceof d.ProtocolDiagnostic?e:void 0;void 0!==r&&void 0!==r.data&&(t.data=r.data);const s=function(e){if(null!=e)return o.number(e)||o.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return d.DiagnosticCode.is(s)?void 0!==r&&r.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,o.number(e.severity)&&(t.severity=P(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=I(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(O)),e.source&&(t.source=e.source),t}function A(e,t){return null==e?e:s.map(e,x,t)}function k(e){switch(e){case r.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function N(e){return{range:w(e.range),newText:e.newText}}function M(e){return null==e?e:e.map(N)}function L(e){return e<=r.SymbolKind.TypeParameter?e+1:i.SymbolKind.Property}function j(e){return e}function q(e){return e.map(j)}function F(e){let t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}function H(e){const t=i.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=D(e.location)),void 0!==e.command&&(t.command=F(e.command)),void 0!==e.tooltip&&(t.tooltip=U(e.tooltip)),t}function U(e){return"string"==typeof e?e:{kind:i.MarkupKind.Markdown,value:e.value}}return{asUri:n,asTextDocumentIdentifier:v,asTextDocumentItem:y,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:y(e)}},asChangeTextDocumentParams:function(e){if(function(e){let t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){let t=e;return!!t.document&&!!t.contentChanges}(e)){let n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map((e=>{let t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:v(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:v(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:v(e.document),reason:_(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asDidRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asDidDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asWillDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asTextDocumentPositionParams:function(e,t){return{textDocument:v(e),position:T(t)}},asCompletionParams:function(e,t,n){return{textDocument:v(e),position:T(t),context:{triggerKind:b(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:v(e),position:T(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:S(n.triggerKind),activeSignatureHelp:(r=n.activeSignatureHelp,void 0===r?r:{signatures:(i=r.signatures,i.map(C)),activeSignature:r.activeSignature,activeParameter:r.activeParameter})}};var r,i},asWorkerPosition:T,asRange:w,asPosition:R,asPositions:function(e,t){return s.map(e,R,t)},asLocation:D,asDiagnosticSeverity:P,asDiagnosticTag:I,asDiagnostic:x,asDiagnostics:A,asCompletionItem:function(e,t=!1){let n,s;o.string(e.label)?n=e.label:(n=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(s={detail:e.label.detail,description:e.label.description}));let c={label:n};void 0!==s&&(c.labelDetails=s);let u=e instanceof a.default?e:void 0;var l,d;e.detail&&(c.detail=e.detail),e.documentation&&(u&&"$string"!==u.documentationFormat?c.documentation=function(e,t){switch(e){case"$string":return t;case i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(u.documentationFormat,e.documentation):c.documentation=e.documentation),e.filterText&&(c.filterText=e.filterText),function(e,t){let n,o,s=i.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,o=t.textEdit.range):t.insertText instanceof r.SnippetString?(s=i.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(o=t.range),e.insertTextFormat=s,t.fromEdit&&void 0!==n&&void 0!==o?e.textEdit=function(e,t){return m.is(t)?i.InsertReplaceEdit.create(e,w(t.inserting),w(t.replacing)):{newText:e,range:w(t)}}(n,o):e.insertText=n}(c,e),o.number(e.kind)&&(c.kind=(l=e.kind,void 0!==(d=u&&u.originalItemKind)?d:l+1)),e.sortText&&(c.sortText=e.sortText),e.additionalTextEdits&&(c.additionalTextEdits=M(e.additionalTextEdits)),e.commitCharacters&&(c.commitCharacters=e.commitCharacters.slice()),e.command&&(c.command=F(e.command)),!0!==e.preselect&&!1!==e.preselect||(c.preselect=e.preselect);const p=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=k(n);void 0!==e&&t.push(e)}return t}(e.tags);if(u){if(void 0!==u.data&&(c.data=u.data),!0===u.deprecated||!1===u.deprecated){if(!0===u.deprecated&&void 0!==p&&p.length>0){const e=p.indexOf(r.CompletionItemTag.Deprecated);-1!==e&&p.splice(e,1)}c.deprecated=u.deprecated}void 0!==u.insertTextMode&&(c.insertTextMode=u.insertTextMode)}return void 0!==p&&p.length>0&&(c.tags=p),void 0===c.insertTextMode&&!0===e.keepWhitespace&&(c.insertTextMode=i.InsertTextMode.adjustIndentation),c},asTextEdit:N,asSymbolKind:L,asSymbolTag:j,asSymbolTags:q,asReferenceParams:function(e,t,n){return{textDocument:v(e),position:T(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:async function(e,t){let n=i.CodeAction.create(e.title);if(e instanceof l.default&&void 0!==e.data&&(n.data=e.data),void 0!==e.kind&&(n.kind=function(e){if(null!=e)return e.value}(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=await A(e.diagnostics,t)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(n.command=F(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n},asCodeActionContext:async function(e,t){if(null==e)return e;let n;return e.only&&o.string(e.only.value)&&(n=[e.only.value]),i.CodeActionContext.create(await A(e.diagnostics,t),n,function(e){switch(e){case r.CodeActionTriggerKind.Invoke:return i.CodeActionTriggerKind.Invoked;case r.CodeActionTriggerKind.Automatic:return i.CodeActionTriggerKind.Automatic;default:return}}(e.triggerKind))},asInlineValueContext:function(e){return null==e?e:i.InlineValueContext.create(e.frameId,w(e.stoppedLocation))},asCommand:F,asCodeLens:function(e){let t=i.CodeLens.create(w(e.range));return e.command&&(t.command=F(e.command)),e instanceof c.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:v(e)}},asCodeLensParams:function(e){return{textDocument:v(e)}},asDocumentLink:function(e){let t=i.DocumentLink.create(w(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let r=e instanceof u.default?e:void 0;return r&&r.data&&(t.data=r.data),t},asDocumentLinkParams:function(e){return{textDocument:v(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:L(e.kind),uri:n(e.uri),range:w(e.range),selectionRange:w(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=q(e.tags)),e instanceof p.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:L(e.kind),uri:n(e.uri),range:w(e.range),selectionRange:w(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=q(e.tags)),e instanceof h.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(H),n=i.InlayHint.create(R(e.position),t);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=M(e.textEdits)),void 0!==e.tooltip&&(n.tooltip=U(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),e instanceof g.default&&void 0!==e.data&&(n.data=e.data),n},asWorkspaceSymbol:function(e){const n=e instanceof f.default?{name:e.name,kind:L(e.kind),location:e.hasRange?D(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:L(e.kind),location:D(e.location)};return void 0!==e.tags&&(n.tags=q(e.tags)),""!==e.containerName&&(n.containerName=e.containerName),n}}}},4453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const r=n(7549),i=n(7745),o=n(7435),s=n(497);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,i.CodeLensRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeLens").dynamicRegistration=!0,(0,s.ensure)((0,s.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.CodeLensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()}));const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n=new r.EventEmitter,o={onDidChangeCodeLenses:n.event,provideCodeLenses:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCodeLenses(e,t)),(e=>n.handleFailedRequest(i.CodeLensRequest.type,t,e,null))),o=n.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,r):r(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then((r=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeLens(r)),(r=>n.handleFailedRequest(i.CodeLensResolveRequest.type,t,r,e))),o=n.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,r):r(e,t)}:void 0};return[r.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),o),{provider:o,onDidChangeCodeLensEmitter:n}]}}t.CodeLensFeature=a},7506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentColorRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.colorProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideColorPresentations:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={color:e,textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:r.code2ProtocolConverter.asRange(t.range)};return r.sendRequest(i.ColorPresentationRequest.type,o,n).then((e=>n.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,n)),(e=>r.handleFailedRequest(i.ColorPresentationRequest.type,n,e,null)))},s=r.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,r=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(i.DocumentColorRequest.type,r,t).then((e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t)),(e=>n.handleFailedRequest(i.DocumentColorRequest.type,t,e,null)))},o=n.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,r):r(e,t)}};return[r.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.ColorProviderFeature=s},491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435),a=[i.CompletionItemKind.Text,i.CompletionItemKind.Method,i.CompletionItemKind.Function,i.CompletionItemKind.Constructor,i.CompletionItemKind.Field,i.CompletionItemKind.Variable,i.CompletionItemKind.Class,i.CompletionItemKind.Interface,i.CompletionItemKind.Module,i.CompletionItemKind.Property,i.CompletionItemKind.Unit,i.CompletionItemKind.Value,i.CompletionItemKind.Enum,i.CompletionItemKind.Keyword,i.CompletionItemKind.Snippet,i.CompletionItemKind.Color,i.CompletionItemKind.File,i.CompletionItemKind.Reference,i.CompletionItemKind.Folder,i.CompletionItemKind.EnumMember,i.CompletionItemKind.Constant,i.CompletionItemKind.Struct,i.CompletionItemKind.Event,i.CompletionItemKind.Operator,i.CompletionItemKind.TypeParameter];class c extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[i.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[i.InsertTextMode.asIs,i.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=i.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:a},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode"]}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const n=e.triggerCharacters??[],o=e.allCommitCharacters,s=e.documentSelector,a={provideCompletionItems:(e,t,n,r)=>{const s=this._client,a=this._client.middleware,c=(e,t,n,r)=>s.sendRequest(i.CompletionRequest.type,s.code2ProtocolConverter.asCompletionParams(e,t,n),r).then((e=>r.isCancellationRequested?null:s.protocol2CodeConverter.asCompletionResult(e,o,r)),(e=>s.handleFailedRequest(i.CompletionRequest.type,r,e,null)));return a.provideCompletionItem?a.provideCompletionItem(e,t,r,n,c):c(e,t,r,n)},resolveCompletionItem:e.resolveProvider?(e,n)=>{const r=this._client,o=this._client.middleware,s=(e,n)=>r.sendRequest(i.CompletionResolveRequest.type,r.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asCompletionItem(e)),(t=>r.handleFailedRequest(i.CompletionResolveRequest.type,n,t,e)));return o.resolveCompletionItem?o.resolveCompletionItem(e,n,s):s(e,n)}:void 0};return[r.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),a,...n),a]}}t.CompletionItemFeature=c},4103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.toJSONObject=t.ConfigurationFeature=void 0;const r=n(7549),i=n(7745),o=n(2116),s=n(7435),a=n(497);function c(e){if(e){if(Array.isArray(e))return e.map(c);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=c(e[n]));return t}}return e}t.ConfigurationFeature=class{constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(i.ConfigurationRequest.type,((t,n)=>{let r=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},i=e.middleware.workspace;return i&&i.configuration?i.configuration(t,n,r):r(t)}))}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(-1===i)n=c(r.workspace.getConfiguration(void 0,e).get(t));else{let o=r.workspace.getConfiguration(t.substr(0,i),e);o&&(n=c(o.get(t.substr(i+1))))}}else{let t=r.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=c(t.get(e)))}return void 0===n&&(n=null),n}dispose(){}},t.toJSONObject=c,t.SyncConfigurationFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return i.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:s.generateUuid(),registerOptions:{section:e}})}register(e){let t=r.workspace.onDidChangeConfiguration((t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)}));this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(const e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let n;if(n=o.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;const r=async e=>void 0===e?this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)});let s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(n,r):r(n)).catch((e=>{this._client.error(`Sending notification ${i.DidChangeConfigurationNotification.type.method} failed`,e)}))}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=n[t[e]];r||(r=Object.create(null),n[t[e]]=r),n=r}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){let s=e[o],a=s.indexOf("."),u=null;if(u=a>=0?r.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):r.workspace.getConfiguration(void 0,n).get(s),u){let n=e[o].split(".");t(i,n)[n[n.length-1]]=c(u)}}return i}}},9732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.declarationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDeclaration:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DeclarationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDeclarationResult(e,n)),(e=>r.handleFailedRequest(i.DeclarationRequest.type,n,e,null))),s=r.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DeclarationFeature=s},1258:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDefinition:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>r.handleFailedRequest(i.DefinitionRequest.type,n,e,null))),s=r.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=a},7443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const r=n(3707),i=n(7549),o=n(7745),s=n(7435),a=n(497);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,p;!function(e){let t;!function(e){e.full="full",e.unChanged="unChanged"}(t=e.DocumentDiagnosticReportKind||(e.DocumentDiagnosticReportKind={}))}(u=t.vsdiag||(t.vsdiag={})),function(e){e.onType="onType",e.onSave="onSave"}(l=t.DiagnosticPullMode||(t.DiagnosticPullMode={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(d||(d={}));class h{constructor(){this.open=new Set;const e=()=>{this.open.clear();for(const e of i.window.tabGroups.all)for(const t of e.tabs){const e=t.input;e instanceof i.TabInputText?this.open.add(e.uri.toString()):e instanceof i.TabInputTextDiff&&this.open.add(e.modified.toString())}};e(),void 0!==i.window.tabGroups.onDidChangeTabs?this.disposable=i.window.tabGroups.onDidChangeTabs(e):this.disposable={dispose:()=>{}}}dispose(){this.disposable.dispose()}isActive(e){return e instanceof i.Uri?i.window.activeTextEditor?.document.uri===e:i.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof i.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){const e=[];for(const t of i.window.tabGroups.all)for(const n of t.tabs){const t=n.input;t instanceof i.TabInputText?e.push(t.uri):t instanceof i.TabInputTextDiff&&e.push(t.modified)}return e}}!function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(p||(p={}));class f{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){const r=e===p.document?this.documentPullStates:this.workspacePullStates,[o,s,a]=t instanceof i.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version];let c=r.get(o);return void 0===c&&(c={document:s,pulledVersion:a,resultId:void 0},r.set(o,c)),c}update(e,t,n,r){const o=e===p.document?this.documentPullStates:this.workspacePullStates,[s,a,c,u]=t instanceof i.Uri?[t.toString(),t,n,r]:[t.uri.toString(),t.uri,t.version,n];let l=o.get(s);void 0===l?(l={document:a,pulledVersion:c,resultId:u},o.set(s,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,t){const n=t instanceof i.Uri?t.toString():t.uri.toString();(e===p.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){const n=t instanceof i.Uri?t.toString():t.uri.toString();return(e===p.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){const n=t instanceof i.Uri?t.toString():t.uri.toString();return(e===p.document?this.documentPullStates:this.workspacePullStates).get(n)?.resultId}getAllResultIds(){const e=[];for(let[t,n]of this.workspacePullStates)this.documentPullStates.has(t)&&(n=this.documentPullStates.get(t)),void 0!==n.resultId&&e.push({uri:t,value:n.resultId});return e}}class g{constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new i.EventEmitter,this.provider=this.createProvider(),this.diagnostics=i.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new f,this.workspaceErrorCounter=0}knows(e,t){return this.documentStates.tracks(e,t)}pull(e,t){if(this.isDisposed)return;const n=e instanceof i.Uri?e:e.uri;this.pullAsync(e).then((()=>{t&&t()}),(e=>{this.client.error(`Document pull failed for text document ${n.toString()}`,e,!1)}))}async pullAsync(e,t){if(this.isDisposed)return;const n=e instanceof i.Uri,r=n?e:e.uri,s=r.toString();t=n?t:e.version;const c=this.openRequests.get(s),l=n?this.documentStates.track(p.document,e,t):this.documentStates.track(p.document,e);if(void 0===c){const n=new i.CancellationTokenSource;let c,h;this.openRequests.set(s,{state:d.active,document:e,version:t,tokenSource:n});try{c=await this.provider.provideDiagnostics(e,l.resultId,n.token)??{kind:u.DocumentDiagnosticReportKind.full,items:[]}}catch(t){if(t instanceof a.LSPCancellationError&&o.DiagnosticServerCancellationData.is(t.data)&&!1===t.data.retriggerRequest&&(h={state:d.outDated,document:e}),!(void 0===h&&t instanceof i.CancellationError))throw t;h={state:d.reschedule,document:e}}if(h=h??this.openRequests.get(s),void 0===h)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),void this.diagnostics.delete(r);if(this.openRequests.delete(s),!this.tabs.isVisible(e))return void this.documentStates.unTrack(p.document,e);if(h.state===d.outDated)return;void 0!==c&&(c.kind===u.DocumentDiagnosticReportKind.full&&this.diagnostics.set(r,c.items),l.pulledVersion=t,l.resultId=c.resultId),h.state===d.reschedule&&this.pull(e)}else c.state===d.active?(c.tokenSource.cancel(),this.openRequests.set(s,{state:d.reschedule,document:c.document})):c.state===d.outDated&&this.openRequests.set(s,{state:d.reschedule,document:c.document})}cleanupPull(e){const t=e instanceof i.Uri?e:e.uri,n=t.toString(),r=this.openRequests.get(n);this.options.workspaceDiagnostics||this.options.interFileDependencies?void 0!==r?this.openRequests.set(n,{state:d.reschedule,document:e}):this.pull(e):(void 0!==r&&(r.state===d.active&&r.tokenSource.cancel(),this.openRequests.set(n,{state:d.outDated,document:e})),this.diagnostics.delete(t))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then((()=>{this.workspaceTimeout=(0,o.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3)}),(e=>{e instanceof a.LSPCancellationError||o.DiagnosticServerCancellationData.is(e.data)||(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,o.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3))}))}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;void 0!==this.workspaceCancellation&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new i.CancellationTokenSource;const e=this.documentStates.getAllResultIds().map((e=>({uri:this.client.protocol2CodeConverter.asUri(e.uri),value:e.value})));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,(e=>{if(e&&!this.isDisposed)for(const t of e.items)t.kind===u.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(p.document,t.uri)||this.diagnostics.set(t.uri,t.items)),this.documentStates.update(p.workspace,t.uri,t.version??void 0,t.resultId)}))}createProvider(){const e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(e,t,n)=>{const r=(e,t,n)=>{const r={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof i.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(o.DocumentDiagnosticRequest.type,r,n).then((async e=>null==e||this.isDisposed||n.isCancellationRequested?{kind:u.DocumentDiagnosticReportKind.full,items:[]}:e.kind===o.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,resultId:e.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,n)}:{kind:u.DocumentDiagnosticReportKind.unChanged,resultId:e.resultId}),(e=>this.client.handleFailedRequest(o.DocumentDiagnosticRequest.type,n,e,{kind:u.DocumentDiagnosticReportKind.full,items:[]}))):{kind:u.DocumentDiagnosticReportKind.full,items:[]}},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(e,t,n,r):r(e,t,n)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(e,t,n)=>{const r=async e=>e.kind===o.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,t)}:{kind:u.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version},i=e=>{const t=[];for(const n of e)t.push({uri:this.client.code2ProtocolConverter.asUri(n.uri),value:n.value});return t},a=(e,t)=>{const a=(0,s.generateUuid)(),c=this.client.onProgress(o.WorkspaceDiagnosticRequest.partialResult,a,(async e=>{if(null==e)return void n(null);const t={items:[]};for(const n of e.items)try{t.items.push(await r(n))}catch(e){this.client.error("Converting workspace diagnostics failed.",e)}n(t)})),u={identifier:this.options.identifier,previousResultIds:i(e),partialResultToken:a};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(o.WorkspaceDiagnosticRequest.type,u,t).then((async e=>{if(t.isCancellationRequested)return{items:[]};const i={items:[]};for(const t of e.items)i.items.push(await r(t));return c.dispose(),n(i),{items:[]}}),(e=>(c.dispose(),this.client.handleFailedRequest(o.DocumentDiagnosticRequest.type,t,e,{items:[]})))):{items:[]}},c=this.client.middleware;return c.provideWorkspaceDiagnostics?c.provideWorkspaceDiagnostics(e,t,n,a):a(e,t)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(const[e,t]of this.openRequests)t.state===d.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:d.outDated,document:t.document});this.diagnostics.dispose()}}class m{constructor(e){this.diagnosticRequestor=e,this.documents=new o.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=e instanceof i.Uri?e.toString():e.uri.toString();this.documents.has(t)||(this.documents.set(t,e,o.Touch.Last),this.trigger())}remove(e){const t=e instanceof i.Uri?e.toString():e.uri.toString();this.documents.has(t)&&(this.documents.delete(t),this.diagnosticRequestor.pull(e)),0===this.documents.size?this.stop():e===this.endDocument&&(this.endDocument=this.documents.last)}trigger(){!0!==this.isDisposed&&(void 0===this.intervalHandle?(this.endDocument=this.documents.last,this.intervalHandle=(0,o.RAL)().timer.setInterval((()=>{const e=this.documents.first;if(void 0!==e){const t=e instanceof i.Uri?e.toString():e.uri.toString();this.diagnosticRequestor.pull(e),this.documents.set(t,e,o.Touch.Last),e===this.endDocument&&this.stop()}}),200)):this.endDocument=this.documents.last)}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear()}stop(){this.intervalHandle?.dispose(),this.intervalHandle=void 0,this.endDocument=void 0}}class v{constructor(e,t,n){const s=e.clientOptions.diagnosticPullOptions??{onChange:!0,onSave:!1},a=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),c=[],u=e=>e instanceof i.Uri?(e=>{const t=n.documentSelector;if(void 0!==s.match)return s.match(t,e);for(const n of t)if(o.TextDocumentFilter.is(n)){if("string"==typeof n)return!1;if(void 0!==n.language&&"*"!==n.language)return!1;if(void 0!==n.scheme&&"*"!==n.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==n.pattern){const t=new r.Minimatch(n.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(e.fsPath))return!1}}return!0})(e):i.languages.match(a,e)>0&&t.isVisible(e),d=e=>e instanceof i.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new g(e,t,n),this.backgroundScheduler=new m(this.diagnosticRequestor);const h=e=>{u(e)&&n.interFileDependencies&&!d(e)&&this.backgroundScheduler.add(e)};this.activeTextDocument=i.window.activeTextEditor?.document,i.window.onDidChangeActiveTextEditor((e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&h(t),void 0!==this.activeTextDocument&&this.backgroundScheduler.remove(this.activeTextDocument)}));const f=e.getFeature(o.DidOpenTextDocumentNotification.method);c.push(f.onNotificationSent((e=>{const t=e.original;u(t)&&this.diagnosticRequestor.pull(t,(()=>{h(t)}))})));const v=new Set;for(const e of i.workspace.textDocuments)u(e)&&(this.diagnosticRequestor.pull(e,(()=>{h(e)})),v.add(e.uri.toString()));if(!0===s.onTabs)for(const e of t.getTabResources())!v.has(e.toString())&&u(e)&&this.diagnosticRequestor.pull(e,(()=>{h(e)}));if(!0===s.onChange){const t=e.getFeature(o.DidChangeTextDocumentNotification.method);c.push(t.onNotificationSent((async e=>{const t=e.original.document;(void 0===s.filter||!s.filter(t,l.onType))&&this.diagnosticRequestor.knows(p.document,t)&&e.original.contentChanges.length>0&&this.diagnosticRequestor.pull(t,(()=>{this.backgroundScheduler.trigger()}))})))}if(!0===s.onSave){const t=e.getFeature(o.DidSaveTextDocumentNotification.method);c.push(t.onNotificationSent((e=>{const t=e.original;void 0!==s.filter&&s.filter(t,l.onSave)||!this.diagnosticRequestor.knows(p.document,t)||this.diagnosticRequestor.pull(e.original,(()=>{this.backgroundScheduler.trigger()}))})))}const y=e.getFeature(o.DidCloseTextDocumentNotification.method);c.push(y.onNotificationSent((e=>{const t=e.original;this.diagnosticRequestor.cleanupPull(t),this.backgroundScheduler.remove(t)}))),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event((()=>{for(const e of i.workspace.textDocuments)u(e)&&this.diagnosticRequestor.pull(e)})),!0===n.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==n.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=i.Disposable.from(...c,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}}class y extends a.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"diagnostic");t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,c(c(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.DiagnosticRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}));let[n,r]=this.getRegistration(t,e.diagnosticProvider);n&&r&&this.register({id:n,registerOptions:r})}dispose(){void 0!==this.tabs&&(this.tabs.dispose(),this.tabs=void 0),super.dispose()}registerLanguageProvider(e){void 0===this.tabs&&(this.tabs=new h);const t=new v(this._client,this.tabs,e);return[t.disposable,t]}}t.DiagnosticFeature=y},7317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentHighlights:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.DocumentHighlightRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDocumentHighlights(e,n)),(e=>r.handleFailedRequest(i.DocumentHighlightRequest.type,n,e,null))),s=r.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentHighlightFeature=a},7272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentLinks:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentLinks(e,t)),(e=>n.handleFailedRequest(i.DocumentLinkRequest.type,t,e,null))),o=n.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,r):r(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let r=(e,t)=>n.sendRequest(i.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then((r=>t.isCancellationRequested?e:n.protocol2CodeConverter.asDocumentLink(r)),(r=>n.handleFailedRequest(i.DocumentLinkResolveRequest.type,t,r,e)));const o=n.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,r):r(e,t)}:void 0};return[r.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentLinkFeature=a},1690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435);t.SupportedSymbolKinds=[i.SymbolKind.File,i.SymbolKind.Module,i.SymbolKind.Namespace,i.SymbolKind.Package,i.SymbolKind.Class,i.SymbolKind.Method,i.SymbolKind.Property,i.SymbolKind.Field,i.SymbolKind.Constructor,i.SymbolKind.Enum,i.SymbolKind.Interface,i.SymbolKind.Function,i.SymbolKind.Variable,i.SymbolKind.Constant,i.SymbolKind.String,i.SymbolKind.Number,i.SymbolKind.Boolean,i.SymbolKind.Array,i.SymbolKind.Object,i.SymbolKind.Key,i.SymbolKind.Null,i.SymbolKind.EnumMember,i.SymbolKind.Struct,i.SymbolKind.Event,i.SymbolKind.Operator,i.SymbolKind.TypeParameter],t.SupportedSymbolTags=[i.SymbolTag.Deprecated];class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentSymbolRequest.type)}fillClientCapabilities(e){let n=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"documentSymbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:t.SupportedSymbolKinds},n.hierarchicalDocumentSymbolSupport=!0,n.tagSupport={valueSet:t.SupportedSymbolTags},n.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentSymbols:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t).then((async e=>{if(t.isCancellationRequested||null==e)return null;if(0===e.length)return[];{const r=e[0];return i.DocumentSymbol.is(r)?await n.protocol2CodeConverter.asDocumentSymbols(e,t):await n.protocol2CodeConverter.asSymbolInformations(e,t)}}),(e=>n.handleFailedRequest(i.DocumentSymbolRequest.type,t,e,null))),o=n.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,r):r(e,t)}},o=void 0!==e.label?{label:e.label}:void 0;return[r.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,o),n]}}t.DocumentSymbolFeature=a},3520:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const r=n(7549),i=n(7745),o=n(7435),s=n(497);t.ExecuteCommandFeature=class{constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return i.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:o.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.middleware,o=(e,n)=>{let r={command:e,arguments:n};return t.sendRequest(i.ExecuteCommandRequest.type,r).then(void 0,(e=>t.handleFailedRequest(i.ExecuteCommandRequest.type,void 0,e,void 0)))};if(e.registerOptions.commands){const t=[];for(const i of e.registerOptions.commands)t.push(r.commands.registerCommand(i,((...e)=>n.executeCommand?n.executeCommand(i,e,o):o(i,e))));this._commands.set(e.id,t)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}dispose(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}},497:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.ensure=t.LSPCancellationError=void 0;const r=n(7549),i=n(7745),o=n(2116),s=n(7435);class a extends r.CancellationError{constructor(e){super(),this.data=e}}t.LSPCancellationError=a,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},(t.StaticFeature||(t.StaticFeature={})).is=function(e){const t=e;return null!=t&&o.func(t.fillClientCapabilities)&&o.func(t.initialize)&&o.func(t.getState)&&o.func(t.dispose)&&(void 0===t.fillInitializeParams||o.func(t.fillInitializeParams))},(t.DynamicFeature||(t.DynamicFeature={})).is=function(e){const t=e;return null!=t&&o.func(t.fillClientCapabilities)&&o.func(t.initialize)&&o.func(t.getState)&&o.func(t.dispose)&&(void 0===t.fillInitializeParams||o.func(t.fillInitializeParams))&&o.func(t.register)&&o.func(t.unregister)&&void 0!==t.registrationType};class c{constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const n of e){t++;for(const e of r.workspace.textDocuments)if(r.languages.match(n,e)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}const n=t>0;return{kind:"document",id:this.registrationType.method,registrations:n,matches:!1}}}t.DynamicDocumentFeature=c,t.TextDocumentEventFeature=class extends c{constructor(e,t,n,i,o,s,a){super(e),this._event=t,this._type=n,this._middleware=i,this._createParams=o,this._textDocument=s,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new r.EventEmitter}static textDocumentFilter(e,t){for(const n of e)if(r.languages.match(n,t)>0)return!0;return!1}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event((e=>{this.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed.`,e)}))}))),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){const t=async e=>{const t=this._createParams(e);await this._client.sendNotification(this._type,t).catch(),this.notificationSent(e,this._type,t)};if(this.matches(e)){const n=this._middleware();return n?n(e,(e=>t(e))):t(e)}}matches(e){return!this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))&&(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({original:e,type:t,params:n})}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._onNotificationSent.dispose(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(r.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends c{constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(const e of this._registrations.values()){const t=e.data.registerOptions.documentSelector;null!==t&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(i.TextDocumentRegistrationOptions.is(t)){const n=i.StaticRegistrationOptions.hasId(t)?t.id:s.generateUuid(),r=t.documentSelector||e;if(r)return[n,Object.assign({},t,{documentSelector:r})]}else if(o.boolean(t)&&!0===t||i.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let n=o.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[s.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return o.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&r.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(n),e)>0)return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}},t.WorkspaceFeature=class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}},392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const r=n(7549),i=n(3707),o=n(7745),s=n(7435);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function c(e,t,n){e[t]=n}class u{constructor(e,t,n,r,i){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=r,this._serverCapability=i,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=a(a(e,"workspace"),"fileOperations");c(t,"dynamicRegistration",!0),c(t,this._clientCapability,!0)}initialize(e){const t=e.workspace?.fileOperations,n=void 0!==t?t[this._serverCapability]:void 0;if(void 0!==n?.filters)try{this.register({id:s.generateUuid(),registerOptions:{filters:n.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map((e=>{const t=new i.Minimatch(e.pattern.glob,u.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}}));this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return u.getFileType(e)}async filter(e,t){const n=await Promise.all(e.files.map((async e=>{const n=t(e),i=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(i)){if(void 0===t.kind)return!0;const e=await this.getFileType(n);if(void 0===e)return this._client.error(`Failed to determine file type for ${n.toString()}.`),!0;if(e===r.FileType.File&&t.kind===o.FileOperationPatternKind.file||e===r.FileType.Directory&&t.kind===o.FileOperationPatternKind.folder)return!0}else if(t.kind===o.FileOperationPatternKind.folder&&await u.getFileType(n)===r.FileType.Directory&&t.matcher.match(`${i}/`))return!0;return!1}))),i=e.files.filter(((e,t)=>n[t]));return{...e,files:i}}static async getFileType(e){try{return(await r.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){if(void 0!==e)return!0===e.ignoreCase?{nocase:!0}:void 0}}class l extends u{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i),this._notificationType=n,this._accessUri=o,this._createParams=s}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>this._client.sendNotification(this._notificationType,this._createParams(e));return this.doSend(t,e)}}}class d extends l{constructor(){super(...arguments),this._fsPathFileTypes=new Map}async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const n=await u.getFileType(e);return n&&this._fsPathFileTypes.set(t,n),n}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),0===this.filterSize()&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}dispose(){super.dispose(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}}t.DidCreateFilesFeature=class extends l{constructor(e){super(e,r.workspace.onDidCreateFiles,o.DidCreateFilesNotification.type,"didCreate","didCreate",(e=>e),e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.didCreateFiles?n.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends d{constructor(e){super(e,r.workspace.onDidRenameFiles,o.DidRenameFilesNotification.type,"didRename","didRename",(e=>e.oldUri),e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=r.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,(e=>e.oldUri)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didRenameFiles?n.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends d{constructor(e){super(e,r.workspace.onDidDeleteFiles,o.DidDeleteFilesNotification.type,"didDelete","didDelete",(e=>e),e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=r.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,(e=>e)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didDeleteFiles?n.didDeleteFiles(e,t):t(e)}};class p extends u{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i),this._requestType=n,this._accessUri=o,this._createParams=s}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e),e.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends p{constructor(e){super(e,r.workspace.onWillCreateFiles,o.WillCreateFilesRequest.type,"willCreate","willCreate",(e=>e),e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willCreateFiles?n.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends p{constructor(e){super(e,r.workspace.onWillRenameFiles,o.WillRenameFilesRequest.type,"willRename","willRename",(e=>e.oldUri),e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willRenameFiles?n.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends p{constructor(e){super(e,r.workspace.onWillDeleteFiles,o.WillDeleteFilesRequest.type,"willDelete","willDelete",(e=>e),e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willDeleteFiles?n.willDeleteFiles(e,t):t(e)}}},9190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const r=n(7549),i=n(7745),o=n(497);t.FileSystemWatcherFeature=class{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return i.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,o.ensure)((0,o.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;const t=[];for(const n of e.registerOptions.watchers){const e=this._client.protocol2CodeConverter.asGlobPattern(n.globPattern);if(void 0===e)continue;let o=!0,s=!0,a=!0;void 0!==n.kind&&null!==n.kind&&(o=0!=(n.kind&i.WatchKind.Create),s=0!=(n.kind&i.WatchKind.Change),a=0!=(n.kind&i.WatchKind.Delete));const c=r.workspace.createFileSystemWatcher(e,!o,!s,!a);this.hookListeners(c,o,s,a,t),t.push(c)}this._watchers.set(e.id,t)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,r,o){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Created})),null,o),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Changed})),null,o),r&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Deleted})),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}},807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[i.FoldingRangeKind.Comment,i.FoldingRangeKind.Imports,i.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1}}initialize(e,t){let[n,r]=this.getRegistration(t,e.foldingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideFoldingRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e)};return r.sendRequest(i.FoldingRangeRequest.type,o,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asFoldingRanges(e,n)),(e=>r.handleFailedRequest(i.FoldingRangeRequest.type,n,e,null)))},s=r.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[r.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.FoldingRangeFeature=s},9368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const r=n(7549),i=n(7745),o=n(7435),s=n(497);var a;!function(e){e.fromConfiguration=function(e){const t=r.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(a||(a={}));class c extends s.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentFormattingEdits:(e,t,n)=>{const r=this._client,o=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),options:r.code2ProtocolConverter.asFormattingOptions(t,a.fromConfiguration(e))};return r.sendRequest(i.DocumentFormattingRequest.type,o,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,n)),(e=>r.handleFailedRequest(i.DocumentFormattingRequest.type,n,e,null)))},s=r.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[r.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentFormattingFeature=c;class u extends s.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return o.sendRequest(i.DocumentRangeFormattingRequest.type,s,r).then((e=>r.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,r)),(e=>o.handleFailedRequest(i.DocumentRangeFormattingRequest.type,r,e,null)))},c=o.middleware;return c.provideDocumentRangeFormattingEdits?c.provideDocumentRangeFormattingEdits(e,t,n,r,s):s(e,t,n,r)}};return[r.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentRangeFormattingFeature=u;class l extends s.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideOnTypeFormattingEdits:(e,t,n,r,o)=>{const s=this._client,c=(e,t,n,r,o)=>{let c={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(r,a.fromConfiguration(e))};return s.sendRequest(i.DocumentOnTypeFormattingRequest.type,c,o).then((e=>o.isCancellationRequested?null:s.protocol2CodeConverter.asTextEdits(e,o)),(e=>s.handleFailedRequest(i.DocumentOnTypeFormattingRequest.type,o,e,null)))},u=s.middleware;return u.provideOnTypeFormattingEdits?u.provideOnTypeFormattingEdits(e,t,n,r,o,c):c(e,t,n,r,o)}},o=e.moreTriggerCharacter||[];return[r.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...o),n]}}t.DocumentOnTypeFormattingFeature=l},9446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.HoverRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[i.MarkupKind.Markdown,i.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideHover:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.HoverRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asHover(e)),(e=>r.handleFailedRequest(i.HoverRequest.type,n,e,null))),s=r.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=a},9764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.implementationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideImplementation:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.ImplementationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>r.handleFailedRequest(i.ImplementationRequest.type,n,e,null))),s=r.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ImplementationFeature=s},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,o.ensure)((0,o.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.InlayHintRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlayHints.fire()}));const[n,r]=this.getRegistration(t,e.inlayHintProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n=new r.EventEmitter,o={onDidChangeInlayHints:n.event,provideInlayHints:(e,t,n)=>{const r=this._client,o=async(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t)};try{const e=await r.sendRequest(i.InlayHintRequest.type,o,n);return n.isCancellationRequested?null:r.protocol2CodeConverter.asInlayHints(e,n)}catch(e){return r.handleFailedRequest(i.InlayHintRequest.type,n,e,null)}},s=r.middleware;return s.provideInlayHints?s.provideInlayHints(e,t,n,o):o(e,t,n)}};return o.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const n=this._client,r=async(e,t)=>{try{const r=await n.sendRequest(i.InlayHintResolveRequest.type,n.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const o=n.protocol2CodeConverter.asInlayHint(r,t);return t.isCancellationRequested?null:o}catch(e){return n.handleFailedRequest(i.InlayHintResolveRequest.type,t,e,null)}},o=n.middleware;return o.resolveInlayHint?o.resolveInlayHint(e,t,r):r(e,t)}:void 0,[this.registerProvider(t,o),{provider:o,onDidChangeInlayHints:n}]}registerProvider(e,t){return r.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=s},2275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.InlineValueRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,o.ensure)((0,o.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.InlineValueRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlineValues.fire()}));const[n,r]=this.getRegistration(t,e.inlineValueProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n=new r.EventEmitter,o={onDidChangeInlineValues:n.event,provideInlineValues:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asInlineValueContext(n)};return o.sendRequest(i.InlineValueRequest.type,s,r).then((e=>r.isCancellationRequested?null:o.protocol2CodeConverter.asInlineValues(e,r)),(e=>o.handleFailedRequest(i.InlineValueRequest.type,r,e,null)))},a=o.middleware;return a.provideInlineValues?a.provideInlineValues(e,t,n,r,s):s(e,t,n,r)}};return[this.registerProvider(t,o),{provider:o,onDidChangeInlineValues:n}]}registerProvider(e,t){return r.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=s},2550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideLinkedEditingRanges:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.LinkedEditingRangeRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asLinkedEditingRanges(e,n)),(e=>r.handleFailedRequest(i.LinkedEditingRangeRequest.type,n,e,null))),s=r.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=s},7172:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const r=n(7549),i=n(3707),o=n(7745),s=n(7435),a=n(2116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,p,h;!function(e){let t;!function(t){function n(e,t){return e.map((e=>s(e,t)))}function i(e){return c(new Set,e)}function s(e,t){const n=o.NotebookCell.create(function(e){switch(e){case r.NotebookCellKind.Markup:return o.NotebookCellKind.Markup;case r.NotebookCellKind.Code:return o.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(n.metadata=i(e.metadata)),void 0!==e.executionSummary&&a.number(e.executionSummary.executionOrder)&&a.boolean(e.executionSummary.success)&&(n.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),n}function c(e,t){if(e.has(t))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(t)){const n=[];for(const r of t)if(null!==r&&"object"==typeof r||Array.isArray(r))n.push(c(e,r));else{if(r instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");n.push(r)}return n}{const n=Object.keys(t),r=Object.create(null);for(const i of n){const n=t[i];if(null!==n&&"object"==typeof n||Array.isArray(n))r[i]=c(e,n);else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");r[i]=n}}return r}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,r){const s=o.NotebookDocument.create(r.asUri(e.uri),e.notebookType,e.version,n(t,r));return Object.keys(e.metadata).length>0&&(s.metadata=i(e.metadata)),s},t.asNotebookCells=n,t.asMetadata=i,t.asNotebookCell=s,t.asTextContentChange=function(e,t){const n=t.asChangeTextDocumentParams(e);return{document:n.textDocument,changes:n.contentChanges}},t.asNotebookDocumentChangeEvent=function(t,n){const r=Object.create(null);if(t.metadata&&(r.metadata=e.c2p.asMetadata(t.metadata)),void 0!==t.cells){const i=Object.create(null),o=t.cells;o.structure&&(i.structure={array:{start:o.structure.array.start,deleteCount:o.structure.array.deleteCount,cells:void 0!==o.structure.array.cells?o.structure.array.cells.map((t=>e.c2p.asNotebookCell(t,n))):void 0},didOpen:void 0!==o.structure.didOpen?o.structure.didOpen.map((e=>n.asOpenTextDocumentParams(e.document).textDocument)):void 0,didClose:void 0!==o.structure.didClose?o.structure.didClose.map((e=>n.asCloseTextDocumentParams(e.document).textDocument)):void 0}),void 0!==o.data&&(i.data=o.data.map((t=>e.c2p.asNotebookCell(t,n)))),void 0!==o.textContent&&(i.textContent=o.textContent.map((t=>e.c2p.asTextContentChange(t,n)))),Object.keys(i).length>0&&(r.cells=i)}return r}}(t=e.c2p||(e.c2p={}))}(u||(u={})),function(e){function t(e,t,r=!0){return!(e.kind!==t.kind||e.document.uri.toString()!==t.document.uri.toString()||e.document.languageId!==t.document.languageId||!function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.executionOrder===t.executionOrder&&e.success===t.success&&function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.startTime===t.startTime&&e.endTime===t.endTime)}(e.timing,t.timing))}(e.executionSummary,t.executionSummary))&&(!r||r&&n(e.metadata,t.metadata))}function n(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const i=Array.isArray(e),o=Array.isArray(t);if(i!==o)return!1;if(i&&o){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}if(r(e)&&r(t)){const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(r.sort(),i.sort(),!n(r,i))return!1;for(let i=0;i<r.length;i++){const o=r[i];if(!n(e[o],t[o]))return!1}return!0}return!1}function r(e){return null!==e&&"object"==typeof e}e.computeDiff=function(e,n,r){const i=e.length,o=n.length;let s=0;for(;s<o&&s<i&&t(e[s],n[s],r);)s++;if(s<o&&s<i){let a=i-1,c=o-1;for(;a>=0&&c>=0&&t(e[a],n[c],r);)a--,c--;const u=a+1-s,l=s===c+1?void 0:n.slice(s,c+1);return void 0!==l?{start:s,deleteCount:u,cells:l}:{start:s,deleteCount:u}}return s<o?{start:s,deleteCount:0,cells:n.slice(s)}:s<i?{start:s,deleteCount:i-s}:void 0},e.isObjectLiteral=r}(l||(l={})),function(e){e.matchNotebook=function(e,t){if("string"==typeof e)return"*"===e||t.notebookType===e;if(void 0!==e.notebookType&&"*"!==e.notebookType&&t.notebookType!==e.notebookType)return!1;const n=t.uri;if(void 0!==e.scheme&&"*"!==e.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==e.pattern){const t=new i.Minimatch(e.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(n.fsPath))return!1}return!0}}(d||(d={})),function(e){function t(e,t,n,r){return void 0===t&&void 0===n?{notebook:e,language:r}:{notebook:{notebookType:e,scheme:t,pattern:n},language:r}}e.asDocumentSelector=function(e){const n=e.notebookSelector,r=[];for(const e of n){const n=("string"==typeof e.notebook?e.notebook:e.notebook?.notebookType)??"*",i="string"==typeof e.notebook?void 0:e.notebook?.scheme,o="string"==typeof e.notebook?void 0:e.notebook?.pattern;if(void 0!==e.cells)for(const s of e.cells)r.push(t(n,i,o,s.language));else r.push(t(n,i,o,void 0))}return r}}(p||(p={})),function(e){e.create=function(e){return{cells:e,uris:new Set(e.map((e=>e.document.uri.toString())))}}}(h||(h={}));class f{constructor(e,t){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(p.asDocumentSelector(t)),r.workspace.onDidOpenNotebookDocument((e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)}),void 0,this.disposables);for(const e of r.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);r.workspace.onDidChangeNotebookDocument((e=>this.didChangeNotebookDocument(e)),void 0,this.disposables),!0===this.options.save&&r.workspace.onDidSaveNotebookDocument((e=>this.didSave(e)),void 0,this.disposables),r.workspace.onDidCloseNotebookDocument((e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())}),void 0,this.disposables)}getState(){for(const e of r.workspace.notebookDocuments)if(void 0!==this.getMatchingCells(e))return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){return r.languages.match(this.selector,e)>0}didOpenNotebookCellTextDocument(e,t){if(0===r.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const n=this.notebookSyncInfo.get(e.uri.toString()),i=this.cellMatches(e,t);if(void 0!==n){const r=n.uris.has(t.document.uri.toString());if(i&&r||!i&&!r)return;if(i){const t=this.getMatchingCells(e);if(void 0!==t){const r=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==r&&this.doSendChange(r,t).catch((()=>{}))}}}else i&&this.doSendOpen(e,[t]).catch((()=>{}))}didChangeNotebookCellTextDocument(e,t){0!==r.languages.match(this.selector,t.document)&&this.doSendChange({notebook:e,cells:{textContent:[t]}},void 0).catch((()=>{}))}didCloseNotebookCellTextDocument(e,t){const n=this.notebookSyncInfo.get(e.uri.toString());if(void 0===n)return;const r=t.document.uri,i=n.cells.findIndex((e=>e.document.uri.toString()===r.toString()));if(-1!==i)if(0===i&&1===n.cells.length)this.doSendClose(e,n.cells).catch((()=>{}));else{const t=n.cells.slice(),r=t.splice(i,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:i,deleteCount:1},didClose:r}}},t).catch((()=>{}))}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t=this.getMatchingCells(e),n=this.notebookSyncInfo.get(e.uri.toString())){if(void 0!==n)if(void 0!==t){const r=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==r&&this.doSendChange(r,t).catch((()=>{}))}else this.doSendClose(e,[]).catch((()=>{}));else{if(void 0===t)return;this.doSendOpen(e,t).catch((()=>{}))}}didChangeNotebookDocument(e){const t=e.notebook,n=this.notebookSyncInfo.get(t.uri.toString());if(void 0===n){if(0===e.contentChanges.length)return;const r=this.getMatchingCells(t);if(void 0===r)return;this.didOpen(t,r,n)}else{const r=this.getMatchingCells(t);if(void 0===r)return void this.didClose(t,n);const i=this.asNotebookDocumentChangeEvent(e.notebook,e,n,r);void 0!==i&&this.doSendChange(i,r).catch((()=>{}))}}didSave(e){void 0!==this.notebookSyncInfo.get(e.uri.toString())&&this.doSendSave(e).catch((()=>{}))}didClose(e,t=this.notebookSyncInfo.get(e.uri.toString())){if(void 0===t)return;const n=e.getCells().filter((e=>t.uris.has(e.document.uri.toString())));this.doSendClose(e,n).catch((()=>{}))}async sendDidOpenNotebookDocument(e){const t=this.getMatchingCells(e);if(void 0!==t)return this.doSendOpen(e,t)}async doSendOpen(e,t){const n=async(e,t)=>{const n=u.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),r=t.map((e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document)));try{await this.client.sendNotification(o.DidOpenNotebookDocumentNotification.type,{notebookDocument:n,cellTextDocuments:r})}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},r=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),h.create(t)),void 0!==r?.didOpen?r.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){return this.doSendChange(e,void 0)}async doSendChange(e,t=this.getMatchingCells(e.notebook)){const n=async e=>{try{await this.client.sendNotification(o.DidChangeNotebookDocumentNotification.type,{notebookDocument:u.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:u.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)})}catch(e){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",e),e}},r=this.client.middleware?.notebooks;return void 0!==e.cells?.structure&&this.notebookSyncInfo.set(e.notebook.uri.toString(),h.create(t??[])),void 0!==r?.didChange?r?.didChange(e,n):n(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){const t=async e=>{try{await this.client.sendNotification(o.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}})}catch(e){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return void 0!==n?.didSave?n.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){return this.doSendClose(e,this.getMatchingCells(e)??[])}async doSendClose(e,t){const n=async(e,t)=>{try{await this.client.sendNotification(o.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map((e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document)))})}catch(e){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",e),e}},r=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),void 0!==r?.didClose?r.didClose(e,t,n):n(e,t)}asNotebookDocumentChangeEvent(e,t,n,r){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const i={notebook:e};let o;if(void 0!==t?.metadata&&(i.metadata=u.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];o=new Set(r.map((e=>e.document.uri.toString())));for(const n of t.cellChanges)!o.has(n.cell.document.uri.toString())||void 0===n.executionSummary&&void 0===n.metadata||e.push(n.cell);e.length>0&&(i.cells=i.cells??{},i.cells.data=e)}if((void 0!==t?.contentChanges&&t.contentChanges.length>0||void 0===t)&&void 0!==n&&void 0!==r){const e=n.cells,t=r,o=l.computeDiff(e,t,!1);let s,a;if(void 0!==o){s=void 0===o.cells?new Map:new Map(o.cells.map((e=>[e.document.uri.toString(),e]))),a=0===o.deleteCount?new Map:new Map(e.slice(o.start,o.start+o.deleteCount).map((e=>[e.document.uri.toString(),e])));for(const e of Array.from(a.keys()))s.has(e)&&(a.delete(e),s.delete(e));i.cells=i.cells??{};const t=[],n=[];if(s.size>0||a.size>0){for(const e of s.values())t.push(e);for(const e of a.values())n.push(e)}i.cells.structure={array:o,didOpen:t,didClose:n}}}return Object.keys(i).length>1?i:void 0}getMatchingCells(e,t=e.getCells()){if(void 0!==this.options.notebookSelector)for(const n of this.options.notebookSelector){if(void 0===n.notebook){if(void 0===n.cells)return;const r=this.filterCells(e,t,n.cells);return 0===r.length?void 0:r}if(d.matchNotebook(n.notebook,e))return void 0===n.cells?t:this.filterCells(e,t,n.cells)}}cellMatches(e,t){const n=this.getMatchingCells(e,[t]);return void 0!==n&&n[0]===t}filterCells(e,t,n){const r=t.filter((e=>{const t=e.document.languageId;return n.some((e=>"*"===e.language||t===e.language))}));return"function"==typeof this.client.clientOptions.notebookDocumentOptions?.filterCells?this.client.clientOptions.notebookDocumentOptions.filterCells(e,t):r}}class g{constructor(e){this.client=e,this.registrations=new Map,this.registrationType=o.NotebookDocumentSyncRegistrationType.type,r.workspace.onDidOpenTextDocument((e=>{if(e.uri.scheme!==g.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof f&&e.didOpenNotebookCellTextDocument(t,n)})),r.workspace.onDidChangeTextDocument((e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==g.CellScheme)return;const[n]=this.findNotebookDocumentAndCell(t);if(void 0!==n)for(const t of this.registrations.values())t instanceof f&&t.didChangeNotebookCellTextDocument(n,e)})),r.workspace.onDidCloseTextDocument((e=>{if(e.uri.scheme!==g.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof f&&e.didCloseNotebookCellTextDocument(t,n)}))}getState(){if(0===this.registrations.size)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(const e of this.registrations.values()){const t=e.getState();if("document"===t.kind&&!0===t.registrations&&!0===t.matches)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}fillClientCapabilities(e){const t=c(c(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(p.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const n=t.id??s.generateUuid();this.register({id:n,registerOptions:t})}register(e){const t=new f(this.client,e.registerOptions);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);t&&t.dispose()}dispose(){for(const e of this.registrations.values())e.dispose();this.registrations.clear()}handles(e){if(e.uri.scheme!==g.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&r.languages.match(this.dedicatedChannel,e)>0)return!0;for(const t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(const t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){const t=e.uri.toString();for(const e of r.workspace.notebookDocuments)for(const n of e.getCells())if(n.document.uri.toString()===t)return[e,n];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=g,g.CellScheme="vscode-notebook-cell"},4915:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const r=n(7745),i=n(6181);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:r.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(r.WorkDoneProgressCreateRequest.type,(e=>{this.activeParts.add(new i.ProgressPart(this._client,e.token,t))}))}dispose(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},6181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const r=n(7549),i=n(7745),o=n(2116);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(i.WorkDoneProgress.type,this._token,(e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}}))}begin(e){this._infinite=void 0===e.percentage,void 0!==this._lspProgressDisposable&&r.window.withProgress({location:r.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},(async(t,n)=>{if(void 0!==this._lspProgressDisposable)return this._progress=t,this._cancellationToken=n,this._tokenDisposable=this._cancellationToken.onCancellationRequested((()=>{this._client.sendNotification(i.WorkDoneProgressCancelNotification.type,{token:this._token})})),this.report(e),new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}))}report(e){if(this._infinite&&o.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(o.number(e.percentage)){const t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._reported+=n,void 0!==this._progress&&this._progress.report({message:e.message,increment:n})}}cancel(){this.cleanup(),void 0!==this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),void 0!==this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){void 0!==this._lspProgressDisposable&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),void 0!==this._tokenDisposable&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}}},7400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.CallHierarchyItem{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,o),void 0!==s&&(this.data=s)}}t.default=i},1219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=i},225:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.CodeLens{constructor(e){super(e)}}t.default=i},1143:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.CompletionItem{constructor(e){super(e)}}t.default=i},5356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const r=n(7549),i=n(7745),o=n(2116),s=n(8005),a=n(1143),c=n(225),u=n(8552),l=n(1219),d=n(6965),p=n(7400),h=n(9551),f=n(6832),g=n(134),m=n(7745);var v;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(v||(v={})),t.createConverter=function(e,t,n){const y=e||(e=>r.Uri.parse(e));function _(e){return y(e)}function b(e){let t=new d.ProtocolDiagnostic(C(e.range),e.message,R(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)i.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:_(e.codeDescription.href)}:t.code=e.code;else if(d.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const n=e.code;t.code={value:n.value,target:_(n.target)}}return e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const i=e[n];t[n]=new r.DiagnosticRelatedInformation(j(i.location),i.message)}return t}(e.relatedInformation)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=S(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function S(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function E(e){return e?new r.Position(e.line,e.character):void 0}function C(e){return e?new r.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function T(e,t){return s.map(e,(e=>new r.Range(e.start.line,e.start.character,e.end.line,e.end.character)),t)}function R(e){if(null==e)return r.DiagnosticSeverity.Error;switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}return r.DiagnosticSeverity.Error}function w(e){if(o.string(e))return e;switch(e.kind){case i.MarkupKind.Markdown:return D(e.value);case i.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function D(e){let o;if(void 0===e||"string"==typeof e)o=new r.MarkdownString(e);else switch(e.kind){case i.MarkupKind.Markdown:o=new r.MarkdownString(e.value);break;case i.MarkupKind.PlainText:o=new r.MarkdownString,o.appendText(e.value);break;default:o=new r.MarkdownString,o.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return o.isTrusted=t,o.supportHtml=n,o}function P(e){switch(e){case i.CompletionItemTag.Deprecated:return r.CompletionItemTag.Deprecated}}function I(e,t,n,s,c,u){const l=function(e){if(null==e)return[];const t=[];for(const n of e){const e=P(n);void 0!==e&&t.push(e)}return t}(e.tags),d=function(e){return i.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),p=new a.default(d);e.detail&&(p.detail=e.detail),e.documentation&&(p.documentation=w(e.documentation),p.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(p.filterText=e.filterText);const h=function(e,t,n){const o=e.insertTextFormat??n;if(void 0!==e.textEdit||void 0!==t){const[n,a]=void 0!==e.textEdit?(s=e.textEdit,i.InsertReplaceEdit.is(s)?[{inserting:C(s.insert),replacing:C(s.replace)},s.newText]:[C(s.range),s.newText]):[t,e.textEditText??e.label];return o===i.InsertTextFormat.Snippet?{text:new r.SnippetString(a),range:n,fromEdit:!0}:{text:a,range:n,fromEdit:!0}}return e.insertText?o===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var s}(e,n,c);if(h&&(p.insertText=h.text,p.range=h.range,p.fromEdit=h.fromEdit),o.number(e.kind)){let[t,n]=(f=e.kind,i.CompletionItemKind.Text<=f&&f<=i.CompletionItemKind.TypeParameter?[f-1,void 0]:[r.CompletionItemKind.Text,f]);p.kind=t,n&&(p.originalItemKind=n)}var f;e.sortText&&(p.sortText=e.sortText),e.additionalTextEdits&&(p.additionalTextEdits=A(e.additionalTextEdits));const g=void 0!==e.commitCharacters?o.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t;g&&(p.commitCharacters=g.slice()),e.command&&(p.command=z(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(p.deprecated=e.deprecated,!0===e.deprecated&&l.push(r.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(p.preselect=e.preselect);const m=e.data??u;void 0!==m&&(p.data=m),l.length>0&&(p.tags=l);const v=e.insertTextMode??s;return void 0!==v&&(p.insertTextMode=v,v===i.InsertTextMode.asIs&&(p.keepWhitespace=!0)),p}function O(e){if(e)return new r.TextEdit(C(e.range),e.newText)}async function x(e,t){if(e)return s.map(e,O,t)}function A(e){if(!e)return;const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=O(e[n]);return t}async function k(e,t){return s.mapAsync(e,N,t)}async function N(e,t){let n=new r.SignatureInformation(e.label);return void 0!==e.documentation&&(n.documentation=w(e.documentation)),void 0!==e.parameters&&(n.parameters=await M(e.parameters,t)),void 0!==e.activeParameter&&(n.activeParameter=e.activeParameter),n}function M(e,t){return s.map(e,L,t)}function L(e){let t=new r.ParameterInformation(e.label);return e.documentation&&(t.documentation=w(e.documentation)),t}function j(e){return e?new r.Location(y(e.uri),C(e.range)):void 0}function q(e){if(!e)return;let t={targetUri:y(e.targetUri),targetRange:C(e.targetRange),originSelectionRange:C(e.originSelectionRange),targetSelectionRange:C(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}async function F(e,t){if(e){if(o.array(e)){if(0===e.length)return[];if(i.LocationLink.is(e[0])){const n=e;return s.map(n,q,t)}{const n=e;return s.map(n,j,t)}}return i.LocationLink.is(e)?[q(e)]:j(e)}}function H(e){let t=new r.DocumentHighlight(C(e.range));return o.number(e.kind)&&(t.kind=U(e.kind)),t}function U(e){switch(e){case i.DocumentHighlightKind.Text:return r.DocumentHighlightKind.Text;case i.DocumentHighlightKind.Read:return r.DocumentHighlightKind.Read;case i.DocumentHighlightKind.Write:return r.DocumentHighlightKind.Write}return r.DocumentHighlightKind.Text}function $(e){return e<=i.SymbolKind.TypeParameter?e-1:r.SymbolKind.Property}function V(e){switch(e){case i.SymbolTag.Deprecated:return r.SymbolTag.Deprecated;default:return}}function B(e){if(null==e)return;const t=[];for(const n of e){const e=V(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function G(e){const t=e.data,n=e.location,i=void 0===n.range||void 0!==t?new f.default(e.name,$(e.kind),e.containerName??"",void 0===n.range?y(n.uri):new r.Location(y(e.location.uri),C(n.range)),t):new r.SymbolInformation(e.name,$(e.kind),e.containerName??"",new r.Location(y(e.location.uri),C(n.range)));return W(i,e),i}function K(e){let t=new r.DocumentSymbol(e.name,e.detail||"",$(e.kind),C(e.range),C(e.selectionRange));if(W(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(K(t));t.children=n}return t}function W(e,t){e.tags=B(t.tags),t.deprecated&&(e.tags?e.tags.includes(r.SymbolTag.Deprecated)||(e.tags=e.tags.concat(r.SymbolTag.Deprecated)):e.tags=[r.SymbolTag.Deprecated])}function z(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const X=new Map;function Y(e){if(null==e)return;let t=X.get(e);if(t)return t;let n=e.split(".");t=r.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}async function Q(e,t){if(null==e)return;let n=new l.default(e.title,e.data);return void 0!==e.kind&&(n.kind=Y(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=b(e[n]);return t}(e.diagnostics)),void 0!==e.edit&&(n.edit=await Z(e.edit,t)),void 0!==e.command&&(n.command=z(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n}function J(e){if(!e)return;let t=new c.default(C(e.range));return e.command&&(t.command=z(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}async function Z(e,t){if(!e)return;const n=new Map;if(void 0!==e.changeAnnotations){const r=e.changeAnnotations;await s.forEach(Object.keys(r),(e=>{const t=function(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}(r[e]);n.set(e,t)}),t)}const o=e=>void 0===e?void 0:n.get(e),a=new r.WorkspaceEdit;if(e.documentChanges){const n=e.documentChanges;await s.forEach(n,(e=>{if(i.CreateFile.is(e))a.createFile(y(e.uri),e.options,o(e.annotationId));else if(i.RenameFile.is(e))a.renameFile(y(e.oldUri),y(e.newUri),e.options,o(e.annotationId));else if(i.DeleteFile.is(e))a.deleteFile(y(e.uri),e.options,o(e.annotationId));else{if(!i.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=y(e.textDocument.uri);for(const n of e.edits)i.AnnotatedTextEdit.is(n)?a.replace(t,C(n.range),n.newText,o(n.annotationId)):a.replace(t,C(n.range),n.newText)}}}),t)}else if(e.changes){const n=e.changes;await s.forEach(Object.keys(n),(e=>{a.set(y(e),A(n[e]))}),t)}return a}function ee(e){let t=C(e.range),n=e.target?_(e.target):void 0,r=new u.default(t,n);return void 0!==e.tooltip&&(r.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(r.data=e.data),r}function te(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}function ne(e){return new r.ColorInformation(C(e.range),te(e.color))}function re(e){let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=A(e.additionalTextEdits),e.textEdit&&(t.textEdit=O(e.textEdit)),t}function ie(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}function oe(e){return new r.FoldingRange(e.startLine,e.endLine,ie(e.kind))}function se(e){return new r.SelectionRange(C(e.range),e.parent?se(e.parent):void 0)}function ae(e){return i.InlineValueText.is(e)?new r.InlineValueText(C(e.range),e.text):i.InlineValueVariableLookup.is(e)?new r.InlineValueVariableLookup(C(e.range),e.variableName,e.caseSensitiveLookup):new r.InlineValueEvaluatableExpression(C(e.range),e.expression)}async function ce(e,t){const n="string"==typeof e.label?e.label:await s.map(e.label,ue,t),r=new g.default(E(e.position),n);return void 0!==e.kind&&(r.kind=e.kind),void 0!==e.textEdits&&(r.textEdits=await x(e.textEdits,t)),void 0!==e.tooltip&&(r.tooltip=le(e.tooltip)),void 0!==e.paddingLeft&&(r.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(r.paddingRight=e.paddingRight),void 0!==e.data&&(r.data=e.data),r}function ue(e){const t=new r.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=j(e.location)),void 0!==e.tooltip&&(t.tooltip=le(e.tooltip)),void 0!==e.command&&(t.command=z(e.command)),t}function le(e){return"string"==typeof e?e:D(e)}function de(e){if(null===e)return;const t=new p.default($(e.kind),e.name,e.detail||"",_(e.uri),C(e.range),C(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=B(e.tags)),t}async function pe(e,t){return new r.CallHierarchyIncomingCall(de(e.from),await T(e.fromRanges,t))}async function he(e,t){return new r.CallHierarchyOutgoingCall(de(e.to),await T(e.fromRanges,t))}function fe(e){return new r.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function ge(e){if(null===e)return;let t=new h.default($(e.kind),e.name,e.detail||"",_(e.uri),C(e.range),C(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=B(e.tags)),t}return X.set(i.CodeActionKind.Empty,r.CodeActionKind.Empty),X.set(i.CodeActionKind.QuickFix,r.CodeActionKind.QuickFix),X.set(i.CodeActionKind.Refactor,r.CodeActionKind.Refactor),X.set(i.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorExtract),X.set(i.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorInline),X.set(i.CodeActionKind.RefactorRewrite,r.CodeActionKind.RefactorRewrite),X.set(i.CodeActionKind.Source,r.CodeActionKind.Source),X.set(i.CodeActionKind.SourceOrganizeImports,r.CodeActionKind.SourceOrganizeImports),{asUri:_,asDocumentSelector:function(e){const t=[];for(const n of e)if("string"==typeof n)t.push(n);else if(m.NotebookCellTextDocumentFilter.is(n))if("string"==typeof n.notebook)t.push({notebookType:n.notebook,language:n.language});else{const e=n.notebook.notebookType??"*";t.push({notebookType:e,scheme:n.notebook.scheme,pattern:n.notebook.pattern,language:n.language})}else m.TextDocumentFilter.is(n)&&t.push({language:n.language,scheme:n.scheme,pattern:n.pattern});return t},asDiagnostics:async function(e,t){return s.map(e,b,t)},asDiagnostic:b,asRange:C,asRanges:T,asPosition:E,asDiagnosticSeverity:R,asDiagnosticTag:S,asHover:function(e){if(e)return new r.Hover(function(e){if(o.string(e))return D(e);if(v.is(e))return D().appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=D();v.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}return D(e)}(e.contents),C(e.range))},asCompletionResult:async function(e,t,n){if(!e)return;if(Array.isArray(e))return s.map(e,(e=>I(e,t)),n);const o=e,{defaultRange:a,commitCharacters:c}=function(e,t){const n=e.itemDefaults?.editRange,r=e.itemDefaults?.commitCharacters??t;return i.Range.is(n)?{defaultRange:C(n),commitCharacters:r}:void 0!==n?{defaultRange:{inserting:C(n.insert),replacing:C(n.replace)},commitCharacters:r}:{defaultRange:void 0,commitCharacters:r}}(o,t),u=await s.map(o.items,(e=>I(e,c,a,o.itemDefaults?.insertTextMode,o.itemDefaults?.insertTextFormat,o.itemDefaults?.data)),n);return new r.CompletionList(u,o.isIncomplete)},asCompletionItem:I,asTextEdit:O,asTextEdits:x,asSignatureHelp:async function(e,t){if(!e)return;let n=new r.SignatureHelp;return o.number(e.activeSignature)?n.activeSignature=e.activeSignature:n.activeSignature=0,o.number(e.activeParameter)?n.activeParameter=e.activeParameter:n.activeParameter=0,e.signatures&&(n.signatures=await k(e.signatures,t)),n},asSignatureInformations:k,asSignatureInformation:N,asParameterInformations:M,asParameterInformation:L,asDeclarationResult:async function(e,t){if(e)return F(e,t)},asDefinitionResult:async function(e,t){if(e)return F(e,t)},asLocation:j,asReferences:async function(e,t){if(e)return s.map(e,j,t)},asDocumentHighlights:async function(e,t){if(e)return s.map(e,H,t)},asDocumentHighlight:H,asDocumentHighlightKind:U,asSymbolKind:$,asSymbolTag:V,asSymbolTags:B,asSymbolInformations:async function(e,t){if(e)return s.map(e,G,t)},asSymbolInformation:G,asDocumentSymbols:async function(e,t){if(null!=e)return s.map(e,K,t)},asDocumentSymbol:K,asCommand:z,asCommands:async function(e,t){if(e)return s.map(e,z,t)},asCodeAction:Q,asCodeActionKind:Y,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>Y(e)))},asCodeActionResult:function(e,t){return s.mapAsync(e,(async e=>i.Command.is(e)?z(e):Q(e,t)),t)},asCodeLens:J,asCodeLenses:async function(e,t){if(e)return s.map(e,J,t)},asWorkspaceEdit:Z,asDocumentLink:ee,asDocumentLinks:async function(e,t){if(e)return s.map(e,ee,t)},asFoldingRangeKind:ie,asFoldingRange:oe,asFoldingRanges:async function(e,t){if(e)return s.map(e,oe,t)},asColor:te,asColorInformation:ne,asColorInformations:async function(e,t){if(e)return s.map(e,ne,t)},asColorPresentation:re,asColorPresentations:async function(e,t){if(e)return s.map(e,re,t)},asSelectionRange:se,asSelectionRanges:async function(e,t){return Array.isArray(e)?s.map(e,se,t):[]},asInlineValue:ae,asInlineValues:async function(e,t){return Array.isArray(e)?s.map(e,ae,t):[]},asInlayHint:ce,asInlayHints:async function(e,t){if(Array.isArray(e))return s.mapAsync(e,ce,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new r.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:fe,asSemanticTokensEdits:async function(e,t){if(null!=e)return new r.SemanticTokensEdits(e.edits.map(fe),e.resultId)},asCallHierarchyItem:de,asCallHierarchyItems:async function(e,t){if(null!==e)return s.map(e,de,t)},asCallHierarchyIncomingCall:pe,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,pe,t)},asCallHierarchyOutgoingCall:he,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,he,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new r.LinkedEditingRanges(await T(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:ge,asTypeHierarchyItems:async function(e,t){if(null!==e)return s.map(e,ge,t)},asGlobPattern:function(e){if(o.string(e))return e;if(i.RelativePattern.is(e)){if(i.URI.is(e.baseUri))return new r.RelativePattern(_(e.baseUri),e.pattern);if(i.WorkspaceFolder.is(e.baseUri)){const t=r.workspace.getWorkspaceFolder(_(e.baseUri.uri));return void 0!==t?new r.RelativePattern(t,e.pattern):void 0}}}}}},6965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const r=n(7549),i=n(2116);(t.DiagnosticCode||(t.DiagnosticCode={})).is=function(e){const t=e;return null!=t&&(i.number(t.value)||i.string(t.value))&&i.string(t.target)};class o extends r.Diagnostic{constructor(e,t,n,r){super(e,t,n),this.data=r,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=o},8552:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.DocumentLink{constructor(e,t){super(e,t)}}t.default=i},134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.InlayHint{constructor(e,t,n){super(e,t,n)}}t.default=i},9551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.TypeHierarchyItem{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,o),void 0!==s&&(this.data=s)}}t.default=i},6832:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.SymbolInformation{constructor(e,t,n,i,o){const s=!(i instanceof r.Uri);super(e,t,n,s?i:new r.Location(i,new r.Range(0,0,0,0))),this.hasRange=s,void 0!==o&&(this.data=o)}}t.default=i},9929:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.ReferencesRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideReferences:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),r).then((e=>r.isCancellationRequested?null:o.protocol2CodeConverter.asReferences(e,r)),(e=>o.handleFailedRequest(i.ReferencesRequest.type,r,e,null))),a=o.middleware;return a.provideReferences?a.provideReferences(e,t,n,r,s):s(e,t,n,r)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=a},2865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const r=n(7549),i=n(7745),o=n(7435),s=n(2116),a=n(497);class c extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.RenameRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=i.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(s.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:o.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t=e.documentSelector,n={provideRenameEdits:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(i.RenameRequest.type,s,r).then((e=>r.isCancellationRequested?null:o.protocol2CodeConverter.asWorkspaceEdit(e,r)),(e=>o.handleFailedRequest(i.RenameRequest.type,r,e,null,!1)))},a=o.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,r,s):s(e,t,n,r)},prepareRename:e.prepareProvider?(e,t,n)=>{const r=this._client,o=(e,t,n)=>{let o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t)};return r.sendRequest(i.PrepareRenameRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.Range.is(e)?r.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&i.Range.is(e.range)?{range:r.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed."))),(e=>{throw"string"==typeof e.message?new Error(e.message):new Error("The element can't be renamed.")}))},s=r.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&s.boolean(t.defaultBehavior)}}t.RenameFeature=c},9314:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.selectionRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideSelectionRanges:(e,t,n)=>{const r=this._client,o=async(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:await r.code2ProtocolConverter.asPositions(t,n)};return r.sendRequest(i.SelectionRangeRequest.type,o,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asSelectionRanges(e,n)),(e=>r.handleFailedRequest(i.SelectionRangeRequest.type,n,e,null)))},s=r.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.SelectionRangeFeature=s},1845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(2116);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[i.SemanticTokenTypes.namespace,i.SemanticTokenTypes.type,i.SemanticTokenTypes.class,i.SemanticTokenTypes.enum,i.SemanticTokenTypes.interface,i.SemanticTokenTypes.struct,i.SemanticTokenTypes.typeParameter,i.SemanticTokenTypes.parameter,i.SemanticTokenTypes.variable,i.SemanticTokenTypes.property,i.SemanticTokenTypes.enumMember,i.SemanticTokenTypes.event,i.SemanticTokenTypes.function,i.SemanticTokenTypes.method,i.SemanticTokenTypes.macro,i.SemanticTokenTypes.keyword,i.SemanticTokenTypes.modifier,i.SemanticTokenTypes.comment,i.SemanticTokenTypes.string,i.SemanticTokenTypes.number,i.SemanticTokenTypes.regexp,i.SemanticTokenTypes.operator,i.SemanticTokenTypes.decorator],t.tokenModifiers=[i.SemanticTokenModifiers.declaration,i.SemanticTokenModifiers.definition,i.SemanticTokenModifiers.readonly,i.SemanticTokenModifiers.static,i.SemanticTokenModifiers.deprecated,i.SemanticTokenModifiers.abstract,i.SemanticTokenModifiers.async,i.SemanticTokenModifiers.modification,i.SemanticTokenModifiers.documentation,i.SemanticTokenModifiers.defaultLibrary],t.formats=[i.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,o.ensure)((0,o.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.SemanticTokensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()}));const[n,r]=this.getRegistration(t,e.semanticTokensProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n=s.boolean(e.full)?e.full:void 0!==e.full,o=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,a=new r.EventEmitter,c=n?{onDidChangeSemanticTokens:a.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,r=n.middleware,o=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(i.SemanticTokensRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,t)),(e=>n.handleFailedRequest(i.SemanticTokensRequest.type,t,e,null)))};return r.provideDocumentSemanticTokens?r.provideDocumentSemanticTokens(e,t,o):o(e,t)},provideDocumentSemanticTokensEdits:o?(e,t,n)=>{const r=this._client,o=r.middleware,s=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return r.sendRequest(i.SemanticTokensDeltaRequest.type,o,n).then((async e=>n.isCancellationRequested?null:i.SemanticTokens.is(e)?await r.protocol2CodeConverter.asSemanticTokens(e,n):await r.protocol2CodeConverter.asSemanticTokensEdits(e,n)),(e=>r.handleFailedRequest(i.SemanticTokensDeltaRequest.type,n,e,null)))};return o.provideDocumentSemanticTokensEdits?o.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,u=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const r=this._client,o=r.middleware,s=(e,t,n)=>{const o={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t)};return r.sendRequest(i.SemanticTokensRangeRequest.type,o,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asSemanticTokens(e,n)),(e=>r.handleFailedRequest(i.SemanticTokensRangeRequest.type,n,e,null)))};return o.provideDocumentRangeSemanticTokens?o.provideDocumentRangeSemanticTokens(e,t,n,s):s(e,t,n)}}:void 0,l=[],d=this._client,p=d.protocol2CodeConverter.asSemanticTokensLegend(e.legend),h=d.protocol2CodeConverter.asDocumentSelector(t);return void 0!==c&&l.push(r.languages.registerDocumentSemanticTokensProvider(h,c,p)),void 0!==u&&l.push(r.languages.registerDocumentRangeSemanticTokensProvider(h,u,p)),[new r.Disposable((()=>l.forEach((e=>e.dispose())))),{range:u,full:c,onDidChangeSemanticTokensEmitter:a}]}}t.SemanticTokensFeature=a},1432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(7435);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,r)=>{const o=this._client,s=(e,t,n,r)=>o.sendRequest(i.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),r).then((e=>r.isCancellationRequested?null:o.protocol2CodeConverter.asSignatureHelp(e,r)),(e=>o.handleFailedRequest(i.SignatureHelpRequest.type,r,e,null))),a=o.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,r,n,s):s(e,t,r,n)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){const n=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(void 0===e.retriggerCharacters){const i=e.triggerCharacters||[];return r.languages.registerSignatureHelpProvider(n,t,...i)}{const i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return r.languages.registerSignatureHelpProvider(n,t,i)}}}t.SignatureHelpFeature=a},5610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(8005),a=n(7435);class c extends o.TextDocumentEventFeature{constructor(e,t){super(e,r.workspace.onDidOpenTextDocument,i.DidOpenTextDocumentNotification.type,(()=>e.middleware.didOpen),(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),(e=>e),o.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return i.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);r.workspace.textDocuments.forEach((e=>{const n=e.uri.toString();if(!this._syncedDocuments.has(n)&&r.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const t=this._client.middleware,r=e=>this._client.sendNotification(this._type,this._createParams(e));(t.didOpen?t.didOpen(e,r):r(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._syncedDocuments.set(n,e)}}))}notificationSent(e,t,n){super.notificationSent(e,t,n),this._syncedDocuments.set(e.uri.toString(),e)}}t.DidOpenTextDocumentFeature=c;class u extends o.TextDocumentEventFeature{constructor(e,t){super(e,r.workspace.onDidCloseTextDocument,i.DidCloseTextDocumentNotification.type,(()=>e.middleware.didClose),(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),(e=>e),o.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get registrationType(){return i.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}notificationSent(e,t,n){super.notificationSent(e,t,n),this._syncedDocuments.delete(e.uri.toString())}unregister(e){const t=this._selectors.get(e);super.unregister(e);const n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(r.languages.match(t,e)>0&&!this._selectorFilter(n,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){let t=this._client.middleware,n=e=>this._client.sendNotification(this._type,this._createParams(e));this._syncedDocuments.delete(e.uri.toString()),(t.didClose?t.didClose(e,n):n(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}))}}))}}t.DidCloseTextDocumentFeature=u;class l extends o.DynamicDocumentFeature{constructor(e){super(e),this._forcingDelivery=!1,this._changeData=new Map,this._onNotificationSent=new r.EventEmitter}get registrationType(){return i.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==i.TextDocumentSyncKind.None&&this.register({id:a.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}))}*getDocumentSelectors(){for(const e of this._changeData.values())yield e.documentSelector}async callback(e){if(0===e.contentChanges.length)return;const t=[];for(const n of this._changeData.values())if(r.languages.match(n.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const r=this._client.middleware;if(n.syncKind===i.TextDocumentSyncKind.Incremental){const n=async e=>{const t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);await this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t),this.notificationSent(e,i.DidChangeTextDocumentNotification.type,t)};t.push(r.didChange?r.didChange(e,(e=>n(e))):n(e))}else if(n.syncKind===i.TextDocumentSyncKind.Full){const n=async e=>{const t=async e=>{const t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document);await this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t),this.notificationSent(e,i.DidChangeTextDocumentNotification.type,t)};return this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(await this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger((()=>t(e)))):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new s.Delayer(200)},this._changeDelayer.delayer.trigger((()=>t(e)),-1))};t.push(r.didChange?r.didChange(e,(e=>n(e))):n(e))}}return Promise.all(t).then(void 0,(e=>{throw this._client.error(`Sending document notification ${i.DidChangeTextDocumentNotification.type.method} failed`,e),e}))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({original:e,type:t,params:n})}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){void 0!==this._changeDelayer&&this._changeDelayer.delayer.cancel(),this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}async forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{return this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}getProvider(e){for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}}t.DidChangeTextDocumentFeature=l;class d extends o.TextDocumentEventFeature{constructor(e){super(e,r.workspace.onWillSaveTextDocument,i.WillSaveTextDocumentNotification.type,(()=>e.middleware.willSave),(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),(e=>e.document),((e,t)=>o.TextDocumentEventFeature.textDocumentFilter(e,t.document)))}get registrationType(){return i.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}}t.WillSaveFeature=d;class p extends o.DynamicDocumentFeature{constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return i.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(o.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,n=e=>this._client.sendRequest(i.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((async e=>{let t=await this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}t.WillSaveWaitUntilFeature=p;class h extends o.TextDocumentEventFeature{constructor(e){super(e,r.workspace.onDidSaveTextDocument,i.DidSaveTextDocumentNotification.type,(()=>e.middleware.didSave),(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),(e=>e),o.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return i.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:a.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}}t.DidSaveTextDocumentFeature=h},7201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.typeDefinitionProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideTypeDefinition:(e,t,n)=>{const r=this._client,o=(e,t,n)=>r.sendRequest(i.TypeDefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>r.handleFailedRequest(i.TypeDefinitionRequest.type,n,e,null))),s=r.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.TypeDefinitionFeature=s},4042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(7549),i=n(7745),o=n(497);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){const r=this.client,o=this.middleware,s=(e,t,n)=>{const o=r.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return r.sendRequest(i.TypeHierarchyPrepareRequest.type,o,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(e,n)),(e=>r.handleFailedRequest(i.TypeHierarchyPrepareRequest.type,n,e,null)))};return o.prepareTypeHierarchy?o.prepareTypeHierarchy(e,t,n,s):s(e,t,n)}provideTypeHierarchySupertypes(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(i.TypeHierarchySupertypesRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(i.TypeHierarchySupertypesRequest.type,t,e,null)))};return r.provideTypeHierarchySupertypes?r.provideTypeHierarchySupertypes(e,t,o):o(e,t)}provideTypeHierarchySubtypes(e,t){const n=this.client,r=this.middleware,o=(e,t)=>{const r={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(i.TypeHierarchySubtypesRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(i.TypeHierarchySubtypesRequest.type,t,e,null)))};return r.provideTypeHierarchySubtypes?r.provideTypeHierarchySubtypes(e,t,o):o(e,t)}}class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"typeHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.typeHierarchyProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[r.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.TypeHierarchyFeature=a},8005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=t.mapAsync=t.map=t.Semaphore=t.Delayer=void 0;const r=n(7745);t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=(0,r.RAL)().timer.setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(this.timeout.dispose(),this.timeout=void 0)}},t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.RAL)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};class i{constructor(e=15){this.yieldAfter=Math.max(e,15),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){const e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=2*this.total}}return!1}}t.map=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new i(o?.yieldAfter);function c(n){a.start();for(let r=n;r<e.length;r++)if(s[r]=t(e[r]),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),r+1;return-1}let u=c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,r.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.mapAsync=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new i(o?.yieldAfter);async function c(r){a.start();for(let i=r;i<e.length;i++)if(s[i]=await t(e[i],n),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),i+1;return-1}let u=await c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,r.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.forEach=async function(e,t,n,o){if(0===e.length)return;const s=new i(o?.yieldAfter);function a(n){s.start();for(let r=n;r<e.length;r++)if(t(e[r]),s.shouldYield())return o?.yieldCallback&&o.yieldCallback(),r+1;return-1}let c=a(0);for(;-1!==c&&(void 0===n||!n.isCancellationRequested);)c=await new Promise((e=>{(0,r.RAL)().timer.setImmediate((()=>{e(a(c))}))}))}},2116:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function i(e){return Array.isArray(e)}function o(e){return e&&r(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=o,t.asPromise=function(e){return e instanceof Promise?e:o(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}},7435:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function i(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=i;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return i().asHex()}},5828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const r=n(7435),i=n(7549),o=n(7745);function s(e,t){if(void 0!==e)return e[t]}function a(e,t){return e.filter((e=>t.indexOf(e)<0))}t.arrayDiff=a,t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=i.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,(e=>{const n=()=>{const e=i.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},r=t.middleware.workspace;return r&&r.workspaceFolders?r.workspaceFolders(e,n):n()}));const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=r.generateUuid()),a&&this.register({id:a,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const n=a(this._initialFolders,e),r=a(e,this._initialFolders);(r.length>0||n.length>0)&&(t=this.doSendEvent(r,n))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));void 0!==t&&t.catch((e=>{this._client.error(`Sending notification ${o.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}doSendEvent(e,t){let n={event:{added:e.map((e=>this.asProtocol(e))),removed:t.map((e=>this.asProtocol(e)))}};return this._client.sendNotification(o.DidChangeWorkspaceFoldersNotification.type,n)}register(e){let t=e.id,n=this._client,r=i.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>this.doSendEvent(e.added,e.removed),r=n.middleware.workspace;(r&&r.didChangeWorkspaceFolders?r.didChangeWorkspaceFolders(e,t):t(e)).catch((e=>{this._client.error(`Sending notification ${o.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}));this._listeners.set(t,r),this.sendInitialEvent(i.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},8447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const r=n(7549),i=n(7745),o=n(497),s=n(1690),a=n(7435);class c extends o.WorkspaceFeature{constructor(e){super(e,i.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:s.SupportedSymbolKinds},t.tagSupport={valueSet:s.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:a.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.WorkspaceSymbolRequest.type,{query:e},t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformations(e,t)),(e=>n.handleFailedRequest(i.WorkspaceSymbolRequest.type,t,e,null))),o=n.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,r):r(e,t)},resolveWorkspaceSymbol:!0===e.resolveProvider?(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.WorkspaceSymbolResolveRequest.type,n.code2ProtocolConverter.asWorkspaceSymbol(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformation(e)),(e=>n.handleFailedRequest(i.WorkspaceSymbolResolveRequest.type,t,e,null))),o=n.middleware;return o.resolveWorkspaceSymbol?o.resolveWorkspaceSymbol(e,t,r):r(e,t)}:void 0};return[r.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=c},3932:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMonitor=t.LanguageClient=t.TransportKind=void 0;const o=n(3129),s=n(5747),a=n(5622),c=n(8873),u=n(7549),l=n(2116),d=n(5760),p=n(6359),h=n(4057);i(n(4057),t),i(n(9562),t);var f,g,m,v,y,_;!function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(f=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){const t=e;return t&&t.kind===f.socket&&l.number(t.port)}}(g||(g={})),function(e){e.is=function(e){return l.string(e.command)}}(m||(m={})),function(e){e.is=function(e){return l.string(e.module)}}(v||(v={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(y||(y={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(_||(_={}));class b extends d.BaseLanguageClient{constructor(e,t,n,r,i){let o,s,a,c,u;l.string(t)?(o=e,s=t,a=n,c=r,u=!!i):(o=e.toLowerCase(),s=e,a=t,c=n,u=r),void 0===u&&(u=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=u,this._isInDebugMode=u;try{this.checkVersion()}catch(e){throw l.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){const e=c.parse(u.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${u.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!c.satisfies(e,"^1.67.0"))throw new Error(`The language client requires VS Code version ^1.67.0 but received version ${u.version}`)}get isInDebugMode(){return this._isInDebugMode}async restart(){await this.stop(),this.isInDebugMode?(await new Promise((e=>setTimeout(e,1e3))),await this.start()):await this.start()}stop(e=2e3){return super.stop(e).finally((()=>{if(this._serverProcess){const e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}}))}checkProcessDied(e){e&&void 0!==e.pid&&setTimeout((()=>{try{void 0!==e.pid&&(process.kill(e.pid,0),(0,p.terminate)(e))}catch(e){}}),2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),null===e.processId&&(e.processId=process.pid)}createMessageTransports(e){function t(e,t){if(!e&&!t)return;const n=Object.create(null);return Object.keys(process.env).forEach((e=>n[e]=process.env[e])),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach((t=>n[t]=e[t])),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],r=["--debug","--debug-brk","--inspect","--inspect-brk"];function i(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}const s=this._serverOptions;if(l.func(s))return s().then((t=>{if(d.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(y.is(t))return this._isDetached=!!t.detached,{reader:new h.StreamMessageReader(t.reader),writer:new h.StreamMessageWriter(t.writer)};{let n;return _.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),{reader:new h.StreamMessageReader(n.stdout),writer:new h.StreamMessageWriter(n.stdin)}}}));let a,c=s;return c.run||c.debug?this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some((e=>n.some((t=>e.startsWith(t)))||r.some((t=>e===t))))}()?(a=c.debug,this._isInDebugMode=!0):(a=c.run,this._isInDebugMode=!1):a=s,this._getServerWorkingDir(a.options).then((n=>{if(v.is(a)&&a.module){let r=a,s=r.transport||f.stdio;if(!r.runtime){let a;return new Promise(((c,u)=>{const d=(r.args&&r.args.slice())??[];s===f.ipc?d.push("--node-ipc"):s===f.stdio?d.push("--stdio"):s===f.pipe?(a=(0,h.generateRandomPipeName)(),d.push(`--pipe=${a}`)):g.isSocket(s)&&d.push(`--socket=${s.port}`),d.push(`--clientProcessId=${process.pid.toString()}`);const p=r.options??Object.create(null);if(p.env=t(p.env,!0),p.execArgv=p.execArgv||[],p.cwd=n,p.silent=!0,s===f.ipc||s===f.stdio){const t=o.fork(r.module,d||[],p);i(t),this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),s===f.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),c({reader:new h.IPCMessageReader(this._serverProcess),writer:new h.IPCMessageWriter(this._serverProcess)})):c({reader:new h.StreamMessageReader(t.stdout),writer:new h.StreamMessageWriter(t.stdin)})}else s===f.pipe?(0,h.createClientPipeTransport)(a).then((t=>{const n=o.fork(r.module,d||[],p);i(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{c({reader:e[0],writer:e[1]})}),u)}),u):g.isSocket(s)&&(0,h.createClientSocketTransport)(s.port).then((t=>{const n=o.fork(r.module,d||[],p);i(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{c({reader:e[0],writer:e[1]})}),u)}),u)}))}{const i=[],a=r.options??Object.create(null);a.execArgv&&a.execArgv.forEach((e=>i.push(e))),i.push(r.module),r.args&&r.args.forEach((e=>i.push(e)));const c=Object.create(null);c.cwd=n,c.env=t(a.env,!1);const u=this._getRuntimePath(r.runtime,n);let d;if(s===f.ipc?(c.stdio=[null,null,null,"ipc"],i.push("--node-ipc")):s===f.stdio?i.push("--stdio"):s===f.pipe?(d=(0,h.generateRandomPipeName)(),i.push(`--pipe=${d}`)):g.isSocket(s)&&i.push(`--socket=${s.port}`),i.push(`--clientProcessId=${process.pid.toString()}`),s===f.ipc||s===f.stdio){const t=o.spawn(u,i,c);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),s===f.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),Promise.resolve({reader:new h.IPCMessageReader(t),writer:new h.IPCMessageWriter(t)})):Promise.resolve({reader:new h.StreamMessageReader(t.stdout),writer:new h.StreamMessageWriter(t.stdin)})):S(t,`Launching server using runtime ${u} failed.`)}if(s===f.pipe)return(0,h.createClientPipeTransport)(d).then((t=>{const n=o.spawn(u,i,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):S(n,`Launching server using runtime ${u} failed.`)}));if(g.isSocket(s))return(0,h.createClientSocketTransport)(s.port).then((t=>{const n=o.spawn(u,i,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):S(n,`Launching server using runtime ${u} failed.`)}))}}else if(m.is(a)&&a.command){const t=a,r=void 0!==a.args?a.args.slice(0):[];let i;const s=a.transport;if(s===f.stdio)r.push("--stdio");else if(s===f.pipe)i=(0,h.generateRandomPipeName)(),r.push(`--pipe=${i}`);else if(g.isSocket(s))r.push(`--socket=${s.port}`);else if(s===f.ipc)throw new Error("Transport kind ipc is not support for command executable");const c=Object.assign({},t.options);if(c.cwd=c.cwd||n,void 0===s||s===f.stdio){const n=o.spawn(t.command,r,c);return n&&n.pid?(n.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),this._serverProcess=n,this._isDetached=!!c.detached,Promise.resolve({reader:new h.StreamMessageReader(n.stdout),writer:new h.StreamMessageWriter(n.stdin)})):S(n,`Launching server using command ${t.command} failed.`)}if(s===f.pipe)return(0,h.createClientPipeTransport)(i).then((n=>{const i=o.spawn(t.command,r,c);return i&&i.pid?(this._serverProcess=i,this._isDetached=!!c.detached,i.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):S(i,`Launching server using command ${t.command} failed.`)}));if(g.isSocket(s))return(0,h.createClientSocketTransport)(s.port).then((n=>{const i=o.spawn(t.command,r,c);return i&&i.pid?(this._serverProcess=i,this._isDetached=!!c.detached,i.stderr.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(l.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):S(i,`Launching server using command ${t.command} failed.`)}))}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(s,null,4)))}))}_getRuntimePath(e,t){if(a.isAbsolute(e))return e;const n=this._mainGetRootPath();if(void 0!==n){const t=a.join(n,e);if(s.existsSync(t))return t}if(void 0!==t){const n=a.join(t,e);if(s.existsSync(n))return n}return e}_mainGetRootPath(){let e=u.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise((e=>{s.lstat(t,((n,r)=>{e(!n&&r.isDirectory()?t:void 0)}))})):Promise.resolve(void 0)}getLocale(){const e=process.env.VSCODE_NLS_CONFIG;if(void 0===e)return"en";let t;try{t=JSON.parse(e)}catch(e){}return void 0===t||"string"!=typeof t.locale?"en":t.locale}}function S(e,t){return null===e?Promise.reject(t):new Promise(((n,r)=>{e.on("error",(e=>{r(`${t} ${e}`)})),setImmediate((()=>r(t)))}))}t.LanguageClient=b,t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return u.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new u.Disposable((()=>{this._client.needsStop()&&this._client.stop()}))}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,r=n?u.workspace.getConfiguration(t).get(n,!1):u.workspace.getConfiguration(t);r&&this._client.needsStart()?this._client.start().catch((e=>this._client.error("Start failed after configuration change",e,"force"))):!r&&this._client.needsStop()&&this._client.stop().catch((e=>this._client.error("Stop failed after configuration change",e,"force")))}}},6359:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.terminate=void 0;const r=n(3129),i=n(5622),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(e,t){if(o)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),r.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!a&&!s)return e.kill("SIGKILL"),!0;try{var n=(0,i.join)(__dirname,"terminateProcess.sh");return!r.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},1457:(e,t,n)=>{"use strict";e.exports=n(3932)},559:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(1694),t),i(n(2880),t),i(n(4742),t),i(n(7304),t);var o,s=n(7558);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),(o=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,o.RequestFailed=-32803,o.ServerCancelled=-32802,o.ContentModified=-32801,o.RequestCancelled=-32800,o.lspReservedErrorRangeEnd=-32800},7558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(1694);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},4742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const r=n(1694);t.RegistrationType=class{constructor(e){this.method=e}};class i extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=a},2565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(4742);var i,o,s;(s=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",s.type=new r.ProtocolRequestType(s.method),(o=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",o.type=new r.ProtocolRequestType(o.method),(i=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",i.type=new r.ProtocolRequestType(i.method)},5509:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(4742);var i;(i=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",i.type=new r.ProtocolRequestType(i.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new r.ProtocolRequestType("textDocument/colorPresentation")},7296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(4742);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new r.ProtocolRequestType("workspace/configuration")},9137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(4742);var i;(i=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",i.type=new r.ProtocolRequestType(i.method)},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(1694),i=n(9348),o=n(4742);var s,a,c,u;(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})).is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)},(u=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})).Full="full",u.Unchanged="unchanged",(c=t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})).method="textDocument/diagnostic",c.type=new o.ProtocolRequestType(c.method),c.partialResult=new r.ProgressType,(a=t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})).method="workspace/diagnostic",a.type=new o.ProtocolRequestType(a.method),a.partialResult=new r.ProgressType,(s=t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={})).method="workspace/diagnostic/refresh",s.type=new o.ProtocolRequestType0(s.method)},2235:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(4742);var i,o,s,a,c,u,l;(l=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",l.folder="folder",(u=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",u.type=new r.ProtocolRequestType(u.method),(c=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",c.type=new r.ProtocolNotificationType(c.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.type=new r.ProtocolRequestType(a.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.type=new r.ProtocolNotificationType(s.method),(o=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",o.type=new r.ProtocolNotificationType(o.method),(i=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",i.type=new r.ProtocolRequestType(i.method)},5171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const r=n(4742);var i;(i=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",i.type=new r.ProtocolRequestType(i.method)},2441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(4742);var i;(i=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",i.type=new r.ProtocolRequestType(i.method)},4248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(4742);var i,o,s;(s=t.InlayHintRequest||(t.InlayHintRequest={})).method="textDocument/inlayHint",s.type=new r.ProtocolRequestType(s.method),(o=t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})).method="inlayHint/resolve",o.type=new r.ProtocolRequestType(o.method),(i=t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={})).method="workspace/inlayHint/refresh",i.type=new r.ProtocolRequestType0(i.method)},1557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(4742);var i,o;(o=t.InlineValueRequest||(t.InlineValueRequest={})).method="textDocument/inlineValue",o.type=new r.ProtocolRequestType(o.method),(i=t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={})).method="workspace/inlineValue/refresh",i.type=new r.ProtocolRequestType0(i.method)},7304:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=void 0;const r=n(4742),i=n(2880),o=n(9348),s=n(2441);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(8685);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(6098);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const u=n(7296);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(5509);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const d=n(5171);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}});const p=n(9137);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return p.DeclarationRequest}});const h=n(2964);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const f=n(7450);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const g=n(2565);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return g.CallHierarchyPrepareRequest}});const m=n(5402);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return m.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return m.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return m.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return m.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return m.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return m.SemanticTokensRegistrationType}});const v=n(903);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return v.ShowDocumentRequest}});const y=n(7323);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const _=n(2235);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return _.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return _.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return _.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return _.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return _.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return _.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return _.WillDeleteFilesRequest}});const b=n(9219);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return b.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return b.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return b.MonikerRequest}});const S=n(9970);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return S.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return S.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return S.TypeHierarchySupertypesRequest}});const E=n(1557);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return E.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return E.InlineValueRefreshRequest}});const C=n(4248);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return C.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return C.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return C.InlayHintRefreshRequest}});const T=n(8338);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return T.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return T.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return T.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return T.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return T.DiagnosticRefreshRequest}});const R=n(5626);var w,D,P,I,O,x,A,k,N,M,L,j,q,F,H,U,$,V,B,G,K,W,z,X,Y,Q,J,Z,ee,te,ne,re,ie,oe,se,ae,ce,ue,le,de,pe,he,fe,ge;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return R.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return R.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return R.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return R.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return R.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return R.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidCloseNotebookDocumentNotification}}),function(e){e.is=function(e){const t=e;return o.string(t.language)||o.string(t.scheme)||o.string(t.pattern)}}(w=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(o.string(t.notebookType)||o.string(t.scheme)||o.string(t.pattern))}}(D=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(o.string(t.notebook)||D.is(t.notebook))&&(void 0===t.language||o.string(t.language))}}(P=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!o.string(t)&&!w.is(t)&&!P.is(t))return!1;return!0}}(I=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new r.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new r.ProtocolRequestType("client/unregisterCapability"),(ge=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",ge.Rename="rename",ge.Delete="delete",(fe=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",fe.Transactional="transactional",fe.TextOnlyTransactional="textOnlyTransactional",fe.Undo="undo",(he=t.PositionEncodingKind||(t.PositionEncodingKind={})).UTF8="utf-8",he.UTF16="utf-16",he.UTF32="utf-32",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&o.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||I.is(t.documentSelector))},(pe=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return o.objectLiteral(t)&&(void 0===t.workDoneProgress||o.boolean(t.workDoneProgress))},pe.hasWorkDoneProgress=function(e){const t=e;return t&&o.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new r.ProtocolRequestType("initialize"),(t.InitializeErrorCodes||(t.InitializeErrorCodes={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new r.ProtocolNotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new r.ProtocolRequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new r.ProtocolNotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new r.ProtocolNotificationType("workspace/didChangeConfiguration"),(de=t.MessageType||(t.MessageType={})).Error=1,de.Warning=2,de.Info=3,de.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new r.ProtocolNotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new r.ProtocolRequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new r.ProtocolNotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new r.ProtocolNotificationType("telemetry/event"),(le=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,le.Full=1,le.Incremental=2,(ue=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ue.type=new r.ProtocolNotificationType(ue.method),(ce=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},ce.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(ae=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",ae.type=new r.ProtocolNotificationType(ae.method),(se=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",se.type=new r.ProtocolNotificationType(se.method),(oe=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",oe.type=new r.ProtocolNotificationType(oe.method),(ie=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,ie.AfterDelay=2,ie.FocusOut=3,(re=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",re.type=new r.ProtocolNotificationType(re.method),(ne=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",ne.type=new r.ProtocolRequestType(ne.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new r.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(te=t.FileChangeType||(t.FileChangeType={})).Created=1,te.Changed=2,te.Deleted=3,(t.RelativePattern||(t.RelativePattern={})).is=function(e){const t=e;return o.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&o.string(t.pattern)},(ee=t.WatchKind||(t.WatchKind={})).Create=1,ee.Change=2,ee.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new r.ProtocolNotificationType("textDocument/publishDiagnostics"),(Z=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,Z.TriggerCharacter=2,Z.TriggerForIncompleteCompletions=3,(J=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",J.type=new r.ProtocolRequestType(J.method),(Q=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",Q.type=new r.ProtocolRequestType(Q.method),(Y=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",Y.type=new r.ProtocolRequestType(Y.method),(X=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,X.TriggerCharacter=2,X.ContentChange=3,(z=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",z.type=new r.ProtocolRequestType(z.method),(W=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",W.type=new r.ProtocolRequestType(W.method),(K=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",K.type=new r.ProtocolRequestType(K.method),(G=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",G.type=new r.ProtocolRequestType(G.method),(B=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",B.type=new r.ProtocolRequestType(B.method),(V=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",V.type=new r.ProtocolRequestType(V.method),($=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",$.type=new r.ProtocolRequestType($.method),(U=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",U.type=new r.ProtocolRequestType(U.method),(H=t.WorkspaceSymbolResolveRequest||(t.WorkspaceSymbolResolveRequest={})).method="workspaceSymbol/resolve",H.type=new r.ProtocolRequestType(H.method),(F=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",F.type=new r.ProtocolRequestType(F.method),(q=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",q.type=new r.ProtocolRequestType(q.method),(j=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",j.type=new r.ProtocolRequestType0(j.method),(L=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",L.type=new r.ProtocolRequestType(L.method),(M=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",M.type=new r.ProtocolRequestType(M.method),(N=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",N.type=new r.ProtocolRequestType(N.method),(k=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",k.type=new r.ProtocolRequestType(k.method),(A=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",A.type=new r.ProtocolRequestType(A.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(x=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",x.type=new r.ProtocolRequestType(x.method),(O=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",O.type=new r.ProtocolRequestType(O.method),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new r.ProtocolRequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new r.ProtocolRequestType("workspace/applyEdit")},7323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(4742);var i;(i=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",i.type=new r.ProtocolRequestType(i.method)},9219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(4742);var i,o,s;(s=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global",(o=t.MonikerKind||(t.MonikerKind={})).$import="import",o.$export="export",o.local="local",(i=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",i.type=new r.ProtocolRequestType(i.method)},5626:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(2880),i=n(9348),o=n(4742);var s,a,c,u,l,d,p,h,f,g;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s=t.NotebookCellKind||(t.NotebookCellKind={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a=t.ExecutionSummary||(t.ExecutionSummary={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),o=Array.isArray(n);if(r!==o)return!1;if(r&&o){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}if(i.objectLiteral(e)&&i.objectLiteral(n)){const r=Object.keys(e),i=Object.keys(n);if(r.length!==i.length)return!1;if(r.sort(),i.sort(),!t(r,i))return!1;for(let i=0;i<r.length;i++){const o=r[i];if(!t(e[o],n[o]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return i.objectLiteral(t)&&s.is(t.kind)&&r.DocumentUri.is(t.document)&&(void 0===t.metadata||i.objectLiteral(t.metadata))},e.diff=function(e,n){const r=new Set;return e.document!==n.document&&r.add("document"),e.kind!==n.kind&&r.add("kind"),e.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(c=t.NotebookCell||(t.NotebookCell={})),(g=t.NotebookDocument||(t.NotebookDocument={})).create=function(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}},g.is=function(e){const t=e;return i.objectLiteral(t)&&i.string(t.uri)&&r.integer.is(t.version)&&i.typedArray(t.cells,c.is)},(f=t.NotebookDocumentSyncRegistrationType||(t.NotebookDocumentSyncRegistrationType={})).method="notebookDocument/sync",f.type=new o.RegistrationType(f.method),(h=t.DidOpenNotebookDocumentNotification||(t.DidOpenNotebookDocumentNotification={})).method="notebookDocument/didOpen",h.type=new o.ProtocolNotificationType(h.method),(p=t.NotebookCellArrayChange||(t.NotebookCellArrayChange={})).is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.start)&&r.uinteger.is(t.deleteCount)&&(void 0===t.cells||i.typedArray(t.cells,c.is))},p.create=function(e,t,n){const r={start:e,deleteCount:t};return void 0!==n&&(r.cells=n),r},(d=t.DidChangeNotebookDocumentNotification||(t.DidChangeNotebookDocumentNotification={})).method="notebookDocument/didChange",d.type=new o.ProtocolNotificationType(d.method),(l=t.DidSaveNotebookDocumentNotification||(t.DidSaveNotebookDocumentNotification={})).method="notebookDocument/didSave",l.type=new o.ProtocolNotificationType(l.method),(u=t.DidCloseNotebookDocumentNotification||(t.DidCloseNotebookDocumentNotification={})).method="notebookDocument/didClose",u.type=new o.ProtocolNotificationType(u.method)},7450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(1694),i=n(4742);var o,s,a;(a=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new r.ProgressType,a.is=function(e){return e===a.type},(s=t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).method="window/workDoneProgress/create",s.type=new i.ProtocolRequestType(s.method),(o=t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).method="window/workDoneProgress/cancel",o.type=new i.ProtocolNotificationType(o.method)},2964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(4742);var i;(i=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",i.type=new r.ProtocolRequestType(i.method)},5402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(4742);var i,o,s,a,c;(t.TokenFormat||(t.TokenFormat={})).Relative="relative",(c=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",c.type=new r.RegistrationType(c.method),(a=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",a.type=new r.ProtocolRequestType(a.method),(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.type=new r.ProtocolRequestType(s.method),(o=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",o.type=new r.ProtocolRequestType(o.method),(i=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",i.type=new r.ProtocolRequestType0(i.method)},903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(4742);var i;(i=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",i.type=new r.ProtocolRequestType(i.method)},8685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(4742);var i;(i=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",i.type=new r.ProtocolRequestType(i.method)},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(4742);var i,o,s;(s=t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})).method="textDocument/prepareTypeHierarchy",s.type=new r.ProtocolRequestType(s.method),(o=t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})).method="typeHierarchy/supertypes",o.type=new r.ProtocolRequestType(o.method),(i=t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={})).method="typeHierarchy/subtypes",i.type=new r.ProtocolRequestType(i.method)},6098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(4742);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new r.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new r.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")},9348:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},7745:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(2659);i(n(2659),t),i(n(559),t),t.createProtocolConnection=function(e,t,n,r){return(0,o.createMessageConnection)(e,t,n,r)}},4057:(e,t,n)=>{"use strict";e.exports=n(7745)},2880:(e,t,n)=>{"use strict";var r,i,o,s,a,c,u,l,d,p,h,f,g,m,v,y,_,b,S,E,C,T,R,w,D,P,I,O;n.r(t),n.d(t,{DocumentUri:()=>r,URI:()=>i,integer:()=>o,uinteger:()=>s,Position:()=>a,Range:()=>c,Location:()=>u,LocationLink:()=>l,Color:()=>d,ColorInformation:()=>p,ColorPresentation:()=>h,FoldingRangeKind:()=>f,FoldingRange:()=>g,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>v,DiagnosticTag:()=>y,CodeDescription:()=>_,Diagnostic:()=>b,Command:()=>S,TextEdit:()=>E,ChangeAnnotation:()=>C,ChangeAnnotationIdentifier:()=>T,AnnotatedTextEdit:()=>R,TextDocumentEdit:()=>w,CreateFile:()=>D,RenameFile:()=>P,DeleteFile:()=>I,WorkspaceEdit:()=>O,WorkspaceChange:()=>Ce,TextDocumentIdentifier:()=>x,VersionedTextDocumentIdentifier:()=>A,OptionalVersionedTextDocumentIdentifier:()=>k,TextDocumentItem:()=>N,MarkupKind:()=>M,MarkupContent:()=>L,CompletionItemKind:()=>j,InsertTextFormat:()=>q,CompletionItemTag:()=>F,InsertReplaceEdit:()=>H,InsertTextMode:()=>U,CompletionItemLabelDetails:()=>$,CompletionItem:()=>V,CompletionList:()=>B,MarkedString:()=>G,Hover:()=>K,ParameterInformation:()=>W,SignatureInformation:()=>z,DocumentHighlightKind:()=>X,DocumentHighlight:()=>Y,SymbolKind:()=>Q,SymbolTag:()=>J,SymbolInformation:()=>Z,WorkspaceSymbol:()=>ee,DocumentSymbol:()=>te,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeActionContext:()=>ie,CodeAction:()=>oe,CodeLens:()=>se,FormattingOptions:()=>ae,DocumentLink:()=>ce,SelectionRange:()=>ue,SemanticTokenTypes:()=>le,SemanticTokenModifiers:()=>de,SemanticTokens:()=>pe,InlineValueText:()=>he,InlineValueVariableLookup:()=>fe,InlineValueEvaluatableExpression:()=>ge,InlineValueContext:()=>me,InlayHintKind:()=>ve,InlayHintLabelPart:()=>ye,InlayHint:()=>_e,WorkspaceFolder:()=>be,EOL:()=>Re,TextDocument:()=>Te}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.uinteger(t.line)&&we.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(we.uinteger(e)&&we.uinteger(t)&&we.uinteger(n)&&we.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},e.is=function(e){var t=e;return we.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.range)&&(we.string(t.uri)||we.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.targetRange)&&we.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||we.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.numberRange(t.red,0,1)&&we.numberRange(t.green,0,1)&&we.numberRange(t.blue,0,1)&&we.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return we.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(p||(p={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.string(t.label)&&(we.undefined(t.textEdit)||E.is(t))&&(we.undefined(t.additionalTextEdits)||we.typedArray(t.additionalTextEdits,E.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,n,r,i,o){var s={startLine:e,endLine:t};return we.defined(n)&&(s.startCharacter=n),we.defined(r)&&(s.endCharacter=r),we.defined(i)&&(s.kind=i),we.defined(o)&&(s.collapsedText=o),s},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.uinteger(t.startLine)&&we.uinteger(t.startLine)&&(we.undefined(t.startCharacter)||we.uinteger(t.startCharacter))&&(we.undefined(t.endCharacter)||we.uinteger(t.endCharacter))&&(we.undefined(t.kind)||we.string(t.kind))}}(g||(g={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return we.defined(t)&&u.is(t.location)&&we.string(t.message)}}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(v||(v={})),function(e){e.Unnecessary=1,e.Deprecated=2}(y||(y={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(t)&&we.string(t.href)}}(_||(_={})),function(e){e.create=function(e,t,n,r,i,o){var s={range:e,message:t};return we.defined(n)&&(s.severity=n),we.defined(r)&&(s.code=r),we.defined(i)&&(s.source=i),we.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,n=e;return we.defined(n)&&c.is(n.range)&&we.string(n.message)&&(we.number(n.severity)||we.undefined(n.severity))&&(we.integer(n.code)||we.string(n.code)||we.undefined(n.code))&&(we.undefined(n.codeDescription)||we.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(we.string(n.source)||we.undefined(n.source))&&(we.undefined(n.relatedInformation)||we.typedArray(n.relatedInformation,m.is))}}(b||(b={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return we.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.title)&&we.string(t.command)}}(S||(S={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.string(t.newText)&&c.is(t.range)}}(E||(E={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return we.objectLiteral(t)&&we.string(t.label)&&(we.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(we.string(t.description)||void 0===t.description)}}(C||(C={})),function(e){e.is=function(e){var t=e;return we.string(t)}}(T||(T={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return E.is(t)&&(C.is(t.annotationId)||T.is(t.annotationId))}}(R||(R={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return we.defined(t)&&k.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&we.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||we.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||we.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}}(D||(D={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&we.string(t.oldUri)&&we.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||we.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||we.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&we.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||we.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||we.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}}(I||(I={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return we.string(e.kind)?D.is(e)||P.is(e)||I.is(e):w.is(e)})))}}(O||(O={}));var x,A,k,N,M,L,j,q,F,H,U,$,V,B,G,K,W,z,X,Y,Q,J,Z,ee,te,ne,re,ie,oe,se,ae,ce,ue,le,de,pe,he,fe,ge,me,ve,ye,_e,be,Se=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=E.insert(e,t):T.is(n)?(i=n,r=R.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=R.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=E.replace(e,t):T.is(n)?(i=n,r=R.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=R.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=E.del(e):T.is(t)?(r=t,n=R.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=R.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Ee=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(T.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),Ce=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ee(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(w.is(e)){var n=new Se(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Se(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(k.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new Se(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new Se(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Ee,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(C.is(t)||T.is(t)?r=t:n=t,void 0===r?i=D.create(e,n):(o=T.is(r)?r:this._changeAnnotations.manage(r),i=D.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(C.is(n)||T.is(n)?i=n:r=n,void 0===i?o=P.create(e,t,r):(s=T.is(i)?i:this._changeAnnotations.manage(i),o=P.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(C.is(t)||T.is(t)?r=t:n=t,void 0===r?i=I.create(e,n):(o=T.is(r)?r:this._changeAnnotations.manage(r),i=I.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.uri)}}(x||(x={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.uri)&&we.integer(t.version)}}(A||(A={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.uri)&&(null===t.version||we.integer(t.version))}}(k||(k={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return we.defined(t)&&we.string(t.uri)&&we.string(t.languageId)&&we.integer(t.version)&&we.string(t.text)}}(N||(N={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(M||(M={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(e)&&M.is(t.kind)&&we.string(t.value)}}(L||(L={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(j||(j={})),function(e){e.PlainText=1,e.Snippet=2}(q||(q={})),function(e){e.Deprecated=1}(F||(F={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&we.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(H||(H={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){var t=e;return t&&(we.string(t.detail)||void 0===t.detail)&&(we.string(t.description)||void 0===t.description)}}($||($={})),function(e){e.create=function(e){return{label:e}}}(V||(V={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(B||(B={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return we.string(t)||we.objectLiteral(t)&&we.string(t.language)&&we.string(t.value)}}(G||(G={})),function(e){e.is=function(e){var t=e;return!!t&&we.objectLiteral(t)&&(L.is(t.contents)||G.is(t.contents)||we.typedArray(t.contents,G.is))&&(void 0===e.range||c.is(e.range))}}(K||(K={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(W||(W={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return we.defined(t)&&(i.documentation=t),we.defined(n)?i.parameters=n:i.parameters=[],i}}(z||(z={})),function(e){e.Text=1,e.Read=2,e.Write=3}(X||(X={})),function(e){e.create=function(e,t){var n={range:e};return we.number(t)&&(n.kind=t),n}}(Y||(Y={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Q||(Q={})),function(e){e.Deprecated=1}(J||(J={})),function(e){e.create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}}(Z||(Z={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,r,i,o){var s={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&we.string(t.name)&&we.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||we.string(t.detail))&&(void 0===t.deprecated||we.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(re||(re={})),function(e){e.create=function(e,t,n){var r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){var t=e;return we.defined(t)&&we.typedArray(t.diagnostics,b.is)&&(void 0===t.only||we.typedArray(t.only,we.string))&&(void 0===t.triggerKind||t.triggerKind===re.Invoked||t.triggerKind===re.Automatic)}}(ie||(ie={})),function(e){e.create=function(e,t,n){var r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):S.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&we.string(t.title)&&(void 0===t.diagnostics||we.typedArray(t.diagnostics,b.is))&&(void 0===t.kind||we.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||S.is(t.command))&&(void 0===t.isPreferred||we.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))}}(oe||(oe={})),function(e){e.create=function(e,t){var n={range:e};return we.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.range)&&(we.undefined(t.command)||S.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return we.defined(t)&&we.uinteger(t.tabSize)&&we.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return we.defined(t)&&c.is(t.range)&&(we.undefined(t.target)||we.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return we.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ue||(ue={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(le||(le={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&we.string(t.text)}}(he||(he={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&we.boolean(t.caseSensitiveLookup)&&(we.string(t.variableName)||void 0===t.variableName)}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&(we.string(t.expression)||void 0===t.expression)}}(ge||(ge={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){var t=e;return we.defined(t)&&c.is(e.stoppedLocation)}}(me||(me={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){var t=e;return we.objectLiteral(t)&&(void 0===t.tooltip||we.string(t.tooltip)||L.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||S.is(t.command))}}(ye||(ye={})),function(e){e.create=function(e,t,n){var r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return we.objectLiteral(t)&&a.is(t.position)&&(we.string(t.label)||we.typedArray(t.label,ye.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||we.typedArray(t.textEdits,E.is)&&(void 0===t.tooltip||we.string(t.tooltip)||L.is(t.tooltip))&&(void 0===t.paddingLeft||we.boolean(t.paddingLeft))&&(void 0===t.paddingRight||we.boolean(t.paddingRight))}}(_e||(_e={})),function(e){e.is=function(e){var t=e;return we.objectLiteral(t)&&i.is(t.uri)&&we.string(t.name)}}(be||(be={}));var Te,Re=["\n","\r\n","\r"];!function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,i=e.slice(0,r),o=e.slice(r);t(i,n),t(o,n);for(var s=0,a=0,c=0;s<i.length&&a<o.length;){var u=n(i[s],o[a]);e[c++]=u<=0?i[s++]:o[a++]}for(;s<i.length;)e[c++]=i[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,r){return new De(e,t,n,r)},e.is=function(e){var t=e;return!!(we.defined(t)&&we.string(t.uri)&&(we.undefined(t.languageId)||we.string(t.languageId))&&we.uinteger(t.lineCount)&&we.func(t.getText)&&we.func(t.positionAt)&&we.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),i=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=r.length,s=i.length-1;s>=0;s--){var a=i[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=o))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(u,r.length),o=c}return r}}(Te||(Te={}));var we,De=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return a.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var o=n-1;return a.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(we||(we={}))},8544:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,i,o,s=n(2062);function a(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],i=n[r],o=e;return"string"==typeof i?o=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(o=String(i)),o}))}(o=t.MessageFormat||(t.MessageFormat={})).file="file",o.bundle="bundle",o.both="both",(i=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",i.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(r||(r={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return c(t,n)},t.loadMessageBundle=function(e){return(0,s.default)().loadMessageBundle(e)},t.config=function(e){return(0,s.default)().config(e)}},2062:(e,t)=>{"use strict";var n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},2341:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.BundleFormat=t.MessageFormat=void 0;var r=n(5622),i=n(5747),o=n(2062),s=n(8544),a=n(8544);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object Number]"===l.call(e)}function p(e){return"[object String]"===l.call(e)}function h(e){return JSON.parse(i.readFileSync(e,"utf8"))}function f(e){return function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return d(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error("").stack)):(0,s.format)(e[t],r):p(n)?(console.warn("Message ".concat(n," didn't get externalized correctly.")),(0,s.format)(n,r)):void console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error("").stack))}}function g(e,t){return c[e]=t,t}function m(e){try{return function(e){var t=h(r.join(e,"nls.metadata.json")),n=Object.create(null);for(var i in t){var o=t[i];n[i]=o.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function v(e,t){var n;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{n=function(e,t){var n,o,s,a=r.join(u.cacheRoot,"".concat(e.id,"-").concat(e.hash,".json")),c=!1,l=!1;try{return n=JSON.parse(i.readFileSync(a,{encoding:"utf8",flag:"r"})),o=a,s=new Date,i.utimes(o,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: ".concat(e.message,".")),i.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle ".concat(a," failed."))})),c=!0}}if(!(n=function(e,t){var n=u.translationsConfig[e.id];if(n){var i=h(n).contents,o=h(r.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in o){var c=o[a],l=i["".concat(e.outDir,"/").concat(a)];if(l){for(var d=[],f=0;f<c.keys.length;f++){var g=c.keys[f],m=l[p(g)?g:g.key];void 0===m&&(m=c.messages[f]),d.push(m)}s[a]=d}else s[a]=c.messages}return s}}(e,t))||c)return n;if(l)try{i.writeFileSync(a,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(u.languagePackSupport)return m(t);var o=function(e){for(var t=u.language;t;){var n=r.join(e,"nls.bundle.".concat(t,".json"));if(i.existsSync(n))return n;var o=t.lastIndexOf("-");t=o>0?t.substring(0,o):void 0}if(void 0===t&&(n=r.join(e,"nls.bundle.json"),i.existsSync(n)))return n}(t);if(o)try{return h(o)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=m(t)}return n}function y(e){if(!e)return s.localize;var t=r.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=r.dirname(e);t=r.join(n,"nls.metadata.header.json"),!i.existsSync(t);){var o=r.dirname(n);if(o===n){t=void 0;break}n=o}return t}(e);if(n){var o=r.dirname(n),a=c[o];if(void 0===a)try{var l=JSON.parse(i.readFileSync(n,"utf8"));try{var d=v(l,o);a=g(o,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=g(o,null)}}catch(e){console.error("Failed to read header file",e),a=g(o,null)}if(a){var p=e.substr(o.length+1).replace(/\\/g,"/"),m=a.nlsBundle[p];return void 0===m?(console.error("Messages for file ".concat(e," not found. See console for details.")),function(){return"Messages not found."}):f(m)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var y=h(function(e){var t;if(u.cacheLanguageResolution&&t)t=t;else{if(s.isPseudo||!u.language)t=".nls.json";else for(var n=u.language;n;){var r=".nls."+n+".json";if(i.existsSync(e+r)){t=r;break}var o=n.lastIndexOf("-");o>0?n=n.substring(0,o):(t=".nls.json",n=null)}u.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(y)?f(y):(0,s.isDefined)(y.messages)&&(0,s.isDefined)(y.keys)?f(y.messages):(console.error("String bundle '".concat(e,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file ".concat(e)),function(){return"Failed to load message bundle. See console for details."}}function _(e){return e&&(p(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),(0,s.setPseudo)("pseudo"===u.locale),y}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},p(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];p(n)&&(t=n)}if(p(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),p(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),p(e._languagePackId)&&(u.languagePackId=e._languagePackId),p(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=h(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var o=r.dirname(e._corruptedFile);i.exists(o,(function(t){t&&i.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}(0,s.setPseudo)("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=y,t.config=_,o.default.install(Object.freeze({loadMessageBundle:y,config:_}))},9976:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},7372:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var 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),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var 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;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var 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(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;var s=[];for(r=0;o&&r<t;r++)s.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),r=0;r<n.length;r++)o=i(this,o,n[r]);return s},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(9976)(r)}catch(e){}},516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startClient=t.languageServerDescription=t.SettingIds=void 0;const r=n(2341).loadMessageBundle(n(5622).join(__dirname,"jsonClient.ts")),i=n(7549),o=n(3932),s=n(9794),a=n(3738);var c,u,l,d,p,h;!function(e){e.type=new o.RequestType("vscode/content")}(c||(c={})),function(e){e.type=new o.NotificationType("json/schemaContent")}(u||(u={})),function(e){e.type=new o.RequestType("json/validate")}(l||(l={})),function(e){e.type=new o.RequestType("json/languageStatus")}(d||(d={})),function(e){e.type=new o.NotificationType("json/schemaAssociations")}(p||(p={})),function(e){e.enableFormatter="json.format.enable",e.enableKeepLines="json.format.keepLines",e.enableValidation="json.validate.enable",e.enableSchemaDownload="json.schemaDownload.enable",e.maxItemsComputed="json.maxItemsComputed"}(h=t.SettingIds||(t.SettingIds={})),t.languageServerDescription=r(0,null);let f=5e3;function g(e){const t=[];return i.extensions.all.forEach((e=>{const n=e.packageJSON;if(n&&n.contributes&&n.contributes.jsonValidation){const r=n.contributes.jsonValidation;Array.isArray(r)&&r.forEach((n=>{let{fileMatch:r,url:o}=n;if("string"==typeof r&&(r=[r]),Array.isArray(r)&&"string"==typeof o){let n=o;"."===n[0]&&"/"===n[1]&&(n=i.Uri.joinPath(e.extensionUri,n).toString()),r=r.map((e=>("%"===e[0]?e=(e=(e=e.replace(/%APP_SETTINGS_HOME%/,"/User")).replace(/%MACHINE_SETTINGS_HOME%/,"/Machine")).replace(/%APP_WORKSPACES_HOME%/,"/Workspaces"):e.match(/^(\w+:\/\/|\/|!)/)||(e="/"+e),e))),t.push({fileMatch:r,uri:n})}}))}})),t}function m(){const e=i.workspace.getConfiguration(),t=i.workspace.getConfiguration("http");f=Math.trunc(Math.max(0,Number(i.workspace.getConfiguration().get(h.maxItemsComputed))))||5e3;const n={http:{proxy:t.get("proxy"),proxyStrictSSL:t.get("proxyStrictSSL")},json:{validate:{enable:e.get(h.enableValidation)},format:{enable:e.get(h.enableFormatter)},keepLines:{enable:e.get(h.enableKeepLines)},schemas:[],resultLimit:f+1}},r=Object.create(null),o=(e,t,i)=>{let o;t&&i&&(o=t.toString(),"/"===o[o.length-1]&&(o=o.substr(0,o.length-1)));for(const i of e){const e=v(i,t);if(!e)continue;let s=r[e];s||(s=r[e]={url:e,fileMatch:[]},n.json.schemas.push(s));const a=i.fileMatch;if(Array.isArray(a)){const e=s.fileMatch||[];s.fileMatch=e;const t=t=>{-1===e.indexOf(t)&&e.push(t)};for(const e of a)o?"/"===e[0]?(t(o+e),t(o+"/*"+e)):(t(o+"/"+e),t(o+"/*/"+e)):t(e)}i.schema&&!s.schema&&(s.schema=i.schema)}},s=i.workspace.workspaceFolders,a=i.workspace.getConfiguration("json",null).get("schemas");if(Array.isArray(a)&&(s||o(a)),s){const e=s.length>1;for(const t of s){const n=t.uri,r=i.workspace.getConfiguration("json",n).inspect("schemas").workspaceFolderValue;Array.isArray(r)&&o(r,n,e),Array.isArray(a)&&o(a,n,e)}}return n}function v(e,t){let n=e.url;return n?!t||"."!==n[0]&&"/"!==n[0]||(n=i.Uri.joinPath(t,n).toString()):e.schema&&(n=e.schema.id||`vscode://schemas/custom/${encodeURIComponent((0,s.hash)(e.schema).toString(16))}`),n}function y(e){return e&&e.then}function _(e){const t=new i.MarkdownString(e.value,!0);return t.isTrusted=e.isTrusted,t}function b(e){return 768===e.code}t.startClient=async function(e,n,s){const v=e.subscriptions;let S;const E=["json","jsonc"],C=i.window.createStatusBarItem("status.json.resolveError",i.StatusBarAlignment.Right,0);C.name=r(1,null),C.text="$(alert)",v.push(C);const T=new Map;let R=!0,w=!1;const D=(0,a.createLimitStatusItem)((e=>(0,a.createFoldingRangeLimitItem)(E,h.maxItemsComputed,e))),P=(0,a.createLimitStatusItem)((e=>(0,a.createDocumentSymbolsLimitItem)(E,h.maxItemsComputed,e))),I=(0,a.createLimitStatusItem)((e=>(0,a.createDocumentColorsLimitItem)(E,h.maxItemsComputed,e)));v.push(D,P,I),v.push(i.commands.registerCommand("json.clearCache",(async()=>{if(w&&s.schemaRequests.clearCache){const e=await s.schemaRequests.clearCache();await x.sendNotification(u.type,e)}i.window.showInformationMessage(r(2,null))})));const O={documentSelector:E,initializationOptions:{handledSchemaProtocols:["file"],provideFormatter:!1,customCapabilities:{rangeFormatting:{editLimit:1e4}}},synchronize:{configurationSection:["json","http"],fileEvents:i.workspace.createFileSystemWatcher("**/*.json")},middleware:{workspace:{didChangeConfiguration:()=>x.sendNotification(o.DidChangeConfigurationNotification.type,{settings:m()})},handleDiagnostics:(e,t,n)=>{const r=t.findIndex(b);if(-1===r)return T.delete(e.toString()),n(e,t);const o=t[r];T.set(e.toString(),o.message),R||(t=t.filter((e=>!b(e)))),i.window.activeTextEditor&&i.window.activeTextEditor.document.uri.toString()===e.toString()&&C.show(),n(e,t)},provideCompletionItem(e,t,n,r,o){function s(e){const n=e.range;n instanceof i.Range&&n.end.isAfter(t)&&n.start.isBeforeOrEqual(t)&&(e.range={inserting:new i.Range(n.start,t),replacing:n}),e.documentation instanceof i.MarkdownString&&(e.documentation=_(e.documentation))}function a(e){return e&&(Array.isArray(e)?e:e.items).forEach(s),e}const c=o(e,t,n,r);return y(c)?c.then(a):a(c)},provideHover(e,t,n,r){function o(e){return e&&Array.isArray(e.contents)&&(e.contents=e.contents.map((e=>e instanceof i.MarkdownString?_(e):e))),e}const s=r(e,t,n);return y(s)?s.then(o):o(s)},provideFoldingRanges(e,t,n,r){function i(t){return Array.isArray(t)&&t.length>f?(t.length=f,D.update(e,f)):D.update(e,!1),t}const o=r(e,t,n);return y(o)?o.then(i):i(o)},provideDocumentColors(e,t,n){function r(t){return Array.isArray(t)&&t.length>f?(t.length=f,I.update(e,f)):I.update(e,!1),t}const i=n(e,t);return y(i)?i.then(r):r(i)},provideDocumentSymbols(e,t,n){function r(e){return e.reduce(((e,t)=>e+1+r(t.children)),0)}function o(t){return Array.isArray(t)&&(function(e){return e[0]instanceof i.DocumentSymbol}(t)?r(t):t.length)>f?P.update(e,f):P.update(e,!1),t}const s=n(e,t);return y(s)?s.then(o):o(s)}}},x=n("json",t.languageServerDescription,O);x.registerProposedFeatures();const A={};x.onRequest(c.type,(e=>{const t=i.Uri.parse(e);return"untitled"===t.scheme?Promise.reject(new o.ResponseError(3,r(3,null,t.toString()))):"http"!==t.scheme&&"https"!==t.scheme?i.workspace.openTextDocument(t).then((e=>(A[t.toString()]=!0,e.getText())),(e=>Promise.reject(new o.ResponseError(2,e.toString())))):R?(s.telemetry&&"schema.management.azure.com"===t.authority&&s.telemetry.sendTelemetryEvent("json.schema",{schemaURL:e}),s.schemaRequests.getContent(e).catch((e=>Promise.reject(new o.ResponseError(4,e.toString()))))):Promise.reject(new o.ResponseError(1,r(4,null,h.enableSchemaDownload)))})),await x.start(),w=!0;const k=e=>!!A[e]&&(x.sendNotification(u.type,e),!0);v.push(i.workspace.onDidChangeTextDocument((e=>k(e.document.uri.toString())))),v.push(i.workspace.onDidCloseTextDocument((e=>{const t=e.uri.toString();k(t)&&delete A[t],T.delete(t)}))),v.push(i.window.onDidChangeActiveTextEditor((e=>{if(!e)return;const t=e.document.uri.toString();t&&T.has(t)?C.show():C.hide()})));const N=()=>{if(i.window.activeTextEditor){C.text="$(watch)";const e=i.window.activeTextEditor.document.uri.toString();x.sendRequest(l.type,e).then((t=>{const n=t.findIndex(b);if(-1!==n){const r=t[n];T.set(e,r.message)}else C.hide();C.text="$(alert)"}))}};function M(){const e=i.workspace.getConfiguration().get(h.enableFormatter);!e&&S?(S.dispose(),S=void 0):e&&!S&&(S=i.languages.registerDocumentRangeFormattingEditProvider(E,{provideDocumentRangeFormattingEdits(e,t,n,r){const s=i.workspace.getConfiguration("files",e),a={trimTrailingWhitespace:s.get("trimTrailingWhitespace"),trimFinalNewlines:s.get("trimFinalNewlines"),insertFinalNewline:s.get("insertFinalNewline")},c={textDocument:x.code2ProtocolConverter.asTextDocumentIdentifier(e),range:x.code2ProtocolConverter.asRange(t),options:x.code2ProtocolConverter.asFormattingOptions(n,a)};return x.sendRequest(o.DocumentRangeFormattingRequest.type,c,r).then(x.protocol2CodeConverter.asTextEdits,(e=>(x.handleFailedRequest(o.DocumentRangeFormattingRequest.type,void 0,e,[]),Promise.resolve([]))))}}))}function L(){R=!1!==i.workspace.getConfiguration().get(h.enableSchemaDownload),R?(C.tooltip=r(5,null),C.command="_json.retryResolveSchema",N()):(C.tooltip=r(6,null),C.command={command:"workbench.action.openSettings",arguments:[h.enableSchemaDownload],title:""})}return v.push(i.commands.registerCommand("_json.retryResolveSchema",N)),x.sendNotification(p.type,g()),v.push(i.extensions.onDidChange((e=>{x.sendNotification(p.type,g())}))),M(),v.push({dispose:()=>S&&S.dispose()}),L(),v.push(i.workspace.onDidChangeConfiguration((e=>{e.affectsConfiguration(h.enableFormatter)?M():e.affectsConfiguration(h.enableSchemaDownload)&&L()}))),v.push((0,a.createLanguageStatusItem)(E,(e=>x.sendRequest(d.type,e)))),x}},3738:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDocumentColorsLimitItem=t.createDocumentSymbolsLimitItem=t.createFoldingRangeLimitItem=t.createLimitStatusItem=t.createLanguageStatusItem=void 0;const r=n(7549),i=n(2341).loadMessageBundle(n(5622).join(__dirname,"languageStatus.ts"));function o(e){const t=function(){const e=[];for(const t of r.extensions.all){const n=t.packageJSON?.contributes?.jsonValidation;if(Array.isArray(n))for(const i of n){let n=i.url;"string"==typeof n&&("."===n[0]&&"/"===n[1]&&(n=r.Uri.joinPath(t.extensionUri,n).toString(!1)),e.push({fullUri:n,extension:t,label:i.url}))}}return{findExtension(t){for(const n of e)if(n.fullUri===t)return{label:n.label,detail:i(0,null,n.extension.id),uri:r.Uri.parse(n.fullUri),buttons:[{iconPath:new r.ThemeIcon("extensions"),tooltip:i(1,null)}],buttonCommands:[()=>r.commands.executeCommand("workbench.extensions.action.showExtensionsWithIds",[[n.extension.id]])]}}}}(),n=function(e){const t=r.Uri.parse(e),n=r.workspace.getWorkspaceFolder(t),o=r.workspace.getConfiguration("json",t).inspect("schemas"),s=[],a=o?.workspaceFolderValue;if(n&&Array.isArray(a))for(const e of a){const t=e.url;if("string"==typeof t){let e=t;"."===t[0]&&"/"===t[1]&&(e=r.Uri.joinPath(n.uri,t).toString(!1)),s.push({fullUri:e,workspaceFolder:n,label:t})}}const c=o?.globalValue;if(Array.isArray(c))for(const e of c){const t=e.url;if("string"==typeof t){let e=t;n&&"."===t[0]&&"/"===t[1]&&(e=r.Uri.joinPath(n.uri,t).toString(!1)),s.push({fullUri:e,workspaceFolder:void 0,label:t})}}return{findSetting(e){for(const t of s)if(t.fullUri===e)return{label:t.label,detail:t.workspaceFolder?i(2,null):i(3,null),uri:r.Uri.parse(t.fullUri),buttons:[{iconPath:new r.ThemeIcon("gear"),tooltip:i(4,null)}],buttonCommands:[()=>r.commands.executeCommand(t.workspaceFolder?"workbench.action.openWorkspaceSettingsFile":"workbench.action.openSettingsJson",["json.schemas"])]}}}}(e.uri),o=[],s=[],a=[];for(const i of e.schemas){const e=t.findExtension(i);if(e){o.push(e);continue}const c=n.findSetting(i);c?s.push(c):a.push({label:i,uri:r.Uri.parse(i)})}const c=[...o,...s,...a];0===c.length&&c.push({label:i(5,null),buttons:[{iconPath:new r.ThemeIcon("gear"),tooltip:i(6,null)}],buttonCommands:[()=>r.commands.executeCommand("workbench.action.openSettingsJson",["json.schemas"])]}),c.push({label:"",kind:r.QuickPickItemKind.Separator}),c.push({label:i(7,null),uri:r.Uri.parse("https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings")});const u=r.window.createQuickPick();u.title=i(8,null,e.uri),u.items=c,u.show(),u.onDidAccept((()=>{const e=u.selectedItems[0].uri;e&&(r.commands.executeCommand("vscode.open",e),u.dispose())})),u.onDidTriggerItemButton((e=>{const t=e.item.buttons?.indexOf(e.button);void 0!==t&&t>=0&&e.item.buttonCommands&&e.item.buttonCommands[t]&&e.item.buttonCommands[t]()}))}t.createLanguageStatusItem=function(e,t){const n=r.languages.createLanguageStatusItem("json.projectStatus",e);n.name=i(9,null),n.severity=r.LanguageStatusSeverity.Information;const s=r.commands.registerCommand("_json.showAssociatedSchemaList",o),a=r.window.onDidChangeActiveTextEditor((()=>{c()}));async function c(){const o=r.window.activeTextEditor?.document;if(o&&-1!==e.indexOf(o.languageId))try{n.text="$(loading~spin)",n.detail=i(10,null),n.command=void 0;const e=(await t(o.uri.toString())).schemas;n.detail=void 0,0===e.length?(n.text=i(11,null),n.detail=i(12,null)):1===e.length?(n.text=i(13,null),n.detail=i(14,null)):(n.text=i(15,null),n.detail=i(16,null)),n.command={command:"_json.showAssociatedSchemaList",title:i(17,null),arguments:[{schemas:e,uri:o.uri.toString()}]}}catch(e){n.text=i(18,null),n.detail=void 0,n.command=void 0}else n.text=i(19,null),n.detail=void 0,n.command=void 0}return c(),r.Disposable.from(n,a,s)},t.createLimitStatusItem=function(e){let t;const n=new Map,i=[];return i.push(r.window.onDidChangeActiveTextEditor((r=>{t?.dispose(),t=void 0;const i=r?.document;if(i){const r=n.get(i);void 0!==r&&(t=e(r))}}))),i.push(r.workspace.onDidCloseTextDocument((e=>{n.delete(e)}))),{update:function(i,o){!1===o?(n.delete(i),t&&i===r.window.activeTextEditor?.document&&(t.dispose(),t=void 0)):(n.set(i,o),i===r.window.activeTextEditor?.document&&(t&&o===n.get(i)||(t?.dispose(),t=e(o))))},dispose(){t?.dispose(),i.forEach((e=>e.dispose())),i.length=0,t=void 0,n.clear()}}};const s="workbench.action.openSettings",a=i(20,null);t.createFoldingRangeLimitItem=function(e,t,n){const o=r.languages.createLanguageStatusItem("json.foldingRangesStatus",e);return o.name=i(21,null),o.severity=r.LanguageStatusSeverity.Warning,o.text=i(22,null),o.detail=i(23,null,n),o.command={command:s,arguments:[t],title:a},r.Disposable.from(o)},t.createDocumentSymbolsLimitItem=function(e,t,n){const o=r.languages.createLanguageStatusItem("json.documentSymbolsStatus",e);return o.name=i(24,null),o.severity=r.LanguageStatusSeverity.Warning,o.text=i(25,null),o.detail=i(26,null,n),o.command={command:s,arguments:[t],title:a},r.Disposable.from(o)},t.createDocumentColorsLimitItem=function(e,t,n){const o=r.languages.createLanguageStatusItem("json.documentColorsStatus",e);return o.name=i(27,null),o.severity=r.LanguageStatusSeverity.Warning,o.text=i(28,null),o.detail=i(29,null,n),o.command={command:s,arguments:[t],title:a},r.Disposable.from(o)}},8811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSchemaCache=void 0;const r=n(5747),i=n(5622),o=n(6417),s="json-schema-cache";t.JSONSchemaCache=class{constructor(e,t){this.schemaCacheLocation=e,this.globalState=t;const n=t.get(s,{}),r={};for(const e in n){const{etag:t,fileName:i,updateTime:o}=n[e];"string"==typeof t&&"string"==typeof i&&"number"==typeof o&&(r[e]={etag:t,fileName:i,updateTime:o})}this.cacheInfo=r}getETag(e){return this.cacheInfo[e]?.etag}getLastUpdatedInHours(e){const t=this.cacheInfo[e]?.updateTime;if(void 0!==t)return((new Date).getTime()-t)/1e3/60/60}async putSchema(e,t,n){try{const a=(s=e,`${(0,o.createHash)("MD5").update(s).digest("hex")}.schema.json`);await r.promises.writeFile(i.join(this.schemaCacheLocation,a),n);const c={etag:t,fileName:a,updateTime:(new Date).getTime()};this.cacheInfo[e]=c}catch(t){delete this.cacheInfo[e]}finally{await this.updateMemento()}var s}async getSchemaIfUpdatedSince(e,t){const n=this.getLastUpdatedInHours(e);if(void 0!==n&&n<t)return this.loadSchemaFile(e,this.cacheInfo[e],!1)}async getSchema(e,t,n){const r=this.cacheInfo[e];if(r){if(r.etag===t)return this.loadSchemaFile(e,r,n);this.deleteSchemaFile(e,r)}}async loadSchemaFile(e,t,n){const o=i.join(this.schemaCacheLocation,t.fileName);try{const e=(await r.promises.readFile(o)).toString();return n&&(t.updateTime=(new Date).getTime()),e}catch(t){return void delete this.cacheInfo[e]}finally{await this.updateMemento()}}async deleteSchemaFile(e,t){const n=i.join(this.schemaCacheLocation,t.fileName);delete this.cacheInfo[e],await this.updateMemento();try{await r.promises.rm(n)}catch(e){}}getCacheInfo(){return this.cacheInfo}async updateMemento(){try{await this.globalState.update(s,this.cacheInfo)}catch(e){}}async clearCache(){const e=Object.keys(this.cacheInfo);try{const e=await r.promises.readdir(this.schemaCacheLocation);for(const t of e)try{await r.promises.unlink(i.join(this.schemaCacheLocation,t))}catch(e){}}catch(e){}finally{this.cacheInfo={},await this.updateMemento()}return e}}},9794:(e,t)=>{"use strict";function n(e,t){return(t<<5)-t+e|0}function r(e,t){t=n(149417,t);for(let r=0,i=e.length;r<i;r++)t=n(e.charCodeAt(r),t);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.hash=void 0,t.hash=function e(t,i=0){switch(typeof t){case"object":return null===t?n(349,i):Array.isArray(t)?(o=t,s=n(104579,s=i),o.reduce(((t,n)=>e(n,t)),s)):function(t,i){return i=n(181387,i),Object.keys(t).sort().reduce(((n,i)=>(n=r(i,n),e(t[i],n))),i)}(t,i);case"string":return r(t,i);case"boolean":return function(e,t){return n(e?433:863,t)}(t,i);case"number":return n(t,i);case"undefined":return 29047;default:return n(t,617)}var o,s}},6591:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},2357:e=>{"use strict";e.exports=require("assert")},7303:e=>{"use strict";e.exports=require("async_hooks")},3129:e=>{"use strict";e.exports=require("child_process")},7082:e=>{"use strict";e.exports=require("console")},7619:e=>{"use strict";e.exports=require("constants")},6417:e=>{"use strict";e.exports=require("crypto")},881:e=>{"use strict";e.exports=require("dns")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},2282:e=>{"use strict";e.exports=require("module")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},630:e=>{"use strict";e.exports=require("perf_hooks")},2413:e=>{"use strict";e.exports=require("stream")},8213:e=>{"use strict";e.exports=require("timers")},4016:e=>{"use strict";e.exports=require("tls")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},7549:e=>{"use strict";e.exports=require("vscode")},8761:e=>{"use strict";e.exports=require("zlib")}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}r.m=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>e+".jsonClientMain.js",r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e={898:1},r.f.require=(t,n)=>{e[t]||(t=>{var n=t.modules,i=t.ids,o=t.runtime;for(var s in n)r.o(n,s)&&(r.m[s]=n[s]);o&&o(r);for(var a=0;a<i.length;a++)e[i[a]]=1})(require("./"+r.u(t)))};var i={};(()=>{"use strict";var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.deactivate=e.activate=void 0;const t=r(7549),n=r(516),o=r(1457),s=r(5747),a=r(5622),c=r(3893),u=r(7907),l=r(8811);let d,p;e.activate=async function(e){const r=await async function(e){const t=e.asAbsolutePath("./package.json");try{return JSON.parse((await s.promises.readFile(t)).toString())}catch(e){return console.log(`Problems reading ${t}: ${e}`),{name:"",version:"",aiKey:"",main:""}}}(e);d=new u.default(r.name,r.version,r.aiKey);const i=t.window.createOutputChannel(n.languageServerDescription),f=`./server/${-1!==r.main.indexOf("/dist/")?"dist":"out"}/node/jsonServerMain`,g=e.asAbsolutePath(f),m={execArgv:["--nolazy","--inspect="+(6e3+Math.round(999*Math.random()))]},v={run:{module:g,transport:o.TransportKind.ipc},debug:{module:g,transport:o.TransportKind.ipc,options:m}},y=function(e){let n="verbose"===t.workspace.getConfiguration().get(h);const r=t.workspace.onDidChangeConfiguration((e=>{e.affectsConfiguration(h)&&(n="verbose"===t.workspace.getConfiguration().get(h))}));return{trace(t){n&&e.appendLine(t)},isTrace:()=>n,dispose:()=>r.dispose()}}(i);e.subscriptions.push(y);const _=await async function(e,t){let n;const r=e.globalStorageUri;let i;if("file"===r.scheme){const o=a.join(r.fsPath,"json-schema-cache");await s.promises.mkdir(o,{recursive:!0});const c=new l.JSONSchemaCache(o,e.globalState);t.trace(`[json schema cache] initial state: ${JSON.stringify(c.getCacheInfo(),null," ")}`),n=c,i=async()=>{const e=await c.clearCache();return t.trace(`[json schema cache] cache cleared. Previously cached schemas: ${e.join(", ")}`),e}}const o=async(e,r)=>{const i={"Accept-Encoding":"gzip, deflate"};r&&(i["If-None-Match"]=r);try{t.trace(`[json schema cache] Requesting schema ${e} etag ${r}...`);const o=await(0,c.xhr)({url:e,followRedirects:5,headers:i});if(n){const r=o.headers.etag;"string"==typeof r?(t.trace(`[json schema cache] Storing schema ${e} etag ${r} in cache`),await n.putSchema(e,r,o.responseText)):t.trace(`[json schema cache] Response: schema ${e} no etag`)}return o.responseText}catch(i){if((e=>"number"==typeof e?.status)(i)){if(304===i.status&&r&&n){t.trace(`[json schema cache] Response: schema ${e} unchanged etag ${r}`);const i=await n.getSchema(e,r,!0);return i?(t.trace(`[json schema cache] Get schema ${e} etag ${r} from cache`),i):o(e)}let s=(0,c.getErrorStatusDescription)(i.status);throw s&&i.responseText&&(s=`${s}\n${i.responseText.substring(0,200)}`),s||(s=i.toString()),t.trace(`[json schema cache] Respond schema ${e} error ${s}`),s}throw i}};return{getContent:async e=>{if(n&&/^https?:\/\/json\.schemastore\.org\//.test(e)){const r=await n.getSchemaIfUpdatedSince(e,48);if(r)return t.isTrace()&&t.trace(`[json schema cache] Schema ${e} from cache without request (last accessed ${n.getLastUpdatedInHours(e)} hours ago)`),r}return o(e,n?.getETag(e))},clearCache:i}}(e,y);p=await(0,n.startClient)(e,((e,t,n)=>(n.outputChannel=i,new o.LanguageClient(e,t,v,n))),{schemaRequests:_,telemetry:d})},e.deactivate=async function(){p&&(await p.stop(),p=void 0),d?.dispose()};const h="json.trace.server"})();var o=exports;for(var s in i)o[s]=i[s];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/e4503b30fc78200f846c62cf8091b76ff5547662/extensions/json-language-features/client/dist/node/jsonClientMain.js.map