1(()=>{"use strict";var e={42084(e,t,n){var r,o=n(61806);function i(e,t=!1){const n=e.length;let r=0,o="",i=0,l=16,u=0,f=0,d=0,h=0,p=0;function m(t,n){let o=0,i=0;for(;o<t;){let t=e.charCodeAt(r);if(t>=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}r++,o++}return o<t&&(i=-1),i}function g(){if(o="",p=0,i=r,f=u,h=d,r>=n)return i=n,l=17;let t=e.charCodeAt(r);if(s(t)){do{r++,o+=String.fromCharCode(t),t=e.charCodeAt(r)}while(s(t));return l=15}if(a(t))return r++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,o+="\n"),u++,d=r,l=14;switch(t){case 123:return r++,l=1;case 125:return r++,l=2;case 91:return r++,l=3;case 93:return r++,l=4;case 58:return r++,l=6;case 44:return r++,l=5;case 34:return r++,o=function(){let t="",o=r;for(;;){if(r>=n){t+=e.substring(o,r),p=2;break}const i=e.charCodeAt(r);if(34===i){t+=e.substring(o,r),r++;break}if(92!==i){if(i>=0&&i<=31){if(a(i)){t+=e.substring(o,r),p=2;break}p=6}r++}else{if(t+=e.substring(o,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=m(4);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}o=r}}return t}(),l=10;case 47:const s=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!a(e.charCodeAt(r));)r++;return o=e.substring(s,r),l=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let i=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,i=!0;break}r++,a(t)&&(13===t&&10===e.charCodeAt(r)&&r++,u++,d=r)}return i||(r++,p=1),o=e.substring(s,r),l=13}return o+=String.fromCharCode(t),r++,l=16;case 45:if(o+=String.fromCharCode(t),r++,r===n||!c(e.charCodeAt(r)))return l=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&c(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&c(e.charCodeAt(r))))return p=3,e.substring(t,r);for(r++;r<e.length&&c(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&c(e.charCodeAt(r))){for(r++;r<e.length&&c(e.charCodeAt(r));)r++;n=r}else p=3;return e.substring(t,n)}(),l=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r),o){case"true":return l=8;case"false":return l=9;case"null":return l=7}return l=16}return o+=String.fromCharCode(t),r++,l=16}}function y(e){if(s(e)||a(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,o="",i=0,l=16,p=0},getPosition:()=>r,scan:t?function(){let e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:()=>l,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>f,getTokenStartCharacter:()=>i-h,getTokenError:()=>p}}function s(e){return 32===e||9===e}function a(e){return 10===e||13===e}function c(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(r||(r={}));const l=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),u=200,f={" ":{"\n":new Array(u).fill(0).map((e,t)=>"\n"+" ".repeat(t)),"\r":new Array(u).fill(0).map((e,t)=>
1"\r"+" ".repeat(t)),"\r\n":new Array(u).fill(0).map((e,t)=>"\r\n"+" ".repeat(t))},"\t":{"\n":new Array(u).fill(0).map((e,t)=>"\n"+"\t".repeat(t)),"\r":new Array(u).fill(0).map((e,t)=>"\r"+"\t".repeat(t)),"\r\n":new Array(u).fill(0).map((e,t)=>"\r\n"+"\t".repeat(t))}},d=["\n","\r","\r\n"];function h(e,t,n){let r,o,s,a,c;if(t){for(a=t.offset,c=a+t.length,s=a;s>0&&!m(e,s-1);)s--;let i=c;for(;i<e.length&&!m(e,i);)i++;o=e.substring(s,i),r=function(e,t){let n=0,r=0;const o=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===l[1])r++;else{if("\t"!==t)break;r+=o}n++}return Math.floor(r/o)}(o,n)}else o=e,r=0,s=0,a=0,c=e.length;const u=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e),h=d.includes(u);let g,y=0,b=0;g=n.insertSpaces?l[n.tabSize||4]??p(l[1],n.tabSize||4):"\t";const v="\t"===g?"\t":" ";let k=i(o,!1),x=!1;function S(){if(y>1)return p(u,y)+p(g,r+b);const e=g.length*(r+b);return!h||e>f[v][u].length?u+p(g,r+b):e<=0?u:f[v][u][e]}function A(){let e=k.scan();for(y=0;15===e||14===e;)14===e&&n.keepLines?y+=1:14===e&&(y=1),e=k.scan();return x=16===e||0!==k.getTokenError(),e}const T=[];function C(n,r,o){x||t&&!(r<c&&o>a)||e.substring(r,o)===n||T.push({offset:r,length:o-r,content:n})}let E=A();if(n.keepLines&&y>0&&C(p(u,y),0,0),17!==E){let e=k.getTokenOffset()+s;C(g.length*r<20&&n.insertSpaces?l[g.length*r]:p(g,r),s,e)}for(;17!==E;){let e=k.getTokenOffset()+k.getTokenLength()+s,t=A(),r="",o=!1;for(;0===y&&(12===t||13===t);){let n=k.getTokenOffset()+s;C(l[1],e,n),e=k.getTokenOffset()+k.getTokenLength()+s,o=12===t,r=o?S():"",t=A()}if(2===t)1!==E&&b--,n.keepLines&&y>0||!n.keepLines&&1!==E?r=S():n.keepLines&&(r=l[1]);else if(4===t)3!==E&&b--,n.keepLines&&y>0||!n.keepLines&&3!==E?r=S():n.keepLines&&(r=l[1]);else{switch(E){case 3:case 1:b++,r=n.keepLines&&y>0||!n.keepLines?S():l[1];break;case 5:r=n.keepLines&&y>0||!n.keepLines?S():l[1];break;case 12:r=S();break;case 13:y>0?r=S():o||(r=l[1]);break;case 6:n.keepLines&&y>0?r=S():o||(r=l[1]);break;case 10:n.keepLines&&y>0?r=S():6!==t||o||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&y>0?r=S():12!==t&&13!==t||o?5!==t&&17!==t&&(x=!0):r=l[1];break;case 16:x=!0}y>0&&(12===t||13===t)&&(r=S())}17===t&&(r=n.keepLines&&y>0?S():n.insertFinalNewline?u:"");C(r,e,k.getTokenOffset()+s),E=t}return T}function p(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function m(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var g;!function(e){e.DEFAULT={allowTrailingComma:!1}}(g||(g={}));const y=i;var b,v;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(b||(b={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(v||(v={}));const k=function(e,t=[],n=g.DEFAULT){let r=null,o=[];const s=[];function a(e){Array.isArray(o)?o.push(e):null!==r&&(o[r]=e)}return function(e,t,n=g.DEFAULT){const r=i(e,!1),o=[];function s(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}const u=a(t.onObjectBegin),f=l(t.onObjectProperty),d=s(t.onObjectEnd),h=a(t.onArrayBegin),p=s(t.onArrayEnd),m=l(t.onLiteralValue),y=c(t.onSeparator),b=s(t.onComment),v=c(t.onError),k=n&&n.disallowComments,x=n&&n.allowTrailingComma;function S(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:k||A(11);break;case 2:A(12);break;case 6:A(16)}
1switch(e){case 12:case 13:k?A(10):b();break;case 16:A(1);break;case 15:case 14:break;default:return e}}}function A(e,t=[],n=[]){if(v(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){S();break}if(-1!==n.indexOf(e))break;e=S()}}}function T(e){const t=r.getTokenValue();return e?m(t):(f(t),o.push(t)),S(),!0}function C(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(A(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return S(),!0}function E(){return 10!==r.getToken()?(A(3,[],[2,5]),!1):(T(!1),6===r.getToken()?(y(":"),S(),O()||A(4,[],[2,5])):A(5,[],[2,5]),o.pop(),!0)}function w(){u(),S();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||A(4,[],[]),y(","),S(),2===r.getToken()&&x)break}else e&&A(6,[],[]);E()||A(4,[],[2,5]),e=!0}return d(),2!==r.getToken()?A(7,[2],[]):S(),!0}function I(){h(),S();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||A(4,[],[]),y(","),S(),4===r.getToken()&&x)break}else t&&A(6,[],[]);e?(o.push(0),e=!1):o[o.length-1]++,O()||A(4,[],[4,5]),t=!0}return p(),e||o.pop(),4!==r.getToken()?A(8,[4],[]):S(),!0}function O(){switch(r.getToken()){case 3:return I();case 1:return w();case 10:return T(!0);default:return C()}}if(S(),17===r.getToken())return!!n.allowEmptyContent||(A(4,[],[]),!1);if(!O())return A(4,[],[]),!1;17!==r.getToken()&&A(9,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(o),o=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{o=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(o),o=e,r=null},onArrayEnd:()=>{o=s.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),o[0]},x=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const o=t.children;if(Array.isArray(o))for(let t=0;t<o.length&&o[t].offset<=n;t++){const i=e(o[t],n,r);if(i)return i}return t}},S=function e(t){if(!t.parent||!t.parent.children)return[];const n=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value;n.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&n.push(e)}return n},A=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let r of t.children){const t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};var T,C,E,w,I,O,N,L,P,M,V,j,F,D,_,$,R,U,B,q,K,H,J,W,z,G,X,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,le,ue,fe,de,he,pe,me,ge,ye,be,ve,ke,xe,Se,Ae,Te,Ce,Ee,we,Ie,Oe,Ne,Le,Pe,Me,Ve,je,Fe,De,_e,$e,Re,Ue,Be,qe,Ke,He,Je,We,ze,Ge,Xe;function Ze(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Ze(e[n],t[n]))return!1}else{const o=[];for(r in e)o.push(r);o.sort();const i=[];for(r in t)i.push(r);if(i.sort(),!Ze(o,i))return!1;for(n=0;n<o.length;n++)if(!Ze(e[o[n]],t[o[n]]))return!1}return!0}function Qe(e){return"number"==typeof e}function Ye(e){return void 0!==e}function et(e){return"boolean"==typeof e}function tt(e){return"string"==typeof e}function nt(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function rt(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function ot(e){let t="";(function(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function it(e){let t=0;for(let n=0;n<e.length;n++){t++;const r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(T||(T={})),function(e){e.is=function(e){return"string"==typeof e}}(C||(C={})),function(e){e.is=function(e){return"string"==typeof e}}(E||(E={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(w||(w={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(I||(I={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=I.MAX_VALUE),t===Number.MAX_VALUE&&(t=I.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Xe.objectLiteral(t)&&Xe.uinteger(t.line)&&Xe.uinteger(t.character)}}(O||(O={}
1)),function(e){e.create=function(e,t,n,r){if(Xe.uinteger(e)&&Xe.uinteger(t)&&Xe.uinteger(n)&&Xe.uinteger(r))return{start:O.create(e,t),end:O.create(n,r)};if(O.is(e)&&O.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return Xe.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Xe.objectLiteral(t)&&N.is(t.range)&&(Xe.string(t.uri)||Xe.undefined(t.uri))}}(L||(L={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return Xe.objectLiteral(t)&&N.is(t.targetRange)&&Xe.string(t.targetUri)&&N.is(t.targetSelectionRange)&&(N.is(t.originSelectionRange)||Xe.undefined(t.originSelectionRange))}}(P||(P={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&Xe.numberRange(t.red,0,1)&&Xe.numberRange(t.green,0,1)&&Xe.numberRange(t.blue,0,1)&&Xe.numberRange(t.alpha,0,1)}}(M||(M={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&N.is(t.range)&&M.is(t.color)}}(V||(V={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&Xe.string(t.label)&&(Xe.undefined(t.textEdit)||K.is(t))&&(Xe.undefined(t.additionalTextEdits)||Xe.typedArray(t.additionalTextEdits,K.is))}}(j||(j={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(F||(F={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return Xe.defined(n)&&(s.startCharacter=n),Xe.defined(r)&&(s.endCharacter=r),Xe.defined(o)&&(s.kind=o),Xe.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&Xe.uinteger(t.startLine)&&Xe.uinteger(t.startLine)&&(Xe.undefined(t.startCharacter)||Xe.uinteger(t.startCharacter))&&(Xe.undefined(t.endCharacter)||Xe.uinteger(t.endCharacter))&&(Xe.undefined(t.kind)||Xe.string(t.kind))}}(D||(D={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Xe.defined(t)&&L.is(t.location)&&Xe.string(t.message)}}(_||(_={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}($||($={})),function(e){e.Unnecessary=1,e.Deprecated=2}(R||(R={})),function(e){e.is=function(e){const t=e;return Xe.objectLiteral(t)&&Xe.string(t.href)}}(U||(U={})),function(e){e.create=function(e,t,n,r,o,i){let s={range:e,message:t};return Xe.defined(n)&&(s.severity=n),Xe.defined(r)&&(s.code=r),Xe.defined(o)&&(s.source=o),Xe.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;let n=e;return Xe.defined(n)&&N.is(n.range)&&Xe.string(n.message)&&(Xe.number(n.severity)||Xe.undefined(n.severity))&&(Xe.integer(n.code)||Xe.string(n.code)||Xe.undefined(n.code))&&(Xe.undefined(n.codeDescription)||Xe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Xe.string(n.source)||Xe.undefined(n.source))&&(Xe.undefined(n.relatedInformation)||Xe.typedArray(n.relatedInformation,_.is))}}(B||(B={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return Xe.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return Xe.defined(t)&&Xe.string(t.title)&&Xe.string(t.command)}}(q||(q={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&Xe.string(t.newText)&&N.is(t.range)}}(K||(K={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&Xe.string(t.label)&&(Xe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Xe.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.is=function(e){const t=e;return Xe.string(t)}}(J||(J={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}}
1,e.is=function(e){const t=e;return K.is(t)&&(H.is(t.annotationId)||J.is(t.annotationId))}}(W||(W={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Xe.defined(t)&&te.is(t.textDocument)&&Array.isArray(t.edits)}}(z||(z={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Xe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Xe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Xe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||J.is(t.annotationId))}}(G||(G={})),function(e){e.create=function(e,t,n,r){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Xe.string(t.oldUri)&&Xe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Xe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Xe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||J.is(t.annotationId))}}(X||(X={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Xe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Xe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Xe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||J.is(t.annotationId))}}(Z||(Z={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Xe.string(e.kind)?G.is(e)||X.is(e)||Z.is(e):z.is(e)))}}(Q||(Q={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Xe.defined(t)&&Xe.string(t.uri)}}(Y||(Y={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Xe.defined(t)&&Xe.string(t.uri)&&Xe.integer(t.version)}}(ee||(ee={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Xe.defined(t)&&Xe.string(t.uri)&&(null===t.version||Xe.integer(t.version))}}(te||(te={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Xe.defined(t)&&Xe.string(t.uri)&&Xe.string(t.languageId)&&Xe.integer(t.version)&&Xe.string(t.text)}}(ne||(ne={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(re||(re={})),function(e){e.is=function(e){const t=e;return Xe.objectLiteral(e)&&re.is(t.kind)&&Xe.string(t.value)}}(oe||(oe={})),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}(ie||(ie={})),function(e){e.PlainText=1,e.Snippet=2}(se||(se={})),function(e){e.Deprecated=1}(ae||(ae={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Xe.string(t.newText)&&N.is(t.insert)&&N.is(t.replace)}}(ce||(ce={})),function(e){e.asIs=1,e.adjustIndentation=2}(le||(le={})),function(e){e.is=function(e){const t=e;return t&&(Xe.string(t.detail)||void 0===t.detail)&&(Xe.string(t.description)||void 0===t.description)}}(ue||(ue={})),function(e){e.create=function(e){return{label:e}}}(fe||(fe={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(de||(de={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Xe.string(t)||Xe.objectLiteral(t)&&Xe.string(t.language)&&Xe.string(t.value)}}(he||(he={})),function(e){e.is=function(e){let t=e;return!!t&&Xe.objectLiteral(t)&&(oe.is(t.contents)||he.is(t.contents)||Xe.typedArray(t.contents,he.is))&&(void 0===e.range||N.is(e.range))}}(pe||(pe={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(me||(me={})),function(e){e.create=function(e,t,...n){let r={label:e};return Xe.defined(t)&&(r.documentation=t),Xe.defined(n)?r.parameters=n:r.parameters=[],r}}(ge||(ge={})),function(e){e.Text=1,e.Read=2,e.Write=3}(ye||(ye={})),function(e){e.create=function(e,t){let n={range:e};return Xe.number(t)&&(n.kind=t),n}}(be||(be={})),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}(ve||(ve={})),function(e){e.Deprecated=1}(ke||(ke={}
1)),function(e){e.create=function(e,t,n,r,o){let i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(xe||(xe={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(Se||(Se={})),function(e){e.create=function(e,t,n,r,o,i){let s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){let t=e;return t&&Xe.string(t.name)&&Xe.number(t.kind)&&N.is(t.range)&&N.is(t.selectionRange)&&(void 0===t.detail||Xe.string(t.detail))&&(void 0===t.deprecated||Xe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Ae||(Ae={})),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"}(Te||(Te={})),function(e){e.Invoked=1,e.Automatic=2}(Ce||(Ce={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Xe.defined(t)&&Xe.typedArray(t.diagnostics,B.is)&&(void 0===t.only||Xe.typedArray(t.only,Xe.string))&&(void 0===t.triggerKind||t.triggerKind===Ce.Invoked||t.triggerKind===Ce.Automatic)}}(Ee||(Ee={})),function(e){e.create=function(e,t,n){let r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):q.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Xe.string(t.title)&&(void 0===t.diagnostics||Xe.typedArray(t.diagnostics,B.is))&&(void 0===t.kind||Xe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||q.is(t.command))&&(void 0===t.isPreferred||Xe.boolean(t.isPreferred))&&(void 0===t.edit||Q.is(t.edit))}}(we||(we={})),function(e){e.create=function(e,t){let n={range:e};return Xe.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Xe.defined(t)&&N.is(t.range)&&(Xe.undefined(t.command)||q.is(t.command))}}(Ie||(Ie={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Xe.defined(t)&&Xe.uinteger(t.tabSize)&&Xe.boolean(t.insertSpaces)}}(Oe||(Oe={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Xe.defined(t)&&N.is(t.range)&&(Xe.undefined(t.target)||Xe.string(t.target))}}(Ne||(Ne={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Xe.objectLiteral(n)&&N.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Le||(Le={})),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"}(Pe||(Pe={})),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"}(Me||(Me={})),function(e){e.is=function(e){const t=e;return Xe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Ve||(Ve={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&N.is(t.range)&&Xe.string(t.text)}}(je||(je={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&N.is(t.range)&&Xe.boolean(t.caseSensitiveLookup)&&(Xe.string(t.variableName)||void 0===t.variableName)}}(Fe||(Fe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&N.is(t.range)&&(Xe.string(t.expression)||void 0===t.expression)}}(De||(De={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Xe.defined(t)&&N.is(e.stoppedLocation)}}(_e||(_e={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}($e||($e={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&(void 0===t.tooltip||Xe.string(t.tooltip)||oe.is(t.tooltip))&&(void 0===t.location||L.is(t.location))&&(void 0===t.command||q.is(t.command))}}(Re||(Re={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Xe.objectLiteral(t)&&O.is(t.position)&&(Xe.string(t.label)||Xe.typedArray(t.label,Re.is))&&(void 0===t.kind||$e.is(t.kind))&&void 0===t.textEdits||Xe.typedArray(t.textEdits,K.is)&&(void 0===t.tooltip||Xe.string(t.tooltip)||oe.is(t.tooltip))&&(void 0===t.paddingLeft||Xe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Xe.boolean(t.paddingRight))}}(Ue||(Ue={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Be||(Be={}
1)),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(qe||(qe={})),function(e){e.create=function(e){return{items:e}}}(Ke||(Ke={})),function(e){e.Invoked=0,e.Automatic=1}(He||(He={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Je||(Je={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(We||(We={})),function(e){e.is=function(e){const t=e;return Xe.objectLiteral(t)&&E.is(t.uri)&&Xe.string(t.name)}}(ze||(ze={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s<o.length&&a<i.length;){let t=n(o[s],i[a]);e[c++]=t<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new st(e,t,n,r)},e.is=function(e){let t=e;return!!(Xe.defined(t)&&Xe.string(t.uri)&&(Xe.undefined(t.languageId)||Xe.string(t.languageId))&&Xe.uinteger(t.lineCount)&&Xe.func(t.getText)&&Xe.func(t.positionAt)&&Xe.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),o=t(n,(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),i=r.length;for(let t=o.length-1;t>=0;t--){let n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Ge||(Ge={}));class st{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return O.create(0,e);for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return O.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Xe||(Xe={}));var at,ct,lt,ut=n(51341);!function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=52
11]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"}(at||(at={})),function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"}(ct||(ct={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[re.Markdown,re.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(lt||(lt={}));var ft=n(92146);const dt={"color-hex":{errorMessage:(0,ft.t)("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:(0,ft.t)("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:(0,ft.t)("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:(0,ft.t)("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:(0,ft.t)("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:(0,ft.t)("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:(0,ft.t)("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:(0,ft.t)("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class ht{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class pt extends ht{constructor(e,t){super(e,t),this.type="null",this.value=null}}class mt extends ht{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class gt extends ht{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class yt extends ht{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class bt extends ht{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class vt extends ht{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class kt extends ht{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function xt(e){return et(e)?e?{}:{not:{}}:e}var St;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(St||(St={}));const At={"http://json-schema.org/draft-03/schema#":ct.v3,"http://json-schema.org/draft-04/schema#":ct.v4,"http://json-schema.org/draft-06/schema#":ct.v6,"http://json-schema.org/draft-07/schema#":ct.v7,"https://json-schema.org/draft/2019-09/schema":ct.v2019_09,"https://json-schema.org/draft/2020-12/schema":ct.v2020_12};class Tt{constructor(e){this.schemaDraft=e}}class Ct{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||Nt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new Ct(-1,this.exclude)}}class Et{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}Et.instance=new Et;class wt{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===at.EnumValueMismatch&&(e.message=(0,ft.t)("V
1alue is not accepted. Valid values: {0}.",this.enumValues.map(e=>JSON.stringify(e)).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(e=>this.processedProperties.add(e))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function It(e){return A(e)}function Ot(e){return S(e)}function Nt(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class Lt{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return x(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const o=n.children;if(Array.isArray(o))for(let e=0;e<o.length&&r;e++)r=t(o[e]);return r};t(this.root)}}validate(e,t,n=$.Warning,r){if(this.root&&t){const o=new wt;return Mt(this.root,t,o,Et.instance,new Tt(r??Pt(t))),o.problems.map(t=>{const r=N.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return B.create(r,t.message,t.severity??n,t.code)})}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new Ct(t,n),o=Pt(e),i=new Tt(o);return Mt(this.root,e,new wt,r,i),r.schemas}return[]}}function Pt(e,t=ct.v2020_12){let n=e.$schema;return n?At[n]??t:t}function Mt(e,t,n,r,o){if(!e||!r.include(e))return;if("property"===e.type)return Mt(e.valueNode,t,n,r,o);const i=e;switch(function(){function e(e){return i.type===e||"integer"===e&&"number"===i.type&&i.isInteger}Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||(0,ft.t)("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||(0,ft.t)('Incorrect type. Expected "{0}".',t.type)}));if(Array.isArray(t.allOf))for(const e of t.allOf){const t=new wt,s=r.newSub();Mt(i,xt(e),t,s,o),n.merge(t),r.merge(s)}const s=xt(t.not);if(s){const e=new wt,a=r.newSub();Mt(i,s,e,a,o),e.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||(0,ft.t)("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,r.add(e)}const a=(e,t)=>{const s=[];let a;for(const n of e){const e=xt(n),c=new wt,l=r.newSub();if(Mt(i,e,c,l,o),c.hasProblems()||s.push(e),a)if(t||c.hasProblems()||a.validationResult.hasProblems()){const t=c.compare(a.validationResult);t>0?a={schema:e,validationResult:c,matchingSchemas:l}:0===t&&(a.matchingSchemas.merge(l),a.validationResult.mergeEnumValues(c))}else a.matchingSchemas.merge(l),a.validationResult.propertiesMatches+=c.propertiesMatches,a.validationResult.propertiesValueMatches+=c.propertiesValueMatches,a.validationResult.mergeProcessedProperties(c);else a={schema:e,validationResult:c,matchingSchemas:l}}return s.length>1&&t&&n.problems.push({location:{offset:i.offset,length:1},message:(0,ft.t)("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),r.merge(a.matchingSchemas)),s.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1);Array.isArray(t.oneOf)&&a(t.oneOf,!0);const c=e=>{const t=new wt,s=r.newSub();Mt(i,xt(e),t,s,o),n.merge(t),r.merge(s)},l=xt(t.if);l&&((e,t,s)=>{const a=xt(e),l=new wt,u=r.newSub();Mt(i,a,l,u,o),r.merge(u),n.mergeProcessedProperties(l),l.hasProblems()?s&&c(s):t&&c(t)})(l,xt(t.then),xt(t.else));if(Array.isArray(t.enum)){const e=It(i);let r=!1;for(const n of t.enum)if(Ze(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:i.offset,length:i.length}
1,code:at.EnumValueMismatch,message:t.errorMessage||(0,ft.t)("Value is not accepted. Valid values: {0}.",t.enum.map(e=>JSON.stringify(e)).join(", "))})}if(Ye(t.const)){Ze(It(i),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:at.EnumValueMismatch,message:t.errorMessage||(0,ft.t)("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let u=t.deprecationMessage;if(u||t.deprecated){u=u||(0,ft.t)("Value is deprecated");let e="property"===i.parent?.type?i.parent:i;n.problems.push({location:{offset:e.offset,length:e.length},severity:$.Warning,message:u,code:at.Deprecated})}}(),i.type){case"object":!function(e){const i=Object.create(null),s=new Set;for(const t of e.properties){const e=t.keyNode.value;i[e]=t.valueNode,s.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!i[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:(0,ft.t)('Missing property "{0}".',r)})}const a=e=>{s.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const s=t.properties[e],c=i[e];if(c)if(et(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||(0,ft.t)("Property {0} is not allowed.",e)})}else{const e=new wt;Mt(c,s,e,r,o),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=ot(e);if(c){const l=[];for(const a of s)if(c.test(a)){l.push(a);const s=i[a];if(s){const i=t.patternProperties[e];if(et(i))if(i)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||(0,ft.t)("Property {0} is not allowed.",a)})}else{const e=new wt;Mt(s,i,e,r,o),n.mergePropertyMatch(e)}}}l.forEach(a)}}const c=t.additionalProperties;if(void 0!==c)for(const e of s){a(e);const s=i[e];if(s)if(!1===c){const r=s.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||(0,ft.t)("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new wt;Mt(s,c,e,r,o),n.mergePropertyMatch(e)}}const l=t.unevaluatedProperties;if(void 0!==l){const e=[];for(const a of s)if(!n.processedProperties.has(a)){e.push(a);const s=i[a];if(s)if(!1===l){const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||(0,ft.t)("Property {0} is not allowed.",a)})}else if(!0!==l){const e=new wt;Mt(s,l,e,r,o),n.mergePropertyMatch(e)}}e.forEach(a)}Qe(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Object has more properties than limit of {0}.",t.maxProperties)});Qe(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Object has fewer properties than the required number of {0}",t.minProperties)});if(t.dependentRequired)for(const e in t.dependentRequired){const n=i[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&f(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=i[e],r=t.dependentSchemas[e];n&&nt(r)&&f(e,r)}if(t.dependencies)for(const e in t.dependencies){i[e]&&f(e,t.dependencies[e])}const u=xt(t.propertyNames);if(u)for(const t of e.properties){const e=t.keyNode;e&&Mt(e,u,n,Et.instance,o)}function f(t,s){if(Array.isArray(s))for(const r of s)i[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Object is missing property {0} required by property {1}.",r,t)});else{const t=xt(s);if(t){const i=new wt;Mt(e,t,i,r,o),n.mergePropertyMatch(i)}}}}(i);break;case"array":!function(e){let i,s;o.schemaDraft>=ct.v2020_12?(i=t.prefixItems,s=Array.isArray(t.items)?void 0:t.items):(i=Array.isArray(t.items)?t.items:void 0,s=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==i){const u=Math.min(i.length,e.items.length);for(;a<u;a++){const f=xt(i[a]),d=new wt,h=e.items[a];h&&(Mt(h,f,d,r,o),n.mergePropertyMatch(d)),n.processedProperties.add(String(a))}}if(void 0!==s&&a<e.items.length)if("boolean"==typeof s)for(!1===s&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Array has too many items according to schema. Expected {0} or fewer.",a)});a<e.items.length;a++)n.processedProperties.add(String(a)),n.propertiesValueMatches++;else for(;a<e.items.length;a++){const p=new wt;Mt(e.items[a],s,p,r,o),n.mergePropertyMatch(p),n.processedProperties.add(String(a))}const c=xt(t.contains);if(c){let m=0;for(let g=0;g<e.items.length;g++){const y=e.items[g],b=new wt;Mt(y,c,b,Et.instance,o),b.hasProblems()||(m++,o.schemaDraft>=ct.v2020_12&&n.processedProperties.add(String(g)))}0!==m||Qe(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||(0,ft.t)("Array does not contain required item.")}),Qe(t.minContains)&&m<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||(0,ft.t)("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),Qe(t.maxContains)&&m>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||(0,ft.t)("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const l=t.unevaluatedItems;if(void 0!==l)for(let v=0;v<e.items.length;v++){if(!n.processedProperties.has(String(v)))if(!1===l)n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Item does not match any validation rule from the array.")});
1else{const k=new wt;Mt(e.items[v],t.unevaluatedItems,k,r,o),n.mergePropertyMatch(k)}n.processedProperties.add(String(v)),n.propertiesValueMatches++}Qe(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Array has too few items. Expected {0} or more.",t.minItems)});Qe(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Array has too many items. Expected {0} or fewer.",t.maxItems)});if(!0===t.uniqueItems){const x=It(e);function S(){for(let e=0;e<x.length-1;e++){const t=x[e];for(let n=e+1;n<x.length;n++)if(Ze(t,x[n]))return!0}return!1}S()&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Array has duplicate items.")})}}(i);break;case"string":!function(e){Qe(t.minLength)&&it(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("String is shorter than the minimum length of {0}.",t.minLength)});Qe(t.maxLength)&&it(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("String is longer than the maximum length of {0}.",t.maxLength)});if(tt(t.pattern)){const r=ot(t.pattern);r?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||(0,ft.t)('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=(0,ft.t)("URI with a scheme is expected.")):r=(0,ft.t)("URI is expected.")}else r=(0,ft.t)("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||(0,ft.t)("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=dt[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(i);break;case"number":!function(e){const r=e.value;function o(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(Qe(t.multipleOf)){let i=-1;if(Number.isInteger(t.multipleOf))i=r%t.multipleOf;else{let e=o(t.multipleOf),n=o(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier<e.multiplier?n.value*=t:e.value*=t,i=n.value%e.value}}0!==i&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Value is not divisible by {0}.",t.multipleOf)})}function i(e,t){return Qe(t)?t:et(t)&&t?e:void 0}function s(e,t){if(!et(t)||!t)return e}const a=i(t.minimum,t.exclusiveMinimum);Qe(a)&&r<=a&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Value is below the exclusive minimum of {0}.",a)});const c=i(t.maximum,t.exclusiveMaximum);Qe(c)&&r>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Value is above the exclusive maximum of {0}.",c)});const l=s(t.minimum,t.exclusiveMinimum);Qe(l)&&r<l&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Value is below the minimum of {0}.",l)});const u=s(t.maximum,t.exclusiveMaximum);Qe(u)&&r>u&&n.problems.push({location:{offset:e.offset,length:e.length},message:(0,ft.t)("Value is above the maximum of {0}.",u)})}(i)}r.add({node:i,schema:t})}function Vt(e,t){const n=[];let r=-1;const o=e.getText(),i=y(o,!1),s=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=i.scan();switch(u(),t){case 12:case 13:Array.isArray(s)&&s.push(N.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,o,i,s,a=$.Error){if(0===n.length||i!==r){const c=N.create(e.positionAt(i),e.positionAt(s));n.push(B.create(c,t,a,o,e.languageId)),r=i}}function l(e,t,n=void 0,r=[],s=[]){let l=i.getTokenOffset(),u=i.getTokenOffset()+i.getTokenLength();if(l===u&&l>0){for(l--;l>0&&/\s/.test(o.charAt(l));)l--;u=l+1}if(c(e,t,l,u),n&&f(n,!1),r.length+s.length>0){let e=i.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==s.indexOf(e))break;e=a()}}return n}function u(){switch(i.getTokenError()){case 4:return l((0,ft.t)("Invalid unicode sequence in string."),at.InvalidUnicode),!0;case 5:return l((0,ft.t)("Invalid escape character in string."),at.InvalidEscapeCharacter),!0;case 3:return l((0,ft.t)("Unexpected end of number."),at.UnexpectedEndOfNumber),!0;case 1:return l((0,ft.t)("Unexpected end of comment."),at.UnexpectedEndOfComment),!0;case 2:return l((0,ft.t)("Unexpected end of string."),at.UnexpectedEndOfString),!0;case 6:return l((0,ft.t)("Invalid characters in string. Control characters must be escaped."),at.InvalidCharacter),!0}return!1}function f(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}const d=new bt(void 0,0,0);function h(t,n){const r=new vt(t,i.getTokenOffset(),d);let o=p(r);if(!o){if(16!==i.getToken())return;{l((0,ft.t)("Property keys must be doublequoted"),at.PropertyKeysMustBeDoublequoted);const e=new bt(r,i.getTokenOffset(),i.getTokenLength());e.value=i.getTokenValue(),o=e,a()}}if(r.keyNode=o,"//"!==o.value){const e=n[o.value];e?(c((0,ft.t)("Duplicate object key"),at.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,$.Warning),nt(e)&&c((0,ft.t)("Duplicate object key"),at.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,$.Warning),n[o.value]=!0):n[o.value]=r}if(6===i.getToken())r.colonOffset=i.getTokenOffset(),a();else if(l((0,ft.t)("Colon expected"),at.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(i.getTokenOffset()).line)return r.length=o.length,r;const s=m(r);return s?(r.valueNode=s,r.length=s.offset+s.length-r.offset,r):l((0,ft.t)("V
1alue expected"),at.ValueExpected,r,[],[2,5])}function p(e){if(10!==i.getToken())return;const t=new bt(e,i.getTokenOffset());return t.value=i.getTokenValue(),f(t,!0)}function m(e){return function(e){if(3!==i.getToken())return;const t=new gt(e,i.getTokenOffset());a();let n=!1;for(;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){n||l((0,ft.t)("Value expected"),at.ValueExpected);const e=i.getTokenOffset();if(a(),4===i.getToken()){n&&c((0,ft.t)("Trailing comma"),at.TrailingComma,e,e+1);continue}}else n&&l((0,ft.t)("Expected comma"),at.CommaExpected);const e=m(t);e?t.items.push(e):l((0,ft.t)("Value expected"),at.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==i.getToken()?l((0,ft.t)("Expected comma or closing bracket"),at.CommaOrCloseBacketExpected,t):f(t,!0)}(e)||function(e){if(1!==i.getToken())return;const t=new kt(e,i.getTokenOffset()),n=Object.create(null);a();let r=!1;for(;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||l((0,ft.t)("Property expected"),at.PropertyExpected);const e=i.getTokenOffset();if(a(),2===i.getToken()){r&&c((0,ft.t)("Trailing comma"),at.TrailingComma,e,e+1);continue}}else r&&l((0,ft.t)("Expected comma"),at.CommaExpected);const e=h(t,n);e?t.properties.push(e):l((0,ft.t)("Property expected"),at.PropertyExpected,void 0,[],[2,5]),r=!0}return 2!==i.getToken()?l((0,ft.t)("Expected comma or closing brace"),at.CommaOrCloseBraceExpected,t):f(t,!0)}(e)||p(e)||function(e){if(11!==i.getToken())return;const t=new yt(e,i.getTokenOffset());if(0===i.getTokenError()){const e=i.getTokenValue();try{const n=JSON.parse(e);if(!Qe(n))return l((0,ft.t)("Invalid number format."),at.Undefined,t);t.value=n}catch(e){return l((0,ft.t)("Invalid number format."),at.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return f(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return f(new pt(e,i.getTokenOffset()),!0);case 8:return f(new mt(e,!0,i.getTokenOffset()),!0);case 9:return f(new mt(e,!1,i.getTokenOffset()),!0);default:return}}(e)}let g;return 17!==a()&&(g=m(g),g?17!==i.getToken()&&l((0,ft.t)("End of file expected."),at.Undefined):l((0,ft.t)("Expected a JSON object, array or literal."),at.Undefined)),new Lt(g,n,s)}function jt(e,t,n){if(null!==e&&"object"==typeof e){const r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let o="[\n";for(let t=0;t<e.length;t++)o+=r+jt(e[t],r,n),t<e.length-1&&(o+=","),o+="\n";return o+=t+"]",o}{const o=Object.keys(e);if(0===o.length)return"{}";let i="{\n";for(let t=0;t<o.length;t++){const s=o[t];i+=r+JSON.stringify(s)+": "+jt(e[s],r,n),t<o.length-1&&(i+=","),i+="\n"}return i+=t+"}",i}}return n(e)}class Ft{constructor(e,t=[],n=Promise,r={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r}doResolve(e){for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},o=e.getText(),i=e.offsetAt(t);let s=n.getNodeFromOffset(i,!0);if(this.isInComment(e,s?s.offset:0,i))return Promise.resolve(r);if(s&&i===s.offset+s.length&&i>0){const e=o[i-1];("object"===s.type&&"}"===e||"array"===s.type&&"]"===e)&&(s=s.parent)}const a=this.getCurrentWord(e,i);let c;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){let n=i-a.length;n>0&&'"'===o[n-1]&&n--,c=N.create(e.positionAt(n),t)}else c=N.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));const l=new Map,u={add:e=>{let t=e.label;const n=l.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"âµ"),t.length>60){const e=t.substr(0,57).trim()+"...";l.has(e)||(t=e)}e.textEdit=K.replace(c,e.insertText),e.label=t,l.set(t,e),r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then(t=>{const f=[];let d,h=!0,p="";if(s&&"string"===s.type){const e=s.parent;e&&"property"===e.type&&e.keyNode===s&&(h=!e.valueNode,d=e,p=o.substr(s.offset+1,s.length-2),e&&(s=e.parent))}if(s&&"object"===s.type){if(s.offset===i)return r;
1s.properties.forEach(e=>{d&&d===e||l.set(e.keyNode.value,fe.create("__"))});let m="";h&&(m=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,s,h,m,u):this.getSchemaLessPropertyCompletions(n,s,p,u);const g=Ot(s);this.contributions.forEach(t=>{const n=t.collectPropertyCompletions(e.uri,g,a,h,""===m,u);n&&f.push(n)}),!t&&a.length>0&&'"'!==o.charAt(i-a.length-1)&&(u.add({kind:ie.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,m),insertTextFormat:se.Snippet,documentation:""}),u.setAsIncomplete())}const m={};return t?this.getValueCompletions(t,n,s,i,e,u,m):this.getSchemaLessValueCompletions(n,s,i,e,u),this.contributions.length>0&&this.getContributedValueCompletions(n,s,i,e,u,f),this.promiseConstructor.all(f).then(()=>{if(0===u.getNumberOfProposals()){let t=i;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(m,n,u)}return r})})}
1getPropertyCompletions(e,t,n,r,o,i){t.getMatchingSchemas(e.schema,n.offset).forEach(e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach(e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:ie.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,o),insertTextFormat:se.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&rt(t.insertText,`$1${o}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(t)}});const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const s={kind:ie.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,o),insertTextFormat:se.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(s.sortText=n.suggestSortText),s.insertText&&rt(s.insertText,`$1${o}`)&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(s)};if(n.enum)for(let t=0;t<n.enum.length;t++){let r;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?r=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(r=n.enumDescriptions[t]),e(n.enum[t],r)}n.const&&e(n.const)}}})}getSchemaLessPropertyCompletions(e,t,n,r){const o=e=>{e.properties.forEach(e=>{const t=e.keyNode.value;r.add({kind:ie.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:se.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})})};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0))}else"array"===t.parent.type&&t.parent.items.forEach(e=>{"object"===e.type&&e!==t&&o(e)});else"object"===t.type&&r.add({kind:ie.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:se.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,o){let i=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(i=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:se.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:se.Snippet,documentation:""});const s=this.evaluateSeparatorAfter(r,i),a=e=>{e.parent&&!Nt(e.parent,n,!0)&&o.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,s),insertTextFormat:se.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const i=t.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===i&&e.valueNode&&a(e.valueNode),!0)),"$schema"===i&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,o,i,s){let a,c,l=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(l=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const u=this.evaluateSeparatorAfter(o,l),f=t.getMatchingSchemas(e.sc
1hema,n.offset,c);for(const e of f)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=i;if(e.schema.uniqueItems){const e=new Set;n.children.forEach(t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(It(t)))}),t={...i,add(t){e.has(t.label)||i.add(t)}}}if(Array.isArray(e.schema.items)){const i=this.findItemAtOffset(n,o,r);i<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[i],u,t,s)}else this.addSchemaValueCompletions(e.schema.items,u,t,s)}if(void 0!==a){let t=!1;if(e.schema.properties){const n=e.schema.properties[a];n&&(t=!0,this.addSchemaValueCompletions(n,u,i,s))}if(e.schema.patternProperties&&!t)for(const n of Object.keys(e.schema.patternProperties)){const r=ot(n);if(r?.test(a)){t=!0;const r=e.schema.patternProperties[n];this.addSchemaValueCompletions(r,u,i,s)}}if(e.schema.additionalProperties&&!t){const t=e.schema.additionalProperties;this.addSchemaValueCompletions(t,u,i,s)}}}"$schema"!==a||n.parent||this.addDollarSchemaCompletions(u,i),s.boolean&&(this.addBooleanValueCompletion(!0,u,i),this.addBooleanValueCompletion(!1,u,i)),s.null&&this.addNullValueCompletion(u,i)}}else this.addSchemaValueCompletions(e.schema,"",i,s)}getContributedValueCompletions(e,t,n,r,o,i){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),t&&"property"===t.type&&n>(t.colonOffset||0)){const e=t.keyNode.value,s=t.valueNode;if((!s||n<=s.offset+s.length)&&t.parent){const n=Ot(t.parent);this.contributions.forEach(t=>{const s=t.collectValueCompletions(r.uri,n,e,o);s&&i.push(s)})}}}else this.contributions.forEach(e=>{const t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)})}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.anyOf)&&e.anyOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.oneOf)&&e.oneOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)))}addDefaultValueCompletions(e,t,n,r=0){let o=!1;if(Ye(e.default)){let i=e.type,s=e.default;for(let e=r;e>0;e--)s=[s],i="array";const a={kind:this.getSuggestionKind(i),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:se.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:(0,ft.t)("Default value")}:a.detail=(0,ft.t)("Default value"),n.add(a),o=!0}Array.isArray(e.examples)&&e.examples.forEach(i=>{let s=e.type,a=i;for(let e=r;e>0;e--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:se.Snippet}),o=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(i=>{let s,a,c=e.type,l=i.body,u=i.label;if(Ye(l)){e.type;for(let e=r;e>0;e--)l=[l];s=this.getInsertTextForSnippetValue(l,t),a=this.getFilterTextForSnippetValue(l),u=u||this.getLabelForSnippetValue(l)}else{if("string"!=typeof i.bodyText)return;{let e="",n="",o="";for(let t=r;t>0;t--)e=e+o+"[\n",n=n+"\n"+o+"]",o+="\t",c="array";s=e+o+i.bodyText.split("\n").join("\n"+o)+n+t,u=u||s,a=s.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(c),label:u,documentation:this.fromMarkup(i.markdownDescription)||i.description,insertText:s,insertTextFormat:se.Snippet,filterText:a}),o=!0}),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(Ye(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:se.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,o=e.enum.length;r<o;r++){const o=e.enum[r];let i=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?i=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(i=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:se.Snippet,documentation:i})}}collectTypes(e,t){if(Array.isArray(e.enum)||Ye(e.const))return;const n=e.type;
1Array.isArray(n)?n.forEach(e=>t[e]=!0):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:se.Snippet,detail:(0,ft.t)("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:se.Snippet,detail:(0,ft.t)("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:se.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:se.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds(e=>"http"===e||"https"===e).forEach(n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:ie.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:se.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return jt(e,"",e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return ie.Value;switch(e){case"string":default:return ie.Value;case"object":return ie.Module;case"property":return ie.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const o=this.getInsertTextForValue(e,"");if(!n)return o;const i=o+": ";let s,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;Ye(e)&&(s=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(s||1!==t.enum.length||(s=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),Ye(t.const)&&(s||(s=this.getInsertTextForGuessedValue(t.const,"")),a++),Ye(t.default)&&(s||(s=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(s||(s=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":s="$1";break;case"string":s='"$1"';break;case"object":s="{$1}";break;case"array":s="[$1]";break;case"number":case"integer":s="${1:0}";break;case"null":s="${1:null}";break;default:return o}}}return(!s||a>1)&&(s="$1"),i+s+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=y(e.getText(),!0);n.setPosition(t);switch(n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=y(t.getText(),!0),o=e.items;for(let e=o.length-1;e>=0;e--){const t=o[e];if(n>t.offset+t.length){r.setPosition(t.offset+t.length);return 5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e}if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=y(e.getText(),!1);r.setPosition(t);let o=r.scan();for(;17!==o&&r.getTokenOffset()+r.getTokenLength()<n;)o=r.scan();return(12===o||13===o)&&r.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:re.Markdown,value:e}}doesSupportMarkdown(){if(!Ye(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(re.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){return Ye(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return Ye(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}
1class Dt{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){const r=e.offsetAt(t);let o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);const i=o;if("string"===o.type){const e=o.parent;if(e&&"property"===e.type&&e.keyNode===o&&(o=e.valueNode,!o))return this.promise.resolve(null)}const s=N.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),a=e=>({contents:e,range:s}),c=Ot(o);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then(e=>a(e))}return this.schemaService.getSchemaForResource(e.uri,n).then(e=>{if(e&&o){let t,r,i,s;n.getMatchingSchemas(e.schema,o.offset).every(e=>{if(e.node===o&&!e.inverted&&e.schema&&(t=t||e.schema.title,r=r||e.schema.markdownDescription||_t(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(It(o));e.schema.markdownEnumDescriptions?i=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(i=_t(e.schema.enumDescriptions[t])),i&&(s=e.schema.enum[t],"string"!=typeof s&&(s=JSON.stringify(s)))}return!0});let c="";return t&&(c=_t(t)),r&&(c.length>0&&(c+="\n\n"),c+=r),i&&(c.length>0&&(c+="\n\n"),c+=`\`${function(e){if(-1!==e.indexOf("`"))return"`` "+e+" ``";return e}(s)}\`: ${i}`),a([c])}return null})}}function _t(e){if(e){return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}class $t{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:$.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const o=[],i={},s=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;i[t]||(i[t]=!0,o.push(e))},a=r=>{let i=n?.trailingCommas?qt(n.trailingCommas):$.Error,a=n?.comments?qt(n.comments):this.commentSeverity,c=n?.schemaValidation?qt(n.schemaValidation):$.Warning,l=n?.schemaRequest?qt(n.schemaRequest):$.Warning;if(r){const o=(n,r)=>{if(t.root&&l){const o=t.root,i="object"===o.type?o.properties[0]:void 0;if(i&&"$schema"===i.keyNode.value){const t=i.valueNode||i,o=N.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));s(B.create(o,n,l,r))}else{const t=N.create(e.positionAt(o.offset),e.positionAt(o.offset+1));s(B.create(t,n,l,r))}}};if(r.errors.length)o(r.errors[0],at.SchemaResolveError);else if(c){for(const e of r.warnings)o(e,at.SchemaUnsupportedFeature);const i=t.validate(e,r.schema,c,n?.schemaDraft);i&&i.forEach(s)}Ut(r.schema)&&(a=void 0),Bt(r.schema)&&(i=void 0)}for(const e of t.syntaxErrors){if(e.code===at.TrailingComma){if("number"!=typeof i)continue;e.severity=i}s(e)}if("number"==typeof a){const e=(0,ft.t)("Comments are not permitted in JSON.");t.comments.forEach(t=>{s(B.create(t,e,a,at.CommentNotPermitted))})}return o};if(r){const e=r.id||"schemaservice://untitled/"+Rt++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then(e=>a(e))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(e=>a(e))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}}let Rt=0;function Ut(e){if(e&&"object"==typeof e){if(et(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=Ut(t);if(et(e))return e}}}function Bt(e){if(e&&"object"==typeof e){if(et(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(et(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=Bt(t);if(et(e))return e}}}function qt(e){switch(e){case"error":return $.Error;case"warning":return $.Warning;case"ignore":return}}function Kt(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Ht(e){if("#"===e[0])switch(e.length){case 4:return{red:17*Kt(e.charCodeAt(1))/255,green:17*Kt(e.charCodeAt(2))/255,blue:17*Kt(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Kt(e.charCodeAt(1))/255,green:17*Kt(e.charCodeAt(2))/255,blue:17*Kt(e.charCodeAt(3))/255,alpha:17*Kt(e.charCodeAt(4))/255};case 7:return{red:(16*Kt(e.charCodeAt(1))+Kt(e.charCodeAt(2)))/255,green:(16*Kt(e.charCodeAt(3))+Kt(e.charCodeAt(4)))/255,blue:(16*Kt(e.charCodeAt(5))+Kt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Kt(e.charCodeAt(1))+Kt(e.charCodeAt(2)))/255,green:(16*Kt(e.charCodeAt(3))+Kt(e.charCodeAt(4)))/255,blue:(16*Kt(e.charCodeAt(5))+Kt(e.charCodeAt(6)))/255,alpha:(16*Kt(e.charCodeAt(7))+Kt(e.charCodeAt(8)))/255}}}class Jt{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||rt(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=L.create(e.uri,Wt(e,s));if(t.push({name:zt(r.valueNode),kind:ve.Function,location:a}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[{node:r,containerName:""}];let a=0,c=!1;const l=[],u=(t,n)=>
1{"array"===t.type?t.items.forEach(e=>{e&&s.push({node:e,containerName:n})}):"object"===t.type&&t.properties.forEach(t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=L.create(e.uri,Wt(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;l.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:i,containerName:n}),s.push({node:r,containerName:a})}else c=!0})};for(;a<s.length;){const e=s[a++];u(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),l}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||rt(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=Wt(e,s),c=Wt(e,r.keyNode);if(t.push({name:zt(r.valueNode),kind:ve.Function,range:a,selectionRange:c}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[],a=[{node:r,result:s}];let c=0,l=!1;const u=(t,n)=>{"array"===t.type?t.items.forEach((t,r)=>{if(t)if(o>0){o--;const i=Wt(e,t),s=i,c={name:String(r),kind:this.getSymbolKind(t.type),range:i,selectionRange:s,children:[]};n.push(c),a.push({result:c.children,node:t})}else l=!0}):"object"===t.type&&t.properties.forEach(t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=Wt(e,t),s=Wt(e,t.keyNode),c=[],l={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:i,selectionRange:s,children:c,detail:this.getDetail(r)};n.push(l),a.push({result:c,node:r})}else l=!0})};for(;c<a.length;){const e=a[c++];u(e.node,e.result)}return l&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),s}getSymbolKind(e){switch(e){case"object":return ve.Module;case"string":return ve.String;case"number":return ve.Number;case"array":return ve.Array;case"boolean":return ve.Boolean;default:return ve.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"âµ")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e)return"boolean"===e.type||"number"===e.type||"null"===e.type||"string"===e.type?String(e.value):"array"===e.type?e.children.length?void 0:"[]":"object"===e.type?e.children.length?void 0:"{}":void 0}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{const o=[];if(r){let i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const s=t.getMatchingSchemas(r.schema),a={};for(const t of s)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const s=Ht(It(t.node));if(s){const n=Wt(e,t.node);o.push({color:s,range:n})}if(a[r]=!0,i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o})}getColorPresentations(e,t,n,r){const o=[],i=Math.round(255*n.red),s=Math.round(255*n.green),a=Math.round(255*n.blue);function c(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let l;return l=1===n.alpha?`#${c(i)}${c(s)}${c(a)}`:`#${c(i)}${c(s)}${c(a)}${c(Math.round(255*n.alpha))}`,o.push({label:l,textEdit:K.replace(r,JSON.stringify(l))}),o}}function Wt(e,t){return N.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function zt(e){return It(e)||(0,ft.t)("<empty>")}const Gt={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","
1ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Xt={id:(0,ft.t)("A unique identifier for the schema."),$schema:(0,ft.t)("The schema to verify this document against."),title:(0,ft.t)("A descriptive title of the element."),description:(0,ft.t)("A long description of the element. Used in hover menus and suggestions."),default:(0,ft.t)("A default value. Used by suggestions."),multipleOf:(0,ft.t)("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:(0,ft.t)("The maximum numerical value, inclusive by default."),exclusiveMaximum:(0,ft.t)("Makes the maximum property exclusive."),minimum:(0,ft.t)("The minimum numerical value, inclusive by default."),exclusiveMinimum:(0,ft.t)("Makes the minimum property exclusive."),maxLength:(0,ft.t)("The maximum length of a string."),minLength:(0,ft.t)("The minimum length of a string."),pattern:(0,ft.t)("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:(0,ft.t)("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:(0,ft.t)("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:(0,ft.t)("The maximum number of items that can be inside an array. Inclusive."),minItems:(0,ft.t)("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:(0,ft.t)("If all of the items in the array must be unique. Defaults to false."),maxProperties:(0,ft.t)("The maximum number of properties an object can have. Inclusive."),minProperties:(0,ft.t)("The minimum number of properties an object can have. Inclusive."),required:(0,ft.t)("An array of str
1ings that lists the names of all properties required on this object."),additionalProperties:(0,ft.t)("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:(0,ft.t)("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:(0,ft.t)("A map of property names to schemas for each property."),patternProperties:(0,ft.t)("A map of regular expressions on property names to schemas for matching properties."),dependencies:(0,ft.t)("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:(0,ft.t)("The set of literal values that are valid."),type:(0,ft.t)("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:(0,ft.t)("Describes the format expected for the value."),allOf:(0,ft.t)("An array of schemas, all of which must match."),anyOf:(0,ft.t)("An array of schemas, where at least one must match."),oneOf:(0,ft.t)("An array of schemas, exactly one of which must match."),not:(0,ft.t)("A schema which must not match."),$id:(0,ft.t)("A unique identifier for the schema."),$ref:(0,ft.t)("Reference a definition hosted on any location."),$comment:(0,ft.t)("Comments from schema authors to readers or maintainers of the schema."),readOnly:(0,ft.t)("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:(0,ft.t)("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:(0,ft.t)('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:(0,ft.t)("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:(0,ft.t)("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:(0,ft.t)("Describes the media type of a string property."),contentEncoding:(0,ft.t)("Describes the content encoding of a string property."),if:(0,ft.t)('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:(0,ft.t)('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:(0,ft.t)('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in Gt.schemas){const t=Gt.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=Xt[e];r&&(n.description=r)}}var Zt=n(52181);function Qt(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const o=!!t,i=!!t;let s=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e<t;e++)switch(c=n[e],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(o){r+=".";break}case"[":case"]":if(o){r+=c;break}case"{":if(o){s=!0,r+="(";break}case"}":if(o){s=!1,r+=")";break}case",":if(s){r+="|";break}r+="\\"+c;break;case"*":const t=n[e-1];let a=1;for(;"*"===n[e+1];)a++,e++;const l=n[e+1];if(i){a>1&&("/"===t||void 0===t||"{"===t||","===t)&&("/"===l||void 0===l||","===l||"}"===l)?("/"===l?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}else r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}class Yt{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:Qt("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=an(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}}class en{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new tn(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}}class tn{constructor(e,t=[]){this.schema=e,this.errors=t}}class nn{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return xt(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();
1if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const o=ot(r);if(o?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class rn{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{const n=Zt.r.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=sn(e)],r=Object.keys(this.schemasById).map(e=>this.schemasById[e]);for(;n.length;){const e=n.pop();for(let o=0;o<r.length;o++){const i=r[o];i&&(i.uri===e||i.dependencies.has(e))&&(i.uri!==e&&n.push(i.uri),i.clearSchema()&&(t=!0),r[o]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=sn(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let e of t){const t=e.uris.map(sn),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new en(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new Yt(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=sn(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=sn(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=(0,ft.t)("Unable to load schema from '{0}'. No schema request service available",cn(e));return this.promise.resolve(new tn({},[t]))}return e.startsWith("http://json-schema.org/")&&(e="https"+e.substring(4)),this.requestService(e).then(t=>{if(!t){const t=(0,ft.t)("Unable to load schema from '{0}': No content.",cn(e));return new tn({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push((0,ft.t)("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",cn(e))),t=t.trimStart());let r={};const o=[];return r=k(t,o),o.length&&n.push((0,ft.t)("Unable to parse content from '{0}': Parse error at offset {1}.",cn(e),o[0].offset)),new tn(r,n)},t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),rt(n,".")&&(n=n.substr(0,n.length-1)),new tn({},[(0,ft.t)("Unable to load schema from '{0}': {1}.",cn(e),n)])})}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let o=r.$schema?sn(r.$schema):void 0;if("http://json-schema.org/draft-03/schema"===o)return this.promise.resolve(new nn({},[(0,ft.t)("Draft-03 schemas are not supported.")],[],o));let i=new Set;const s=this.contextService,a=(e,t,r,o)=>{let i;i=void 0===o||0===o.length?t:"/"===o.charAt(0)?((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some(e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n)),n})(t,o):((e,t,n)=>(t.anchors||(t.anchors=u(e)),t.anchors.get(n)))(t,r,o),i?((e,t)=>
1{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,i):n.push((0,ft.t)("$ref '{0}' in '{1}' can not be resolved.",o||"",r.uri))},c=(e,t,r,o)=>{s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,o.uri)),t=sn(t);const i=this.getOrAddSchemaHandle(t);return i.getUnresolvedSchema().then(s=>{if(o.dependencies.add(t),s.errors.length){const e=r?t+"#"+r:t;n.push((0,ft.t)("Problems loading reference '{0}': {1}",e,s.errors[0]))}return a(e,s.schema,i,r),l(e,s.schema,i)})},l=(e,t,n)=>{const r=[];return this.traverseNodes(e,e=>{const o=new Set;for(;e.$ref;){const i=e.$ref,s=i.split("#",2);if(delete e.$ref,s[0].length>0)return void r.push(c(e,s[0],s[1],n));if(!o.has(i)){const r=s[1];a(e,t,n,r),o.add(i)}}e.$recursiveRef&&i.add("$recursiveRef"),e.$dynamicRef&&i.add("$dynamicRef")}),this.promise.all(r)},u=e=>{const t=new Map;return this.traverseNodes(e,e=>{const r=e.$id||e.id,o=tt(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;o&&(t.has(o)?n.push((0,ft.t)("Duplicate anchor declaration: '{0}'",o)):t.set(o,e)),e.$recursiveAnchor&&i.add("$recursiveAnchor"),e.$dynamicAnchor&&i.add("$dynamicAnchor")}),t};return l(r,r,t).then(e=>{let t=[];return i.size&&t.push((0,ft.t)("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(i.keys()).join(", "))),new nn(r,n,t,o)})}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)nt(t)&&a.push(t)},o=(...e)=>{for(const t of e)if(nt(t))for(const e in t){const n=t[e];nt(n)&&a.push(n)}},i=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)nt(e)&&a.push(e)},s=e=>{if(Array.isArray(e))for(const t of e)nt(t)&&a.push(t);else nt(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),i(c.anyOf,c.allOf,c.oneOf,c.prefixItems),s(c.items)),c=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=an(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=sn(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(e=>({$ref:e}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+on++;return this.addSchemaHandle(e,n).getResolvedSchema().then(e=>
1t.getMatchingSchemas(e.schema).filter(e=>!e.inverted))}return this.getSchemaForResource(e.uri,t).then(e=>e?t.getMatchingSchemas(e.schema).filter(e=>!e.inverted):[])}}let on=0;function sn(e){try{return Zt.r.parse(e).toString(!0)}catch(t){return e}}function an(e){try{return Zt.r.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function cn(e){try{const t=Zt.r.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function ln(e,t){const n=[],r=[],o=[];let i=-1;const s=y(e.getText(),!1);let a=s.scan();function c(e){n.push(e),r.push(o.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(s.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};o.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(o.length>0&&o[o.length-1].kind===t){const t=o.pop(),n=e.positionAt(s.getTokenOffset()).line;t&&n>t.startLine+1&&i!==t.startLine&&(t.endLine=n-1,c(t),i=t.startLine)}break}case 13:{const t=e.positionAt(s.getTokenOffset()).line,n=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;1===s.getTokenError()&&t+1<e.lineCount?s.setPosition(e.offsetAt(O.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:F.Comment}),i=t);break}case 12:{const t=e.getText().substr(s.getTokenOffset(),s.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){const n=e.positionAt(s.getTokenOffset()).line;if(t[1]){const e={startLine:n,endLine:n,kind:F.Region};o.push(e)}else{let e=o.length-1;for(;e>=0&&o[e].kind!==F.Region;)e--;if(e>=0){const t=o[e];o.length=e,n>t.startLine&&i!==t.startLine&&(t.endLine=n,c(t),i=t.startLine)}}}break}}a=s.scan()}const l=t&&t.rangeLimit;if("number"!=typeof l||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const u=[];for(let e of r)e<30&&(u[e]=(u[e]||0)+1);let f=0,d=0;for(let e=0;e<u.length;e++){const t=u[e];if(t){if(t+f>l){d=e;break}f+=t}}const h=[];for(let e=0;e<n.length;e++){const t=r[e];"number"==typeof t&&(t<d||t===d&&f++<l)&&h.push(n[e])}return h}function un(e,t,n){function r(t,n){return N.create(e.positionAt(t),e.positionAt(n))}const o=y(e.getText(),!0);function i(e,t){return o.setPosition(e),o.scan()===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map(function(t){let o=e.offsetAt(t),s=n.getNodeFromOffset(o,!0);const a=[];for(;s;){switch(s.type){case"string":case"object":case"array":const e=s.offset+1,t=s.offset+s.length-1;e<t&&o>=e&&o<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length))}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=i(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let c;for(let e=a.length-1;e>=0;e--)c=Le.create(a[e],c);return c||(c=Le.create(N.create(t,t))),c})}function fn(e,t,n){let r;if(n){const t=e.offsetAt(n.start);r={offset:t,length:e.offsetAt(n.end)-t}}const o={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return function(e,t,n){return h(e,t,n)}(e.getText(),r,o).map(t=>K.replace(N.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content))}var dn;!function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"}(dn||(dn={}));class hn{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:function(e,t,n){const r=t.propertyName.toLowerCase(),o=e[0].propertyName.toLowerCase(),i=e[e.length-1].propertyName.toLowerCase();if(r<o)return 0;if(r>i)return e.length;let s=0,a=e.length-1;for(;s<=a;){let r=a+s>>1,o=n(t,e[r]);if(o>0)s=r+1;else{if(!(o<0))return r;a=r-1}}return-s-1}(this.childrenProperties,e,pn),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}}function pn(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function mn(e,t){const n={...t,keepLines:!1},r=ut.V.applyEdits(e,fn(e,n,void 0)),o=ut.V.create("test://test.json","json",0,r),i=function(e,t){if(0===t.childrenProperties.length)return e;const n=ut.V.create("test://test.json","json",0,e.getText()),r=[];gn(r,t,t.beginningLineNumber);for(;r.length>0;){const t=r.shift(),o=t.propertyTreeArray;let i=t.beginningLineNumber;for(let t=0;t<o.length;t++){const s=o[t],a=N.create(O.create(s.beginningLineNumber,0),O.create(s.endLineNumber+1,0)),c=e.getText(a),l=ut.V.create("test://test.json","json",0,c);if(!0===s.lastProperty&&t!==o.length-1){const e=s.lineWhereToAddComma-s.beginningLineNumber,t=s.indexWhereToAddComa,n={range:N.create(O.create(e,t),O.create(e,t)),text:","};ut.V.update(l,[n],1)}else if(!1===s.lastProperty&&t===o.length-1){const e=s.commaIndex,t=s.commaLine-s.beginningLineNumber,n={range:N.create(O.create(t,e),O.create(t,e+1)),text:""};ut.V.update(l,[n],1)}const u=s.endLineNumber-s.beginningLineNumber+1,f={range:N.create(O.create(i,0),O.create(i+u,0)),text:l.getText()};ut.V.update(n,[f],1),gn(r,s,i),i+=u}}return n}(o,function(e){const t=e.getText(),n=y(t,!1);let r,o,i,s=new hn,a=s,c=s,l=s,u=0,f=0,d=-1,h=-1,p=0,m=0,g=[],b=!1,v=!1;for(;17!==(r=n.scan());){if(!0===b&&14!==r&&15!==r&&12!==r&&13!==r&&void 0===c.endLineNumber){let e=n.getTokenStartLine();2===i||4===i?l.endLineNumber=e-1:c.endLineNumber=e-1,p=e,b=!1}if(!0===v&&14!==r&&15!==r&&12!==r&&13!==r&&(p=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==u){for(let t=u;t<n.getTokenStartLine();t++){f+=e.getText(N.create(O.create(t,0),O.create(t+1,0))).length}u=n.getTokenStartLine()}switch(r){case 10:if(void 0===o||1===o||5===o&&g[g.length-1]===dn.Object){const e=new hn(n.getTokenValue(),p);l=c,c=a.addChildProperty(e)}break;case 3:if(void 0===s.beginningLineNumber&&(s.beginningLineNumber=n.getTokenStartLine()),g[g.length-1]===dn.Object)a=c;else if(g[g.length-1]===dn.Array){const e=new hn(n.getTokenValue(),p);e.noKeyName=!0,l=c,c=a.addChildProperty(e),a=c}g.push(dn.Array),c.type=dn.Array,p=n.getTokenStartLine(),p++;break;case 1:if(void 0===s.beginningLineNumber)s.beginningLineNumber=n.getTokenStartLine();else if(g[g.length-1]===dn.Array){const e=new hn(n.getTokenValue(),p);e.noKeyName=!0,l=c,c=a.addChildProperty(e)}c.type=dn.Object,g.push(dn.Object),a=c,p=n.getTokenStartLine(),p++;break;case 4:m=n.getTokenStartLine(),g.pop(),void 0!==c.endLineNumber||2!==o&&4!==o||(c.endLineNumber=m-1,c.lastProperty=!0,c.lineWhereToAddComma=d,c.indexWhereToAddComa=h,l=c,c=c?c.parent:void 0,a=c),s.endLineNumber=m,p=m+1;break;case 2:m=n.getTokenStartLine(),g.pop(),1!==o&&(void 0===c.endLineNumber&&(c.endLineNumber=m-1,c.lastProperty=!0,c.lineWhereToAddComma=d,c.indexWhereToAddComa=h),l=c,c=c?c.parent:void 0,a=c),s.endLineNumber=n.getTokenStartLine(),p=m+1;break;case 5:m=n.getTokenStartLine(),void 0!==c.endLineNumber||g[g.length-1]!==dn.Object&&(g[g.length-1]!==dn.Array||2!==o&&4!==o)||(c.endLineNumber=m,c.commaIndex=n.getTokenOffset()-f,c.commaLine=m),2!==o&&4!==o||(l=c,c=c?c.parent:void 0,a=c),p=m+1;break;case 13:5!==o||d!==n.getTokenStartLine()||(g[g.length-1]!==dn.Array||2!==i&&4!==i)&&g[g.length-1]!==dn.Object||(g[g.length-1]!==dn.Array||2!==i&&4!==i)&&g[g.length-1]!==dn.Object||(c.endLineNumber=void 0,b=!0),1!==o&&3!==o||d!==n.getTokenStartLine()||(v=!0)}14!==r&&13!==r&&12!==r&&15!==r&&(i=o,o=r,d=n.getTokenStartLine(),h=n.getTokenOffset()+n.getTokenLength()-f)}return s}(o)),s=fn(i,n,void 0),a=ut.V.applyEdits(i,s);return[K.replace(N.create(O.create(0,0),e.positionAt(e.getText().length)),a)]}function gn(e,t,n){if(0!==t.childrenProperties.length)if(t.type===dn.Object){let r=1/0;for(const e of t.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);n+=r-t.beginningLineNumber,e.push(new bn(n,t.childrenProperties))}else t.type===dn.Array&&yn(e,t,n)}function yn(e,t,n){for(const r of t.childrenProperties){if(r.type===dn.Object){let o=1/0;for(const e of r.childrenProperties)e.beginningLineNumber<o&&(o=e.beginningLineNumber);const i=o-r.beginningLineNumber;e.push(new bn(n+r.beginningLineNumber-t.beginningLineNumber+i,r.childrenProperties))}r.type===dn.Array&&yn(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}class bn{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}}function vn(e,t){const n=[];return t.visit(r=>{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const o=r.valueNode.value,i=function(e,t){const n=function(e){if("#"===e)return[];if("#"!==e[0]||"/"!==e[1])return null;return e.substring(2).split(/\//).map(Sn)}(t);if(!n)return null;return xn(n,e.root)}(t,o);if(i){const t=e.positionAt(i.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:kn(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function kn(e,t){return N.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function xn(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find(e=>e.keyNode.value===n);return r?xn(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),o=t.items[r];return o?xn(e,o):null}return null}function Sn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function An(e){const t=e.promiseConstructor||Promise,n=new rn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Gt);const r=new Ft(n,e.contributions,t,e.clientCapabilities),o=new Dt(n,e.contributions,t),i=new Jt(n),s=new $t(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),s.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:e=>Vt(e,{collectComments:!0}),newJSONDocument:(e,t)=>
1function(e,t=[]){return new Lt(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:o.doHover.bind(o),getFoldingRanges:ln,getSelectionRanges:un,findDefinition:()=>Promise.resolve([]),findLinks:vn,format:(e,t,n)=>fn(e,n,t),sort:(e,t)=>mn(e,t)}}let Tn;"undefined"!=typeof fetch&&(Tn=function(e){return fetch(e).then(e=>e.text())});class Cn{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=An({workspaceContext:{resolveRelativePath:(e,t)=>function(e,t){if(function(e){return e.charCodeAt(0)===En}(t)){const n=Zt.r.parse(e),r=t.split("/");return n.with({path:In(r)}).toString()}return function(e,...t){const n=Zt.r.parse(e),r=n.path.split("/");for(let e of t)r.push(...e.split("/"));return n.with({path:In(r)}).toString()}(e,t)}(t.substr(0,t.lastIndexOf("/")+1),e)},schemaRequestService:t.enableSchemaRequest?Tn:void 0,clientCapabilities:lt.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let e=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,e,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,r)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,r)}async format(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let o=this._languageService.format(r,t,n);return Promise.resolve(o)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(r)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Promise.resolve(r)}async getColorPresentations(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let o=this._languageService.parseJSONDocument(r),i=this._languageService.getColorPresentations(r,o,t,n);return Promise.resolve(i)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.getFoldingRanges(n,t);return Promise.resolve(r)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),o=this._languageService.getSelectionRanges(n,t,r);return Promise.resolve(o)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return ut.V.create(e,this._languageId,n.version,n.getValue());return null}}const En="/".charCodeAt(0),wn=".".charCodeAt(0);function In(e){const t=[];for(const n of e)0===n.length||1===n.length&&n.charCodeAt(0)===wn||(2===n.length&&n.charCodeAt(0)===wn&&n.charCodeAt(1)===wn?t.pop():t.push(n));e.length>1&&0===e[e.length-1].length&&t.push("");let n=t.join("/");return 0===e[0].length&&(n="/"+n),n}self.onmessage=()=>{(0,o.n)((e,t)=>new Cn(e,t))}}};const t={};function n(r){const o=t[r];if(void 0!==o){if(void 0!==o.error)throw o.error;return o.exports}let i=t[r]={exports:{}};try{const t={id:r,module:i,factory:e[r],require:n};
1n.i.forEach(function(e){e(t)}),i=t.module,t.factory.call(i.exports,i,i.exports,t.require)}catch(e){throw i.error=e,e}return i.exports}n.m=e,n.c=t,n.i=[],n.x=()=>{let e=n.O(void 0,[9963,1441,5323],()=>n(42084));return e=n.O(e),e},(()=>{const e=[];n.O=(t,r,o,i)=>{if(r){i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];return void(e[s]=[r,o,i])}let a=1/0;for(s=0;s<e.length;s++){let[r,o,i]=e[s],l=!0;for(var c=0;c<r.length;c++)1&i&&!(a>=i)||!Object.keys(n.O).every(e=>n.O[e](r[c]))?(l=!1,i<a&&(a=i)):r.splice(c--,1);if(l){e.splice(s--,1);const n=o();void 0!==n&&(t=n)}}return t}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],i=t[r++],s=0===i?{enumerable:!0,value:t[r++]}:{enumerable:!0,get:i};n.o(e,o)||Object.defineProperty(e,o,s)}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>e+"."+{1441:"1f8869b2e0990c2b9c1e",2084:"80b3ed62a48e662e1d94",5323:"de5d8a9a81f366b8289d",9963:"78f460b20291779abe43"}[e]+".bundle.js",n.hu=e=>e+"."+n.h()+".hot-update.js",n.miniCssF=e=>{},n.hmrF=()=>"7912c124f148c53c9041."+n.h()+".hot-update.json",n.h=()=>"baee68fd4d9fa9f7955c",n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e,t,r,o={},i=n.c,s=[],a=[],c="idle",l=0,u=[];function f(e){c=e;for(var t=[],n=0;n<a.length;n++)t[n]=a[n].call(null,e);return Promise.all(t).then(function(){})}function d(){0===--l&&f("ready").then(function(){if(0===l){var e=u;u=[];for(var t=0;t<e.length;t++)e[t]()}})}function h(e){switch(c){case"ready":f("prepare");case"prepare":return l++,e.then(d,d),e;default:return e}}function p(e){if("idle"!==c)throw new Error("check() is only allowed in idle status");return f("check").then(n.hmrM).then(function(r){return r?f("prepare").then(function(){var o=[];return t=[],Promise.all(Object.keys(n.hmrC).reduce(function(e,i){return n.hmrC[i](r.c,r.r,r.m,e,t,o,r.css,r.f),e},[])).then(function(){return t=function(){return e?g(e):f("ready").then(function(){return o})},0===l?t():new Promise(function(e){u.push(function(){e(t())})});var t})}):f(y()?"ready":"idle").then(function(){return null})})}function m(e){return"ready"!==c?Promise.resolve().then(function(){throw new Error("apply() is only allowed in ready status (state: "+c+")")}):g(e)}function g(e){e=e||{},y();var n=t.map(function(t){return t(e)});t=void 0;var o=n.map(function(e){return e.error}).filter(Boolean);if(o.length>0)return f("abort").then(function(){throw o[0]});var i=f("dispose");n.forEach(function(e){e.dispose&&e.dispose()});var s,a=f("apply"),c=function(e){s||(s=e)},l=[];return Promise.all(n.filter(function(e){return e.apply}).map(function(e){return e.apply(c)})).then(function(e){e.forEach(function(e){if(e)for(var t=0;t<e.length;t++)l.push(e[t])})}).then(function(){return Promise.all([i,a]).then(function(){return s?f("fail").then(function(){throw s}):r?g(e).then(function(e){return l.forEach(function(t){e.indexOf(t)<0&&e.push(t)}),e}):f("idle").then(function(){return l})})})}function y(){if(r)return t||(t=[]),Object.keys(n.hmrI).forEach(function(e){r.forEach(function(r){n.hmrI[e](r,t)})}),r=void 0,!0}n.hmrD=o,n.i.push(function(l){var u,d,g,y,b=l.module,v=function(t,n){var r=i[n];if(!r)return t;var o=function(o){if(r.hot.active){if(i[o]){var a=i[o].parents;-1===a.indexOf(n)&&a.push(n)}else s=[n],e=o;-1===r.children.indexOf(o)&&r.children.push(o)}else console.warn("[HMR] unexpected require("+o+") from disposed module "+n),s=[];return t(o)},a=function(e){return{configurable:!0,enumerable:!0,get:function(){return t[e]},set:function(n){t[e]=n}}};for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&"e"!==c&&"ei"!==c&&Object.defineProperty(o,c,a(c));t.e&&(o.e=function(e,n){return h(t.e(e,n))});t.ei&&(o.ei=function(e,n){return h(t.ei(e,n))});return o}(l.require,l.id);b.hot=(u=l.id,d=b,y={_acceptedDependencies:{},_acceptedErrorHandlers:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:g=e!==u,_requireSelf:function(){s=d.parents.slice(),e=g?void 0:u,n(u)},active:!0,accept:function(e,t,n){if(void 0===e)y._selfAccepted=!0;else if("function"==typeof e)y._selfAccepted=e;else if("object"==typeof e&&null!==e)for(var r=0;r<e.length;r++)y._acceptedDependencies[e[r]]=t||function(){},y._acceptedErrorHandlers[e[r]]=n;else y._acceptedDependencies[e]=t||function(){},y._acceptedErrorHandlers[e]=n},decline:function(e){if(void 0===e)y._selfDeclined=!0;else if("object"==typeof e&&null!==e)for(var t=0;t<e.length;t++)y._declinedDependencies[e[t]]=!0;else y._declinedDependencies[e]=!0},dispose:function(e){y._disposeHandlers.push(e)},addDisposeHandler:function(e){y._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=y._disposeHandlers.indexOf(e);t>=0&&y._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,c){case"idle":t=[],Object.keys(n.hmrI).forEac
1h(function(e){n.hmrI[e](u,t)}),f("ready");break;case"ready":Object.keys(n.hmrI).forEach(function(e){n.hmrI[e](u,t)});break;case"prepare":case"check":case"dispose":case"apply":(r=r||[]).push(u)}},check:p,apply:m,status:function(e){if(!e)return c;a.push(e)},addStatusHandler:function(e){a.push(e)},removeStatusHandler:function(e){var t=a.indexOf(e);t>=0&&a.splice(t,1)},data:o[u]},e=void 0,y),b.parents=s,b.children=[],s=[],l.require=v}),n.hmrC={},n.hmrI={}})(),n.p="/",(()=>{if("undefined"!=typeof document){var e=(e,t,r,o,i)=>{var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",n.nc&&(s.nonce=n.nc);return s.onerror=s.onload=n=>{if(s.onerror=s.onload=null,"load"===n.type)o();else{var r=n&&n.type,a=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+r+": "+a+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=r,c.request=a,s.parentNode&&s.parentNode.removeChild(s),i(c)}},s.href=t,r?r.parentNode.insertBefore(s,r.nextSibling):document.head.appendChild(s),s},t=(e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=(s=n[r]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(o===e||o===t))return s}var i=document.getElementsByTagName("style");for(r=0;r<i.length;r++){var s;if((o=(s=i[r]).getAttribute("data-href"))===e||o===t)return s}},r=[],o=[],i=e=>({dispose:()=>{for(var e=0;e<r.length;e++){var t=r[e];t.parentNode&&t.parentNode.removeChild(t)}r.length=0},apply:()=>{for(var e=0;e<o.length;e++)o[e].rel="stylesheet";o.length=0}});n.hmrC.miniCss=(s,a,c,l,u,f)=>
1{u.push(i),s.forEach(i=>{var s=n.miniCssF(i),a=n.p+s,c=t(s,a);c&&l.push(new Promise((t,n)=>{var s=e(i,a,c,()=>{s.as="style",s.rel="preload",t()},n);r.push(c),o.push(s)}))})}}})(),(()=>{var e=n.hmrS_importScripts=n.hmrS_importScripts||{2084:1},t=t=>{let[r,o,i]=t;for(var s in o)n.o(o,s)&&(n.m[s]=o[s]);for(i&&i(n);r.length;)e[r.pop()]=1;c(t)};n.f.i=(t,r)=>{e[t]||importScripts(n.p+n.u(t))};var r,o,i,s,a=self.webpackChunkuwazi=self.webpackChunkuwazi||[],c=a.push.bind(a);function l(e,t){var r=!1;if(self.webpackHotUpdateuwazi=(e,i,a)=>{for(var c in i)n.o(i,c)&&(o[c]=i[c],t?.push(c));a&&s.push(a),r=!0},importScripts(n.p+n.hu(e)),!r)throw new Error("Loading update chunk failed for unknown reason")}function u(t){function a(e){for(var t=[e],r={},o=t.map(function(e){return{chain:[e],id:e}});o.length>0;){var i=o.pop(),s=i.id,a=i.chain,l=n.c[s];if(l&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:s};if(l.hot._main)return{type:"unaccepted",chain:a,moduleId:s};for(var u=0;u<l.parents.length;u++){var f=l.parents[u],d=n.c[f];if(d){if(d.hot._declinedDependencies[s])return{type:"declined",chain:a.concat([f]),moduleId:s,parentId:f};-1===t.indexOf(f)&&(d.hot._acceptedDependencies[s]?(r[f]||(r[f]=[]),c(r[f],[s])):(delete r[f],t.push(f),o.push({chain:a.concat([f]),id:f})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:r}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}n.f&&delete n.f.importScriptsHmr,r=void 0;var l={},u=[],f={},d=function(e){console.warn("[HMR] unexpected require("+e.id+") to disposed module")};for(var h in o)if(n.o(o,h)){var p=o[h],m=p?a(h):{type:"disposed",moduleId:h},g=!1,y=!1,b=!1,v="";switch(m.chain&&(v="\nUpdate propagation: "+m.chain.join(" -> ")),m.type){case"self-declined":t.onDeclined&&t.onDeclined(m),t.ignoreDeclined||(g=new Error("Aborted because of self decline: "+m.moduleId+v));break;case"declined":t.onDeclined&&t.onDeclined(m),t.ignoreDeclined||(g=new Error("Aborted because of declined dependency: "+m.moduleId+" in "+m.parentId+v));break;case"unaccepted":t.onUnaccepted&&t.onUnaccepted(m),t.ignoreUnaccepted||(g=new Error("Aborted because "+h+" is not accepted"+v));break;case"accepted":t.onAccepted&&t.onAccepted(m),y=!0;break;case"disposed":t.onDisposed&&t.onDisposed(m),b=!0;break;default:throw new Error("Unexception type "+m.type)}if(g)return{error:g};if(y){f[h]=p,c(u,m.outdatedModules);var k=m.outdatedDependencies;for(h in k)n.o(k,h)&&(l[h]||(l[h]=[]),c(l[h],k[h]))}b&&(c(u,[m.moduleId]),f[h]=d)}o=void 0;for(var x,S=[],A=0;A<u.length;A++){var T=u[A],C=n.c[T];C&&(C.hot._selfAccepted||C.hot._main)&&f[T]!==d&&!C.hot._selfInvalidated&&S.push({module:T,require:C.hot._requireSelf,errorHandler:C.hot._selfAccepted})}return{dispose:function(){var t;i.forEach(function(t){delete e[t]}),i=void 0;for(var r,o=u.slice();o.length>0;){var s=o.pop(),a=n.c[s];if(a){var c={},f=a.hot._disposeHandlers;for(A=0;A<f.length;A++)f[A].call(null,c);for(n.hmrD[s]=c,a.hot.active=!1,delete n.c[s],delete l[s],A=0;A<a.children.length;A++){var d=n.c[a.children[A]];d&&((t=d.parents.indexOf(s))>=0&&d.parents.splice(t,1))}}}for(var h in l)if(n.o(l,h)&&(a=n.c[h]))for(x=l[h],A=0;A<x.length;A++)r=x[A],(t=a.children.indexOf(r))>=0&&a.children.splice(t,1)},apply:function(e){var r=[];for(var o in f)n.o(f,o)&&(n.m[o]=f[o]);for(var i=0;i<s.length;i++)s[i](n);for(var a in l)if(n.o(l,a)){var c=n.c[a];if(c){x=l[a];for(var d=[],h=[],p=[],m=0;m<x.length;m++){var g=x[m],y=c.hot._acceptedDependencies[g],b=c.hot._acceptedErrorHandlers[g];if(y){if(-1!==d.indexOf(y))continue;d.push(y),h.push(b),p.push(g)}}for(var v=0;v<d.length;v++){var k;try{k=d[v].call(null,x)}catch(n){if("function"==typeof h[v])try{h[v](n,{moduleId:a,dependencyId:p[v]})}catch(r){t.onErrored&&t.onErrored({type:"accept-error-handler-errored",moduleId:a,dependencyId:p[v],error:r,originalError:n}),t.ignoreErrored||(e(r),e(n))}else t.onErrored&&t.onErrored({type:"accept-errored",moduleId:a,dependencyId:p[v],error:n}),t.ignoreErrored||e(n)}k&&"function"==typeof k.then&&r.push(k)}}}return Promise.all(r).then(function(){for(var r=0;r<S.length;r++){var o=S[r],i=o.module;try{o.require(i)}catch(r){if("function"==typeof o.errorHandler)try{o.errorHandler(r,{moduleId:i,module:n.c[i]})}catch(n){t.onErrored&&t.onErrored({type:"self-accept-error-handler-errored",moduleId:i,error:n,originalError:r}),t.ignoreErrored||(e(n),e(r))}else t.onErrored&&t.onErrored({type:"self-accept-errored",moduleId:i,error:r}),t.ignoreErrored||e(r)}}}).then(function(){return u})}}}
1a.forEach(t),a.push=t,n.hmrI.importScripts=function(e,t){o||(o={},s=[],i=[],t.push(u)),n.o(o,e)||(o[e]=n.m[e])},n.hmrC.importScripts=function(t,a,c,f,d,h,p,m){d.push(u),r={},i=a,o=c.reduce(function(e,t){return e[t]=!1,e},{}),s=[],t.forEach(function(t){n.o(e,t)&&void 0!==e[t]?(f.push(l(t,h)),r[t]=!0):r[t]=!1}),n.f&&(n.f.importScriptsHmr=function(e,t){r&&n.o(r,e)&&!r[e]&&(t.push(l(e)),r[e]=!0)},m&&m.forEach(function(e){Object.keys(n.f).forEach(function(t){n.f[t](e,f)})}))},n.hmrM=()=>{if("undefined"==typeof fetch)throw new Error("No browser support: need fetch API");return fetch(n.p+n.hmrF()).then(e=>{if(404!==e.status){if(!e.ok)throw new Error("Failed to fetch update manifest "+e.statusText);return e.json()}})}})(),(()=>{const e=n.x;n.x=()=>Promise.all([9963,1441,5323].map(n.e,n)).then(e)})();n.x()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.