@redocly/openapi-language-server 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +627 -0
- package/lib/index.js +60 -58
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -1,85 +1,87 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Sy=Object.create;var Yr=Object.defineProperty;var wy=Object.getOwnPropertyDescriptor;var Ty=Object.getOwnPropertyNames;var ky=Object.getPrototypeOf,Ay=Object.prototype.hasOwnProperty;var _l=(e,t)=>()=>(e&&(t=e(e=0)),t);var D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ms=(e,t)=>{for(var n in t)Yr(e,n,{get:t[n],enumerable:!0})},Vr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ty(t))!Ay.call(e,i)&&i!==n&&Yr(e,i,{get:()=>t[i],enumerable:!(r=wy(t,i))||r.enumerable});return e},ys=(e,t,n)=>(Vr(e,t,"default"),n&&Vr(n,t,"default")),Ie=(e,t,n)=>(n=e!=null?Sy(ky(e)):{},Vr(t||!e||!e.__esModule?Yr(n,"default",{value:e,enumerable:!0}):n,e)),Gr=e=>Vr(Yr({},"__esModule",{value:!0}),e);var _t=D(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.isYAMLNode=he.isNodesEqual=he.newMap=he.newSeq=he.newItems=he.newScalar=he.newAnchorRef=he.newMapping=he.Kind=void 0;var pt;(function(e){e[e.SCALAR=0]="SCALAR",e[e.MAPPING=1]="MAPPING",e[e.MAP=2]="MAP",e[e.SEQ=3]="SEQ",e[e.ANCHOR_REF=4]="ANCHOR_REF",e[e.INCLUDE_REF=5]="INCLUDE_REF"})(pt=he.Kind||(he.Kind={}));function Ny(e,t,n=2){var r=t?t.endPosition:e.endPosition+1,i={key:e,value:t,nodeIndent:n,startPosition:e.startPosition,endPosition:r,kind:pt.MAPPING,parent:null,errors:[]};return i}he.newMapping=Ny;function qy(e,t,n,r,i=2){return{errors:[],referencesAnchor:e,value:r,nodeIndent:i,startPosition:t,endPosition:n,kind:pt.ANCHOR_REF,parent:null}}he.newAnchorRef=qy;function Ey(e="",t=2){let n={errors:[],startPosition:-1,endPosition:-1,value:""+e,nodeIndent:t,kind:pt.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+e};return typeof e!="string"&&(n.valueObject=e),n}he.newScalar=Ey;function Sl(){return{errors:[],startPosition:-1,endPosition:-1,nodeIndent:2,items:[],kind:pt.SEQ,parent:null}}he.newItems=Sl;function jy(){return Sl()}he.newSeq=jy;function My(e,t=2){return{errors:[],startPosition:-1,endPosition:-1,nodeIndent:t,mappings:e||[],kind:pt.MAP,parent:null}}he.newMap=My;function dr(e,t){if(!e||!t||e.kind!==t.kind)return!1;if(e.kind===pt.SCALAR)return e.value===t.value;if(e.kind===pt.SEQ){let n=e,r=t;if(n.items.length!==r.items.length)return!1;for(let i=0;i<n.items.length;i++){let o=n.items[i],s=r.items[i];if(!dr(o,s))return!1}return!0}if(e.kind===pt.MAP){let n=e,r=t;if(n.mappings.length!==r.mappings.length)return!1;for(let i of n.mappings){let o=i.key,s=i.value,a=r.mappings.find(c=>dr(o,c.key));if(a){if(!dr(s,a.value))return!1}else return!1}return!0}if(pt.MAPPING===e.kind){let n=e,r=t;return dr(n.key,r.key)}return!1}he.isNodesEqual=dr;function Ly(e){return e.startPosition!==void 0&&e.endPosition!==void 0&&e.kind!==void 0}he.isYAMLNode=Ly});var Zt=D(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.isNegativeZero=Fe.repeat=Fe.extend=Fe.toArray=Fe.isObject=Fe.isNothing=void 0;function wl(e){return typeof e>"u"||e===null}Fe.isNothing=wl;function Iy(e){return typeof e=="object"&&e!==null}Fe.isObject=Iy;function Fy(e){return Array.isArray(e)?e:wl(e)?[]:[e]}Fe.toArray=Fy;function Uy(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}Fe.extend=Uy;function Wy(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}Fe.repeat=Wy;function By(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}Fe.isNegativeZero=By});var xn=D((mD,Tl)=>{"use strict";var Kr=class e{constructor(t,n=null,r=!1){this.name="YAMLException",this.reason=t,this.mark=n,this.message=this.toString(!1),this.isWarning=r}static isInstance(t){if(t!=null&&t.getClassIdentifier&&typeof t.getClassIdentifier=="function"){for(let n of t.getClassIdentifier())if(n==e.CLASS_IDENTIFIER)return!0}return!1}getClassIdentifier(){var t=[];return t.concat(e.CLASS_IDENTIFIER)}toString(t=!1){var n;return n="JS-YAML: "+(this.reason||"(unknown reason)"),!t&&this.mark&&(n+=" "+this.mark.toString()),n}};Kr.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException";Tl.exports=Kr});var Ol=D((yD,Al)=>{"use strict";var kl=Zt(),Ps=class{constructor(t,n,r,i,o){this.name=t,this.buffer=n,this.position=r,this.line=i,this.column=o}getSnippet(t=0,n=75){var r,i,o,s,a;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
|
|
2
2
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
|
|
3
|
-
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return
|
|
4
|
-
`+
|
|
5
|
-
`+n)),r}};
|
|
6
|
-
\r`;function
|
|
7
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function
|
|
8
|
-
`){e.position--,e.position==i&&(e.position+=1);return}if(o=="\r"){e.position--,e.position==i&&(e.position+=1);return}e.position++}}}function
|
|
9
|
-
`,n-1))}function
|
|
10
|
-
`,
|
|
11
|
-
`);break}for(r?
|
|
12
|
-
`,
|
|
13
|
-
`,
|
|
14
|
-
`,
|
|
15
|
-
`,
|
|
16
|
-
`){
|
|
17
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new
|
|
18
|
-
`)break}}let s=r.documents,
|
|
19
|
-
`,r),i===-1?(s=e.slice(r),r=
|
|
20
|
-
`&&(o+=n),o+=s;return o}function
|
|
21
|
-
`+
|
|
22
|
-
`+
|
|
23
|
-
`+
|
|
3
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),kl.repeat(" ",t)+r+a+o+`
|
|
4
|
+
`+kl.repeat(" ",t+this.position-i+r.length)+"^"}toString(t=!0){var n,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(n=this.getSnippet(),n&&(r+=`:
|
|
5
|
+
`+n)),r}};Al.exports=Ps});var Te=D(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.Type=void 0;var Nl=xn(),Hy=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],zy=["scalar","sequence","mapping"];function $y(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}var _s=class{constructor(t,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Hy.indexOf(r)===-1)throw new Nl('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.defaultStyle=n.defaultStyle||null,this.styleAliases=$y(n.styleAliases||null),zy.indexOf(this.kind)===-1)throw new Nl('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}};Qr.Type=_s});var Pn=D(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.Schema=void 0;var ql=Zt(),Jr=xn(),Vy=Te();function Cs(e,t,n){var r=[];return e.include.forEach(function(i){n=Cs(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,s){o.tag===i.tag&&r.push(s)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function Yy(){var e={},t,n;function r(i){e[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}var Ot=class{constructor(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(n){if(n.loadKind&&n.loadKind!=="scalar")throw new Jr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Cs(this,"implicit",[]),this.compiledExplicit=Cs(this,"explicit",[]),this.compiledTypeMap=Yy(this.compiledImplicit,this.compiledExplicit)}};Xr.Schema=Ot;Ot.DEFAULT=null;Ot.create=function(...t){var n,r;switch(t.length){case 1:n=Ot.DEFAULT,r=t[0];break;case 2:n=t[0],r=t[1];break;default:throw new Jr("Wrong number of arguments for Schema.create function")}if(n=ql.toArray(n),r=ql.toArray(r),!n.every(function(i){return i instanceof Ot}))throw new Jr("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof Vy.Type}))throw new Jr("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ot({include:n,explicit:r})}});var jl=D((xD,El)=>{"use strict";var Gy=Te();El.exports=new Gy.Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var Ll=D((PD,Ml)=>{"use strict";var Ky=Te();Ml.exports=new Ky.Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var Fl=D((_D,Il)=>{"use strict";var Qy=Te();Il.exports=new Qy.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Wl=D((CD,Ul)=>{"use strict";var Jy=Pn();Ul.exports=new Jy.Schema({explicit:[jl(),Ll(),Fl()]})});var zl=D((DD,Hl)=>{"use strict";var Xy=Te(),Bl=_t();function Zy(e){let t=Bl.isYAMLNode(e)?e.value:e;if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")}function eb(e){return Bl.isYAMLNode(e)?e:null}function tb(e){return e===null}Hl.exports=new Xy.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:Zy,construct:eb,predicate:tb,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var Yl=D((RD,Vl)=>{"use strict";var nb=Te(),$l=_t();function rb(e){let t=$l.isYAMLNode(e)?e.value:e;if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")}function ib(e){return $l.isYAMLNode(e)?e:e==="true"||e==="True"||e==="TRUE"}function ob(e){return Object.prototype.toString.call(e)==="[object Boolean]"}Vl.exports=new nb.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:rb,construct:ib,predicate:ob,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var Ql=D((SD,Kl)=>{"use strict";var sb=Zt(),ab=Te(),Gl=_t();function cb(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ub(e){return 48<=e&&e<=55}function lb(e){return 48<=e&&e<=57}function db(e){let t=Gl.isYAMLNode(e)?e.value:e;if(t===null)return!1;var n=t.length,r=0,i=!1,o;if(!n)return!1;if(o=t[r],(o==="-"||o==="+")&&(o=t[++r]),o==="0"){if(r+1===n)return!0;if(o=t[++r],o==="b"){for(r++;r<n;r++)if(o=t[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i}if(o==="x"){for(r++;r<n;r++)if(o=t[r],o!=="_"){if(!cb(t.charCodeAt(r)))return!1;i=!0}return i}for(;r<n;r++)if(o=t[r],o!=="_"){if(!ub(t.charCodeAt(r)))return!1;i=!0}return i}for(;r<n;r++)if(o=t[r],o!=="_"){if(o===":")break;if(!lb(t.charCodeAt(r)))return!1;i=!0}return i?o!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r)):!1}function pb(e){if(Gl.isYAMLNode(e))return e;var t=e,n=1,r,i,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,i=1,o.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseInt(t,10)}function fb(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!sb.isNegativeZero(e)}Kl.exports=new ab.Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:db,construct:pb,predicate:fb,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var ed=D((wD,Zl)=>{"use strict";var Jl=Zt(),gb=Te(),Xl=_t(),hb=new RegExp("-?(0|[1-9][0-9]*)(.[0-9]*)?([eE][-+]?[0-9]+)?|^0$|^[-+]?.(inf|Inf|INF)$|^.(nan|NaN|NAN)$");function mb(e){let t=Xl.isYAMLNode(e)?e.value:e;return!(t===null||!hb.test(t))}function yb(e){if(Xl.isYAMLNode(e))return e;var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(o){i.unshift(parseFloat(o,10))}),t=0,r=1,i.forEach(function(o){t+=o*r,r*=60}),n*t):n*parseFloat(t,10)}function bb(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Jl.isNegativeZero(e))return"-0.0";return e.toString(10)}function vb(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Jl.isNegativeZero(e))}Zl.exports=new gb.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:mb,construct:yb,predicate:vb,represent:bb,defaultStyle:"lowercase"})});var nd=D((TD,td)=>{"use strict";var xb=Pn();td.exports=new xb.Schema({include:[Wl()],implicit:[zl(),Yl(),Ql(),ed()]})});var id=D((kD,rd)=>{"use strict";var Pb=Pn();rd.exports=new Pb.Schema({include:[nd()]})});var ad=D((AD,sd)=>{"use strict";var _b=Te(),od=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");function Cb(e){if(e===null)return!1;var t,n,r,i,o,s,a,c=0,l=null,p,m,P;return t=od.exec(e),t!==null}function Db(e){var t,n,r,i,o,s,a,c=0,l=null,p,m,P;if(t=od.exec(e),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c=c+"0";c=+c}return t[9]&&(p=+t[10],m=+(t[11]||0),l=(p*60+m)*6e4,t[9]==="-"&&(l=-l)),P=new Date(Date.UTC(n,r,i,o,s,a,c)),l&&P.setTime(P.getTime()-l),P}function Rb(e){return e.toISOString()}sd.exports=new _b.Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Cb,construct:Db,instanceOf:Date,represent:Rb})});var ud=D((OD,cd)=>{"use strict";var Sb=Te();function wb(e){return e==="<<"||e===null}cd.exports=new Sb.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:wb})});var ld={};ms(ld,{default:()=>Tb});var Tb,dd=_l(()=>{Tb={}});var fd=D((ND,pd)=>{"use strict";var Zr=(dd(),Gr(ld)).Buffer,kb=Te(),Ds=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
6
|
+
\r`;function Ab(e){if(e===null)return!1;var t,n,r=0,i=0,o=e.length,s=Ds;for(n=0;n<o;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function Ob(e){var t,n,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=Ds,a=0,c=[];for(n=0;n<o;n++)n%4===0&&n&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|s.indexOf(i.charAt(n));return r=o%4*6,r===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):r===18?(c.push(a>>10&255),c.push(a>>2&255)):r===12&&c.push(a>>4&255),Zr?new Zr(c):c}function Nb(e){var t="",n=0,r,i,o=e.length,s=Ds;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function qb(e){return Zr&&Zr.isBuffer(e)}pd.exports=new kb.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ab,construct:Ob,predicate:qb,represent:Nb})});var hd=D((qD,gd)=>{"use strict";var Eb=Te(),jb=Object.prototype.hasOwnProperty,Mb=Object.prototype.toString;function Lb(e){if(e===null)return!0;var t=[],n,r,i,o,s,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,Mb.call(i)!=="[object Object]")return!1;for(o in i)if(jb.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function Ib(e){return e!==null?e:[]}gd.exports=new Eb.Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Lb,construct:Ib})});var yd=D((ED,md)=>{"use strict";var Fb=Te(),Rs=_t(),Ub=Object.prototype.toString;function Wb(e){if(e===null)return!0;if(e.kind!=Rs.Kind.SEQ)return!1;var t,n,r,i,o,s=e.items;for(t=0,n=s.length;t<n;t+=1)if(r=s[t],Ub.call(r)!=="[object Object]"||!Array.isArray(r.mappings)||r.mappings.length!==1)return!1;return!0}function Bb(e){if(e===null||!Array.isArray(e.items))return[];let t,n,r,i,o=e.items;for(i=Rs.newItems(),i.parent=e.parent,i.startPosition=e.startPosition,i.endPosition=e.endPosition,t=0,n=o.length;t<n;t+=1){let a=o[t].mappings[0],c=Rs.newItems();c.parent=i,c.startPosition=a.key.startPosition,c.endPosition=a.value.startPosition,a.key.parent=c,a.value.parent=c,c.items=[a.key,a.value],i.items.push(c)}return i}md.exports=new Fb.Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Wb,construct:Bb})});var vd=D((jD,bd)=>{"use strict";var Hb=Te(),zb=_t();function $b(e){return e===null?!0:e.kind==zb.Kind.MAP}function Vb(e){return e!==null?e:{}}bd.exports=new Hb.Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:$b,construct:Vb})});var ei=D((MD,xd)=>{"use strict";var Yb=Pn(),Gb=new Yb.Schema({include:[id()],implicit:[ad(),ud()],explicit:[fd(),hd(),yd(),vd()]});xd.exports=Gb});var _d=D((LD,Pd)=>{"use strict";var Kb=Te();function Qb(){return!0}function Jb(){}function Xb(){return""}function Zb(e){return typeof e>"u"}Pd.exports=new Kb.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Qb,construct:Jb,predicate:Zb,represent:Xb})});var Dd=D((ID,Cd)=>{"use strict";var ev=Te();function tv(e){if(e===null||e.length===0)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if(t[0]==="/"){if(n&&(r=n[1]),r.length>3||t[t.length-r.length-1]!=="/")return!1;t=t.slice(1,t.length-r.length-1)}try{var i=new RegExp(t,r);return!0}catch{return!1}}function nv(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return t[0]==="/"&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function rv(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function iv(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Cd.exports=new ev.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:tv,construct:nv,predicate:iv,represent:rv})});var Ss=D((FD,wd)=>{"use strict";var Rd=Pn(),Sd=new Rd.Schema({include:[ei()],explicit:[_d(),Dd()]});Rd.Schema.DEFAULT=Sd;wd.exports=Sd});var Ud=D((ft,fr)=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.safeLoad=ft.safeLoadAll=ft.load=ft.loadAll=void 0;var We=_t(),Nt=Zt(),Es=xn(),js=Ol(),Od=ei(),ov=Ss(),ri=Object.prototype.hasOwnProperty,ti=1,Nd=2,qd=3,ni=4,ws=1,sv=2,Td=3,av=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cv=/[\x85\u2028\u2029]/,uv=/[,\[\]\{\}]/,Ed=/^(?:!|!!|![a-z\-]+!)$/i,jd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function at(e){return e===10||e===13}function tn(e){return e===9||e===32}function Ue(e){return e===9||e===32||e===10||e===13}function _n(e){return e===44||e===91||e===93||e===123||e===125}function lv(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function dv(e){return e===120?2:e===117?4:e===85?8:0}function pv(e){return 48<=e&&e<=57?e-48:-1}function fv(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
7
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function gv(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Ts=new Array(256),ks=new Array(256),Md=new Array(256),As=new Array(256);for(Je=0;Je<256;Je++)As[Je]=ks[Je]=fv(Je),Ts[Je]=ks[Je]?1:0,Md[Je]=1,Ts[Je]||(As[Je]="\\"+String.fromCharCode(Je));var Je,Os=class{constructor(t,n){this.errorMap={},this.errors=[],this.lines=[],this.input=t,this.filename=n.filename||null,this.schema=n.schema||ov,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.allowAnyEscape=n.allowAnyEscape||!1,this.ignoreDuplicateKeys=n.ignoreDuplicateKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}};function Ms(e,t,n=!1){return new Es(t,new js(e.filename,e.input,e.position,e.line,e.position-e.lineStart),n)}function Ns(e,t,n,r=!1,i=!1){var o=hv(e,t);if(o){var s=n+t;if(!e.errorMap[s]){var a=new js(e.filename,e.input,t,o.line,t-o.start);i&&(a.toLineEnd=!0);var c=new Es(n,a,r);e.errors.push(c)}}}function W(e,t){var n=Ms(e,t),r=n.message+n.mark.position;if(!e.errorMap[r]){e.errors.push(n),e.errorMap[r]=1;for(var i=e.position;;){if(e.position>=e.input.length-1)return;var o=e.input.charAt(e.position);if(o==`
|
|
8
|
+
`){e.position--,e.position==i&&(e.position+=1);return}if(o=="\r"){e.position--,e.position==i&&(e.position+=1);return}e.position++}}}function qs(e,t){var n=Ms(e,t);e.onWarning&&e.onWarning.call(null,n)}var kd={YAML:function(t,n,r){var i,o,s;t.version!==null&&W(t,"duplication of %YAML directive"),r.length!==1&&W(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&W(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&W(t,"found incompatible YAML document (version 1.2 is required)"),t.version=r[0],t.checkLineBreaks=s<2,s!==2&&W(t,"found incompatible YAML document (version 1.2 is required)")},TAG:function(t,n,r){var i,o;r.length!==2&&W(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Ed.test(i)||W(t,"ill-formed tag handle (first argument) of the TAG directive"),ri.call(t.tagMap,i)&&W(t,'there is a previously declared suffix for "'+i+'" tag handle'),jd.test(o)||W(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function qt(e,t,n,r){var i,o,s,a,c=e.result;if(c.startPosition==-1&&(c.startPosition=t),t<=n){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||W(e,"expected valid JSON character");else av.test(a)&&W(e,"the stream contains non-printable characters");c.value+=a,c.endPosition=n}}function en(e,t,n,r,i,o){if(r!=null){var s=i?i.endPosition:r.endPosition;!i&&e.input.charAt(s)===":"&&s++,t===null&&(t={startPosition:r.startPosition,endPosition:s,parent:null,errors:[],mappings:[],kind:We.Kind.MAP,nodeIndent:o});var a=We.newMapping(r,i,o);return a.parent=t,r.parent=a,i==null?a.endPosition=r.endPosition:i.parent=a,!e.ignoreDuplicateKeys&&t.mappings.forEach(c=>{We.isNodesEqual(c,a)&&(Ns(e,a.key.startPosition,"duplicate key"),Ns(e,c.key.startPosition,"duplicate key"))}),t.mappings.push(a),t.endPosition=s,t}}function Ls(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):W(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.lines.push({start:e.lineStart,line:e.line})}function hv(e,t){for(var n,r=0;r<e.lines.length&&!(e.lines[r].start>t);r++)n=e.lines[r];return n||{start:0,line:0}}function ce(e,t,n,r=!1){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;tn(o);)o===9&&e.errors.push(Ms(e,"Using tabs can lead to unpredictable results",!0)),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(at(o))for(Ls(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return n!==-1&&i!==0&&e.lineIndent<n&&qs(e,"deficient indentation"),i}function pr(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&e.input.charCodeAt(t+1)===n&&e.input.charCodeAt(t+2)===n&&(t+=3,n=e.input.charCodeAt(t),n===0||Ue(n)))}function Is(e,t,n){n===1?t.value+=" ":n>1&&(t.value+=Nt.repeat(`
|
|
9
|
+
`,n-1))}function mv(e,t,n){var r,i,o,s,a,c,l,p,m=e.kind,P=e.result,b,T=We.newScalar("",t);if(T.plainScalar=!0,e.result=T,b=e.input.charCodeAt(e.position),Ue(b)||_n(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96)return e.result.startPosition=e.position-1,e.result.endPosition=e.position-1,!1;if((b===63||b===45)&&(i=e.input.charCodeAt(e.position+1),Ue(i)||n&&_n(i)))return!1;for(e.kind="scalar",o=s=e.position,a=!1;b!==0;){if(b===58){if(i=e.input.charCodeAt(e.position+1),Ue(i)||n&&_n(i))break}else if(b===35){if(r=e.input.charCodeAt(e.position-1),Ue(r))break}else{if(e.position===e.lineStart&&pr(e)||n&&_n(b))break;if(at(b))if(c=e.line,l=e.lineStart,p=e.lineIndent,ce(e,!1,-1),e.lineIndent>=t){a=!0,b=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=l,e.lineIndent=p;break}}if(a&&(qt(e,o,s,!1),Is(e,T,e.line-c),o=s=e.position,a=!1),tn(b)||(s=e.position+1),b=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return qt(e,o,s,!1),e.result.startPosition!=-1?(T.rawValue=e.input.substring(T.startPosition,T.endPosition),e.result.endPosition=ce(e,!1,-1)?e.position-1:e.position,!0):(e.kind=m,e.result=P,!1)}function yv(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;var o=We.newScalar("",t);for(o.singleQuoted=!0,e.kind="scalar",e.result=o,o.startPosition=e.position,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(qt(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),o.endPosition=e.position,n===39)r=i=e.position,e.position++;else return!0;else at(n)?(qt(e,r,i,!0),Is(e,o,ce(e,!1,t)),r=i=e.position):e.position===e.lineStart&&pr(e)?W(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position,o.endPosition=e.position);W(e,"unexpected end of the stream within a single quoted scalar")}function bv(e,t){var n,r,i,o,s,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;e.kind="scalar";var l=We.newScalar("",t);for(l.doubleQuoted=!0,e.result=l,l.startPosition=e.position,e.position++,n=r=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return qt(e,n,e.position,!0),e.position++,l.endPosition=e.position,l.rawValue=e.input.substring(l.startPosition,l.endPosition),!0;if(c===92){if(qt(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),at(c))ce(e,!1,t);else if(c<256&&(e.allowAnyEscape?Md[c]:Ts[c]))l.value+=e.allowAnyEscape?As[c]:ks[c],e.position++;else if((s=dv(c))>0){for(i=s,o=0;i>0;i--)c=e.input.charCodeAt(++e.position),(s=lv(c))>=0?o=(o<<4)+s:W(e,"expected hexadecimal character");l.value+=gv(o),e.position++}else W(e,"unknown escape sequence");n=r=e.position}else at(c)?(qt(e,n,r,!0),Is(e,l,ce(e,!1,t)),n=r=e.position):e.position===e.lineStart&&pr(e)?W(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}W(e,"unexpected end of the stream within a double quoted scalar")}function vv(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,a,c,l,p,m,P,b,T,I;if(I=e.input.charCodeAt(e.position),I===91)c=93,m=!1,o=We.newItems(),o.startPosition=e.position;else if(I===123)c=125,m=!0,o=We.newMap(null,t),o.startPosition=e.position;else return!1;for(e.anchor!==null&&(o.anchorId=e.anchor,e.anchorMap[e.anchor]=o),I=e.input.charCodeAt(++e.position);I!==0;){if(ce(e,!0,t),I=e.input.charCodeAt(e.position),I===c)return e.position++,e.tag=i,e.anchor=s,e.kind=m?"mapping":"sequence",e.result=o,o.endPosition=e.position,!0;if(!n){var G=e.position;W(e,"missed comma between flow collection entries"),e.position=G+1}if(b=P=T=null,l=p=!1,I===63&&(a=e.input.charCodeAt(e.position+1),Ue(a)&&(l=p=!0,e.position++,ce(e,!0,t))),r=e.line,Cn(e,t,ti,!1,!0),b=e.tag,P=e.result,ce(e,!0,t),I=e.input.charCodeAt(e.position),(p||e.line===r)&&I===58&&(l=!0,I=e.input.charCodeAt(++e.position),ce(e,!0,t),Cn(e,t,ti,!1,!0),T=e.result),m)en(e,o,b,P,T,t);else if(l){var V=en(e,null,b,P,T,t);V.parent=o,o.items.push(V)}else P&&(P.parent=o),o.items.push(P);o.endPosition=e.position+1,ce(e,!0,t),I=e.input.charCodeAt(e.position),I===44?(n=!0,I=e.input.charCodeAt(++e.position)):n=!1}W(e,"unexpected end of the stream within a flow collection")}function xv(e,t){var n,r,i=ws,o=!1,s=t,a=0,c=!1,l,p;if(p=e.input.charCodeAt(e.position),p===124)r=!1;else if(p===62)r=!0;else return!1;var m=We.newScalar("",t);for(e.kind="scalar",e.result=m,m.startPosition=e.position;p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)ws===i?i=p===43?Td:sv:W(e,"repeat of a chomping mode identifier");else if((l=pv(p))>=0)l===0?W(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?W(e,"repeat of an indentation width identifier"):(s=t+l-1,o=!0);else break;if(tn(p)){do p=e.input.charCodeAt(++e.position);while(tn(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!at(p)&&p!==0)}for(;p!==0;){for(Ls(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),at(p)){a++;continue}if(e.lineIndent<s){i===Td?m.value+=Nt.repeat(`
|
|
10
|
+
`,a):i===ws&&o&&(m.value+=`
|
|
11
|
+
`);break}for(r?tn(p)?(c=!0,m.value+=Nt.repeat(`
|
|
12
|
+
`,a+1)):c?(c=!1,m.value+=Nt.repeat(`
|
|
13
|
+
`,a+1)):a===0?o&&(m.value+=" "):m.value+=Nt.repeat(`
|
|
14
|
+
`,a):o&&(m.value+=Nt.repeat(`
|
|
15
|
+
`,a+1)),o=!0,a=0,n=e.position;!at(p)&&p!==0;)p=e.input.charCodeAt(++e.position);qt(e,n,e.position,!1)}m.endPosition=e.position;for(var P=e.position-1,b=!1;;){var T=e.input[P];if(T=="\r"||T==`
|
|
16
|
+
`){b&&P--;break}if(T!=" "&&T!=" ")break;P--}return m.endPosition=P,m.rawValue=e.input.substring(m.startPosition,m.endPosition),!0}function Ad(e,t){var n,r=e.tag,i=e.anchor,o=We.newItems(),s,a=!1,c;for(e.anchor!==null&&(o.anchorId=e.anchor,e.anchorMap[e.anchor]=o),o.startPosition=e.position,c=e.input.charCodeAt(e.position);c!==0&&!(c!==45||(s=e.input.charCodeAt(e.position+1),!Ue(s)));){if(a=!0,e.position++,ce(e,!0,-1)&&e.lineIndent<=t){o.items.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,Cn(e,t,qd,!1,!0),e.result&&(e.result.parent=o,o.items.push(e.result)),o.endPosition=ce(e,!0,t,!0)?e.position-1:e.position,c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)W(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function Pv(e,t,n){var r,i,o,s=e.tag,a=e.anchor,c=We.newMap(null,t),l=null,p=null,m=null,P=!1,b=!1,T;for(c.startPosition=e.position,e.anchor!==null&&(c.anchorId=e.anchor,e.anchorMap[e.anchor]=c),T=e.input.charCodeAt(e.position);T!==0;){if(r=e.input.charCodeAt(e.position+1),o=e.line,(T===63||T===58)&&Ue(r))T===63?(P&&(en(e,c,l,p,null,t),l=p=m=null),b=!0,P=!0,i=!0):P?(P=!1,i=!0):W(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,T=r;else if(Cn(e,n,Nd,!1,!0))if(e.line===o){for(T=e.input.charCodeAt(e.position);tn(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),Ue(T)||W(e,"a whitespace character is expected after the key-value separator within a block mapping"),P&&(en(e,c,l,p,null,t),l=p=m=null),b=!0,P=!1,i=!1,l=e.tag,p=e.result;else{if(e.position==e.lineStart&&pr(e))break;if(b)W(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=a,!0}}else if(b){for(W(e,"can not read a block mapping entry; a multiline key may not be an implicit key");e.position>0;)if(T=e.input.charCodeAt(--e.position),at(T)){e.position++;break}p=e.result,p.value=e.input.substring(e.result.startPosition,e.position-1),p.rawValue=p.value,p.endPosition=e.position-1,en(e,c,l,p,null,t)}else return e.tag=s,e.anchor=a,!0;else break;if(e.line===o||e.lineIndent>t){let I=e.line;Cn(e,t,ni,!0,i)?(ce(e,!0,t),P?p=e.result:(m=e.result,m.endPosition=e.line===I?e.position:e.position-1)):p&&(p.endPosition=e.line===I?e.position:e.position-1),P||(en(e,c,l,p,m,t),l=p=m=null),ce(e,!0,-1),T=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&T!==0)W(e,"bad indentation of a mapping entry"+e.position),T=e.input.charCodeAt(++e.position),ce(e,!0,-1);else if(e.lineIndent<t)break}return P&&en(e,c,l,p,null,t),b&&(e.tag=s,e.anchor=a,e.kind="mapping",e.result=c),b}function _v(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&W(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):W(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Ue(s);)s===33&&(r?W(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),Ed.test(i)||W(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),uv.test(o)&&W(e,"tag suffix cannot contain flow indicator characters")}return o&&!jd.test(o)&&W(e,"tag name cannot contain such characters: "+o),n?e.tag=o:ri.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:W(e,'undeclared tag handle "'+i+'"'),!0}function Cv(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&W(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Ue(n)&&!_n(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&W(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Dv(e){var t,n,r=e.length,i=e.input,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!Ue(o)&&!_n(o);)o=e.input.charCodeAt(++e.position);return e.position<=t&&(W(e,"name of an alias node must contain at least one character"),e.position=t+1),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||(W(e,'unidentified alias "'+n+'"'),e.position<=t&&(e.position=t+1)),e.result=We.newAnchorRef(n,t,e.position,e.anchorMap[n],0),ce(e,!0,-1),!0}function Cn(e,t,n,r,i){var o,s,a,c=1,l=!1,p=!1,m,P,b,T,I,G;e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=a=ni===n||qd===n,r&&ce(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1));let V=e.position;if(c===1)for(;_v(e)||Cv(e);)ce(e,!0,-1)?(l=!0,a=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=l||i),(c===1||ni===n)&&(ti===n||Nd===n?T=t:T=t+1,I=e.position-e.lineStart,c===1?a&&(Ad(e,I)||Pv(e,I,T))||vv(e,T)?p=!0:(s&&xv(e,T)||yv(e,T)||bv(e,T)?p=!0:Dv(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&W(e,"alias node should not have any properties")):mv(e,T,ti===n)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result,e.result.anchorId=e.anchor)):c===0&&(p=a&&Ad(e,I))),e.tag!==null&&e.tag!=="!")if(e.tag=="!include")e.result||(e.result=We.newScalar("",I),e.result.startPosition=e.position,e.result.endPosition=e.position,W(e,"!include without value")),e.result.kind=We.Kind.INCLUDE_REF;else if(e.tag==="?")for(m=0,P=e.implicitTypes.length;m<P;m+=1){b=e.implicitTypes[m];var h=e.result.value;if(b.resolve(h)){e.result.valueObject=b.construct(e.result.value),e.tag=b.tag,e.anchor!==null&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result);break}}else ri.call(e.typeMap,e.tag)?(b=e.typeMap[e.tag],e.result!==null&&b.kind!==e.kind&&(!b.additionalKinds||b.additionalKinds&&b.additionalKinds.indexOf(e.kind)===-1)&&W(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result)?(e.result=b.construct(e.result),e.anchor!==null&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):W(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):Ns(e,V,"unknown tag <"+e.tag+">",!1,!0);return e.tag!==null||e.anchor!==null||p}function Rv(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(ce(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Ue(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&W(e,"directive name must not be less than one character in length");s!==0;){for(;tn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!at(s));break}if(at(s))break;for(n=e.position;s!==0&&!Ue(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&Ls(e),ri.call(kd,r)?kd[r](e,r,i):(qs(e,'unknown document directive "'+r+'"'),e.position++)}if(ce(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ce(e,!0,-1)):o&&W(e,"directives end mark is expected"),Cn(e,e.lineIndent-1,ni,!1,!0),ce(e,!0,-1),e.checkLineBreaks&&cv.test(e.input.slice(t,e.position))&&qs(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&pr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ce(e,!0,-1));return}if(e.position<e.length-1)W(e,"end of the stream or a document separator is expected");else return}function Ld(e,t){e=String(e),t=t||{};let n=e.length;n!==0&&(e.charCodeAt(n-1)!==10&&e.charCodeAt(n-1)!==13&&(e+=`
|
|
17
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Os(e,t);for(r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;){var i=r.position;if(Rv(r),r.position<=i)for(;r.position<r.length-1;r.position++){var o=r.input.charAt(r.position);if(o==`
|
|
18
|
+
`)break}}let s=r.documents,a=s.length;a>0&&(s[a-1].endPosition=n);for(let c of s)c.errors=r.errors,c.startPosition>c.endPosition&&(c.startPosition=c.endPosition);return s}function Fs(e,t,n={}){var r=Ld(e,n),i,o;for(i=0,o=r.length;i<o;i+=1)t(r[i])}ft.loadAll=Fs;function Us(e,t={}){var n=Ld(e,t),r,i;if(n.length!==0){if(n.length===1)return n[0];var o=new Es("expected a single document in the stream, but found more");return o.mark=new js("","",0,0,0),o.mark.position=n[0].endPosition,n[0].errors.push(o),n[0]}}ft.load=Us;function Id(e,t,n={}){Fs(e,t,Nt.extend({schema:Od},n))}ft.safeLoadAll=Id;function Fd(e,t={}){return Us(e,Nt.extend({schema:Od},t))}ft.safeLoad=Fd;fr.exports.loadAll=Fs;fr.exports.load=Us;fr.exports.safeLoadAll=Id;fr.exports.safeLoad=Fd});var Yd=D(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.safeDump=Dn.dump=void 0;var gr=Zt(),Vs=xn(),Sv=Ss(),wv=ei(),Ys=Object.prototype.toString,zd=Object.prototype.hasOwnProperty,Tv=9,nn=10,kv=13,Ws=32,Av=33,Bs=34,Ov=35,Nv=37,qv=38,Hs=39,Ev=42,jv=44,Mv=45,Lv=58,Iv=62,Fv=63,Uv=64,Wv=91,Bv=93,Hv=96,zv=123,$v=124,Vv=125,Re={};Re[0]="\\0";Re[7]="\\a";Re[8]="\\b";Re[9]="\\t";Re[10]="\\n";Re[11]="\\v";Re[12]="\\f";Re[13]="\\r";Re[27]="\\e";Re[34]='\\"';Re[92]="\\\\";Re[133]="\\N";Re[160]="\\_";Re[8232]="\\L";Re[8233]="\\P";var Yv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Gv(e,t){var n,r,i,o,s,a,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap[s],c&&zd.call(c.styleAliases,a)&&(a=c.styleAliases[a]),n[s]=a;return n}function Kv(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Vs("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+gr.repeat("0",r-t.length)+t}function Qv(e){this.schema=e.schema||Sv,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=gr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Gv(this.schema,e.styles||null),this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Wd(e,t){for(var n=gr.repeat(" ",t),r=0,i=-1,o="",s,a=e.length;r<a;)i=e.indexOf(`
|
|
19
|
+
`,r),i===-1?(s=e.slice(r),r=a):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
|
|
20
|
+
`&&(o+=n),o+=s;return o}function zs(e,t){return`
|
|
21
|
+
`+gr.repeat(" ",e.indent*t)}function Jv(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function ii(e){this.source=e,this.result="",this.checkpoint=0}ii.prototype.takeUpTo=function(e){var t;if(e<this.checkpoint)throw t=new Error("position should be > checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this};ii.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=Re[e]||Kv(e),this.result+=t,this.checkpoint+=1,this};ii.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)};function Xv(e,t,n){var r,i,o,s,a,c,l,p,m,P,b,T,I,G,V,h,g,S,$,X,ot;if(t.length===0){e.dump="''";return}if(t.indexOf("!include")==0){e.dump=""+t;return}if(t.indexOf("!$$$novalue")==0){e.dump="";return}if(Yv.indexOf(t)!==-1){e.dump="'"+t+"'";return}for(r=!0,i=t.length?t.charCodeAt(0):0,o=Ws===i||Ws===t.charCodeAt(t.length-1),(Mv===i||Fv===i||Uv===i||Hv===i)&&(r=!1),o?(r=!1,s=!1,a=!1):(s=!0,a=!0),c=!0,l=new ii(t),p=!1,m=0,P=0,b=e.indent*n,T=80,b<40?T-=b:T=40,G=0;G<t.length;G++){if(I=t.charCodeAt(G),r)if(!ex(I))r=!1;else continue;c&&I===Hs&&(c=!1),V=Re[I],h=$d(I),!(!V&&!h)&&(I!==nn&&I!==Bs&&I!==Hs?(s=!1,a=!1):I===nn&&(p=!0,c=!1,G>0&&(g=t.charCodeAt(G-1),g===Ws&&(a=!1,s=!1)),s&&(S=G-m,m=G,S>P&&(P=S))),I!==Bs&&(c=!1),l.takeUpTo(G),l.escapeChar())}if(r&&Jv(e,t)&&(r=!1),$="",(s||a)&&(X=0,t.charCodeAt(t.length-1)===nn&&(X+=1,t.charCodeAt(t.length-2)===nn&&(X+=1)),X===0?$="-":X===2&&($="+")),a&&P<T&&(s=!1),p||(a=!1),r)e.dump=t;else if(c)e.dump="'"+t+"'";else if(s)ot=Zv(t,T),e.dump=">"+$+`
|
|
22
|
+
`+Wd(ot,b);else if(a)$||(t=t.replace(/\n$/,"")),e.dump="|"+$+`
|
|
23
|
+
`+Wd(t,b);else if(l)l.finish(),e.dump='"'+l.result+'"';else throw new Error("Failed to dump scalar value")}function Zv(e,t){var n="",r=0,i=e.length,o=/\n+$/.exec(e),s;for(o&&(i=o.index+1);r<i;)s=e.indexOf(`
|
|
24
24
|
`,r),s>i||s===-1?(n&&(n+=`
|
|
25
25
|
|
|
26
|
-
`),n+=
|
|
26
|
+
`),n+=Bd(e.slice(r,i),t),r=i):(n&&(n+=`
|
|
27
27
|
|
|
28
|
-
`),n+=
|
|
29
|
-
`&&(n+=o[0]),n}function
|
|
30
|
-
`),
|
|
28
|
+
`),n+=Bd(e.slice(r,s),t),r=s+1);return o&&o[0]!==`
|
|
29
|
+
`&&(n+=o[0]),n}function Bd(e,t){if(e==="")return e;for(var n=/[^\s] [^\s]/g,r="",i=0,o=0,s=n.exec(e),a,c,l;s;)a=s.index,a-o>t&&(i!==o?c=i:c=a,r&&(r+=`
|
|
30
|
+
`),l=e.slice(o,c),r+=l,o=c+1),i=a+1,s=n.exec(e);return r&&(r+=`
|
|
31
31
|
`),o!==i&&e.length-o>t?r+=e.slice(o,i)+`
|
|
32
|
-
`+e.slice(i+1):r+=e.slice(o),r}function
|
|
33
|
-
`:"")+e.dump)):(
|
|
34
|
-
`:"")+e.dump)):(
|
|
35
|
-
`:""}jn.dump=kl;function Ch(e,t){return kl(e,mr.extend({schema:Wm},t))}jn.safeDump=Ch});var ql=A(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.determineScalarType=et.ScalarType=et.parseYamlFloat=et.parseYamlInteger=et.parseYamlBoolean=void 0;function Ph(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`}et.parseYamlBoolean=Ph;function _h(e){return e.lastIndexOf("0o",0)===0?parseInt(e.substring(2),8):parseInt(e)}function Dh(e){let t=_h(e);if(isNaN(t))throw`Invalid integer "${e}"`;return t}et.parseYamlInteger=Dh;function Rh(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;let n=/^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e);if(n)return n[1]==="-"?-1/0:1/0;let r=parseFloat(e);if(!isNaN(r))return r;throw`Invalid float "${e}"`}et.parseYamlFloat=Rh;var Ft;(function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"})(Ft=et.ScalarType||(et.ScalarType={}));function Sh(e){if(e===void 0)return Ft.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return Ft.string;let t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0||t==null)return Ft.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return Ft.bool;let n=/^[-+]?[0-9]+$/,r=/^0o[0-7]+$/,i=/^0x[0-9a-fA-F]+$/;if(n.test(t)||r.test(t)||i.test(t))return Ft.int;let o=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/,s=/^[-+]?(\.inf|\.Inf|\.INF)$/;return o.test(t)||s.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?Ft.float:Ft.string}et.determineScalarType=Sh});var hr=A(Re=>{"use strict";var Th=Re&&Re.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Nl=Re&&Re.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Th(t,e,n)};Object.defineProperty(Re,"__esModule",{value:!0});Re.safeDump=Re.dump=Re.safeLoadAll=Re.safeLoad=Re.loadAll=Re.load=void 0;var di=Dl();Object.defineProperty(Re,"load",{enumerable:!0,get:function(){return di.load}});Object.defineProperty(Re,"loadAll",{enumerable:!0,get:function(){return di.loadAll}});Object.defineProperty(Re,"safeLoad",{enumerable:!0,get:function(){return di.safeLoad}});Object.defineProperty(Re,"safeLoadAll",{enumerable:!0,get:function(){return di.safeLoadAll}});var Ol=Al();Object.defineProperty(Re,"dump",{enumerable:!0,get:function(){return Ol.dump}});Object.defineProperty(Re,"safeDump",{enumerable:!0,get:function(){return Ol.safeDump}});Re.YAMLException=Nn();Nl(Lt(),Re);Nl(ql(),Re)});var Vn=A(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.stringArray=Be.array=Be.func=Be.error=Be.number=Be.string=Be.boolean=void 0;function ub(e){return e===!0||e===!1}Be.boolean=ub;function cd(e){return typeof e=="string"||e instanceof String}Be.string=cd;function lb(e){return typeof e=="number"||e instanceof Number}Be.number=lb;function db(e){return e instanceof Error}Be.error=db;function fb(e){return typeof e=="function"}Be.func=fb;function ud(e){return Array.isArray(e)}Be.array=ud;function pb(e){return ud(e)&&e.every(t=>cd(t))}Be.stringArray=pb});var xa=A(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.Message=H.NotificationType9=H.NotificationType8=H.NotificationType7=H.NotificationType6=H.NotificationType5=H.NotificationType4=H.NotificationType3=H.NotificationType2=H.NotificationType1=H.NotificationType0=H.NotificationType=H.RequestType9=H.RequestType8=H.RequestType7=H.RequestType6=H.RequestType5=H.RequestType4=H.RequestType3=H.RequestType2=H.RequestType1=H.RequestType=H.RequestType0=H.AbstractMessageSignature=H.ParameterStructures=H.ResponseError=H.ErrorCodes=void 0;var vn=Vn(),ld;(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})(ld=H.ErrorCodes||(H.ErrorCodes={}));var ia=class e extends Error{constructor(t,n,r){super(n),this.code=vn.number(t)?t:ld.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,e.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};H.ResponseError=ia;var Ze=class e{constructor(t){this.kind=t}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};H.ParameterStructures=Ze;Ze.auto=new Ze("auto");Ze.byPosition=new Ze("byPosition");Ze.byName=new Ze("byName");var pe=class{constructor(t,n){this.method=t,this.numberOfParams=n}get parameterStructures(){return Ze.auto}};H.AbstractMessageSignature=pe;var oa=class extends pe{constructor(t){super(t,0)}};H.RequestType0=oa;var sa=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.RequestType=sa;var aa=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.RequestType1=aa;var ca=class extends pe{constructor(t){super(t,2)}};H.RequestType2=ca;var ua=class extends pe{constructor(t){super(t,3)}};H.RequestType3=ua;var la=class extends pe{constructor(t){super(t,4)}};H.RequestType4=la;var da=class extends pe{constructor(t){super(t,5)}};H.RequestType5=da;var fa=class extends pe{constructor(t){super(t,6)}};H.RequestType6=fa;var pa=class extends pe{constructor(t){super(t,7)}};H.RequestType7=pa;var ga=class extends pe{constructor(t){super(t,8)}};H.RequestType8=ga;var ma=class extends pe{constructor(t){super(t,9)}};H.RequestType9=ma;var ha=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.NotificationType=ha;var ya=class extends pe{constructor(t){super(t,0)}};H.NotificationType0=ya;var ba=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.NotificationType1=ba;var va=class extends pe{constructor(t){super(t,2)}};H.NotificationType2=va;var Ca=class extends pe{constructor(t){super(t,3)}};H.NotificationType3=Ca;var Pa=class extends pe{constructor(t){super(t,4)}};H.NotificationType4=Pa;var _a=class extends pe{constructor(t){super(t,5)}};H.NotificationType5=_a;var Da=class extends pe{constructor(t){super(t,6)}};H.NotificationType6=Da;var Ra=class extends pe{constructor(t){super(t,7)}};H.NotificationType7=Ra;var Sa=class extends pe{constructor(t){super(t,8)}};H.NotificationType8=Sa;var Ta=class extends pe{constructor(t){super(t,9)}};H.NotificationType9=Ta;var gb;(function(e){function t(i){let o=i;return o&&vn.string(o.method)&&(vn.string(o.id)||vn.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&vn.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(vn.string(o.id)||vn.number(o.id)||o.id===null)}e.isResponse=r})(gb=H.Message||(H.Message={}))});var ka=A(Wt=>{"use strict";var dd;Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=Wt.LinkedMap=Wt.Touch=void 0;var Ve;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Ve=Wt.Touch||(Wt.Touch={}));var Hi=class{constructor(){this[dd]="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(t){return this._map.has(t)}get(t,n=Ve.None){let r=this._map.get(t);if(r)return n!==Ve.None&&this.touch(r,n),r.value}set(t,n,r=Ve.None){let i=this._map.get(t);if(i)i.value=n,r!==Ve.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case Ve.None:this.addItemLast(i);break;case Ve.First:this.addItemFirst(i);break;case Ve.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(dd=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Ve.First&&n!==Ve.Last)){if(n===Ve.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===Ve.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};Wt.LinkedMap=Hi;var wa=class extends Hi{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=Ve.AsNew){return super.get(t,n)}peek(t){return super.get(t,Ve.None)}set(t,n){return super.set(t,n,Ve.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Wt.LRUCache=wa});var fd=A(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.Disposable=void 0;var mb;(function(e){function t(n){return{dispose:n}}e.create=t})(mb=Pr.Disposable||(Pr.Disposable={}))});var Zt=A(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var Aa;function qa(){if(Aa===void 0)throw new Error("No runtime abstraction layer installed");return Aa}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Aa=n}e.install=t})(qa||(qa={}));Na.default=qa});var $n=A(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.Emitter=Cn.Event=void 0;var hb=Zt(),yb;(function(e){let t={dispose(){}};e.None=function(){return t}})(yb=Cn.Event||(Cn.Event={}));var Oa=class{add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(u){(0,hb.default)().console.error(u)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Bi=class e{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new Oa),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Cn.Emitter=Bi;Bi._noop=function(){}});var Vi=A(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.CancellationTokenSource=Pn.CancellationToken=void 0;var bb=Zt(),vb=Vn(),Ea=$n(),Ma;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ea.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ea.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||vb.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Ma=Pn.CancellationToken||(Pn.CancellationToken={}));var Cb=Object.freeze(function(e,t){let n=(0,bb.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),zi=class{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?Cb:(this._emitter||(this._emitter=new Ea.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ja=class{get token(){return this._token||(this._token=new zi),this._token}cancel(){this._token?this._token.cancel():this._token=Ma.Cancelled}dispose(){this._token?this._token instanceof zi&&this._token.dispose():this._token=Ma.None}};Pn.CancellationTokenSource=ja});var pd=A(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.SharedArrayReceiverStrategy=Yn.SharedArraySenderStrategy=void 0;var Pb=Vi(),_r;(function(e){e.Continue=0,e.Cancelled=1})(_r||(_r={}));var Ia=class{constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=_r.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,_r.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Yn.SharedArraySenderStrategy=Ia;var La=class{constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===_r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Fa=class{constructor(t){this.token=new La(t)}cancel(){}dispose(){}},Ua=class{constructor(){this.kind="request"}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Pb.CancellationTokenSource:new Fa(n)}};Yn.SharedArrayReceiverStrategy=Ua});var Ha=A($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.Semaphore=void 0;var _b=Zt(),Wa=class{constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,_b.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};$i.Semaphore=Wa});var gd=A(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.ReadableStreamMessageReader=Ht.AbstractMessageReader=Ht.MessageReader=void 0;var za=Zt(),Kn=Vn(),Ba=$n(),Db=Ha(),Rb;(function(e){function t(n){let r=n;return r&&Kn.func(r.listen)&&Kn.func(r.dispose)&&Kn.func(r.onError)&&Kn.func(r.onClose)&&Kn.func(r.onPartialMessage)}e.is=t})(Rb=Ht.MessageReader||(Ht.MessageReader={}));var Yi=class{constructor(){this.errorEmitter=new Ba.Emitter,this.closeEmitter=new Ba.Emitter,this.partialMessageEmitter=new Ba.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${Kn.string(t.message)?t.message:"unknown"}`)}};Ht.AbstractMessageReader=Yi;var Va;(function(e){function t(n){let r,i,o,s=new Map,u,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let p of n.contentDecoders)s.set(p.name,p);if(n.contentTypeDecoder!==void 0&&(u=n.contentTypeDecoder,c.set(u.name,u)),n.contentTypeDecoders!==void 0)for(let p of n.contentTypeDecoders)c.set(p.name,p)}return u===void 0&&(u=(0,za.default)().applicationJson.decoder,c.set(u.name,u)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:u,contentTypeDecoders:c}}e.fromOptions=t})(Va||(Va={}));var $a=class extends Yi{constructor(t,n){super(),this.readable=t,this.options=Va.fromOptions(n),this.buffer=(0,za.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new Db.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,za.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Ht.ReadableStreamMessageReader=$a});var bd=A(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.WriteableStreamMessageWriter=Bt.AbstractMessageWriter=Bt.MessageWriter=void 0;var md=Zt(),Dr=Vn(),Sb=Ha(),hd=$n(),Tb="Content-Length: ",yd=`\r
|
|
36
|
-
|
|
37
|
-
`,Ga=class{constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let p=this._chunks[r];for(i=0;i<p.length;){switch(p[i]){case wb:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case kb:switch(n){case 1:n=2;break;case 3:n=4,i++;break e;default:n=0}break;default:n=0}i++}o+=p.byteLength,r++}if(n!==4)return;let s=this._read(o+i),u=new Map,c=this.toString(s,"ascii").split(Ab);if(c.length<2)return u;for(let p=0;p<c.length-2;p++){let g=c[p],b=g.indexOf(":");if(b===-1)throw new Error("Message header must separate key and value using :");let D=g.substr(0,b),R=g.substr(b+1).trim();u.set(t?D.toLowerCase():D,R)}return u}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(t===0)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(o)}if(this._chunks[0].byteLength>t){let o=this._chunks[0],s=this.asNative(o,t);return this._chunks[0]=o.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,i=0;for(;t>0;){let o=this._chunks[i];if(o.byteLength>t){let s=o.slice(0,t);n.set(s,r),r+=t,this._chunks[i]=o.slice(t),this._totalLength-=t,t-=t}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,t-=o.byteLength}return n}};Gi.AbstractMessageBuffer=Ga});var Td=A(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.createMessageConnection=U.ConnectionOptions=U.MessageStrategy=U.CancellationStrategy=U.CancellationSenderStrategy=U.CancellationReceiverStrategy=U.RequestCancellationReceiverStrategy=U.IdCancellationReceiverStrategy=U.ConnectionStrategy=U.ConnectionError=U.ConnectionErrors=U.LogTraceNotification=U.SetTraceNotification=U.TraceFormat=U.TraceValues=U.Trace=U.NullLogger=U.ProgressType=U.ProgressToken=void 0;var Cd=Zt(),ye=Vn(),V=xa(),Pd=ka(),Rr=$n(),Qa=Vi(),Tr;(function(e){e.type=new V.NotificationType("$/cancelRequest")})(Tr||(Tr={}));var _d;(function(e){function t(n){return typeof n=="string"||typeof n=="number"}e.is=t})(_d=U.ProgressToken||(U.ProgressToken={}));var Sr;(function(e){e.type=new V.NotificationType("$/progress")})(Sr||(Sr={}));var Ja=class{constructor(){}};U.ProgressType=Ja;var Xa;(function(e){function t(n){return ye.func(n)}e.is=t})(Xa||(Xa={}));U.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var oe;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(oe=U.Trace||(U.Trace={}));var qb;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(qb=U.TraceValues||(U.TraceValues={}));(function(e){function t(r){if(!ye.string(r))return e.Off;switch(r=r.toLowerCase(),r){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.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(oe=U.Trace||(U.Trace={}));var ht;(function(e){e.Text="text",e.JSON="json"})(ht=U.TraceFormat||(U.TraceFormat={}));(function(e){function t(n){return ye.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(ht=U.TraceFormat||(U.TraceFormat={}));var Dd;(function(e){e.type=new V.NotificationType("$/setTrace")})(Dd=U.SetTraceNotification||(U.SetTraceNotification={}));var Za;(function(e){e.type=new V.NotificationType("$/logTrace")})(Za=U.LogTraceNotification||(U.LogTraceNotification={}));var Qi;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Qi=U.ConnectionErrors||(U.ConnectionErrors={}));var Gn=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};U.ConnectionError=Gn;var Rd;(function(e){function t(n){let r=n;return r&&ye.func(r.cancelUndispatched)}e.is=t})(Rd=U.ConnectionStrategy||(U.ConnectionStrategy={}));var nc;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&ye.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ye.func(r.dispose))}e.is=t})(nc=U.IdCancellationReceiverStrategy||(U.IdCancellationReceiverStrategy={}));var Sd;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&ye.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ye.func(r.dispose))}e.is=t})(Sd=U.RequestCancellationReceiverStrategy||(U.RequestCancellationReceiverStrategy={}));var ec;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Qa.CancellationTokenSource}});function t(n){return nc.is(n)||Sd.is(n)}e.is=t})(ec=U.CancellationReceiverStrategy||(U.CancellationReceiverStrategy={}));var tc;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Tr.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&ye.func(r.sendCancellation)&&ye.func(r.cleanup)}e.is=t})(tc=U.CancellationSenderStrategy||(U.CancellationSenderStrategy={}));var rc;(function(e){e.Message=Object.freeze({receiver:ec.Message,sender:tc.Message});function t(n){let r=n;return r&&ec.is(r.receiver)&&tc.is(r.sender)}e.is=t})(rc=U.CancellationStrategy||(U.CancellationStrategy={}));var ic;(function(e){function t(n){let r=n;return r&&ye.func(r.handleMessage)}e.is=t})(ic=U.MessageStrategy||(U.MessageStrategy={}));var Nb;(function(e){function t(n){let r=n;return r&&(rc.is(r.cancellationStrategy)||Rd.is(r.connectionStrategy)||ic.is(r.messageStrategy))}e.is=t})(Nb=U.ConnectionOptions||(U.ConnectionOptions={}));var yt;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(yt||(yt={}));function Ob(e,t,n,r){let i=n!==void 0?n:U.NullLogger,o=0,s=0,u=0,c="2.0",p,g=new Map,b,D=new Map,R=new Map,T,q=new Pd.LinkedMap,B=new Map,I=new Set,_=new Map,v=oe.Off,N=ht.Text,z,J=yt.New,ae=new Rr.Emitter,He=new Rr.Emitter,dt=new Rr.Emitter,ft=new Rr.Emitter,j=new Rr.Emitter,x=r&&r.cancellationStrategy?r.cancellationStrategy:rc.Message;function W(m){if(m===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+m.toString()}function L(m){return m===null?"res-unknown-"+(++u).toString():"res-"+m.toString()}function ne(){return"not-"+(++s).toString()}function Q(m,w){V.Message.isRequest(w)?m.set(W(w.id),w):V.Message.isResponse(w)?m.set(L(w.id),w):m.set(ne(),w)}function K(m){}function ze(){return J===yt.Listening}function we(){return J===yt.Closed}function se(){return J===yt.Disposed}function St(){(J===yt.New||J===yt.Listening)&&(J=yt.Closed,He.fire(void 0))}function xn(m){ae.fire([m,void 0,void 0])}function Ko(m){ae.fire(m)}e.onClose(St),e.onError(xn),t.onClose(St),t.onError(Ko);function Yr(){T||q.size===0||(T=(0,Cd.default)().timer.setImmediate(()=>{T=void 0,Go()}))}function Kr(m){V.Message.isRequest(m)?Jo(m):V.Message.isNotification(m)?Zo(m):V.Message.isResponse(m)?Xo(m):cr(m)}function Go(){if(q.size===0)return;let m=q.shift();try{let w=r?.messageStrategy;ic.is(w)?w.handleMessage(m,Kr):Kr(m)}finally{Yr()}}let Qo=m=>{try{if(V.Message.isNotification(m)&&m.method===Tr.type.method){let w=m.params.id,E=W(w),F=q.get(E);if(V.Message.isRequest(F)){let ie=r?.connectionStrategy,ge=ie&&ie.cancelUndispatched?ie.cancelUndispatched(F,K):void 0;if(ge&&(ge.error!==void 0||ge.result!==void 0)){q.delete(E),_.delete(w),ge.id=F.id,wn(ge,m.method,Date.now()),t.write(ge).catch(()=>i.error("Sending response for canceled message failed."));return}}let ce=_.get(w);if(ce!==void 0){ce.cancel(),ur(m);return}else I.add(w)}Q(q,m)}finally{Yr()}};function Jo(m){if(se())return;function w(X,ue,re){let _e={jsonrpc:c,id:m.id};X instanceof V.ResponseError?_e.error=X.toJson():_e.result=X===void 0?null:X,wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function E(X,ue,re){let _e={jsonrpc:c,id:m.id,error:X.toJson()};wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function F(X,ue,re){X===void 0&&(X=null);let _e={jsonrpc:c,id:m.id,result:X};wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}ns(m);let ce=g.get(m.method),ie,ge;ce&&(ie=ce.type,ge=ce.handler);let me=Date.now();if(ge||p){let X=m.id??String(Date.now()),ue=nc.is(x.receiver)?x.receiver.createCancellationTokenSource(X):x.receiver.createCancellationTokenSource(m);m.id!==null&&I.has(m.id)&&ue.cancel(),m.id!==null&&_.set(X,ue);try{let re;if(ge)if(m.params===void 0){if(ie!==void 0&&ie.numberOfParams!==0){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines ${ie.numberOfParams} params but received none.`),m.method,me);return}re=ge(ue.token)}else if(Array.isArray(m.params)){if(ie!==void 0&&ie.parameterStructures===V.ParameterStructures.byName){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by name but received parameters by position`),m.method,me);return}re=ge(...m.params,ue.token)}else{if(ie!==void 0&&ie.parameterStructures===V.ParameterStructures.byPosition){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by position but received parameters by name`),m.method,me);return}re=ge(m.params,ue.token)}else p&&(re=p(m.method,m.params,ue.token));let _e=re;re?_e.then?_e.then(Me=>{_.delete(X),w(Me,m.method,me)},Me=>{_.delete(X),Me instanceof V.ResponseError?E(Me,m.method,me):Me&&ye.string(Me.message)?E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${Me.message}`),m.method,me):E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,me)}):(_.delete(X),w(re,m.method,me)):(_.delete(X),F(re,m.method,me))}catch(re){_.delete(X),re instanceof V.ResponseError?w(re,m.method,me):re&&ye.string(re.message)?E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${re.message}`),m.method,me):E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,me)}}else E(new V.ResponseError(V.ErrorCodes.MethodNotFound,`Unhandled method ${m.method}`),m.method,me)}function Xo(m){if(!se())if(m.id===null)m.error?i.error(`Received response message without id: Error is:
|
|
38
|
-
|
|
39
|
-
${
|
|
32
|
+
`+e.slice(i+1):r+=e.slice(o),r}function ex(e){return Tv!==e&&nn!==e&&kv!==e&&jv!==e&&Wv!==e&&Bv!==e&&zv!==e&&Vv!==e&&Ov!==e&&qv!==e&&Ev!==e&&Av!==e&&$v!==e&&Iv!==e&&Hs!==e&&Bs!==e&&Nv!==e&&Lv!==e&&!Re[e]&&!$d(e)}function $d(e){return!(32<=e&&e<=126||e===133||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function tx(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)rn(e,t,n[o],!1,!1)&&(o!==0&&(r+=", "),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function nx(e,t,n,r){var i="",o=e.tag,s,a;for(s=0,a=n.length;s<a;s+=1)rn(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=zs(e,t)),i+="- "+e.dump);e.tag=o,e.dump=i||"[]"}function rx(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,a,c,l,p;for(s=0,a=o.length;s<a;s+=1)p="",s!==0&&(p+=", "),c=o[s],l=n[c],rn(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+": ",rn(e,t,l,!1,!1)&&(p+=e.dump,r+=p));e.tag=i,e.dump="{"+r+"}"}function ix(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),a,c,l,p,m,P;for(a=0,c=s.length;a<c;a+=1)P="",(!r||a!==0)&&(P+=zs(e,t)),l=s[a],p=n[l],rn(e,t+1,l,!0,!0)&&(m=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,m&&(e.dump&&nn===e.dump.charCodeAt(0)?P+="?":P+="? "),P+=e.dump,m&&(P+=zs(e,t)),rn(e,t+1,p,!0,m)&&(e.dump&&nn===e.dump.charCodeAt(0)?P+=":":P+=": ",P+=e.dump,i+=P));e.tag=o,e.dump=i||"{}"}function Hd(e,t,n){var r,i,o,s,a,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,Ys.call(a.represent)==="[object Function]")r=a.represent(t,c);else if(zd.call(a.represent,c))r=a.represent[c](t,c);else throw new Vs("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function rn(e,t,n,r,i){e.tag=null,e.dump=n,Hd(e,n,!1)||Hd(e,n,!0);var o=Ys.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t),(e.tag!==null&&e.tag!=="?"||e.indent!==2&&t>0)&&(i=!1);var s=o==="[object Object]"||o==="[object Array]",a,c;if(s&&(a=e.duplicates.indexOf(n),c=a!==-1),c&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(s&&c&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(ix(e,t,e.dump,i),c&&(e.dump="&ref_"+a+(t===0?`
|
|
33
|
+
`:"")+e.dump)):(rx(e,t,e.dump),c&&(e.dump="&ref_"+a+" "+e.dump));else if(o==="[object Array]")r&&e.dump.length!==0?(nx(e,t,e.dump,i),c&&(e.dump="&ref_"+a+(t===0?`
|
|
34
|
+
`:"")+e.dump)):(tx(e,t,e.dump),c&&(e.dump="&ref_"+a+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Xv(e,e.dump,t);else{if(e.skipInvalid)return!1;throw new Vs("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function ox(e,t){var n=[],r=[],i,o;for($s(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function $s(e,t,n){var r=Ys.call(e),i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)n.indexOf(o)===-1&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)$s(e[o],t,n);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)$s(e[i[o]],t,n)}function Vd(e,t){t=t||{};var n=new Qv(t);return ox(e,n),rn(n,0,e,!0,!0)?n.dump+`
|
|
35
|
+
`:""}Dn.dump=Vd;function sx(e,t){return Vd(e,gr.extend({schema:wv},t))}Dn.safeDump=sx});var Gd=D(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.determineScalarType=Ve.ScalarType=Ve.parseYamlFloat=Ve.parseYamlInteger=Ve.parseYamlBoolean=void 0;function ax(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`}Ve.parseYamlBoolean=ax;function cx(e){return e.lastIndexOf("0o",0)===0?parseInt(e.substring(2),8):parseInt(e)}function ux(e){let t=cx(e);if(isNaN(t))throw`Invalid integer "${e}"`;return t}Ve.parseYamlInteger=ux;function lx(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;let n=/^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e);if(n)return n[1]==="-"?-1/0:1/0;let r=parseFloat(e);if(!isNaN(r))return r;throw`Invalid float "${e}"`}Ve.parseYamlFloat=lx;var Ct;(function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"})(Ct=Ve.ScalarType||(Ve.ScalarType={}));function dx(e){if(e===void 0)return Ct.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return Ct.string;let t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0||t==null)return Ct.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return Ct.bool;let n=/^[-+]?[0-9]+$/,r=/^0o[0-7]+$/,i=/^0x[0-9a-fA-F]+$/;if(n.test(t)||r.test(t)||i.test(t))return Ct.int;let o=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/,s=/^[-+]?(\.inf|\.Inf|\.INF)$/;return o.test(t)||s.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?Ct.float:Ct.string}Ve.determineScalarType=dx});var hr=D(me=>{"use strict";var px=me&&me.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Kd=me&&me.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&px(t,e,n)};Object.defineProperty(me,"__esModule",{value:!0});me.safeDump=me.dump=me.safeLoadAll=me.safeLoad=me.loadAll=me.load=void 0;var oi=Ud();Object.defineProperty(me,"load",{enumerable:!0,get:function(){return oi.load}});Object.defineProperty(me,"loadAll",{enumerable:!0,get:function(){return oi.loadAll}});Object.defineProperty(me,"safeLoad",{enumerable:!0,get:function(){return oi.safeLoad}});Object.defineProperty(me,"safeLoadAll",{enumerable:!0,get:function(){return oi.safeLoadAll}});var Qd=Yd();Object.defineProperty(me,"dump",{enumerable:!0,get:function(){return Qd.dump}});Object.defineProperty(me,"safeDump",{enumerable:!0,get:function(){return Qd.safeDump}});me.YAMLException=xn();Kd(_t(),me);Kd(Gd(),me)});var qn=D(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.stringArray=Ne.array=Ne.func=Ne.error=Ne.number=Ne.string=Ne.boolean=void 0;function KP(e){return e===!0||e===!1}Ne.boolean=KP;function Sp(e){return typeof e=="string"||e instanceof String}Ne.string=Sp;function QP(e){return typeof e=="number"||e instanceof Number}Ne.number=QP;function JP(e){return e instanceof Error}Ne.error=JP;function XP(e){return typeof e=="function"}Ne.func=XP;function wp(e){return Array.isArray(e)}Ne.array=wp;function ZP(e){return wp(e)&&e.every(t=>Sp(t))}Ne.stringArray=ZP});var Fa=D(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.Message=F.NotificationType9=F.NotificationType8=F.NotificationType7=F.NotificationType6=F.NotificationType5=F.NotificationType4=F.NotificationType3=F.NotificationType2=F.NotificationType1=F.NotificationType0=F.NotificationType=F.RequestType9=F.RequestType8=F.RequestType7=F.RequestType6=F.RequestType5=F.RequestType4=F.RequestType3=F.RequestType2=F.RequestType1=F.RequestType=F.RequestType0=F.AbstractMessageSignature=F.ParameterStructures=F.ResponseError=F.ErrorCodes=void 0;var an=qn(),ha;(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})(ha||(F.ErrorCodes=ha={}));var ma=class e extends Error{constructor(t,n,r){super(n),this.code=an.number(t)?t:ha.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,e.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};F.ResponseError=ma;var Be=class e{constructor(t){this.kind=t}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};F.ParameterStructures=Be;Be.auto=new Be("auto");Be.byPosition=new Be("byPosition");Be.byName=new Be("byName");var oe=class{constructor(t,n){this.method=t,this.numberOfParams=n}get parameterStructures(){return Be.auto}};F.AbstractMessageSignature=oe;var ya=class extends oe{constructor(t){super(t,0)}};F.RequestType0=ya;var ba=class extends oe{constructor(t,n=Be.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};F.RequestType=ba;var va=class extends oe{constructor(t,n=Be.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};F.RequestType1=va;var xa=class extends oe{constructor(t){super(t,2)}};F.RequestType2=xa;var Pa=class extends oe{constructor(t){super(t,3)}};F.RequestType3=Pa;var _a=class extends oe{constructor(t){super(t,4)}};F.RequestType4=_a;var Ca=class extends oe{constructor(t){super(t,5)}};F.RequestType5=Ca;var Da=class extends oe{constructor(t){super(t,6)}};F.RequestType6=Da;var Ra=class extends oe{constructor(t){super(t,7)}};F.RequestType7=Ra;var Sa=class extends oe{constructor(t){super(t,8)}};F.RequestType8=Sa;var wa=class extends oe{constructor(t){super(t,9)}};F.RequestType9=wa;var Ta=class extends oe{constructor(t,n=Be.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};F.NotificationType=Ta;var ka=class extends oe{constructor(t){super(t,0)}};F.NotificationType0=ka;var Aa=class extends oe{constructor(t,n=Be.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};F.NotificationType1=Aa;var Oa=class extends oe{constructor(t){super(t,2)}};F.NotificationType2=Oa;var Na=class extends oe{constructor(t){super(t,3)}};F.NotificationType3=Na;var qa=class extends oe{constructor(t){super(t,4)}};F.NotificationType4=qa;var Ea=class extends oe{constructor(t){super(t,5)}};F.NotificationType5=Ea;var ja=class extends oe{constructor(t){super(t,6)}};F.NotificationType6=ja;var Ma=class extends oe{constructor(t){super(t,7)}};F.NotificationType7=Ma;var La=class extends oe{constructor(t){super(t,8)}};F.NotificationType8=La;var Ia=class extends oe{constructor(t){super(t,9)}};F.NotificationType9=Ia;var Tp;(function(e){function t(i){let o=i;return o&&an.string(o.method)&&(an.string(o.id)||an.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&an.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(an.string(o.id)||an.number(o.id)||o.id===null)}e.isResponse=r})(Tp||(F.Message=Tp={}))});var Wa=D(jt=>{"use strict";var kp;Object.defineProperty(jt,"__esModule",{value:!0});jt.LRUCache=jt.LinkedMap=jt.Touch=void 0;var qe;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(qe||(jt.Touch=qe={}));var Mi=class{constructor(){this[kp]="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(t){return this._map.has(t)}get(t,n=qe.None){let r=this._map.get(t);if(r)return n!==qe.None&&this.touch(r,n),r.value}set(t,n,r=qe.None){let i=this._map.get(t);if(i)i.value=n,r!==qe.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case qe.None:this.addItemLast(i);break;case qe.First:this.addItemFirst(i);break;case qe.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(kp=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==qe.First&&n!==qe.Last)){if(n===qe.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===qe.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};jt.LinkedMap=Mi;var Ua=class extends Mi{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=qe.AsNew){return super.get(t,n)}peek(t){return super.get(t,qe.None)}set(t,n){return super.set(t,n,qe.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};jt.LRUCache=Ua});var Op=D(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.Disposable=void 0;var Ap;(function(e){function t(n){return{dispose:n}}e.create=t})(Ap||(Li.Disposable=Ap={}))});var Mt=D(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var Ba;function Ha(){if(Ba===void 0)throw new Error("No runtime abstraction layer installed");return Ba}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Ba=n}e.install=t})(Ha||(Ha={}));za.default=Ha});var jn=D(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.Emitter=En.Event=void 0;var e_=Mt(),Np;(function(e){let t={dispose(){}};e.None=function(){return t}})(Np||(En.Event=Np={}));var $a=class{add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(a){(0,e_.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ii=class e{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new $a),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};En.Emitter=Ii;Ii._noop=function(){}});var Wi=D(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.CancellationTokenSource=Mn.CancellationToken=void 0;var t_=Mt(),n_=qn(),Va=jn(),Fi;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Va.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Va.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||n_.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Fi||(Mn.CancellationToken=Fi={}));var r_=Object.freeze(function(e,t){let n=(0,t_.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),Ui=class{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?r_:(this._emitter||(this._emitter=new Va.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Ya=class{get token(){return this._token||(this._token=new Ui),this._token}cancel(){this._token?this._token.cancel():this._token=Fi.Cancelled}dispose(){this._token?this._token instanceof Ui&&this._token.dispose():this._token=Fi.None}};Mn.CancellationTokenSource=Ya});var qp=D(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.SharedArrayReceiverStrategy=Ln.SharedArraySenderStrategy=void 0;var i_=Wi(),xr;(function(e){e.Continue=0,e.Cancelled=1})(xr||(xr={}));var Ga=class{constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=xr.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,xr.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Ln.SharedArraySenderStrategy=Ga;var Ka=class{constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===xr.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Qa=class{constructor(t){this.token=new Ka(t)}cancel(){}dispose(){}},Ja=class{constructor(){this.kind="request"}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new i_.CancellationTokenSource:new Qa(n)}};Ln.SharedArrayReceiverStrategy=Ja});var Za=D(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.Semaphore=void 0;var o_=Mt(),Xa=class{constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,o_.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Bi.Semaphore=Xa});var jp=D(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.ReadableStreamMessageReader=Lt.AbstractMessageReader=Lt.MessageReader=void 0;var tc=Mt(),In=qn(),ec=jn(),s_=Za(),Ep;(function(e){function t(n){let r=n;return r&&In.func(r.listen)&&In.func(r.dispose)&&In.func(r.onError)&&In.func(r.onClose)&&In.func(r.onPartialMessage)}e.is=t})(Ep||(Lt.MessageReader=Ep={}));var Hi=class{constructor(){this.errorEmitter=new ec.Emitter,this.closeEmitter=new ec.Emitter,this.partialMessageEmitter=new ec.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${In.string(t.message)?t.message:"unknown"}`)}};Lt.AbstractMessageReader=Hi;var nc;(function(e){function t(n){let r,i,o,s=new Map,a,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let l of n.contentDecoders)s.set(l.name,l);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let l of n.contentTypeDecoders)c.set(l.name,l)}return a===void 0&&(a=(0,tc.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}e.fromOptions=t})(nc||(nc={}));var rc=class extends Hi{constructor(t,n){super(),this.readable=t,this.options=nc.fromOptions(n),this.buffer=(0,tc.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s_.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
36
|
+
${JSON.stringify(Object.fromEntries(r))}`));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=o}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,tc.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Lt.ReadableStreamMessageReader=rc});var Up=D(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.WriteableStreamMessageWriter=It.AbstractMessageWriter=It.MessageWriter=void 0;var Mp=Mt(),Pr=qn(),a_=Za(),Lp=jn(),c_="Content-Length: ",Ip=`\r
|
|
37
|
+
`,Fp;(function(e){function t(n){let r=n;return r&&Pr.func(r.dispose)&&Pr.func(r.onClose)&&Pr.func(r.onError)&&Pr.func(r.write)}e.is=t})(Fp||(It.MessageWriter=Fp={}));var zi=class{constructor(){this.errorEmitter=new Lp.Emitter,this.closeEmitter=new Lp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,n,r){this.errorEmitter.fire([this.asError(t),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${Pr.string(t.message)?t.message:"unknown"}`)}};It.AbstractMessageWriter=zi;var ic;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,Mp.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,Mp.default)().applicationJson.encoder}}e.fromOptions=t})(ic||(ic={}));var oc=class extends zi{constructor(t,n){super(),this.writable=t,this.options=ic.fromOptions(n),this.errorCount=0,this.writeSemaphore=new a_.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(c_,r.byteLength.toString(),Ip),i.push(Ip),this.doWrite(t,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,t),Promise.reject(i)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};It.WriteableStreamMessageWriter=oc});var Wp=D($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.AbstractMessageBuffer=void 0;var u_=13,l_=10,d_=`\r
|
|
38
|
+
`,sc=class{constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let l=this._chunks[r];for(i=0;i<l.length;){switch(l[i]){case u_:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case l_:switch(n){case 1:n=2;break;case 3:n=4,i++;break e;default:n=0}break;default:n=0}i++}o+=l.byteLength,r++}if(n!==4)return;let s=this._read(o+i),a=new Map,c=this.toString(s,"ascii").split(d_);if(c.length<2)return a;for(let l=0;l<c.length-2;l++){let p=c[l],m=p.indexOf(":");if(m===-1)throw new Error(`Message header must separate key and value using ':'
|
|
39
|
+
${p}`);let P=p.substr(0,m),b=p.substr(m+1).trim();a.set(t?P.toLowerCase():P,b)}return a}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(t===0)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(o)}if(this._chunks[0].byteLength>t){let o=this._chunks[0],s=this.asNative(o,t);return this._chunks[0]=o.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,i=0;for(;t>0;){let o=this._chunks[i];if(o.byteLength>t){let s=o.slice(0,t);n.set(s,r),r+=t,this._chunks[i]=o.slice(t),this._totalLength-=t,t-=t}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,t-=o.byteLength}return n}};$i.AbstractMessageBuffer=sc});var Vp=D(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.createMessageConnection=H.ConnectionOptions=H.MessageStrategy=H.CancellationStrategy=H.CancellationSenderStrategy=H.CancellationReceiverStrategy=H.RequestCancellationReceiverStrategy=H.IdCancellationReceiverStrategy=H.ConnectionStrategy=H.ConnectionError=H.ConnectionErrors=H.LogTraceNotification=H.SetTraceNotification=H.TraceFormat=H.TraceValues=H.Trace=H.NullLogger=H.ProgressType=H.ProgressToken=void 0;var Bp=Mt(),ue=qn(),U=Fa(),Hp=Wa(),_r=jn(),ac=Wi(),Rr;(function(e){e.type=new U.NotificationType("$/cancelRequest")})(Rr||(Rr={}));var cc;(function(e){function t(n){return typeof n=="string"||typeof n=="number"}e.is=t})(cc||(H.ProgressToken=cc={}));var Cr;(function(e){e.type=new U.NotificationType("$/progress")})(Cr||(Cr={}));var uc=class{constructor(){}};H.ProgressType=uc;var lc;(function(e){function t(n){return ue.func(n)}e.is=t})(lc||(lc={}));H.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var J;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(J||(H.Trace=J={}));var zp;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(zp||(H.TraceValues=zp={}));(function(e){function t(r){if(!ue.string(r))return e.Off;switch(r=r.toLowerCase(),r){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.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(J||(H.Trace=J={}));var Ge;(function(e){e.Text="text",e.JSON="json"})(Ge||(H.TraceFormat=Ge={}));(function(e){function t(n){return ue.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Ge||(H.TraceFormat=Ge={}));var dc;(function(e){e.type=new U.NotificationType("$/setTrace")})(dc||(H.SetTraceNotification=dc={}));var Vi;(function(e){e.type=new U.NotificationType("$/logTrace")})(Vi||(H.LogTraceNotification=Vi={}));var Dr;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Dr||(H.ConnectionErrors=Dr={}));var Fn=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};H.ConnectionError=Fn;var pc;(function(e){function t(n){let r=n;return r&&ue.func(r.cancelUndispatched)}e.is=t})(pc||(H.ConnectionStrategy=pc={}));var Yi;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&ue.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ue.func(r.dispose))}e.is=t})(Yi||(H.IdCancellationReceiverStrategy=Yi={}));var fc;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&ue.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ue.func(r.dispose))}e.is=t})(fc||(H.RequestCancellationReceiverStrategy=fc={}));var Gi;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new ac.CancellationTokenSource}});function t(n){return Yi.is(n)||fc.is(n)}e.is=t})(Gi||(H.CancellationReceiverStrategy=Gi={}));var Ki;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Rr.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&ue.func(r.sendCancellation)&&ue.func(r.cleanup)}e.is=t})(Ki||(H.CancellationSenderStrategy=Ki={}));var Qi;(function(e){e.Message=Object.freeze({receiver:Gi.Message,sender:Ki.Message});function t(n){let r=n;return r&&Gi.is(r.receiver)&&Ki.is(r.sender)}e.is=t})(Qi||(H.CancellationStrategy=Qi={}));var Ji;(function(e){function t(n){let r=n;return r&&ue.func(r.handleMessage)}e.is=t})(Ji||(H.MessageStrategy=Ji={}));var $p;(function(e){function t(n){let r=n;return r&&(Qi.is(r.cancellationStrategy)||pc.is(r.connectionStrategy)||Ji.is(r.messageStrategy))}e.is=t})($p||(H.ConnectionOptions=$p={}));var ct;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(ct||(ct={}));function p_(e,t,n,r){let i=n!==void 0?n:H.NullLogger,o=0,s=0,a=0,c="2.0",l,p=new Map,m,P=new Map,b=new Map,T,I=new Hp.LinkedMap,G=new Map,V=new Set,h=new Map,g=J.Off,S=Ge.Text,$,X=ct.New,ot=new _r.Emitter,Tt=new _r.Emitter,Jt=new _r.Emitter,hn=new _r.Emitter,k=new _r.Emitter,y=r&&r.cancellationStrategy?r.cancellationStrategy:Qi.Message;function E(d){if(d===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+d.toString()}function j(d){return d===null?"res-unknown-"+(++a).toString():"res-"+d.toString()}function x(){return"not-"+(++s).toString()}function C(d,_){U.Message.isRequest(_)?d.set(E(_.id),_):U.Message.isResponse(_)?d.set(j(_.id),_):d.set(x(),_)}function R(d){}function q(){return X===ct.Listening}function M(){return X===ct.Closed}function N(){return X===ct.Disposed}function z(){(X===ct.New||X===ct.Listening)&&(X=ct.Closed,Tt.fire(void 0))}function Y(d){ot.fire([d,void 0,void 0])}function _e(d){ot.fire(d)}e.onClose(z),e.onError(Y),t.onClose(z),t.onError(_e);function ee(){T||I.size===0||(T=(0,Bp.default)().timer.setImmediate(()=>{T=void 0,Xt()}))}function st(d){U.Message.isRequest(d)?hy(d):U.Message.isNotification(d)?yy(d):U.Message.isResponse(d)?my(d):d?.type?.startsWith("redocly/")||by(d)}function Xt(){if(I.size===0)return;let d=I.shift();try{let _=r?.messageStrategy;Ji.is(_)?_.handleMessage(d,st):st(d)}finally{ee()}}let gy=d=>{try{if(U.Message.isNotification(d)&&d.method===Rr.type.method){let _=d.params.id,A=E(_),L=I.get(A);if(U.Message.isRequest(L)){let te=r?.connectionStrategy,le=te&&te.cancelUndispatched?te.cancelUndispatched(L,R):void 0;if(le&&(le.error!==void 0||le.result!==void 0)){I.delete(A),h.delete(_),le.id=L.id,$r(le,d.method,Date.now()),t.write(le).catch(()=>i.error("Sending response for canceled message failed."));return}}let ie=h.get(_);if(ie!==void 0){ie.cancel(),gs(d);return}else V.add(_)}C(I,d)}finally{ee()}};function hy(d){if(N())return;function _(K,ae,Z){let xe={jsonrpc:c,id:d.id};K instanceof U.ResponseError?xe.error=K.toJson():xe.result=K===void 0?null:K,$r(xe,ae,Z),t.write(xe).catch(()=>i.error("Sending response failed."))}function A(K,ae,Z){let xe={jsonrpc:c,id:d.id,error:K.toJson()};$r(xe,ae,Z),t.write(xe).catch(()=>i.error("Sending response failed."))}function L(K,ae,Z){K===void 0&&(K=null);let xe={jsonrpc:c,id:d.id,result:K};$r(xe,ae,Z),t.write(xe).catch(()=>i.error("Sending response failed."))}Py(d);let ie=p.get(d.method),te,le;ie&&(te=ie.type,le=ie.handler);let ge=Date.now();if(le||l){let K=d.id??String(Date.now()),ae=Yi.is(y.receiver)?y.receiver.createCancellationTokenSource(K):y.receiver.createCancellationTokenSource(d);d.id!==null&&V.has(d.id)&&ae.cancel(),d.id!==null&&h.set(K,ae);try{let Z;if(le)if(d.params===void 0){if(te!==void 0&&te.numberOfParams!==0){A(new U.ResponseError(U.ErrorCodes.InvalidParams,`Request ${d.method} defines ${te.numberOfParams} params but received none.`),d.method,ge);return}Z=le(ae.token)}else if(Array.isArray(d.params)){if(te!==void 0&&te.parameterStructures===U.ParameterStructures.byName){A(new U.ResponseError(U.ErrorCodes.InvalidParams,`Request ${d.method} defines parameters by name but received parameters by position`),d.method,ge);return}Z=le(...d.params,ae.token)}else{if(te!==void 0&&te.parameterStructures===U.ParameterStructures.byPosition){A(new U.ResponseError(U.ErrorCodes.InvalidParams,`Request ${d.method} defines parameters by position but received parameters by name`),d.method,ge);return}Z=le(d.params,ae.token)}else l&&(Z=l(d.method,d.params,ae.token));let xe=Z;Z?xe.then?xe.then(Me=>{h.delete(K),_(Me,d.method,ge)},Me=>{h.delete(K),Me instanceof U.ResponseError?A(Me,d.method,ge):Me&&ue.string(Me.message)?A(new U.ResponseError(U.ErrorCodes.InternalError,`Request ${d.method} failed with message: ${Me.message}`),d.method,ge):A(new U.ResponseError(U.ErrorCodes.InternalError,`Request ${d.method} failed unexpectedly without providing any details.`),d.method,ge)}):(h.delete(K),_(Z,d.method,ge)):(h.delete(K),L(Z,d.method,ge))}catch(Z){h.delete(K),Z instanceof U.ResponseError?_(Z,d.method,ge):Z&&ue.string(Z.message)?A(new U.ResponseError(U.ErrorCodes.InternalError,`Request ${d.method} failed with message: ${Z.message}`),d.method,ge):A(new U.ResponseError(U.ErrorCodes.InternalError,`Request ${d.method} failed unexpectedly without providing any details.`),d.method,ge)}}else A(new U.ResponseError(U.ErrorCodes.MethodNotFound,`Unhandled method ${d.method}`),d.method,ge)}function my(d){if(!N())if(d.id===null)d.error?i.error(`Received response message without id: Error is:
|
|
40
|
+
${JSON.stringify(d.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let _=d.id,A=G.get(_);if(_y(d,A),A!==void 0){G.delete(_);try{if(d.error){let L=d.error;A.reject(new U.ResponseError(L.code,L.message,L.data))}else if(d.result!==void 0)A.resolve(d.result);else throw new Error("Should never happen.")}catch(L){L.message?i.error(`Response handler '${A.method}' failed with message: ${L.message}`):i.error(`Response handler '${A.method}' failed unexpectedly.`)}}}}function yy(d){if(N())return;let _,A;if(d.method===Rr.type.method){let L=d.params.id;V.delete(L),gs(d);return}else{let L=P.get(d.method);L&&(A=L.handler,_=L.type)}if(A||m)try{if(gs(d),A)if(d.params===void 0)_!==void 0&&_.numberOfParams!==0&&_.parameterStructures!==U.ParameterStructures.byName&&i.error(`Notification ${d.method} defines ${_.numberOfParams} params but received none.`),A();else if(Array.isArray(d.params)){let L=d.params;d.method===Cr.type.method&&L.length===2&&cc.is(L[0])?A({token:L[0],value:L[1]}):(_!==void 0&&(_.parameterStructures===U.ParameterStructures.byName&&i.error(`Notification ${d.method} defines parameters by name but received parameters by position`),_.numberOfParams!==d.params.length&&i.error(`Notification ${d.method} defines ${_.numberOfParams} params but received ${L.length} arguments`)),A(...L))}else _!==void 0&&_.parameterStructures===U.ParameterStructures.byPosition&&i.error(`Notification ${d.method} defines parameters by position but received parameters by name`),A(d.params);else m&&m(d.method,d.params)}catch(L){L.message?i.error(`Notification handler '${d.method}' failed with message: ${L.message}`):i.error(`Notification handler '${d.method}' failed unexpectedly.`)}else Jt.fire(d)}function by(d){if(!d){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
41
|
+
${JSON.stringify(d,null,4)}`);let _=d;if(ue.string(_.id)||ue.number(_.id)){let A=_.id,L=G.get(A);L&&L.reject(new Error("The received response has neither a result nor an error property."))}}function kt(d){if(d!=null)switch(g){case J.Verbose:return JSON.stringify(d,null,4);case J.Compact:return JSON.stringify(d);default:return}}function vy(d){if(!(g===J.Off||!$))if(S===Ge.Text){let _;(g===J.Verbose||g===J.Compact)&&d.params&&(_=`Params: ${kt(d.params)}
|
|
40
42
|
|
|
41
|
-
`)
|
|
43
|
+
`),$.log(`Sending request '${d.method} - (${d.id})'.`,_)}else mn("send-request",d)}function xy(d){if(!(g===J.Off||!$))if(S===Ge.Text){let _;(g===J.Verbose||g===J.Compact)&&(d.params?_=`Params: ${kt(d.params)}
|
|
42
44
|
|
|
43
|
-
`:
|
|
45
|
+
`:_=`No parameters provided.
|
|
44
46
|
|
|
45
|
-
`)
|
|
47
|
+
`),$.log(`Sending notification '${d.method}'.`,_)}else mn("send-notification",d)}function $r(d,_,A){if(!(g===J.Off||!$))if(S===Ge.Text){let L;(g===J.Verbose||g===J.Compact)&&(d.error&&d.error.data?L=`Error data: ${kt(d.error.data)}
|
|
46
48
|
|
|
47
|
-
`:
|
|
49
|
+
`:d.result?L=`Result: ${kt(d.result)}
|
|
48
50
|
|
|
49
|
-
`:
|
|
51
|
+
`:d.error===void 0&&(L=`No result returned.
|
|
50
52
|
|
|
51
|
-
`))
|
|
53
|
+
`)),$.log(`Sending response '${_} - (${d.id})'. Processing request took ${Date.now()-A}ms`,L)}else mn("send-response",d)}function Py(d){if(!(g===J.Off||!$))if(S===Ge.Text){let _;(g===J.Verbose||g===J.Compact)&&d.params&&(_=`Params: ${kt(d.params)}
|
|
52
54
|
|
|
53
|
-
`)
|
|
55
|
+
`),$.log(`Received request '${d.method} - (${d.id})'.`,_)}else mn("receive-request",d)}function gs(d){if(!(g===J.Off||!$||d.method===Vi.type.method))if(S===Ge.Text){let _;(g===J.Verbose||g===J.Compact)&&(d.params?_=`Params: ${kt(d.params)}
|
|
54
56
|
|
|
55
|
-
`:
|
|
57
|
+
`:_=`No parameters provided.
|
|
56
58
|
|
|
57
|
-
`)
|
|
59
|
+
`),$.log(`Received notification '${d.method}'.`,_)}else mn("receive-notification",d)}function _y(d,_){if(!(g===J.Off||!$))if(S===Ge.Text){let A;if((g===J.Verbose||g===J.Compact)&&(d.error&&d.error.data?A=`Error data: ${kt(d.error.data)}
|
|
58
60
|
|
|
59
|
-
`:
|
|
61
|
+
`:d.result?A=`Result: ${kt(d.result)}
|
|
60
62
|
|
|
61
|
-
`:
|
|
63
|
+
`:d.error===void 0&&(A=`No result returned.
|
|
62
64
|
|
|
63
|
-
`)),w){let F=m.error?` Request failed: ${m.error.message} (${m.error.code}).`:"";z.log(`Received response '${w.method} - (${m.id})' in ${Date.now()-w.timerStart}ms.${F}`,E)}else z.log(`Received response ${m.id} without active response promise.`,E)}else $t("receive-response",m)}function $t(m,w){if(!z||v===oe.Off)return;let E={isLSPMessage:!0,type:m,message:w,timestamp:Date.now()};z.log(E)}function dn(){if(we())throw new Gn(Qi.Closed,"Connection is closed.");if(se())throw new Gn(Qi.Disposed,"Connection is disposed.")}function is(){if(ze())throw new Gn(Qi.AlreadyListening,"Connection is already listening")}function os(){if(!ze())throw new Error("Call listen() first.")}function jt(m){return m===void 0?null:m}function Gr(m){if(m!==null)return m}function Qr(m){return m!=null&&!Array.isArray(m)&&typeof m=="object"}function lr(m,w){switch(m){case V.ParameterStructures.auto:return Qr(w)?Gr(w):[jt(w)];case V.ParameterStructures.byName:if(!Qr(w))throw new Error("Received parameters by name but param is not an object literal.");return Gr(w);case V.ParameterStructures.byPosition:return[jt(w)];default:throw new Error(`Unknown parameter structure ${m.toString()}`)}}function Jr(m,w){let E,F=m.numberOfParams;switch(F){case 0:E=void 0;break;case 1:E=lr(m.parameterStructures,w[0]);break;default:E=[];for(let ce=0;ce<w.length&&ce<F;ce++)E.push(jt(w[ce]));if(w.length<F)for(let ce=w.length;ce<F;ce++)E.push(null);break}return E}let Yt={sendNotification:(m,...w)=>{dn();let E,F;if(ye.string(m)){E=m;let ie=w[0],ge=0,me=V.ParameterStructures.auto;V.ParameterStructures.is(ie)&&(ge=1,me=ie);let X=w.length,ue=X-ge;switch(ue){case 0:F=void 0;break;case 1:F=lr(me,w[ge]);break;default:if(me===V.ParameterStructures.byName)throw new Error(`Received ${ue} parameters for 'by Name' notification parameter structure.`);F=w.slice(ge,X).map(re=>jt(re));break}}else{let ie=w;E=m.method,F=Jr(m,ie)}let ce={jsonrpc:c,method:E,params:F};return ts(ce),t.write(ce).catch(ie=>{throw i.error("Sending notification failed."),ie})},onNotification:(m,w)=>{dn();let E;return ye.func(m)?b=m:w&&(ye.string(m)?(E=m,D.set(m,{type:void 0,handler:w})):(E=m.method,D.set(m.method,{type:m,handler:w}))),{dispose:()=>{E!==void 0?D.delete(E):b=void 0}}},onProgress:(m,w,E)=>{if(R.has(w))throw new Error(`Progress handler for token ${w} already registered`);return R.set(w,E),{dispose:()=>{R.delete(w)}}},sendProgress:(m,w,E)=>Yt.sendNotification(Sr.type,{token:w,value:E}),onUnhandledProgress:ft.event,sendRequest:(m,...w)=>{dn(),os();let E,F,ce;if(ye.string(m)){E=m;let X=w[0],ue=w[w.length-1],re=0,_e=V.ParameterStructures.auto;V.ParameterStructures.is(X)&&(re=1,_e=X);let Me=w.length;Qa.CancellationToken.is(ue)&&(Me=Me-1,ce=ue);let it=Me-re;switch(it){case 0:F=void 0;break;case 1:F=lr(_e,w[re]);break;default:if(_e===V.ParameterStructures.byName)throw new Error(`Received ${it} parameters for 'by Name' request parameter structure.`);F=w.slice(re,Me).map(C=>jt(C));break}}else{let X=w;E=m.method,F=Jr(m,X);let ue=m.numberOfParams;ce=Qa.CancellationToken.is(X[ue])?X[ue]:void 0}let ie=o++,ge;ce&&(ge=ce.onCancellationRequested(()=>{let X=x.sender.sendCancellation(Yt,ie);return X===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${ie}`),Promise.resolve()):X.catch(()=>{i.log(`Sending cancellation messages for id ${ie} failed`)})}));let me={jsonrpc:c,id:ie,method:E,params:F};return es(me),typeof x.sender.enableCancellation=="function"&&x.sender.enableCancellation(me),new Promise(async(X,ue)=>{let re=it=>{X(it),x.sender.cleanup(ie),ge?.dispose()},_e=it=>{ue(it),x.sender.cleanup(ie),ge?.dispose()},Me={method:E,timerStart:Date.now(),resolve:re,reject:_e};try{await t.write(me),B.set(ie,Me)}catch(it){throw i.error("Sending request failed."),Me.reject(new V.ResponseError(V.ErrorCodes.MessageWriteError,it.message?it.message:"Unknown reason")),it}})},onRequest:(m,w)=>{dn();let E=null;return Xa.is(m)?(E=void 0,p=m):ye.string(m)?(E=null,w!==void 0&&(E=m,g.set(m,{handler:w,type:void 0}))):w!==void 0&&(E=m.method,g.set(m.method,{type:m,handler:w})),{dispose:()=>{E!==null&&(E!==void 0?g.delete(E):p=void 0)}}},hasPendingResponse:()=>B.size>0,trace:async(m,w,E)=>{let F=!1,ce=ht.Text;E!==void 0&&(ye.boolean(E)?F=E:(F=E.sendNotification||!1,ce=E.traceFormat||ht.Text)),v=m,N=ce,v===oe.Off?z=void 0:z=w,F&&!we()&&!se()&&await Yt.sendNotification(Dd.type,{value:oe.toString(m)})},onError:ae.event,onClose:He.event,onUnhandledNotification:dt.event,onDispose:j.event,end:()=>{t.end()},dispose:()=>{if(se())return;J=yt.Disposed,j.fire(void 0);let m=new V.ResponseError(V.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let w of B.values())w.reject(m);B=new Map,_=new Map,I=new Set,q=new Pd.LinkedMap,ye.func(t.dispose)&&t.dispose(),ye.func(e.dispose)&&e.dispose()},listen:()=>{dn(),is(),J=yt.Listening,e.listen(Qo)},inspect:()=>{(0,Cd.default)().console.log("inspect")}};return Yt.onNotification(Za.type,m=>{if(v===oe.Off||!z)return;let w=v===oe.Verbose||v===oe.Compact;z.log(m.message,w?m.verbose:void 0)}),Yt.onNotification(Sr.type,m=>{let w=R.get(m.token);w?w(m.value):ft.fire(m)}),Yt}U.createMessageConnection=Ob});var Ji=A(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.AbstractMessageBuffer=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.SharedArrayReceiverStrategy=S.SharedArraySenderStrategy=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.MessageStrategy=S.CancellationStrategy=S.CancellationSenderStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=S.SetTraceNotification=S.TraceFormat=S.TraceValues=S.Trace=void 0;var fe=xa();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return fe.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return fe.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return fe.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return fe.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return fe.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return fe.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return fe.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return fe.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return fe.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return fe.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return fe.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return fe.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return fe.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return fe.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return fe.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return fe.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return fe.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return fe.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return fe.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return fe.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return fe.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return fe.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return fe.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return fe.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return fe.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return fe.ParameterStructures}});var oc=ka();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return oc.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return oc.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return oc.Touch}});var Eb=fd();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return Eb.Disposable}});var xd=$n();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return xd.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return xd.Emitter}});var wd=Vi();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return wd.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return wd.CancellationToken}});var kd=pd();Object.defineProperty(S,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return kd.SharedArraySenderStrategy}});Object.defineProperty(S,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return kd.SharedArrayReceiverStrategy}});var sc=gd();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return sc.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return sc.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return sc.ReadableStreamMessageReader}});var ac=bd();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return ac.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return ac.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return ac.WriteableStreamMessageWriter}});var Mb=vd();Object.defineProperty(S,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Mb.AbstractMessageBuffer}});var Le=Td();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return Le.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return Le.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return Le.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return Le.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return Le.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return Le.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return Le.Trace}});Object.defineProperty(S,"TraceValues",{enumerable:!0,get:function(){return Le.TraceValues}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return Le.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return Le.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return Le.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return Le.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return Le.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Le.CancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Le.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return Le.CancellationStrategy}});Object.defineProperty(S,"MessageStrategy",{enumerable:!0,get:function(){return Le.MessageStrategy}});var jb=Zt();S.RAL=jb.default});var qd=A(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var At=Ji(),Xi=class e extends At.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return new TextEncoder().encode(t)}toString(t,n){return n==="ascii"?this.asciiDecoder.decode(t):new TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t:t.slice(0,n)}allocNative(t){return new Uint8Array(t)}};Xi.emptyBuffer=new Uint8Array(0);var cc=class{constructor(t){this.socket=t,this._onData=new At.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,At.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),At.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),At.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),At.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},uc=class{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),At.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),At.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),At.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,n){if(typeof t=="string"){if(n!==void 0&&n!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${n}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}},Ib=new TextEncoder,Ad=Object.freeze({messageBuffer:Object.freeze({create:e=>new Xi(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if(t.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(Ib.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new cc(e),asWritableStream:e=>new uc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function lc(){return Ad}(function(e){function t(){At.RAL.install(Ad)}e.install=t})(lc||(lc={}));dc.default=lc});var _n=A(nt=>{"use strict";var Lb=nt&&nt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),Fb=nt&&nt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Lb(t,e,n)};Object.defineProperty(nt,"__esModule",{value:!0});nt.createMessageConnection=nt.BrowserMessageWriter=nt.BrowserMessageReader=void 0;var Ub=qd();Ub.default.install();var Qn=Ji();Fb(Ji(),nt);var fc=class extends Qn.AbstractMessageReader{constructor(t){super(),this._onData=new Qn.Emitter,this._messageListener=n=>{this._onData.fire(n.data)},t.addEventListener("error",n=>this.fireError(n)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}};nt.BrowserMessageReader=fc;var pc=class extends Qn.AbstractMessageWriter{constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};nt.BrowserMessageWriter=pc;function Wb(e,t,n,r){return n===void 0&&(n=Qn.NullLogger),Qn.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Qn.createMessageConnection)(e,t,n,r)}nt.createMessageConnection=Wb});var gc=A((LR,Nd)=>{"use strict";Nd.exports=_n()});var eo=A((Od,Zi)=>{(function(e){if(typeof Zi=="object"&&typeof Zi.exports=="object"){var t=e(iu,Od);t!==void 0&&(Zi.exports=t)}else typeof define=="function"&&define.amd&&define(["require","exports"],e)})(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocument=t.EOL=t.WorkspaceFolder=t.InlayHint=t.InlayHintLabelPart=t.InlayHintKind=t.InlineValueContext=t.InlineValueEvaluatableExpression=t.InlineValueVariableLookup=t.InlineValueText=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.SelectionRange=t.DocumentLink=t.FormattingOptions=t.CodeLens=t.CodeAction=t.CodeActionContext=t.CodeActionTriggerKind=t.CodeActionKind=t.DocumentSymbol=t.WorkspaceSymbol=t.SymbolInformation=t.SymbolTag=t.SymbolKind=t.DocumentHighlight=t.DocumentHighlightKind=t.SignatureInformation=t.ParameterInformation=t.Hover=t.MarkedString=t.CompletionList=t.CompletionItem=t.CompletionItemLabelDetails=t.InsertTextMode=t.InsertReplaceEdit=t.CompletionItemTag=t.InsertTextFormat=t.CompletionItemKind=t.MarkupContent=t.MarkupKind=t.TextDocumentItem=t.OptionalVersionedTextDocumentIdentifier=t.VersionedTextDocumentIdentifier=t.TextDocumentIdentifier=t.WorkspaceChange=t.WorkspaceEdit=t.DeleteFile=t.RenameFile=t.CreateFile=t.TextDocumentEdit=t.AnnotatedTextEdit=t.ChangeAnnotationIdentifier=t.ChangeAnnotation=t.TextEdit=t.Command=t.Diagnostic=t.CodeDescription=t.DiagnosticTag=t.DiagnosticSeverity=t.DiagnosticRelatedInformation=t.FoldingRange=t.FoldingRangeKind=t.ColorPresentation=t.ColorInformation=t.Color=t.LocationLink=t.Location=t.Range=t.Position=t.uinteger=t.integer=t.URI=t.DocumentUri=void 0;var n;(function(l){function h(y){return typeof y=="string"}l.is=h})(n=t.DocumentUri||(t.DocumentUri={}));var r;(function(l){function h(y){return typeof y=="string"}l.is=h})(r=t.URI||(t.URI={}));var i;(function(l){l.MIN_VALUE=-2147483648,l.MAX_VALUE=2147483647;function h(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=h})(i=t.integer||(t.integer={}));var o;(function(l){l.MIN_VALUE=0,l.MAX_VALUE=2147483647;function h(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=h})(o=t.uinteger||(t.uinteger={}));var s;(function(l){function h(f,a){return f===Number.MAX_VALUE&&(f=o.MAX_VALUE),a===Number.MAX_VALUE&&(a=o.MAX_VALUE),{line:f,character:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.uinteger(a.line)&&C.uinteger(a.character)}l.is=y})(s=t.Position||(t.Position={}));var u;(function(l){function h(f,a,P,k){if(C.uinteger(f)&&C.uinteger(a)&&C.uinteger(P)&&C.uinteger(k))return{start:s.create(f,a),end:s.create(P,k)};if(s.is(f)&&s.is(a))return{start:f,end:a};throw new Error("Range#create called with invalid arguments[".concat(f,", ").concat(a,", ").concat(P,", ").concat(k,"]"))}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&s.is(a.start)&&s.is(a.end)}l.is=y})(u=t.Range||(t.Range={}));var c;(function(l){function h(f,a){return{uri:f,range:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&(C.string(a.uri)||C.undefined(a.uri))}l.is=y})(c=t.Location||(t.Location={}));var p;(function(l){function h(f,a,P,k){return{targetUri:f,targetRange:a,targetSelectionRange:P,originSelectionRange:k}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.targetRange)&&C.string(a.targetUri)&&u.is(a.targetSelectionRange)&&(u.is(a.originSelectionRange)||C.undefined(a.originSelectionRange))}l.is=y})(p=t.LocationLink||(t.LocationLink={}));var g;(function(l){function h(f,a,P,k){return{red:f,green:a,blue:P,alpha:k}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.numberRange(a.red,0,1)&&C.numberRange(a.green,0,1)&&C.numberRange(a.blue,0,1)&&C.numberRange(a.alpha,0,1)}l.is=y})(g=t.Color||(t.Color={}));var b;(function(l){function h(f,a){return{range:f,color:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&g.is(a.color)}l.is=y})(b=t.ColorInformation||(t.ColorInformation={}));var D;(function(l){function h(f,a,P){return{label:f,textEdit:a,additionalTextEdits:P}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.string(a.label)&&(C.undefined(a.textEdit)||z.is(a))&&(C.undefined(a.additionalTextEdits)||C.typedArray(a.additionalTextEdits,z.is))}l.is=y})(D=t.ColorPresentation||(t.ColorPresentation={}));var R;(function(l){l.Comment="comment",l.Imports="imports",l.Region="region"})(R=t.FoldingRangeKind||(t.FoldingRangeKind={}));var T;(function(l){function h(f,a,P,k,G,Ce){var le={startLine:f,endLine:a};return C.defined(P)&&(le.startCharacter=P),C.defined(k)&&(le.endCharacter=k),C.defined(G)&&(le.kind=G),C.defined(Ce)&&(le.collapsedText=Ce),le}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.uinteger(a.startLine)&&C.uinteger(a.startLine)&&(C.undefined(a.startCharacter)||C.uinteger(a.startCharacter))&&(C.undefined(a.endCharacter)||C.uinteger(a.endCharacter))&&(C.undefined(a.kind)||C.string(a.kind))}l.is=y})(T=t.FoldingRange||(t.FoldingRange={}));var q;(function(l){function h(f,a){return{location:f,message:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&c.is(a.location)&&C.string(a.message)}l.is=y})(q=t.DiagnosticRelatedInformation||(t.DiagnosticRelatedInformation={}));var B;(function(l){l.Error=1,l.Warning=2,l.Information=3,l.Hint=4})(B=t.DiagnosticSeverity||(t.DiagnosticSeverity={}));var I;(function(l){l.Unnecessary=1,l.Deprecated=2})(I=t.DiagnosticTag||(t.DiagnosticTag={}));var _;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&C.string(f.href)}l.is=h})(_=t.CodeDescription||(t.CodeDescription={}));var v;(function(l){function h(f,a,P,k,G,Ce){var le={range:f,message:a};return C.defined(P)&&(le.severity=P),C.defined(k)&&(le.code=k),C.defined(G)&&(le.source=G),C.defined(Ce)&&(le.relatedInformation=Ce),le}l.create=h;function y(f){var a,P=f;return C.defined(P)&&u.is(P.range)&&C.string(P.message)&&(C.number(P.severity)||C.undefined(P.severity))&&(C.integer(P.code)||C.string(P.code)||C.undefined(P.code))&&(C.undefined(P.codeDescription)||C.string((a=P.codeDescription)===null||a===void 0?void 0:a.href))&&(C.string(P.source)||C.undefined(P.source))&&(C.undefined(P.relatedInformation)||C.typedArray(P.relatedInformation,q.is))}l.is=y})(v=t.Diagnostic||(t.Diagnostic={}));var N;(function(l){function h(f,a){for(var P=[],k=2;k<arguments.length;k++)P[k-2]=arguments[k];var G={title:f,command:a};return C.defined(P)&&P.length>0&&(G.arguments=P),G}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.title)&&C.string(a.command)}l.is=y})(N=t.Command||(t.Command={}));var z;(function(l){function h(P,k){return{range:P,newText:k}}l.replace=h;function y(P,k){return{range:{start:P,end:P},newText:k}}l.insert=y;function f(P){return{range:P,newText:""}}l.del=f;function a(P){var k=P;return C.objectLiteral(k)&&C.string(k.newText)&&u.is(k.range)}l.is=a})(z=t.TextEdit||(t.TextEdit={}));var J;(function(l){function h(f,a,P){var k={label:f};return a!==void 0&&(k.needsConfirmation=a),P!==void 0&&(k.description=P),k}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.string(a.label)&&(C.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(C.string(a.description)||a.description===void 0)}l.is=y})(J=t.ChangeAnnotation||(t.ChangeAnnotation={}));var ae;(function(l){function h(y){var f=y;return C.string(f)}l.is=h})(ae=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={}));var He;(function(l){function h(P,k,G){return{range:P,newText:k,annotationId:G}}l.replace=h;function y(P,k,G){return{range:{start:P,end:P},newText:k,annotationId:G}}l.insert=y;function f(P,k){return{range:P,newText:"",annotationId:k}}l.del=f;function a(P){var k=P;return z.is(k)&&(J.is(k.annotationId)||ae.is(k.annotationId))}l.is=a})(He=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={}));var dt;(function(l){function h(f,a){return{textDocument:f,edits:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&we.is(a.textDocument)&&Array.isArray(a.edits)}l.is=y})(dt=t.TextDocumentEdit||(t.TextDocumentEdit={}));var ft;(function(l){function h(f,a,P){var k={kind:"create",uri:f};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(k.options=a),P!==void 0&&(k.annotationId=P),k}l.create=h;function y(f){var a=f;return a&&a.kind==="create"&&C.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||C.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||C.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(ft=t.CreateFile||(t.CreateFile={}));var j;(function(l){function h(f,a,P,k){var G={kind:"rename",oldUri:f,newUri:a};return P!==void 0&&(P.overwrite!==void 0||P.ignoreIfExists!==void 0)&&(G.options=P),k!==void 0&&(G.annotationId=k),G}l.create=h;function y(f){var a=f;return a&&a.kind==="rename"&&C.string(a.oldUri)&&C.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||C.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||C.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(j=t.RenameFile||(t.RenameFile={}));var x;(function(l){function h(f,a,P){var k={kind:"delete",uri:f};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(k.options=a),P!==void 0&&(k.annotationId=P),k}l.create=h;function y(f){var a=f;return a&&a.kind==="delete"&&C.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||C.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||C.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(x=t.DeleteFile||(t.DeleteFile={}));var W;(function(l){function h(y){var f=y;return f&&(f.changes!==void 0||f.documentChanges!==void 0)&&(f.documentChanges===void 0||f.documentChanges.every(function(a){return C.string(a.kind)?ft.is(a)||j.is(a)||x.is(a):dt.is(a)}))}l.is=h})(W=t.WorkspaceEdit||(t.WorkspaceEdit={}));var L=function(){function l(h,y){this.edits=h,this.changeAnnotations=y}return l.prototype.insert=function(h,y,f){var a,P;if(f===void 0?a=z.insert(h,y):ae.is(f)?(P=f,a=He.insert(h,y,f)):(this.assertChangeAnnotations(this.changeAnnotations),P=this.changeAnnotations.manage(f),a=He.insert(h,y,P)),this.edits.push(a),P!==void 0)return P},l.prototype.replace=function(h,y,f){var a,P;if(f===void 0?a=z.replace(h,y):ae.is(f)?(P=f,a=He.replace(h,y,f)):(this.assertChangeAnnotations(this.changeAnnotations),P=this.changeAnnotations.manage(f),a=He.replace(h,y,P)),this.edits.push(a),P!==void 0)return P},l.prototype.delete=function(h,y){var f,a;if(y===void 0?f=z.del(h):ae.is(y)?(a=y,f=He.del(h,y)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(y),f=He.del(h,a)),this.edits.push(f),a!==void 0)return a},l.prototype.add=function(h){this.edits.push(h)},l.prototype.all=function(){return this.edits},l.prototype.clear=function(){this.edits.splice(0,this.edits.length)},l.prototype.assertChangeAnnotations=function(h){if(h===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},l}(),ne=function(){function l(h){this._annotations=h===void 0?Object.create(null):h,this._counter=0,this._size=0}return l.prototype.all=function(){return this._annotations},Object.defineProperty(l.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),l.prototype.manage=function(h,y){var f;if(ae.is(h)?f=h:(f=this.nextId(),y=h),this._annotations[f]!==void 0)throw new Error("Id ".concat(f," is already in use."));if(y===void 0)throw new Error("No annotation provided for id ".concat(f));return this._annotations[f]=y,this._size++,f},l.prototype.nextId=function(){return this._counter++,this._counter.toString()},l}(),Q=function(){function l(h){var y=this;this._textEditChanges=Object.create(null),h!==void 0?(this._workspaceEdit=h,h.documentChanges?(this._changeAnnotations=new ne(h.changeAnnotations),h.changeAnnotations=this._changeAnnotations.all(),h.documentChanges.forEach(function(f){if(dt.is(f)){var a=new L(f.edits,y._changeAnnotations);y._textEditChanges[f.textDocument.uri]=a}})):h.changes&&Object.keys(h.changes).forEach(function(f){var a=new L(h.changes[f]);y._textEditChanges[f]=a})):this._workspaceEdit={}}return Object.defineProperty(l.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),l.prototype.getTextEditChange=function(h){if(we.is(h)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var y={uri:h.uri,version:h.version},f=this._textEditChanges[y.uri];if(!f){var a=[],P={textDocument:y,edits:a};this._workspaceEdit.documentChanges.push(P),f=new L(a,this._changeAnnotations),this._textEditChanges[y.uri]=f}return f}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var f=this._textEditChanges[h];if(!f){var a=[];this._workspaceEdit.changes[h]=a,f=new L(a),this._textEditChanges[h]=f}return f}},l.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ne,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},l.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},l.prototype.createFile=function(h,y,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;J.is(y)||ae.is(y)?a=y:f=y;var P,k;if(a===void 0?P=ft.create(h,f):(k=ae.is(a)?a:this._changeAnnotations.manage(a),P=ft.create(h,f,k)),this._workspaceEdit.documentChanges.push(P),k!==void 0)return k},l.prototype.renameFile=function(h,y,f,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var P;J.is(f)||ae.is(f)?P=f:a=f;var k,G;if(P===void 0?k=j.create(h,y,a):(G=ae.is(P)?P:this._changeAnnotations.manage(P),k=j.create(h,y,a,G)),this._workspaceEdit.documentChanges.push(k),G!==void 0)return G},l.prototype.deleteFile=function(h,y,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;J.is(y)||ae.is(y)?a=y:f=y;var P,k;if(a===void 0?P=x.create(h,f):(k=ae.is(a)?a:this._changeAnnotations.manage(a),P=x.create(h,f,k)),this._workspaceEdit.documentChanges.push(P),k!==void 0)return k},l}();t.WorkspaceChange=Q;var K;(function(l){function h(f){return{uri:f}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)}l.is=y})(K=t.TextDocumentIdentifier||(t.TextDocumentIdentifier={}));var ze;(function(l){function h(f,a){return{uri:f,version:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&C.integer(a.version)}l.is=y})(ze=t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={}));var we;(function(l){function h(f,a){return{uri:f,version:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&(a.version===null||C.integer(a.version))}l.is=y})(we=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={}));var se;(function(l){function h(f,a,P,k){return{uri:f,languageId:a,version:P,text:k}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&C.string(a.languageId)&&C.integer(a.version)&&C.string(a.text)}l.is=y})(se=t.TextDocumentItem||(t.TextDocumentItem={}));var St;(function(l){l.PlainText="plaintext",l.Markdown="markdown";function h(y){var f=y;return f===l.PlainText||f===l.Markdown}l.is=h})(St=t.MarkupKind||(t.MarkupKind={}));var xn;(function(l){function h(y){var f=y;return C.objectLiteral(y)&&St.is(f.kind)&&C.string(f.value)}l.is=h})(xn=t.MarkupContent||(t.MarkupContent={}));var Ko;(function(l){l.Text=1,l.Method=2,l.Function=3,l.Constructor=4,l.Field=5,l.Variable=6,l.Class=7,l.Interface=8,l.Module=9,l.Property=10,l.Unit=11,l.Value=12,l.Enum=13,l.Keyword=14,l.Snippet=15,l.Color=16,l.File=17,l.Reference=18,l.Folder=19,l.EnumMember=20,l.Constant=21,l.Struct=22,l.Event=23,l.Operator=24,l.TypeParameter=25})(Ko=t.CompletionItemKind||(t.CompletionItemKind={}));var Yr;(function(l){l.PlainText=1,l.Snippet=2})(Yr=t.InsertTextFormat||(t.InsertTextFormat={}));var Kr;(function(l){l.Deprecated=1})(Kr=t.CompletionItemTag||(t.CompletionItemTag={}));var Go;(function(l){function h(f,a,P){return{newText:f,insert:a,replace:P}}l.create=h;function y(f){var a=f;return a&&C.string(a.newText)&&u.is(a.insert)&&u.is(a.replace)}l.is=y})(Go=t.InsertReplaceEdit||(t.InsertReplaceEdit={}));var Qo;(function(l){l.asIs=1,l.adjustIndentation=2})(Qo=t.InsertTextMode||(t.InsertTextMode={}));var Jo;(function(l){function h(y){var f=y;return f&&(C.string(f.detail)||f.detail===void 0)&&(C.string(f.description)||f.description===void 0)}l.is=h})(Jo=t.CompletionItemLabelDetails||(t.CompletionItemLabelDetails={}));var Xo;(function(l){function h(y){return{label:y}}l.create=h})(Xo=t.CompletionItem||(t.CompletionItem={}));var Zo;(function(l){function h(y,f){return{items:y||[],isIncomplete:!!f}}l.create=h})(Zo=t.CompletionList||(t.CompletionList={}));var cr;(function(l){function h(f){return f.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}l.fromPlainText=h;function y(f){var a=f;return C.string(a)||C.objectLiteral(a)&&C.string(a.language)&&C.string(a.value)}l.is=y})(cr=t.MarkedString||(t.MarkedString={}));var Tt;(function(l){function h(y){var f=y;return!!f&&C.objectLiteral(f)&&(xn.is(f.contents)||cr.is(f.contents)||C.typedArray(f.contents,cr.is))&&(y.range===void 0||u.is(y.range))}l.is=h})(Tt=t.Hover||(t.Hover={}));var es;(function(l){function h(y,f){return f?{label:y,documentation:f}:{label:y}}l.create=h})(es=t.ParameterInformation||(t.ParameterInformation={}));var ts;(function(l){function h(y,f){for(var a=[],P=2;P<arguments.length;P++)a[P-2]=arguments[P];var k={label:y};return C.defined(f)&&(k.documentation=f),C.defined(a)?k.parameters=a:k.parameters=[],k}l.create=h})(ts=t.SignatureInformation||(t.SignatureInformation={}));var wn;(function(l){l.Text=1,l.Read=2,l.Write=3})(wn=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var ns;(function(l){function h(y,f){var a={range:y};return C.number(f)&&(a.kind=f),a}l.create=h})(ns=t.DocumentHighlight||(t.DocumentHighlight={}));var ur;(function(l){l.File=1,l.Module=2,l.Namespace=3,l.Package=4,l.Class=5,l.Method=6,l.Property=7,l.Field=8,l.Constructor=9,l.Enum=10,l.Interface=11,l.Function=12,l.Variable=13,l.Constant=14,l.String=15,l.Number=16,l.Boolean=17,l.Array=18,l.Object=19,l.Key=20,l.Null=21,l.EnumMember=22,l.Struct=23,l.Event=24,l.Operator=25,l.TypeParameter=26})(ur=t.SymbolKind||(t.SymbolKind={}));var rs;(function(l){l.Deprecated=1})(rs=t.SymbolTag||(t.SymbolTag={}));var $t;(function(l){function h(y,f,a,P,k){var G={name:y,kind:f,location:{uri:P,range:a}};return k&&(G.containerName=k),G}l.create=h})($t=t.SymbolInformation||(t.SymbolInformation={}));var dn;(function(l){function h(y,f,a,P){return P!==void 0?{name:y,kind:f,location:{uri:a,range:P}}:{name:y,kind:f,location:{uri:a}}}l.create=h})(dn=t.WorkspaceSymbol||(t.WorkspaceSymbol={}));var is;(function(l){function h(f,a,P,k,G,Ce){var le={name:f,detail:a,kind:P,range:k,selectionRange:G};return Ce!==void 0&&(le.children=Ce),le}l.create=h;function y(f){var a=f;return a&&C.string(a.name)&&C.number(a.kind)&&u.is(a.range)&&u.is(a.selectionRange)&&(a.detail===void 0||C.string(a.detail))&&(a.deprecated===void 0||C.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}l.is=y})(is=t.DocumentSymbol||(t.DocumentSymbol={}));var os;(function(l){l.Empty="",l.QuickFix="quickfix",l.Refactor="refactor",l.RefactorExtract="refactor.extract",l.RefactorInline="refactor.inline",l.RefactorRewrite="refactor.rewrite",l.Source="source",l.SourceOrganizeImports="source.organizeImports",l.SourceFixAll="source.fixAll"})(os=t.CodeActionKind||(t.CodeActionKind={}));var jt;(function(l){l.Invoked=1,l.Automatic=2})(jt=t.CodeActionTriggerKind||(t.CodeActionTriggerKind={}));var Gr;(function(l){function h(f,a,P){var k={diagnostics:f};return a!=null&&(k.only=a),P!=null&&(k.triggerKind=P),k}l.create=h;function y(f){var a=f;return C.defined(a)&&C.typedArray(a.diagnostics,v.is)&&(a.only===void 0||C.typedArray(a.only,C.string))&&(a.triggerKind===void 0||a.triggerKind===jt.Invoked||a.triggerKind===jt.Automatic)}l.is=y})(Gr=t.CodeActionContext||(t.CodeActionContext={}));var Qr;(function(l){function h(f,a,P){var k={title:f},G=!0;return typeof a=="string"?(G=!1,k.kind=a):N.is(a)?k.command=a:k.edit=a,G&&P!==void 0&&(k.kind=P),k}l.create=h;function y(f){var a=f;return a&&C.string(a.title)&&(a.diagnostics===void 0||C.typedArray(a.diagnostics,v.is))&&(a.kind===void 0||C.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||N.is(a.command))&&(a.isPreferred===void 0||C.boolean(a.isPreferred))&&(a.edit===void 0||W.is(a.edit))}l.is=y})(Qr=t.CodeAction||(t.CodeAction={}));var lr;(function(l){function h(f,a){var P={range:f};return C.defined(a)&&(P.data=a),P}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(a.range)&&(C.undefined(a.command)||N.is(a.command))}l.is=y})(lr=t.CodeLens||(t.CodeLens={}));var Jr;(function(l){function h(f,a){return{tabSize:f,insertSpaces:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.uinteger(a.tabSize)&&C.boolean(a.insertSpaces)}l.is=y})(Jr=t.FormattingOptions||(t.FormattingOptions={}));var Yt;(function(l){function h(f,a,P){return{range:f,target:a,data:P}}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(a.range)&&(C.undefined(a.target)||C.string(a.target))}l.is=y})(Yt=t.DocumentLink||(t.DocumentLink={}));var m;(function(l){function h(f,a){return{range:f,parent:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&(a.parent===void 0||l.is(a.parent))}l.is=y})(m=t.SelectionRange||(t.SelectionRange={}));var w;(function(l){l.namespace="namespace",l.type="type",l.class="class",l.enum="enum",l.interface="interface",l.struct="struct",l.typeParameter="typeParameter",l.parameter="parameter",l.variable="variable",l.property="property",l.enumMember="enumMember",l.event="event",l.function="function",l.method="method",l.macro="macro",l.keyword="keyword",l.modifier="modifier",l.comment="comment",l.string="string",l.number="number",l.regexp="regexp",l.operator="operator",l.decorator="decorator"})(w=t.SemanticTokenTypes||(t.SemanticTokenTypes={}));var E;(function(l){l.declaration="declaration",l.definition="definition",l.readonly="readonly",l.static="static",l.deprecated="deprecated",l.abstract="abstract",l.async="async",l.modification="modification",l.documentation="documentation",l.defaultLibrary="defaultLibrary"})(E=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={}));var F;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&(f.resultId===void 0||typeof f.resultId=="string")&&Array.isArray(f.data)&&(f.data.length===0||typeof f.data[0]=="number")}l.is=h})(F=t.SemanticTokens||(t.SemanticTokens={}));var ce;(function(l){function h(f,a){return{range:f,text:a}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&C.string(a.text)}l.is=y})(ce=t.InlineValueText||(t.InlineValueText={}));var ie;(function(l){function h(f,a,P){return{range:f,variableName:a,caseSensitiveLookup:P}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&C.boolean(a.caseSensitiveLookup)&&(C.string(a.variableName)||a.variableName===void 0)}l.is=y})(ie=t.InlineValueVariableLookup||(t.InlineValueVariableLookup={}));var ge;(function(l){function h(f,a){return{range:f,expression:a}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&(C.string(a.expression)||a.expression===void 0)}l.is=y})(ge=t.InlineValueEvaluatableExpression||(t.InlineValueEvaluatableExpression={}));var me;(function(l){function h(f,a){return{frameId:f,stoppedLocation:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(f.stoppedLocation)}l.is=y})(me=t.InlineValueContext||(t.InlineValueContext={}));var X;(function(l){l.Type=1,l.Parameter=2;function h(y){return y===1||y===2}l.is=h})(X=t.InlayHintKind||(t.InlayHintKind={}));var ue;(function(l){function h(f){return{value:f}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&(a.tooltip===void 0||C.string(a.tooltip)||xn.is(a.tooltip))&&(a.location===void 0||c.is(a.location))&&(a.command===void 0||N.is(a.command))}l.is=y})(ue=t.InlayHintLabelPart||(t.InlayHintLabelPart={}));var re;(function(l){function h(f,a,P){var k={position:f,label:a};return P!==void 0&&(k.kind=P),k}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&s.is(a.position)&&(C.string(a.label)||C.typedArray(a.label,ue.is))&&(a.kind===void 0||X.is(a.kind))&&a.textEdits===void 0||C.typedArray(a.textEdits,z.is)&&(a.tooltip===void 0||C.string(a.tooltip)||xn.is(a.tooltip))&&(a.paddingLeft===void 0||C.boolean(a.paddingLeft))&&(a.paddingRight===void 0||C.boolean(a.paddingRight))}l.is=y})(re=t.InlayHint||(t.InlayHint={}));var _e;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&r.is(f.uri)&&C.string(f.name)}l.is=h})(_e=t.WorkspaceFolder||(t.WorkspaceFolder={})),t.EOL=[`
|
|
65
|
+
`)),_){let L=d.error?` Request failed: ${d.error.message} (${d.error.code}).`:"";$.log(`Received response '${_.method} - (${d.id})' in ${Date.now()-_.timerStart}ms.${L}`,A)}else $.log(`Received response ${d.id} without active response promise.`,A)}else mn("receive-response",d)}function mn(d,_){if(!$||g===J.Off)return;let A={isLSPMessage:!0,type:d,message:_,timestamp:Date.now()};$.log(A)}function cr(){if(M())throw new Fn(Dr.Closed,"Connection is closed.");if(N())throw new Fn(Dr.Disposed,"Connection is disposed.")}function Cy(){if(q())throw new Fn(Dr.AlreadyListening,"Connection is already listening")}function Dy(){if(!q())throw new Error("Call listen() first.")}function ur(d){return d===void 0?null:d}function vl(d){if(d!==null)return d}function xl(d){return d!=null&&!Array.isArray(d)&&typeof d=="object"}function hs(d,_){switch(d){case U.ParameterStructures.auto:return xl(_)?vl(_):[ur(_)];case U.ParameterStructures.byName:if(!xl(_))throw new Error("Received parameters by name but param is not an object literal.");return vl(_);case U.ParameterStructures.byPosition:return[ur(_)];default:throw new Error(`Unknown parameter structure ${d.toString()}`)}}function Pl(d,_){let A,L=d.numberOfParams;switch(L){case 0:A=void 0;break;case 1:A=hs(d.parameterStructures,_[0]);break;default:A=[];for(let ie=0;ie<_.length&&ie<L;ie++)A.push(ur(_[ie]));if(_.length<L)for(let ie=_.length;ie<L;ie++)A.push(null);break}return A}let yn={sendNotification:(d,..._)=>{cr();let A,L;if(ue.string(d)){A=d;let te=_[0],le=0,ge=U.ParameterStructures.auto;U.ParameterStructures.is(te)&&(le=1,ge=te);let K=_.length,ae=K-le;switch(ae){case 0:L=void 0;break;case 1:L=hs(ge,_[le]);break;default:if(ge===U.ParameterStructures.byName)throw new Error(`Received ${ae} parameters for 'by Name' notification parameter structure.`);L=_.slice(le,K).map(Z=>ur(Z));break}}else{let te=_;A=d.method,L=Pl(d,te)}let ie={jsonrpc:c,method:A,params:L};return xy(ie),t.write(ie).catch(te=>{throw i.error("Sending notification failed."),te})},onNotification:(d,_)=>{cr();let A;return ue.func(d)?m=d:_&&(ue.string(d)?(A=d,P.set(d,{type:void 0,handler:_})):(A=d.method,P.set(d.method,{type:d,handler:_}))),{dispose:()=>{A!==void 0?P.delete(A):m=void 0}}},onProgress:(d,_,A)=>{if(b.has(_))throw new Error(`Progress handler for token ${_} already registered`);return b.set(_,A),{dispose:()=>{b.delete(_)}}},sendProgress:(d,_,A)=>yn.sendNotification(Cr.type,{token:_,value:A}),onUnhandledProgress:hn.event,sendRequest:(d,..._)=>{cr(),Dy();let A,L,ie;if(ue.string(d)){A=d;let K=_[0],ae=_[_.length-1],Z=0,xe=U.ParameterStructures.auto;U.ParameterStructures.is(K)&&(Z=1,xe=K);let Me=_.length;ac.CancellationToken.is(ae)&&(Me=Me-1,ie=ae);let dt=Me-Z;switch(dt){case 0:L=void 0;break;case 1:L=hs(xe,_[Z]);break;default:if(xe===U.ParameterStructures.byName)throw new Error(`Received ${dt} parameters for 'by Name' request parameter structure.`);L=_.slice(Z,Me).map(Ry=>ur(Ry));break}}else{let K=_;A=d.method,L=Pl(d,K);let ae=d.numberOfParams;ie=ac.CancellationToken.is(K[ae])?K[ae]:void 0}let te=o++,le;ie&&(le=ie.onCancellationRequested(()=>{let K=y.sender.sendCancellation(yn,te);return K===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${te}`),Promise.resolve()):K.catch(()=>{i.log(`Sending cancellation messages for id ${te} failed`)})}));let ge={jsonrpc:c,id:te,method:A,params:L};return vy(ge),typeof y.sender.enableCancellation=="function"&&y.sender.enableCancellation(ge),new Promise(async(K,ae)=>{let Z=dt=>{K(dt),y.sender.cleanup(te),le?.dispose()},xe=dt=>{ae(dt),y.sender.cleanup(te),le?.dispose()},Me={method:A,timerStart:Date.now(),resolve:Z,reject:xe};try{await t.write(ge),G.set(te,Me)}catch(dt){throw i.error("Sending request failed."),Me.reject(new U.ResponseError(U.ErrorCodes.MessageWriteError,dt.message?dt.message:"Unknown reason")),dt}})},onRequest:(d,_)=>{cr();let A=null;return lc.is(d)?(A=void 0,l=d):ue.string(d)?(A=null,_!==void 0&&(A=d,p.set(d,{handler:_,type:void 0}))):_!==void 0&&(A=d.method,p.set(d.method,{type:d,handler:_})),{dispose:()=>{A!==null&&(A!==void 0?p.delete(A):l=void 0)}}},hasPendingResponse:()=>G.size>0,trace:async(d,_,A)=>{let L=!1,ie=Ge.Text;A!==void 0&&(ue.boolean(A)?L=A:(L=A.sendNotification||!1,ie=A.traceFormat||Ge.Text)),g=d,S=ie,g===J.Off?$=void 0:$=_,L&&!M()&&!N()&&await yn.sendNotification(dc.type,{value:J.toString(d)})},onError:ot.event,onClose:Tt.event,onUnhandledNotification:Jt.event,onDispose:k.event,end:()=>{t.end()},dispose:()=>{if(N())return;X=ct.Disposed,k.fire(void 0);let d=new U.ResponseError(U.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let _ of G.values())_.reject(d);G=new Map,h=new Map,V=new Set,I=new Hp.LinkedMap,ue.func(t.dispose)&&t.dispose(),ue.func(e.dispose)&&e.dispose()},listen:()=>{cr(),Cy(),X=ct.Listening,e.listen(gy)},inspect:()=>{(0,Bp.default)().console.log("inspect")}};return yn.onNotification(Vi.type,d=>{if(g===J.Off||!$)return;let _=g===J.Verbose||g===J.Compact;$.log(d.message,_?d.verbose:void 0)}),yn.onNotification(Cr.type,d=>{let _=b.get(d.token);_?_(d.value):hn.fire(d)}),yn}H.createMessageConnection=p_});var Xi=D(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.ProgressType=v.ProgressToken=v.createMessageConnection=v.NullLogger=v.ConnectionOptions=v.ConnectionStrategy=v.AbstractMessageBuffer=v.WriteableStreamMessageWriter=v.AbstractMessageWriter=v.MessageWriter=v.ReadableStreamMessageReader=v.AbstractMessageReader=v.MessageReader=v.SharedArrayReceiverStrategy=v.SharedArraySenderStrategy=v.CancellationToken=v.CancellationTokenSource=v.Emitter=v.Event=v.Disposable=v.LRUCache=v.Touch=v.LinkedMap=v.ParameterStructures=v.NotificationType9=v.NotificationType8=v.NotificationType7=v.NotificationType6=v.NotificationType5=v.NotificationType4=v.NotificationType3=v.NotificationType2=v.NotificationType1=v.NotificationType0=v.NotificationType=v.ErrorCodes=v.ResponseError=v.RequestType9=v.RequestType8=v.RequestType7=v.RequestType6=v.RequestType5=v.RequestType4=v.RequestType3=v.RequestType2=v.RequestType1=v.RequestType0=v.RequestType=v.Message=v.RAL=void 0;v.MessageStrategy=v.CancellationStrategy=v.CancellationSenderStrategy=v.CancellationReceiverStrategy=v.ConnectionError=v.ConnectionErrors=v.LogTraceNotification=v.SetTraceNotification=v.TraceFormat=v.TraceValues=v.Trace=void 0;var re=Fa();Object.defineProperty(v,"Message",{enumerable:!0,get:function(){return re.Message}});Object.defineProperty(v,"RequestType",{enumerable:!0,get:function(){return re.RequestType}});Object.defineProperty(v,"RequestType0",{enumerable:!0,get:function(){return re.RequestType0}});Object.defineProperty(v,"RequestType1",{enumerable:!0,get:function(){return re.RequestType1}});Object.defineProperty(v,"RequestType2",{enumerable:!0,get:function(){return re.RequestType2}});Object.defineProperty(v,"RequestType3",{enumerable:!0,get:function(){return re.RequestType3}});Object.defineProperty(v,"RequestType4",{enumerable:!0,get:function(){return re.RequestType4}});Object.defineProperty(v,"RequestType5",{enumerable:!0,get:function(){return re.RequestType5}});Object.defineProperty(v,"RequestType6",{enumerable:!0,get:function(){return re.RequestType6}});Object.defineProperty(v,"RequestType7",{enumerable:!0,get:function(){return re.RequestType7}});Object.defineProperty(v,"RequestType8",{enumerable:!0,get:function(){return re.RequestType8}});Object.defineProperty(v,"RequestType9",{enumerable:!0,get:function(){return re.RequestType9}});Object.defineProperty(v,"ResponseError",{enumerable:!0,get:function(){return re.ResponseError}});Object.defineProperty(v,"ErrorCodes",{enumerable:!0,get:function(){return re.ErrorCodes}});Object.defineProperty(v,"NotificationType",{enumerable:!0,get:function(){return re.NotificationType}});Object.defineProperty(v,"NotificationType0",{enumerable:!0,get:function(){return re.NotificationType0}});Object.defineProperty(v,"NotificationType1",{enumerable:!0,get:function(){return re.NotificationType1}});Object.defineProperty(v,"NotificationType2",{enumerable:!0,get:function(){return re.NotificationType2}});Object.defineProperty(v,"NotificationType3",{enumerable:!0,get:function(){return re.NotificationType3}});Object.defineProperty(v,"NotificationType4",{enumerable:!0,get:function(){return re.NotificationType4}});Object.defineProperty(v,"NotificationType5",{enumerable:!0,get:function(){return re.NotificationType5}});Object.defineProperty(v,"NotificationType6",{enumerable:!0,get:function(){return re.NotificationType6}});Object.defineProperty(v,"NotificationType7",{enumerable:!0,get:function(){return re.NotificationType7}});Object.defineProperty(v,"NotificationType8",{enumerable:!0,get:function(){return re.NotificationType8}});Object.defineProperty(v,"NotificationType9",{enumerable:!0,get:function(){return re.NotificationType9}});Object.defineProperty(v,"ParameterStructures",{enumerable:!0,get:function(){return re.ParameterStructures}});var gc=Wa();Object.defineProperty(v,"LinkedMap",{enumerable:!0,get:function(){return gc.LinkedMap}});Object.defineProperty(v,"LRUCache",{enumerable:!0,get:function(){return gc.LRUCache}});Object.defineProperty(v,"Touch",{enumerable:!0,get:function(){return gc.Touch}});var f_=Op();Object.defineProperty(v,"Disposable",{enumerable:!0,get:function(){return f_.Disposable}});var Yp=jn();Object.defineProperty(v,"Event",{enumerable:!0,get:function(){return Yp.Event}});Object.defineProperty(v,"Emitter",{enumerable:!0,get:function(){return Yp.Emitter}});var Gp=Wi();Object.defineProperty(v,"CancellationTokenSource",{enumerable:!0,get:function(){return Gp.CancellationTokenSource}});Object.defineProperty(v,"CancellationToken",{enumerable:!0,get:function(){return Gp.CancellationToken}});var Kp=qp();Object.defineProperty(v,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Kp.SharedArraySenderStrategy}});Object.defineProperty(v,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Kp.SharedArrayReceiverStrategy}});var hc=jp();Object.defineProperty(v,"MessageReader",{enumerable:!0,get:function(){return hc.MessageReader}});Object.defineProperty(v,"AbstractMessageReader",{enumerable:!0,get:function(){return hc.AbstractMessageReader}});Object.defineProperty(v,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return hc.ReadableStreamMessageReader}});var mc=Up();Object.defineProperty(v,"MessageWriter",{enumerable:!0,get:function(){return mc.MessageWriter}});Object.defineProperty(v,"AbstractMessageWriter",{enumerable:!0,get:function(){return mc.AbstractMessageWriter}});Object.defineProperty(v,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return mc.WriteableStreamMessageWriter}});var g_=Wp();Object.defineProperty(v,"AbstractMessageBuffer",{enumerable:!0,get:function(){return g_.AbstractMessageBuffer}});var Ae=Vp();Object.defineProperty(v,"ConnectionStrategy",{enumerable:!0,get:function(){return Ae.ConnectionStrategy}});Object.defineProperty(v,"ConnectionOptions",{enumerable:!0,get:function(){return Ae.ConnectionOptions}});Object.defineProperty(v,"NullLogger",{enumerable:!0,get:function(){return Ae.NullLogger}});Object.defineProperty(v,"createMessageConnection",{enumerable:!0,get:function(){return Ae.createMessageConnection}});Object.defineProperty(v,"ProgressToken",{enumerable:!0,get:function(){return Ae.ProgressToken}});Object.defineProperty(v,"ProgressType",{enumerable:!0,get:function(){return Ae.ProgressType}});Object.defineProperty(v,"Trace",{enumerable:!0,get:function(){return Ae.Trace}});Object.defineProperty(v,"TraceValues",{enumerable:!0,get:function(){return Ae.TraceValues}});Object.defineProperty(v,"TraceFormat",{enumerable:!0,get:function(){return Ae.TraceFormat}});Object.defineProperty(v,"SetTraceNotification",{enumerable:!0,get:function(){return Ae.SetTraceNotification}});Object.defineProperty(v,"LogTraceNotification",{enumerable:!0,get:function(){return Ae.LogTraceNotification}});Object.defineProperty(v,"ConnectionErrors",{enumerable:!0,get:function(){return Ae.ConnectionErrors}});Object.defineProperty(v,"ConnectionError",{enumerable:!0,get:function(){return Ae.ConnectionError}});Object.defineProperty(v,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Ae.CancellationReceiverStrategy}});Object.defineProperty(v,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Ae.CancellationSenderStrategy}});Object.defineProperty(v,"CancellationStrategy",{enumerable:!0,get:function(){return Ae.CancellationStrategy}});Object.defineProperty(v,"MessageStrategy",{enumerable:!0,get:function(){return Ae.MessageStrategy}});var h_=Mt();v.RAL=h_.default});var Jp=D(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var ht=Xi(),Zi=class e extends ht.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return new TextEncoder().encode(t)}toString(t,n){return n==="ascii"?this.asciiDecoder.decode(t):new TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t:t.slice(0,n)}allocNative(t){return new Uint8Array(t)}};Zi.emptyBuffer=new Uint8Array(0);var yc=class{constructor(t){this.socket=t,this._onData=new ht.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,ht.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),ht.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),ht.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),ht.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},bc=class{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),ht.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),ht.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),ht.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,n){if(typeof t=="string"){if(n!==void 0&&n!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${n}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}},m_=new TextEncoder,Qp=Object.freeze({messageBuffer:Object.freeze({create:e=>new Zi(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if(t.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(m_.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new yc(e),asWritableStream:e=>new bc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function vc(){return Qp}(function(e){function t(){ht.RAL.install(Qp)}e.install=t})(vc||(vc={}));xc.default=vc});var cn=D(Ke=>{"use strict";var y_=Ke&&Ke.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),b_=Ke&&Ke.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&y_(t,e,n)};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.createMessageConnection=Ke.BrowserMessageWriter=Ke.BrowserMessageReader=void 0;var v_=Jp();v_.default.install();var Un=Xi();b_(Xi(),Ke);var Pc=class extends Un.AbstractMessageReader{constructor(t){super(),this._onData=new Un.Emitter,this._messageListener=n=>{this._onData.fire(n.data)},t.addEventListener("error",n=>this.fireError(n)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}};Ke.BrowserMessageReader=Pc;var _c=class extends Un.AbstractMessageWriter{constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};Ke.BrowserMessageWriter=_c;function x_(e,t,n,r){return n===void 0&&(n=Un.NullLogger),Un.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Un.createMessageConnection)(e,t,n,r)}Ke.createMessageConnection=x_});var Cc=D((gS,Xp)=>{"use strict";Xp.exports=cn()});var co={};ms(co,{AnnotatedTextEdit:()=>Rt,ChangeAnnotation:()=>un,ChangeAnnotationIdentifier:()=>Oe,CodeAction:()=>iu,CodeActionContext:()=>ru,CodeActionKind:()=>nu,CodeActionTriggerKind:()=>Nr,CodeDescription:()=>qc,CodeLens:()=>ou,Color:()=>to,ColorInformation:()=>wc,ColorPresentation:()=>Tc,Command:()=>ln,CompletionItem:()=>zc,CompletionItemKind:()=>Ic,CompletionItemLabelDetails:()=>Hc,CompletionItemTag:()=>Uc,CompletionList:()=>$c,CreateFile:()=>Bn,DeleteFile:()=>zn,Diagnostic:()=>Tr,DiagnosticRelatedInformation:()=>no,DiagnosticSeverity:()=>Oc,DiagnosticTag:()=>Nc,DocumentHighlight:()=>Qc,DocumentHighlightKind:()=>Kc,DocumentLink:()=>au,DocumentSymbol:()=>tu,DocumentUri:()=>Dc,EOL:()=>P_,FoldingRange:()=>Ac,FoldingRangeKind:()=>kc,FormattingOptions:()=>su,Hover:()=>Vc,InlayHint:()=>mu,InlayHintKind:()=>so,InlayHintLabelPart:()=>ao,InlineCompletionContext:()=>_u,InlineCompletionItem:()=>bu,InlineCompletionList:()=>vu,InlineCompletionTriggerKind:()=>xu,InlineValueContext:()=>hu,InlineValueEvaluatableExpression:()=>gu,InlineValueText:()=>pu,InlineValueVariableLookup:()=>fu,InsertReplaceEdit:()=>Wc,InsertTextFormat:()=>Fc,InsertTextMode:()=>Bc,Location:()=>wr,LocationLink:()=>Sc,MarkedString:()=>Or,MarkupContent:()=>$n,MarkupKind:()=>oo,OptionalVersionedTextDocumentIdentifier:()=>Ar,ParameterInformation:()=>Yc,Position:()=>Ze,Range:()=>de,RenameFile:()=>Hn,SelectedCompletionInfo:()=>Pu,SelectionRange:()=>cu,SemanticTokenModifiers:()=>lu,SemanticTokenTypes:()=>uu,SemanticTokens:()=>du,SignatureInformation:()=>Gc,StringValue:()=>yu,SymbolInformation:()=>Zc,SymbolKind:()=>Jc,SymbolTag:()=>Xc,TextDocument:()=>Du,TextDocumentEdit:()=>kr,TextDocumentIdentifier:()=>jc,TextDocumentItem:()=>Lc,TextEdit:()=>mt,URI:()=>eo,VersionedTextDocumentIdentifier:()=>Mc,WorkspaceChange:()=>Ec,WorkspaceEdit:()=>ro,WorkspaceFolder:()=>Cu,WorkspaceSymbol:()=>eu,integer:()=>Rc,uinteger:()=>Sr});var Dc,eo,Rc,Sr,Ze,de,wr,Sc,to,wc,Tc,kc,Ac,no,Oc,Nc,qc,Tr,ln,mt,un,Oe,Rt,kr,Bn,Hn,zn,ro,Wn,io,Ec,jc,Mc,Ar,Lc,oo,$n,Ic,Fc,Uc,Wc,Bc,Hc,zc,$c,Or,Vc,Yc,Gc,Kc,Qc,Jc,Xc,Zc,eu,tu,nu,Nr,ru,iu,ou,su,au,cu,uu,lu,du,pu,fu,gu,hu,so,ao,mu,yu,bu,vu,xu,Pu,_u,Cu,P_,Du,Ru,f,uo=_l(()=>{"use strict";(function(e){function t(n){return typeof n=="string"}e.is=t})(Dc||(Dc={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(eo||(eo={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Rc||(Rc={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Sr||(Sr={}));(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=Sr.MAX_VALUE),i===Number.MAX_VALUE&&(i=Sr.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.uinteger(i.line)&&f.uinteger(i.character)}e.is=n})(Ze||(Ze={}));(function(e){function t(r,i,o,s){if(f.uinteger(r)&&f.uinteger(i)&&f.uinteger(o)&&f.uinteger(s))return{start:Ze.create(r,i),end:Ze.create(o,s)};if(Ze.is(r)&&Ze.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&Ze.is(i.start)&&Ze.is(i.end)}e.is=n})(de||(de={}));(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&de.is(i.range)&&(f.string(i.uri)||f.undefined(i.uri))}e.is=n})(wr||(wr={}));(function(e){function t(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&de.is(i.targetRange)&&f.string(i.targetUri)&&de.is(i.targetSelectionRange)&&(de.is(i.originSelectionRange)||f.undefined(i.originSelectionRange))}e.is=n})(Sc||(Sc={}));(function(e){function t(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.numberRange(i.red,0,1)&&f.numberRange(i.green,0,1)&&f.numberRange(i.blue,0,1)&&f.numberRange(i.alpha,0,1)}e.is=n})(to||(to={}));(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&de.is(i.range)&&to.is(i.color)}e.is=n})(wc||(wc={}));(function(e){function t(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.string(i.label)&&(f.undefined(i.textEdit)||mt.is(i))&&(f.undefined(i.additionalTextEdits)||f.typedArray(i.additionalTextEdits,mt.is))}e.is=n})(Tc||(Tc={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(kc||(kc={}));(function(e){function t(r,i,o,s,a,c){let l={startLine:r,endLine:i};return f.defined(o)&&(l.startCharacter=o),f.defined(s)&&(l.endCharacter=s),f.defined(a)&&(l.kind=a),f.defined(c)&&(l.collapsedText=c),l}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.uinteger(i.startLine)&&f.uinteger(i.startLine)&&(f.undefined(i.startCharacter)||f.uinteger(i.startCharacter))&&(f.undefined(i.endCharacter)||f.uinteger(i.endCharacter))&&(f.undefined(i.kind)||f.string(i.kind))}e.is=n})(Ac||(Ac={}));(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&wr.is(i.location)&&f.string(i.message)}e.is=n})(no||(no={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Oc||(Oc={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Nc||(Nc={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&f.string(r.href)}e.is=t})(qc||(qc={}));(function(e){function t(r,i,o,s,a,c){let l={range:r,message:i};return f.defined(o)&&(l.severity=o),f.defined(s)&&(l.code=s),f.defined(a)&&(l.source=a),f.defined(c)&&(l.relatedInformation=c),l}e.create=t;function n(r){var i;let o=r;return f.defined(o)&&de.is(o.range)&&f.string(o.message)&&(f.number(o.severity)||f.undefined(o.severity))&&(f.integer(o.code)||f.string(o.code)||f.undefined(o.code))&&(f.undefined(o.codeDescription)||f.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(f.string(o.source)||f.undefined(o.source))&&(f.undefined(o.relatedInformation)||f.typedArray(o.relatedInformation,no.is))}e.is=n})(Tr||(Tr={}));(function(e){function t(r,i,...o){let s={title:r,command:i};return f.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.title)&&f.string(i.command)}e.is=n})(ln||(ln={}));(function(e){function t(o,s){return{range:o,newText:s}}e.replace=t;function n(o,s){return{range:{start:o,end:o},newText:s}}e.insert=n;function r(o){return{range:o,newText:""}}e.del=r;function i(o){let s=o;return f.objectLiteral(s)&&f.string(s.newText)&&de.is(s.range)}e.is=i})(mt||(mt={}));(function(e){function t(r,i,o){let s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&f.string(i.label)&&(f.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(f.string(i.description)||i.description===void 0)}e.is=n})(un||(un={}));(function(e){function t(n){let r=n;return f.string(r)}e.is=t})(Oe||(Oe={}));(function(e){function t(o,s,a){return{range:o,newText:s,annotationId:a}}e.replace=t;function n(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}e.insert=n;function r(o,s){return{range:o,newText:"",annotationId:s}}e.del=r;function i(o){let s=o;return mt.is(s)&&(un.is(s.annotationId)||Oe.is(s.annotationId))}e.is=i})(Rt||(Rt={}));(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&Ar.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(kr||(kr={}));(function(e){function t(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&f.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||f.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||f.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Oe.is(i.annotationId))}e.is=n})(Bn||(Bn={}));(function(e){function t(r,i,o,s){let a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&f.string(i.oldUri)&&f.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||f.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||f.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Oe.is(i.annotationId))}e.is=n})(Hn||(Hn={}));(function(e){function t(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&f.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||f.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||f.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Oe.is(i.annotationId))}e.is=n})(zn||(zn={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>f.string(i.kind)?Bn.is(i)||Hn.is(i)||zn.is(i):kr.is(i)))}e.is=t})(ro||(ro={}));Wn=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let i,o;if(r===void 0?i=mt.insert(t,n):Oe.is(r)?(o=r,i=Rt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Rt.insert(t,n,o)),this.edits.push(i),o!==void 0)return o}replace(t,n,r){let i,o;if(r===void 0?i=mt.replace(t,n):Oe.is(r)?(o=r,i=Rt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Rt.replace(t,n,o)),this.edits.push(i),o!==void 0)return o}delete(t,n){let r,i;if(n===void 0?r=mt.del(t):Oe.is(n)?(i=n,r=Rt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Rt.del(t,i)),this.edits.push(r),i!==void 0)return i}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},io=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(Oe.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Ec=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new io(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(kr.is(n)){let r=new Wn(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Wn(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Ar.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let i=[],o={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(o),r=new Wn(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Wn(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new io,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;un.is(n)||Oe.is(n)?i=n:r=n;let o,s;if(i===void 0?o=Bn.create(t,r):(s=Oe.is(i)?i:this._changeAnnotations.manage(i),o=Bn.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}renameFile(t,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;un.is(r)||Oe.is(r)?o=r:i=r;let s,a;if(o===void 0?s=Hn.create(t,n,i):(a=Oe.is(o)?o:this._changeAnnotations.manage(o),s=Hn.create(t,n,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;un.is(n)||Oe.is(n)?i=n:r=n;let o,s;if(i===void 0?o=zn.create(t,r):(s=Oe.is(i)?i:this._changeAnnotations.manage(i),o=zn.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)}e.is=n})(jc||(jc={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)&&f.integer(i.version)}e.is=n})(Mc||(Mc={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)&&(i.version===null||f.integer(i.version))}e.is=n})(Ar||(Ar={}));(function(e){function t(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.string(i.uri)&&f.string(i.languageId)&&f.integer(i.version)&&f.string(i.text)}e.is=n})(Lc||(Lc={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(oo||(oo={}));(function(e){function t(n){let r=n;return f.objectLiteral(n)&&oo.is(r.kind)&&f.string(r.value)}e.is=t})($n||($n={}));(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})(Ic||(Ic={}));(function(e){e.PlainText=1,e.Snippet=2})(Fc||(Fc={}));(function(e){e.Deprecated=1})(Uc||(Uc={}));(function(e){function t(r,i,o){return{newText:r,insert:i,replace:o}}e.create=t;function n(r){let i=r;return i&&f.string(i.newText)&&de.is(i.insert)&&de.is(i.replace)}e.is=n})(Wc||(Wc={}));(function(e){e.asIs=1,e.adjustIndentation=2})(Bc||(Bc={}));(function(e){function t(n){let r=n;return r&&(f.string(r.detail)||r.detail===void 0)&&(f.string(r.description)||r.description===void 0)}e.is=t})(Hc||(Hc={}));(function(e){function t(n){return{label:n}}e.create=t})(zc||(zc={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})($c||($c={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return f.string(i)||f.objectLiteral(i)&&f.string(i.language)&&f.string(i.value)}e.is=n})(Or||(Or={}));(function(e){function t(n){let r=n;return!!r&&f.objectLiteral(r)&&($n.is(r.contents)||Or.is(r.contents)||f.typedArray(r.contents,Or.is))&&(n.range===void 0||de.is(n.range))}e.is=t})(Vc||(Vc={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Yc||(Yc={}));(function(e){function t(n,r,...i){let o={label:n};return f.defined(r)&&(o.documentation=r),f.defined(i)?o.parameters=i:o.parameters=[],o}e.create=t})(Gc||(Gc={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(Kc||(Kc={}));(function(e){function t(n,r){let i={range:n};return f.number(r)&&(i.kind=r),i}e.create=t})(Qc||(Qc={}));(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})(Jc||(Jc={}));(function(e){e.Deprecated=1})(Xc||(Xc={}));(function(e){function t(n,r,i,o,s){let a={name:n,kind:r,location:{uri:o,range:i}};return s&&(a.containerName=s),a}e.create=t})(Zc||(Zc={}));(function(e){function t(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(eu||(eu={}));(function(e){function t(r,i,o,s,a,c){let l={name:r,detail:i,kind:o,range:s,selectionRange:a};return c!==void 0&&(l.children=c),l}e.create=t;function n(r){let i=r;return i&&f.string(i.name)&&f.number(i.kind)&&de.is(i.range)&&de.is(i.selectionRange)&&(i.detail===void 0||f.string(i.detail))&&(i.deprecated===void 0||f.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(tu||(tu={}));(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"})(nu||(nu={}));(function(e){e.Invoked=1,e.Automatic=2})(Nr||(Nr={}));(function(e){function t(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}e.create=t;function n(r){let i=r;return f.defined(i)&&f.typedArray(i.diagnostics,Tr.is)&&(i.only===void 0||f.typedArray(i.only,f.string))&&(i.triggerKind===void 0||i.triggerKind===Nr.Invoked||i.triggerKind===Nr.Automatic)}e.is=n})(ru||(ru={}));(function(e){function t(r,i,o){let s={title:r},a=!0;return typeof i=="string"?(a=!1,s.kind=i):ln.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return i&&f.string(i.title)&&(i.diagnostics===void 0||f.typedArray(i.diagnostics,Tr.is))&&(i.kind===void 0||f.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||ln.is(i.command))&&(i.isPreferred===void 0||f.boolean(i.isPreferred))&&(i.edit===void 0||ro.is(i.edit))}e.is=n})(iu||(iu={}));(function(e){function t(r,i){let o={range:r};return f.defined(i)&&(o.data=i),o}e.create=t;function n(r){let i=r;return f.defined(i)&&de.is(i.range)&&(f.undefined(i.command)||ln.is(i.command))}e.is=n})(ou||(ou={}));(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&f.uinteger(i.tabSize)&&f.boolean(i.insertSpaces)}e.is=n})(su||(su={}));(function(e){function t(r,i,o){return{range:r,target:i,data:o}}e.create=t;function n(r){let i=r;return f.defined(i)&&de.is(i.range)&&(f.undefined(i.target)||f.string(i.target))}e.is=n})(au||(au={}));(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&de.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(cu||(cu={}));(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"})(uu||(uu={}));(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"})(lu||(lu={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(du||(du={}));(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&de.is(i.range)&&f.string(i.text)}e.is=n})(pu||(pu={}));(function(e){function t(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}e.create=t;function n(r){let i=r;return i!=null&&de.is(i.range)&&f.boolean(i.caseSensitiveLookup)&&(f.string(i.variableName)||i.variableName===void 0)}e.is=n})(fu||(fu={}));(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&de.is(i.range)&&(f.string(i.expression)||i.expression===void 0)}e.is=n})(gu||(gu={}));(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return f.defined(i)&&de.is(r.stoppedLocation)}e.is=n})(hu||(hu={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(so||(so={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&(i.tooltip===void 0||f.string(i.tooltip)||$n.is(i.tooltip))&&(i.location===void 0||wr.is(i.location))&&(i.command===void 0||ln.is(i.command))}e.is=n})(ao||(ao={}));(function(e){function t(r,i,o){let s={position:r,label:i};return o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return f.objectLiteral(i)&&Ze.is(i.position)&&(f.string(i.label)||f.typedArray(i.label,ao.is))&&(i.kind===void 0||so.is(i.kind))&&i.textEdits===void 0||f.typedArray(i.textEdits,mt.is)&&(i.tooltip===void 0||f.string(i.tooltip)||$n.is(i.tooltip))&&(i.paddingLeft===void 0||f.boolean(i.paddingLeft))&&(i.paddingRight===void 0||f.boolean(i.paddingRight))}e.is=n})(mu||(mu={}));(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(yu||(yu={}));(function(e){function t(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}e.create=t})(bu||(bu={}));(function(e){function t(n){return{items:n}}e.create=t})(vu||(vu={}));(function(e){e.Invoked=0,e.Automatic=1})(xu||(xu={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Pu||(Pu={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(_u||(_u={}));(function(e){function t(n){let r=n;return f.objectLiteral(r)&&eo.is(r.uri)&&f.string(r.name)}e.is=t})(Cu||(Cu={}));P_=[`
|
|
64
66
|
`,`\r
|
|
65
|
-
`,"\r"];
|
|
66
|
-
`,
|
|
67
|
-
`&&a++}f&&y.length>0&&h.push(y.length),this._lineOffsets=h}return this._lineOffsets},l.prototype.positionAt=function(h){h=Math.max(Math.min(h,this._content.length),0);var y=this.getLineOffsets(),f=0,a=y.length;if(a===0)return s.create(0,h);for(;f<a;){var P=Math.floor((f+a)/2);y[P]>h?a=P:f=P+1}var k=f-1;return s.create(k,h-y[k])},l.prototype.offsetAt=function(h){var y=this.getLineOffsets();if(h.line>=y.length)return this._content.length;if(h.line<0)return 0;var f=y[h.line],a=h.line+1<y.length?y[h.line+1]:this._content.length;return Math.max(Math.min(f+h.character,a),f)},Object.defineProperty(l.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),l}(),C;(function(l){var h=Object.prototype.toString;function y(Z){return typeof Z<"u"}l.defined=y;function f(Z){return typeof Z>"u"}l.undefined=f;function a(Z){return Z===!0||Z===!1}l.boolean=a;function P(Z){return h.call(Z)==="[object String]"}l.string=P;function k(Z){return h.call(Z)==="[object Number]"}l.number=k;function G(Z,kn,Xr){return h.call(Z)==="[object Number]"&&kn<=Z&&Z<=Xr}l.numberRange=G;function Ce(Z){return h.call(Z)==="[object Number]"&&-2147483648<=Z&&Z<=2147483647}l.integer=Ce;function le(Z){return h.call(Z)==="[object Number]"&&0<=Z&&Z<=2147483647}l.uinteger=le;function pt(Z){return h.call(Z)==="[object Function]"}l.func=pt;function gt(Z){return Z!==null&&typeof Z=="object"}l.objectLiteral=gt;function It(Z,kn){return Array.isArray(Z)&&Z.every(kn)}l.typedArray=It})(C||(C={}))})});var be=A($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ProtocolNotificationType=$e.ProtocolNotificationType0=$e.ProtocolRequestType=$e.ProtocolRequestType0=$e.RegistrationType=$e.MessageDirection=void 0;var Jn=_n(),Hb;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Hb=$e.MessageDirection||($e.MessageDirection={}));var mc=class{constructor(t){this.method=t}};$e.RegistrationType=mc;var hc=class extends Jn.RequestType0{constructor(t){super(t)}};$e.ProtocolRequestType0=hc;var yc=class extends Jn.RequestType{constructor(t){super(t,Jn.ParameterStructures.byName)}};$e.ProtocolRequestType=yc;var bc=class extends Jn.NotificationType0{constructor(t){super(t)}};$e.ProtocolNotificationType0=bc;var vc=class extends Jn.NotificationType{constructor(t){super(t,Jn.ParameterStructures.byName)}};$e.ProtocolNotificationType=vc});var to=A(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.objectLiteral=Se.typedArray=Se.stringArray=Se.array=Se.func=Se.error=Se.number=Se.string=Se.boolean=void 0;function Bb(e){return e===!0||e===!1}Se.boolean=Bb;function Ed(e){return typeof e=="string"||e instanceof String}Se.string=Ed;function zb(e){return typeof e=="number"||e instanceof Number}Se.number=zb;function Vb(e){return e instanceof Error}Se.error=Vb;function $b(e){return typeof e=="function"}Se.func=$b;function Md(e){return Array.isArray(e)}Se.array=Md;function Yb(e){return Md(e)&&e.every(t=>Ed(t))}Se.stringArray=Yb;function Kb(e,t){return Array.isArray(e)&&e.every(t)}Se.typedArray=Kb;function Gb(e){return e!==null&&typeof e=="object"}Se.objectLiteral=Gb});var Id=A(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.ImplementationRequest=void 0;var jd=be(),Qb;(function(e){e.method="textDocument/implementation",e.messageDirection=jd.MessageDirection.clientToServer,e.type=new jd.ProtocolRequestType(e.method)})(Qb=xr.ImplementationRequest||(xr.ImplementationRequest={}))});var Fd=A(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.TypeDefinitionRequest=void 0;var Ld=be(),Jb;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Ld.MessageDirection.clientToServer,e.type=new Ld.ProtocolRequestType(e.method)})(Jb=wr.TypeDefinitionRequest||(wr.TypeDefinitionRequest={}))});var Ud=A(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.DidChangeWorkspaceFoldersNotification=en.WorkspaceFoldersRequest=void 0;var no=be(),Xb;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=no.MessageDirection.serverToClient,e.type=new no.ProtocolRequestType0(e.method)})(Xb=en.WorkspaceFoldersRequest||(en.WorkspaceFoldersRequest={}));var Zb;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=no.MessageDirection.clientToServer,e.type=new no.ProtocolNotificationType(e.method)})(Zb=en.DidChangeWorkspaceFoldersNotification||(en.DidChangeWorkspaceFoldersNotification={}))});var Hd=A(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.ConfigurationRequest=void 0;var Wd=be(),ev;(function(e){e.method="workspace/configuration",e.messageDirection=Wd.MessageDirection.serverToClient,e.type=new Wd.ProtocolRequestType(e.method)})(ev=kr.ConfigurationRequest||(kr.ConfigurationRequest={}))});var Bd=A(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.ColorPresentationRequest=tn.DocumentColorRequest=void 0;var ro=be(),tv;(function(e){e.method="textDocument/documentColor",e.messageDirection=ro.MessageDirection.clientToServer,e.type=new ro.ProtocolRequestType(e.method)})(tv=tn.DocumentColorRequest||(tn.DocumentColorRequest={}));var nv;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=ro.MessageDirection.clientToServer,e.type=new ro.ProtocolRequestType(e.method)})(nv=tn.ColorPresentationRequest||(tn.ColorPresentationRequest={}))});var Vd=A(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.FoldingRangeRequest=void 0;var zd=be(),rv;(function(e){e.method="textDocument/foldingRange",e.messageDirection=zd.MessageDirection.clientToServer,e.type=new zd.ProtocolRequestType(e.method)})(rv=Ar.FoldingRangeRequest||(Ar.FoldingRangeRequest={}))});var Yd=A(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.DeclarationRequest=void 0;var $d=be(),iv;(function(e){e.method="textDocument/declaration",e.messageDirection=$d.MessageDirection.clientToServer,e.type=new $d.ProtocolRequestType(e.method)})(iv=qr.DeclarationRequest||(qr.DeclarationRequest={}))});var Gd=A(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.SelectionRangeRequest=void 0;var Kd=be(),ov;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Kd.MessageDirection.clientToServer,e.type=new Kd.ProtocolRequestType(e.method)})(ov=Nr.SelectionRangeRequest||(Nr.SelectionRangeRequest={}))});var Qd=A(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.WorkDoneProgressCancelNotification=bt.WorkDoneProgressCreateRequest=bt.WorkDoneProgress=void 0;var sv=_n(),io=be(),av;(function(e){e.type=new sv.ProgressType;function t(n){return n===e.type}e.is=t})(av=bt.WorkDoneProgress||(bt.WorkDoneProgress={}));var cv;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=io.MessageDirection.serverToClient,e.type=new io.ProtocolRequestType(e.method)})(cv=bt.WorkDoneProgressCreateRequest||(bt.WorkDoneProgressCreateRequest={}));var uv;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=io.MessageDirection.clientToServer,e.type=new io.ProtocolNotificationType(e.method)})(uv=bt.WorkDoneProgressCancelNotification||(bt.WorkDoneProgressCancelNotification={}))});var Jd=A(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.CallHierarchyOutgoingCallsRequest=vt.CallHierarchyIncomingCallsRequest=vt.CallHierarchyPrepareRequest=void 0;var Xn=be(),lv;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(lv=vt.CallHierarchyPrepareRequest||(vt.CallHierarchyPrepareRequest={}));var dv;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(dv=vt.CallHierarchyIncomingCallsRequest||(vt.CallHierarchyIncomingCallsRequest={}));var fv;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(fv=vt.CallHierarchyOutgoingCallsRequest||(vt.CallHierarchyOutgoingCallsRequest={}))});var Xd=A(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.SemanticTokensRefreshRequest=Te.SemanticTokensRangeRequest=Te.SemanticTokensDeltaRequest=Te.SemanticTokensRequest=Te.SemanticTokensRegistrationType=Te.TokenFormat=void 0;var zt=be(),pv;(function(e){e.Relative="relative"})(pv=Te.TokenFormat||(Te.TokenFormat={}));var oo;(function(e){e.method="textDocument/semanticTokens",e.type=new zt.RegistrationType(e.method)})(oo=Te.SemanticTokensRegistrationType||(Te.SemanticTokensRegistrationType={}));var gv;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(gv=Te.SemanticTokensRequest||(Te.SemanticTokensRequest={}));var mv;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(mv=Te.SemanticTokensDeltaRequest||(Te.SemanticTokensDeltaRequest={}));var hv;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(hv=Te.SemanticTokensRangeRequest||(Te.SemanticTokensRangeRequest={}));var yv;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=zt.MessageDirection.serverToClient,e.type=new zt.ProtocolRequestType0(e.method)})(yv=Te.SemanticTokensRefreshRequest||(Te.SemanticTokensRefreshRequest={}))});var ef=A(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.ShowDocumentRequest=void 0;var Zd=be(),bv;(function(e){e.method="window/showDocument",e.messageDirection=Zd.MessageDirection.serverToClient,e.type=new Zd.ProtocolRequestType(e.method)})(bv=Or.ShowDocumentRequest||(Or.ShowDocumentRequest={}))});var nf=A(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.LinkedEditingRangeRequest=void 0;var tf=be(),vv;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=tf.MessageDirection.clientToServer,e.type=new tf.ProtocolRequestType(e.method)})(vv=Er.LinkedEditingRangeRequest||(Er.LinkedEditingRangeRequest={}))});var rf=A(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.WillDeleteFilesRequest=ve.DidDeleteFilesNotification=ve.DidRenameFilesNotification=ve.WillRenameFilesRequest=ve.DidCreateFilesNotification=ve.WillCreateFilesRequest=ve.FileOperationPatternKind=void 0;var at=be(),Cv;(function(e){e.file="file",e.folder="folder"})(Cv=ve.FileOperationPatternKind||(ve.FileOperationPatternKind={}));var Pv;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(Pv=ve.WillCreateFilesRequest||(ve.WillCreateFilesRequest={}));var _v;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(_v=ve.DidCreateFilesNotification||(ve.DidCreateFilesNotification={}));var Dv;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(Dv=ve.WillRenameFilesRequest||(ve.WillRenameFilesRequest={}));var Rv;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(Rv=ve.DidRenameFilesNotification||(ve.DidRenameFilesNotification={}));var Sv;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(Sv=ve.DidDeleteFilesNotification||(ve.DidDeleteFilesNotification={}));var Tv;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(Tv=ve.WillDeleteFilesRequest||(ve.WillDeleteFilesRequest={}))});var sf=A(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.MonikerRequest=Ct.MonikerKind=Ct.UniquenessLevel=void 0;var of=be(),xv;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(xv=Ct.UniquenessLevel||(Ct.UniquenessLevel={}));var wv;(function(e){e.$import="import",e.$export="export",e.local="local"})(wv=Ct.MonikerKind||(Ct.MonikerKind={}));var kv;(function(e){e.method="textDocument/moniker",e.messageDirection=of.MessageDirection.clientToServer,e.type=new of.ProtocolRequestType(e.method)})(kv=Ct.MonikerRequest||(Ct.MonikerRequest={}))});var af=A(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.TypeHierarchySubtypesRequest=Pt.TypeHierarchySupertypesRequest=Pt.TypeHierarchyPrepareRequest=void 0;var Zn=be(),Av;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(Av=Pt.TypeHierarchyPrepareRequest||(Pt.TypeHierarchyPrepareRequest={}));var qv;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(qv=Pt.TypeHierarchySupertypesRequest||(Pt.TypeHierarchySupertypesRequest={}));var Nv;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(Nv=Pt.TypeHierarchySubtypesRequest||(Pt.TypeHierarchySubtypesRequest={}))});var cf=A(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.InlineValueRefreshRequest=nn.InlineValueRequest=void 0;var so=be(),Ov;(function(e){e.method="textDocument/inlineValue",e.messageDirection=so.MessageDirection.clientToServer,e.type=new so.ProtocolRequestType(e.method)})(Ov=nn.InlineValueRequest||(nn.InlineValueRequest={}));var Ev;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=so.MessageDirection.serverToClient,e.type=new so.ProtocolRequestType0(e.method)})(Ev=nn.InlineValueRefreshRequest||(nn.InlineValueRefreshRequest={}))});var uf=A(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var er=be(),Mv;(function(e){e.method="textDocument/inlayHint",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method)})(Mv=_t.InlayHintRequest||(_t.InlayHintRequest={}));var jv;(function(e){e.method="inlayHint/resolve",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method)})(jv=_t.InlayHintResolveRequest||(_t.InlayHintResolveRequest={}));var Iv;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=er.MessageDirection.serverToClient,e.type=new er.ProtocolRequestType0(e.method)})(Iv=_t.InlayHintRefreshRequest||(_t.InlayHintRefreshRequest={}))});var df=A(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.DiagnosticRefreshRequest=Fe.WorkspaceDiagnosticRequest=Fe.DocumentDiagnosticRequest=Fe.DocumentDiagnosticReportKind=Fe.DiagnosticServerCancellationData=void 0;var lf=_n(),Lv=to(),tr=be(),Fv;(function(e){function t(n){let r=n;return r&&Lv.boolean(r.retriggerRequest)}e.is=t})(Fv=Fe.DiagnosticServerCancellationData||(Fe.DiagnosticServerCancellationData={}));var Uv;(function(e){e.Full="full",e.Unchanged="unchanged"})(Uv=Fe.DocumentDiagnosticReportKind||(Fe.DocumentDiagnosticReportKind={}));var Wv;(function(e){e.method="textDocument/diagnostic",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method),e.partialResult=new lf.ProgressType})(Wv=Fe.DocumentDiagnosticRequest||(Fe.DocumentDiagnosticRequest={}));var Hv;(function(e){e.method="workspace/diagnostic",e.messageDirection=tr.MessageDirection.clientToServer,e.type=new tr.ProtocolRequestType(e.method),e.partialResult=new lf.ProgressType})(Hv=Fe.WorkspaceDiagnosticRequest||(Fe.WorkspaceDiagnosticRequest={}));var Bv;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=tr.MessageDirection.serverToClient,e.type=new tr.ProtocolRequestType0(e.method)})(Bv=Fe.DiagnosticRefreshRequest||(Fe.DiagnosticRefreshRequest={}))});var gf=A(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.DidCloseNotebookDocumentNotification=te.DidSaveNotebookDocumentNotification=te.DidChangeNotebookDocumentNotification=te.NotebookCellArrayChange=te.DidOpenNotebookDocumentNotification=te.NotebookDocumentSyncRegistrationType=te.NotebookDocument=te.NotebookCell=te.ExecutionSummary=te.NotebookCellKind=void 0;var Mr=eo(),Dt=to(),qt=be(),ff;(function(e){e.Markup=1,e.Code=2;function t(n){return n===1||n===2}e.is=t})(ff=te.NotebookCellKind||(te.NotebookCellKind={}));var pf;(function(e){function t(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}e.create=t;function n(i){let o=i;return Dt.objectLiteral(o)&&Mr.uinteger.is(o.executionOrder)&&(o.success===void 0||Dt.boolean(o.success))}e.is=n;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}e.equals=r})(pf=te.ExecutionSummary||(te.ExecutionSummary={}));var Cc;(function(e){function t(o,s){return{kind:o,document:s}}e.create=t;function n(o){let s=o;return Dt.objectLiteral(s)&&ff.is(s.kind)&&Mr.DocumentUri.is(s.document)&&(s.metadata===void 0||Dt.objectLiteral(s.metadata))}e.is=n;function r(o,s){let u=new Set;return o.document!==s.document&&u.add("document"),o.kind!==s.kind&&u.add("kind"),o.executionSummary!==s.executionSummary&&u.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&u.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!pf.equals(o.executionSummary,s.executionSummary)&&u.add("executionSummary"),u}e.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let u=Array.isArray(o),c=Array.isArray(s);if(u!==c)return!1;if(u&&c){if(o.length!==s.length)return!1;for(let p=0;p<o.length;p++)if(!i(o[p],s[p]))return!1}if(Dt.objectLiteral(o)&&Dt.objectLiteral(s)){let p=Object.keys(o),g=Object.keys(s);if(p.length!==g.length||(p.sort(),g.sort(),!i(p,g)))return!1;for(let b=0;b<p.length;b++){let D=p[b];if(!i(o[D],s[D]))return!1}}return!0}})(Cc=te.NotebookCell||(te.NotebookCell={}));var zv;(function(e){function t(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}e.create=t;function n(r){let i=r;return Dt.objectLiteral(i)&&Dt.string(i.uri)&&Mr.integer.is(i.version)&&Dt.typedArray(i.cells,Cc.is)}e.is=n})(zv=te.NotebookDocument||(te.NotebookDocument={}));var jr;(function(e){e.method="notebookDocument/sync",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.RegistrationType(e.method)})(jr=te.NotebookDocumentSyncRegistrationType||(te.NotebookDocumentSyncRegistrationType={}));var Vv;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=jr.method})(Vv=te.DidOpenNotebookDocumentNotification||(te.DidOpenNotebookDocumentNotification={}));var $v;(function(e){function t(r){let i=r;return Dt.objectLiteral(i)&&Mr.uinteger.is(i.start)&&Mr.uinteger.is(i.deleteCount)&&(i.cells===void 0||Dt.typedArray(i.cells,Cc.is))}e.is=t;function n(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}e.create=n})($v=te.NotebookCellArrayChange||(te.NotebookCellArrayChange={}));var Yv;(function(e){e.method="notebookDocument/didChange",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=jr.method})(Yv=te.DidChangeNotebookDocumentNotification||(te.DidChangeNotebookDocumentNotification={}));var Kv;(function(e){e.method="notebookDocument/didSave",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=jr.method})(Kv=te.DidSaveNotebookDocumentNotification||(te.DidSaveNotebookDocumentNotification={}));var Gv;(function(e){e.method="notebookDocument/didClose",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=jr.method})(Gv=te.DidCloseNotebookDocumentNotification||(te.DidCloseNotebookDocumentNotification={}))});var Df=A(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.WorkspaceSymbolRequest=d.CodeActionResolveRequest=d.CodeActionRequest=d.DocumentSymbolRequest=d.DocumentHighlightRequest=d.ReferencesRequest=d.DefinitionRequest=d.SignatureHelpRequest=d.SignatureHelpTriggerKind=d.HoverRequest=d.CompletionResolveRequest=d.CompletionRequest=d.CompletionTriggerKind=d.PublishDiagnosticsNotification=d.WatchKind=d.RelativePattern=d.FileChangeType=d.DidChangeWatchedFilesNotification=d.WillSaveTextDocumentWaitUntilRequest=d.WillSaveTextDocumentNotification=d.TextDocumentSaveReason=d.DidSaveTextDocumentNotification=d.DidCloseTextDocumentNotification=d.DidChangeTextDocumentNotification=d.TextDocumentContentChangeEvent=d.DidOpenTextDocumentNotification=d.TextDocumentSyncKind=d.TelemetryEventNotification=d.LogMessageNotification=d.ShowMessageRequest=d.ShowMessageNotification=d.MessageType=d.DidChangeConfigurationNotification=d.ExitNotification=d.ShutdownRequest=d.InitializedNotification=d.InitializeErrorCodes=d.InitializeRequest=d.WorkDoneProgressOptions=d.TextDocumentRegistrationOptions=d.StaticRegistrationOptions=d.PositionEncodingKind=d.FailureHandlingKind=d.ResourceOperationKind=d.UnregistrationRequest=d.RegistrationRequest=d.DocumentSelector=d.NotebookCellTextDocumentFilter=d.NotebookDocumentFilter=d.TextDocumentFilter=void 0;d.TypeHierarchySubtypesRequest=d.TypeHierarchyPrepareRequest=d.MonikerRequest=d.MonikerKind=d.UniquenessLevel=d.WillDeleteFilesRequest=d.DidDeleteFilesNotification=d.WillRenameFilesRequest=d.DidRenameFilesNotification=d.WillCreateFilesRequest=d.DidCreateFilesNotification=d.FileOperationPatternKind=d.LinkedEditingRangeRequest=d.ShowDocumentRequest=d.SemanticTokensRegistrationType=d.SemanticTokensRefreshRequest=d.SemanticTokensRangeRequest=d.SemanticTokensDeltaRequest=d.SemanticTokensRequest=d.TokenFormat=d.CallHierarchyPrepareRequest=d.CallHierarchyOutgoingCallsRequest=d.CallHierarchyIncomingCallsRequest=d.WorkDoneProgressCancelNotification=d.WorkDoneProgressCreateRequest=d.WorkDoneProgress=d.SelectionRangeRequest=d.DeclarationRequest=d.FoldingRangeRequest=d.ColorPresentationRequest=d.DocumentColorRequest=d.ConfigurationRequest=d.DidChangeWorkspaceFoldersNotification=d.WorkspaceFoldersRequest=d.TypeDefinitionRequest=d.ImplementationRequest=d.ApplyWorkspaceEditRequest=d.ExecuteCommandRequest=d.PrepareRenameRequest=d.RenameRequest=d.PrepareSupportDefaultBehavior=d.DocumentOnTypeFormattingRequest=d.DocumentRangeFormattingRequest=d.DocumentFormattingRequest=d.DocumentLinkResolveRequest=d.DocumentLinkRequest=d.CodeLensRefreshRequest=d.CodeLensResolveRequest=d.CodeLensRequest=d.WorkspaceSymbolResolveRequest=void 0;d.DidCloseNotebookDocumentNotification=d.DidSaveNotebookDocumentNotification=d.DidChangeNotebookDocumentNotification=d.NotebookCellArrayChange=d.DidOpenNotebookDocumentNotification=d.NotebookDocumentSyncRegistrationType=d.NotebookDocument=d.NotebookCell=d.ExecutionSummary=d.NotebookCellKind=d.DiagnosticRefreshRequest=d.WorkspaceDiagnosticRequest=d.DocumentDiagnosticRequest=d.DocumentDiagnosticReportKind=d.DiagnosticServerCancellationData=d.InlayHintRefreshRequest=d.InlayHintResolveRequest=d.InlayHintRequest=d.InlineValueRefreshRequest=d.InlineValueRequest=d.TypeHierarchySupertypesRequest=void 0;var O=be(),mf=eo(),Ue=to(),Qv=Id();Object.defineProperty(d,"ImplementationRequest",{enumerable:!0,get:function(){return Qv.ImplementationRequest}});var Jv=Fd();Object.defineProperty(d,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Jv.TypeDefinitionRequest}});var hf=Ud();Object.defineProperty(d,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return hf.WorkspaceFoldersRequest}});Object.defineProperty(d,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return hf.DidChangeWorkspaceFoldersNotification}});var Xv=Hd();Object.defineProperty(d,"ConfigurationRequest",{enumerable:!0,get:function(){return Xv.ConfigurationRequest}});var yf=Bd();Object.defineProperty(d,"DocumentColorRequest",{enumerable:!0,get:function(){return yf.DocumentColorRequest}});Object.defineProperty(d,"ColorPresentationRequest",{enumerable:!0,get:function(){return yf.ColorPresentationRequest}});var Zv=Vd();Object.defineProperty(d,"FoldingRangeRequest",{enumerable:!0,get:function(){return Zv.FoldingRangeRequest}});var eC=Yd();Object.defineProperty(d,"DeclarationRequest",{enumerable:!0,get:function(){return eC.DeclarationRequest}});var tC=Gd();Object.defineProperty(d,"SelectionRangeRequest",{enumerable:!0,get:function(){return tC.SelectionRangeRequest}});var Pc=Qd();Object.defineProperty(d,"WorkDoneProgress",{enumerable:!0,get:function(){return Pc.WorkDoneProgress}});Object.defineProperty(d,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Pc.WorkDoneProgressCreateRequest}});Object.defineProperty(d,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Pc.WorkDoneProgressCancelNotification}});var _c=Jd();Object.defineProperty(d,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return _c.CallHierarchyIncomingCallsRequest}});Object.defineProperty(d,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return _c.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(d,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return _c.CallHierarchyPrepareRequest}});var nr=Xd();Object.defineProperty(d,"TokenFormat",{enumerable:!0,get:function(){return nr.TokenFormat}});Object.defineProperty(d,"SemanticTokensRequest",{enumerable:!0,get:function(){return nr.SemanticTokensRequest}});Object.defineProperty(d,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return nr.SemanticTokensDeltaRequest}});Object.defineProperty(d,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return nr.SemanticTokensRangeRequest}});Object.defineProperty(d,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return nr.SemanticTokensRefreshRequest}});Object.defineProperty(d,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return nr.SemanticTokensRegistrationType}});var nC=ef();Object.defineProperty(d,"ShowDocumentRequest",{enumerable:!0,get:function(){return nC.ShowDocumentRequest}});var rC=nf();Object.defineProperty(d,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return rC.LinkedEditingRangeRequest}});var Dn=rf();Object.defineProperty(d,"FileOperationPatternKind",{enumerable:!0,get:function(){return Dn.FileOperationPatternKind}});Object.defineProperty(d,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Dn.DidCreateFilesNotification}});Object.defineProperty(d,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Dn.WillCreateFilesRequest}});Object.defineProperty(d,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Dn.DidRenameFilesNotification}});Object.defineProperty(d,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Dn.WillRenameFilesRequest}});Object.defineProperty(d,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Dn.DidDeleteFilesNotification}});Object.defineProperty(d,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Dn.WillDeleteFilesRequest}});var Dc=sf();Object.defineProperty(d,"UniquenessLevel",{enumerable:!0,get:function(){return Dc.UniquenessLevel}});Object.defineProperty(d,"MonikerKind",{enumerable:!0,get:function(){return Dc.MonikerKind}});Object.defineProperty(d,"MonikerRequest",{enumerable:!0,get:function(){return Dc.MonikerRequest}});var Rc=af();Object.defineProperty(d,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchyPrepareRequest}});Object.defineProperty(d,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchySubtypesRequest}});Object.defineProperty(d,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchySupertypesRequest}});var bf=cf();Object.defineProperty(d,"InlineValueRequest",{enumerable:!0,get:function(){return bf.InlineValueRequest}});Object.defineProperty(d,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return bf.InlineValueRefreshRequest}});var Sc=uf();Object.defineProperty(d,"InlayHintRequest",{enumerable:!0,get:function(){return Sc.InlayHintRequest}});Object.defineProperty(d,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Sc.InlayHintResolveRequest}});Object.defineProperty(d,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Sc.InlayHintRefreshRequest}});var Ir=df();Object.defineProperty(d,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Ir.DiagnosticServerCancellationData}});Object.defineProperty(d,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Ir.DocumentDiagnosticReportKind}});Object.defineProperty(d,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Ir.DocumentDiagnosticRequest}});Object.defineProperty(d,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Ir.WorkspaceDiagnosticRequest}});Object.defineProperty(d,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Ir.DiagnosticRefreshRequest}});var Nt=gf();Object.defineProperty(d,"NotebookCellKind",{enumerable:!0,get:function(){return Nt.NotebookCellKind}});Object.defineProperty(d,"ExecutionSummary",{enumerable:!0,get:function(){return Nt.ExecutionSummary}});Object.defineProperty(d,"NotebookCell",{enumerable:!0,get:function(){return Nt.NotebookCell}});Object.defineProperty(d,"NotebookDocument",{enumerable:!0,get:function(){return Nt.NotebookDocument}});Object.defineProperty(d,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Nt.NotebookDocumentSyncRegistrationType}});Object.defineProperty(d,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidOpenNotebookDocumentNotification}});Object.defineProperty(d,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Nt.NotebookCellArrayChange}});Object.defineProperty(d,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidChangeNotebookDocumentNotification}});Object.defineProperty(d,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidSaveNotebookDocumentNotification}});Object.defineProperty(d,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidCloseNotebookDocumentNotification}});var vf;(function(e){function t(n){let r=n;return Ue.string(r.language)||Ue.string(r.scheme)||Ue.string(r.pattern)}e.is=t})(vf=d.TextDocumentFilter||(d.TextDocumentFilter={}));var Cf;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(Ue.string(r.notebookType)||Ue.string(r.scheme)||Ue.string(r.pattern))}e.is=t})(Cf=d.NotebookDocumentFilter||(d.NotebookDocumentFilter={}));var Pf;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(Ue.string(r.notebook)||Cf.is(r.notebook))&&(r.language===void 0||Ue.string(r.language))}e.is=t})(Pf=d.NotebookCellTextDocumentFilter||(d.NotebookCellTextDocumentFilter={}));var _f;(function(e){function t(n){if(!Array.isArray(n))return!1;for(let r of n)if(!Ue.string(r)&&!vf.is(r)&&!Pf.is(r))return!1;return!0}e.is=t})(_f=d.DocumentSelector||(d.DocumentSelector={}));var iC;(function(e){e.method="client/registerCapability",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(iC=d.RegistrationRequest||(d.RegistrationRequest={}));var oC;(function(e){e.method="client/unregisterCapability",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(oC=d.UnregistrationRequest||(d.UnregistrationRequest={}));var sC;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(sC=d.ResourceOperationKind||(d.ResourceOperationKind={}));var aC;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(aC=d.FailureHandlingKind||(d.FailureHandlingKind={}));var cC;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(cC=d.PositionEncodingKind||(d.PositionEncodingKind={}));var uC;(function(e){function t(n){let r=n;return r&&Ue.string(r.id)&&r.id.length>0}e.hasId=t})(uC=d.StaticRegistrationOptions||(d.StaticRegistrationOptions={}));var lC;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||_f.is(r.documentSelector))}e.is=t})(lC=d.TextDocumentRegistrationOptions||(d.TextDocumentRegistrationOptions={}));var dC;(function(e){function t(r){let i=r;return Ue.objectLiteral(i)&&(i.workDoneProgress===void 0||Ue.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&Ue.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(dC=d.WorkDoneProgressOptions||(d.WorkDoneProgressOptions={}));var fC;(function(e){e.method="initialize",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(fC=d.InitializeRequest||(d.InitializeRequest={}));var pC;(function(e){e.unknownProtocolVersion=1})(pC=d.InitializeErrorCodes||(d.InitializeErrorCodes={}));var gC;(function(e){e.method="initialized",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(gC=d.InitializedNotification||(d.InitializedNotification={}));var mC;(function(e){e.method="shutdown",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType0(e.method)})(mC=d.ShutdownRequest||(d.ShutdownRequest={}));var hC;(function(e){e.method="exit",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType0(e.method)})(hC=d.ExitNotification||(d.ExitNotification={}));var yC;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(yC=d.DidChangeConfigurationNotification||(d.DidChangeConfigurationNotification={}));var bC;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4})(bC=d.MessageType||(d.MessageType={}));var vC;(function(e){e.method="window/showMessage",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(vC=d.ShowMessageNotification||(d.ShowMessageNotification={}));var CC;(function(e){e.method="window/showMessageRequest",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(CC=d.ShowMessageRequest||(d.ShowMessageRequest={}));var PC;(function(e){e.method="window/logMessage",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(PC=d.LogMessageNotification||(d.LogMessageNotification={}));var _C;(function(e){e.method="telemetry/event",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(_C=d.TelemetryEventNotification||(d.TelemetryEventNotification={}));var DC;(function(e){e.None=0,e.Full=1,e.Incremental=2})(DC=d.TextDocumentSyncKind||(d.TextDocumentSyncKind={}));var RC;(function(e){e.method="textDocument/didOpen",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(RC=d.DidOpenTextDocumentNotification||(d.DidOpenTextDocumentNotification={}));var SC;(function(e){function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}e.isIncremental=t;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}e.isFull=n})(SC=d.TextDocumentContentChangeEvent||(d.TextDocumentContentChangeEvent={}));var TC;(function(e){e.method="textDocument/didChange",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(TC=d.DidChangeTextDocumentNotification||(d.DidChangeTextDocumentNotification={}));var xC;(function(e){e.method="textDocument/didClose",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(xC=d.DidCloseTextDocumentNotification||(d.DidCloseTextDocumentNotification={}));var wC;(function(e){e.method="textDocument/didSave",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(wC=d.DidSaveTextDocumentNotification||(d.DidSaveTextDocumentNotification={}));var kC;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(kC=d.TextDocumentSaveReason||(d.TextDocumentSaveReason={}));var AC;(function(e){e.method="textDocument/willSave",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(AC=d.WillSaveTextDocumentNotification||(d.WillSaveTextDocumentNotification={}));var qC;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(qC=d.WillSaveTextDocumentWaitUntilRequest||(d.WillSaveTextDocumentWaitUntilRequest={}));var NC;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(NC=d.DidChangeWatchedFilesNotification||(d.DidChangeWatchedFilesNotification={}));var OC;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(OC=d.FileChangeType||(d.FileChangeType={}));var EC;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(mf.URI.is(r.baseUri)||mf.WorkspaceFolder.is(r.baseUri))&&Ue.string(r.pattern)}e.is=t})(EC=d.RelativePattern||(d.RelativePattern={}));var MC;(function(e){e.Create=1,e.Change=2,e.Delete=4})(MC=d.WatchKind||(d.WatchKind={}));var jC;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(jC=d.PublishDiagnosticsNotification||(d.PublishDiagnosticsNotification={}));var IC;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(IC=d.CompletionTriggerKind||(d.CompletionTriggerKind={}));var LC;(function(e){e.method="textDocument/completion",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(LC=d.CompletionRequest||(d.CompletionRequest={}));var FC;(function(e){e.method="completionItem/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(FC=d.CompletionResolveRequest||(d.CompletionResolveRequest={}));var UC;(function(e){e.method="textDocument/hover",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(UC=d.HoverRequest||(d.HoverRequest={}));var WC;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(WC=d.SignatureHelpTriggerKind||(d.SignatureHelpTriggerKind={}));var HC;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(HC=d.SignatureHelpRequest||(d.SignatureHelpRequest={}));var BC;(function(e){e.method="textDocument/definition",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(BC=d.DefinitionRequest||(d.DefinitionRequest={}));var zC;(function(e){e.method="textDocument/references",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(zC=d.ReferencesRequest||(d.ReferencesRequest={}));var VC;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(VC=d.DocumentHighlightRequest||(d.DocumentHighlightRequest={}));var $C;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})($C=d.DocumentSymbolRequest||(d.DocumentSymbolRequest={}));var YC;(function(e){e.method="textDocument/codeAction",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(YC=d.CodeActionRequest||(d.CodeActionRequest={}));var KC;(function(e){e.method="codeAction/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(KC=d.CodeActionResolveRequest||(d.CodeActionResolveRequest={}));var GC;(function(e){e.method="workspace/symbol",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(GC=d.WorkspaceSymbolRequest||(d.WorkspaceSymbolRequest={}));var QC;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(QC=d.WorkspaceSymbolResolveRequest||(d.WorkspaceSymbolResolveRequest={}));var JC;(function(e){e.method="textDocument/codeLens",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(JC=d.CodeLensRequest||(d.CodeLensRequest={}));var XC;(function(e){e.method="codeLens/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(XC=d.CodeLensResolveRequest||(d.CodeLensResolveRequest={}));var ZC;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType0(e.method)})(ZC=d.CodeLensRefreshRequest||(d.CodeLensRefreshRequest={}));var eP;(function(e){e.method="textDocument/documentLink",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(eP=d.DocumentLinkRequest||(d.DocumentLinkRequest={}));var tP;(function(e){e.method="documentLink/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(tP=d.DocumentLinkResolveRequest||(d.DocumentLinkResolveRequest={}));var nP;(function(e){e.method="textDocument/formatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(nP=d.DocumentFormattingRequest||(d.DocumentFormattingRequest={}));var rP;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(rP=d.DocumentRangeFormattingRequest||(d.DocumentRangeFormattingRequest={}));var iP;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(iP=d.DocumentOnTypeFormattingRequest||(d.DocumentOnTypeFormattingRequest={}));var oP;(function(e){e.Identifier=1})(oP=d.PrepareSupportDefaultBehavior||(d.PrepareSupportDefaultBehavior={}));var sP;(function(e){e.method="textDocument/rename",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(sP=d.RenameRequest||(d.RenameRequest={}));var aP;(function(e){e.method="textDocument/prepareRename",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(aP=d.PrepareRenameRequest||(d.PrepareRenameRequest={}));var cP;(function(e){e.method="workspace/executeCommand",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(cP=d.ExecuteCommandRequest||(d.ExecuteCommandRequest={}));var uP;(function(e){e.method="workspace/applyEdit",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType("workspace/applyEdit")})(uP=d.ApplyWorkspaceEditRequest||(d.ApplyWorkspaceEditRequest={}))});var Sf=A(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.createProtocolConnection=void 0;var Rf=_n();function lP(e,t,n,r){return Rf.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Rf.createMessageConnection)(e,t,n,r)}ao.createProtocolConnection=lP});var Tf=A(Ye=>{"use strict";var dP=Ye&&Ye.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),co=Ye&&Ye.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&dP(t,e,n)};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.LSPErrorCodes=Ye.createProtocolConnection=void 0;co(_n(),Ye);co(eo(),Ye);co(be(),Ye);co(Df(),Ye);var fP=Sf();Object.defineProperty(Ye,"createProtocolConnection",{enumerable:!0,get:function(){return fP.createProtocolConnection}});var pP;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(pP=Ye.LSPErrorCodes||(Ye.LSPErrorCodes={}))});var ke=A(Ot=>{"use strict";var gP=Ot&&Ot.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),xf=Ot&&Ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&gP(t,e,n)};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createProtocolConnection=void 0;var mP=gc();xf(gc(),Ot);xf(Tf(),Ot);function hP(e,t,n,r){return(0,mP.createMessageConnection)(e,t,n,r)}Ot.createProtocolConnection=hP});var xc=A(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.SemanticTokensBuilder=rn.SemanticTokensDiff=rn.SemanticTokensFeature=void 0;var uo=ke(),yP=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(uo.SemanticTokensRefreshRequest.type),on:t=>{let n=uo.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=uo.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=uo.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};rn.SemanticTokensFeature=yP;var lo=class{constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<t&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<t){let i=t-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,u=this.modifiedSequence.slice(r,o+1);return u.length===1&&u[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:u}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<t?[{start:r,deleteCount:t-r}]:[]}};rn.SemanticTokensDiff=lo;var Tc=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(t,n,r,i,o){let s=t,u=n;this._dataLen>0&&(s-=this._prevLine,s===0&&(u-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=u,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new lo(this._prevData,this._data).computeDiff()}:this.build()}};rn.SemanticTokensBuilder=Tc});var kc=A(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TextDocuments=void 0;var Rn=ke(),wc=class{constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Rn.Emitter,this._onDidOpen=new Rn.Emitter,this._onDidClose=new Rn.Emitter,this._onDidSave=new Rn.Emitter,this._onWillSave=new Rn.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Rn.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let u=this._syncedDocuments.get(i.uri);u!==void 0&&(u=this._configuration.update(u,o,s),this._syncedDocuments.set(i.uri,u),this._onDidChangeContent.fire(Object.freeze({document:u})))})),n.push(t.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(t.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(t.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Rn.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};fo.TextDocuments=wc});var qc=A(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.NotebookDocuments=rr.NotebookSyncFeature=void 0;var ct=ke(),wf=kc(),bP=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(ct.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(ct.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(ct.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(ct.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};rr.NotebookSyncFeature=bP;var po=class e{onDidOpenTextDocument(t){return this.openHandler=t,ct.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,ct.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,ct.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}};po.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var Ac=class{constructor(t){t instanceof wf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new wf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new ct.Emitter,this._onDidChange=new ct.Emitter,this._onDidSave=new ct.Emitter,this._onDidClose=new ct.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new po,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,u=!1,c=i.change;c.metadata!==void 0&&(u=!0,o.metadata=c.metadata);let p=[],g=[],b=[],D=[];if(c.cells!==void 0){let I=c.cells;if(I.structure!==void 0){let _=I.structure.array;if(o.cells.splice(_.start,_.deleteCount,..._.cells!==void 0?_.cells:[]),I.structure.didOpen!==void 0)for(let v of I.structure.didOpen)n.openTextDocument({textDocument:v}),p.push(v.uri);if(I.structure.didClose)for(let v of I.structure.didClose)n.closeTextDocument({textDocument:v}),g.push(v.uri)}if(I.data!==void 0){let _=new Map(I.data.map(v=>[v.document,v]));for(let v=0;v<=o.cells.length;v++){let N=_.get(o.cells[v].document);if(N!==void 0){let z=o.cells.splice(v,1,N);if(b.push({old:z[0],new:N}),_.delete(N.document),_.size===0)break}}}if(I.textContent!==void 0)for(let _ of I.textContent)n.changeTextDocument({textDocument:_.document,contentChanges:_.changes}),D.push(_.document.uri)}this.updateCellMap(o);let R={notebookDocument:o};u&&(R.metadata={old:s,new:o.metadata});let T=[];for(let I of p)T.push(this.getNotebookCell(I));let q=[];for(let I of g)q.push(this.getNotebookCell(I));let B=[];for(let I of D)B.push(this.getNotebookCell(I));(T.length>0||q.length>0||b.length>0||B.length>0)&&(R.cells={added:T,removed:q,changed:{data:b,textContent:B}}),(R.metadata!==void 0||R.cells!==void 0)&&this._onDidChange.fire(R)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),ct.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};rr.NotebookDocuments=Ac});var Nc=A(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.thenable=xe.typedArray=xe.stringArray=xe.array=xe.func=xe.error=xe.number=xe.string=xe.boolean=void 0;function vP(e){return e===!0||e===!1}xe.boolean=vP;function kf(e){return typeof e=="string"||e instanceof String}xe.string=kf;function CP(e){return typeof e=="number"||e instanceof Number}xe.number=CP;function PP(e){return e instanceof Error}xe.error=PP;function Af(e){return typeof e=="function"}xe.func=Af;function qf(e){return Array.isArray(e)}xe.array=qf;function _P(e){return qf(e)&&e.every(t=>kf(t))}xe.stringArray=_P;function DP(e,t){return Array.isArray(e)&&e.every(t)}xe.typedArray=DP;function RP(e){return e&&Af(e.then)}xe.thenable=RP});var Oc=A(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.generateUuid=ut.parse=ut.isUUID=ut.v4=ut.empty=void 0;var Lr=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Fr=class e extends Lr{constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}};Fr._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Fr._timeHighBits=["8","9","a","b"];ut.empty=new Lr("00000000-0000-0000-0000-000000000000");function Nf(){return new Fr}ut.v4=Nf;var SP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Of(e){return SP.test(e)}ut.isUUID=Of;function TP(e){if(!Of(e))throw new Error("invalid uuid");return new Lr(e)}ut.parse=TP;function xP(){return Nf().asHex()}ut.generateUuid=xP});var Ef=A(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.attachPartialResult=sn.ProgressFeature=sn.attachWorkDone=void 0;var on=ke(),wP=Oc(),Sn=class e{constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,i){let o={kind:"begin",title:t,percentage:n,message:r,cancellable:i};this._connection.sendProgress(on.WorkDoneProgress.type,this._token,o)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=t,n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(on.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(on.WorkDoneProgress.type,this._token,{kind:"end"})}};Sn.Instances=new Map;var go=class extends Sn{constructor(t,n){super(t,n),this._source=new on.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Ur=class{constructor(){}begin(){}report(){}done(){}},mo=class extends Ur{constructor(){super(),this._source=new on.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function kP(e,t){if(t===void 0||t.workDoneToken===void 0)return new Ur;let n=t.workDoneToken;return delete t.workDoneToken,new Sn(e,n)}sn.attachWorkDone=kP;var AP=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(on.WorkDoneProgressCancelNotification.type,n=>{let r=Sn.Instances.get(n.token);(r instanceof go||r instanceof mo)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Ur:new Sn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,wP.generateUuid)();return this.connection.sendRequest(on.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new go(this.connection,t))}else return Promise.resolve(new mo)}};sn.ProgressFeature=AP;var Ec;(function(e){e.type=new on.ProgressType})(Ec||(Ec={}));var Mc=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Ec.type,this._token,t)}};function qP(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Mc(e,n)}sn.attachPartialResult=qP});var Mf=A(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.ConfigurationFeature=void 0;var NP=ke(),OP=Nc(),EP=e=>class extends e{getConfiguration(t){return t?OP.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(NP.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};ho.ConfigurationFeature=EP});var jf=A(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.WorkspaceFoldersFeature=void 0;var yo=ke(),MP=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new yo.Emitter,this.connection.onNotification(yo.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(yo.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(yo.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};bo.WorkspaceFoldersFeature=MP});var If=A(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.CallHierarchyFeature=void 0;var jc=ke(),jP=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(jc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=jc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=jc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};vo.CallHierarchyFeature=jP});var Lf=A(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.ShowDocumentFeature=void 0;var IP=ke(),LP=e=>class extends e{showDocument(t){return this.connection.sendRequest(IP.ShowDocumentRequest.type,t)}};Co.ShowDocumentFeature=LP});var Ff=A(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.FileOperationsFeature=void 0;var ir=ke(),FP=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(ir.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(ir.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(ir.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(ir.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(ir.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(ir.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Po.FileOperationsFeature=FP});var Uf=A(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.LinkedEditingRangeFeature=void 0;var UP=ke(),WP=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(UP.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};_o.LinkedEditingRangeFeature=WP});var Wf=A(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TypeHierarchyFeature=void 0;var Ic=ke(),HP=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ic.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Ic.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Ic.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Do.TypeHierarchyFeature=HP});var Bf=A(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.InlineValueFeature=void 0;var Hf=ke(),BP=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Hf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Hf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Ro.InlineValueFeature=BP});var zf=A(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.InlayHintFeature=void 0;var Lc=ke(),zP=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Lc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Lc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Lc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};So.InlayHintFeature=zP});var Vf=A(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.DiagnosticFeature=void 0;var Wr=ke(),VP=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Wr.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Wr.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Wr.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Wr.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Wr.WorkspaceDiagnosticRequest.partialResult,n)))}}};To.DiagnosticFeature=VP});var $f=A(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.MonikerFeature=void 0;var $P=ke(),YP=e=>class extends e{get moniker(){return{on:t=>{let n=$P.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};xo.MonikerFeature=YP});var op=A(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.createConnection=ee.combineFeatures=ee.combineNotebooksFeatures=ee.combineLanguagesFeatures=ee.combineWorkspaceFeatures=ee.combineWindowFeatures=ee.combineClientFeatures=ee.combineTracerFeatures=ee.combineTelemetryFeatures=ee.combineConsoleFeatures=ee._NotebooksImpl=ee._LanguagesImpl=ee.BulkUnregistration=ee.BulkRegistration=ee.ErrorMessageTracker=void 0;var M=ke(),lt=Nc(),Uc=Oc(),Y=Ef(),KP=Mf(),GP=jf(),QP=If(),JP=xc(),XP=Lf(),ZP=Ff(),e_=Uf(),t_=Wf(),n_=Bf(),r_=zf(),i_=Vf(),o_=qc(),s_=$f();function Fc(e){if(e!==null)return e}var Wc=class{constructor(){this._messages=Object.create(null)}add(t){let n=this._messages[t];n||(n=0),n++,this._messages[t]=n}sendErrors(t){Object.keys(this._messages).forEach(n=>{t.window.showErrorMessage(n)})}};ee.ErrorMessageTracker=Wc;var wo=class{constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(M.MessageType.Error,t)}warn(t){this.send(M.MessageType.Warning,t)}info(t){this.send(M.MessageType.Info,t)}log(t){this.send(M.MessageType.Log,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(M.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,M.RAL)().console.error("Sending log message failed")})}},Hc=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:M.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fc)}showWarningMessage(t,...n){let r={type:M.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fc)}showInformationMessage(t,...n){let r={type:M.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fc)}},Yf=(0,XP.ShowDocumentFeature)((0,Y.ProgressFeature)(Hc)),a_;(function(e){function t(){return new ko}e.create=t})(a_=ee.BulkRegistration||(ee.BulkRegistration={}));var ko=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let r=lt.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Uc.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},c_;(function(e){function t(){return new Hr(void 0,[])}e.create=t})(c_=ee.BulkUnregistration||(ee.BulkUnregistration={}));var Hr=class{constructor(t,n){this._connection=t,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(M.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=lt.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(M.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},Ao=class{attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof ko?this.registerMany(t):t instanceof Hr?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=lt.string(n)?n:n.method,o=Uc.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(M.RegistrationRequest.type,s).then(u=>(t.add({id:o,method:i}),t),u=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(u)))}registerSingle2(t,n){let r=lt.string(t)?t:t.method,i=Uc.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(M.RegistrationRequest.type,o).then(s=>M.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(M.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(M.RegistrationRequest.type,n).then(()=>new Hr(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Bc=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(i){return i&&!!i.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(M.ApplyWorkspaceEditRequest.type,r)}},Kf=(0,ZP.FileOperationsFeature)((0,GP.WorkspaceFoldersFeature)((0,KP.ConfigurationFeature)(Bc))),qo=class{constructor(){this._trace=M.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==M.Trace.Off&&this.connection.sendNotification(M.LogTraceNotification.type,{message:t,verbose:this._trace===M.Trace.Verbose?n:void 0}).catch(()=>{})}},No=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(M.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Oo=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,Y.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,Y.attachPartialResult)(this.connection,n)}};ee._LanguagesImpl=Oo;var Gf=(0,s_.MonikerFeature)((0,i_.DiagnosticFeature)((0,r_.InlayHintFeature)((0,n_.InlineValueFeature)((0,t_.TypeHierarchyFeature)((0,e_.LinkedEditingRangeFeature)((0,JP.SemanticTokensFeature)((0,QP.CallHierarchyFeature)(Oo)))))))),Eo=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,Y.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,Y.attachPartialResult)(this.connection,n)}};ee._NotebooksImpl=Eo;var Qf=(0,o_.NotebookSyncFeature)(Eo);function Jf(e,t){return function(n){return t(e(n))}}ee.combineConsoleFeatures=Jf;function Xf(e,t){return function(n){return t(e(n))}}ee.combineTelemetryFeatures=Xf;function Zf(e,t){return function(n){return t(e(n))}}ee.combineTracerFeatures=Zf;function ep(e,t){return function(n){return t(e(n))}}ee.combineClientFeatures=ep;function tp(e,t){return function(n){return t(e(n))}}ee.combineWindowFeatures=tp;function np(e,t){return function(n){return t(e(n))}}ee.combineWorkspaceFeatures=np;function rp(e,t){return function(n){return t(e(n))}}ee.combineLanguagesFeatures=rp;function ip(e,t){return function(n){return t(e(n))}}ee.combineNotebooksFeatures=ip;function u_(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,Jf),tracer:n(e.tracer,t.tracer,Zf),telemetry:n(e.telemetry,t.telemetry,Xf),client:n(e.client,t.client,ep),window:n(e.window,t.window,tp),workspace:n(e.workspace,t.workspace,np),languages:n(e.languages,t.languages,rp),notebooks:n(e.notebooks,t.notebooks,ip)}}ee.combineFeatures=u_;function l_(e,t,n){let r=n&&n.console?new(n.console(wo)):new wo,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(qo)):new qo,s=n&&n.telemetry?new(n.telemetry(No)):new No,u=n&&n.client?new(n.client(Ao)):new Ao,c=n&&n.window?new(n.window(Yf)):new Yf,p=n&&n.workspace?new(n.workspace(Kf)):new Kf,g=n&&n.languages?new(n.languages(Gf)):new Gf,b=n&&n.notebooks?new(n.notebooks(Qf)):new Qf,D=[r,o,s,u,c,p,g,b];function R(_){return _ instanceof Promise?_:lt.thenable(_)?new Promise((v,N)=>{_.then(z=>v(z),z=>N(z))}):Promise.resolve(_)}let T,q,B,I={listen:()=>i.listen(),sendRequest:(_,...v)=>i.sendRequest(lt.string(_)?_:_.method,...v),onRequest:(_,v)=>i.onRequest(_,v),sendNotification:(_,v)=>{let N=lt.string(_)?_:_.method;return arguments.length===1?i.sendNotification(N):i.sendNotification(N,v)},onNotification:(_,v)=>i.onNotification(_,v),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:_=>(q=_,{dispose:()=>{q=void 0}}),onInitialized:_=>i.onNotification(M.InitializedNotification.type,_),onShutdown:_=>(T=_,{dispose:()=>{T=void 0}}),onExit:_=>(B=_,{dispose:()=>{B=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return u},get window(){return c},get workspace(){return p},get languages(){return g},get notebooks(){return b},onDidChangeConfiguration:_=>i.onNotification(M.DidChangeConfigurationNotification.type,_),onDidChangeWatchedFiles:_=>i.onNotification(M.DidChangeWatchedFilesNotification.type,_),__textDocumentSync:void 0,onDidOpenTextDocument:_=>i.onNotification(M.DidOpenTextDocumentNotification.type,_),onDidChangeTextDocument:_=>i.onNotification(M.DidChangeTextDocumentNotification.type,_),onDidCloseTextDocument:_=>i.onNotification(M.DidCloseTextDocumentNotification.type,_),onWillSaveTextDocument:_=>i.onNotification(M.WillSaveTextDocumentNotification.type,_),onWillSaveTextDocumentWaitUntil:_=>i.onRequest(M.WillSaveTextDocumentWaitUntilRequest.type,_),onDidSaveTextDocument:_=>i.onNotification(M.DidSaveTextDocumentNotification.type,_),sendDiagnostics:_=>i.sendNotification(M.PublishDiagnosticsNotification.type,_),onHover:_=>i.onRequest(M.HoverRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onCompletion:_=>i.onRequest(M.CompletionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCompletionResolve:_=>i.onRequest(M.CompletionResolveRequest.type,_),onSignatureHelp:_=>i.onRequest(M.SignatureHelpRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDeclaration:_=>i.onRequest(M.DeclarationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDefinition:_=>i.onRequest(M.DefinitionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onTypeDefinition:_=>i.onRequest(M.TypeDefinitionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onImplementation:_=>i.onRequest(M.ImplementationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onReferences:_=>i.onRequest(M.ReferencesRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentHighlight:_=>i.onRequest(M.DocumentHighlightRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentSymbol:_=>i.onRequest(M.DocumentSymbolRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onWorkspaceSymbol:_=>i.onRequest(M.WorkspaceSymbolRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onWorkspaceSymbolResolve:_=>i.onRequest(M.WorkspaceSymbolResolveRequest.type,_),onCodeAction:_=>i.onRequest(M.CodeActionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCodeActionResolve:_=>i.onRequest(M.CodeActionResolveRequest.type,(v,N)=>_(v,N)),onCodeLens:_=>i.onRequest(M.CodeLensRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCodeLensResolve:_=>i.onRequest(M.CodeLensResolveRequest.type,(v,N)=>_(v,N)),onDocumentFormatting:_=>i.onRequest(M.DocumentFormattingRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDocumentRangeFormatting:_=>i.onRequest(M.DocumentRangeFormattingRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDocumentOnTypeFormatting:_=>i.onRequest(M.DocumentOnTypeFormattingRequest.type,(v,N)=>_(v,N)),onRenameRequest:_=>i.onRequest(M.RenameRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onPrepareRename:_=>i.onRequest(M.PrepareRenameRequest.type,(v,N)=>_(v,N)),onDocumentLinks:_=>i.onRequest(M.DocumentLinkRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentLinkResolve:_=>i.onRequest(M.DocumentLinkResolveRequest.type,(v,N)=>_(v,N)),onDocumentColor:_=>i.onRequest(M.DocumentColorRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onColorPresentation:_=>i.onRequest(M.ColorPresentationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onFoldingRanges:_=>i.onRequest(M.FoldingRangeRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onSelectionRanges:_=>i.onRequest(M.SelectionRangeRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onExecuteCommand:_=>i.onRequest(M.ExecuteCommandRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),dispose:()=>i.dispose()};for(let _ of D)_.attach(I);return i.onRequest(M.InitializeRequest.type,_=>{t.initialize(_),lt.string(_.trace)&&(o.trace=M.Trace.fromString(_.trace));for(let v of D)v.initialize(_.capabilities);if(q){let v=q(_,new M.CancellationTokenSource().token,(0,Y.attachWorkDone)(i,_),void 0);return R(v).then(N=>{if(N instanceof M.ResponseError)return N;let z=N;z||(z={capabilities:{}});let J=z.capabilities;J||(J={},z.capabilities=J),J.textDocumentSync===void 0||J.textDocumentSync===null?J.textDocumentSync=lt.number(I.__textDocumentSync)?I.__textDocumentSync:M.TextDocumentSyncKind.None:!lt.number(J.textDocumentSync)&&!lt.number(J.textDocumentSync.change)&&(J.textDocumentSync.change=lt.number(I.__textDocumentSync)?I.__textDocumentSync:M.TextDocumentSyncKind.None);for(let ae of D)ae.fillServerCapabilities(J);return z})}else{let v={capabilities:{textDocumentSync:M.TextDocumentSyncKind.None}};for(let N of D)N.fillServerCapabilities(v.capabilities);return v}}),i.onRequest(M.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,T)return T(new M.CancellationTokenSource().token)}),i.onNotification(M.ExitNotification.type,()=>{try{B&&B()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(M.SetTraceNotification.type,_=>{o.trace=M.Trace.fromString(_.value)}),I}ee.createConnection=l_});var zc=A(We=>{"use strict";var d_=We&&We.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),sp=We&&We.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&d_(t,e,n)};Object.defineProperty(We,"__esModule",{value:!0});We.ProposedFeatures=We.NotebookDocuments=We.TextDocuments=We.SemanticTokensBuilder=void 0;var f_=xc();Object.defineProperty(We,"SemanticTokensBuilder",{enumerable:!0,get:function(){return f_.SemanticTokensBuilder}});sp(ke(),We);var p_=kc();Object.defineProperty(We,"TextDocuments",{enumerable:!0,get:function(){return p_.TextDocuments}});var g_=qc();Object.defineProperty(We,"NotebookDocuments",{enumerable:!0,get:function(){return g_.NotebookDocuments}});sp(op(),We);var m_;(function(e){e.all={__brand:"features"}})(m_=We.ProposedFeatures||(We.ProposedFeatures={}))});var cp=A((VS,ap)=>{"use strict";ap.exports=ke()});var Vc=A(Et=>{"use strict";var h_=Et&&Et.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),lp=Et&&Et.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&h_(t,e,n)};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConnection=void 0;var Mo=zc();lp(cp(),Et);lp(zc(),Et);var up=!1,y_={initialize:e=>{},get shutdownReceived(){return up},set shutdownReceived(e){up=e},exit:e=>{}};function b_(e,t,n,r){let i,o,s,u;e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),Mo.ConnectionStrategy.is(e)||Mo.ConnectionOptions.is(e)?u=e:(o=e,s=t,u=n);let c=p=>(0,Mo.createProtocolConnection)(o,s,p,u);return(0,Mo.createConnection)(c,y_,i)}Et.createConnection=b_});var an=A((YS,dp)=>{"use strict";dp.exports=Vc()});var nu=A((IT,Rp)=>{"use strict";function Mt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Dp(e,t){for(var n="",r=0,i=-1,o=0,s,u=0;u<=e.length;++u){if(u<e.length)s=e.charCodeAt(u);else{if(s===47)break;s=47}if(s===47){if(!(i===u-1||o===1))if(i!==u-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=u,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=u,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(i+1,u):n=e.slice(i+1,u),r=u-i-1;i=u,o=0}else s===46&&o!==-1?++o:o=-1}return n}function i0(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}var ar={resolve:function(){for(var t="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(r===void 0&&(r=process.cwd()),o=r),Mt(o),o.length!==0&&(t=o+"/"+t,n=o.charCodeAt(0)===47)}return t=Dp(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Mt(t),t.length===0)return".";var n=t.charCodeAt(0)===47,r=t.charCodeAt(t.length-1)===47;return t=Dp(t,!n),t.length===0&&!n&&(t="."),t.length>0&&r&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return Mt(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n<arguments.length;++n){var r=arguments[n];Mt(r),r.length>0&&(t===void 0?t=r:t+="/"+r)}return t===void 0?".":ar.normalize(t)},relative:function(t,n){if(Mt(t),Mt(n),t===n||(t=ar.resolve(t),n=ar.resolve(n),t===n))return"";for(var r=1;r<t.length&&t.charCodeAt(r)===47;++r);for(var i=t.length,o=i-r,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var u=n.length,c=u-s,p=o<c?o:c,g=-1,b=0;b<=p;++b){if(b===p){if(c>p){if(n.charCodeAt(s+b)===47)return n.slice(s+b+1);if(b===0)return n.slice(s+b)}else o>p&&(t.charCodeAt(r+b)===47?g=b:b===0&&(g=0));break}var D=t.charCodeAt(r+b),R=n.charCodeAt(s+b);if(D!==R)break;D===47&&(g=b)}var T="";for(b=r+g+1;b<=i;++b)(b===i||t.charCodeAt(b)===47)&&(T.length===0?T+="..":T+="/..");return T.length>0?T+n.slice(s+g):(s+=g,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(Mt(t),t.length===0)return".";for(var n=t.charCodeAt(0),r=n===47,i=-1,o=!0,s=t.length-1;s>=1;--s)if(n=t.charCodeAt(s),n===47){if(!o){i=s;break}}else o=!1;return i===-1?r?"/":".":r&&i===1?"//":t.slice(0,i)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Mt(t);var r=0,i=-1,o=!0,s;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var u=n.length-1,c=-1;for(s=t.length-1;s>=0;--s){var p=t.charCodeAt(s);if(p===47){if(!o){r=s+1;break}}else c===-1&&(o=!1,c=s+1),u>=0&&(p===n.charCodeAt(u)?--u===-1&&(i=s):(u=-1,i=c))}return r===i?i=c:i===-1&&(i=t.length),t.slice(r,i)}else{for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===47){if(!o){r=s+1;break}}else i===-1&&(o=!1,i=s+1);return i===-1?"":t.slice(r,i)}},extname:function(t){Mt(t);for(var n=-1,r=0,i=-1,o=!0,s=0,u=t.length-1;u>=0;--u){var c=t.charCodeAt(u);if(c===47){if(!o){r=u+1;break}continue}i===-1&&(o=!1,i=u+1),c===46?n===-1?n=u:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||i===-1||s===0||s===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return i0("/",t)},parse:function(t){Mt(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var r=t.charCodeAt(0),i=r===47,o;i?(n.root="/",o=1):o=0;for(var s=-1,u=0,c=-1,p=!0,g=t.length-1,b=0;g>=o;--g){if(r=t.charCodeAt(g),r===47){if(!p){u=g+1;break}continue}c===-1&&(p=!1,c=g+1),r===46?s===-1?s=g:b!==1&&(b=1):s!==-1&&(b=-1)}return s===-1||c===-1||b===0||b===1&&s===c-1&&s===u+1?c!==-1&&(u===0&&i?n.base=n.name=t.slice(1,c):n.base=n.name=t.slice(u,c)):(u===0&&i?(n.name=t.slice(1,s),n.base=t.slice(1,c)):(n.name=t.slice(u,s),n.base=t.slice(u,c)),n.ext=t.slice(s,c)),u>0?n.dir=t.slice(0,u-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};ar.posix=ar;Rp.exports=ar});import{CONFIG_FILE_NAMES as $s,loadConfig as Nh}from"@redocly/openapi-core";var su;(()=>{"use strict";var e={470:i=>{function o(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function s(c,p){for(var g,b="",D=0,R=-1,T=0,q=0;q<=c.length;++q){if(q<c.length)g=c.charCodeAt(q);else{if(g===47)break;g=47}if(g===47){if(!(R===q-1||T===1))if(R!==q-1&&T===2){if(b.length<2||D!==2||b.charCodeAt(b.length-1)!==46||b.charCodeAt(b.length-2)!==46){if(b.length>2){var B=b.lastIndexOf("/");if(B!==b.length-1){B===-1?(b="",D=0):D=(b=b.slice(0,B)).length-1-b.lastIndexOf("/"),R=q,T=0;continue}}else if(b.length===2||b.length===1){b="",D=0,R=q,T=0;continue}}p&&(b.length>0?b+="/..":b="..",D=2)}else b.length>0?b+="/"+c.slice(R+1,q):b=c.slice(R+1,q),D=q-R-1;R=q,T=0}else g===46&&T!==-1?++T:T=-1}return b}var u={resolve:function(){for(var c,p="",g=!1,b=arguments.length-1;b>=-1&&!g;b--){var D;b>=0?D=arguments[b]:(c===void 0&&(c=process.cwd()),D=c),o(D),D.length!==0&&(p=D+"/"+p,g=D.charCodeAt(0)===47)}return p=s(p,!g),g?p.length>0?"/"+p:"/":p.length>0?p:"."},normalize:function(c){if(o(c),c.length===0)return".";var p=c.charCodeAt(0)===47,g=c.charCodeAt(c.length-1)===47;return(c=s(c,!p)).length!==0||p||(c="."),c.length>0&&g&&(c+="/"),p?"/"+c:c},isAbsolute:function(c){return o(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,p=0;p<arguments.length;++p){var g=arguments[p];o(g),g.length>0&&(c===void 0?c=g:c+="/"+g)}return c===void 0?".":u.normalize(c)},relative:function(c,p){if(o(c),o(p),c===p||(c=u.resolve(c))===(p=u.resolve(p)))return"";for(var g=1;g<c.length&&c.charCodeAt(g)===47;++g);for(var b=c.length,D=b-g,R=1;R<p.length&&p.charCodeAt(R)===47;++R);for(var T=p.length-R,q=D<T?D:T,B=-1,I=0;I<=q;++I){if(I===q){if(T>q){if(p.charCodeAt(R+I)===47)return p.slice(R+I+1);if(I===0)return p.slice(R+I)}else D>q&&(c.charCodeAt(g+I)===47?B=I:I===0&&(B=0));break}var _=c.charCodeAt(g+I);if(_!==p.charCodeAt(R+I))break;_===47&&(B=I)}var v="";for(I=g+B+1;I<=b;++I)I!==b&&c.charCodeAt(I)!==47||(v.length===0?v+="..":v+="/..");return v.length>0?v+p.slice(R+B):(R+=B,p.charCodeAt(R)===47&&++R,p.slice(R))},_makeLong:function(c){return c},dirname:function(c){if(o(c),c.length===0)return".";for(var p=c.charCodeAt(0),g=p===47,b=-1,D=!0,R=c.length-1;R>=1;--R)if((p=c.charCodeAt(R))===47){if(!D){b=R;break}}else D=!1;return b===-1?g?"/":".":g&&b===1?"//":c.slice(0,b)},basename:function(c,p){if(p!==void 0&&typeof p!="string")throw new TypeError('"ext" argument must be a string');o(c);var g,b=0,D=-1,R=!0;if(p!==void 0&&p.length>0&&p.length<=c.length){if(p.length===c.length&&p===c)return"";var T=p.length-1,q=-1;for(g=c.length-1;g>=0;--g){var B=c.charCodeAt(g);if(B===47){if(!R){b=g+1;break}}else q===-1&&(R=!1,q=g+1),T>=0&&(B===p.charCodeAt(T)?--T==-1&&(D=g):(T=-1,D=q))}return b===D?D=q:D===-1&&(D=c.length),c.slice(b,D)}for(g=c.length-1;g>=0;--g)if(c.charCodeAt(g)===47){if(!R){b=g+1;break}}else D===-1&&(R=!1,D=g+1);return D===-1?"":c.slice(b,D)},extname:function(c){o(c);for(var p=-1,g=0,b=-1,D=!0,R=0,T=c.length-1;T>=0;--T){var q=c.charCodeAt(T);if(q!==47)b===-1&&(D=!1,b=T+1),q===46?p===-1?p=T:R!==1&&(R=1):p!==-1&&(R=-1);else if(!D){g=T+1;break}}return p===-1||b===-1||R===0||R===1&&p===b-1&&p===g+1?"":c.slice(p,b)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return function(p,g){var b=g.dir||g.root,D=g.base||(g.name||"")+(g.ext||"");return b?b===g.root?b+D:b+"/"+D:D}(0,c)},parse:function(c){o(c);var p={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return p;var g,b=c.charCodeAt(0),D=b===47;D?(p.root="/",g=1):g=0;for(var R=-1,T=0,q=-1,B=!0,I=c.length-1,_=0;I>=g;--I)if((b=c.charCodeAt(I))!==47)q===-1&&(B=!1,q=I+1),b===46?R===-1?R=I:_!==1&&(_=1):R!==-1&&(_=-1);else if(!B){T=I+1;break}return R===-1||q===-1||_===0||_===1&&R===q-1&&R===T+1?q!==-1&&(p.base=p.name=T===0&&D?c.slice(1,q):c.slice(T,q)):(T===0&&D?(p.name=c.slice(1,R),p.base=c.slice(1,q)):(p.name=c.slice(T,R),p.base=c.slice(T,q)),p.ext=c.slice(R,q)),T>0?p.dir=c.slice(0,T-1):D&&(p.dir="/"),p},sep:"/",delimiter:":",win32:null,posix:null};u.posix=u,i.exports=u}},t={};function n(i){var o=t[i];if(o!==void 0)return o.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=(i,o)=>{for(var s in o)n.o(o,s)&&!n.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:o[s]})},n.o=(i,o)=>Object.prototype.hasOwnProperty.call(i,o),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>D,Utils:()=>ft}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,s=/^\//,u=/^\/\//;function c(j,x){if(!j.scheme&&x)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${j.authority}", path: "${j.path}", query: "${j.query}", fragment: "${j.fragment}"}`);if(j.scheme&&!o.test(j.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(j.path){if(j.authority){if(!s.test(j.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(u.test(j.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",g="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class D{static isUri(x){return x instanceof D||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="string"&&typeof x.with=="function"&&typeof x.toString=="function"}scheme;authority;path;query;fragment;constructor(x,W,L,ne,Q,K=!1){typeof x=="object"?(this.scheme=x.scheme||p,this.authority=x.authority||p,this.path=x.path||p,this.query=x.query||p,this.fragment=x.fragment||p):(this.scheme=function(ze,we){return ze||we?ze:"file"}(x,K),this.authority=W||p,this.path=function(ze,we){switch(ze){case"https":case"http":case"file":we?we[0]!==g&&(we=g+we):we=g}return we}(this.scheme,L||p),this.query=ne||p,this.fragment=Q||p,c(this,K))}get fsPath(){return _(this,!1)}with(x){if(!x)return this;let{scheme:W,authority:L,path:ne,query:Q,fragment:K}=x;return W===void 0?W=this.scheme:W===null&&(W=p),L===void 0?L=this.authority:L===null&&(L=p),ne===void 0?ne=this.path:ne===null&&(ne=p),Q===void 0?Q=this.query:Q===null&&(Q=p),K===void 0?K=this.fragment:K===null&&(K=p),W===this.scheme&&L===this.authority&&ne===this.path&&Q===this.query&&K===this.fragment?this:new T(W,L,ne,Q,K)}static parse(x,W=!1){let L=b.exec(x);return L?new T(L[2]||p,J(L[4]||p),J(L[5]||p),J(L[7]||p),J(L[9]||p),W):new T(p,p,p,p,p)}static file(x){let W=p;if(i&&(x=x.replace(/\\/g,g)),x[0]===g&&x[1]===g){let L=x.indexOf(g,2);L===-1?(W=x.substring(2),x=g):(W=x.substring(2,L),x=x.substring(L)||g)}return new T("file",W,x,p,p)}static from(x){let W=new T(x.scheme,x.authority,x.path,x.query,x.fragment);return c(W,!0),W}toString(x=!1){return v(this,x)}toJSON(){return this}static revive(x){if(x){if(x instanceof D)return x;{let W=new T(x);return W._formatted=x.external,W._fsPath=x._sep===R?x.fsPath:null,W}}return x}}let R=i?1:void 0;class T extends D{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(x=!1){return x?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){let x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=R),this._formatted&&(x.external=this._formatted),this.path&&(x.path=this.path),this.scheme&&(x.scheme=this.scheme),this.authority&&(x.authority=this.authority),this.query&&(x.query=this.query),this.fragment&&(x.fragment=this.fragment),x}}let q={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function B(j,x,W){let L,ne=-1;for(let Q=0;Q<j.length;Q++){let K=j.charCodeAt(Q);if(K>=97&&K<=122||K>=65&&K<=90||K>=48&&K<=57||K===45||K===46||K===95||K===126||x&&K===47||W&&K===91||W&&K===93||W&&K===58)ne!==-1&&(L+=encodeURIComponent(j.substring(ne,Q)),ne=-1),L!==void 0&&(L+=j.charAt(Q));else{L===void 0&&(L=j.substr(0,Q));let ze=q[K];ze!==void 0?(ne!==-1&&(L+=encodeURIComponent(j.substring(ne,Q)),ne=-1),L+=ze):ne===-1&&(ne=Q)}}return ne!==-1&&(L+=encodeURIComponent(j.substring(ne))),L!==void 0?L:j}function I(j){let x;for(let W=0;W<j.length;W++){let L=j.charCodeAt(W);L===35||L===63?(x===void 0&&(x=j.substr(0,W)),x+=q[L]):x!==void 0&&(x+=j[W])}return x!==void 0?x:j}function _(j,x){let W;return W=j.authority&&j.path.length>1&&j.scheme==="file"?`//${j.authority}${j.path}`:j.path.charCodeAt(0)===47&&(j.path.charCodeAt(1)>=65&&j.path.charCodeAt(1)<=90||j.path.charCodeAt(1)>=97&&j.path.charCodeAt(1)<=122)&&j.path.charCodeAt(2)===58?x?j.path.substr(1):j.path[1].toLowerCase()+j.path.substr(2):j.path,i&&(W=W.replace(/\//g,"\\")),W}function v(j,x){let W=x?I:B,L="",{scheme:ne,authority:Q,path:K,query:ze,fragment:we}=j;if(ne&&(L+=ne,L+=":"),(Q||ne==="file")&&(L+=g,L+=g),Q){let se=Q.indexOf("@");if(se!==-1){let St=Q.substr(0,se);Q=Q.substr(se+1),se=St.lastIndexOf(":"),se===-1?L+=W(St,!1,!1):(L+=W(St.substr(0,se),!1,!1),L+=":",L+=W(St.substr(se+1),!1,!0)),L+="@"}Q=Q.toLowerCase(),se=Q.lastIndexOf(":"),se===-1?L+=W(Q,!1,!0):(L+=W(Q.substr(0,se),!1,!0),L+=Q.substr(se))}if(K){if(K.length>=3&&K.charCodeAt(0)===47&&K.charCodeAt(2)===58){let se=K.charCodeAt(1);se>=65&&se<=90&&(K=`/${String.fromCharCode(se+32)}:${K.substr(3)}`)}else if(K.length>=2&&K.charCodeAt(1)===58){let se=K.charCodeAt(0);se>=65&&se<=90&&(K=`${String.fromCharCode(se+32)}:${K.substr(2)}`)}L+=W(K,!0,!1)}return ze&&(L+="?",L+=W(ze,!1,!1)),we&&(L+="#",L+=x?we:B(we,!1,!1)),L}function N(j){try{return decodeURIComponent(j)}catch{return j.length>3?j.substr(0,3)+N(j.substr(3)):j}}let z=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function J(j){return j.match(z)?j.replace(z,x=>N(x)):j}var ae=n(470);let He=ae.posix||ae,dt="/";var ft;(function(j){j.joinPath=function(x,...W){return x.with({path:He.join(x.path,...W)})},j.resolvePath=function(x,...W){let L=x.path,ne=!1;L[0]!==dt&&(L=dt+L,ne=!0);let Q=He.resolve(L,...W);return ne&&Q[0]===dt&&!x.authority&&(Q=Q.substring(1)),x.with({path:Q})},j.dirname=function(x){if(x.path.length===0||x.path===dt)return x;let W=He.dirname(x.path);return W.length===1&&W.charCodeAt(0)===46&&(W=""),x.with({path:W})},j.basename=function(x){return He.basename(x.path)},j.extname=function(x){return He.extname(x.path)}})(ft||(ft={}))})(),su=r})();var{URI:Kt,Utils:de}=su;import{CONFIG_FILE_NAMES as Vp}from"@redocly/openapi-core";var cs={languageId:"yaml",filePattern:/\.ya?ml$/i},us={languageId:"json",filePattern:/\.json$/i},as=class{constructor(){this._scorecardEnabled=!1;this.supportedLanguages=[cs,us];this.registerConfigFinder(async t=>{if(!this._fs)return;let n=[];for(let r of Vp)try{let i=de.resolvePath(de.dirname(Ne(t)),r);await this._fs.exists(i)&&n.push(i.toString())}catch{continue}if(n.length>1)throw new Error(`
|
|
67
|
+
`,"\r"];(function(e){function t(o,s,a,c){return new Ru(o,s,a,c)}e.create=t;function n(o){let s=o;return!!(f.defined(s)&&f.string(s.uri)&&(f.undefined(s.languageId)||f.string(s.languageId))&&f.uinteger(s.lineCount)&&f.func(s.getText)&&f.func(s.positionAt)&&f.func(s.offsetAt))}e.is=n;function r(o,s){let a=o.getText(),c=i(s,(p,m)=>{let P=p.range.start.line-m.range.start.line;return P===0?p.range.start.character-m.range.start.character:P}),l=a.length;for(let p=c.length-1;p>=0;p--){let m=c[p],P=o.offsetAt(m.range.start),b=o.offsetAt(m.range.end);if(b<=l)a=a.substring(0,P)+m.newText+a.substring(b,a.length);else throw new Error("Overlapping edit");l=P}return a}e.applyEdits=r;function i(o,s){if(o.length<=1)return o;let a=o.length/2|0,c=o.slice(0,a),l=o.slice(a);i(c,s),i(l,s);let p=0,m=0,P=0;for(;p<c.length&&m<l.length;)s(c[p],l[m])<=0?o[P++]=c[p++]:o[P++]=l[m++];for(;p<c.length;)o[P++]=c[p++];for(;m<l.length;)o[P++]=l[m++];return o}})(Du||(Du={}));Ru=class{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(t.push(i),r=!1);let o=n.charAt(i);r=o==="\r"||o===`
|
|
68
|
+
`,o==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
|
69
|
+
`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Ze.create(0,t);for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return Ze.create(o,t-n[o])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(e){let t=Object.prototype.toString;function n(b){return typeof b<"u"}e.defined=n;function r(b){return typeof b>"u"}e.undefined=r;function i(b){return b===!0||b===!1}e.boolean=i;function o(b){return t.call(b)==="[object String]"}e.string=o;function s(b){return t.call(b)==="[object Number]"}e.number=s;function a(b,T,I){return t.call(b)==="[object Number]"&&T<=b&&b<=I}e.numberRange=a;function c(b){return t.call(b)==="[object Number]"&&-2147483648<=b&&b<=2147483647}e.integer=c;function l(b){return t.call(b)==="[object Number]"&&0<=b&&b<=2147483647}e.uinteger=l;function p(b){return t.call(b)==="[object Function]"}e.func=p;function m(b){return b!==null&&typeof b=="object"}e.objectLiteral=m;function P(b,T){return Array.isArray(b)&&b.every(T)}e.typedArray=P})(f||(f={}))});var se=D(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.ProtocolNotificationType=He.ProtocolNotificationType0=He.ProtocolRequestType=He.ProtocolRequestType0=He.RegistrationType=He.MessageDirection=void 0;var Vn=cn(),Zp;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Zp||(He.MessageDirection=Zp={}));var Su=class{constructor(t){this.method=t}};He.RegistrationType=Su;var wu=class extends Vn.RequestType0{constructor(t){super(t)}};He.ProtocolRequestType0=wu;var Tu=class extends Vn.RequestType{constructor(t){super(t,Vn.ParameterStructures.byName)}};He.ProtocolRequestType=Tu;var ku=class extends Vn.NotificationType0{constructor(t){super(t)}};He.ProtocolNotificationType0=ku;var Au=class extends Vn.NotificationType{constructor(t){super(t,Vn.ParameterStructures.byName)}};He.ProtocolNotificationType=Au});var lo=D(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.objectLiteral=be.typedArray=be.stringArray=be.array=be.func=be.error=be.number=be.string=be.boolean=void 0;function __(e){return e===!0||e===!1}be.boolean=__;function ef(e){return typeof e=="string"||e instanceof String}be.string=ef;function C_(e){return typeof e=="number"||e instanceof Number}be.number=C_;function D_(e){return e instanceof Error}be.error=D_;function R_(e){return typeof e=="function"}be.func=R_;function tf(e){return Array.isArray(e)}be.array=tf;function S_(e){return tf(e)&&e.every(t=>ef(t))}be.stringArray=S_;function w_(e,t){return Array.isArray(e)&&e.every(t)}be.typedArray=w_;function T_(e){return e!==null&&typeof e=="object"}be.objectLiteral=T_});var of=D(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.ImplementationRequest=void 0;var nf=se(),rf;(function(e){e.method="textDocument/implementation",e.messageDirection=nf.MessageDirection.clientToServer,e.type=new nf.ProtocolRequestType(e.method)})(rf||(po.ImplementationRequest=rf={}))});var cf=D(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TypeDefinitionRequest=void 0;var sf=se(),af;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=sf.MessageDirection.clientToServer,e.type=new sf.ProtocolRequestType(e.method)})(af||(fo.TypeDefinitionRequest=af={}))});var df=D(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.DidChangeWorkspaceFoldersNotification=Yn.WorkspaceFoldersRequest=void 0;var go=se(),uf;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=go.MessageDirection.serverToClient,e.type=new go.ProtocolRequestType0(e.method)})(uf||(Yn.WorkspaceFoldersRequest=uf={}));var lf;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=go.MessageDirection.clientToServer,e.type=new go.ProtocolNotificationType(e.method)})(lf||(Yn.DidChangeWorkspaceFoldersNotification=lf={}))});var gf=D(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.ConfigurationRequest=void 0;var pf=se(),ff;(function(e){e.method="workspace/configuration",e.messageDirection=pf.MessageDirection.serverToClient,e.type=new pf.ProtocolRequestType(e.method)})(ff||(ho.ConfigurationRequest=ff={}))});var yf=D(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ColorPresentationRequest=Gn.DocumentColorRequest=void 0;var mo=se(),hf;(function(e){e.method="textDocument/documentColor",e.messageDirection=mo.MessageDirection.clientToServer,e.type=new mo.ProtocolRequestType(e.method)})(hf||(Gn.DocumentColorRequest=hf={}));var mf;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=mo.MessageDirection.clientToServer,e.type=new mo.ProtocolRequestType(e.method)})(mf||(Gn.ColorPresentationRequest=mf={}))});var xf=D(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.FoldingRangeRefreshRequest=Kn.FoldingRangeRequest=void 0;var yo=se(),bf;(function(e){e.method="textDocument/foldingRange",e.messageDirection=yo.MessageDirection.clientToServer,e.type=new yo.ProtocolRequestType(e.method)})(bf||(Kn.FoldingRangeRequest=bf={}));var vf;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=yo.MessageDirection.serverToClient,e.type=new yo.ProtocolRequestType0(e.method)})(vf||(Kn.FoldingRangeRefreshRequest=vf={}))});var Cf=D(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.DeclarationRequest=void 0;var Pf=se(),_f;(function(e){e.method="textDocument/declaration",e.messageDirection=Pf.MessageDirection.clientToServer,e.type=new Pf.ProtocolRequestType(e.method)})(_f||(bo.DeclarationRequest=_f={}))});var Sf=D(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.SelectionRangeRequest=void 0;var Df=se(),Rf;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Df.MessageDirection.clientToServer,e.type=new Df.ProtocolRequestType(e.method)})(Rf||(vo.SelectionRangeRequest=Rf={}))});var Af=D(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.WorkDoneProgressCancelNotification=Ft.WorkDoneProgressCreateRequest=Ft.WorkDoneProgress=void 0;var k_=cn(),xo=se(),wf;(function(e){e.type=new k_.ProgressType;function t(n){return n===e.type}e.is=t})(wf||(Ft.WorkDoneProgress=wf={}));var Tf;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=xo.MessageDirection.serverToClient,e.type=new xo.ProtocolRequestType(e.method)})(Tf||(Ft.WorkDoneProgressCreateRequest=Tf={}));var kf;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=xo.MessageDirection.clientToServer,e.type=new xo.ProtocolNotificationType(e.method)})(kf||(Ft.WorkDoneProgressCancelNotification=kf={}))});var Ef=D(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.CallHierarchyOutgoingCallsRequest=Ut.CallHierarchyIncomingCallsRequest=Ut.CallHierarchyPrepareRequest=void 0;var Qn=se(),Of;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType(e.method)})(Of||(Ut.CallHierarchyPrepareRequest=Of={}));var Nf;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType(e.method)})(Nf||(Ut.CallHierarchyIncomingCallsRequest=Nf={}));var qf;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType(e.method)})(qf||(Ut.CallHierarchyOutgoingCallsRequest=qf={}))});var Uf=D(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.SemanticTokensRefreshRequest=ze.SemanticTokensRangeRequest=ze.SemanticTokensDeltaRequest=ze.SemanticTokensRequest=ze.SemanticTokensRegistrationType=ze.TokenFormat=void 0;var St=se(),jf;(function(e){e.Relative="relative"})(jf||(ze.TokenFormat=jf={}));var qr;(function(e){e.method="textDocument/semanticTokens",e.type=new St.RegistrationType(e.method)})(qr||(ze.SemanticTokensRegistrationType=qr={}));var Mf;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolRequestType(e.method),e.registrationMethod=qr.method})(Mf||(ze.SemanticTokensRequest=Mf={}));var Lf;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolRequestType(e.method),e.registrationMethod=qr.method})(Lf||(ze.SemanticTokensDeltaRequest=Lf={}));var If;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolRequestType(e.method),e.registrationMethod=qr.method})(If||(ze.SemanticTokensRangeRequest=If={}));var Ff;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=St.MessageDirection.serverToClient,e.type=new St.ProtocolRequestType0(e.method)})(Ff||(ze.SemanticTokensRefreshRequest=Ff={}))});var Hf=D(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.ShowDocumentRequest=void 0;var Wf=se(),Bf;(function(e){e.method="window/showDocument",e.messageDirection=Wf.MessageDirection.serverToClient,e.type=new Wf.ProtocolRequestType(e.method)})(Bf||(Po.ShowDocumentRequest=Bf={}))});var Vf=D(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.LinkedEditingRangeRequest=void 0;var zf=se(),$f;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=zf.MessageDirection.clientToServer,e.type=new zf.ProtocolRequestType(e.method)})($f||(_o.LinkedEditingRangeRequest=$f={}))});var eg=D(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.WillDeleteFilesRequest=Ee.DidDeleteFilesNotification=Ee.DidRenameFilesNotification=Ee.WillRenameFilesRequest=Ee.DidCreateFilesNotification=Ee.WillCreateFilesRequest=Ee.FileOperationPatternKind=void 0;var et=se(),Yf;(function(e){e.file="file",e.folder="folder"})(Yf||(Ee.FileOperationPatternKind=Yf={}));var Gf;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method)})(Gf||(Ee.WillCreateFilesRequest=Gf={}));var Kf;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolNotificationType(e.method)})(Kf||(Ee.DidCreateFilesNotification=Kf={}));var Qf;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method)})(Qf||(Ee.WillRenameFilesRequest=Qf={}));var Jf;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolNotificationType(e.method)})(Jf||(Ee.DidRenameFilesNotification=Jf={}));var Xf;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolNotificationType(e.method)})(Xf||(Ee.DidDeleteFilesNotification=Xf={}));var Zf;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method)})(Zf||(Ee.WillDeleteFilesRequest=Zf={}))});var og=D(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.MonikerRequest=Wt.MonikerKind=Wt.UniquenessLevel=void 0;var tg=se(),ng;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(ng||(Wt.UniquenessLevel=ng={}));var rg;(function(e){e.$import="import",e.$export="export",e.local="local"})(rg||(Wt.MonikerKind=rg={}));var ig;(function(e){e.method="textDocument/moniker",e.messageDirection=tg.MessageDirection.clientToServer,e.type=new tg.ProtocolRequestType(e.method)})(ig||(Wt.MonikerRequest=ig={}))});var ug=D(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.TypeHierarchySubtypesRequest=Bt.TypeHierarchySupertypesRequest=Bt.TypeHierarchyPrepareRequest=void 0;var Jn=se(),sg;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(sg||(Bt.TypeHierarchyPrepareRequest=sg={}));var ag;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(ag||(Bt.TypeHierarchySupertypesRequest=ag={}));var cg;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(cg||(Bt.TypeHierarchySubtypesRequest=cg={}))});var pg=D(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.InlineValueRefreshRequest=Xn.InlineValueRequest=void 0;var Co=se(),lg;(function(e){e.method="textDocument/inlineValue",e.messageDirection=Co.MessageDirection.clientToServer,e.type=new Co.ProtocolRequestType(e.method)})(lg||(Xn.InlineValueRequest=lg={}));var dg;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=Co.MessageDirection.serverToClient,e.type=new Co.ProtocolRequestType0(e.method)})(dg||(Xn.InlineValueRefreshRequest=dg={}))});var mg=D(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.InlayHintRefreshRequest=Ht.InlayHintResolveRequest=Ht.InlayHintRequest=void 0;var Zn=se(),fg;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(fg||(Ht.InlayHintRequest=fg={}));var gg;(function(e){e.method="inlayHint/resolve",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(gg||(Ht.InlayHintResolveRequest=gg={}));var hg;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Zn.MessageDirection.serverToClient,e.type=new Zn.ProtocolRequestType0(e.method)})(hg||(Ht.InlayHintRefreshRequest=hg={}))});var Cg=D(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.DiagnosticRefreshRequest=tt.WorkspaceDiagnosticRequest=tt.DocumentDiagnosticRequest=tt.DocumentDiagnosticReportKind=tt.DiagnosticServerCancellationData=void 0;var _g=cn(),A_=lo(),er=se(),yg;(function(e){function t(n){let r=n;return r&&A_.boolean(r.retriggerRequest)}e.is=t})(yg||(tt.DiagnosticServerCancellationData=yg={}));var bg;(function(e){e.Full="full",e.Unchanged="unchanged"})(bg||(tt.DocumentDiagnosticReportKind=bg={}));var vg;(function(e){e.method="textDocument/diagnostic",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method),e.partialResult=new _g.ProgressType})(vg||(tt.DocumentDiagnosticRequest=vg={}));var xg;(function(e){e.method="workspace/diagnostic",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method),e.partialResult=new _g.ProgressType})(xg||(tt.WorkspaceDiagnosticRequest=xg={}));var Pg;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=er.MessageDirection.serverToClient,e.type=new er.ProtocolRequestType0(e.method)})(Pg||(tt.DiagnosticRefreshRequest=Pg={}))});var Ag=D(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.DidCloseNotebookDocumentNotification=pe.DidSaveNotebookDocumentNotification=pe.DidChangeNotebookDocumentNotification=pe.NotebookCellArrayChange=pe.DidOpenNotebookDocumentNotification=pe.NotebookDocumentSyncRegistrationType=pe.NotebookDocument=pe.NotebookCell=pe.ExecutionSummary=pe.NotebookCellKind=void 0;var Er=(uo(),Gr(co)),ut=lo(),yt=se(),Ou;(function(e){e.Markup=1,e.Code=2;function t(n){return n===1||n===2}e.is=t})(Ou||(pe.NotebookCellKind=Ou={}));var Nu;(function(e){function t(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}e.create=t;function n(i){let o=i;return ut.objectLiteral(o)&&Er.uinteger.is(o.executionOrder)&&(o.success===void 0||ut.boolean(o.success))}e.is=n;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}e.equals=r})(Nu||(pe.ExecutionSummary=Nu={}));var Do;(function(e){function t(o,s){return{kind:o,document:s}}e.create=t;function n(o){let s=o;return ut.objectLiteral(s)&&Ou.is(s.kind)&&Er.DocumentUri.is(s.document)&&(s.metadata===void 0||ut.objectLiteral(s.metadata))}e.is=n;function r(o,s){let a=new Set;return o.document!==s.document&&a.add("document"),o.kind!==s.kind&&a.add("kind"),o.executionSummary!==s.executionSummary&&a.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&a.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!Nu.equals(o.executionSummary,s.executionSummary)&&a.add("executionSummary"),a}e.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let a=Array.isArray(o),c=Array.isArray(s);if(a!==c)return!1;if(a&&c){if(o.length!==s.length)return!1;for(let l=0;l<o.length;l++)if(!i(o[l],s[l]))return!1}if(ut.objectLiteral(o)&&ut.objectLiteral(s)){let l=Object.keys(o),p=Object.keys(s);if(l.length!==p.length||(l.sort(),p.sort(),!i(l,p)))return!1;for(let m=0;m<l.length;m++){let P=l[m];if(!i(o[P],s[P]))return!1}}return!0}})(Do||(pe.NotebookCell=Do={}));var Dg;(function(e){function t(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}e.create=t;function n(r){let i=r;return ut.objectLiteral(i)&&ut.string(i.uri)&&Er.integer.is(i.version)&&ut.typedArray(i.cells,Do.is)}e.is=n})(Dg||(pe.NotebookDocument=Dg={}));var tr;(function(e){e.method="notebookDocument/sync",e.messageDirection=yt.MessageDirection.clientToServer,e.type=new yt.RegistrationType(e.method)})(tr||(pe.NotebookDocumentSyncRegistrationType=tr={}));var Rg;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=yt.MessageDirection.clientToServer,e.type=new yt.ProtocolNotificationType(e.method),e.registrationMethod=tr.method})(Rg||(pe.DidOpenNotebookDocumentNotification=Rg={}));var Sg;(function(e){function t(r){let i=r;return ut.objectLiteral(i)&&Er.uinteger.is(i.start)&&Er.uinteger.is(i.deleteCount)&&(i.cells===void 0||ut.typedArray(i.cells,Do.is))}e.is=t;function n(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}e.create=n})(Sg||(pe.NotebookCellArrayChange=Sg={}));var wg;(function(e){e.method="notebookDocument/didChange",e.messageDirection=yt.MessageDirection.clientToServer,e.type=new yt.ProtocolNotificationType(e.method),e.registrationMethod=tr.method})(wg||(pe.DidChangeNotebookDocumentNotification=wg={}));var Tg;(function(e){e.method="notebookDocument/didSave",e.messageDirection=yt.MessageDirection.clientToServer,e.type=new yt.ProtocolNotificationType(e.method),e.registrationMethod=tr.method})(Tg||(pe.DidSaveNotebookDocumentNotification=Tg={}));var kg;(function(e){e.method="notebookDocument/didClose",e.messageDirection=yt.MessageDirection.clientToServer,e.type=new yt.ProtocolNotificationType(e.method),e.registrationMethod=tr.method})(kg||(pe.DidCloseNotebookDocumentNotification=kg={}))});var qg=D(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.InlineCompletionRequest=void 0;var Og=se(),Ng;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=Og.MessageDirection.clientToServer,e.type=new Og.ProtocolRequestType(e.method)})(Ng||(Ro.InlineCompletionRequest=Ng={}))});var Vh=D(u=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});u.WorkspaceSymbolRequest=u.CodeActionResolveRequest=u.CodeActionRequest=u.DocumentSymbolRequest=u.DocumentHighlightRequest=u.ReferencesRequest=u.DefinitionRequest=u.SignatureHelpRequest=u.SignatureHelpTriggerKind=u.HoverRequest=u.CompletionResolveRequest=u.CompletionRequest=u.CompletionTriggerKind=u.PublishDiagnosticsNotification=u.WatchKind=u.RelativePattern=u.FileChangeType=u.DidChangeWatchedFilesNotification=u.WillSaveTextDocumentWaitUntilRequest=u.WillSaveTextDocumentNotification=u.TextDocumentSaveReason=u.DidSaveTextDocumentNotification=u.DidCloseTextDocumentNotification=u.DidChangeTextDocumentNotification=u.TextDocumentContentChangeEvent=u.DidOpenTextDocumentNotification=u.TextDocumentSyncKind=u.TelemetryEventNotification=u.LogMessageNotification=u.ShowMessageRequest=u.ShowMessageNotification=u.MessageType=u.DidChangeConfigurationNotification=u.ExitNotification=u.ShutdownRequest=u.InitializedNotification=u.InitializeErrorCodes=u.InitializeRequest=u.WorkDoneProgressOptions=u.TextDocumentRegistrationOptions=u.StaticRegistrationOptions=u.PositionEncodingKind=u.FailureHandlingKind=u.ResourceOperationKind=u.UnregistrationRequest=u.RegistrationRequest=u.DocumentSelector=u.NotebookCellTextDocumentFilter=u.NotebookDocumentFilter=u.TextDocumentFilter=void 0;u.MonikerRequest=u.MonikerKind=u.UniquenessLevel=u.WillDeleteFilesRequest=u.DidDeleteFilesNotification=u.WillRenameFilesRequest=u.DidRenameFilesNotification=u.WillCreateFilesRequest=u.DidCreateFilesNotification=u.FileOperationPatternKind=u.LinkedEditingRangeRequest=u.ShowDocumentRequest=u.SemanticTokensRegistrationType=u.SemanticTokensRefreshRequest=u.SemanticTokensRangeRequest=u.SemanticTokensDeltaRequest=u.SemanticTokensRequest=u.TokenFormat=u.CallHierarchyPrepareRequest=u.CallHierarchyOutgoingCallsRequest=u.CallHierarchyIncomingCallsRequest=u.WorkDoneProgressCancelNotification=u.WorkDoneProgressCreateRequest=u.WorkDoneProgress=u.SelectionRangeRequest=u.DeclarationRequest=u.FoldingRangeRefreshRequest=u.FoldingRangeRequest=u.ColorPresentationRequest=u.DocumentColorRequest=u.ConfigurationRequest=u.DidChangeWorkspaceFoldersNotification=u.WorkspaceFoldersRequest=u.TypeDefinitionRequest=u.ImplementationRequest=u.ApplyWorkspaceEditRequest=u.ExecuteCommandRequest=u.PrepareRenameRequest=u.RenameRequest=u.PrepareSupportDefaultBehavior=u.DocumentOnTypeFormattingRequest=u.DocumentRangesFormattingRequest=u.DocumentRangeFormattingRequest=u.DocumentFormattingRequest=u.DocumentLinkResolveRequest=u.DocumentLinkRequest=u.CodeLensRefreshRequest=u.CodeLensResolveRequest=u.CodeLensRequest=u.WorkspaceSymbolResolveRequest=void 0;u.InlineCompletionRequest=u.DidCloseNotebookDocumentNotification=u.DidSaveNotebookDocumentNotification=u.DidChangeNotebookDocumentNotification=u.NotebookCellArrayChange=u.DidOpenNotebookDocumentNotification=u.NotebookDocumentSyncRegistrationType=u.NotebookDocument=u.NotebookCell=u.ExecutionSummary=u.NotebookCellKind=u.DiagnosticRefreshRequest=u.WorkspaceDiagnosticRequest=u.DocumentDiagnosticRequest=u.DocumentDiagnosticReportKind=u.DiagnosticServerCancellationData=u.InlayHintRefreshRequest=u.InlayHintResolveRequest=u.InlayHintRequest=u.InlineValueRefreshRequest=u.InlineValueRequest=u.TypeHierarchySupertypesRequest=u.TypeHierarchySubtypesRequest=u.TypeHierarchyPrepareRequest=void 0;var w=se(),Eg=(uo(),Gr(co)),Se=lo(),O_=of();Object.defineProperty(u,"ImplementationRequest",{enumerable:!0,get:function(){return O_.ImplementationRequest}});var N_=cf();Object.defineProperty(u,"TypeDefinitionRequest",{enumerable:!0,get:function(){return N_.TypeDefinitionRequest}});var Bh=df();Object.defineProperty(u,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return Bh.WorkspaceFoldersRequest}});Object.defineProperty(u,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return Bh.DidChangeWorkspaceFoldersNotification}});var q_=gf();Object.defineProperty(u,"ConfigurationRequest",{enumerable:!0,get:function(){return q_.ConfigurationRequest}});var Hh=yf();Object.defineProperty(u,"DocumentColorRequest",{enumerable:!0,get:function(){return Hh.DocumentColorRequest}});Object.defineProperty(u,"ColorPresentationRequest",{enumerable:!0,get:function(){return Hh.ColorPresentationRequest}});var zh=xf();Object.defineProperty(u,"FoldingRangeRequest",{enumerable:!0,get:function(){return zh.FoldingRangeRequest}});Object.defineProperty(u,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return zh.FoldingRangeRefreshRequest}});var E_=Cf();Object.defineProperty(u,"DeclarationRequest",{enumerable:!0,get:function(){return E_.DeclarationRequest}});var j_=Sf();Object.defineProperty(u,"SelectionRangeRequest",{enumerable:!0,get:function(){return j_.SelectionRangeRequest}});var Lu=Af();Object.defineProperty(u,"WorkDoneProgress",{enumerable:!0,get:function(){return Lu.WorkDoneProgress}});Object.defineProperty(u,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Lu.WorkDoneProgressCreateRequest}});Object.defineProperty(u,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Lu.WorkDoneProgressCancelNotification}});var Iu=Ef();Object.defineProperty(u,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return Iu.CallHierarchyIncomingCallsRequest}});Object.defineProperty(u,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return Iu.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(u,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return Iu.CallHierarchyPrepareRequest}});var nr=Uf();Object.defineProperty(u,"TokenFormat",{enumerable:!0,get:function(){return nr.TokenFormat}});Object.defineProperty(u,"SemanticTokensRequest",{enumerable:!0,get:function(){return nr.SemanticTokensRequest}});Object.defineProperty(u,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return nr.SemanticTokensDeltaRequest}});Object.defineProperty(u,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return nr.SemanticTokensRangeRequest}});Object.defineProperty(u,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return nr.SemanticTokensRefreshRequest}});Object.defineProperty(u,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return nr.SemanticTokensRegistrationType}});var M_=Hf();Object.defineProperty(u,"ShowDocumentRequest",{enumerable:!0,get:function(){return M_.ShowDocumentRequest}});var L_=Vf();Object.defineProperty(u,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return L_.LinkedEditingRangeRequest}});var dn=eg();Object.defineProperty(u,"FileOperationPatternKind",{enumerable:!0,get:function(){return dn.FileOperationPatternKind}});Object.defineProperty(u,"DidCreateFilesNotification",{enumerable:!0,get:function(){return dn.DidCreateFilesNotification}});Object.defineProperty(u,"WillCreateFilesRequest",{enumerable:!0,get:function(){return dn.WillCreateFilesRequest}});Object.defineProperty(u,"DidRenameFilesNotification",{enumerable:!0,get:function(){return dn.DidRenameFilesNotification}});Object.defineProperty(u,"WillRenameFilesRequest",{enumerable:!0,get:function(){return dn.WillRenameFilesRequest}});Object.defineProperty(u,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return dn.DidDeleteFilesNotification}});Object.defineProperty(u,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return dn.WillDeleteFilesRequest}});var Fu=og();Object.defineProperty(u,"UniquenessLevel",{enumerable:!0,get:function(){return Fu.UniquenessLevel}});Object.defineProperty(u,"MonikerKind",{enumerable:!0,get:function(){return Fu.MonikerKind}});Object.defineProperty(u,"MonikerRequest",{enumerable:!0,get:function(){return Fu.MonikerRequest}});var Uu=ug();Object.defineProperty(u,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Uu.TypeHierarchyPrepareRequest}});Object.defineProperty(u,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Uu.TypeHierarchySubtypesRequest}});Object.defineProperty(u,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Uu.TypeHierarchySupertypesRequest}});var $h=pg();Object.defineProperty(u,"InlineValueRequest",{enumerable:!0,get:function(){return $h.InlineValueRequest}});Object.defineProperty(u,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return $h.InlineValueRefreshRequest}});var Wu=mg();Object.defineProperty(u,"InlayHintRequest",{enumerable:!0,get:function(){return Wu.InlayHintRequest}});Object.defineProperty(u,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Wu.InlayHintResolveRequest}});Object.defineProperty(u,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Wu.InlayHintRefreshRequest}});var jr=Cg();Object.defineProperty(u,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return jr.DiagnosticServerCancellationData}});Object.defineProperty(u,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return jr.DocumentDiagnosticReportKind}});Object.defineProperty(u,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return jr.DocumentDiagnosticRequest}});Object.defineProperty(u,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return jr.WorkspaceDiagnosticRequest}});Object.defineProperty(u,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return jr.DiagnosticRefreshRequest}});var bt=Ag();Object.defineProperty(u,"NotebookCellKind",{enumerable:!0,get:function(){return bt.NotebookCellKind}});Object.defineProperty(u,"ExecutionSummary",{enumerable:!0,get:function(){return bt.ExecutionSummary}});Object.defineProperty(u,"NotebookCell",{enumerable:!0,get:function(){return bt.NotebookCell}});Object.defineProperty(u,"NotebookDocument",{enumerable:!0,get:function(){return bt.NotebookDocument}});Object.defineProperty(u,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return bt.NotebookDocumentSyncRegistrationType}});Object.defineProperty(u,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return bt.DidOpenNotebookDocumentNotification}});Object.defineProperty(u,"NotebookCellArrayChange",{enumerable:!0,get:function(){return bt.NotebookCellArrayChange}});Object.defineProperty(u,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return bt.DidChangeNotebookDocumentNotification}});Object.defineProperty(u,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return bt.DidSaveNotebookDocumentNotification}});Object.defineProperty(u,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return bt.DidCloseNotebookDocumentNotification}});var I_=qg();Object.defineProperty(u,"InlineCompletionRequest",{enumerable:!0,get:function(){return I_.InlineCompletionRequest}});var qu;(function(e){function t(n){let r=n;return Se.string(r)||Se.string(r.language)||Se.string(r.scheme)||Se.string(r.pattern)}e.is=t})(qu||(u.TextDocumentFilter=qu={}));var Eu;(function(e){function t(n){let r=n;return Se.objectLiteral(r)&&(Se.string(r.notebookType)||Se.string(r.scheme)||Se.string(r.pattern))}e.is=t})(Eu||(u.NotebookDocumentFilter=Eu={}));var ju;(function(e){function t(n){let r=n;return Se.objectLiteral(r)&&(Se.string(r.notebook)||Eu.is(r.notebook))&&(r.language===void 0||Se.string(r.language))}e.is=t})(ju||(u.NotebookCellTextDocumentFilter=ju={}));var Mu;(function(e){function t(n){if(!Array.isArray(n))return!1;for(let r of n)if(!Se.string(r)&&!qu.is(r)&&!ju.is(r))return!1;return!0}e.is=t})(Mu||(u.DocumentSelector=Mu={}));var jg;(function(e){e.method="client/registerCapability",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolRequestType(e.method)})(jg||(u.RegistrationRequest=jg={}));var Mg;(function(e){e.method="client/unregisterCapability",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolRequestType(e.method)})(Mg||(u.UnregistrationRequest=Mg={}));var Lg;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(Lg||(u.ResourceOperationKind=Lg={}));var Ig;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(Ig||(u.FailureHandlingKind=Ig={}));var Fg;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(Fg||(u.PositionEncodingKind=Fg={}));var Ug;(function(e){function t(n){let r=n;return r&&Se.string(r.id)&&r.id.length>0}e.hasId=t})(Ug||(u.StaticRegistrationOptions=Ug={}));var Wg;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||Mu.is(r.documentSelector))}e.is=t})(Wg||(u.TextDocumentRegistrationOptions=Wg={}));var Bg;(function(e){function t(r){let i=r;return Se.objectLiteral(i)&&(i.workDoneProgress===void 0||Se.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&Se.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(Bg||(u.WorkDoneProgressOptions=Bg={}));var Hg;(function(e){e.method="initialize",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Hg||(u.InitializeRequest=Hg={}));var zg;(function(e){e.unknownProtocolVersion=1})(zg||(u.InitializeErrorCodes=zg={}));var $g;(function(e){e.method="initialized",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})($g||(u.InitializedNotification=$g={}));var Vg;(function(e){e.method="shutdown",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType0(e.method)})(Vg||(u.ShutdownRequest=Vg={}));var Yg;(function(e){e.method="exit",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType0(e.method)})(Yg||(u.ExitNotification=Yg={}));var Gg;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})(Gg||(u.DidChangeConfigurationNotification=Gg={}));var Kg;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(Kg||(u.MessageType=Kg={}));var Qg;(function(e){e.method="window/showMessage",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolNotificationType(e.method)})(Qg||(u.ShowMessageNotification=Qg={}));var Jg;(function(e){e.method="window/showMessageRequest",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolRequestType(e.method)})(Jg||(u.ShowMessageRequest=Jg={}));var Xg;(function(e){e.method="window/logMessage",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolNotificationType(e.method)})(Xg||(u.LogMessageNotification=Xg={}));var Zg;(function(e){e.method="telemetry/event",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolNotificationType(e.method)})(Zg||(u.TelemetryEventNotification=Zg={}));var eh;(function(e){e.None=0,e.Full=1,e.Incremental=2})(eh||(u.TextDocumentSyncKind=eh={}));var th;(function(e){e.method="textDocument/didOpen",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})(th||(u.DidOpenTextDocumentNotification=th={}));var nh;(function(e){function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}e.isIncremental=t;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}e.isFull=n})(nh||(u.TextDocumentContentChangeEvent=nh={}));var rh;(function(e){e.method="textDocument/didChange",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})(rh||(u.DidChangeTextDocumentNotification=rh={}));var ih;(function(e){e.method="textDocument/didClose",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})(ih||(u.DidCloseTextDocumentNotification=ih={}));var oh;(function(e){e.method="textDocument/didSave",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})(oh||(u.DidSaveTextDocumentNotification=oh={}));var sh;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(sh||(u.TextDocumentSaveReason=sh={}));var ah;(function(e){e.method="textDocument/willSave",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})(ah||(u.WillSaveTextDocumentNotification=ah={}));var ch;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(ch||(u.WillSaveTextDocumentWaitUntilRequest=ch={}));var uh;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolNotificationType(e.method)})(uh||(u.DidChangeWatchedFilesNotification=uh={}));var lh;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(lh||(u.FileChangeType=lh={}));var dh;(function(e){function t(n){let r=n;return Se.objectLiteral(r)&&(Eg.URI.is(r.baseUri)||Eg.WorkspaceFolder.is(r.baseUri))&&Se.string(r.pattern)}e.is=t})(dh||(u.RelativePattern=dh={}));var ph;(function(e){e.Create=1,e.Change=2,e.Delete=4})(ph||(u.WatchKind=ph={}));var fh;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolNotificationType(e.method)})(fh||(u.PublishDiagnosticsNotification=fh={}));var gh;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(gh||(u.CompletionTriggerKind=gh={}));var hh;(function(e){e.method="textDocument/completion",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(hh||(u.CompletionRequest=hh={}));var mh;(function(e){e.method="completionItem/resolve",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(mh||(u.CompletionResolveRequest=mh={}));var yh;(function(e){e.method="textDocument/hover",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(yh||(u.HoverRequest=yh={}));var bh;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(bh||(u.SignatureHelpTriggerKind=bh={}));var vh;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(vh||(u.SignatureHelpRequest=vh={}));var xh;(function(e){e.method="textDocument/definition",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(xh||(u.DefinitionRequest=xh={}));var Ph;(function(e){e.method="textDocument/references",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Ph||(u.ReferencesRequest=Ph={}));var _h;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(_h||(u.DocumentHighlightRequest=_h={}));var Ch;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Ch||(u.DocumentSymbolRequest=Ch={}));var Dh;(function(e){e.method="textDocument/codeAction",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Dh||(u.CodeActionRequest=Dh={}));var Rh;(function(e){e.method="codeAction/resolve",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Rh||(u.CodeActionResolveRequest=Rh={}));var Sh;(function(e){e.method="workspace/symbol",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Sh||(u.WorkspaceSymbolRequest=Sh={}));var wh;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(wh||(u.WorkspaceSymbolResolveRequest=wh={}));var Th;(function(e){e.method="textDocument/codeLens",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Th||(u.CodeLensRequest=Th={}));var kh;(function(e){e.method="codeLens/resolve",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(kh||(u.CodeLensResolveRequest=kh={}));var Ah;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolRequestType0(e.method)})(Ah||(u.CodeLensRefreshRequest=Ah={}));var Oh;(function(e){e.method="textDocument/documentLink",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Oh||(u.DocumentLinkRequest=Oh={}));var Nh;(function(e){e.method="documentLink/resolve",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Nh||(u.DocumentLinkResolveRequest=Nh={}));var qh;(function(e){e.method="textDocument/formatting",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(qh||(u.DocumentFormattingRequest=qh={}));var Eh;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Eh||(u.DocumentRangeFormattingRequest=Eh={}));var jh;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(jh||(u.DocumentRangesFormattingRequest=jh={}));var Mh;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Mh||(u.DocumentOnTypeFormattingRequest=Mh={}));var Lh;(function(e){e.Identifier=1})(Lh||(u.PrepareSupportDefaultBehavior=Lh={}));var Ih;(function(e){e.method="textDocument/rename",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Ih||(u.RenameRequest=Ih={}));var Fh;(function(e){e.method="textDocument/prepareRename",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Fh||(u.PrepareRenameRequest=Fh={}));var Uh;(function(e){e.method="workspace/executeCommand",e.messageDirection=w.MessageDirection.clientToServer,e.type=new w.ProtocolRequestType(e.method)})(Uh||(u.ExecuteCommandRequest=Uh={}));var Wh;(function(e){e.method="workspace/applyEdit",e.messageDirection=w.MessageDirection.serverToClient,e.type=new w.ProtocolRequestType("workspace/applyEdit")})(Wh||(u.ApplyWorkspaceEditRequest=Wh={}))});var Gh=D(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.createProtocolConnection=void 0;var Yh=cn();function F_(e,t,n,r){return Yh.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Yh.createMessageConnection)(e,t,n,r)}So.createProtocolConnection=F_});var Qh=D($e=>{"use strict";var U_=$e&&$e.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),wo=$e&&$e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&U_(t,e,n)};Object.defineProperty($e,"__esModule",{value:!0});$e.LSPErrorCodes=$e.createProtocolConnection=void 0;wo(cn(),$e);wo((uo(),Gr(co)),$e);wo(se(),$e);wo(Vh(),$e);var W_=Gh();Object.defineProperty($e,"createProtocolConnection",{enumerable:!0,get:function(){return W_.createProtocolConnection}});var Kh;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Kh||($e.LSPErrorCodes=Kh={}))});var ye=D(vt=>{"use strict";var B_=vt&&vt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),Jh=vt&&vt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&B_(t,e,n)};Object.defineProperty(vt,"__esModule",{value:!0});vt.createProtocolConnection=void 0;var H_=Cc();Jh(Cc(),vt);Jh(Qh(),vt);function z_(e,t,n,r){return(0,H_.createMessageConnection)(e,t,n,r)}vt.createProtocolConnection=z_});var Hu=D(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.SemanticTokensBuilder=zt.SemanticTokensDiff=zt.SemanticTokensFeature=void 0;var To=ye(),$_=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(To.SemanticTokensRefreshRequest.type),on:t=>{let n=To.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=To.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=To.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zt.SemanticTokensFeature=$_;var ko=class{constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<t&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<t){let i=t-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,a=this.modifiedSequence.slice(r,o+1);return a.length===1&&a[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:a}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<t?[{start:r,deleteCount:t-r}]:[]}};zt.SemanticTokensDiff=ko;var Bu=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(t,n,r,i,o){let s=t,a=n;this._dataLen>0&&(s-=this._prevLine,s===0&&(a-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=a,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new ko(this._prevData,this._data).computeDiff()}:this.build()}};zt.SemanticTokensBuilder=Bu});var Xh=D(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.InlineCompletionFeature=void 0;var V_=ye(),Y_=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(V_.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Ao.InlineCompletionFeature=Y_});var $u=D(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.TextDocuments=void 0;var pn=ye(),zu=class{constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new pn.Emitter,this._onDidOpen=new pn.Emitter,this._onDidClose=new pn.Emitter,this._onDidSave=new pn.Emitter,this._onWillSave=new pn.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=pn.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let a=this._syncedDocuments.get(i.uri);a!==void 0&&(a=this._configuration.update(a,o,s),this._syncedDocuments.set(i.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(t.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(t.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),pn.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Oo.TextDocuments=zu});var Yu=D(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.NotebookDocuments=rr.NotebookSyncFeature=void 0;var nt=ye(),Zh=$u(),G_=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(nt.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(nt.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(nt.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(nt.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};rr.NotebookSyncFeature=G_;var No=class e{onDidOpenTextDocument(t){return this.openHandler=t,nt.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,nt.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,nt.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}};No.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var Vu=class{constructor(t){t instanceof Zh.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Zh.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new nt.Emitter,this._onDidChange=new nt.Emitter,this._onDidSave=new nt.Emitter,this._onDidClose=new nt.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new No,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,a=!1,c=i.change;c.metadata!==void 0&&(a=!0,o.metadata=c.metadata);let l=[],p=[],m=[],P=[];if(c.cells!==void 0){let V=c.cells;if(V.structure!==void 0){let h=V.structure.array;if(o.cells.splice(h.start,h.deleteCount,...h.cells!==void 0?h.cells:[]),V.structure.didOpen!==void 0)for(let g of V.structure.didOpen)n.openTextDocument({textDocument:g}),l.push(g.uri);if(V.structure.didClose)for(let g of V.structure.didClose)n.closeTextDocument({textDocument:g}),p.push(g.uri)}if(V.data!==void 0){let h=new Map(V.data.map(g=>[g.document,g]));for(let g=0;g<=o.cells.length;g++){let S=h.get(o.cells[g].document);if(S!==void 0){let $=o.cells.splice(g,1,S);if(m.push({old:$[0],new:S}),h.delete(S.document),h.size===0)break}}}if(V.textContent!==void 0)for(let h of V.textContent)n.changeTextDocument({textDocument:h.document,contentChanges:h.changes}),P.push(h.document.uri)}this.updateCellMap(o);let b={notebookDocument:o};a&&(b.metadata={old:s,new:o.metadata});let T=[];for(let V of l)T.push(this.getNotebookCell(V));let I=[];for(let V of p)I.push(this.getNotebookCell(V));let G=[];for(let V of P)G.push(this.getNotebookCell(V));(T.length>0||I.length>0||m.length>0||G.length>0)&&(b.cells={added:T,removed:I,changed:{data:m,textContent:G}}),(b.metadata!==void 0||b.cells!==void 0)&&this._onDidChange.fire(b)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),nt.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};rr.NotebookDocuments=Vu});var Gu=D(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.thenable=ve.typedArray=ve.stringArray=ve.array=ve.func=ve.error=ve.number=ve.string=ve.boolean=void 0;function K_(e){return e===!0||e===!1}ve.boolean=K_;function em(e){return typeof e=="string"||e instanceof String}ve.string=em;function Q_(e){return typeof e=="number"||e instanceof Number}ve.number=Q_;function J_(e){return e instanceof Error}ve.error=J_;function tm(e){return typeof e=="function"}ve.func=tm;function nm(e){return Array.isArray(e)}ve.array=nm;function X_(e){return nm(e)&&e.every(t=>em(t))}ve.stringArray=X_;function Z_(e,t){return Array.isArray(e)&&e.every(t)}ve.typedArray=Z_;function eC(e){return e&&tm(e.then)}ve.thenable=eC});var Ku=D(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.generateUuid=rt.parse=rt.isUUID=rt.v4=rt.empty=void 0;var Mr=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Lr=class e extends Mr{static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};Lr._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Lr._timeHighBits=["8","9","a","b"];rt.empty=new Mr("00000000-0000-0000-0000-000000000000");function rm(){return new Lr}rt.v4=rm;var tC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function im(e){return tC.test(e)}rt.isUUID=im;function nC(e){if(!im(e))throw new Error("invalid uuid");return new Mr(e)}rt.parse=nC;function rC(){return rm().asHex()}rt.generateUuid=rC});var om=D(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.attachPartialResult=Vt.ProgressFeature=Vt.attachWorkDone=void 0;var $t=ye(),iC=Ku(),fn=class e{constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,i){let o={kind:"begin",title:t,percentage:n,message:r,cancellable:i};this._connection.sendProgress($t.WorkDoneProgress.type,this._token,o)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=t,n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress($t.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress($t.WorkDoneProgress.type,this._token,{kind:"end"})}};fn.Instances=new Map;var qo=class extends fn{constructor(t,n){super(t,n),this._source=new $t.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Ir=class{constructor(){}begin(){}report(){}done(){}},Eo=class extends Ir{constructor(){super(),this._source=new $t.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function oC(e,t){if(t===void 0||t.workDoneToken===void 0)return new Ir;let n=t.workDoneToken;return delete t.workDoneToken,new fn(e,n)}Vt.attachWorkDone=oC;var sC=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification($t.WorkDoneProgressCancelNotification.type,n=>{let r=fn.Instances.get(n.token);(r instanceof qo||r instanceof Eo)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Ir:new fn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,iC.generateUuid)();return this.connection.sendRequest($t.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qo(this.connection,t))}else return Promise.resolve(new Eo)}};Vt.ProgressFeature=sC;var Qu;(function(e){e.type=new $t.ProgressType})(Qu||(Qu={}));var Ju=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Qu.type,this._token,t)}};function aC(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Ju(e,n)}Vt.attachPartialResult=aC});var sm=D(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.ConfigurationFeature=void 0;var cC=ye(),uC=Gu(),lC=e=>class extends e{getConfiguration(t){return t?uC.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(cC.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};jo.ConfigurationFeature=lC});var am=D(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.WorkspaceFoldersFeature=void 0;var Mo=ye(),dC=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Mo.Emitter,this.connection.onNotification(Mo.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Mo.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Mo.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Lo.WorkspaceFoldersFeature=dC});var cm=D(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.CallHierarchyFeature=void 0;var Xu=ye(),pC=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Xu.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Xu.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Xu.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Io.CallHierarchyFeature=pC});var um=D(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.ShowDocumentFeature=void 0;var fC=ye(),gC=e=>class extends e{showDocument(t){return this.connection.sendRequest(fC.ShowDocumentRequest.type,t)}};Fo.ShowDocumentFeature=gC});var lm=D(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.FileOperationsFeature=void 0;var ir=ye(),hC=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(ir.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(ir.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(ir.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(ir.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(ir.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(ir.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Uo.FileOperationsFeature=hC});var dm=D(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.LinkedEditingRangeFeature=void 0;var mC=ye(),yC=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(mC.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Wo.LinkedEditingRangeFeature=yC});var pm=D(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.TypeHierarchyFeature=void 0;var Zu=ye(),bC=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Zu.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Zu.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Zu.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Bo.TypeHierarchyFeature=bC});var gm=D(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.InlineValueFeature=void 0;var fm=ye(),vC=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(fm.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(fm.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Ho.InlineValueFeature=vC});var mm=D(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.FoldingRangeFeature=void 0;var hm=ye(),xC=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(hm.FoldingRangeRefreshRequest.type),on:t=>{let n=hm.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zo.FoldingRangeFeature=xC});var ym=D($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.InlayHintFeature=void 0;var el=ye(),PC=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(el.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(el.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(el.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};$o.InlayHintFeature=PC});var bm=D(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.DiagnosticFeature=void 0;var Fr=ye(),_C=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Fr.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Fr.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fr.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Fr.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Fr.WorkspaceDiagnosticRequest.partialResult,n)))}}};Vo.DiagnosticFeature=_C});var vm=D(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.MonikerFeature=void 0;var CC=ye(),DC=e=>class extends e{get moniker(){return{on:t=>{let n=CC.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Yo.MonikerFeature=DC});var Em=D(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.createConnection=Q.combineFeatures=Q.combineNotebooksFeatures=Q.combineLanguagesFeatures=Q.combineWorkspaceFeatures=Q.combineWindowFeatures=Q.combineClientFeatures=Q.combineTracerFeatures=Q.combineTelemetryFeatures=Q.combineConsoleFeatures=Q._NotebooksImpl=Q._LanguagesImpl=Q.BulkUnregistration=Q.BulkRegistration=Q.ErrorMessageTracker=void 0;var O=ye(),it=Gu(),nl=Ku(),B=om(),RC=sm(),SC=am(),wC=cm(),TC=Hu(),kC=um(),AC=lm(),OC=dm(),NC=pm(),qC=gm(),EC=mm(),jC=ym(),MC=bm(),LC=Yu(),IC=vm();function tl(e){if(e!==null)return e}var rl=class{constructor(){this._messages=Object.create(null)}add(t){let n=this._messages[t];n||(n=0),n++,this._messages[t]=n}sendErrors(t){Object.keys(this._messages).forEach(n=>{t.window.showErrorMessage(n)})}};Q.ErrorMessageTracker=rl;var Go=class{constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(O.MessageType.Error,t)}warn(t){this.send(O.MessageType.Warning,t)}info(t){this.send(O.MessageType.Info,t)}log(t){this.send(O.MessageType.Log,t)}debug(t){this.send(O.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(O.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,O.RAL)().console.error("Sending log message failed")})}},il=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:O.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(O.ShowMessageRequest.type,r).then(tl)}showWarningMessage(t,...n){let r={type:O.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(O.ShowMessageRequest.type,r).then(tl)}showInformationMessage(t,...n){let r={type:O.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(O.ShowMessageRequest.type,r).then(tl)}},xm=(0,kC.ShowDocumentFeature)((0,B.ProgressFeature)(il)),Pm;(function(e){function t(){return new Ko}e.create=t})(Pm||(Q.BulkRegistration=Pm={}));var Ko=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let r=it.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=nl.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},_m;(function(e){function t(){return new Ur(void 0,[])}e.create=t})(_m||(Q.BulkUnregistration=_m={}));var Ur=class{constructor(t,n){this._connection=t,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(O.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=it.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(O.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},Qo=class{attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof Ko?this.registerMany(t):t instanceof Ur?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=it.string(n)?n:n.method,o=nl.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(O.RegistrationRequest.type,s).then(a=>(t.add({id:o,method:i}),t),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=it.string(t)?t:t.method,i=nl.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(O.RegistrationRequest.type,o).then(s=>O.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(O.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(O.RegistrationRequest.type,n).then(()=>new Ur(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},ol=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(i){return i&&!!i.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(O.ApplyWorkspaceEditRequest.type,r)}},Cm=(0,AC.FileOperationsFeature)((0,SC.WorkspaceFoldersFeature)((0,RC.ConfigurationFeature)(ol))),Jo=class{constructor(){this._trace=O.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==O.Trace.Off&&this.connection.sendNotification(O.LogTraceNotification.type,{message:t,verbose:this._trace===O.Trace.Verbose?n:void 0}).catch(()=>{})}},Xo=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(O.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Zo=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,B.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,B.attachPartialResult)(this.connection,n)}};Q._LanguagesImpl=Zo;var Dm=(0,EC.FoldingRangeFeature)((0,IC.MonikerFeature)((0,MC.DiagnosticFeature)((0,jC.InlayHintFeature)((0,qC.InlineValueFeature)((0,NC.TypeHierarchyFeature)((0,OC.LinkedEditingRangeFeature)((0,TC.SemanticTokensFeature)((0,wC.CallHierarchyFeature)(Zo))))))))),es=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,B.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,B.attachPartialResult)(this.connection,n)}};Q._NotebooksImpl=es;var Rm=(0,LC.NotebookSyncFeature)(es);function Sm(e,t){return function(n){return t(e(n))}}Q.combineConsoleFeatures=Sm;function wm(e,t){return function(n){return t(e(n))}}Q.combineTelemetryFeatures=wm;function Tm(e,t){return function(n){return t(e(n))}}Q.combineTracerFeatures=Tm;function km(e,t){return function(n){return t(e(n))}}Q.combineClientFeatures=km;function Am(e,t){return function(n){return t(e(n))}}Q.combineWindowFeatures=Am;function Om(e,t){return function(n){return t(e(n))}}Q.combineWorkspaceFeatures=Om;function Nm(e,t){return function(n){return t(e(n))}}Q.combineLanguagesFeatures=Nm;function qm(e,t){return function(n){return t(e(n))}}Q.combineNotebooksFeatures=qm;function FC(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,Sm),tracer:n(e.tracer,t.tracer,Tm),telemetry:n(e.telemetry,t.telemetry,wm),client:n(e.client,t.client,km),window:n(e.window,t.window,Am),workspace:n(e.workspace,t.workspace,Om),languages:n(e.languages,t.languages,Nm),notebooks:n(e.notebooks,t.notebooks,qm)}}Q.combineFeatures=FC;function UC(e,t,n){let r=n&&n.console?new(n.console(Go)):new Go,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(Jo)):new Jo,s=n&&n.telemetry?new(n.telemetry(Xo)):new Xo,a=n&&n.client?new(n.client(Qo)):new Qo,c=n&&n.window?new(n.window(xm)):new xm,l=n&&n.workspace?new(n.workspace(Cm)):new Cm,p=n&&n.languages?new(n.languages(Dm)):new Dm,m=n&&n.notebooks?new(n.notebooks(Rm)):new Rm,P=[r,o,s,a,c,l,p,m];function b(h){return h instanceof Promise?h:it.thenable(h)?new Promise((g,S)=>{h.then($=>g($),$=>S($))}):Promise.resolve(h)}let T,I,G,V={listen:()=>i.listen(),sendRequest:(h,...g)=>i.sendRequest(it.string(h)?h:h.method,...g),onRequest:(h,g)=>i.onRequest(h,g),sendNotification:(h,g)=>{let S=it.string(h)?h:h.method;return i.sendNotification(S,g)},onNotification:(h,g)=>i.onNotification(h,g),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:h=>(I=h,{dispose:()=>{I=void 0}}),onInitialized:h=>i.onNotification(O.InitializedNotification.type,h),onShutdown:h=>(T=h,{dispose:()=>{T=void 0}}),onExit:h=>(G=h,{dispose:()=>{G=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return a},get window(){return c},get workspace(){return l},get languages(){return p},get notebooks(){return m},onDidChangeConfiguration:h=>i.onNotification(O.DidChangeConfigurationNotification.type,h),onDidChangeWatchedFiles:h=>i.onNotification(O.DidChangeWatchedFilesNotification.type,h),__textDocumentSync:void 0,onDidOpenTextDocument:h=>i.onNotification(O.DidOpenTextDocumentNotification.type,h),onDidChangeTextDocument:h=>i.onNotification(O.DidChangeTextDocumentNotification.type,h),onDidCloseTextDocument:h=>i.onNotification(O.DidCloseTextDocumentNotification.type,h),onWillSaveTextDocument:h=>i.onNotification(O.WillSaveTextDocumentNotification.type,h),onWillSaveTextDocumentWaitUntil:h=>i.onRequest(O.WillSaveTextDocumentWaitUntilRequest.type,h),onDidSaveTextDocument:h=>i.onNotification(O.DidSaveTextDocumentNotification.type,h),sendDiagnostics:h=>i.sendNotification(O.PublishDiagnosticsNotification.type,h),onHover:h=>i.onRequest(O.HoverRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),void 0)),onCompletion:h=>i.onRequest(O.CompletionRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onCompletionResolve:h=>i.onRequest(O.CompletionResolveRequest.type,h),onSignatureHelp:h=>i.onRequest(O.SignatureHelpRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),void 0)),onDeclaration:h=>i.onRequest(O.DeclarationRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onDefinition:h=>i.onRequest(O.DefinitionRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onTypeDefinition:h=>i.onRequest(O.TypeDefinitionRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onImplementation:h=>i.onRequest(O.ImplementationRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onReferences:h=>i.onRequest(O.ReferencesRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onDocumentHighlight:h=>i.onRequest(O.DocumentHighlightRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onDocumentSymbol:h=>i.onRequest(O.DocumentSymbolRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onWorkspaceSymbol:h=>i.onRequest(O.WorkspaceSymbolRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onWorkspaceSymbolResolve:h=>i.onRequest(O.WorkspaceSymbolResolveRequest.type,h),onCodeAction:h=>i.onRequest(O.CodeActionRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onCodeActionResolve:h=>i.onRequest(O.CodeActionResolveRequest.type,(g,S)=>h(g,S)),onCodeLens:h=>i.onRequest(O.CodeLensRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onCodeLensResolve:h=>i.onRequest(O.CodeLensResolveRequest.type,(g,S)=>h(g,S)),onDocumentFormatting:h=>i.onRequest(O.DocumentFormattingRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),void 0)),onDocumentRangeFormatting:h=>i.onRequest(O.DocumentRangeFormattingRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),void 0)),onDocumentOnTypeFormatting:h=>i.onRequest(O.DocumentOnTypeFormattingRequest.type,(g,S)=>h(g,S)),onRenameRequest:h=>i.onRequest(O.RenameRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),void 0)),onPrepareRename:h=>i.onRequest(O.PrepareRenameRequest.type,(g,S)=>h(g,S)),onDocumentLinks:h=>i.onRequest(O.DocumentLinkRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onDocumentLinkResolve:h=>i.onRequest(O.DocumentLinkResolveRequest.type,(g,S)=>h(g,S)),onDocumentColor:h=>i.onRequest(O.DocumentColorRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onColorPresentation:h=>i.onRequest(O.ColorPresentationRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onFoldingRanges:h=>i.onRequest(O.FoldingRangeRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onSelectionRanges:h=>i.onRequest(O.SelectionRangeRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),(0,B.attachPartialResult)(i,g))),onExecuteCommand:h=>i.onRequest(O.ExecuteCommandRequest.type,(g,S)=>h(g,S,(0,B.attachWorkDone)(i,g),void 0)),dispose:()=>i.dispose()};for(let h of P)h.attach(V);return i.onRequest(O.InitializeRequest.type,h=>{t.initialize(h),it.string(h.trace)&&(o.trace=O.Trace.fromString(h.trace));for(let g of P)g.initialize(h.capabilities);if(I){let g=I(h,new O.CancellationTokenSource().token,(0,B.attachWorkDone)(i,h),void 0);return b(g).then(S=>{if(S instanceof O.ResponseError)return S;let $=S;$||($={capabilities:{}});let X=$.capabilities;X||(X={},$.capabilities=X),X.textDocumentSync===void 0||X.textDocumentSync===null?X.textDocumentSync=it.number(V.__textDocumentSync)?V.__textDocumentSync:O.TextDocumentSyncKind.None:!it.number(X.textDocumentSync)&&!it.number(X.textDocumentSync.change)&&(X.textDocumentSync.change=it.number(V.__textDocumentSync)?V.__textDocumentSync:O.TextDocumentSyncKind.None);for(let ot of P)ot.fillServerCapabilities(X);return $})}else{let g={capabilities:{textDocumentSync:O.TextDocumentSyncKind.None}};for(let S of P)S.fillServerCapabilities(g.capabilities);return g}}),i.onRequest(O.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,T)return T(new O.CancellationTokenSource().token)}),i.onNotification(O.ExitNotification.type,()=>{try{G&&G()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(O.SetTraceNotification.type,h=>{o.trace=O.Trace.fromString(h.value)}),V}Q.createConnection=UC});var sl=D(je=>{"use strict";var WC=je&&je.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),Mm=je&&je.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&WC(t,e,n)};Object.defineProperty(je,"__esModule",{value:!0});je.ProposedFeatures=je.NotebookDocuments=je.TextDocuments=je.SemanticTokensBuilder=void 0;var BC=Hu();Object.defineProperty(je,"SemanticTokensBuilder",{enumerable:!0,get:function(){return BC.SemanticTokensBuilder}});var HC=Xh();Mm(ye(),je);var zC=$u();Object.defineProperty(je,"TextDocuments",{enumerable:!0,get:function(){return zC.TextDocuments}});var $C=Yu();Object.defineProperty(je,"NotebookDocuments",{enumerable:!0,get:function(){return $C.NotebookDocuments}});Mm(Em(),je);var jm;(function(e){e.all={__brand:"features",languages:HC.InlineCompletionFeature}})(jm||(je.ProposedFeatures=jm={}))});var Im=D((Rw,Lm)=>{"use strict";Lm.exports=ye()});var al=D(xt=>{"use strict";var VC=xt&&xt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),Um=xt&&xt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&VC(t,e,n)};Object.defineProperty(xt,"__esModule",{value:!0});xt.createConnection=void 0;var ts=sl();Um(Im(),xt);Um(sl(),xt);var Fm=!1,YC={initialize:e=>{},get shutdownReceived(){return Fm},set shutdownReceived(e){Fm=e},exit:e=>{}};function GC(e,t,n,r){let i,o,s,a;e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),ts.ConnectionStrategy.is(e)||ts.ConnectionOptions.is(e)?a=e:(o=e,s=t,a=n);let c=l=>(0,ts.createProtocolConnection)(o,s,l,a);return(0,ts.createConnection)(c,YC,i)}xt.createConnection=GC});var Yt=D((ww,Wm)=>{"use strict";Wm.exports=al()});var bl=D((yT,ey)=>{"use strict";function Pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Zm(e,t){for(var n="",r=0,i=-1,o=0,s,a=0;a<=e.length;++a){if(a<e.length)s=e.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=a,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return n}function E0(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}var ar={resolve:function(){for(var t="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(r===void 0&&(r=process.cwd()),o=r),Pt(o),o.length!==0&&(t=o+"/"+t,n=o.charCodeAt(0)===47)}return t=Zm(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Pt(t),t.length===0)return".";var n=t.charCodeAt(0)===47,r=t.charCodeAt(t.length-1)===47;return t=Zm(t,!n),t.length===0&&!n&&(t="."),t.length>0&&r&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return Pt(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n<arguments.length;++n){var r=arguments[n];Pt(r),r.length>0&&(t===void 0?t=r:t+="/"+r)}return t===void 0?".":ar.normalize(t)},relative:function(t,n){if(Pt(t),Pt(n),t===n||(t=ar.resolve(t),n=ar.resolve(n),t===n))return"";for(var r=1;r<t.length&&t.charCodeAt(r)===47;++r);for(var i=t.length,o=i-r,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var a=n.length,c=a-s,l=o<c?o:c,p=-1,m=0;m<=l;++m){if(m===l){if(c>l){if(n.charCodeAt(s+m)===47)return n.slice(s+m+1);if(m===0)return n.slice(s+m)}else o>l&&(t.charCodeAt(r+m)===47?p=m:m===0&&(p=0));break}var P=t.charCodeAt(r+m),b=n.charCodeAt(s+m);if(P!==b)break;P===47&&(p=m)}var T="";for(m=r+p+1;m<=i;++m)(m===i||t.charCodeAt(m)===47)&&(T.length===0?T+="..":T+="/..");return T.length>0?T+n.slice(s+p):(s+=p,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(Pt(t),t.length===0)return".";for(var n=t.charCodeAt(0),r=n===47,i=-1,o=!0,s=t.length-1;s>=1;--s)if(n=t.charCodeAt(s),n===47){if(!o){i=s;break}}else o=!1;return i===-1?r?"/":".":r&&i===1?"//":t.slice(0,i)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Pt(t);var r=0,i=-1,o=!0,s;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var a=n.length-1,c=-1;for(s=t.length-1;s>=0;--s){var l=t.charCodeAt(s);if(l===47){if(!o){r=s+1;break}}else c===-1&&(o=!1,c=s+1),a>=0&&(l===n.charCodeAt(a)?--a===-1&&(i=s):(a=-1,i=c))}return r===i?i=c:i===-1&&(i=t.length),t.slice(r,i)}else{for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===47){if(!o){r=s+1;break}}else i===-1&&(o=!1,i=s+1);return i===-1?"":t.slice(r,i)}},extname:function(t){Pt(t);for(var n=-1,r=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var c=t.charCodeAt(a);if(c===47){if(!o){r=a+1;break}continue}i===-1&&(o=!1,i=a+1),c===46?n===-1?n=a:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||i===-1||s===0||s===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return E0("/",t)},parse:function(t){Pt(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var r=t.charCodeAt(0),i=r===47,o;i?(n.root="/",o=1):o=0;for(var s=-1,a=0,c=-1,l=!0,p=t.length-1,m=0;p>=o;--p){if(r=t.charCodeAt(p),r===47){if(!l){a=p+1;break}continue}c===-1&&(l=!1,c=p+1),r===46?s===-1?s=p:m!==1&&(m=1):s!==-1&&(m=-1)}return s===-1||c===-1||m===0||m===1&&s===c-1&&s===a+1?c!==-1&&(a===0&&i?n.base=n.name=t.slice(1,c):n.base=n.name=t.slice(a,c)):(a===0&&i?(n.name=t.slice(1,s),n.base=t.slice(1,c)):(n.name=t.slice(a,s),n.base=t.slice(a,c)),n.ext=t.slice(s,c)),a>0?n.dir=t.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};ar.posix=ar;ey.exports=ar});import{CONFIG_FILE_NAMES as ra,loadConfig as bx}from"@redocly/openapi-core";var Cl;(()=>{"use strict";var e={975:k=>{function y(x){if(typeof x!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(x))}function E(x,C){for(var R,q="",M=0,N=-1,z=0,Y=0;Y<=x.length;++Y){if(Y<x.length)R=x.charCodeAt(Y);else{if(R===47)break;R=47}if(R===47){if(!(N===Y-1||z===1))if(N!==Y-1&&z===2){if(q.length<2||M!==2||q.charCodeAt(q.length-1)!==46||q.charCodeAt(q.length-2)!==46){if(q.length>2){var _e=q.lastIndexOf("/");if(_e!==q.length-1){_e===-1?(q="",M=0):M=(q=q.slice(0,_e)).length-1-q.lastIndexOf("/"),N=Y,z=0;continue}}else if(q.length===2||q.length===1){q="",M=0,N=Y,z=0;continue}}C&&(q.length>0?q+="/..":q="..",M=2)}else q.length>0?q+="/"+x.slice(N+1,Y):q=x.slice(N+1,Y),M=Y-N-1;N=Y,z=0}else R===46&&z!==-1?++z:z=-1}return q}var j={resolve:function(){for(var x,C="",R=!1,q=arguments.length-1;q>=-1&&!R;q--){var M;q>=0?M=arguments[q]:(x===void 0&&(x=process.cwd()),M=x),y(M),M.length!==0&&(C=M+"/"+C,R=M.charCodeAt(0)===47)}return C=E(C,!R),R?C.length>0?"/"+C:"/":C.length>0?C:"."},normalize:function(x){if(y(x),x.length===0)return".";var C=x.charCodeAt(0)===47,R=x.charCodeAt(x.length-1)===47;return(x=E(x,!C)).length!==0||C||(x="."),x.length>0&&R&&(x+="/"),C?"/"+x:x},isAbsolute:function(x){return y(x),x.length>0&&x.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var x,C=0;C<arguments.length;++C){var R=arguments[C];y(R),R.length>0&&(x===void 0?x=R:x+="/"+R)}return x===void 0?".":j.normalize(x)},relative:function(x,C){if(y(x),y(C),x===C||(x=j.resolve(x))===(C=j.resolve(C)))return"";for(var R=1;R<x.length&&x.charCodeAt(R)===47;++R);for(var q=x.length,M=q-R,N=1;N<C.length&&C.charCodeAt(N)===47;++N);for(var z=C.length-N,Y=M<z?M:z,_e=-1,ee=0;ee<=Y;++ee){if(ee===Y){if(z>Y){if(C.charCodeAt(N+ee)===47)return C.slice(N+ee+1);if(ee===0)return C.slice(N+ee)}else M>Y&&(x.charCodeAt(R+ee)===47?_e=ee:ee===0&&(_e=0));break}var st=x.charCodeAt(R+ee);if(st!==C.charCodeAt(N+ee))break;st===47&&(_e=ee)}var Xt="";for(ee=R+_e+1;ee<=q;++ee)ee!==q&&x.charCodeAt(ee)!==47||(Xt.length===0?Xt+="..":Xt+="/..");return Xt.length>0?Xt+C.slice(N+_e):(N+=_e,C.charCodeAt(N)===47&&++N,C.slice(N))},_makeLong:function(x){return x},dirname:function(x){if(y(x),x.length===0)return".";for(var C=x.charCodeAt(0),R=C===47,q=-1,M=!0,N=x.length-1;N>=1;--N)if((C=x.charCodeAt(N))===47){if(!M){q=N;break}}else M=!1;return q===-1?R?"/":".":R&&q===1?"//":x.slice(0,q)},basename:function(x,C){if(C!==void 0&&typeof C!="string")throw new TypeError('"ext" argument must be a string');y(x);var R,q=0,M=-1,N=!0;if(C!==void 0&&C.length>0&&C.length<=x.length){if(C.length===x.length&&C===x)return"";var z=C.length-1,Y=-1;for(R=x.length-1;R>=0;--R){var _e=x.charCodeAt(R);if(_e===47){if(!N){q=R+1;break}}else Y===-1&&(N=!1,Y=R+1),z>=0&&(_e===C.charCodeAt(z)?--z==-1&&(M=R):(z=-1,M=Y))}return q===M?M=Y:M===-1&&(M=x.length),x.slice(q,M)}for(R=x.length-1;R>=0;--R)if(x.charCodeAt(R)===47){if(!N){q=R+1;break}}else M===-1&&(N=!1,M=R+1);return M===-1?"":x.slice(q,M)},extname:function(x){y(x);for(var C=-1,R=0,q=-1,M=!0,N=0,z=x.length-1;z>=0;--z){var Y=x.charCodeAt(z);if(Y!==47)q===-1&&(M=!1,q=z+1),Y===46?C===-1?C=z:N!==1&&(N=1):C!==-1&&(N=-1);else if(!M){R=z+1;break}}return C===-1||q===-1||N===0||N===1&&C===q-1&&C===R+1?"":x.slice(C,q)},format:function(x){if(x===null||typeof x!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof x);return function(C,R){var q=R.dir||R.root,M=R.base||(R.name||"")+(R.ext||"");return q?q===R.root?q+M:q+"/"+M:M}(0,x)},parse:function(x){y(x);var C={root:"",dir:"",base:"",ext:"",name:""};if(x.length===0)return C;var R,q=x.charCodeAt(0),M=q===47;M?(C.root="/",R=1):R=0;for(var N=-1,z=0,Y=-1,_e=!0,ee=x.length-1,st=0;ee>=R;--ee)if((q=x.charCodeAt(ee))!==47)Y===-1&&(_e=!1,Y=ee+1),q===46?N===-1?N=ee:st!==1&&(st=1):N!==-1&&(st=-1);else if(!_e){z=ee+1;break}return N===-1||Y===-1||st===0||st===1&&N===Y-1&&N===z+1?Y!==-1&&(C.base=C.name=z===0&&M?x.slice(1,Y):x.slice(z,Y)):(z===0&&M?(C.name=x.slice(1,N),C.base=x.slice(1,Y)):(C.name=x.slice(z,N),C.base=x.slice(z,Y)),C.ext=x.slice(N,Y)),z>0?C.dir=x.slice(0,z-1):M&&(C.dir="/"),C},sep:"/",delimiter:":",win32:null,posix:null};j.posix=j,k.exports=j}},t={};function n(k){var y=t[k];if(y!==void 0)return y.exports;var E=t[k]={exports:{}};return e[k](E,E.exports,n),E.exports}n.d=(k,y)=>{for(var E in y)n.o(y,E)&&!n.o(k,E)&&Object.defineProperty(k,E,{enumerable:!0,get:y[E]})},n.o=(k,y)=>Object.prototype.hasOwnProperty.call(k,y),n.r=k=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>P,Utils:()=>hn}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function c(k,y){if(!k.scheme&&y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${k.authority}", path: "${k.path}", query: "${k.query}", fragment: "${k.fragment}"}`);if(k.scheme&&!o.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!s.test(k.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(k.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let l="",p="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class P{static isUri(y){return y instanceof P||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="string"&&typeof y.with=="function"&&typeof y.toString=="function"}scheme;authority;path;query;fragment;constructor(y,E,j,x,C,R=!1){typeof y=="object"?(this.scheme=y.scheme||l,this.authority=y.authority||l,this.path=y.path||l,this.query=y.query||l,this.fragment=y.fragment||l):(this.scheme=function(q,M){return q||M?q:"file"}(y,R),this.authority=E||l,this.path=function(q,M){switch(q){case"https":case"http":case"file":M?M[0]!==p&&(M=p+M):M=p}return M}(this.scheme,j||l),this.query=x||l,this.fragment=C||l,c(this,R))}get fsPath(){return h(this,!1)}with(y){if(!y)return this;let{scheme:E,authority:j,path:x,query:C,fragment:R}=y;return E===void 0?E=this.scheme:E===null&&(E=l),j===void 0?j=this.authority:j===null&&(j=l),x===void 0?x=this.path:x===null&&(x=l),C===void 0?C=this.query:C===null&&(C=l),R===void 0?R=this.fragment:R===null&&(R=l),E===this.scheme&&j===this.authority&&x===this.path&&C===this.query&&R===this.fragment?this:new T(E,j,x,C,R)}static parse(y,E=!1){let j=m.exec(y);return j?new T(j[2]||l,X(j[4]||l),X(j[5]||l),X(j[7]||l),X(j[9]||l),E):new T(l,l,l,l,l)}static file(y){let E=l;if(i&&(y=y.replace(/\\/g,p)),y[0]===p&&y[1]===p){let j=y.indexOf(p,2);j===-1?(E=y.substring(2),y=p):(E=y.substring(2,j),y=y.substring(j)||p)}return new T("file",E,y,l,l)}static from(y){let E=new T(y.scheme,y.authority,y.path,y.query,y.fragment);return c(E,!0),E}toString(y=!1){return g(this,y)}toJSON(){return this}static revive(y){if(y){if(y instanceof P)return y;{let E=new T(y);return E._formatted=y.external,E._fsPath=y._sep===b?y.fsPath:null,E}}return y}}let b=i?1:void 0;class T extends P{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=h(this,!1)),this._fsPath}toString(y=!1){return y?g(this,!0):(this._formatted||(this._formatted=g(this,!1)),this._formatted)}toJSON(){let y={$mid:1};return this._fsPath&&(y.fsPath=this._fsPath,y._sep=b),this._formatted&&(y.external=this._formatted),this.path&&(y.path=this.path),this.scheme&&(y.scheme=this.scheme),this.authority&&(y.authority=this.authority),this.query&&(y.query=this.query),this.fragment&&(y.fragment=this.fragment),y}}let I={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function G(k,y,E){let j,x=-1;for(let C=0;C<k.length;C++){let R=k.charCodeAt(C);if(R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===45||R===46||R===95||R===126||y&&R===47||E&&R===91||E&&R===93||E&&R===58)x!==-1&&(j+=encodeURIComponent(k.substring(x,C)),x=-1),j!==void 0&&(j+=k.charAt(C));else{j===void 0&&(j=k.substr(0,C));let q=I[R];q!==void 0?(x!==-1&&(j+=encodeURIComponent(k.substring(x,C)),x=-1),j+=q):x===-1&&(x=C)}}return x!==-1&&(j+=encodeURIComponent(k.substring(x))),j!==void 0?j:k}function V(k){let y;for(let E=0;E<k.length;E++){let j=k.charCodeAt(E);j===35||j===63?(y===void 0&&(y=k.substr(0,E)),y+=I[j]):y!==void 0&&(y+=k[E])}return y!==void 0?y:k}function h(k,y){let E;return E=k.authority&&k.path.length>1&&k.scheme==="file"?`//${k.authority}${k.path}`:k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?y?k.path.substr(1):k.path[1].toLowerCase()+k.path.substr(2):k.path,i&&(E=E.replace(/\//g,"\\")),E}function g(k,y){let E=y?V:G,j="",{scheme:x,authority:C,path:R,query:q,fragment:M}=k;if(x&&(j+=x,j+=":"),(C||x==="file")&&(j+=p,j+=p),C){let N=C.indexOf("@");if(N!==-1){let z=C.substr(0,N);C=C.substr(N+1),N=z.lastIndexOf(":"),N===-1?j+=E(z,!1,!1):(j+=E(z.substr(0,N),!1,!1),j+=":",j+=E(z.substr(N+1),!1,!0)),j+="@"}C=C.toLowerCase(),N=C.lastIndexOf(":"),N===-1?j+=E(C,!1,!0):(j+=E(C.substr(0,N),!1,!0),j+=C.substr(N))}if(R){if(R.length>=3&&R.charCodeAt(0)===47&&R.charCodeAt(2)===58){let N=R.charCodeAt(1);N>=65&&N<=90&&(R=`/${String.fromCharCode(N+32)}:${R.substr(3)}`)}else if(R.length>=2&&R.charCodeAt(1)===58){let N=R.charCodeAt(0);N>=65&&N<=90&&(R=`${String.fromCharCode(N+32)}:${R.substr(2)}`)}j+=E(R,!0,!1)}return q&&(j+="?",j+=E(q,!1,!1)),M&&(j+="#",j+=y?M:G(M,!1,!1)),j}function S(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+S(k.substr(3)):k}}let $=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function X(k){return k.match($)?k.replace($,y=>S(y)):k}var ot=n(975);let Tt=ot.posix||ot,Jt="/";var hn;(function(k){k.joinPath=function(y,...E){return y.with({path:Tt.join(y.path,...E)})},k.resolvePath=function(y,...E){let j=y.path,x=!1;j[0]!==Jt&&(j=Jt+j,x=!0);let C=Tt.resolve(j,...E);return x&&C[0]===Jt&&!y.authority&&(C=C.substring(1)),y.with({path:C})},k.dirname=function(y){if(y.path.length===0||y.path===Jt)return y;let E=Tt.dirname(y.path);return E.length===1&&E.charCodeAt(0)===46&&(E=""),y.with({path:E})},k.basename=function(y){return Tt.basename(y.path)},k.extname=function(y){return Tt.extname(y.path)}})(hn||(hn={})),Cl=r})();var{URI:At,Utils:ne}=Cl;import{CONFIG_FILE_NAMES as Oy}from"@redocly/openapi-core";var vs={languageId:"yaml",filePattern:/\.ya?ml$/i},xs={languageId:"json",filePattern:/\.json$/i},bs=class{constructor(){this._scorecardEnabled=!1;this.supportedLanguages=[vs,xs];this.registerConfigFinder(async t=>{if(!this._fs)return;let n=[];for(let r of Oy)try{let i=ne.resolvePath(ne.dirname(De(t)),r);await this._fs.exists(i)&&n.push(i.toString())}catch{continue}if(n.length>1)throw new Error(`
|
|
68
70
|
Multiple configuration files are not allowed.
|
|
69
71
|
Found the following files: ${n.join(", ")}.
|
|
70
72
|
Please use 'redocly.yaml' instead.
|
|
71
|
-
`);return n[0]}),this.registerRootWorkspaceFolderURIGetter(async()=>"")}registerFileSystemProvider(t){this._fs=t}registerDocumentsProvider(t){this._documentManager=t}registerConfigFinder(t){this._findConfig=t}registerRootWorkspaceFolderURIGetter(t){this._getRootWorkspaceFolderURI=t}get fs(){if(!this._fs)throw new Error("FileSystemProvider not registered.");return this._fs}get documents(){if(!this._documentManager)throw new Error("DocumentsProvider not registered.");return this._documentManager}get findConfig(){return this._findConfig}get getRootWorkspaceFolderURI(){return this._getRootWorkspaceFolderURI}enableScorecard(t){this._scorecardEnabled=t}get scorecardEnabled(){return this._scorecardEnabled}},qe=new as;function au(e,t){return de.resolvePath(Ne(e)).toString()===de.resolvePath(Ne(t)).toString()}function Ne(e){return Kt.parse(e)}function An(e){return Kt.parse(e).fsPath}function dr(e){let t=["https","http"],{scheme:n}=Kt.parse(e);return t.includes(n)}function qn(e){return de.basename(Ne(e))}async function cu(e,t="/"){let n=de.resolvePath(Ne(t));for(;e.path!=="/";)try{(await qe.fs.stat(de.resolvePath(n,e.path))).isDirectory()||(e=de.dirname(e));break}catch{e=de.dirname(e)}return e}import{BaseResolver as Ah,Source as zl,readFileFromUrl as qh}from"@redocly/openapi-core";var fi=Ge(hr(),1);import{isAbsoluteUrl as xh}from"@redocly/openapi-core";function El(e,t=100,n=!1){let r=new Map,i=new Map;function o(u,c,p){let g=i.get(u.uri),b=g?Date.now()-g:0;try{b<t&&b>=0?r.set(u.uri,setTimeout(()=>o(u,c,p),t-b)):(r.delete(u.uri),i.delete(u.uri),n||c(e(u)))}catch(D){p(D)}}function s(u){let c=r.get(u.uri),p=n&&!c;return i.set(u.uri,Date.now()),new Promise((g,b)=>{c||r.set(u.uri,setTimeout(()=>o(u,g,b),t)),p&&g(e(u))})}return s}function Is(e){let t=new Set,n=r=>Array.isArray(n)?r.map(n):typeof r=="object"&&r!==null?t.has(r)?void 0:(t.add(r),Object.fromEntries(Object.entries(r).map(([i,o])=>[i,n(o)]))):r;return n(e)}function Ml(e){return e==="$ref"}async function Ls(e,t){let n=Kt.parse(t);return de.joinPath(n,e).toString()}async function jl(e,t,n){for(let[r,{root:i}]of Object.entries(e))if(await Ls(i,n)===t)return r}function Il(e){return typeof e=="string"}function pi(e){return typeof e=="function"}function Ll(e){return e?.kind===fi.Kind.MAP}function Fs(e){return e?.kind===fi.Kind.MAPPING}function Us(e){return e?.kind===fi.Kind.SEQ}function yr(e,t){let n=t.singleQuoted?"'":'"';return`${n}${e}${n}`}function Ws(e){return xh(e)||e.startsWith("file://")}var gi=class e{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let i=Ul(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let u=Math.max(i.start.line,0),c=Math.max(i.end.line,0),p=this._lineOffsets,g=Fl(r.text,!1,o);if(c-u===g.length)for(let D=0,R=g.length;D<R;D++)p[D+u+1]=g[D];else g.length<1e4?p.splice(u+1,c-u,...g):this._lineOffsets=p=p.slice(0,u+1).concat(g,p.slice(c+1));let b=r.text.length-(s-o);if(b!==0)for(let D=u+1+g.length,R=p.length;D<R;D++)p[D]=p[D]+b}else if(e.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Fl(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return{line:o,character:t-n[o]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},mi;(function(e){function t(i,o,s,u){return new gi(i,o,s,u)}e.create=t;function n(i,o,s){if(i instanceof gi)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,o){let s=i.getText(),u=Hs(o.map(wh),(g,b)=>{let D=g.range.start.line-b.range.start.line;return D===0?g.range.start.character-b.range.start.character:D}),c=0,p=[];for(let g of u){let b=i.offsetAt(g.range.start);if(b<c)throw new Error("Overlapping edit");b>c&&p.push(s.substring(c,b)),g.newText.length&&p.push(g.newText),c=i.offsetAt(g.range.end)}return p.push(s.substr(c)),p.join("")}e.applyEdits=r})(mi||(mi={}));function Hs(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Hs(r,t),Hs(i,t);let o=0,s=0,u=0;for(;o<r.length&&s<i.length;)t(r[o],i[s])<=0?e[u++]=r[o++]:e[u++]=i[s++];for(;o<r.length;)e[u++]=r[o++];for(;s<i.length;)e[u++]=i[s++];return e}function Fl(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);(o===13||o===10)&&(o===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function Ul(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function wh(e){let t=Ul(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Wl=new Map;function Hl(e,t){return Wl.set(e,t)}function Bl(e){let t=[];for(let[n,r]of Wl.entries())r.dependencyPaths.has(e)&&t.push({documentPath:n,durationMS:r.durationMS});return t}async function st(e){let t=qe.documents.get(e);if(t)return t;let n=await qe.fs.readFile(Ne(e),"utf-8");return mi.create(e,"yaml",1,n)}function Bs(e){return us.filePattern.test(e)}function kh(e){return cs.filePattern.test(e)}var Ut=class extends Ah{resolveExternalRef(t,n){return Ws(n)?n:t&&Ws(t)?new URL(n,t).href:t?de.resolvePath(de.dirname(Ne(t)),n).toString():n}async loadExternalRef(t){if(dr(t)){let{body:n,mimeType:r}=await qh(t,{...this.config.http,customFetch:fetch});return new zl(t,n,r)}return new zl(t,(await st(t)).getText())}};var br,hi,zs,Vl;async function Vs(e){let t=new Ut,n=e?await qe.findConfig(e):void 0;return br=await Nh({configPath:n,externalRefResolver:t,processRawConfig:async({document:r,resolvedRefMap:i})=>{zs=i,Vl=r}}),br}async function In(){return br||await Vs(),{config:br,configPath:hi,rootConfigDocument:Vl}}async function $l(e,t){try{return hi=e?await qe.findConfig(e):void 0,hi?await Vs(hi):br}catch(n){return t?.createEventHandleLoadConfigError?.(n?.message),Vs()}}function vr(e){return Ys(e)?!0:!!zs&&[...zs.keys()].map(n=>n.split("::")?.[1]?.split("#")[0]).some(n=>au(qn(e),n))}function Ys(e){return $s.includes(qn(e))}var Yl={hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},Cr={type:"object",properties:Yl,additionalProperties:!1},Oh={type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},placeholder:{type:"string"}},additionalProperties:!1},Xt={type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:Object.assign(Object.assign({},Yl),{like:Cr,dislike:Cr,satisfied:Cr,neutral:Cr,dissatisfied:Cr}),additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1},optionalEmail:Oh},additionalProperties:!1}},additionalProperties:!1};var Ln={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},Eh={type:"object",properties:{name:{type:"string"},items:Ln,queries:Ln,mutations:Ln,subscriptions:Ln,types:Ln,directives:Ln},required:["name"],additionalProperties:!1},Mh={type:"object",properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:Eh},otherItemsGroupName:{type:"string"}},required:["requireExactGroups","groups","otherItemsGroupName"],additionalProperties:!1},Fn={type:"object",properties:{hidePaginationButtons:{type:"boolean"},menu:{type:"object",properties:Object.assign({},Mh.properties),additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},samplesMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:Xt},additionalProperties:!1};var jh={type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string",examples:["curl","JavaScript","Node.js","Python","Java8+Apache","Java","C#","C#+Newtonsoft","PHP","Go","Ruby","R","Payload"]},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},required:["languages"],additionalProperties:!1},Ih={type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},yi={type:"object",properties:{licenseKey:{type:"string"},hideLoading:{type:"boolean"},disableRouter:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:Xt,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string",nullable:!0},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:Ih,onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:jh,ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"}},additionalProperties:!1};var Lh={type:"object",properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},Fh={type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},Kl={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},Uh={type:"object",properties:{beforeInfo:{type:"array",items:Kl},end:{type:"array",items:Kl}}},yn={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},bi={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},Wh={type:"object",properties:_i(yn.properties,["light","dark"])},Hh={type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},Bh={type:"object",properties:{error:bi,info:bi,redirect:bi,success:bi}},zh={type:"object",properties:Un(yn.properties,["dark"])},Vh={type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},$h={type:"object",properties:{accent:yn,border:Wh,error:yn,http:Hh,primary:yn,responses:Bh,secondary:zh,success:yn,text:Vh,tonalOffset:{type:"number"},warning:yn}},vi={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},Yh={type:"object",properties:{small:vi,medium:vi,large:vi,xlarge:vi}},kt={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},Kh={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:Yh})},Gl={type:"object",properties:_i(kt.properties,["fontSize","lineHeight"])},Gh={type:"object",properties:{medium:Gl,small:Gl}},Qh={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:Gh})},Jh={type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},Xh={type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},Ql={type:"object",properties:{fullWidth:{type:"boolean"}}},Zh={type:"object",properties:{buttons:Kh,httpBadges:Qh,layoutControls:Jh,panels:Xh,tryItButton:Ql,tryItSendButton:Ql}},Pi={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},ey={type:"object",properties:{maxWidth:Pi}},ty={type:"object",properties:{maxWidth:Pi,middlePanelMaxWidth:Pi}},ny={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:ey,"three-panel":ty}},Jl={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},ry={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:Jl,defaultDetailsWidth:{type:"string"},examples:Jl,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},Zl={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},iy={type:"object",properties:_i(Zl.properties,["textTransform"])},oy={type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},sy={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:Zl,level1items:iy,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:oy,textColor:{type:"string"},width:{type:"string"}})},Ci={type:"object",properties:Object.assign(Object.assign({},kt.properties),{color:{type:"string"},transform:{type:"string"}})},ay={type:"object",properties:Object.assign(Object.assign({},kt.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},cy={type:"object",properties:Un(kt.properties,["fontSize"])},uy={type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},ly={type:"object",properties:Object.assign(Object.assign({code:ay,fieldName:kt},_i(kt.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:Ci,heading2:Ci,heading3:Ci,headings:cy,lineHeight:{type:"string"},links:uy,optimizeSpeed:{type:"boolean"},rightPanelHeading:Ci,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},dy={type:"object",properties:Object.assign({color:{type:"string"}},Un(kt.properties,["fontWeight"]))},fy={type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:dy}},py={type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},gy={type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},Xl={type:"object",properties:{custom:{type:"string"}}},my={type:"object",properties:{DownloadButton:Xl,NextSectionButton:Xl}},hy={type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},yy={type:"object",properties:{borderRadius:{type:"string"}}},by={type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},vy={type:"object",properties:{breakpoints:Pi,codeBlock:fy,colors:$h,components:Zh,layout:ny,logo:py,fab:gy,overrides:my,rightPanel:hy,schema:ry,shape:yy,sidebar:sy,spacing:by,typography:ly,links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},Cy={type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:Lh}},required:["languages"]},ed={type:"object",properties:{theme:vy,ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:Cy,generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:Fh,menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:Uh,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only","path-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:!1};function _i(e,t){return Object.fromEntries(t.filter(n=>n in e).map(n=>[n,e[n]]))}function Un(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}var Ie={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},td={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},Ks={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean",default:!1},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"top"},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}},rbac:{type:"object",additionalProperties:{type:"string"}}}},Gs={type:"array",items:Object.assign(Object.assign({},Ks),{properties:Object.assign(Object.assign({},Ks.properties),{items:{type:"array",items:Ks}})})},Py={type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]},_y={type:"object",properties:{hide:{type:"boolean",default:!1},suggestions:{default:[],type:"array",items:{type:"string"}},prompt:{type:"string"}},additionalProperties:!1},Dy={type:"array",items:{type:"object",required:["name","field","type"],properties:{name:{type:"string"},field:{type:"string"},type:{type:"string",enum:["multi-select","select","tags"]}},additionalProperties:!1}},Ry={type:"object",properties:Object.assign({facets:Dy},Ie.properties),additionalProperties:!1},Sy={type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]},Di={type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},Ri={type:"object",properties:Object.assign({items:Gs},Ie.properties),additionalProperties:!1},Si={type:"object",additionalProperties:Py},Ti={type:"object",properties:Object.assign({items:Gs,copyrightText:{type:"string"},logo:Ie},Ie.properties),additionalProperties:!1},xi={type:"object",properties:Object.assign({separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"bottom"}},Ie.properties),additionalProperties:!1},wi={type:"object",properties:{head:{type:"array",items:td},body:{type:"array",items:td}},additionalProperties:!1},ki={type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},Ai={type:"object",properties:Object.assign({engine:{type:"string",enum:["flexsearch","typesense"],default:"flexsearch"},ai:_y,filters:Ry,placement:{type:"string",default:"navbar"},shortcuts:{type:"array",items:{type:"string"},default:["\u2318+K,ctrl+K"]},suggestedPages:{type:"array",items:Sy}},Ie.properties),additionalProperties:!1},qi={type:"object",properties:Object.assign({ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"},default:["light","dark"]}},Ie.properties),additionalProperties:!1},Ni={type:"object",properties:{nextButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Next page"}},Ie.properties),additionalProperties:!1,default:{}},previousButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Previous page"}},Ie.properties),additionalProperties:!1,default:{}}},additionalProperties:!1},Oi={type:"object",properties:{elementFormat:{type:"string",default:"icon"},copy:{type:"object",properties:Object.assign({},Ie.properties),additionalProperties:!1,default:{hide:!1}},report:{type:"object",properties:Object.assign({tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"}},Ie.properties),additionalProperties:!1,default:{hide:!1}},expand:{type:"object",properties:Object.assign({},Ie.properties),additionalProperties:!1,default:{hide:!1}},collapse:{type:"object",properties:Object.assign({},Ie.properties),additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1},Ei={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"},default:["image","links"]},partialsFolders:{type:"array",items:{type:"string"},default:["_partials"]},lastUpdatedBlock:{type:"object",properties:Object.assign({format:{type:"string",enum:["timeago","iso","long","short"],default:"timeago"},locale:{type:"string"}},Ie.properties),additionalProperties:!1,default:{}},toc:{type:"object",properties:Object.assign({header:{type:"string",default:"On this page"},depth:{type:"integer",default:3,minimum:1}},Ie.properties),additionalProperties:!1,default:{}},editPage:{type:"object",properties:Object.assign({baseUrl:{type:"string"}},Ie.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},Wn=Object.assign(Object.assign({},yi),{properties:Object.assign(Object.assign({},yi.properties),ed.properties)}),Ty={type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},xy={type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},wy={type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},ky={type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},Ay={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},qy={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},Ny={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},Qs={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},Oy={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:Qs}},additionalProperties:!1,required:["trackingId"]},Mi={type:"object",properties:{adobe:Ty,amplitude:xy,fullstory:wy,heap:ky,rudderstack:Ay,segment:qy,gtm:Ny,ga:Oy}},ji={type:"object",properties:Object.assign({items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0},default:[]},hideLoginButton:{type:"boolean"}},Ie.properties),additionalProperties:!1},Ii={type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},Li={type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"}},additionalProperties:!1,default:{}}}},additionalProperties:!1},Ey={type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"],default:"checkboxes"},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}},My={type:"object",additionalProperties:!0,required:["slug","items"],properties:{slug:{type:"string"},filters:{type:"array",items:Ey},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:Gs,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}},Hn={type:"object",patternProperties:{".*":My}},Fi={type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean",default:!1},teamMetadataProperty:{type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{type:"array",items:{type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},extends:{type:"array",items:{type:"string"}},rules:{type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}}},additionalProperties:!1}},targets:{type:"array",items:{type:"object",required:["where"],properties:{minimumLevel:{type:"string"},rules:{type:"object",additionalProperties:!0},where:{type:"object",required:["metadata"],properties:{metadata:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:"array",items:{type:"string"}}}};var tt={type:"object",properties:{imports:{type:"array",items:{type:"string"}},logo:Di,navbar:Ri,products:Si,footer:Ti,sidebar:xi,scripts:wi,links:ki,feedback:Xt,search:Ai,colorMode:qi,navigation:Ni,codeSnippet:Oi,markdown:Ei,openapi:Wn,graphql:Fn,analytics:Mi,userMenu:ji,versionPicker:Ii,breadcrumbs:Li,catalog:Hn,catalogClassic:Hn,scorecard:Fi},additionalProperties:!0},YD=Object.assign(Object.assign({},tt),{additionalProperties:!1});var Xs="https://redocly.com/sso/teams",Bn;(function(e){e.OIDC="OIDC",e.SAML2="SAML2"})(Bn||(Bn={}));var zn;(function(e){e.SERVICE_ACCOUNT="SERVICE_ACCOUNT",e.OAUTH2="OAUTH2"})(zn||(zn={}));var Js;(function(e){e.STACKED="stacked",e.THREE_PANEL="three-panel"})(Js||(Js={}));function Ui(e,t){return Object.fromEntries(Object.entries(e).map(([n,r])=>{if(n!==t)return typeof r!="object"||!r?[n,r]:Array.isArray(r)?[n,r.map(i=>typeof i=="object"?Ui(i,t):i)]:[n,Ui(r,t)]}).filter(Boolean))}var jy={type:"object",additionalProperties:{type:"string"}},Iy={type:"object",additionalProperties:!1,patternProperties:{"^[a-zA-Z0-9_-]+$":{type:"string",pattern:"^https?://[^\\s/$.?#].[^\\s]*$"}}},Wi={type:"string",enum:["error","warn","off"]},Ly={type:"object",additionalProperties:!1,properties:{schemaCheck:Wi,statusCodeCheck:Wi,contentTypeCheck:Wi,successCriteriaCheck:Wi}},Fy={type:"object",properties:{event:{type:"string",enum:["schedule"]},interval:{type:"string",enum:["1m","2m","5m","10m","15m","30m","1h","3h","6h","12h","1d","7d"]}},required:["event"],additionalProperties:!1},Uy={type:"object",properties:{event:{type:"string",enum:["build"]}},required:["event"],additionalProperties:!1},nd={type:"object",properties:{ignoreLint:{oneOf:[{type:"boolean",default:!1},{type:"object",additionalProperties:{type:"boolean"}}]},ignoreLinkChecker:{type:"boolean"},ignoreMarkdocErrors:{type:"boolean"},jobs:{type:"array",items:{type:"object",properties:{path:{type:"string",pattern:"^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$"},agent:{type:"string",enum:["respect"]},trigger:{oneOf:[Fy,Uy]},inputs:jy,servers:Iy,severity:Ly},required:["path","trigger","agent"],additionalProperties:!1}}},additionalProperties:!1};var Wy={type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},Hy={type:"object",properties:{type:{type:"string",const:Bn.OIDC},title:{type:"string"},pkce:{type:"boolean",default:!1},configurationUrl:{type:"string",minLength:1},configuration:Wy,clientId:{type:"string",minLength:1},clientSecret:{type:"string",minLength:0},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},By={type:"object",properties:{type:{type:"string",const:Bn.SAML2},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string",default:Xs},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},zy={oneOf:[Hy,By],discriminator:{propertyName:"type"}},Vy={type:"object",additionalProperties:zy},$y={oneOf:[{type:"array",items:{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]},uniqueItems:!0},{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]}]},Yy={type:"object",properties:{to:{type:"string"},type:{type:"number",default:301}},additionalProperties:!1},Ky={type:"object",additionalProperties:Yy,default:{}},sd={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}},ta={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:{type:"object",additionalProperties:!0},openapi:Wn,graphql:Fn,theme:{type:"object",properties:{openapi:Wn,graphql:Fn},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},rules:sd,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},extends:{type:"array",items:{type:"string"}}},required:["root"]},Gy={type:"object",additionalProperties:!0},Qy={type:"object",additionalProperties:{type:"object",additionalProperties:!0}},rd={type:"object",properties:{hide:{type:"boolean",default:!1},title:{type:"string"},description:{type:"string"},details:{type:"object",properties:{path:{type:"string"},content:{type:"string"}},additionalProperties:!1},excludeFiles:{type:"array",items:{type:"string"},default:[]},sections:{type:"array",items:{type:"object",properties:{title:{type:"string"},description:{type:"string"},includeFiles:{type:"array",items:{type:"string"},default:[]},excludeFiles:{type:"array",items:{type:"string"},default:[]}},required:["title"],additionalProperties:!1}}},default:{hide:!1,title:void 0,description:void 0,details:void 0,sections:[{title:"Table of contents",includeFiles:["**/*"],excludeFiles:[]}]},additionalProperties:!1},id={type:"object",properties:{title:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}},llmstxt:rd},default:{llmstxt:rd.default},additionalProperties:!1},Jy={type:"object",properties:{folders:{type:"array",items:{type:"string"}}},additionalProperties:!1},bn={type:"object",additionalProperties:{type:"string"}},ad={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:bn,cms:bn,reunite:bn,features:{type:"object",properties:{aiSearch:bn},additionalProperties:!1},content:{type:"object",properties:{"**":bn},additionalProperties:bn}},additionalProperties:bn},Xy={type:"object",properties:{static:{type:"string"}},additionalProperties:!1,required:["static"]},Zy={type:"object",properties:{idp:{type:"string"}},additionalProperties:!1,required:["idp"]},eb={type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},stage:{type:"string",default:"non-production"},auth:{oneOf:[Xy,Zy]}},additionalProperties:!1,required:["type","apiBaseUrl"]},tb={type:"object",properties:{type:{type:"string",const:zn.OAUTH2},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},nb={type:"object",properties:{type:{type:"string",const:zn.SERVICE_ACCOUNT},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]},Zs={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string",default:"non-production"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},auth:{type:"object",oneOf:[tb,nb],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},rb=Object.assign(Object.assign({},Zs),{properties:Object.assign(Object.assign({},Zs.properties),{type:{type:"string",const:"APIGEE_EDGE"}})}),ib={type:"object",oneOf:[Zs,rb,eb],discriminator:{propertyName:"type"}},ob={type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:ib}}},od={type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},sb={type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]},ea={type:"object",properties:{imports:{type:"array",items:{type:"string"}},licenseKey:{type:"string"},redirects:Ky,seo:id,rbac:ad,apiFunctions:Jy,requiresLogin:{type:"boolean"},responseHeaders:{type:"object",additionalProperties:{type:"array",items:sb}},mockServer:{type:"object",properties:{off:{type:"boolean",default:!1},position:{type:"string",enum:["first","last","replace","off"],default:"first"},strictExamples:{type:"boolean",default:!1},errorIfForcedExampleNotFound:{type:"boolean",default:!1},description:{type:"string"}}},apis:{type:"object",additionalProperties:ta},extends:{type:"array",items:{type:"string"}},rules:sd,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},ssoDirect:Vy,sso:$y,residency:{type:"string"},developerOnboarding:ob,removeAttribution:{type:"boolean"},i18n:od,l10n:od,metadata:Gy,metadataGlobs:Qy,ignore:{type:"array",items:{type:"string"}},theme:tt,reunite:nd,logo:Di,navbar:Ri,products:Si,footer:Ti,sidebar:xi,scripts:wi,links:ki,feedback:Xt,search:Ai,colorMode:qi,navigation:Ni,codeSnippet:Oi,markdown:Ei,openapi:Wn,graphql:Fn,analytics:Mi,userMenu:ji,versionPicker:Ii,breadcrumbs:Li,catalog:Hn,catalogClassic:Hn,scorecard:Fi},default:{redirects:{},seo:id.default},additionalProperties:!0},ab=Object.assign(Object.assign({},Ui(ea,"default")),{additionalProperties:!1}),na=Object.assign(Object.assign({$id:"root-redocly-config"},ea),{properties:Object.assign(Object.assign({plugins:{type:"array",items:{type:"string"}}},ea.properties),{env:{type:"object",additionalProperties:ab}}),default:{},additionalProperties:!1});var ra={type:"object",properties:{logo:tt.properties.logo,navbar:tt.properties.navbar,footer:tt.properties.footer,sidebar:tt.properties.sidebar,search:tt.properties.search,codeSnippet:tt.properties.codeSnippet,breadcrumbs:tt.properties.breadcrumbs,openapi:tt.properties.openapi,feedback:tt.properties.feedback,analytics:{type:"object",properties:{ga:Qs}}},additionalProperties:!0,default:{}},cb={$id:"product-config-override",type:"object",properties:Object.assign(Object.assign({},ra.properties),{apis:{type:"object",additionalProperties:ta},theme:ra}),additionalProperties:!1};var Ke=Ge(an(),1);import{getLineColLocation as S_,lintDocument as T_,makeDocumentFromString as Kc,lintConfig as x_,detectSpec as w_,getMergedConfig as k_,createConfigTypes as A_}from"@redocly/openapi-core";import{bundleDocument as v_,makeDocumentFromString as C_}from"@redocly/openapi-core";var fp=new Map,jo=new Map;function P_(e){return e?Array.from(e).map(([t,n])=>[t,Is(n)]):[]}async function $c(e,t){let{config:n}=await In(),r=new Ut(n.resolve),i=C_(e.getText(),e.uri),{bundle:o,problems:s,fileDependencies:u,rootType:c,refTypes:p}=await v_({document:i,config:n.styleguide,externalRefResolver:r}),g=P_(p);p&&(jo=new Map([...jo,...p])),fp.set(e.uri,{uri:e.uri,name:qn(e.uri),definition:o.parsed,rootType:c,refTypes:g,errors:t})}function __(){return Array.from(fp).map(([e,{definition:t,rootType:n,refTypes:r,errors:i}])=>({name:qn(e),uri:e,definition:t,rootType:n,refTypes:r,errors:i}))}function Yc(e){return jo.has(e)?jo.get(e):null}import{createConfig as D_,lintDocument as R_}from"@redocly/openapi-core";async function pp(e,t,n,r){let i=[];for(let o of n?.levels||[]){let s=await D_(o,{configPath:r}),u=await R_({document:e,externalRefResolver:t,config:s.styleguide});i.push(...u.filter(({ignored:c})=>!c).map(c=>({...c,scorecardLevel:o.name})))}return i}var q_=800,N_=5,Qc=El(M_,q_);async function O_(e){let t=e.map(({documentPath:i})=>Ne(i).toString()),{config:n}=await In(),r=await qe.getRootWorkspaceFolderURI();for(let{root:i}of Object.values(n.apis)){let o=await Ls(i,r);if(t.includes(o))return o}return t[0]}var Gc;function E_(e){try{return w_(e),!0}catch{return!1}}async function M_(e){let t=e.uri,{config:n,rootConfigDocument:r,configPath:i}=await In();if(vr(An(t))){let o=Ys(t)?Kc(e.getText(),t):Kc(r?.source.body||"",r?.source.absoluteRef||""),s=new Ut,u=await x_({document:o,externalRefResolver:s,config:n,externalConfigTypes:A_(na,n)}),c=[{uri:e.uri,diagnostics:[]}];return gp(u,c),c}else{let o=Bl(t),s=await O_(o||[]);s&&(e=await st(s),t=s);let u;try{u=Kc(e.getText(),t)}catch{return[{uri:e.uri,diagnostics:[]}]}if(!E_(u.parsed))return[{uri:e.uri,diagnostics:[]}];let c=[];try{let p=new Ut(n.resolve);Gc=e.uri;let g=await qe.getRootWorkspaceFolderURI(),b=await jl(n.apis,Gc,g),D=Date.now(),R=(await T_({document:u,config:k_(n,b).styleguide,externalRefResolver:p})).filter(({ignored:N})=>!N),T=r?.parsed?.scorecard,q=T&&qe.scorecardEnabled?await pp(u,p,T,i):[],B=[...R,...q];Gc="";let I=F_(R);$c(e,I);let _=Date.now()-D;c=[...new Set([e.uri,...[...p.getFiles()].map(N=>Ne(N).toString())])].map(N=>({uri:N,diagnostics:[]})),Hl(t,{dependencyPaths:p.getFiles(),durationMS:_}),gp(B,c)}catch(p){j_(e.uri,p,c)}return c}}function Io(){return qe.documents.all().map(Qc)}function j_(e,t,n){let r=n||[{uri:e,diagnostics:[]}];if(t.line&&t.col&&t.message){let i=t.source?.absoluteRef?Ne(t.source.absoluteRef).toString():e,o=t.line-1,s=t.col-1,u=Ke.Position.create(o,s),c=Ke.Diagnostic.create(Ke.Range.create(u,u),t.message,Ke.DiagnosticSeverity.Error);mp(i,c,r)}else t.message.includes("This doesn\u2019t look like an OpenAPI document")||console.error(t);return r}function mp(e,t,n){let r=n.find(i=>i.uri===e);return r||(r={uri:e,diagnostics:[]},n.push(r)),r.diagnostics.push(t),n}function I_(e){return e.suggest.length===0?"":e.suggest.length===1?`
|
|
73
|
+
`);return n[0]}),this.registerRootWorkspaceFolderURIGetter(async()=>"")}registerFileSystemProvider(t){this._fs=t}registerDocumentsProvider(t){this._documentManager=t}registerConfigFinder(t){this._findConfig=t}registerRootWorkspaceFolderURIGetter(t){this._getRootWorkspaceFolderURI=t}get fs(){if(!this._fs)throw new Error("FileSystemProvider not registered.");return this._fs}get documents(){if(!this._documentManager)throw new Error("DocumentsProvider not registered.");return this._documentManager}get findConfig(){return this._findConfig}get getRootWorkspaceFolderURI(){return this._getRootWorkspaceFolderURI}enableScorecard(t){this._scorecardEnabled=t}get scorecardEnabled(){return this._scorecardEnabled}},Ce=new bs;function Dl(e,t){return ne.resolvePath(De(e)).toString()===ne.resolvePath(De(t)).toString()}function De(e){return At.parse(e)}function bn(e){return At.parse(e).fsPath}function lr(e){let t=["https","http"],{scheme:n}=At.parse(e);return t.includes(n)}function vn(e){return ne.basename(De(e))}async function Rl(e,t="/"){let n=ne.resolvePath(De(t));for(;e.path!=="/";)try{(await Ce.fs.stat(ne.resolvePath(n,e.path))).isDirectory()||(e=ne.dirname(e));break}catch{e=ne.dirname(e)}return e}import{BaseResolver as mx,Source as cp,readFileFromUrl as yx}from"@redocly/openapi-core";var si=Ie(hr(),1);import{isAbsoluteUrl as fx}from"@redocly/openapi-core";function Jd(e,t=100,n=!1){let r=new Map,i=new Map;function o(a,c,l){let p=i.get(a.uri),m=p?Date.now()-p:0;try{m<t&&m>=0?r.set(a.uri,setTimeout(()=>o(a,c,l),t-m)):(r.delete(a.uri),i.delete(a.uri),n||c(e(a)))}catch(P){l(P)}}function s(a){let c=r.get(a.uri),l=n&&!c;return i.set(a.uri,Date.now()),new Promise((p,m)=>{c||r.set(a.uri,setTimeout(()=>o(a,p,m),t)),l&&p(e(a))})}return s}function Gs(e){let t=new Set,n=r=>Array.isArray(n)?r.map(n):typeof r=="object"&&r!==null?t.has(r)?void 0:(t.add(r),Object.fromEntries(Object.entries(r).map(([i,o])=>[i,n(o)]))):r;return n(e)}function Xd(e){return e==="$ref"}async function Ks(e,t){let n=At.parse(t);return ne.joinPath(n,e).toString()}async function Zd(e,t,n){for(let[r,{root:i}]of Object.entries(e))if(await Ks(i,n)===t)return r}function ep(e){return typeof e=="string"}function ai(e){return typeof e=="function"}function tp(e){return e?.kind===si.Kind.MAP}function Qs(e){return e?.kind===si.Kind.MAPPING}function Js(e){return e?.kind===si.Kind.SEQ}function mr(e,t){let n=t.singleQuoted?"'":'"';return`${n}${e}${n}`}function Xs(e){return fx(e)||e.startsWith("file://")}var ci=class e{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let i=ip(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let a=Math.max(i.start.line,0),c=Math.max(i.end.line,0),l=this._lineOffsets,p=np(r.text,!1,o);if(c-a===p.length)for(let P=0,b=p.length;P<b;P++)l[P+a+1]=p[P];else p.length<1e4?l.splice(a+1,c-a,...p):this._lineOffsets=l=l.slice(0,a+1).concat(p,l.slice(c+1));let m=r.text.length-(s-o);if(m!==0)for(let P=a+1+p.length,b=l.length;P<b;P++)l[P]=l[P]+m}else if(e.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=np(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return t=this.ensureBeforeEOL(t,n[o]),{line:o,character:t-n[o]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let i=t.line+1<n.length?n[t.line+1]:this._content.length,o=Math.min(r+t.character,i);return this.ensureBeforeEOL(o,r)}ensureBeforeEOL(t,n){for(;t>n&&rp(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},ui;(function(e){function t(i,o,s,a){return new ci(i,o,s,a)}e.create=t;function n(i,o,s){if(i instanceof ci)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,o){let s=i.getText(),a=Zs(o.map(gx),(p,m)=>{let P=p.range.start.line-m.range.start.line;return P===0?p.range.start.character-m.range.start.character:P}),c=0,l=[];for(let p of a){let m=i.offsetAt(p.range.start);if(m<c)throw new Error("Overlapping edit");m>c&&l.push(s.substring(c,m)),p.newText.length&&l.push(p.newText),c=i.offsetAt(p.range.end)}return l.push(s.substr(c)),l.join("")}e.applyEdits=r})(ui||(ui={}));function Zs(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Zs(r,t),Zs(i,t);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;)t(r[o],i[s])<=0?e[a++]=r[o++]:e[a++]=i[s++];for(;o<r.length;)e[a++]=r[o++];for(;s<i.length;)e[a++]=i[s++];return e}function np(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);rp(o)&&(o===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function rp(e){return e===13||e===10}function ip(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function gx(e){let t=ip(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var op=new Map;function sp(e,t){return op.set(e,t)}function ap(e){let t=[];for(let[n,r]of op.entries())r.dependencyPaths.has(e)&&t.push({documentPath:n,durationMS:r.durationMS});return t}async function Xe(e){let t=Ce.documents.get(e);if(t)return t;let n=await Ce.fs.readFile(De(e),"utf-8");return ui.create(e,"yaml",1,n)}function ea(e){return xs.filePattern.test(e)}function hx(e){return vs.filePattern.test(e)}var Dt=class extends mx{resolveExternalRef(t,n){return Xs(n)?n:t&&Xs(t)?new URL(n,t).href:t?ne.resolvePath(ne.dirname(De(t)),n).toString():n}async loadExternalRef(t){if(lr(t)){let{body:n,mimeType:r}=await yx(t,{...this.config.http,customFetch:fetch});return new cp(t,n,r)}return new cp(t,(await Xe(t)).getText())}};var yr,li,ta,up;async function na(e){let t=new Dt,n=e?await Ce.findConfig(e):void 0;return yr=await bx({configPath:n,externalRefResolver:t,processRawConfig:async({document:r,resolvedRefMap:i})=>{ta=i,up=r}}),yr}async function Rn(){return yr||await na(),{config:yr,configPath:li,rootConfigDocument:up}}async function lp(e,t){try{return li=e?await Ce.findConfig(e):void 0,li?await na(li):yr}catch(n){return t?.createEventHandleLoadConfigError?.(n?.message),na()}}function br(e){return ia(e)?!0:!!ta&&[...ta.keys()].map(n=>n.split("::")?.[1]?.split("#")[0]).some(n=>Dl(vn(e),n))}function ia(e){return ra.includes(vn(e))}var dp={hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},vr={type:"object",properties:dp,additionalProperties:!1},vx={type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},placeholder:{type:"string"}},additionalProperties:!1},Et={type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:Object.assign(Object.assign({},dp),{like:vr,dislike:vr,satisfied:vr,neutral:vr,dissatisfied:vr}),additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1},optionalEmail:vx},additionalProperties:!1}},additionalProperties:!1};var Sn={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},xx={type:"object",properties:{name:{type:"string"},items:Sn,queries:Sn,mutations:Sn,subscriptions:Sn,types:Sn,directives:Sn},required:["name"],additionalProperties:!1},Px={type:"object",properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:xx},otherItemsGroupName:{type:"string"}},required:["requireExactGroups","groups","otherItemsGroupName"],additionalProperties:!1},wn={type:"object",properties:{hidePaginationButtons:{type:"boolean"},menu:{type:"object",properties:Object.assign({},Px.properties),additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},samplesMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:Et},additionalProperties:!1};var _x={type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string",examples:["curl","JavaScript","Node.js","Python","Java8+Apache","Java","C#","C#+Newtonsoft","PHP","Go","Ruby","R","Payload"]},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},required:["languages"],additionalProperties:!1},Cx={type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},di={type:"object",properties:{licenseKey:{type:"string"},hideLoading:{type:"boolean"},disableRouter:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:Et,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string",nullable:!0},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:Cx,onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:_x,ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"}},additionalProperties:!1};var Dx={type:"object",properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},Rx={type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},pp={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},Sx={type:"object",properties:{beforeInfo:{type:"array",items:pp},end:{type:"array",items:pp}}},on={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},pi={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},wx={type:"object",properties:mi(on.properties,["light","dark"])},Tx={type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},kx={type:"object",properties:{error:pi,info:pi,redirect:pi,success:pi}},Ax={type:"object",properties:Tn(on.properties,["dark"])},Ox={type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},Nx={type:"object",properties:{accent:on,border:wx,error:on,http:Tx,primary:on,responses:kx,secondary:Ax,success:on,text:Ox,tonalOffset:{type:"number"},warning:on}},fi={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},qx={type:"object",properties:{small:fi,medium:fi,large:fi,xlarge:fi}},gt={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},Ex={type:"object",properties:Object.assign(Object.assign({},Tn(gt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:qx})},fp={type:"object",properties:mi(gt.properties,["fontSize","lineHeight"])},jx={type:"object",properties:{medium:fp,small:fp}},Mx={type:"object",properties:Object.assign(Object.assign({},Tn(gt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:jx})},Lx={type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},Ix={type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},gp={type:"object",properties:{fullWidth:{type:"boolean"}}},Fx={type:"object",properties:{buttons:Ex,httpBadges:Mx,layoutControls:Lx,panels:Ix,tryItButton:gp,tryItSendButton:gp}},hi={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},Ux={type:"object",properties:{maxWidth:hi}},Wx={type:"object",properties:{maxWidth:hi,middlePanelMaxWidth:hi}},Bx={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:Ux,"three-panel":Wx}},hp={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},Hx={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:hp,defaultDetailsWidth:{type:"string"},examples:hp,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},yp={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},zx={type:"object",properties:mi(yp.properties,["textTransform"])},$x={type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},Vx={type:"object",properties:Object.assign(Object.assign({},Tn(gt.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:yp,level1items:zx,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:$x,textColor:{type:"string"},width:{type:"string"}})},gi={type:"object",properties:Object.assign(Object.assign({},gt.properties),{color:{type:"string"},transform:{type:"string"}})},Yx={type:"object",properties:Object.assign(Object.assign({},gt.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},Gx={type:"object",properties:Tn(gt.properties,["fontSize"])},Kx={type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},Qx={type:"object",properties:Object.assign(Object.assign({code:Yx,fieldName:gt},mi(gt.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:gi,heading2:gi,heading3:gi,headings:Gx,lineHeight:{type:"string"},links:Kx,optimizeSpeed:{type:"boolean"},rightPanelHeading:gi,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},Jx={type:"object",properties:Object.assign({color:{type:"string"}},Tn(gt.properties,["fontWeight"]))},Xx={type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:Jx}},Zx={type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},eP={type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},mp={type:"object",properties:{custom:{type:"string"}}},tP={type:"object",properties:{DownloadButton:mp,NextSectionButton:mp}},nP={type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},rP={type:"object",properties:{borderRadius:{type:"string"}}},iP={type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},oP={type:"object",properties:{breakpoints:hi,codeBlock:Xx,colors:Nx,components:Fx,layout:Bx,logo:Zx,fab:eP,overrides:tP,rightPanel:nP,schema:Hx,shape:rP,sidebar:Vx,spacing:iP,typography:Qx,links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},sP={type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:Dx}},required:["languages"]},bp={type:"object",properties:{theme:oP,ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:sP,generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:Rx,menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:Sx,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only","path-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:!1};function mi(e,t){return Object.fromEntries(t.filter(n=>n in e).map(n=>[n,e[n]]))}function Tn(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}var ke={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},vp={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},oa={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean",default:!1},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"top"},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}},rbac:{type:"object",additionalProperties:{type:"string"}}}},sa={type:"array",items:Object.assign(Object.assign({},oa),{properties:Object.assign(Object.assign({},oa.properties),{items:{type:"array",items:oa}})})},aP={type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]},cP={type:"object",properties:{hide:{type:"boolean",default:!1},suggestions:{default:[],type:"array",items:{type:"string"}},prompt:{type:"string"}},additionalProperties:!1},uP={type:"array",items:{type:"object",required:["name","field","type"],properties:{name:{type:"string"},field:{type:"string"},type:{type:"string",enum:["multi-select","select","tags"]}},additionalProperties:!1}},lP={type:"object",properties:Object.assign({facets:uP},ke.properties),additionalProperties:!1},dP={type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]},yi={type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},bi={type:"object",properties:Object.assign({items:sa},ke.properties),additionalProperties:!1},vi={type:"object",additionalProperties:aP},xi={type:"object",properties:Object.assign({items:sa,copyrightText:{type:"string"},logo:ke},ke.properties),additionalProperties:!1},Pi={type:"object",properties:Object.assign({separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"bottom"}},ke.properties),additionalProperties:!1},_i={type:"object",properties:{head:{type:"array",items:vp},body:{type:"array",items:vp}},additionalProperties:!1},Ci={type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},Di={type:"object",properties:Object.assign({engine:{type:"string",enum:["flexsearch","typesense"],default:"flexsearch"},ai:cP,filters:lP,placement:{type:"string",default:"navbar"},shortcuts:{type:"array",items:{type:"string"},default:["\u2318+K,ctrl+K"]},suggestedPages:{type:"array",items:dP}},ke.properties),additionalProperties:!1},Ri={type:"object",properties:Object.assign({ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"},default:["light","dark"]}},ke.properties),additionalProperties:!1},Si={type:"object",properties:{nextButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Next page"}},ke.properties),additionalProperties:!1,default:{}},previousButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Previous page"}},ke.properties),additionalProperties:!1,default:{}}},additionalProperties:!1},wi={type:"object",properties:{elementFormat:{type:"string",default:"icon"},copy:{type:"object",properties:Object.assign({},ke.properties),additionalProperties:!1,default:{hide:!1}},report:{type:"object",properties:Object.assign({tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"}},ke.properties),additionalProperties:!1,default:{hide:!1}},expand:{type:"object",properties:Object.assign({},ke.properties),additionalProperties:!1,default:{hide:!1}},collapse:{type:"object",properties:Object.assign({},ke.properties),additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1},Ti={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"},default:["image","links"]},partialsFolders:{type:"array",items:{type:"string"},default:["_partials"]},lastUpdatedBlock:{type:"object",properties:Object.assign({format:{type:"string",enum:["timeago","iso","long","short"],default:"timeago"},locale:{type:"string"}},ke.properties),additionalProperties:!1,default:{}},toc:{type:"object",properties:Object.assign({header:{type:"string",default:"On this page"},depth:{type:"integer",default:3,minimum:1}},ke.properties),additionalProperties:!1,default:{}},editPage:{type:"object",properties:Object.assign({baseUrl:{type:"string"}},ke.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},kn=Object.assign(Object.assign({},di),{properties:Object.assign(Object.assign({},di.properties),bp.properties)}),pP={type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},fP={type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},gP={type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},hP={type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},mP={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},yP={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},bP={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},aa={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},vP={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:aa}},additionalProperties:!1,required:["trackingId"]},ki={type:"object",properties:{adobe:pP,amplitude:fP,fullstory:gP,heap:hP,rudderstack:mP,segment:yP,gtm:bP,ga:vP}},Ai={type:"object",properties:Object.assign({items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0},default:[]},hideLoginButton:{type:"boolean"}},ke.properties),additionalProperties:!1},Oi={type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},Ni={type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"}},additionalProperties:!1,default:{}}}},additionalProperties:!1},xP={type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"],default:"checkboxes"},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}},PP={type:"object",additionalProperties:!0,required:["slug","items"],properties:{slug:{type:"string"},filters:{type:"array",items:xP},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:sa,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}},An={type:"object",patternProperties:{".*":PP}},qi={type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean",default:!1},teamMetadataProperty:{type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{type:"array",items:{type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},extends:{type:"array",items:{type:"string"}},rules:{type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}}},additionalProperties:!1}},targets:{type:"array",items:{type:"object",required:["where"],properties:{minimumLevel:{type:"string"},rules:{type:"object",additionalProperties:!0},where:{type:"object",required:["metadata"],properties:{metadata:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:"array",items:{type:"string"}}}};var Ye={type:"object",properties:{imports:{type:"array",items:{type:"string"}},logo:yi,navbar:bi,products:vi,footer:xi,sidebar:Pi,scripts:_i,links:Ci,feedback:Et,search:Di,colorMode:Ri,navigation:Si,codeSnippet:wi,markdown:Ti,openapi:kn,graphql:wn,analytics:ki,userMenu:Ai,versionPicker:Oi,breadcrumbs:Ni,catalog:An,catalogClassic:An,scorecard:qi},additionalProperties:!0},CR=Object.assign(Object.assign({},Ye),{additionalProperties:!1});var ua="https://redocly.com/sso/teams",On;(function(e){e.OIDC="OIDC",e.SAML2="SAML2"})(On||(On={}));var Nn;(function(e){e.SERVICE_ACCOUNT="SERVICE_ACCOUNT",e.OAUTH2="OAUTH2"})(Nn||(Nn={}));var ca;(function(e){e.STACKED="stacked",e.THREE_PANEL="three-panel"})(ca||(ca={}));function Ei(e,t){return Object.fromEntries(Object.entries(e).map(([n,r])=>{if(n!==t)return typeof r!="object"||!r?[n,r]:Array.isArray(r)?[n,r.map(i=>typeof i=="object"?Ei(i,t):i)]:[n,Ei(r,t)]}).filter(Boolean))}var _P={type:"object",additionalProperties:{type:"string"}},CP={type:"object",additionalProperties:!1,patternProperties:{"^[a-zA-Z0-9_-]+$":{type:"string",pattern:"^https?://[^\\s/$.?#].[^\\s]*$"}}},ji={type:"string",enum:["error","warn","off"]},DP={type:"object",additionalProperties:!1,properties:{schemaCheck:ji,statusCodeCheck:ji,contentTypeCheck:ji,successCriteriaCheck:ji}},RP={type:"object",properties:{event:{type:"string",enum:["schedule"]},interval:{type:"string",enum:["1m","2m","5m","10m","15m","30m","1h","3h","6h","12h","1d","7d"]}},required:["event"],additionalProperties:!1},SP={type:"object",properties:{event:{type:"string",enum:["build"]}},required:["event"],additionalProperties:!1},xp={type:"object",properties:{ignoreLint:{oneOf:[{type:"boolean",default:!1},{type:"object",additionalProperties:{type:"boolean"}}]},ignoreLinkChecker:{type:"boolean"},ignoreMarkdocErrors:{type:"boolean"},jobs:{type:"array",items:{type:"object",properties:{path:{type:"string",pattern:"^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$"},agent:{type:"string",enum:["respect"]},trigger:{oneOf:[RP,SP]},inputs:_P,servers:CP,severity:DP},required:["path","trigger","agent"],additionalProperties:!1}}},additionalProperties:!1};var wP={type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},TP={type:"object",properties:{type:{type:"string",const:On.OIDC},title:{type:"string"},pkce:{type:"boolean",default:!1},configurationUrl:{type:"string",minLength:1},configuration:wP,clientId:{type:"string",minLength:1},clientSecret:{type:"string",minLength:0},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},kP={type:"object",properties:{type:{type:"string",const:On.SAML2},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string",default:ua},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},AP={oneOf:[TP,kP],discriminator:{propertyName:"type"}},OP={type:"object",additionalProperties:AP},NP={oneOf:[{type:"array",items:{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]},uniqueItems:!0},{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]}]},qP={type:"object",properties:{to:{type:"string"},type:{type:"number",default:301}},additionalProperties:!1},EP={type:"object",additionalProperties:qP,default:{}},Dp={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}},pa={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:{type:"object",additionalProperties:!0},openapi:kn,graphql:wn,theme:{type:"object",properties:{openapi:kn,graphql:wn},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},rules:Dp,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},extends:{type:"array",items:{type:"string"}}},required:["root"]},jP={type:"object",additionalProperties:!0},MP={type:"object",additionalProperties:{type:"object",additionalProperties:!0}},Pp={type:"object",properties:{hide:{type:"boolean",default:!1},title:{type:"string"},description:{type:"string"},details:{type:"object",properties:{path:{type:"string"},content:{type:"string"}},additionalProperties:!1},excludeFiles:{type:"array",items:{type:"string"},default:[]},sections:{type:"array",items:{type:"object",properties:{title:{type:"string"},description:{type:"string"},includeFiles:{type:"array",items:{type:"string"},default:[]},excludeFiles:{type:"array",items:{type:"string"},default:[]}},required:["title"],additionalProperties:!1}}},default:{hide:!1,title:void 0,description:void 0,details:void 0,sections:[{title:"Table of contents",includeFiles:["**/*"],excludeFiles:[]}]},additionalProperties:!1},_p={type:"object",properties:{title:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}},llmstxt:Pp},default:{llmstxt:Pp.default},additionalProperties:!1},LP={type:"object",properties:{folders:{type:"array",items:{type:"string"}}},additionalProperties:!1},sn={type:"object",additionalProperties:{type:"string"}},Rp={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:sn,cms:sn,reunite:sn,features:{type:"object",properties:{aiSearch:sn},additionalProperties:!1},content:{type:"object",properties:{"**":sn},additionalProperties:sn}},additionalProperties:sn},IP={type:"object",properties:{static:{type:"string"}},additionalProperties:!1,required:["static"]},FP={type:"object",properties:{idp:{type:"string"}},additionalProperties:!1,required:["idp"]},UP={type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},stage:{type:"string",default:"non-production"},auth:{oneOf:[IP,FP]}},additionalProperties:!1,required:["type","apiBaseUrl"]},WP={type:"object",properties:{type:{type:"string",const:Nn.OAUTH2},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},BP={type:"object",properties:{type:{type:"string",const:Nn.SERVICE_ACCOUNT},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]},la={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string",default:"non-production"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},auth:{type:"object",oneOf:[WP,BP],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},HP=Object.assign(Object.assign({},la),{properties:Object.assign(Object.assign({},la.properties),{type:{type:"string",const:"APIGEE_EDGE"}})}),zP={type:"object",oneOf:[la,HP,UP],discriminator:{propertyName:"type"}},$P={type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:zP}}},Cp={type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},VP={type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]},da={type:"object",properties:{imports:{type:"array",items:{type:"string"}},licenseKey:{type:"string"},redirects:EP,seo:_p,rbac:Rp,apiFunctions:LP,requiresLogin:{type:"boolean"},responseHeaders:{type:"object",additionalProperties:{type:"array",items:VP}},mockServer:{type:"object",properties:{off:{type:"boolean",default:!1},position:{type:"string",enum:["first","last","replace","off"],default:"first"},strictExamples:{type:"boolean",default:!1},errorIfForcedExampleNotFound:{type:"boolean",default:!1},description:{type:"string"}}},apis:{type:"object",additionalProperties:pa},extends:{type:"array",items:{type:"string"}},rules:Dp,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},ssoDirect:OP,sso:NP,residency:{type:"string"},developerOnboarding:$P,removeAttribution:{type:"boolean"},i18n:Cp,l10n:Cp,metadata:jP,metadataGlobs:MP,ignore:{type:"array",items:{type:"string"}},theme:Ye,reunite:xp,logo:yi,navbar:bi,products:vi,footer:xi,sidebar:Pi,scripts:_i,links:Ci,feedback:Et,search:Di,colorMode:Ri,navigation:Si,codeSnippet:wi,markdown:Ti,openapi:kn,graphql:wn,analytics:ki,userMenu:Ai,versionPicker:Oi,breadcrumbs:Ni,catalog:An,catalogClassic:An,scorecard:qi},default:{redirects:{},seo:_p.default},additionalProperties:!0},YP=Object.assign(Object.assign({},Ei(da,"default")),{additionalProperties:!1}),fa=Object.assign(Object.assign({$id:"root-redocly-config"},da),{properties:Object.assign(Object.assign({plugins:{type:"array",items:{type:"string"}}},da.properties),{env:{type:"object",additionalProperties:YP}}),default:{},additionalProperties:!1});var ga={type:"object",properties:{logo:Ye.properties.logo,navbar:Ye.properties.navbar,footer:Ye.properties.footer,sidebar:Ye.properties.sidebar,search:Ye.properties.search,codeSnippet:Ye.properties.codeSnippet,breadcrumbs:Ye.properties.breadcrumbs,openapi:Ye.properties.openapi,feedback:Ye.properties.feedback,analytics:{type:"object",properties:{ga:aa}}},additionalProperties:!0,default:{}},GP={$id:"product-config-override",type:"object",properties:Object.assign(Object.assign({},ga.properties),{apis:{type:"object",additionalProperties:pa},theme:ga}),additionalProperties:!1};var Le=Ie(Yt(),1);import{getLineColLocation as t0,lintDocument as n0,makeDocumentFromString as ll,lintConfig as r0,detectSpec as i0,getMergedConfig as o0,createConfigTypes as s0}from"@redocly/openapi-core";import{bundleDocument as KC,makeDocumentFromString as QC}from"@redocly/openapi-core";var Bm=new Map,ns=new Map;function JC(e){return e?Array.from(e).map(([t,n])=>[t,Gs(n)]):[]}async function cl(e,t){let{config:n}=await Rn(),r=new Dt(n.resolve),i=QC(e.getText(),e.uri),{bundle:o,problems:s,fileDependencies:a,rootType:c,refTypes:l}=await KC({document:i,config:n.styleguide,externalRefResolver:r}),p=JC(l);l&&(ns=new Map([...ns,...l])),Bm.set(e.uri,{uri:e.uri,name:vn(e.uri),definition:o.parsed,rootType:c,refTypes:p,errors:t})}function XC(){return Array.from(Bm).map(([e,{definition:t,rootType:n,refTypes:r,errors:i}])=>({name:vn(e),uri:e,definition:t,rootType:n,refTypes:r,errors:i}))}function ul(e){return ns.has(e)?ns.get(e):null}import{createConfig as ZC,lintDocument as e0}from"@redocly/openapi-core";async function Hm(e,t,n,r){let i=[];for(let o of n?.levels||[]){let s=await ZC(o,{configPath:r}),a=await e0({document:e,externalRefResolver:t,config:s.styleguide});i.push(...a.filter(({ignored:c})=>!c).map(c=>({...c,scorecardLevel:o.name})))}return i}var a0=800,c0=5,pl=Jd(d0,a0);async function u0(e){let t=e.map(({documentPath:i})=>De(i).toString()),{config:n}=await Rn(),r=await Ce.getRootWorkspaceFolderURI();for(let{root:i}of Object.values(n.apis)){let o=await Ks(i,r);if(t.includes(o))return o}return t[0]}var dl;function l0(e){try{return i0(e),!0}catch{return!1}}async function d0(e){let t=e.uri,{config:n,rootConfigDocument:r,configPath:i}=await Rn();if(br(bn(t))){let o=ia(t)?ll(e.getText(),t):ll(r?.source.body||"",r?.source.absoluteRef||""),s=new Dt,a=await r0({document:o,externalRefResolver:s,config:n,externalConfigTypes:s0(fa,n)}),c=[{uri:e.uri,diagnostics:[]}];return zm(a,c),c}else{let o=ap(t),s=await u0(o||[]);s&&(e=await Xe(s),t=s);let a;try{a=ll(e.getText(),t)}catch{return[{uri:e.uri,diagnostics:[]}]}if(!l0(a.parsed))return[{uri:e.uri,diagnostics:[]}];let c=[];try{let l=new Dt(n.resolve);dl=e.uri;let p=await Ce.getRootWorkspaceFolderURI(),m=await Zd(n.apis,dl,p),P=Date.now(),b=(await n0({document:a,config:o0(n,m).styleguide,externalRefResolver:l})).filter(({ignored:S})=>!S),T=r?.parsed?.scorecard,I=T&&Ce.scorecardEnabled?await Hm(a,l,T,i):[],G=[...b,...I];dl="";let V=h0(b);cl(e,V);let h=Date.now()-P;c=[...new Set([e.uri,...[...l.getFiles()].map(S=>De(S).toString())])].map(S=>({uri:S,diagnostics:[]})),sp(t,{dependencyPaths:l.getFiles(),durationMS:h}),zm(G,c)}catch(l){p0(e.uri,l,c)}return c}}function rs(){return Ce.documents.all().map(pl)}function p0(e,t,n){let r=n||[{uri:e,diagnostics:[]}];if(t.line&&t.col&&t.message){let i=t.source?.absoluteRef?De(t.source.absoluteRef).toString():e,o=t.line-1,s=t.col-1,a=Le.Position.create(o,s),c=Le.Diagnostic.create(Le.Range.create(a,a),t.message,Le.DiagnosticSeverity.Error);$m(i,c,r)}else t.message.includes("This doesn\u2019t look like an OpenAPI document")||console.error(t);return r}function $m(e,t,n){let r=n.find(i=>i.uri===e);return r||(r={uri:e,diagnostics:[]},n.push(r)),r.diagnostics.push(t),n}function f0(e){return e.suggest.length===0?"":e.suggest.length===1?`
|
|
72
74
|
Did you mean: ${e.suggest[0]} ?`:`
|
|
73
75
|
Did you mean:
|
|
74
|
-
- ${e.suggest.slice(0,
|
|
75
|
-
- `)}`}function
|
|
76
|
-
Scorecard level: ${e.scorecardLevel}`:""}function gp(e,t){e.forEach(n=>{let r;switch(n.severity){case"error":r=Ke.DiagnosticSeverity.Error;break;case"warn":r=Ke.DiagnosticSeverity.Warning;break;default:r=Ke.DiagnosticSeverity.Warning}let i=S_(n.location[0]),o=Ne(i.source.absoluteRef).toString(),s=Ke.Position.create(i.start.line-1,i.start.col-1),u=i.end?Ke.Position.create(i.end.line-1,i.end.col-1):s,c=n.message+` Rule: ${n.ruleId}.`+I_(n)+L_(n),p=Ke.Diagnostic.create(Ke.Range.create(s,u),c,r,void 0,"Redocly OpenAPI");mp(o,p,t)})}function F_(e){return e.filter(({severity:t})=>t==="error").map(t=>({...t,location:t.location.map(n=>({...n,source:{...n.source,_ast:null}}))}))}var Yo=Ge(an(),1);var Pe=Ge(an(),1);function Ae(e,t){return e?t?Lo[e+"_"+t]||t:Lo[e]||Lo.Default:Lo.Default}var U_=["newLine","MediaTypeMap","PathMap","propertyName","newItem","Root_openapi","Root","Info","Root_info","Info_title","Info_summary","Info_description","Info_termsOfService","Info_contact","Contact_name","Contact_url","Contact_email","Info_license","License_name","License_identifier","License_url","Info_version","Root_jsonSchemaDialect","jsonSchemaDialect","Root_servers","Server_List","Server_url","Server_description","Server_variables","Root_paths","Root_webhooks","Root_components","Root_security","Root_tags","Root_externalDocs","LocalComponentCompletion","FolderCompletion","FileCompletion","Default"],Lo=U_.reduce((e,t,n)=>(e[t]=String.fromCharCode(n),e),{});var cn="newItem",Br="propertyName",or="newLine";function Fo(e){return!!(e?.name&&hp[e.name])}function Jc(e){return hp[e]||[]}var hp={[or]:[{label:"newLine",kind:Pe.CompletionItemKind.Constructor,data:{},sortText:Ae(or)}],[Br]:[{label:Br,kind:Pe.CompletionItemKind.Constructor,data:{properties:{}},sortText:Ae(Br)}],ServerVariable_Map:[{label:"newVariableName",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("ServerVariable_Map")}],ResponsesMap:[{label:"200",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"201",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"204",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"301",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"303",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"400",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"401",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"403",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"404",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"500",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"503",kind:Pe.CompletionItemKind.Property,data:{properties:{}}}],PathMap:[{label:"/newPath",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("PathMap")}],MediaTypeMap:[{label:"mime/type",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/json",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/octet-stream",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"multipart/form-data",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/x-www-form-urlencoded",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/xml",kind:Pe.CompletionItemKind.Property,data:[],sortText:Ae("MediaTypeMap")}]};var un=Ge(hr(),1);import{normalizeTypes as bp,Oas3Types as W_,Oas2Types as H_,Oas3_1Types as yp,AsyncApi2Types as B_,SpecVersion as rt,ConfigTypes as z_,getMajorSpecVersion as V_,Arazzo1Types as $_,AsyncApi3Types as Y_}from"@redocly/openapi-core";var Xc=new Map;async function K_(e,t){let n=await st(e),r=n.getText(),i=un.safeLoad(r,{filename:e.toString()}),{nodePath:o}=Uo({node:i,nodePath:[]},t,n,!0),s=Zc(i,e),{version:u}=eu(i),{currentType:c,parentType:p,endPath:g}=Wo(s,o),b=zr(i),D=c?.name?c:p;return{nodePath:o,endPath:g,type:D,existingValues:b,types:s,descriptionVersion:u}}function vp(e,t){if(!e)return null;let n=e,r=!0;return t.forEach(i=>{if(r=!1,Us(n)&&n.items&&n.items[i])n=n.items[i],r=!0;else if(Ll(n)){let o=Ho(n);for(let s of o)if(Fs(s)&&s.key?.value===i){n=s?.value,r=!0;break}}}),r?n:(console.warn("Cannot find node by path",t),null)}function G_(e,t){for(let n=0;n<t.length;n++)if(n===t.length-1||t[n+1]>e)return n;return t.length-1}function Uo(e,t,n,r=!1){let{node:i,nodePath:o=[]}=e,s=n.offsetAt(t),u=Ho(i);if(u.length===0||Q_(i)||!r&&J_(i,n,t))return e;let c=X_(u,s);return Uo({nodePath:Z_(o,i,u[c],c),node:u[c]},t,n,r)}function Q_(e){return e?.kind===un.Kind.MAPPING&&!e?.value}function J_(e,t,n){let r=t.getText({start:t.positionAt(t._lineOffsets[n.line]),end:n}),i=e0(e,t),o=r?.match(/^\s+/)?.[0]?.length||0;return(/^\s*[\w\-\$\/\{\}]+$/.test(r)?o:n.character)===i}function X_(e,t){for(let n=1;n<e.length;n++){let r=e[n];if(r&&r.startPosition>t)return n-1}return e.length-1}function Z_(e,t,n,r){return Us(t)?[...e,r]:Fs(n)&&n?.key?.value&&typeof n.key.value=="string"?[...e,n.key.value]:e}function e0(e,t){let n=e?.startPosition??0,r=G_(n,t._lineOffsets);if(r>=0){let i=t._lineOffsets[r];return n-i}return 0}function Wo(e,t){let n=e,r,i=new Array(t.length).fill(null);t.forEach((s,u)=>{let c;if(e?.name&&e?.name!==n?.name&&(n=e,r=s),e&&e?.properties&&!Object.keys(e?.properties).length&&e?.items?.properties)c=e.items;else if(e?.properties&&e.properties[s])c=e.properties[s],pi(c)&&(c=c(null,s));else if(e?.additionalProperties&&!pi(e?.additionalProperties))c=e.additionalProperties;else if(pi(e?.additionalProperties)&&s){let p=e.additionalProperties(null,s);p&&(c=p)}c&&(e=c,i[u]=c)}),e?.name&&n?.name&&e?.name!==n?.name&&(r=null);let o=i.every(s=>!!s);return{currentType:o||t[0]==="openapi"||t.length===0?e:null,parentType:o?n:null,endPath:r}}function Zc(e,t){if(vr(t))return bp(z_).ConfigRoot;let{types:n,isDefault:r}=n0(e);if(!e)return n;let i=r?Yc(t):n;return r&&!Yc(t)&&e?null:i||n}function t0(e){if(Xc.has(e))return Xc.get(e);let t=bp(r0(e)).Root;return Xc.set(e,t),t}function Cp(e){let t,n=!1;if(e?.kind===un.Kind.MAP)for(let r of e.mappings){let i=r.key?.value,o=String(r?.value?.value);if(i==="openapi"&&o.startsWith("3.1")){t=rt.OAS3_1;break}if(i==="openapi"&&o.startsWith("3.0")){t=rt.OAS3_0;break}if(i==="swagger"&&o==="2.0"){t=rt.OAS2;break}if(i==="asyncapi"&&o.startsWith("2."))return{version:rt.Async2,isDefault:!1};if(i==="asyncapi"&&o.startsWith("3."))return{version:rt.Async3,isDefault:!1};if(i==="arazzo")return{version:rt.Arazzo1,isDefault:!1}}return t||(t=rt.OAS3_1,n=!0),{version:t,isDefault:n}}function eu(e){let{version:t,isDefault:n}=Cp(e);return{version:V_(t),isDefault:n}}function n0(e){let{version:t,isDefault:n}=Cp(e);return{types:t0(t),isDefault:n}}function Ho(e){switch(e?.kind){case un.Kind.MAPPING:return[e.key,e.value];case un.Kind.MAP:return e.mappings;case un.Kind.SEQ:return e?.items;default:return[]}}function r0(e){switch(e){case rt.OAS3_1:return yp;case rt.OAS3_0:return W_;case rt.OAS2:return H_;case rt.Async2:return B_;case rt.Async3:return Y_;case rt.Arazzo1:return $_;default:return yp}}function zr(e,t,n){if(typeof t>"u"&&(t={}),typeof n>"u"&&(n=0),!e)return{};let r=e?.mappings||e?.items;if(r){let i=0;for(let o of r)o?.value===null||!o?.value?.value?t[o?.key?.value||i]={value:Il(o?.value)?o?.value:null,startOffset:o?.key?.value?o.startPosition+o.key.value.length+1:null,endOffset:null,indent:n}:t[o?.key?.value||i]={value:o?.value?.value,rawValue:o?.value?.rawValue||null,startOffset:o?.value?.startPosition||null,endOffset:o?.value?.endPosition||null,indent:n},Object.keys(o?.value||o||{}).includes("items")?(t[o?.key?.value||i]={type:"sequence",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},zr(o?.value||o,t[o?.key?.value||i],n+1)):Object.keys(o?.value||o||{}).includes("mappings")&&(t[o?.key?.value||i]={type:"map",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},zr(o?.value||o,t[o?.key?.value||i],n+1)),i++}return t}import{mapTypeToComponent as Pp}from"@redocly/openapi-core";var tu={Schema:[{name:"$ref",value:{type:"string",name:"Schema"}}],PathItem:[{name:"$ref",value:{type:"string",name:"PathItem"}}],Parameter:[{name:"$ref",value:{type:"string",name:"Parameter"}}],Response:[{name:"$ref",value:{type:"string",name:"Response"}}],Example:[{name:"$ref",value:{type:"string",name:"Example"}}],RequestBody:[{name:"$ref",value:{type:"string",name:"RequestBody"}}],Header:[{name:"$ref",value:{type:"string",name:"Header"}}],SecuritySchema:[{name:"$ref",value:{type:"string",name:"SecuritySchema"}}],Link:[{name:"$ref",value:{type:"string",name:"Link"}}],Callback:[{name:"$ref",value:{type:"string",name:"Callback"}}]};function _p(e){let t=tu[e.name];return t&&t.forEach(n=>{e.properties[n.name]=n.value}),e}var Bo=Ge(an(),1),Rt=class{constructor({kind:t,label:n,value:r,textEdit:i,filterText:o,sortText:s,data:u}){this.kind=t||Bo.CompletionItemKind.Value,this.label=n;let{node:c,lineOffset:p,position:g}=u;this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.textEdit=i||(c?.value&&g&&p?this.getTextEdit(c,g,p):void 0)}getTextEdit(t,n,r){let i=t.startPosition-r,o=t.singleQuoted||t.doubleQuoted?2:0,s=i+t.value.length+o;return Bo.TextEdit.replace({start:{line:n.line,character:i},end:{line:n.line,character:s}},this.insertText)}};var sr=Ge(an(),1),Tn=class{constructor({kind:t,label:n,insertText:r,insertTextFormat:i,filterText:o,sortText:s,data:u}){this.insertTextFormat=i||n.includes("$")?sr.InsertTextFormat.PlainText:sr.InsertTextFormat.Snippet,this.kind=t||sr.CompletionItemKind.Property,this.label=n,this.data=u||{},this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.command=this.kind===sr.CompletionItemKind.Property?{title:"Suggested values",command:"editor.action.triggerSuggest"}:void 0}};var Vr={example:"example",default:"default",enum:"enum",ref:"$ref"},zo=[Vr.default,Vr.example];var Tp=Ge(hr(),1);var Ee={};ou(Ee,{default:()=>Sp.default});ss(Ee,Ge(nu()));var Sp=Ge(nu());function o0(e,t){let n=t.slice(0,t.length-1),{currentType:r}=Wo(e,n);if(r?.name){let[i]=tu[r.name]||[];return i?.value}return null}function s0(e,t){let n=t[t.length-1];if(Ml(n))return o0(e,t);let{currentType:r}=Wo(e,t);return r?Fo(r)?r:r?.name&&(r?.name.includes("Map")||r?.name.includes("Named"))?{name:Br,properties:{}}:r:null}async function xp(e,t){let n=await st(e),r=n.getText(),i=(0,Tp.safeLoad)(r,{filename:e}),{node:o,nodePath:s}=Uo({node:i,nodePath:[]},t,n),u=Zc(i,e),c=s0(u,s),p=n._lineOffsets[t.line],g=n.getText({start:n.positionAt(p),end:t});return{currentAst:i,node:o,nodePath:s,position:t,lineText:g,lineOffset:p,openApiType:c}}async function wp(e,t){let n=de.resolvePath(Ne(e)),r=de.dirname(n),i=await cu(de.joinPath(r,t),r.path),o=de.resolvePath(r,i.path);return{refPath:t,refDirPath:i,refDirAbsolutePath:o,isAbsolutePath:t?(0,Ee.isAbsolute)(t):!1,docAbsolutePath:n,docAbsoluteDirPath:r,root:"/"}}var kp=Ge(an(),1);var Vo=class extends Rt{constructor(t){super(t),this.kind=kp.CompletionItemKind.Folder,this.command={title:"Complete path",command:"editor.action.triggerSuggest",arguments:[]}}};var Ap=Ge(an(),1);var $o=class extends Rt{constructor(t){super(t),this.kind=Ap.CompletionItemKind.File}};var c0=qe.supportedLanguages.concat({languageId:"markdown",filePattern:/\.md$/});function u0(e){let{refPath:t,docAbsoluteDirPath:n,isAbsolutePath:r,root:i}=e,o=(0,Ee.resolve)(n.path,t,".."),s=r?o:(0,Ee.relative)(n.path,o),u=s&&s!==i?"/":"";return{name:"../",type:1,matchBy:t,sortBy:Ae("FolderCompletion"),value:`${s}${u}`}}async function l0(e,t,n){let r=[],{refDirAbsolutePath:i,docAbsolutePath:o}=n;for(let s of e)try{let u=de.resolvePath(i,s),c=await qe.fs.stat(u);c.isFile()&&u.path!==o.path&&t.supportedFiles.some(p=>p.filePattern.test(s))&&r.push({name:s,type:0}),c.isDirectory()&&r.push({name:s,type:1})}catch{continue}return r}function qp(e,t){let{docAbsoluteDirPath:n,isAbsolutePath:r,refDirAbsolutePath:i,root:o,refPath:s}=t,u=[];return i.path!==o&&u.push(u0(t)),u.concat(e.map(({name:c,type:p})=>{let g=(0,Ee.resolve)(i.path,c),b=(0,Ee.relative)(n.path,g),D=s.includes(Ee.sep)?s.slice(0,s.lastIndexOf(Ee.sep)+1):s+Ee.sep,R=r?g:b;if(p===0)return{type:p,name:c,value:R,sortBy:`${Ae("FileCompletion")}${c}`,matchBy:`${D}${c}`};let T=`${c}/`;return{type:p,name:T,value:`${R}${b?"/":""}`,sortBy:`${Ae("FolderCompletion")}${c}`,matchBy:`${D}${c}`}}))}function Np(e,t){let{node:n,lineOffset:r,position:i}=t;return e.map(o=>{let{name:s,value:u,matchBy:c,sortBy:p,type:g}=o,b={label:s,filterText:yr(c,n),sortText:p,value:u,data:{lineOffset:r,position:i,node:n}};return g===1?new Vo(b):new $o(b)})}async function Op(e,t){let{node:n}=t,r=n.value??"",i=await wp(e,r),{refDirAbsolutePath:o}=i,s=[];try{s=await qe.fs.readDir(o)}catch{return Np(qp([],i),t)}let u=await l0(s,{supportedFiles:c0},i);return Np(qp(u,i),t)}import{isEmptyObject as d0}from"@redocly/openapi-core";function Ep(e,t){if(t?.items)return"- "+Ep(e,t.items);if(t?.required)return Object.values(t.required).map((n,r)=>`${n}: \${${r+1}}`).join(`
|
|
77
|
-
`);if(e==="openapi"){let n="3.1.0",[r,i,o]=n.split(".");return`\${1:${r}}.\${2:${i}}.\${3:${o}}`}return""}function
|
|
76
|
+
- ${e.suggest.slice(0,c0).join(`
|
|
77
|
+
- `)}`}function g0(e){return e.scorecardLevel?`
|
|
78
|
+
Scorecard level: ${e.scorecardLevel}`:""}function zm(e,t){e.forEach(n=>{let r;switch(n.severity){case"error":r=Le.DiagnosticSeverity.Error;break;case"warn":r=Le.DiagnosticSeverity.Warning;break;default:r=Le.DiagnosticSeverity.Warning}let i=t0(n.location[0]),o=De(i.source.absoluteRef).toString(),s=Le.Position.create(i.start.line-1,i.start.col-1),a=i.end?Le.Position.create(i.end.line-1,i.end.col-1):s,c=n.message+` Rule: ${n.ruleId}.`+f0(n)+g0(n),l=Le.Diagnostic.create(Le.Range.create(s,a),c,r,void 0,"Redocly OpenAPI");$m(o,l,t)})}function h0(e){return e.filter(({severity:t})=>t==="error").map(t=>({...t,location:t.location.map(n=>({...n,source:{...n.source,_ast:null}}))}))}var fs=Ie(Yt(),1);var fe=Ie(Yt(),1);function Pe(e,t){return e?t?is[e+"_"+t]||t:is[e]||is.Default:is.Default}var m0=["newLine","MediaTypeMap","PathMap","propertyName","newItem","Root_openapi","Root","Info","Root_info","Info_title","Info_summary","Info_description","Info_termsOfService","Info_contact","Contact_name","Contact_url","Contact_email","Info_license","License_name","License_identifier","License_url","Info_version","Root_jsonSchemaDialect","jsonSchemaDialect","Root_servers","Server_List","Server_url","Server_description","Server_variables","Root_paths","Root_webhooks","Root_components","Root_security","Root_tags","Root_externalDocs","LocalComponentCompletion","FolderCompletion","FileCompletion","Default"],is=m0.reduce((e,t,n)=>(e[t]=String.fromCharCode(n),e),{});var Gt="newItem",Wr="propertyName",or="newLine";function os(e){return!!(e?.name&&Vm[e.name])}function fl(e){return Vm[e]||[]}var Vm={[or]:[{label:"newLine",kind:fe.CompletionItemKind.Constructor,data:{},sortText:Pe(or)}],[Wr]:[{label:Wr,kind:fe.CompletionItemKind.Constructor,data:{properties:{}},sortText:Pe(Wr)}],ServerVariable_Map:[{label:"newVariableName",kind:fe.CompletionItemKind.Property,data:{properties:{}},sortText:Pe("ServerVariable_Map")}],ResponsesMap:[{label:"200",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"201",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"204",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"301",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"303",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"400",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"401",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"403",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"404",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"500",kind:fe.CompletionItemKind.Property,data:{properties:{}}},{label:"503",kind:fe.CompletionItemKind.Property,data:{properties:{}}}],PathMap:[{label:"/newPath",kind:fe.CompletionItemKind.Property,data:{properties:{}},sortText:Pe("PathMap")}],MediaTypeMap:[{label:"mime/type",kind:fe.CompletionItemKind.Property,data:{properties:{}},sortText:Pe("MediaTypeMap")},{label:"application/json",kind:fe.CompletionItemKind.Property,data:{properties:{}},sortText:Pe("MediaTypeMap")},{label:"application/octet-stream",kind:fe.CompletionItemKind.Property,data:{properties:{}},sortText:Pe("MediaTypeMap")},{label:"multipart/form-data",kind:fe.CompletionItemKind.Property,data:{properties:{}},sortText:Pe("MediaTypeMap")},{label:"application/x-www-form-urlencoded",kind:fe.CompletionItemKind.Property,data:{properties:{}},sortText:Pe("MediaTypeMap")},{label:"application/xml",kind:fe.CompletionItemKind.Property,data:[],sortText:Pe("MediaTypeMap")}]};var Kt=Ie(hr(),1);import{normalizeTypes as Gm,Oas3Types as y0,Oas2Types as b0,Oas3_1Types as Ym,AsyncApi2Types as v0,SpecVersion as Qe,ConfigTypes as x0,getMajorSpecVersion as P0,Arazzo1Types as _0,AsyncApi3Types as C0}from"@redocly/openapi-core";var gl=new Map;async function D0(e,t){let n=await Xe(e),r=n.getText(),i=Kt.safeLoad(r,{filename:e.toString()}),{nodePath:o}=ss({node:i,nodePath:[]},t,n,!0),s=hl(i,e),{version:a}=ml(i),{currentType:c,parentType:l,endPath:p}=as(s,o),m=Br(i),P=c?.name?c:l;return{nodePath:o,endPath:p,type:P,existingValues:m,types:s,descriptionVersion:a}}function Km(e,t){if(!e)return null;let n=e,r=!0;return t.forEach(i=>{if(r=!1,Js(n)&&n.items&&n.items[i])n=n.items[i],r=!0;else if(tp(n)){let o=cs(n);for(let s of o)if(Qs(s)&&s.key?.value===i){n=s?.value,r=!0;break}}}),r?n:(console.warn("Cannot find node by path",t),null)}function R0(e,t){for(let n=0;n<t.length;n++)if(n===t.length-1||t[n+1]>e)return n;return t.length-1}function ss(e,t,n,r=!1){let{node:i,nodePath:o=[]}=e,s=n.offsetAt(t),a=cs(i);if(a.length===0||S0(i)||!r&&w0(i,n,t))return e;let c=T0(a,s);return ss({nodePath:k0(o,i,a[c],c),node:a[c]},t,n,r)}function S0(e){return e?.kind===Kt.Kind.MAPPING&&!e?.value}function w0(e,t,n){let r=t.getText({start:t.positionAt(t._lineOffsets[n.line]),end:n}),i=A0(e,t),o=r?.match(/^\s+/)?.[0]?.length||0;return(/^\s*[\w\-\$\/\{\}]+$/.test(r)?o:n.character)===i}function T0(e,t){for(let n=1;n<e.length;n++){let r=e[n];if(r&&r.startPosition>t)return n-1}return e.length-1}function k0(e,t,n,r){return Js(t)?[...e,r]:Qs(n)&&n?.key?.value&&typeof n.key.value=="string"?[...e,n.key.value]:e}function A0(e,t){let n=e?.startPosition??0,r=R0(n,t._lineOffsets);if(r>=0){let i=t._lineOffsets[r];return n-i}return 0}function as(e,t){let n=e,r,i=new Array(t.length).fill(null);t.forEach((s,a)=>{let c;if(e?.name&&e?.name!==n?.name&&(n=e,r=s),e&&e?.properties&&!Object.keys(e?.properties).length&&e?.items?.properties)c=e.items;else if(e?.properties&&e.properties[s])c=e.properties[s],ai(c)&&(c=c(null,s));else if(e?.additionalProperties&&!ai(e?.additionalProperties))c=e.additionalProperties;else if(ai(e?.additionalProperties)&&s){let l=e.additionalProperties(null,s);l&&(c=l)}c&&(e=c,i[a]=c)}),e?.name&&n?.name&&e?.name!==n?.name&&(r=null);let o=i.every(s=>!!s);return{currentType:o||t[0]==="openapi"||t.length===0?e:null,parentType:o?n:null,endPath:r}}function hl(e,t){if(br(t))return Gm(x0).ConfigRoot;let{types:n,isDefault:r}=N0(e);if(!e)return n;let i=r?ul(t):n;return r&&!ul(t)&&e?null:i||n}function O0(e){if(gl.has(e))return gl.get(e);let t=Gm(q0(e)).Root;return gl.set(e,t),t}function Qm(e){let t,n=!1;if(e?.kind===Kt.Kind.MAP)for(let r of e.mappings){let i=r.key?.value,o=String(r?.value?.value);if(i==="openapi"&&o.startsWith("3.1")){t=Qe.OAS3_1;break}if(i==="openapi"&&o.startsWith("3.0")){t=Qe.OAS3_0;break}if(i==="swagger"&&o==="2.0"){t=Qe.OAS2;break}if(i==="asyncapi"&&o.startsWith("2."))return{version:Qe.Async2,isDefault:!1};if(i==="asyncapi"&&o.startsWith("3."))return{version:Qe.Async3,isDefault:!1};if(i==="arazzo")return{version:Qe.Arazzo1,isDefault:!1}}return t||(t=Qe.OAS3_1,n=!0),{version:t,isDefault:n}}function ml(e){let{version:t,isDefault:n}=Qm(e);return{version:P0(t),isDefault:n}}function N0(e){let{version:t,isDefault:n}=Qm(e);return{types:O0(t),isDefault:n}}function cs(e){switch(e?.kind){case Kt.Kind.MAPPING:return[e.key,e.value];case Kt.Kind.MAP:return e.mappings;case Kt.Kind.SEQ:return e?.items;default:return[]}}function q0(e){switch(e){case Qe.OAS3_1:return Ym;case Qe.OAS3_0:return y0;case Qe.OAS2:return b0;case Qe.Async2:return v0;case Qe.Async3:return C0;case Qe.Arazzo1:return _0;default:return Ym}}function Br(e,t,n){if(typeof t>"u"&&(t={}),typeof n>"u"&&(n=0),!e)return{};let r=e?.mappings||e?.items;if(r){let i=0;for(let o of r)o?.value===null||!o?.value?.value?t[o?.key?.value||i]={value:ep(o?.value)?o?.value:null,startOffset:o?.key?.value?o.startPosition+o.key.value.length+1:null,endOffset:null,indent:n}:t[o?.key?.value||i]={value:o?.value?.value,rawValue:o?.value?.rawValue||null,startOffset:o?.value?.startPosition||null,endOffset:o?.value?.endPosition||null,indent:n},Object.keys(o?.value||o||{}).includes("items")?(t[o?.key?.value||i]={type:"sequence",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},Br(o?.value||o,t[o?.key?.value||i],n+1)):Object.keys(o?.value||o||{}).includes("mappings")&&(t[o?.key?.value||i]={type:"map",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},Br(o?.value||o,t[o?.key?.value||i],n+1)),i++}return t}import{mapTypeToComponent as Jm}from"@redocly/openapi-core";var yl={Schema:[{name:"$ref",value:{type:"string",name:"Schema"}}],PathItem:[{name:"$ref",value:{type:"string",name:"PathItem"}}],Parameter:[{name:"$ref",value:{type:"string",name:"Parameter"}}],Response:[{name:"$ref",value:{type:"string",name:"Response"}}],Example:[{name:"$ref",value:{type:"string",name:"Example"}}],RequestBody:[{name:"$ref",value:{type:"string",name:"RequestBody"}}],Header:[{name:"$ref",value:{type:"string",name:"Header"}}],SecuritySchema:[{name:"$ref",value:{type:"string",name:"SecuritySchema"}}],Link:[{name:"$ref",value:{type:"string",name:"Link"}}],Callback:[{name:"$ref",value:{type:"string",name:"Callback"}}]};function Xm(e){let t=yl[e.name];return t&&t.forEach(n=>{e.properties[n.name]=n.value}),e}var us=Ie(Yt(),1),lt=class{constructor({kind:t,label:n,value:r,textEdit:i,filterText:o,sortText:s,data:a}){this.kind=t||us.CompletionItemKind.Value,this.label=n;let{node:c,lineOffset:l,position:p}=a;this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.textEdit=i||(c?.value&&p&&l?this.getTextEdit(c,p,l):void 0)}getTextEdit(t,n,r){let i=t.startPosition-r,o=t.singleQuoted||t.doubleQuoted?2:0,s=i+t.value.length+o;return us.TextEdit.replace({start:{line:n.line,character:i},end:{line:n.line,character:s}},this.insertText)}};var sr=Ie(Yt(),1),gn=class{constructor({kind:t,label:n,insertText:r,insertTextFormat:i,filterText:o,sortText:s,data:a}){this.insertTextFormat=i||n.includes("$")?sr.InsertTextFormat.PlainText:sr.InsertTextFormat.Snippet,this.kind=t||sr.CompletionItemKind.Property,this.label=n,this.data=a||{},this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.command=this.kind===sr.CompletionItemKind.Property?{title:"Suggested values",command:"editor.action.triggerSuggest"}:void 0}};var Hr={example:"example",default:"default",enum:"enum",ref:"$ref"},ls=[Hr.default,Hr.example];var ny=Ie(hr(),1);var we={};ms(we,{default:()=>ty.default});ys(we,Ie(bl()));var ty=Ie(bl());function j0(e,t){let n=t.slice(0,t.length-1),{currentType:r}=as(e,n);if(r?.name){let[i]=yl[r.name]||[];return i?.value}return null}function M0(e,t){let n=t[t.length-1];if(Xd(n))return j0(e,t);let{currentType:r}=as(e,t);return r?os(r)?r:r?.name&&(r?.name.includes("Map")||r?.name.includes("Named"))?{name:Wr,properties:{}}:r:null}async function ry(e,t){let n=await Xe(e),r=n.getText(),i=(0,ny.safeLoad)(r,{filename:e}),{node:o,nodePath:s}=ss({node:i,nodePath:[]},t,n),a=hl(i,e),c=M0(a,s),l=n._lineOffsets[t.line],p=n.getText({start:n.positionAt(l),end:t});return{currentAst:i,node:o,nodePath:s,position:t,lineText:p,lineOffset:l,openApiType:c}}async function iy(e,t){let n=ne.resolvePath(De(e)),r=ne.dirname(n),i=await Rl(ne.joinPath(r,t),r.path),o=ne.resolvePath(r,i.path);return{refPath:t,refDirPath:i,refDirAbsolutePath:o,isAbsolutePath:t?(0,we.isAbsolute)(t):!1,docAbsolutePath:n,docAbsoluteDirPath:r,root:"/"}}var oy=Ie(Yt(),1);var ds=class extends lt{constructor(t){super(t),this.kind=oy.CompletionItemKind.Folder,this.command={title:"Complete path",command:"editor.action.triggerSuggest",arguments:[]}}};var sy=Ie(Yt(),1);var ps=class extends lt{constructor(t){super(t),this.kind=sy.CompletionItemKind.File}};var I0=Ce.supportedLanguages.concat({languageId:"markdown",filePattern:/\.md$/});function F0(e){let{refPath:t,docAbsoluteDirPath:n,isAbsolutePath:r,root:i}=e,o=(0,we.resolve)(n.path,t,".."),s=r?o:(0,we.relative)(n.path,o),a=s&&s!==i?"/":"";return{name:"../",type:1,matchBy:t,sortBy:Pe("FolderCompletion"),value:`${s}${a}`}}async function U0(e,t,n){let r=[],{refDirAbsolutePath:i,docAbsolutePath:o}=n;for(let s of e)try{let a=ne.resolvePath(i,s),c=await Ce.fs.stat(a);c.isFile()&&a.path!==o.path&&t.supportedFiles.some(l=>l.filePattern.test(s))&&r.push({name:s,type:0}),c.isDirectory()&&r.push({name:s,type:1})}catch{continue}return r}function ay(e,t){let{docAbsoluteDirPath:n,isAbsolutePath:r,refDirAbsolutePath:i,root:o,refPath:s}=t,a=[];return i.path!==o&&a.push(F0(t)),a.concat(e.map(({name:c,type:l})=>{let p=(0,we.resolve)(i.path,c),m=(0,we.relative)(n.path,p),P=s.includes(we.sep)?s.slice(0,s.lastIndexOf(we.sep)+1):s+we.sep,b=r?p:m;if(l===0)return{type:l,name:c,value:b,sortBy:`${Pe("FileCompletion")}${c}`,matchBy:`${P}${c}`};let T=`${c}/`;return{type:l,name:T,value:`${b}${m?"/":""}`,sortBy:`${Pe("FolderCompletion")}${c}`,matchBy:`${P}${c}`}}))}function cy(e,t){let{node:n,lineOffset:r,position:i}=t;return e.map(o=>{let{name:s,value:a,matchBy:c,sortBy:l,type:p}=o,m={label:s,filterText:mr(c,n),sortText:l,value:a,data:{lineOffset:r,position:i,node:n}};return p===1?new ds(m):new ps(m)})}async function uy(e,t){let{node:n}=t,r=n.value??"",i=await iy(e,r),{refDirAbsolutePath:o}=i,s=[];try{s=await Ce.fs.readDir(o)}catch{return cy(ay([],i),t)}let a=await U0(s,{supportedFiles:I0},i);return cy(ay(a,i),t)}import{isEmptyObject as W0}from"@redocly/openapi-core";function ly(e,t){if(t?.items)return"- "+ly(e,t.items);if(t?.required)return Object.values(t.required).map((n,r)=>`${n}: \${${r+1}}`).join(`
|
|
79
|
+
`);if(e==="openapi"){let n="3.1.0",[r,i,o]=n.split(".");return`\${1:${r}}.\${2:${i}}.\${3:${o}}`}return""}function B0(e,t,n,r){if(e===Gt)return"";if(r?.items||r?.required){let i=`
|
|
78
80
|
`;return n.includes(`
|
|
79
81
|
`)&&(i+=" "),i}return n.includes(`
|
|
80
|
-
`)||!t?"":" "}function
|
|
81
|
-
`:e?.includes(":")&&!e?.includes(": ")?" ":""}function
|
|
82
|
+
`)||!t?"":" "}function H0(e){return e===Gt?"":": "}function z0(e){return e?.includes(":")||e?.includes(": ")?`
|
|
83
|
+
`:e?.includes(":")&&!e?.includes(": ")?" ":""}function $0(e,t){return!t||W0(t)?"":e.includes(`
|
|
82
84
|
`)?`
|
|
83
85
|
`:`
|
|
84
|
-
`}function
|
|
85
|
-
`;let r=
|
|
86
|
+
`}function zr(e,t,n=!0){if(e===or)return`
|
|
87
|
+
`;let r=z0(t?.lineText),i=H0(e),o=e===Gt?"":e,s=ly(e,t),a=B0(e,s,r,t),c=n?$0(r,t?.properties):" ";return`${r}${o}${i}${a}${s}${c}`}function V0(e,t){let{version:n}=ml(e),r=Jm(t,n);if(!r)return[];let i=Km(e,["components",r]);return i?(cs(i.value||i)||[]).map(({key:{value:s}})=>`#/components/${r}/${s}`):[]}function Y0(e){let{node:t,position:n,lineOffset:r}=e,i=ls.includes(t.key?.value)?t:ls.includes(t.parent?.key?.value)?t.parent:null;return i?i?.parent?.mappings?.find(({key:s})=>s?.value===Hr.enum)?.value?.items?.map(({value:s})=>new lt({label:s,data:{node:t,position:n,lineOffset:r}}))||[]:[]}async function G0(e,t){let{position:n,openApiType:r,currentAst:i,lineOffset:o,node:s}=t,a=r?.name?V0(i,r.name):[];return[...await uy(e,t),...a.map(l=>{let p=mr(l,s);return new lt({label:l,filterText:mr(l,s),value:p,sortText:`${Pe("LocalComponentCompletion")}${l}`,data:{lineOffset:o,position:n,node:s}})})]}function K0(e){let{openApiType:t,node:n,position:r,lineOffset:i}=e;return t?.enum?t.enum.map(o=>new lt({label:o,kind:fs.CompletionItemKind.EnumMember,data:{node:n,position:r,lineOffset:i}})):[]}function Q0(e,t){let{node:n,position:r,lineOffset:i}=t;return["true","false"].map(o=>new lt({label:o,data:{node:n,position:r,lineOffset:i}}))}function J0(e){let{currentAst:t,nodePath:n,node:r,openApiType:i,lineText:o}=e,s=Z0(t,n,r);return eD(i,s,o)}async function X0(e,t){let{node:n,nodePath:r,openApiType:i}=t;if(!n)return[];let o=n.key?.value||(r.length?r[r.length-1]:null);return o&&i?.name&&Hr.ref===o?G0(e,t):ls.includes(o)?Y0(t):i?.enum?K0(t):i?.type==="boolean"?Q0(e,t):[]}async function dy(e,t){let n=await ry(e,t);return n.openApiType?.properties?J0(n):X0(e,n)}function Z0(e,t,n){if(!e)return[];let i=Br(e);for(let a=0;a<t.length;a++)i[t[a]]&&(i=i[t[a]]);let o=i?Object.keys(i).filter(a=>i[a]&&typeof i[a]=="object"):[],s=n?.value?.mappings||n?.mappings;if(s){let a=s.map(c=>c.key?.value||null);o.push(...a)}return!o.length&&n?.value&&o.push(n.value),o}function eD(e,t,n){if(!e)return[];if(Xm(e),os(e))return fl(e?.name).filter(r=>!t.includes(r.label)).map(r=>new gn({...r,insertText:zr(r.label,{...r.data,...e,lineText:n})}));if(e.properties&&Object.keys(e.properties).length){let r=Object.keys(e.properties).filter(i=>!t.includes(i)).map(i=>{let o={...e.properties[i]||{},lineText:n};return new gn({label:i,kind:fs.CompletionItemKind.Property,insertText:zr(i,o,!o?.items),sortText:Pe(e?.name,i)})});return n.endsWith(":")&&r.push(...fl(or).map(i=>new gn({...i,insertText:zr(i.label,{...i.data,lineText:n})}))),r}return e.items&&Object.keys(e.items).length?[new gn({label:Gt,kind:fs.CompletionItemKind.Constructor,insertText:zr(Gt,{...e,lineText:n}),sortText:Pe(Gt)})]:[]}var wt=Ie(al(),1);var Qt=Ie(hr(),1);import{getAstNodeByPointer as tD}from"@redocly/openapi-core";async function nD({position:e,textDocument:t,value:n,line:r,document:i}){let[o,s]=n.split("#/"),a=r.indexOf(n),c=a+n.length;if(e.character>=a&&a!==-1){let l=o?ne.joinPath(ne.dirname(At.parse(i.uri)),o).toString():t.uri,p;try{p=await Xe(l)}catch{return}let m=(0,Qt.safeLoad)(p.getText(),{filename:bn(l)}),P=tD(m,`#/${s}`,!0),b=wt.Range.create(p.positionAt(P?.startPosition||0),p.positionAt(P?.endPosition||0));return[wt.LocationLink.create(l,wt.Range.create(0,0,p.lineCount,0),b,wt.Range.create(wt.Position.create(e.line,a),wt.Position.create(e.line,c)))]}}async function py({position:e,textDocument:t}){let n;try{n=await Xe(t.uri)}catch{return}let o=n.getText().split(/\r\n|[\n\r]/g)[e.line],s=(0,Qt.safeLoad)(o,{filename:bn(t.uri)}),a;switch(s.kind){case Qt.Kind.SCALAR:{a=s.parent||{value:{value:s?.value}};break}case Qt.Kind.MAP:{a=s?.mappings?.[0];break}case Qt.Kind.SEQ:{let l=s?.items?.[0];a=l?.kind===Qt.Kind.MAP?l?.mappings?.[0]:{value:{value:l?.value}};break}default:a=null}let c=a?.value?.value;if(c&&!lr(c))return nD({position:e,textDocument:t,value:c,line:o,document:n})}var rD=(t=>(t[t.FILE_TYPE_NOT_SUPPORTED=0]="FILE_TYPE_NOT_SUPPORTED",t))(rD||{});var fy=class{async onCompletion(t){let{uri:n}=t.textDocument;return ea(n)?[]:dy(n,t.position)}async onCompletionResolve(t){return t}async validateOpenAPI(t){return pl(t)}async onDidChangeWatchedFiles(t){if(t.changes.find(r=>ra.some(i=>r.uri.endsWith(i))))return rs()}async onDidConfigChange(t){return await lp(t),rs()}async onDidChangeConfiguration(){return rs()}async onDefinition(t){let{uri:n}=t.textDocument;return ea(n)?[]:await py(t)||[]}};export{rD as ContextErrorCodes,fy as OpenapiLanguageServer,cl as bundleOpenAPI,XC as getBundles,Rn as getConfigData,D0 as getContextData,Xe as getDocumentByURI,br as isConfigFile,lr as isHttpPath,hx as isYamlFile,Ce as languageServerConfig,De as parseUri,Gs as removeCirculars,rs as revalidateAllDocuments,lp as updateOpenAPIConfigByURI,bn as uriToAbsFSPath};
|