"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4347],{74347:function(oi,St,$e){$e.r(St),$e.d(St,{setupMode:function(){return ni}});var U=$e(80829),Mr=2*60*1e3,Fr=function(){function e(t){var i=this;this._defaults=t,this._worker=null,this._idleCheckInterval=setInterval(function(){return i._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return i._stopWorker()})}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){if(this._worker){var t=Date.now()-this._lastUsedTime;t>Mr&&this._stopWorker()}},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=U.j6.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var t=this,i=[],r=0;r=48&&T<=57)N=N*16+T-48;else if(T>=65&&T<=70)N=N*16+T-65+10;else if(T>=97&&T<=102)N=N*16+T-97+10;else break;r++,O++}return O=i){b+=e.substring(E,r),l=2;break}var O=e.charCodeAt(r);if(O===34){b+=e.substring(E,r),r++;break}if(O===92){if(b+=e.substring(E,r),r++,r>=i){l=2;break}var N=e.charCodeAt(r++);switch(N){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=` `;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:var T=h(4,!0);T>=0?b+=String.fromCharCode(T):l=4;break;default:l=5}E=r;continue}if(O>=0&&O<=31)if(Te(O)){b+=e.substring(E,r),l=2;break}else l=6;r++}return b}function p(){if(n="",l=0,a=r,o=s,f=c,r>=i)return a=i,u=17;var b=e.charCodeAt(r);if(Qe(b)){do r++,n+=String.fromCharCode(b),b=e.charCodeAt(r);while(Qe(b));return u=15}if(Te(b))return r++,n+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,n+=` `),s++,c=r,u=14;switch(b){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,n=v(),u=10;case 47:var E=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&b<=15);return b}return{setPosition:g,getPosition:function(){return r},scan:t?m:p,getToken:function(){return u},getTokenValue:function(){return n},getTokenOffset:function(){return a},getTokenLength:function(){return r-a},getTokenStartLine:function(){return o},getTokenStartCharacter:function(){return a-f},getTokenError:function(){return l}}}function Qe(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Te(e){return e===10||e===13||e===8232||e===8233}function Ce(e){return e>=48&&e<=57}var xe;(function(e){e.DEFAULT={allowTrailingComma:!1}})(xe||(xe={}));function Vr(e,t){var i=[],r=new Object,n=void 0,a={value:{},offset:0,length:0,type:"object",parent:void 0},u=!1;function s(o,c,f,l){a.value=o,a.offset=c,a.length=f,a.type=l,a.colonOffset=void 0,n=a}try{De(e,{onObjectBegin:function(o,c){if(t<=o)throw r;n=void 0,u=t>o,i.push("")},onObjectProperty:function(o,c,f){if(t=i.children.length)return;i=i.children[f]}}return i}}function Ct(e){if(!e.parent||!e.parent.children)return[];var t=Ct(e.parent);if(e.parent.type==="property"){var i=e.parent.children[0].value;t.push(i)}else if(e.parent.type==="array"){var r=e.parent.children.indexOf(e);r!==-1&&t.push(r)}return t}function Ye(e){switch(e.type){case"array":return e.children.map(Ye);case"object":for(var t=Object.create(null),i=0,r=e.children;i=e.offset&&t0)for(var M=r.getToken();M!==17;){if(w.indexOf(M)!==-1){S();break}else if(P.indexOf(M)!==-1)break;M=S()}}function b(k){var w=r.getTokenValue();return k?l(w):s(w),S(),!0}function E(){switch(r.getToken()){case 11:var k=r.getTokenValue(),w=Number(k);isNaN(w)&&(m(2),w=0),l(w);break;case 7:l(null);break;case 8:l(!0);break;case 9:l(!1);break;default:return!1}return S(),!0}function O(){return r.getToken()!==10?(m(3,[],[2,5]),!1):(b(!1),r.getToken()===6?(h(":"),S(),I()||m(4,[],[2,5])):m(5,[],[2,5]),!0)}function N(){u(),S();for(var k=!1;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(k||m(4,[],[]),h(","),S(),r.getToken()===2&&p)break}else k&&m(6,[],[]);O()||m(4,[],[2,5]),k=!0}return o(),r.getToken()!==2?m(7,[2],[]):S(),!0}function T(){c(),S();for(var k=!1;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(k||m(4,[],[]),h(","),S(),r.getToken()===4&&p)break}else k&&m(6,[],[]);I()||m(4,[],[4,5]),k=!0}return f(),r.getToken()!==4?m(8,[4],[]):S(),!0}function I(){switch(r.getToken()){case 3:return T();case 1:return N();case 10:return b(!0);default:return E()}}return S(),r.getToken()===17?i.allowEmptyContent?!0:(m(4,[],[]),!1):I()?(r.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}function Rr(e,t){var i=Xe(e),r=[],n,a=0,u;do switch(u=i.getPosition(),n=i.scan(),n){case 12:case 13:case 17:a!==u&&r.push(e.substring(a,u)),t!==void 0&&r.push(i.getTokenValue().replace(/[^\r\n]/g,t)),a=i.getPosition();break}while(n!==17);return r.join("")}function wt(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function si(e,t,i){return Ur(e,t,void 0,i)}function Ur(e,t,i,r){for(var n,a=t.slice(),u=[],s=parseTree(e,u),o=void 0,c=void 0;a.length>0&&(c=a.pop(),o=findNodeAtLocation(s,a),o===void 0&&i!==void 0);)typeof c=="string"?i=(n={},n[c]=i,n):i=[i];if(o)if(o.type==="object"&&typeof c=="string"&&Array.isArray(o.children)){var f=findNodeAtLocation(o,[c]);if(f!==void 0)if(i===void 0){if(!f.parent)throw new Error("Malformed AST");var l=o.children.indexOf(f.parent),h=void 0,g=f.parent.offset+f.parent.length;if(l>0){var d=o.children[l-1];h=d.offset+d.length}else if(h=o.offset+1,o.children.length>1){var v=o.children[1];g=v.offset}return me(e,{offset:h,length:g-h,content:""},r)}else return me(e,{offset:f.offset,length:f.length,content:JSON.stringify(i)},r);else{if(i===void 0)return[];var p=JSON.stringify(c)+": "+JSON.stringify(i),S=r.getInsertionIndex?r.getInsertionIndex(o.children.map(function(k){return k.children[0].value})):o.children.length,m=void 0;if(S>0){var d=o.children[S-1];m={offset:d.offset+d.length,length:0,content:","+p}}else o.children.length===0?m={offset:o.offset+1,length:0,content:p}:m={offset:o.offset+1,length:0,content:p+","};return me(e,m,r)}}else if(o.type==="array"&&typeof c=="number"&&Array.isArray(o.children)){var b=c;if(b===-1){var p=""+JSON.stringify(i),m=void 0;if(o.children.length===0)m={offset:o.offset+1,length:0,content:p};else{var d=o.children[o.children.length-1];m={offset:d.offset+d.length,length:0,content:","+p}}return me(e,m,r)}else if(i===void 0&&o.children.length>=0){var E=c,O=o.children[E],m=void 0;if(o.children.length===1)m={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===E){var d=o.children[E-1],N=d.offset+d.length,T=o.offset+o.length;m={offset:N,length:T-2-N,content:""}}else m={offset:O.offset,length:o.children[E+1].offset-O.offset,content:""};return me(e,m,r)}else if(i!==void 0){var m=void 0,p=""+JSON.stringify(i);if(!r.isArrayInsertion&&o.children.length>c){var I=o.children[c];m={offset:I.offset,length:I.length,content:p}}else if(o.children.length===0||c===0)m={offset:o.offset+1,length:0,content:o.children.length===0?p:p+","};else{var S=c>o.children.length?o.children.length:c,d=o.children[S-1];m={offset:d.offset+d.length,length:0,content:","+p}}return me(e,m,r)}else throw new Error("Can not "+(i===void 0?"remove":r.isArrayInsertion?"insert":"modify")+" Array index "+b+" as length is not sufficient")}else throw new Error("Can not add "+(typeof c!="number"?"index":"property")+" to parent of type "+o.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return me(e,{offset:s?s.offset:0,length:s?s.length:0,content:JSON.stringify(i)},r)}}function me(e,t,i){if(!i.formattingOptions)return[t];var r=Tt(e,t),n=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;n>0&&!isEOL(r,n-1);)n--;for(;a=0;s--){var o=u[s];r=Tt(r,o),n=Math.min(n,o.offset),a=Math.max(a,o.offset+o.length),a+=o.content.length-o.length}var c=e.length-(r.length-a)-n;return[{offset:n,length:c,content:r.substring(n,a)}]}function Tt(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}function ui(e,t){return`\r `.indexOf(e.charAt(t))!==-1}var Re=Xe,fi=Vr,Wr=Lr,ci=_r,li=$r,qr=At,Jr=Ct,Br=Ye,hi=De,di=Rr;function gi(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}function pi(e,t,i){return formatter.format(e,t,i)}function vi(e,t,i,r){return edit.setProperty(e,t,i,r)}function mi(e,t){for(var i=t.length-1;i>=0;i--)e=edit.applyEdit(e,t[i]);return e}function Ee(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var i,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i0?e.lastIndexOf(t)===i:i===0?e===t:!1}function yi(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function bi(e,t){for(var i="";t>0;)(t&1)===1&&(i+=e),e+=e,t=t>>>1;return i}function Ue(e){return xt(e,"(?i)")?new RegExp(e.substring(4),"iu"):new RegExp(e,"u")}var Et;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(Et||(Et={}));var We;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647})(We||(We={}));var ie;(function(e){function t(r,n){return r===Number.MAX_VALUE&&(r=We.MAX_VALUE),n===Number.MAX_VALUE&&(n=We.MAX_VALUE),{line:r,character:n}}e.create=t;function i(r){var n=r;return y.objectLiteral(n)&&y.uinteger(n.line)&&y.uinteger(n.character)}e.is=i})(ie||(ie={}));var H;(function(e){function t(r,n,a,u){if(y.uinteger(r)&&y.uinteger(n)&&y.uinteger(a)&&y.uinteger(u))return{start:ie.create(r,n),end:ie.create(a,u)};if(ie.is(r)&&ie.is(n))return{start:r,end:n};throw new Error("Range#create called with invalid arguments["+r+", "+n+", "+a+", "+u+"]")}e.create=t;function i(r){var n=r;return y.objectLiteral(n)&&ie.is(n.start)&&ie.is(n.end)}e.is=i})(H||(H={}));var je;(function(e){function t(r,n){return{uri:r,range:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&H.is(n.range)&&(y.string(n.uri)||y.undefined(n.uri))}e.is=i})(je||(je={}));var Ot;(function(e){function t(r,n,a,u){return{targetUri:r,targetRange:n,targetSelectionRange:a,originSelectionRange:u}}e.create=t;function i(r){var n=r;return y.defined(n)&&H.is(n.targetRange)&&y.string(n.targetUri)&&(H.is(n.targetSelectionRange)||y.undefined(n.targetSelectionRange))&&(H.is(n.originSelectionRange)||y.undefined(n.originSelectionRange))}e.is=i})(Ot||(Ot={}));var et;(function(e){function t(r,n,a,u){return{red:r,green:n,blue:a,alpha:u}}e.create=t;function i(r){var n=r;return y.numberRange(n.red,0,1)&&y.numberRange(n.green,0,1)&&y.numberRange(n.blue,0,1)&&y.numberRange(n.alpha,0,1)}e.is=i})(et||(et={}));var jt;(function(e){function t(r,n){return{range:r,color:n}}e.create=t;function i(r){var n=r;return H.is(n.range)&&et.is(n.color)}e.is=i})(jt||(jt={}));var It;(function(e){function t(r,n,a){return{label:r,textEdit:n,additionalTextEdits:a}}e.create=t;function i(r){var n=r;return y.string(n.label)&&(y.undefined(n.textEdit)||ae.is(n))&&(y.undefined(n.additionalTextEdits)||y.typedArray(n.additionalTextEdits,ae.is))}e.is=i})(It||(It={}));var Ie;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ie||(Ie={}));var Nt;(function(e){function t(r,n,a,u,s){var o={startLine:r,endLine:n};return y.defined(a)&&(o.startCharacter=a),y.defined(u)&&(o.endCharacter=u),y.defined(s)&&(o.kind=s),o}e.create=t;function i(r){var n=r;return y.uinteger(n.startLine)&&y.uinteger(n.startLine)&&(y.undefined(n.startCharacter)||y.uinteger(n.startCharacter))&&(y.undefined(n.endCharacter)||y.uinteger(n.endCharacter))&&(y.undefined(n.kind)||y.string(n.kind))}e.is=i})(Nt||(Nt={}));var tt;(function(e){function t(r,n){return{location:r,message:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&je.is(n.location)&&y.string(n.message)}e.is=i})(tt||(tt={}));var Q;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Q||(Q={}));var Pt;(function(e){e.Unnecessary=1,e.Deprecated=2})(Pt||(Pt={}));var Mt;(function(e){function t(i){var r=i;return r!=null&&y.string(r.href)}e.is=t})(Mt||(Mt={}));var ce;(function(e){function t(r,n,a,u,s,o){var c={range:r,message:n};return y.defined(a)&&(c.severity=a),y.defined(u)&&(c.code=u),y.defined(s)&&(c.source=s),y.defined(o)&&(c.relatedInformation=o),c}e.create=t;function i(r){var n,a=r;return y.defined(a)&&H.is(a.range)&&y.string(a.message)&&(y.number(a.severity)||y.undefined(a.severity))&&(y.integer(a.code)||y.string(a.code)||y.undefined(a.code))&&(y.undefined(a.codeDescription)||y.string((n=a.codeDescription)===null||n===void 0?void 0:n.href))&&(y.string(a.source)||y.undefined(a.source))&&(y.undefined(a.relatedInformation)||y.typedArray(a.relatedInformation,tt.is))}e.is=i})(ce||(ce={}));var Ne;(function(e){function t(r,n){for(var a=[],u=2;u0&&(s.arguments=a),s}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.title)&&y.string(n.command)}e.is=i})(Ne||(Ne={}));var ae;(function(e){function t(a,u){return{range:a,newText:u}}e.replace=t;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function n(a){var u=a;return y.objectLiteral(u)&&y.string(u.newText)&&H.is(u.range)}e.is=n})(ae||(ae={}));var Ae;(function(e){function t(r,n,a){var u={label:r};return n!==void 0&&(u.needsConfirmation=n),a!==void 0&&(u.description=a),u}e.create=t;function i(r){var n=r;return n!==void 0&&y.objectLiteral(n)&&y.string(n.label)&&(y.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(y.string(n.description)||n.description===void 0)}e.is=i})(Ae||(Ae={}));var X;(function(e){function t(i){var r=i;return typeof r=="string"}e.is=t})(X||(X={}));var le;(function(e){function t(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=t;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function n(a){var u=a;return ae.is(u)&&(Ae.is(u.annotationId)||X.is(u.annotationId))}e.is=n})(le||(le={}));var qe;(function(e){function t(r,n){return{textDocument:r,edits:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&Be.is(n.textDocument)&&Array.isArray(n.edits)}e.is=i})(qe||(qe={}));var Pe;(function(e){function t(r,n,a){var u={kind:"create",uri:r};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(u.options=n),a!==void 0&&(u.annotationId=a),u}e.create=t;function i(r){var n=r;return n&&n.kind==="create"&&y.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||y.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||y.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}e.is=i})(Pe||(Pe={}));var Me;(function(e){function t(r,n,a,u){var s={kind:"rename",oldUri:r,newUri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=t;function i(r){var n=r;return n&&n.kind==="rename"&&y.string(n.oldUri)&&y.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||y.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||y.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}e.is=i})(Me||(Me={}));var Fe;(function(e){function t(r,n,a){var u={kind:"delete",uri:r};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(u.options=n),a!==void 0&&(u.annotationId=a),u}e.create=t;function i(r){var n=r;return n&&n.kind==="delete"&&y.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||y.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||y.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}e.is=i})(Fe||(Fe={}));var rt;(function(e){function t(i){var r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(n){return y.string(n.kind)?Pe.is(n)||Me.is(n)||Fe.is(n):qe.is(n)}))}e.is=t})(rt||(rt={}));var Je=function(){function e(t,i){this.edits=t,this.changeAnnotations=i}return e.prototype.insert=function(t,i,r){var n,a;if(r===void 0?n=ae.insert(t,i):X.is(r)?(a=r,n=le.insert(t,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=le.insert(t,i,a)),this.edits.push(n),a!==void 0)return a},e.prototype.replace=function(t,i,r){var n,a;if(r===void 0?n=ae.replace(t,i):X.is(r)?(a=r,n=le.replace(t,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=le.replace(t,i,a)),this.edits.push(n),a!==void 0)return a},e.prototype.delete=function(t,i){var r,n;if(i===void 0?r=ae.del(t):X.is(i)?(n=i,r=le.del(t,i)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(i),r=le.del(t,n)),this.edits.push(r),n!==void 0)return n},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Ft=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,i){var r;if(X.is(t)?r=t:(r=this.nextId(),i=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=i,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ki=function(){function e(t){var i=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Ft(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(qe.is(r)){var n=new Je(r.edits,i._changeAnnotations);i._textEditChanges[r.textDocument.uri]=n}})):t.changes&&Object.keys(t.changes).forEach(function(r){var n=new Je(t.changes[r]);i._textEditChanges[r]=n})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(Be.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:t.uri,version:t.version},r=this._textEditChanges[i.uri];if(!r){var n=[],a={textDocument:i,edits:n};this._workspaceEdit.documentChanges.push(a),r=new Je(n,this._changeAnnotations),this._textEditChanges[i.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var n=[];this._workspaceEdit.changes[t]=n,r=new Je(n),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ft,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ae.is(i)||X.is(i)?n=i:r=i;var a,u;if(n===void 0?a=Pe.create(t,r):(u=X.is(n)?n:this._changeAnnotations.manage(n),a=Pe.create(t,r,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},e.prototype.renameFile=function(t,i,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Ae.is(r)||X.is(r)?a=r:n=r;var u,s;if(a===void 0?u=Me.create(t,i,n):(s=X.is(a)?a:this._changeAnnotations.manage(a),u=Me.create(t,i,n,s)),this._workspaceEdit.documentChanges.push(u),s!==void 0)return s},e.prototype.deleteFile=function(t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ae.is(i)||X.is(i)?n=i:r=i;var a,u;if(n===void 0?a=Fe.create(t,r):(u=X.is(n)?n:this._changeAnnotations.manage(n),a=Fe.create(t,r,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},e}(),Vt;(function(e){function t(r){return{uri:r}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)}e.is=i})(Vt||(Vt={}));var Lt;(function(e){function t(r,n){return{uri:r,version:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)&&y.integer(n.version)}e.is=i})(Lt||(Lt={}));var Be;(function(e){function t(r,n){return{uri:r,version:n}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)&&(n.version===null||y.integer(n.version))}e.is=i})(Be||(Be={}));var _t;(function(e){function t(r,n,a,u){return{uri:r,languageId:n,version:a,text:u}}e.create=t;function i(r){var n=r;return y.defined(n)&&y.string(n.uri)&&y.string(n.languageId)&&y.integer(n.version)&&y.string(n.text)}e.is=i})(_t||(_t={}));var fe;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(fe||(fe={})),function(e){function t(i){var r=i;return r===e.PlainText||r===e.Markdown}e.is=t}(fe||(fe={}));var nt;(function(e){function t(i){var r=i;return y.objectLiteral(i)&&fe.is(r.kind)&&y.string(r.value)}e.is=t})(nt||(nt={}));var W;(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})(W||(W={}));var z;(function(e){e.PlainText=1,e.Snippet=2})(z||(z={}));var $t;(function(e){e.Deprecated=1})($t||($t={}));var Dt;(function(e){function t(r,n,a){return{newText:r,insert:n,replace:a}}e.create=t;function i(r){var n=r;return n&&y.string(n.newText)&&H.is(n.insert)&&H.is(n.replace)}e.is=i})(Dt||(Dt={}));var Rt;(function(e){e.asIs=1,e.adjustIndentation=2})(Rt||(Rt={}));var it;(function(e){function t(i){return{label:i}}e.create=t})(it||(it={}));var Ut;(function(e){function t(i,r){return{items:i||[],isIncomplete:!!r}}e.create=t})(Ut||(Ut={}));var He;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function i(r){var n=r;return y.string(n)||y.objectLiteral(n)&&y.string(n.language)&&y.string(n.value)}e.is=i})(He||(He={}));var Wt;(function(e){function t(i){var r=i;return!!r&&y.objectLiteral(r)&&(nt.is(r.contents)||He.is(r.contents)||y.typedArray(r.contents,He.is))&&(i.range===void 0||H.is(i.range))}e.is=t})(Wt||(Wt={}));var qt;(function(e){function t(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=t})(qt||(qt={}));var Jt;(function(e){function t(i,r){for(var n=[],a=2;a=0;f--){var l=o[f],h=a.offsetAt(l.range.start),g=a.offsetAt(l.range.end);if(g<=c)s=s.substring(0,h)+l.newText+s.substring(g,s.length);else throw new Error("Overlapping edit");c=h}return s}e.applyEdits=r;function n(a,u){if(a.length<=1)return a;var s=a.length/2|0,o=a.slice(0,s),c=a.slice(s);n(o,u),n(c,u);for(var f=0,l=0,h=0;f0&&t.push(i.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var i=this.getLineOffsets(),r=0,n=i.length;if(n===0)return ie.create(0,t);for(;rt?n=a:r=a+1}var u=r-1;return ie.create(u,t-i[u])},e.prototype.offsetAt=function(t){var i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;var r=i[t.line],n=t.line+1t?n=a:r=a+1}var u=r-1;return{line:u,character:t-i[u]}},e.prototype.offsetAt=function(t){var i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;var r=i[t.line],n=t.line+1o&&c.push(u.substring(o,g)),h.newText.length&&c.push(h.newText),o=n.offsetAt(h.range.end)}return c.push(u.substr(o)),c.join("")}e.applyEdits=r})(ar||(ar={}));function at(e,t){if(e.length<=1)return e;var i=e.length/2|0,r=e.slice(0,i),n=e.slice(i);at(r,t),at(n,t);for(var a=0,u=0,s=0;ai.line||t.line===i.line&&t.character>i.character?{start:i,end:t}:e}function Gr(e){var t=sr(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var oe;(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=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(oe||(oe={}));var ur;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[fe.Markdown,fe.PlainText],commitCharactersSupport:!0}}}}})(ur||(ur={}));function Zr(e,t){var i;return t.length===0?i=e:i=e.replace(/\{(\d+)\}/g,function(r,n){var a=n[0];return typeof t[a]!="undefined"?t[a]:r}),i}function Xr(e,t){for(var i=[],r=2;r()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},be=function(){function e(t,i,r){r===void 0&&(r=0),this.offset=i,this.length=r,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),Yr=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="null",n.value=null,n}return t}(be),fr=function(e){ye(t,e);function t(i,r,n){var a=e.call(this,i,n)||this;return a.type="boolean",a.value=r,a}return t}(be),en=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="array",n.items=[],n}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(be),tn=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="number",n.isInteger=!0,n.value=Number.NaN,n}return t}(be),ot=function(e){ye(t,e);function t(i,r,n){var a=e.call(this,i,r,n)||this;return a.type="string",a.value="",a}return t}(be),rn=function(e){ye(t,e);function t(i,r,n){var a=e.call(this,i,r)||this;return a.type="property",a.colonOffset=-1,a.keyNode=n,a}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(be),nn=function(e){ye(t,e);function t(i,r){var n=e.call(this,i,r)||this;return n.type="object",n.properties=[],n}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(be);function Y(e){return ne(e)?e?{}:{not:{}}:e}var cr;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(cr||(cr={}));var an=function(){function e(t,i){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=i,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){Array.prototype.push.apply(this.schemas,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||lr(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),st=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),ee=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(t){for(var i=0,r=t;i=e.offset&&t0?A={schema:R,validationResult:L,matchingSchemas:D}:J===0&&(A.matchingSchemas.merge(D),A.validationResult.mergeEnumValues(L))}}return B.length>1&&$&&i.problems.push({location:{offset:n.offset,length:1},message:F("oneOfWarning","Matches multiple schemas when only one must validate.")}),A&&(i.merge(A.validationResult),i.propertiesMatches+=A.validationResult.propertiesMatches,i.propertiesValueMatches+=A.validationResult.propertiesValueMatches,r.merge(A.matchingSchemas)),B.length};Array.isArray(t.anyOf)&&E(t.anyOf,!1),Array.isArray(t.oneOf)&&E(t.oneOf,!0);var O=function(V){var $=new ee,B=r.newSub();G(n,Y(V),$,B),i.merge($),i.propertiesMatches+=$.propertiesMatches,i.propertiesValueMatches+=$.propertiesValueMatches,r.merge(B)},N=function(V,$,B){var A=Y(V),C=new ee,x=r.newSub();G(n,A,C,x),r.merge(x),C.hasProblems()?B&&O(B):$&&O($)},T=Y(t.if);if(T&&N(T,Y(t.then),Y(t.else)),Array.isArray(t.enum)){for(var I=he(n),k=!1,w=0,P=t.enum;w=T&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",T)});var I=O(l.minimum,l.exclusiveMinimum);re(I)&&dk&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("maximumWarning","Value is above the maximum of {0}.",k)})}function s(f,l,h,g){if(re(l.minLength)&&f.value.lengthl.maxLength&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("maxLengthWarning","String is longer than the maximum length of {0}.",l.maxLength)}),Hr(l.pattern)){var d=Ue(l.pattern);d.test(f.value)||h.problems.push({location:{offset:f.offset,length:f.length},message:l.patternErrorMessage||l.errorMessage||F("patternWarning",'String does not match the pattern of "{0}".',l.pattern)})}if(l.format)switch(l.format){case"uri":case"uri-reference":{var v=void 0;if(!f.value)v=F("uriEmpty","URI expected.");else{var p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(f.value);p?!p[2]&&l.format==="uri"&&(v=F("uriSchemeMissing","URI with a scheme is expected.")):v=F("uriMissing","URI is expected.")}v&&h.problems.push({location:{offset:f.offset,length:f.length},message:l.patternErrorMessage||l.errorMessage||F("uriFormatWarning","String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var S=Qr[l.format];(!f.value||!S.pattern.exec(f.value))&&h.problems.push({location:{offset:f.offset,length:f.length},message:l.patternErrorMessage||l.errorMessage||S.errorMessage});default:}}function o(f,l,h,g){if(Array.isArray(l.items)){for(var d=l.items,v=0;v=d.length&&h.propertiesValueMatches++}if(f.items.length>d.length)if(typeof l.additionalItems=="object")for(var E=d.length;El.maxItems&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("maxItemsWarning","Array has too many items. Expected {0} or fewer.",l.maxItems)}),l.uniqueItems===!0){var w=he(f),P=w.some(function(M,V){return V!==w.lastIndexOf(M)});P&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("uniqueItemsWarning","Array has duplicate items.")})}}function c(f,l,h,g){for(var d=Object.create(null),v=[],p=0,S=f.properties;p=0;)v.splice(kt,1),kt=v.indexOf(Pr)};if(l.properties)for(var w=0,P=Object.keys(l.properties);w0)for(var J=0,Z=v;Jl.maxProperties&&h.problems.push({location:{offset:f.offset,length:f.length},message:F("MaxPropWarning","Object has more properties than limit of {0}.",l.maxProperties)}),re(l.minProperties)&&f.properties.length0){for(M--;M>0&&/\s/.test(n.charAt(M));)M--;V=M+1}if(c(T,I,M,V),k&&h(k,!1),w.length+P.length>0)for(var $=a.getToken();$!==17;){if(w.indexOf($)!==-1){s();break}else if(P.indexOf($)!==-1)break;$=s()}return k}function l(){switch(a.getTokenError()){case 4:return f(F("InvalidUnicode","Invalid unicode sequence in string."),ErrorCode.InvalidUnicode),!0;case 5:return f(F("InvalidEscapeCharacter","Invalid escape character in string."),ErrorCode.InvalidEscapeCharacter),!0;case 3:return f(F("UnexpectedEndOfNumber","Unexpected end of number."),ErrorCode.UnexpectedEndOfNumber),!0;case 1:return f(F("UnexpectedEndOfComment","Unexpected end of comment."),ErrorCode.UnexpectedEndOfComment),!0;case 2:return f(F("UnexpectedEndOfString","Unexpected end of string."),ErrorCode.UnexpectedEndOfString),!0;case 6:return f(F("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),ErrorCode.InvalidCharacter),!0}return!1}function h(T,I){return T.length=a.getTokenOffset()+a.getTokenLength()-T.offset,I&&s(),T}function g(T){if(a.getToken()===3){var I=new en(T,a.getTokenOffset());s();for(var k=0,w=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){w||f(F("ValueExpected","Value expected"),ErrorCode.ValueExpected);var P=a.getTokenOffset();if(s(),a.getToken()===4){w&&c(F("TrailingComma","Trailing comma"),ErrorCode.TrailingComma,P,P+1);continue}}else w&&f(F("ExpectedComma","Expected comma"),ErrorCode.CommaExpected);var M=E(I);M?I.items.push(M):f(F("PropertyExpected","Value expected"),ErrorCode.ValueExpected,void 0,[],[4,5]),w=!0}return a.getToken()!==4?f(F("ExpectedCloseBracket","Expected comma or closing bracket"),ErrorCode.CommaOrCloseBacketExpected,I):h(I,!0)}}var d=new ot(void 0,0,0);function v(T,I){var k=new rn(T,a.getTokenOffset(),d),w=S(k);if(!w)if(a.getToken()===16){f(F("DoubleQuotesExpected","Property keys must be doublequoted"),ErrorCode.Undefined);var P=new ot(k,a.getTokenOffset(),a.getTokenLength());P.value=a.getTokenValue(),w=P,s()}else return;k.keyNode=w;var M=I[w.value];if(M?(c(F("DuplicateKeyWarning","Duplicate object key"),ErrorCode.DuplicateKey,k.keyNode.offset,k.keyNode.offset+k.keyNode.length,DiagnosticSeverity.Warning),typeof M=="object"&&c(F("DuplicateKeyWarning","Duplicate object key"),ErrorCode.DuplicateKey,M.keyNode.offset,M.keyNode.offset+M.keyNode.length,DiagnosticSeverity.Warning),I[w.value]=!0):I[w.value]=k,a.getToken()===6)k.colonOffset=a.getTokenOffset(),s();else if(f(F("ColonExpected","Colon expected"),ErrorCode.ColonExpected),a.getToken()===10&&e.positionAt(w.offset+w.length).line=0;i--){var r=this.contributions[i].resolveCompletion;if(r){var n=r(t);if(n)return n}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,i,r){var n=this,a={items:[],isIncomplete:!1},u=t.getText(),s=t.offsetAt(i),o=r.getNodeFromOffset(s,!0);if(this.isInComment(t,o?o.offset:0,s))return Promise.resolve(a);if(o&&s===o.offset+o.length&&s>0){var c=u[s-1];(o.type==="object"&&c==="}"||o.type==="array"&&c==="]")&&(o=o.parent)}var f=this.getCurrentWord(t,s),l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=H.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length));else{var h=s-f.length;h>0&&u[h-1]==='"'&&h--,l=H.create(t.positionAt(h),i)}var g=!1,d={},v={add:function(p){var S=p.label,m=d[S];if(m)m.documentation||(m.documentation=p.documentation),m.detail||(m.detail=p.detail);else{if(S=S.replace(/[\n]/g,"\u21B5"),S.length>60){var b=S.substr(0,57).trim()+"...";d[b]||(S=b)}l&&p.insertText!==void 0&&(p.textEdit=ae.replace(l,p.insertText)),g&&(p.commitCharacters=p.kind===W.Property?sn:on),p.label=S,d[S]=p,a.items.push(p)}},setAsIncomplete:function(){a.isIncomplete=!0},error:function(p){console.error(p)},log:function(p){console.log(p)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(t.uri,r).then(function(p){var S=[],m=!0,b="",E=void 0;if(o&&o.type==="string"){var O=o.parent;O&&O.type==="property"&&O.keyNode===o&&(m=!O.valueNode,E=O,b=u.substr(o.offset+1,o.length-2),O&&(o=O.parent))}if(o&&o.type==="object"){if(o.offset===s)return a;var N=o.properties;N.forEach(function(w){(!E||E!==w)&&(d[w.keyNode.value]=it.create("__"))});var T="";m&&(T=n.evaluateSeparatorAfter(t,t.offsetAt(l.end))),p?n.getPropertyCompletions(p,r,o,m,T,v):n.getSchemaLessPropertyCompletions(r,o,b,v);var I=ut(o);n.contributions.forEach(function(w){var P=w.collectPropertyCompletions(t.uri,I,f,m,T==="",v);P&&S.push(P)}),!p&&f.length>0&&u.charAt(s-f.length-1)!=='"'&&(v.add({kind:W.Property,label:n.getLabelForValue(f),insertText:n.getInsertTextForProperty(f,void 0,!1,T),insertTextFormat:z.Snippet,documentation:""}),v.setAsIncomplete())}var k={};return p?n.getValueCompletions(p,r,o,s,t,v,k):n.getSchemaLessValueCompletions(r,o,s,t,v),n.contributions.length>0&&n.getContributedValueCompletions(r,o,s,t,v,S),n.promiseConstructor.all(S).then(function(){if(v.getNumberOfProposals()===0){var w=s;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(w=o.offset+o.length);var P=n.evaluateSeparatorAfter(t,w);n.addFillerValueCompletions(k,P,v)}return a})})},e.prototype.getPropertyCompletions=function(t,i,r,n,a,u){var s=this,o=i.getMatchingSchemas(t.schema,r.offset);o.forEach(function(c){if(c.node===r&&!c.inverted){var f=c.schema.properties;f&&Object.keys(f).forEach(function(v){var p=f[v];if(typeof p=="object"&&!p.deprecationMessage&&!p.doNotSuggest){var S={kind:W.Property,label:v,insertText:s.getInsertTextForProperty(v,p,n,a),insertTextFormat:z.Snippet,filterText:s.getFilterTextForValue(v),documentation:s.fromMarkup(p.markdownDescription)||p.description||""};p.suggestSortText!==void 0&&(S.sortText=p.suggestSortText),S.insertText&&Oe(S.insertText,"$1"+a)&&(S.command={title:"Suggest",command:"editor.action.triggerSuggest"}),u.add(S)}});var l=c.schema.propertyNames;if(typeof l=="object"&&!l.deprecationMessage&&!l.doNotSuggest){var h=function(v,p){p===void 0&&(p=void 0);var S={kind:W.Property,label:v,insertText:s.getInsertTextForProperty(v,void 0,n,a),insertTextFormat:z.Snippet,filterText:s.getFilterTextForValue(v),documentation:p||s.fromMarkup(l.markdownDescription)||l.description||""};l.suggestSortText!==void 0&&(S.sortText=l.suggestSortText),S.insertText&&Oe(S.insertText,"$1"+a)&&(S.command={title:"Suggest",command:"editor.action.triggerSuggest"}),u.add(S)};if(l.enum)for(var g=0;g(i.colonOffset||0)){var f=i.valueNode;if(f&&(r>f.offset+f.length||f.type==="object"||f.type==="array"))return;var l=i.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===l&&g.valueNode&&c(g.valueNode),!0}),l==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(o,a)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var h=i.parent.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===h&&g.valueNode&&g.valueNode.type==="array"&&g.valueNode.items.forEach(c),!0})}else i.items.forEach(c)},e.prototype.getValueCompletions=function(t,i,r,n,a,u,s){var o=n,c=void 0,f=void 0;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(o=r.offset+r.length,f=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",u,s);return}if(r.type==="property"&&n>(r.colonOffset||0)){var l=r.valueNode;if(l&&n>l.offset+l.length)return;c=r.keyNode.value,r=r.parent}if(r&&(c!==void 0||r.type==="array")){for(var h=this.evaluateSeparatorAfter(a,o),g=i.getMatchingSchemas(t.schema,r.offset,f),d=0,v=g;d(i.colonOffset||0)){var s=i.keyNode.value,o=i.valueNode;if((!o||r<=o.offset+o.length)&&i.parent){var c=ut(i.parent);this.contributions.forEach(function(f){var l=f.collectValueCompletions(n.uri,c,s,a);l&&u.push(l)})}}},e.prototype.addSchemaValueCompletions=function(t,i,r,n){var a=this;typeof t=="object"&&(this.addEnumValueCompletions(t,i,r),this.addDefaultValueCompletions(t,i,r),this.collectTypes(t,n),Array.isArray(t.allOf)&&t.allOf.forEach(function(u){return a.addSchemaValueCompletions(u,i,r,n)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(u){return a.addSchemaValueCompletions(u,i,r,n)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(u){return a.addSchemaValueCompletions(u,i,r,n)}))},e.prototype.addDefaultValueCompletions=function(t,i,r,n){var a=this;n===void 0&&(n=0);var u=!1;if(ue(t.default)){for(var s=t.type,o=t.default,c=n;c>0;c--)o=[o],s="array";r.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,i),insertTextFormat:z.Snippet,detail:ct("json.suggest.default","Default value")}),u=!0}Array.isArray(t.examples)&&t.examples.forEach(function(f){for(var l=t.type,h=f,g=n;g>0;g--)h=[h],l="array";r.add({kind:a.getSuggestionKind(l),label:a.getLabelForValue(h),insertText:a.getInsertTextForValue(h,i),insertTextFormat:z.Snippet}),u=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(f){var l=t.type,h=f.body,g=f.label,d,v;if(ue(h)){for(var p=t.type,S=n;S>0;S--)h=[h],p="array";d=a.getInsertTextForSnippetValue(h,i),v=a.getFilterTextForSnippetValue(h),g=g||a.getLabelForSnippetValue(h)}else if(typeof f.bodyText=="string"){for(var m="",b="",E="",S=n;S>0;S--)m=m+E+`[ `,b=b+` `+E+"]",E+=" ",l="array";d=m+E+f.bodyText.split(` `).join(` `+E)+b+i,g=g||d,v=d.replace(/[\n]/g,"")}else return;r.add({kind:a.getSuggestionKind(l),label:g,documentation:a.fromMarkup(f.markdownDescription)||f.description,insertText:d,insertTextFormat:z.Snippet,filterText:v}),u=!0}),!u&&typeof t.items=="object"&&!Array.isArray(t.items)&&n<5&&this.addDefaultValueCompletions(t.items,i,r,n+1)},e.prototype.addEnumValueCompletions=function(t,i,r){if(ue(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,i),insertTextFormat:z.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var n=0,a=t.enum.length;n0?i[0]:void 0}if(!t)return W.Value;switch(t){case"string":return W.Value;case"object":return W.Module;case"property":return W.Property;default:return W.Value}},e.prototype.getLabelTextForMatchingNode=function(t,i){switch(t.type){case"array":return"[]";case"object":return"{}";default:var r=i.getText().substr(t.offset,t.length);return r}},e.prototype.getInsertTextForMatchingNode=function(t,i,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:var n=i.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(n)}},e.prototype.getInsertTextForProperty=function(t,i,r,n){var a=this.getInsertTextForValue(t,"");if(!r)return a;var u=a+": ",s,o=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var c=i.defaultSnippets[0].body;ue(c)&&(s=this.getInsertTextForSnippetValue(c,""))}o+=i.defaultSnippets.length}if(i.enum&&(!s&&i.enum.length===1&&(s=this.getInsertTextForGuessedValue(i.enum[0],"")),o+=i.enum.length),ue(i.default)&&(s||(s=this.getInsertTextForGuessedValue(i.default,"")),o++),Array.isArray(i.examples)&&i.examples.length&&(s||(s=this.getInsertTextForGuessedValue(i.examples[0],"")),o+=i.examples.length),o===0){var f=Array.isArray(i.type)?i.type[0]:i.type;switch(f||(i.properties?f="object":i.items&&(f="array")),f){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 a}}}return(!s||o>1)&&(s="$1"),u+s+n},e.prototype.getCurrentWord=function(t,i){for(var r=i-1,n=t.getText();r>=0&&` \r\v":{[,]}`.indexOf(n.charAt(r))===-1;)r--;return n.substring(r+1,i)},e.prototype.evaluateSeparatorAfter=function(t,i){var r=Re(t.getText(),!0);r.setPosition(i);var n=r.scan();switch(n){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,i,r){for(var n=Re(i.getText(),!0),a=t.items,u=a.length-1;u>=0;u--){var s=a[u];if(r>s.offset+s.length){n.setPosition(s.offset+s.length);var o=n.scan();return o===5&&r>=n.getTokenOffset()+n.getTokenLength()?u+1:u}else if(r>=s.offset)return u}return 0},e.prototype.isInComment=function(t,i,r){var n=Re(t.getText(),!1);n.setPosition(i);for(var a=n.scan();a!==17&&n.getTokenOffset()+n.getTokenLength()a.offset+1&&n=0;l--){var h=this.contributions[l],g=h.getInfoContribution(t.uri,f);if(g)return g.then(function(d){return c(d)})}return this.schemaService.getSchemaForResource(t.uri,r).then(function(d){if(d&&a){var v=r.getMatchingSchemas(d.schema,a.offset),p=void 0,S=void 0,m=void 0,b=void 0;v.every(function(O){if(O.node===a&&!O.inverted&&O.schema&&(p=p||O.schema.title,S=S||O.schema.markdownDescription||lt(O.schema.description),O.schema.enum)){var N=O.schema.enum.indexOf(he(a));O.schema.markdownEnumDescriptions?m=O.schema.markdownEnumDescriptions[N]:O.schema.enumDescriptions&&(m=lt(O.schema.enumDescriptions[N])),m&&(b=O.schema.enum[N],typeof b!="string"&&(b=JSON.stringify(b)))}return!0});var E="";return p&&(E=lt(p)),S&&(E.length>0&&(E+=` `),E+=S),m&&(E.length>0&&(E+=` `),E+="`"+un(b)+"`: "+m),c([E])}return null})},e}();function lt(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function un(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var ht=$e(97671),dr;dr=(()=>{"use strict";var e={470:r=>{function n(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function a(s,o){for(var c,f="",l=0,h=-1,g=0,d=0;d<=s.length;++d){if(d2){var v=f.lastIndexOf("/");if(v!==f.length-1){v===-1?(f="",l=0):l=(f=f.slice(0,v)).length-1-f.lastIndexOf("/"),h=d,g=0;continue}}else if(f.length===2||f.length===1){f="",l=0,h=d,g=0;continue}}o&&(f.length>0?f+="/..":f="..",l=2)}else f.length>0?f+="/"+s.slice(h+1,d):f=s.slice(h+1,d),l=d-h-1;h=d,g=0}else c===46&&g!==-1?++g:g=-1}return f}var u={resolve:function(){for(var s,o="",c=!1,f=arguments.length-1;f>=-1&&!c;f--){var l;f>=0?l=arguments[f]:(s===void 0&&(s=ht.cwd()),l=s),n(l),l.length!==0&&(o=l+"/"+o,c=l.charCodeAt(0)===47)}return o=a(o,!c),c?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(s){if(n(s),s.length===0)return".";var o=s.charCodeAt(0)===47,c=s.charCodeAt(s.length-1)===47;return(s=a(s,!o)).length!==0||o||(s="."),s.length>0&&c&&(s+="/"),o?"/"+s:s},isAbsolute:function(s){return n(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,o=0;o0&&(s===void 0?s=c:s+="/"+c)}return s===void 0?".":u.normalize(s)},relative:function(s,o){if(n(s),n(o),s===o||(s=u.resolve(s))===(o=u.resolve(o)))return"";for(var c=1;cd){if(o.charCodeAt(h+p)===47)return o.slice(h+p+1);if(p===0)return o.slice(h+p)}else l>d&&(s.charCodeAt(c+p)===47?v=p:p===0&&(v=0));break}var S=s.charCodeAt(c+p);if(S!==o.charCodeAt(h+p))break;S===47&&(v=p)}var m="";for(p=c+v+1;p<=f;++p)p!==f&&s.charCodeAt(p)!==47||(m.length===0?m+="..":m+="/..");return m.length>0?m+o.slice(h+v):(h+=v,o.charCodeAt(h)===47&&++h,o.slice(h))},_makeLong:function(s){return s},dirname:function(s){if(n(s),s.length===0)return".";for(var o=s.charCodeAt(0),c=o===47,f=-1,l=!0,h=s.length-1;h>=1;--h)if((o=s.charCodeAt(h))===47){if(!l){f=h;break}}else l=!1;return f===-1?c?"/":".":c&&f===1?"//":s.slice(0,f)},basename:function(s,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');n(s);var c,f=0,l=-1,h=!0;if(o!==void 0&&o.length>0&&o.length<=s.length){if(o.length===s.length&&o===s)return"";var g=o.length-1,d=-1;for(c=s.length-1;c>=0;--c){var v=s.charCodeAt(c);if(v===47){if(!h){f=c+1;break}}else d===-1&&(h=!1,d=c+1),g>=0&&(v===o.charCodeAt(g)?--g==-1&&(l=c):(g=-1,l=d))}return f===l?l=d:l===-1&&(l=s.length),s.slice(f,l)}for(c=s.length-1;c>=0;--c)if(s.charCodeAt(c)===47){if(!h){f=c+1;break}}else l===-1&&(h=!1,l=c+1);return l===-1?"":s.slice(f,l)},extname:function(s){n(s);for(var o=-1,c=0,f=-1,l=!0,h=0,g=s.length-1;g>=0;--g){var d=s.charCodeAt(g);if(d!==47)f===-1&&(l=!1,f=g+1),d===46?o===-1?o=g:h!==1&&(h=1):o!==-1&&(h=-1);else if(!l){c=g+1;break}}return o===-1||f===-1||h===0||h===1&&o===f-1&&o===c+1?"":s.slice(o,f)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return function(o,c){var f=c.dir||c.root,l=c.base||(c.name||"")+(c.ext||"");return f?f===c.root?f+l:f+"/"+l:l}(0,s)},parse:function(s){n(s);var o={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return o;var c,f=s.charCodeAt(0),l=f===47;l?(o.root="/",c=1):c=0;for(var h=-1,g=0,d=-1,v=!0,p=s.length-1,S=0;p>=c;--p)if((f=s.charCodeAt(p))!==47)d===-1&&(v=!1,d=p+1),f===46?h===-1?h=p:S!==1&&(S=1):h!==-1&&(S=-1);else if(!v){g=p+1;break}return h===-1||d===-1||S===0||S===1&&h===d-1&&h===g+1?d!==-1&&(o.base=o.name=g===0&&l?s.slice(1,d):s.slice(g,d)):(g===0&&l?(o.name=s.slice(1,h),o.base=s.slice(1,d)):(o.name=s.slice(g,h),o.base=s.slice(g,d)),o.ext=s.slice(h,d)),g>0?o.dir=s.slice(0,g-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};u.posix=u,r.exports=u},447:(r,n,a)=>{var u;if(a.r(n),a.d(n,{URI:()=>S,Utils:()=>M}),typeof ht=="object")u=ht.platform==="win32";else if(typeof navigator=="object"){var s=navigator.userAgent;u=s.indexOf("Windows")>=0}var o,c,f=(o=function(A,C){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,j){x.__proto__=j}||function(x,j){for(var R in j)Object.prototype.hasOwnProperty.call(j,R)&&(x[R]=j[R])})(A,C)},function(A,C){function x(){this.constructor=A}o(A,C),A.prototype=C===null?Object.create(C):(x.prototype=C.prototype,new x)}),l=/^\w[\w\d+.-]*$/,h=/^\//,g=/^\/\//,d="",v="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,S=function(){function A(C,x,j,R,L,D){D===void 0&&(D=!1),typeof C=="object"?(this.scheme=C.scheme||d,this.authority=C.authority||d,this.path=C.path||d,this.query=C.query||d,this.fragment=C.fragment||d):(this.scheme=function(J,Z){return J||Z?J:"file"}(C,D),this.authority=x||d,this.path=function(J,Z){switch(J){case"https":case"http":case"file":Z?Z[0]!==v&&(Z=v+Z):Z=v}return Z}(this.scheme,j||d),this.query=R||d,this.fragment=L||d,function(J,Z){if(!J.scheme&&Z)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+J.authority+'", path: "'+J.path+'", query: "'+J.query+'", fragment: "'+J.fragment+'"}');if(J.scheme&&!l.test(J.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(J.path){if(J.authority){if(!h.test(J.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(g.test(J.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,D))}return A.isUri=function(C){return C instanceof A||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="function"&&typeof C.with=="function"&&typeof C.toString=="function"},Object.defineProperty(A.prototype,"fsPath",{get:function(){return T(this,!1)},enumerable:!1,configurable:!0}),A.prototype.with=function(C){if(!C)return this;var x=C.scheme,j=C.authority,R=C.path,L=C.query,D=C.fragment;return x===void 0?x=this.scheme:x===null&&(x=d),j===void 0?j=this.authority:j===null&&(j=d),R===void 0?R=this.path:R===null&&(R=d),L===void 0?L=this.query:L===null&&(L=d),D===void 0?D=this.fragment:D===null&&(D=d),x===this.scheme&&j===this.authority&&R===this.path&&L===this.query&&D===this.fragment?this:new b(x,j,R,L,D)},A.parse=function(C,x){x===void 0&&(x=!1);var j=p.exec(C);return j?new b(j[2]||d,P(j[4]||d),P(j[5]||d),P(j[7]||d),P(j[9]||d),x):new b(d,d,d,d,d)},A.file=function(C){var x=d;if(u&&(C=C.replace(/\\/g,v)),C[0]===v&&C[1]===v){var j=C.indexOf(v,2);j===-1?(x=C.substring(2),C=v):(x=C.substring(2,j),C=C.substring(j)||v)}return new b("file",x,C,d,d)},A.from=function(C){return new b(C.scheme,C.authority,C.path,C.query,C.fragment)},A.prototype.toString=function(C){return C===void 0&&(C=!1),I(this,C)},A.prototype.toJSON=function(){return this},A.revive=function(C){if(C){if(C instanceof A)return C;var x=new b(C);return x._formatted=C.external,x._fsPath=C._sep===m?C.fsPath:null,x}return C},A}(),m=u?1:void 0,b=function(A){function C(){var x=A!==null&&A.apply(this,arguments)||this;return x._formatted=null,x._fsPath=null,x}return f(C,A),Object.defineProperty(C.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),C.prototype.toString=function(x){return x===void 0&&(x=!1),x?I(this,!0):(this._formatted||(this._formatted=I(this,!1)),this._formatted)},C.prototype.toJSON=function(){var x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=m),this._formatted&&(x.external=this._formatted),this.path&&(x.path=this.path),this.scheme&&(x.scheme=this.scheme),this.authority&&(x.authority=this.authority),this.query&&(x.query=this.query),this.fragment&&(x.fragment=this.fragment),x},C}(S),E=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function O(A,C){for(var x=void 0,j=-1,R=0;R=97&&L<=122||L>=65&&L<=90||L>=48&&L<=57||L===45||L===46||L===95||L===126||C&&L===47)j!==-1&&(x+=encodeURIComponent(A.substring(j,R)),j=-1),x!==void 0&&(x+=A.charAt(R));else{x===void 0&&(x=A.substr(0,R));var D=E[L];D!==void 0?(j!==-1&&(x+=encodeURIComponent(A.substring(j,R)),j=-1),x+=D):j===-1&&(j=R)}}return j!==-1&&(x+=encodeURIComponent(A.substring(j))),x!==void 0?x:A}function N(A){for(var C=void 0,x=0;x1&&A.scheme==="file"?"//"+A.authority+A.path:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?C?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,u&&(x=x.replace(/\//g,"\\")),x}function I(A,C){var x=C?N:O,j="",R=A.scheme,L=A.authority,D=A.path,J=A.query,Z=A.fragment;if(R&&(j+=R,j+=":"),(L||R==="file")&&(j+=v,j+=v),L){var te=L.indexOf("@");if(te!==-1){var Se=L.substr(0,te);L=L.substr(te+1),(te=Se.indexOf(":"))===-1?j+=x(Se,!1):(j+=x(Se.substr(0,te),!1),j+=":",j+=x(Se.substr(te+1),!1)),j+="@"}(te=(L=L.toLowerCase()).indexOf(":"))===-1?j+=x(L,!1):(j+=x(L.substr(0,te),!1),j+=L.substr(te))}if(D){if(D.length>=3&&D.charCodeAt(0)===47&&D.charCodeAt(2)===58)(ve=D.charCodeAt(1))>=65&&ve<=90&&(D="/"+String.fromCharCode(ve+32)+":"+D.substr(3));else if(D.length>=2&&D.charCodeAt(1)===58){var ve;(ve=D.charCodeAt(0))>=65&&ve<=90&&(D=String.fromCharCode(ve+32)+":"+D.substr(2))}j+=x(D,!0)}return J&&(j+="?",j+=x(J,!1)),Z&&(j+="#",j+=C?Z:O(Z,!1)),j}function k(A){try{return decodeURIComponent(A)}catch(C){return A.length>3?A.substr(0,3)+k(A.substr(3)):A}}var w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(A){return A.match(w)?A.replace(w,function(C){return k(C)}):A}var M,V=a(470),$=function(){for(var A=0,C=0,x=arguments.length;C{for(var a in n)i.o(n,a)&&!i.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:n[a]})},i.o=(r,n)=>Object.prototype.hasOwnProperty.call(r,n),i.r=r=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},i(447)})();const{URI:ze,Utils:Ei}=dr;function fn(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var i=String(e),r="",n=t?!!t.extended:!1,a=t?!!t.globstar:!1,u=!1,s=t&&typeof t.flags=="string"?t.flags:"",o,c=0,f=i.length;c1&&(l==="/"||l===void 0||l==="{"||l===",")&&(g==="/"||g===void 0||g===","||g==="}");d?(g==="/"?c++:l==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=o}return(!s||!~s.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,s)}var de=we(),cn="!",ln="/",hn=function(){function e(t,i){this.globWrappers=[];try{for(var r=0,n=t;r0&&(a[0]===ln&&(a=a.substring(1)),this.globWrappers.push({regexp:fn("**/"+a,{extended:!0,globstar:!0}),include:u}))}this.uris=i}catch(s){this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var i=!1,r=0,n=this.globWrappers;r0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var i=this;this.cachedSchemaForResource=void 0;var r=!1;t=ge(t);for(var n=[t],a=Object.keys(this.schemasById).map(function(c){return i.schemasById[c]});n.length;)for(var u=n.pop(),s=0;s1&&(n=a[1]),Oe(n,".")&&(n=n.substr(0,n.length-1)),new ke({},[de("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Ke(t),n)])})},e.prototype.resolveSchemaContent=function(t,i,r){var n=this,a=t.errors.slice(0),u=t.schema;if(u.$schema){var s=ge(u.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new gr({},[de("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));s==="https://json-schema.org/draft/2019-09/schema"&&a.push(de("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var o=this.contextService,c=function(g,d){if(!d)return g;var v=g;return d[0]==="/"&&(d=d.substr(1)),d.split("/").some(function(p){return p=p.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[p],!v}),v},f=function(g,d,v,p){var S=p?decodeURIComponent(p):void 0,m=c(d,S);if(m)for(var b in m)m.hasOwnProperty(b)&&!g.hasOwnProperty(b)&&(g[b]=m[b]);else a.push(de("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",S,v))},l=function(g,d,v,p,S){o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(d)&&(d=o.resolveRelativePath(d,p)),d=ge(d);var m=n.getOrAddSchemaHandle(d);return m.getUnresolvedSchema().then(function(b){if(S[d]=!0,b.errors.length){var E=v?d+"#"+v:d;a.push(de("json.schema.problemloadingref","Problems loading reference '{0}': {1}",E,b.errors[0]))}return f(g,b.schema,d,v),h(g,b.schema,d,m.dependencies)})},h=function(g,d,v,p){if(!g||typeof g!="object")return Promise.resolve(null);for(var S=[g],m=[],b=[],E=function(){for(var k=[],w=0;w0){b.push(l(k,M[0],M[1],v,p));return}else w.indexOf(P)===-1&&(f(k,d,v,M[1]),w.push(P))}E(k.items,k.additionalItems,k.additionalProperties,k.not,k.contains,k.propertyNames,k.if,k.then,k.else),O(k.definitions,k.properties,k.patternProperties,k.dependencies),N(k.anyOf,k.allOf,k.oneOf,k.items)};S.length;){var I=S.pop();m.indexOf(I)>=0||(m.push(I),T(I))}return n.promise.all(b)};return h(u,u,i,r).then(function(g){return new gr(u,a)})},e.prototype.getSchemaForResource=function(t,i){if(i&&i.root&&i.root.type==="object"){var r=i.root.properties.filter(function(S){return S.keyNode.value==="$schema"&&S.valueNode&&S.valueNode.type==="string"});if(r.length>0){var n=r[0].valueNode;if(n&&n.type==="string"){var a=he(n);if(a&&xt(a,".")&&this.contextService&&(a=this.contextService.resolveRelativePath(a,t)),a){var u=ge(a);return this.getOrAddSchemaHandle(u).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var s=Object.create(null),o=[],c=pn(t),f=0,l=this.filePatternAssociations;f0?this.createCombinedSchema(t,o).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:p},p},e.prototype.createCombinedSchema=function(t,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),n={allOf:i.map(function(a){return{$ref:a}})};return this.addSchemaHandle(r,n)},e.prototype.getMatchingSchemas=function(t,i,r){if(r){var n=r.id||"schemaservice://untitled/matchingSchemas/"+gn++;return this.resolveSchemaContent(new ke(r),n,{}).then(function(a){return i.getMatchingSchemas(a.schema).filter(function(u){return!u.inverted})})}return this.getSchemaForResource(t.uri,i).then(function(a){return a?i.getMatchingSchemas(a.schema).filter(function(u){return!u.inverted}):[]})},e}(),gn=0;function ge(e){try{return ze.parse(e).toString()}catch(t){return e}}function pn(e){try{return ze.parse(e).with({fragment:null,query:null}).toString()}catch(t){return e}}function Ke(e){try{var t=ze.parse(e);if(t.scheme==="file")return t.fsPath}catch(i){}return e}var vn=we(),ji=function(){function e(t,i){this.jsonSchemaService=t,this.promise=i,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:Q.Error)},e.prototype.doValidation=function(t,i,r,n){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var u=[],s={},o=function(l){var h=l.range.start.line+" "+l.range.start.character+" "+l.message;s[h]||(s[h]=!0,u.push(l))},c=function(l){var h=r!=null&&r.trailingCommas?Ge(r.trailingCommas):Q.Error,g=r!=null&&r.comments?Ge(r.comments):a.commentSeverity,d=r!=null&&r.schemaValidation?Ge(r.schemaValidation):Q.Warning,v=r!=null&&r.schemaRequest?Ge(r.schemaRequest):Q.Warning;if(l){if(l.errors.length&&i.root&&v){var p=i.root,S=p.type==="object"?p.properties[0]:void 0;if(S&&S.keyNode.value==="$schema"){var m=S.valueNode||S,b=H.create(t.positionAt(m.offset),t.positionAt(m.offset+m.length));o(ce.create(b,l.errors[0],v,oe.SchemaResolveError))}else{var b=H.create(t.positionAt(p.offset),t.positionAt(p.offset+1));o(ce.create(b,l.errors[0],v,oe.SchemaResolveError))}}else if(d){var E=i.validate(t,l.schema,d);E&&E.forEach(o)}pr(l.schema)&&(g=void 0),vr(l.schema)&&(h=void 0)}for(var O=0,N=i.syntaxErrors;O=Ze&&e<=kn?e-Ze+10:0)}function Sn(e){if(e[0]==="#")switch(e.length){case 4:return{red:K(e.charCodeAt(1))*17/255,green:K(e.charCodeAt(2))*17/255,blue:K(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:K(e.charCodeAt(1))*17/255,green:K(e.charCodeAt(2))*17/255,blue:K(e.charCodeAt(3))*17/255,alpha:K(e.charCodeAt(4))*17/255};case 7:return{red:(K(e.charCodeAt(1))*16+K(e.charCodeAt(2)))/255,green:(K(e.charCodeAt(3))*16+K(e.charCodeAt(4)))/255,blue:(K(e.charCodeAt(5))*16+K(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(K(e.charCodeAt(1))*16+K(e.charCodeAt(2)))/255,green:(K(e.charCodeAt(3))*16+K(e.charCodeAt(4)))/255,blue:(K(e.charCodeAt(5))*16+K(e.charCodeAt(6)))/255,alpha:(K(e.charCodeAt(7))*16+K(e.charCodeAt(8)))/255}}}function Ii(e,t,i,r){return r===void 0&&(r=1),{red:e/255,green:t/255,blue:i/255,alpha:r}}var Ni=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,i,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var a=i.root;if(!a)return[];var u=r.resultLimit||Number.MAX_VALUE,s=t.uri;if((s==="vscode://defaultsettings/keybindings.json"||Oe(s.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var o=[],c=0,f=a.items;c0){u--;var w=je.create(t.uri,pe(t,I)),P=T?T+"."+I.keyNode.value:I.keyNode.value;b.push({name:n.getKeyLabel(I),kind:n.getSymbolKind(k.type),location:w,containerName:T}),p.push({node:k,containerName:P})}else m=!0})};S0){u--;var P=pe(t,k),M=P,V=String(w),$={name:V,kind:n.getSymbolKind(k.type),range:P,selectionRange:M,children:[]};I.push($),m.push({result:$.children,node:k})}else E=!0}):T.type==="object"&&T.properties.forEach(function(k){var w=k.valueNode;if(w)if(u>0){u--;var P=pe(t,k),M=pe(t,k.keyNode),V=[],$={name:n.getKeyLabel(k),kind:n.getSymbolKind(w.type),range:P,selectionRange:M,children:V,detail:n.getDetail(w)};I.push($),m.push({result:V,node:w})}else E=!0})};b0&&n[n.length-1].kind===l){var f=n.pop(),h=e.positionAt(u.getTokenOffset()).line;f&&h>f.startLine+1&&a!==f.startLine&&(f.endLine=h-1,o(f),a=f.startLine)}break}case 13:{var c=e.positionAt(u.getTokenOffset()).line,g=e.positionAt(u.getTokenOffset()+u.getTokenLength()).line;u.getTokenError()===1&&c+1=0&&n[p].kind!==FoldingRangeKind.Region;)p--;if(p>=0){var f=n[p];n.length=p,h>f.startLine&&a!==f.startLine&&(f.endLine=h,o(f),a=f.startLine)}}}break}}s=u.scan()}var S=t&&t.rangeLimit;if(typeof S!="number"||i.length<=S)return i;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var m=[],b=0,E=r;bS){T=p;break}N+=I}}for(var k=[],p=0;p=l&&o<=h&&f.push(n(l,h)),f.push(n(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":f.push(n(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){var g=u(c.offset+c.length,5);g!==-1&&f.push(n(c.offset,g))}c=c.parent}for(var d=void 0,v=f.length-1;v>=0;v--)d=SelectionRange.create(f[v],d);return d||(d=SelectionRange.create(Range.create(s,s))),d}function n(s,o){return Range.create(e.positionAt(s),e.positionAt(o))}var a=createScanner(e.getText(),!0);function u(s,o){a.setPosition(s);var c=a.scan();return c===o?a.getTokenOffset()+a.getTokenLength():-1}return t.map(r)}function Fi(e,t){var i=[];return t.visit(function(r){var n;if(r.type==="property"&&r.keyNode.value==="$ref"&&((n=r.valueNode)===null||n===void 0?void 0:n.type)==="string"){var a=r.valueNode.value,u=Tn(t,a);if(u){var s=e.positionAt(u.offset);i.push({target:e.uri+"#"+(s.line+1)+","+(s.character+1),range:wn(e,r.valueNode)})}}return!0}),Promise.resolve(i)}function wn(e,t){return Range.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Tn(e,t){var i=xn(t);return i?pt(i,e.root):null}function pt(e,t){if(!t)return null;if(e.length===0)return t;var i=e.shift();if(t&&t.type==="object"){var r=t.properties.find(function(u){return u.keyNode.value===i});return r?pt(e,r.valueNode):null}else if(t&&t.type==="array"&&i.match(/^(0|[1-9][0-9]*)$/)){var n=Number.parseInt(i),a=t.items[n];return a?pt(e,a):null}return null}function xn(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(En)}function En(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Vi(e){var t=e.promiseConstructor||Promise,i=new JSONSchemaService(e.schemaRequestService,e.workspaceContext,t);i.setSchemaContributions(schemaContributions);var r=new JSONCompletion(i,e.contributions,t,e.clientCapabilities),n=new JSONHover(i,e.contributions,t),a=new JSONDocumentSymbols(i),u=new JSONValidation(i,t);return{configure:function(s){i.clearExternalSchemas(),s.schemas&&s.schemas.forEach(function(o){i.registerExternalSchema(o.uri,o.fileMatch,o.schema)}),u.configure(s)},resetSchema:function(s){return i.onResourceChange(s)},doValidation:u.doValidation.bind(u),parseJSONDocument:function(s){return parseJSON(s,{collectComments:!0})},newJSONDocument:function(s,o){return newJSONDocument(s,o)},getMatchingSchemas:i.getMatchingSchemas.bind(i),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:n.doHover.bind(n),getFoldingRanges,getSelectionRanges,findDefinition:function(){return Promise.resolve([])},findLinks,format:function(s,o,c){var f=void 0;if(o){var l=s.offsetAt(o.start),h=s.offsetAt(o.end)-l;f={offset:l,length:h}}var g={tabSize:c?c.tabSize:4,insertSpaces:(c==null?void 0:c.insertSpaces)===!0,insertFinalNewline:(c==null?void 0:c.insertFinalNewline)===!0,eol:` `};return formatJSON(s.getText(),f,g).map(function(d){return TextEdit.replace(Range.create(s.positionAt(d.offset),s.positionAt(d.offset+d.length)),d.content)})}}}var On=function(){function e(t,i,r){var n=this;this._languageId=t,this._worker=i,this._disposables=[],this._listener=Object.create(null);var a=function(s){var o=s.getLanguageId();if(o===n._languageId){var c;n._listener[s.uri.toString()]=s.onDidChangeContent(function(){clearTimeout(c),c=setTimeout(function(){return n._doValidate(s.uri,o)},500)}),n._doValidate(s.uri,o)}},u=function(s){U.j6.setModelMarkers(s,n._languageId,[]);var o=s.uri.toString(),c=n._listener[o];c&&(c.dispose(),delete n._listener[o])};this._disposables.push(U.j6.onDidCreateModel(a)),this._disposables.push(U.j6.onWillDisposeModel(function(s){u(s),n._resetSchema(s.uri)})),this._disposables.push(U.j6.onDidChangeModelLanguage(function(s){u(s.model),a(s.model),n._resetSchema(s.model.uri)})),this._disposables.push(r.onDidChange(function(s){U.j6.getModels().forEach(function(o){o.getLanguageId()===n._languageId&&(u(o),a(o))})})),this._disposables.push({dispose:function(){U.j6.getModels().forEach(u);for(var s in n._listener)n._listener[s].dispose()}}),U.j6.getModels().forEach(a)}return e.prototype.dispose=function(){this._disposables.forEach(function(t){return t&&t.dispose()}),this._disposables=[]},e.prototype._resetSchema=function(t){this._worker().then(function(i){i.resetSchema(t.toString())})},e.prototype._doValidate=function(t,i){this._worker(t).then(function(r){return r.doValidation(t.toString()).then(function(n){var a=n.map(function(s){return In(t,s)}),u=U.j6.getModel(t);u&&u.getLanguageId()===i&&U.j6.setModelMarkers(u,i,a)})}).then(void 0,function(r){console.error(r)})},e}();function jn(e){switch(e){case Q.Error:return U.ZL.Error;case Q.Warning:return U.ZL.Warning;case Q.Information:return U.ZL.Info;case Q.Hint:return U.ZL.Hint;default:return U.ZL.Info}}function In(e,t){var i=typeof t.code=="number"?String(t.code):t.code;return{severity:jn(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}function vt(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function kr(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function se(e){if(e)return new U.e6(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Nn(e){return typeof e.insert!="undefined"&&typeof e.replace!="undefined"}function Pn(e){var t=U.Mj.CompletionItemKind;switch(e){case W.Text:return t.Text;case W.Method:return t.Method;case W.Function:return t.Function;case W.Constructor:return t.Constructor;case W.Field:return t.Field;case W.Variable:return t.Variable;case W.Class:return t.Class;case W.Interface:return t.Interface;case W.Module:return t.Module;case W.Property:return t.Property;case W.Unit:return t.Unit;case W.Value:return t.Value;case W.Enum:return t.Enum;case W.Keyword:return t.Keyword;case W.Snippet:return t.Snippet;case W.Color:return t.Color;case W.File:return t.File;case W.Reference:return t.Reference}return t.Property}function Li(e){var t=languages.CompletionItemKind;switch(e){case t.Text:return jsonService.CompletionItemKind.Text;case t.Method:return jsonService.CompletionItemKind.Method;case t.Function:return jsonService.CompletionItemKind.Function;case t.Constructor:return jsonService.CompletionItemKind.Constructor;case t.Field:return jsonService.CompletionItemKind.Field;case t.Variable:return jsonService.CompletionItemKind.Variable;case t.Class:return jsonService.CompletionItemKind.Class;case t.Interface:return jsonService.CompletionItemKind.Interface;case t.Module:return jsonService.CompletionItemKind.Module;case t.Property:return jsonService.CompletionItemKind.Property;case t.Unit:return jsonService.CompletionItemKind.Unit;case t.Value:return jsonService.CompletionItemKind.Value;case t.Enum:return jsonService.CompletionItemKind.Enum;case t.Keyword:return jsonService.CompletionItemKind.Keyword;case t.Snippet:return jsonService.CompletionItemKind.Snippet;case t.Color:return jsonService.CompletionItemKind.Color;case t.File:return jsonService.CompletionItemKind.File;case t.Reference:return jsonService.CompletionItemKind.Reference}return jsonService.CompletionItemKind.Property}function Le(e){if(e)return{range:se(e.range),text:e.newText}}function Mn(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Fn=function(){function e(t){this._worker=t}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return[" ",":",'"']},enumerable:!1,configurable:!0}),e.prototype.provideCompletionItems=function(t,i,r,n){var a=t.uri;return this._worker(a).then(function(u){return u.doComplete(a.toString(),vt(i))}).then(function(u){if(u){var s=t.getWordUntilPosition(i),o=new U.e6(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),c=u.items.map(function(f){var l={label:f.label,insertText:f.insertText||f.label,sortText:f.sortText,filterText:f.filterText,documentation:f.documentation,detail:f.detail,command:Mn(f.command),range:o,kind:Pn(f.kind)};return f.textEdit&&(Nn(f.textEdit)?l.range={insert:se(f.textEdit.insert),replace:se(f.textEdit.replace)}:l.range=se(f.textEdit.range),l.insertText=f.textEdit.newText),f.additionalTextEdits&&(l.additionalTextEdits=f.additionalTextEdits.map(Le)),f.insertTextFormat===z.Snippet&&(l.insertTextRules=U.Mj.CompletionItemInsertTextRule.InsertAsSnippet),l});return{isIncomplete:u.isIncomplete,suggestions:c}}})},e}();function Vn(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Sr(e){return typeof e=="string"?{value:e}:Vn(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function Ln(e){if(e)return Array.isArray(e)?e.map(Sr):[Sr(e)]}var _n=function(){function e(t){this._worker=t}return e.prototype.provideHover=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.doHover(n.toString(),vt(i))}).then(function(a){if(a)return{range:se(a.range),contents:Ln(a.contents)}})},e}();function _i(e){return{uri:Uri.parse(e.uri),range:se(e.range)}}function $n(e){var t=U.Mj.SymbolKind;switch(e){case q.File:return t.Array;case q.Module:return t.Module;case q.Namespace:return t.Namespace;case q.Package:return t.Package;case q.Class:return t.Class;case q.Method:return t.Method;case q.Property:return t.Property;case q.Field:return t.Field;case q.Constructor:return t.Constructor;case q.Enum:return t.Enum;case q.Interface:return t.Interface;case q.Function:return t.Function;case q.Variable:return t.Variable;case q.Constant:return t.Constant;case q.String:return t.String;case q.Number:return t.Number;case q.Boolean:return t.Boolean;case q.Array:return t.Array}return t.Function}var Dn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentSymbols=function(t,i){var r=t.uri;return this._worker(r).then(function(n){return n.findDocumentSymbols(r.toString())}).then(function(n){if(n)return n.map(function(a){return{name:a.name,detail:"",containerName:a.containerName,kind:$n(a.kind),range:se(a.location.range),selectionRange:se(a.location.range),tags:[]}})})},e}();function Cr(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Rn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentFormattingEdits=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.format(n.toString(),null,Cr(i)).then(function(u){if(!(!u||u.length===0))return u.map(Le)})})},e}(),Un=function(){function e(t){this._worker=t}return e.prototype.provideDocumentRangeFormattingEdits=function(t,i,r,n){var a=t.uri;return this._worker(a).then(function(u){return u.format(a.toString(),kr(i),Cr(r)).then(function(s){if(!(!s||s.length===0))return s.map(Le)})})},e}(),Wn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentColors=function(t,i){var r=t.uri;return this._worker(r).then(function(n){return n.findDocumentColors(r.toString())}).then(function(n){if(n)return n.map(function(a){return{color:a.color,range:se(a.range)}})})},e.prototype.provideColorPresentations=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.getColorPresentations(n.toString(),i.color,kr(i.range))}).then(function(a){if(a)return a.map(function(u){var s={label:u.label};return u.textEdit&&(s.textEdit=Le(u.textEdit)),u.additionalTextEdits&&(s.additionalTextEdits=u.additionalTextEdits.map(Le)),s})})},e}(),qn=function(){function e(t){this._worker=t}return e.prototype.provideFoldingRanges=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.getFoldingRanges(n.toString(),i)}).then(function(a){if(a)return a.map(function(u){var s={start:u.startLine+1,end:u.endLine+1};return typeof u.kind!="undefined"&&(s.kind=Jn(u.kind)),s})})},e}();function Jn(e){switch(e){case Ie.Comment:return U.Mj.FoldingRangeKind.Comment;case Ie.Imports:return U.Mj.FoldingRangeKind.Imports;case Ie.Region:return U.Mj.FoldingRangeKind.Region}}var Bn=function(){function e(t){this._worker=t}return e.prototype.provideSelectionRanges=function(t,i,r){var n=t.uri;return this._worker(n).then(function(a){return a.getSelectionRanges(n.toString(),i.map(vt))}).then(function(a){if(a)return a.map(function(u){for(var s=[];u;)s.push({range:se(u.range)}),u=u.parent;return s})})},e}();function Hn(e){return{getInitialState:function(){return new Tr(null,null,!1,null)},tokenize:function(t,i,r,n){return ri(e,t,i,r,n)}}}var Ar="delimiter.bracket.json",wr="delimiter.array.json",zn="delimiter.colon.json",Kn="delimiter.comma.json",Gn="keyword.json",Zn="keyword.json",Xn="string.value.json",Qn="number.json",Yn="string.key.json",ei="comment.block.json",ti="comment.line.json",_e=function(){function e(t,i){this.parent=t,this.type=i}return e.pop=function(t){return t?t.parent:null},e.push=function(t,i){return new e(t,i)},e.equals=function(t,i){if(!t&&!i)return!0;if(!t||!i)return!1;for(;t&&i;){if(t===i)return!0;if(t.type!==i.type)return!1;t=t.parent,i=i.parent}return!0},e}(),Tr=function(){function e(t,i,r,n){this._state=t,this.scanError=i,this.lastWasColon=r,this.parents=n}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon,this.parents)},e.prototype.equals=function(t){return t===this?!0:!t||!(t instanceof e)?!1:this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon&&_e.equals(this.parents,t.parents)},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(t){this._state=t},e}();function ri(e,t,i,r,n){r===void 0&&(r=0);var a=0,u=!1;switch(i.scanError){case 2:t='"'+t,a=1;break;case 1:t="/*"+t,a=2;break}for(var s=Re(t),o=i.lastWasColon,c=i.parents,f={tokens:[],endState:i.clone()};;){var l=r+s.getPosition(),h="",g=s.scan();if(g===17)break;if(l===r+s.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(s.getPosition(),3));switch(u&&(l-=a),u=a>0,g){case 1:c=_e.push(c,0),h=Ar,o=!1;break;case 2:c=_e.pop(c),h=Ar,o=!1;break;case 3:c=_e.push(c,1),h=wr,o=!1;break;case 4:c=_e.pop(c),h=wr,o=!1;break;case 6:h=zn,o=!0;break;case 5:h=Kn,o=!1;break;case 8:case 9:h=Gn,o=!1;break;case 7:h=Zn,o=!1;break;case 10:var d=c?c.type:0,v=d===1;h=o||v?Xn:Yn,o=!1;break;case 11:h=Qn,o=!1;break}if(e)switch(g){case 12:h=ti;break;case 13:h=ei;break}f.endState=new Tr(i.getStateData(),s.getTokenError(),o,c),f.tokens.push({startIndex:l,scopes:h})}return f}function ni(e){var t=[],i=[],r=new Fr(e);t.push(r);var n=function(){for(var s=[],o=0;o