12 |
- /*! For license information please see jsonWorker.js.LICENSE.txt */
- "use strict";define("vs/language/json/jsonWorker",["require"],(e=>(()=>{var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={};function a(e,t){void 0===t&&(t=!1);var r=e.length,n=0,i="",o=0,a=16,l=0,f=0,h=0,d=0,p=0;function m(t,r){for(var i=0,o=0;i<t||!r;){var a=e.charCodeAt(n);if(a>=48&&a<=57)o=16*o+a-48;else if(a>=65&&a<=70)o=16*o+a-65+10;else{if(!(a>=97&&a<=102))break;o=16*o+a-97+10}n++,i++}return i<t&&(o=-1),o}function g(){if(i="",p=0,o=n,f=l,d=h,n>=r)return o=r,a=17;var t=e.charCodeAt(n);if(s(t)){do{n++,i+=String.fromCharCode(t),t=e.charCodeAt(n)}while(s(t));return a=15}if(c(t))return n++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,i+="\n"),l++,h=n,a=14;switch(t){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=function(){for(var t="",i=n;;){if(n>=r){t+=e.substring(i,n),p=2;break}var o=e.charCodeAt(n);if(34===o){t+=e.substring(i,n),n++;break}if(92!==o){if(o>=0&&o<=31){if(c(o)){t+=e.substring(i,n),p=2;break}p=6}n++}else{if(t+=e.substring(i,n),++n>=r){p=2;break}switch(e.charCodeAt(n++)){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:var a=m(4,!0);a>=0?t+=String.fromCharCode(a):p=4;break;default:p=5}i=n}}return t}(),a=10;case 47:var g=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n<r&&!c(e.charCodeAt(n));)n++;return i=e.substring(g,n),a=12}if(42===e.charCodeAt(n+1)){n+=2;for(var y=r-1,b=!1;n<y;){var x=e.charCodeAt(n);if(42===x&&47===e.charCodeAt(n+1)){n+=2,b=!0;break}n++,c(x)&&(13===x&&10===e.charCodeAt(n)&&n++,l++,h=n)}return b||(n++,p=1),i=e.substring(g,n),a=13}return i+=String.fromCharCode(t),n++,a=16;case 45:if(i+=String.fromCharCode(t),++n===r||!u(e.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=function(){var t=n;if(48===e.charCodeAt(n))n++;else for(n++;n<e.length&&u(e.charCodeAt(n));)n++;if(n<e.length&&46===e.charCodeAt(n)){if(!(++n<e.length&&u(e.charCodeAt(n))))return p=3,e.substring(t,n);for(n++;n<e.length&&u(e.charCodeAt(n));)n++}var r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if((++n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&u(e.charCodeAt(n))){for(n++;n<e.length&&u(e.charCodeAt(n));)n++;r=n}else p=3;return e.substring(t,r)}(),a=11;default:for(;n<r&&v(t);)n++,t=e.charCodeAt(n);if(o!==n){switch(i=e.substring(o,n)){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(t),n++,a=16}}function v(e){if(s(e)||c(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){n=e,i="",o=0,a=16,p=0},getPosition:function(){return n},scan:t?function(){var e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return n-o},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return o-d},getTokenError:function(){return p}}}function s(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function c(e){return 10===e||13===e||8232===e||8233===e}function u(e){return e>=48&&e<=57}function l(e,t){for(var r="",n=0;n<t;n++)r+=e;return r}function f(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(o,{JSONWorker:()=>zr,create:()=>Zr}),(e||(e={})).DEFAULT={allowTrailingComma:!1};var h,d,p,m,g,v,y,b,x,A,S,k,C,T,w,O,E,I,j,P,M,N,_,V,F,R,L,D,$,U,W,q,B,J,K,z,H,G,X,Z,Q,Y,ee,te,re,ne,ie,oe,ae,se=a,ce=function(t,r,n){void 0===r&&(r=[]),void 0===n&&(n=e.DEFAULT);var i=null,o=[],s=[];function c(e){Array.isArray(o)?o.push(e):null!==i&&(o[i]=e)}return function(t,r,n){void 0===n&&(n=e.DEFAULT);var i=a(t,!1);function o(e){return e?function(){return e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}function s(e){return e?function(t){return e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}var c=o(r.onObjectBegin),u=s(r.onObjectProperty),l=o(r.onObjectEnd),f=o(r.onArrayBegin),h=o(r.onArrayEnd),d=s(r.onLiteralValue),p=s(r.onSeparator),m=o(r.onComment),g=s(r.onError),v=n&&n.disallowComments,y=n&&n.allowTrailingComma;function b(){for(;;){var e=i.scan();switch(i.getTokenError()){case 4:x(14);break;case 5:x(15);break;case 3:x(13);break;case 1:v||x(11);break;case 2:x(12);break;case 6:x(16)}switch(e){case 12:case 13:v?x(10):m();break;case 16:x(1);break;case 15:case 14:break;default:return e}}}function x(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),g(e),t.length+r.length>0)for(var n=i.getToken();17!==n;){if(-1!==t.indexOf(n)){b();break}if(-1!==r.indexOf(n))break;n=b()}}function A(e){var t=i.getTokenValue();return e?d(t):u(t),b(),!0}function S(){switch(i.getToken()){case 3:return function(){f(),b();for(var e=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(e||x(4,[],[]),p(","),b(),4===i.getToken()&&y)break}else e&&x(6,[],[]);S()||x(4,[],[4,5]),e=!0}return h(),4!==i.getToken()?x(8,[4],[]):b(),!0}();case 1:return function(){c(),b();for(var e=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(e||x(4,[],[]),p(","),b(),2===i.getToken()&&y)break}else e&&x(6,[],[]);(10!==i.getToken()?(x(3,[],[2,5]),!1):(A(!1),6===i.getToken()?(p(":"),b(),S()||x(4,[],[2,5])):x(5,[],[2,5]),!0))||x(4,[],[2,5]),e=!0}return l(),2!==i.getToken()?x(7,[2],[]):b(),!0}();case 10:return A(!0);default:return function(){switch(i.getToken()){case 11:var e=i.getTokenValue(),t=Number(e);isNaN(t)&&(x(2),t=0),d(t);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return b(),!0}()}}b(),17===i.getToken()?!!n.allowEmptyContent||x(4,[],[]):S()?17!==i.getToken()&&x(9,[],[]):x(4,[],[])}(t,{onObjectBegin:function(){var e={};c(e),s.push(o),o=e,i=null},onObjectProperty:function(e){i=e},onObjectEnd:function(){o=s.pop()},onArrayBegin:function(){var e=[];c(e),s.push(o),o=e,i=null},onArrayEnd:function(){o=s.pop()},onLiteralValue:c,onError:function(e,t,n){r.push({error:e,offset:t,length:n})}},n),o[0]},ue=function e(t,r,n){if(void 0===n&&(n=!1),function(e,t,r){return void 0===r&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}(t,r,n)){var i=t.children;if(Array.isArray(i))for(var o=0;o<i.length&&i[o].offset<=r;o++){var a=e(i[o],r,n);if(a)return a}return t}},le=function e(t){if(!t.parent||!t.parent.children)return[];var r=e(t.parent);if("property"===t.parent.type){var n=t.parent.children[0].value;r.push(n)}else if("array"===t.parent.type){var i=t.parent.children.indexOf(t);-1!==i&&r.push(i)}return r},fe=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var r=Object.create(null),n=0,i=t.children;n<i.length;n++){var o=i[n],a=o.children[1];a&&(r[o.children[0].value]=e(a))}return r;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function he(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;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!he(e[r],t[r]))return!1}else{var i=[];for(n in e)i.push(n);i.sort();var o=[];for(n in t)o.push(n);if(o.sort(),!he(i,o))return!1;for(r=0;r<i.length;r++)if(!he(e[i[r]],t[i[r]]))return!1}return!0}function de(e){return"number"==typeof e}function pe(e){return void 0!==e}function me(e){return"boolean"==typeof e}function ge(e,t){var r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:0===r&&e===t}function ve(e){var t="";(function(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(r){try{return new RegExp(e,t)}catch(e){return}}}(d=h||(h={})).MIN_VALUE=-2147483648,d.MAX_VALUE=2147483647,(m=p||(p={})).MIN_VALUE=0,m.MAX_VALUE=2147483647,(v=g||(g={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}},v.is=function(e){var t=e;return vt.objectLiteral(t)&&vt.uinteger(t.line)&&vt.uinteger(t.character)},(b=y||(y={})).create=function(e,t,r,n){if(vt.uinteger(e)&&vt.uinteger(t)&&vt.uinteger(r)&&vt.uinteger(n))return{start:g.create(e,t),end:g.create(r,n)};if(g.is(e)&&g.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+r+", "+n+"]")},b.is=function(e){var t=e;return vt.objectLiteral(t)&&g.is(t.start)&&g.is(t.end)},(A=x||(x={})).create=function(e,t){return{uri:e,range:t}},A.is=function(e){var t=e;return vt.defined(t)&&y.is(t.range)&&(vt.string(t.uri)||vt.undefined(t.uri))},(k=S||(S={})).create=function(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}},k.is=function(e){var t=e;return vt.defined(t)&&y.is(t.targetRange)&&vt.string(t.targetUri)&&(y.is(t.targetSelectionRange)||vt.undefined(t.targetSelectionRange))&&(y.is(t.originSelectionRange)||vt.undefined(t.originSelectionRange))},(T=C||(C={})).create=function(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}},T.is=function(e){var t=e;return vt.numberRange(t.red,0,1)&&vt.numberRange(t.green,0,1)&&vt.numberRange(t.blue,0,1)&&vt.numberRange(t.alpha,0,1)},(O=w||(w={})).create=function(e,t){return{range:e,color:t}},O.is=function(e){var t=e;return y.is(t.range)&&C.is(t.color)},(I=E||(E={})).create=function(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}},I.is=function(e){var t=e;return vt.string(t.label)&&(vt.undefined(t.textEdit)||J.is(t))&&(vt.undefined(t.additionalTextEdits)||vt.typedArray(t.additionalTextEdits,J.is))},(P=j||(j={})).Comment="comment",P.Imports="imports",P.Region="region",(N=M||(M={})).create=function(e,t,r,n,i){var o={startLine:e,endLine:t};return vt.defined(r)&&(o.startCharacter=r),vt.defined(n)&&(o.endCharacter=n),vt.defined(i)&&(o.kind=i),o},N.is=function(e){var t=e;return vt.uinteger(t.startLine)&&vt.uinteger(t.startLine)&&(vt.undefined(t.startCharacter)||vt.uinteger(t.startCharacter))&&(vt.undefined(t.endCharacter)||vt.uinteger(t.endCharacter))&&(vt.undefined(t.kind)||vt.string(t.kind))},(V=_||(_={})).create=function(e,t){return{location:e,message:t}},V.is=function(e){var t=e;return vt.defined(t)&&x.is(t.location)&&vt.string(t.message)},(R=F||(F={})).Error=1,R.Warning=2,R.Information=3,R.Hint=4,(D=L||(L={})).Unnecessary=1,D.Deprecated=2,($||($={})).is=function(e){var t=e;return null!=t&&vt.string(t.href)},(W=U||(U={})).create=function(e,t,r,n,i,o){var a={range:e,message:t};return vt.defined(r)&&(a.severity=r),vt.defined(n)&&(a.code=n),vt.defined(i)&&(a.source=i),vt.defined(o)&&(a.relatedInformation=o),a},W.is=function(e){var t,r=e;return vt.defined(r)&&y.is(r.range)&&vt.string(r.message)&&(vt.number(r.severity)||vt.undefined(r.severity))&&(vt.integer(r.code)||vt.string(r.code)||vt.undefined(r.code))&&(vt.undefined(r.codeDescription)||vt.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(vt.string(r.source)||vt.undefined(r.source))&&(vt.undefined(r.relatedInformation)||vt.typedArray(r.relatedInformation,_.is))},(B=q||(q={})).create=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={title:e,command:t};return vt.defined(r)&&r.length>0&&(i.arguments=r),i},B.is=function(e){var t=e;return vt.defined(t)&&vt.string(t.title)&&vt.string(t.command)},(K=J||(J={})).replace=function(e,t){return{range:e,newText:t}},K.insert=function(e,t){return{range:{start:e,end:e},newText:t}},K.del=function(e){return{range:e,newText:""}},K.is=function(e){var t=e;return vt.objectLiteral(t)&&vt.string(t.newText)&&y.is(t.range)},(H=z||(z={})).create=function(e,t,r){var n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n},H.is=function(e){var t=e;return void 0!==t&&vt.objectLiteral(t)&&vt.string(t.label)&&(vt.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(vt.string(t.description)||void 0===t.description)},(G||(G={})).is=function(e){return"string"==typeof e},(Z=X||(X={})).replace=function(e,t,r){return{range:e,newText:t,annotationId:r}},Z.insert=function(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}},Z.del=function(e,t){return{range:e,newText:"",annotationId:t}},Z.is=function(e){var t=e;return J.is(t)&&(z.is(t.annotationId)||G.is(t.annotationId))},(Y=Q||(Q={})).create=function(e,t){return{textDocument:e,edits:t}},Y.is=function(e){var t=e;return vt.defined(t)&&Se.is(t.textDocument)&&Array.isArray(t.edits)},(te=ee||(ee={})).create=function(e,t,r){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},te.is=function(e){var t=e;return t&&"create"===t.kind&&vt.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||vt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||vt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||G.is(t.annotationId))},(ne=re||(re={})).create=function(e,t,r,n){var i={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(i.options=r),void 0!==n&&(i.annotationId=n),i},ne.is=function(e){var t=e;return t&&"rename"===t.kind&&vt.string(t.oldUri)&&vt.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||vt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||vt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||G.is(t.annotationId))},(oe=ie||(ie={})).create=function(e,t,r){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},oe.is=function(e){var t=e;return t&&"delete"===t.kind&&vt.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||vt.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||vt.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||G.is(t.annotationId))},(ae||(ae={})).is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return vt.string(e.kind)?ee.is(e)||re.is(e)||ie.is(e):Q.is(e)})))};var ye,be,xe,Ae,Se,ke,Ce,Te,we,Oe,Ee,Ie,je,Pe,Me,Ne,_e,Ve,Fe,Re,Le,De,$e,Ue,We,qe,Be,Je,Ke,ze,He,Ge,Xe,Ze,Qe,Ye,et,tt,rt,nt,it,ot,at,st,ct,ut,lt,ft,ht,dt,pt,mt=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,r){var n,i;if(void 0===r?n=J.insert(e,t):G.is(r)?(i=r,n=X.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=X.insert(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.replace=function(e,t,r){var n,i;if(void 0===r?n=J.replace(e,t):G.is(r)?(i=r,n=X.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=X.replace(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.delete=function(e,t){var r,n;if(void 0===t?r=J.del(e):G.is(t)?(n=t,r=X.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=X.del(e,n)),this.edits.push(r),void 0!==n)return n},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),gt=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var r;if(G.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error("Id "+r+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+r);return this._annotations[r]=t,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new gt(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Q.is(e)){var r=new mt(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=r}}))):e.changes&&Object.keys(e.changes).forEach((function(r){var n=new mt(e.changes[r]);t._textEditChanges[r]=n}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(Se.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(n=this._textEditChanges[t.uri])){var r={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(r),n=new mt(i,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,n=new mt(i),this._textEditChanges[e]=n}return n},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new gt,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,o;if(z.is(t)||G.is(t)?n=t:r=t,void 0===n?i=ee.create(e,r):(o=G.is(n)?n:this._changeAnnotations.manage(n),i=ee.create(e,r,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,a;if(z.is(r)||G.is(r)?i=r:n=r,void 0===i?o=re.create(e,t,n):(a=G.is(i)?i:this._changeAnnotations.manage(i),o=re.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},e.prototype.deleteFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,o;if(z.is(t)||G.is(t)?n=t:r=t,void 0===n?i=ie.create(e,r):(o=G.is(n)?n:this._changeAnnotations.manage(n),i=ie.create(e,r,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}(),(be=ye||(ye={})).create=function(e){return{uri:e}},be.is=function(e){var t=e;return vt.defined(t)&&vt.string(t.uri)},(Ae=xe||(xe={})).create=function(e,t){return{uri:e,version:t}},Ae.is=function(e){var t=e;return vt.defined(t)&&vt.string(t.uri)&&vt.integer(t.version)},(ke=Se||(Se={})).create=function(e,t){return{uri:e,version:t}},ke.is=function(e){var t=e;return vt.defined(t)&&vt.string(t.uri)&&(null===t.version||vt.integer(t.version))},(Te=Ce||(Ce={})).create=function(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}},Te.is=function(e){var t=e;return vt.defined(t)&&vt.string(t.uri)&&vt.string(t.languageId)&&vt.integer(t.version)&&vt.string(t.text)},(Oe=we||(we={})).PlainText="plaintext",Oe.Markdown="markdown",function(e){e.is=function(t){var r=t;return r===e.PlainText||r===e.Markdown}}(we||(we={})),(Ee||(Ee={})).is=function(e){var t=e;return vt.objectLiteral(e)&&we.is(t.kind)&&vt.string(t.value)},(je=Ie||(Ie={})).Text=1,je.Method=2,je.Function=3,je.Constructor=4,je.Field=5,je.Variable=6,je.Class=7,je.Interface=8,je.Module=9,je.Property=10,je.Unit=11,je.Value=12,je.Enum=13,je.Keyword=14,je.Snippet=15,je.Color=16,je.File=17,je.Reference=18,je.Folder=19,je.EnumMember=20,je.Constant=21,je.Struct=22,je.Event=23,je.Operator=24,je.TypeParameter=25,(Me=Pe||(Pe={})).PlainText=1,Me.Snippet=2,(Ne||(Ne={})).Deprecated=1,(Ve=_e||(_e={})).create=function(e,t,r){return{newText:e,insert:t,replace:r}},Ve.is=function(e){var t=e;return t&&vt.string(t.newText)&&y.is(t.insert)&&y.is(t.replace)},(Re=Fe||(Fe={})).asIs=1,Re.adjustIndentation=2,(Le||(Le={})).create=function(e){return{label:e}},(De||(De={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(Ue=$e||($e={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Ue.is=function(e){var t=e;return vt.string(t)||vt.objectLiteral(t)&&vt.string(t.language)&&vt.string(t.value)},(We||(We={})).is=function(e){var t=e;return!!t&&vt.objectLiteral(t)&&(Ee.is(t.contents)||$e.is(t.contents)||vt.typedArray(t.contents,$e.is))&&(void 0===e.range||y.is(e.range))},(qe||(qe={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(Be||(Be={})).create=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={label:e};return vt.defined(t)&&(i.documentation=t),vt.defined(r)?i.parameters=r:i.parameters=[],i},(Ke=Je||(Je={})).Text=1,Ke.Read=2,Ke.Write=3,(ze||(ze={})).create=function(e,t){var r={range:e};return vt.number(t)&&(r.kind=t),r},(Ge=He||(He={})).File=1,Ge.Module=2,Ge.Namespace=3,Ge.Package=4,Ge.Class=5,Ge.Method=6,Ge.Property=7,Ge.Field=8,Ge.Constructor=9,Ge.Enum=10,Ge.Interface=11,Ge.Function=12,Ge.Variable=13,Ge.Constant=14,Ge.String=15,Ge.Number=16,Ge.Boolean=17,Ge.Array=18,Ge.Object=19,Ge.Key=20,Ge.Null=21,Ge.EnumMember=22,Ge.Struct=23,Ge.Event=24,Ge.Operator=25,Ge.TypeParameter=26,(Xe||(Xe={})).Deprecated=1,(Ze||(Ze={})).create=function(e,t,r,n,i){var o={name:e,kind:t,location:{uri:n,range:r}};return i&&(o.containerName=i),o},(Ye=Qe||(Qe={})).create=function(e,t,r,n,i,o){var a={name:e,detail:t,kind:r,range:n,selectionRange:i};return void 0!==o&&(a.children=o),a},Ye.is=function(e){var t=e;return t&&vt.string(t.name)&&vt.number(t.kind)&&y.is(t.range)&&y.is(t.selectionRange)&&(void 0===t.detail||vt.string(t.detail))&&(void 0===t.deprecated||vt.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(tt=et||(et={})).Empty="",tt.QuickFix="quickfix",tt.Refactor="refactor",tt.RefactorExtract="refactor.extract",tt.RefactorInline="refactor.inline",tt.RefactorRewrite="refactor.rewrite",tt.Source="source",tt.SourceOrganizeImports="source.organizeImports",tt.SourceFixAll="source.fixAll",(nt=rt||(rt={})).create=function(e,t){var r={diagnostics:e};return null!=t&&(r.only=t),r},nt.is=function(e){var t=e;return vt.defined(t)&&vt.typedArray(t.diagnostics,U.is)&&(void 0===t.only||vt.typedArray(t.only,vt.string))},(ot=it||(it={})).create=function(e,t,r){var n={title:e},i=!0;return"string"==typeof t?(i=!1,n.kind=t):q.is(t)?n.command=t:n.edit=t,i&&void 0!==r&&(n.kind=r),n},ot.is=function(e){var t=e;return t&&vt.string(t.title)&&(void 0===t.diagnostics||vt.typedArray(t.diagnostics,U.is))&&(void 0===t.kind||vt.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||q.is(t.command))&&(void 0===t.isPreferred||vt.boolean(t.isPreferred))&&(void 0===t.edit||ae.is(t.edit))},(st=at||(at={})).create=function(e,t){var r={range:e};return vt.defined(t)&&(r.data=t),r},st.is=function(e){var t=e;return vt.defined(t)&&y.is(t.range)&&(vt.undefined(t.command)||q.is(t.command))},(ut=ct||(ct={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},ut.is=function(e){var t=e;return vt.defined(t)&&vt.uinteger(t.tabSize)&&vt.boolean(t.insertSpaces)},(ft=lt||(lt={})).create=function(e,t,r){return{range:e,target:t,data:r}},ft.is=function(e){var t=e;return vt.defined(t)&&y.is(t.range)&&(vt.undefined(t.target)||vt.string(t.target))},(dt=ht||(ht={})).create=function(e,t){return{range:e,parent:t}},dt.is=function(e){var t=e;return void 0!==t&&y.is(t.range)&&(void 0===t.parent||dt.is(t.parent))},function(e){function t(e,r){if(e.length<=1)return e;var n=e.length/2|0,i=e.slice(0,n),o=e.slice(n);t(i,r),t(o,r);for(var a=0,s=0,c=0;a<i.length&&s<o.length;){var u=r(i[a],o[s]);e[c++]=u<=0?i[a++]:o[s++]}for(;a<i.length;)e[c++]=i[a++];for(;s<o.length;)e[c++]=o[s++];return e}e.create=function(e,t,r,n){return new xt(e,t,r,n)},e.is=function(e){var t=e;return!!(vt.defined(t)&&vt.string(t.uri)&&(vt.undefined(t.languageId)||vt.string(t.languageId))&&vt.uinteger(t.lineCount)&&vt.func(t.getText)&&vt.func(t.positionAt)&&vt.func(t.offsetAt))},e.applyEdits=function(e,r){for(var n=e.getText(),i=t(r,(function(e,t){var r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r})),o=n.length,a=i.length-1;a>=0;a--){var s=i[a],c=e.offsetAt(s.range.start),u=e.offsetAt(s.range.end);if(!(u<=o))throw new Error("Overlapping edit");n=n.substring(0,c)+s.newText+n.substring(u,n.length),o=c}return n}}(pt||(pt={}));var vt,yt,bt,xt=function(){function e(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,r=!0,n=0;n<t.length;n++){r&&(e.push(n),r=!1);var i=t.charAt(n);r="\r"===i||"\n"===i,"\r"===i&&n+1<t.length&&"\n"===t.charAt(n+1)&&n++}r&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return g.create(0,e);for(;r<n;){var i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+1}var o=r-1;return g.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var r=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,n),r)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();yt=vt||(vt={}),bt=Object.prototype.toString,yt.defined=function(e){return void 0!==e},yt.undefined=function(e){return void 0===e},yt.boolean=function(e){return!0===e||!1===e},yt.string=function(e){return"[object String]"===bt.call(e)},yt.number=function(e){return"[object Number]"===bt.call(e)},yt.numberRange=function(e,t,r){return"[object Number]"===bt.call(e)&&t<=e&&e<=r},yt.integer=function(e){return"[object Number]"===bt.call(e)&&-2147483648<=e&&e<=2147483647},yt.uinteger=function(e){return"[object Number]"===bt.call(e)&&0<=e&&e<=2147483647},yt.func=function(e){return"[object Function]"===bt.call(e)},yt.objectLiteral=function(e){return null!==e&&"object"==typeof e},yt.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)};var At,St,kt,Ct,Tt,wt=class{constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let t of e)if(wt.isIncremental(t)){const e=It(t.range),r=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,r)+t.text+this._content.substring(n,this._content.length);const i=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let a=this._lineOffsets;const s=Et(t.text,!1,r);if(o-i===s.length)for(let e=0,t=s.length;e<t;e++)a[e+i+1]=s[e];else s.length<1e4?a.splice(i+1,o-i,...s):this._lineOffsets=a=a.slice(0,i+1).concat(s,a.slice(o+1));const c=t.text.length-(n-r);if(0!==c)for(let e=i+1+s.length,t=a.length;e<t;e++)a[e]=a[e]+c}else{if(!wt.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=Et(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return{line:0,character:e};for(;r<n;){let i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+1}let i=r-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,n),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}};function Ot(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Ot(n,t),Ot(i,t);let o=0,a=0,s=0;for(;o<n.length&&a<i.length;){let r=t(n[o],i[a]);e[s++]=r<=0?n[o++]:i[a++]}for(;o<n.length;)e[s++]=n[o++];for(;a<i.length;)e[s++]=i[a++];return e}function Et(e,t,r=0){const n=t?[r]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);13!==i&&10!==i||(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,n.push(r+t+1))}return n}function It(e){const t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function jt(e){const t=It(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function Pt(e,t,...r){return function(e,t){let r;return r=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,r)=>{let n=r[0];return void 0!==t[n]?t[n]:e})),r}(t,r)}function Mt(e){return Pt}(St=At||(At={})).create=function(e,t,r,n){return new wt(e,t,r,n)},St.update=function(e,t,r){if(e instanceof wt)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},St.applyEdits=function(e,t){let r=e.getText(),n=Ot(t.map(jt),((e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r})),i=0;const o=[];for(const t of n){let n=e.offsetAt(t.range.start);if(n<i)throw new Error("Overlapping edit");n>i&&o.push(r.substring(i,n)),t.newText.length&&o.push(t.newText),i=e.offsetAt(t.range.end)}return o.push(r.substr(i)),o.join("")},(Ct=kt||(kt={}))[Ct.Undefined=0]="Undefined",Ct[Ct.EnumValueMismatch=1]="EnumValueMismatch",Ct[Ct.Deprecated=2]="Deprecated",Ct[Ct.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",Ct[Ct.UnexpectedEndOfString=258]="UnexpectedEndOfString",Ct[Ct.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",Ct[Ct.InvalidUnicode=260]="InvalidUnicode",Ct[Ct.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",Ct[Ct.InvalidCharacter=262]="InvalidCharacter",Ct[Ct.PropertyExpected=513]="PropertyExpected",Ct[Ct.CommaExpected=514]="CommaExpected",Ct[Ct.ColonExpected=515]="ColonExpected",Ct[Ct.ValueExpected=516]="ValueExpected",Ct[Ct.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",Ct[Ct.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",Ct[Ct.TrailingComma=519]="TrailingComma",Ct[Ct.DuplicateKey=520]="DuplicateKey",Ct[Ct.CommentNotPermitted=521]="CommentNotPermitted",Ct[Ct.SchemaResolveError=768]="SchemaResolveError",(Tt||(Tt={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[we.Markdown,we.PlainText],commitCharactersSupport:!0}}}};var Nt,_t,Vt,Ft=(Nt=function(e,t){return(Nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Nt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Rt=Mt(),Lt={"color-hex":{errorMessage:Rt("colorHexFormatWarning","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:Rt("dateTimeFormatWarning","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:Rt("dateFormatWarning","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:Rt("timeFormatWarning","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:Rt("emailFormatWarning","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:Rt("hostnameFormatWarning","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:Rt("ipv4FormatWarning","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:Rt("ipv6FormatWarning","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}},Dt=function(){function e(e,t,r){void 0===r&&(r=0),this.offset=t,this.length=r,this.parent=e}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}(),$t=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.type="null",n.value=null,n}return Ft(t,e),t}(Dt),Ut=function(e){function t(t,r,n){var i=e.call(this,t,n)||this;return i.type="boolean",i.value=r,i}return Ft(t,e),t}(Dt),Wt=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.type="array",n.items=[],n}return Ft(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(Dt),qt=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.type="number",n.isInteger=!0,n.value=Number.NaN,n}return Ft(t,e),t}(Dt),Bt=function(e){function t(t,r,n){var i=e.call(this,t,r,n)||this;return i.type="string",i.value="",i}return Ft(t,e),t}(Dt),Jt=function(e){function t(t,r,n){var i=e.call(this,t,r)||this;return i.type="property",i.colonOffset=-1,i.keyNode=n,i}return Ft(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(Dt),Kt=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.type="object",n.properties=[],n}return Ft(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(Dt);function zt(e){return me(e)?e?{}:{not:{}}:e}(Vt=_t||(_t={}))[Vt.Key=0]="Key",Vt[Vt.Enum=1]="Enum";var Ht=function(){function e(e,t){void 0===e&&(e=-1),this.focusOffset=e,this.exclude=t,this.schemas=[]}return e.prototype.add=function(e){this.schemas.push(e)},e.prototype.merge=function(e){Array.prototype.push.apply(this.schemas,e.schemas)},e.prototype.include=function(e){return(-1===this.focusOffset||Yt(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Gt=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(e){},e.prototype.merge=function(e){},e.prototype.include=function(e){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),Xt=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(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];this.merge(n)}},e.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},e.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var t=0,r=this.problems;t<r.length;t++){var n=r[t];n.code===kt.EnumValueMismatch&&(n.message=Rt("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map((function(e){return JSON.stringify(e)})).join(", ")))}}},e.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++},e.prototype.compare=function(e){var 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},e}();function Zt(e){return fe(e)}function Qt(e){return le(e)}function Yt(e,t,r){return void 0===r&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var er=function(){function e(e,t,r){void 0===t&&(t=[]),void 0===r&&(r=[]),this.root=e,this.syntaxErrors=t,this.comments=r}return e.prototype.getNodeFromOffset=function(e,t){if(void 0===t&&(t=!1),this.root)return ue(this.root,e,t)},e.prototype.visit=function(e){if(this.root){var t=function(r){var n=e(r),i=r.children;if(Array.isArray(i))for(var o=0;o<i.length&&n;o++)n=t(i[o]);return n};t(this.root)}},e.prototype.validate=function(e,t,r){if(void 0===r&&(r=F.Warning),this.root&&t){var n=new Xt;return tr(this.root,t,n,Gt.instance),n.problems.map((function(t){var n,i=y.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return U.create(i,t.message,null!==(n=t.severity)&&void 0!==n?n:r,t.code)}))}},e.prototype.getMatchingSchemas=function(e,t,r){void 0===t&&(t=-1);var n=new Ht(t,r);return this.root&&e&&tr(this.root,e,new Xt,n),n.schemas},e}();function tr(e,t,r,n){if(e&&n.include(e)){var i=e;switch(i.type){case"object":!function(e,t,r,n){for(var i=Object.create(null),o=[],a=0,s=e.properties;a<s.length;a++)i[D=(g=s[a]).keyNode.value]=g.valueNode,o.push(D);if(Array.isArray(t.required))for(var c=0,u=t.required;c<u.length;c++)if(!i[k=u[c]]){var l=e.parent&&"property"===e.parent.type&&e.parent.keyNode,f=l?{offset:l.offset,length:l.length}:{offset:e.offset,length:1};r.problems.push({location:f,message:Rt("MissingRequiredPropWarning",'Missing property "{0}".',k)})}var h=function(e){for(var t=o.indexOf(e);t>=0;)o.splice(t,1),t=o.indexOf(e)};if(t.properties)for(var d=0,p=Object.keys(t.properties);d<p.length;d++){h(k=p[d]);var m=t.properties[k];if(I=i[k])if(me(m))if(m)r.propertiesMatches++,r.propertiesValueMatches++;else{var g=I.parent;r.problems.push({location:{offset:g.keyNode.offset,length:g.keyNode.length},message:t.errorMessage||Rt("DisallowedExtraPropWarning","Property {0} is not allowed.",k)})}else tr(I,m,w=new Xt,n),r.mergePropertyMatch(w)}if(t.patternProperties)for(var v=0,y=Object.keys(t.patternProperties);v<y.length;v++)for(var b=y[v],x=ve(b),A=0,S=o.slice(0);A<S.length;A++){var k=S[A];(null==x?void 0:x.test(k))&&(h(k),(I=i[k])&&(me(m=t.patternProperties[b])?m?(r.propertiesMatches++,r.propertiesValueMatches++):(g=I.parent,r.problems.push({location:{offset:g.keyNode.offset,length:g.keyNode.length},message:t.errorMessage||Rt("DisallowedExtraPropWarning","Property {0} is not allowed.",k)})):(tr(I,m,w=new Xt,n),r.mergePropertyMatch(w))))}if("object"==typeof t.additionalProperties){for(var C=0,T=o;C<T.length;C++)if(I=i[k=T[C]]){var w=new Xt;tr(I,t.additionalProperties,w,n),r.mergePropertyMatch(w)}}else if(!1===t.additionalProperties&&o.length>0)for(var O=0,E=o;O<E.length;O++){var I;(I=i[k=E[O]])&&(g=I.parent,r.problems.push({location:{offset:g.keyNode.offset,length:g.keyNode.length},message:t.errorMessage||Rt("DisallowedExtraPropWarning","Property {0} is not allowed.",k)}))}if(de(t.maxProperties)&&e.properties.length>t.maxProperties&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)}),de(t.minProperties)&&e.properties.length<t.minProperties&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("MinPropWarning","Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependencies)for(var j=0,P=Object.keys(t.dependencies);j<P.length;j++)if(i[D=P[j]]){var M=t.dependencies[D];if(Array.isArray(M))for(var N=0,_=M;N<_.length;N++){var V=_[N];i[V]?r.propertiesValueMatches++:r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",V,D)})}else(m=zt(M))&&(tr(e,m,w=new Xt,n),r.mergePropertyMatch(w))}var F=zt(t.propertyNames);if(F)for(var R=0,L=e.properties;R<L.length;R++){var D;(D=L[R].keyNode)&&tr(D,F,r,Gt.instance)}}(i,t,r,n);break;case"array":!function(e,t,r,n){if(Array.isArray(t.items)){for(var i=t.items,o=0;o<i.length;o++){var a=zt(i[o]),s=new Xt;(h=e.items[o])?(tr(h,a,s,n),r.mergePropertyMatch(s)):e.items.length>=i.length&&r.propertiesValueMatches++}if(e.items.length>i.length)if("object"==typeof t.additionalItems)for(var c=i.length;c<e.items.length;c++)s=new Xt,tr(e.items[c],t.additionalItems,s,n),r.mergePropertyMatch(s);else!1===t.additionalItems&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",i.length)})}else{var u=zt(t.items);if(u)for(var l=0,f=e.items;l<f.length;l++){var h;tr(h=f[l],u,s=new Xt,n),r.mergePropertyMatch(s)}}var d=zt(t.contains);if(d&&(e.items.some((function(e){var t=new Xt;return tr(e,d,t,Gt.instance),!t.hasProblems()}))||r.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||Rt("requiredItemMissingWarning","Array does not contain required item.")})),de(t.minItems)&&e.items.length<t.minItems&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("minItemsWarning","Array has too few items. Expected {0} or more.",t.minItems)}),de(t.maxItems)&&e.items.length>t.maxItems&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("maxItemsWarning","Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){var p=Zt(e);p.some((function(e,t){return t!==p.lastIndexOf(e)}))&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("uniqueItemsWarning","Array has duplicate items.")})}}(i,t,r,n);break;case"string":!function(e,t,r,n){if(de(t.minLength)&&e.value.length<t.minLength&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("minLengthWarning","String is shorter than the minimum length of {0}.",t.minLength)}),de(t.maxLength)&&e.value.length>t.maxLength&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("maxLengthWarning","String is longer than the maximum length of {0}.",t.maxLength)}),"string"==typeof t.pattern){var i=ve(t.pattern);(null==i?void 0:i.test(e.value))||r.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Rt("patternWarning",'String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":var o=void 0;if(e.value){var a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);a?a[2]||"uri"!==t.format||(o=Rt("uriSchemeMissing","URI with a scheme is expected.")):o=Rt("uriMissing","URI is expected.")}else o=Rt("uriEmpty","URI expected.");o&&r.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Rt("uriFormatWarning","String is not a URI: {0}",o)});break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":var s=Lt[t.format];e.value&&s.pattern.exec(e.value)||r.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||s.errorMessage})}}(i,t,r);break;case"number":!function(e,t,r,n){var i=e.value;function o(e){var t,r=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return r&&{value:Number(r[1]+(r[2]||"")),multiplier:((null===(t=r[2])||void 0===t?void 0:t.length)||0)-(parseInt(r[3])||0)}}if(de(t.multipleOf)){var a=-1;if(Number.isInteger(t.multipleOf))a=i%t.multipleOf;else{var s=o(t.multipleOf),c=o(i);if(s&&c){var u=Math.pow(10,Math.abs(c.multiplier-s.multiplier));c.multiplier<s.multiplier?c.value*=u:s.value*=u,a=c.value%s.value}}0!==a&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("multipleOfWarning","Value is not divisible by {0}.",t.multipleOf)})}function l(e,t){return de(t)?t:me(t)&&t?e:void 0}function f(e,t){if(!me(t)||!t)return e}var h=l(t.minimum,t.exclusiveMinimum);de(h)&&i<=h&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",h)});var d=l(t.maximum,t.exclusiveMaximum);de(d)&&i>=d&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",d)});var p=f(t.minimum,t.exclusiveMinimum);de(p)&&i<p&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("minimumWarning","Value is below the minimum of {0}.",p)});var m=f(t.maximum,t.exclusiveMaximum);de(m)&&i>m&&r.problems.push({location:{offset:e.offset,length:e.length},message:Rt("maximumWarning","Value is above the maximum of {0}.",m)})}(i,t,r);break;case"property":return tr(i.valueNode,t,r,n)}!function(){function e(e){return i.type===e||"integer"===e&&"number"===i.type&&i.isInteger}if(Array.isArray(t.type)?t.type.some(e)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||Rt("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||Rt("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var o=0,a=t.allOf;o<a.length;o++){var s=a[o];tr(i,zt(s),r,n)}var c=zt(t.not);if(c){var u=new Xt,l=n.newSub();tr(i,c,u,l),u.hasProblems()||r.problems.push({location:{offset:i.offset,length:i.length},message:Rt("notSchemaWarning","Matches a schema that is not allowed.")});for(var f=0,h=l.schemas;f<h.length;f++){var d=h[f];d.inverted=!d.inverted,n.add(d)}}var p=function(e,t){for(var o=[],a=void 0,s=0,c=e;s<c.length;s++){var u=zt(c[s]),l=new Xt,f=n.newSub();if(tr(i,u,l,f),l.hasProblems()||o.push(u),a)if(t||l.hasProblems()||a.validationResult.hasProblems()){var h=l.compare(a.validationResult);h>0?a={schema:u,validationResult:l,matchingSchemas:f}:0===h&&(a.matchingSchemas.merge(f),a.validationResult.mergeEnumValues(l))}else a.matchingSchemas.merge(f),a.validationResult.propertiesMatches+=l.propertiesMatches,a.validationResult.propertiesValueMatches+=l.propertiesValueMatches;else a={schema:u,validationResult:l,matchingSchemas:f}}return o.length>1&&t&&r.problems.push({location:{offset:i.offset,length:1},message:Rt("oneOfWarning","Matches multiple schemas when only one must validate.")}),a&&(r.merge(a.validationResult),r.propertiesMatches+=a.validationResult.propertiesMatches,r.propertiesValueMatches+=a.validationResult.propertiesValueMatches,n.merge(a.matchingSchemas)),o.length};Array.isArray(t.anyOf)&&p(t.anyOf,!1),Array.isArray(t.oneOf)&&p(t.oneOf,!0);var m,g,v,y,b,x,A=function(e){var t=new Xt,o=n.newSub();tr(i,zt(e),t,o),r.merge(t),r.propertiesMatches+=t.propertiesMatches,r.propertiesValueMatches+=t.propertiesValueMatches,n.merge(o)},S=zt(t.if);if(S&&(m=S,g=zt(t.then),v=zt(t.else),y=zt(m),b=new Xt,x=n.newSub(),tr(i,y,b,x),n.merge(x),b.hasProblems()?v&&A(v):g&&A(g)),Array.isArray(t.enum)){for(var k=Zt(i),C=!1,T=0,w=t.enum;T<w.length;T++){if(he(k,w[T])){C=!0;break}}r.enumValues=t.enum,r.enumValueMatch=C,C||r.problems.push({location:{offset:i.offset,length:i.length},code:kt.EnumValueMismatch,message:t.errorMessage||Rt("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map((function(e){return JSON.stringify(e)})).join(", "))})}pe(t.const)&&(he(k=Zt(i),t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:i.offset,length:i.length},code:kt.EnumValueMismatch,message:t.errorMessage||Rt("constWarning","Value must be {0}.",JSON.stringify(t.const))}),r.enumValueMatch=!1),r.enumValues=[t.const]),t.deprecationMessage&&i.parent&&r.problems.push({location:{offset:i.parent.offset,length:i.parent.length},severity:F.Warning,message:t.deprecationMessage,code:kt.Deprecated})}(),n.add({node:i,schema:t})}}function rr(e,t,r){if(null!==e&&"object"==typeof e){var n=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";for(var i="[\n",o=0;o<e.length;o++)i+=n+rr(e[o],n,r),o<e.length-1&&(i+=","),i+="\n";return i+(t+"]")}var a=Object.keys(e);if(0===a.length)return"{}";for(i="{\n",o=0;o<a.length;o++){var s=a[o];i+=n+JSON.stringify(s)+": "+rr(e[s],n,r),o<a.length-1&&(i+=","),i+="\n"}return i+(t+"}")}return r(e)}var nr=Mt(),ir=function(){function e(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=Promise),void 0===n&&(n={}),this.schemaService=e,this.contributions=t,this.promiseConstructor=r,this.clientCapabilities=n}return e.prototype.doResolve=function(e){for(var t=this.contributions.length-1;t>=0;t--){var r=this.contributions[t].resolveCompletion;if(r){var n=r(e);if(n)return n}}return this.promiseConstructor.resolve(e)},e.prototype.doComplete=function(e,t,r){var n=this,i={items:[],isIncomplete:!1},o=e.getText(),a=e.offsetAt(t),s=r.getNodeFromOffset(a,!0);if(this.isInComment(e,s?s.offset:0,a))return Promise.resolve(i);if(s&&a===s.offset+s.length&&a>0){var c=o[a-1];("object"===s.type&&"}"===c||"array"===s.type&&"]"===c)&&(s=s.parent)}var u,l=this.getCurrentWord(e,a);if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){var f=a-l.length;f>0&&'"'===o[f-1]&&f--,u=y.create(e.positionAt(f),t)}else u=y.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));var h={},d={add:function(e){var t=e.label,r=h[t];if(r)r.documentation||(r.documentation=e.documentation),r.detail||(r.detail=e.detail);else{if((t=t.replace(/[\n]/g,"↵")).length>60){var n=t.substr(0,57).trim()+"...";h[n]||(t=n)}u&&void 0!==e.insertText&&(e.textEdit=J.replace(u,e.insertText)),e.label=t,h[t]=e,i.items.push(e)}},setAsIncomplete:function(){i.isIncomplete=!0},error:function(e){console.error(e)},log:function(e){console.log(e)},getNumberOfProposals:function(){return i.items.length}};return this.schemaService.getSchemaForResource(e.uri,r).then((function(t){var c=[],f=!0,p="",m=void 0;if(s&&"string"===s.type){var g=s.parent;g&&"property"===g.type&&g.keyNode===s&&(f=!g.valueNode,m=g,p=o.substr(s.offset+1,s.length-2),g&&(s=g.parent))}if(s&&"object"===s.type){if(s.offset===a)return i;s.properties.forEach((function(e){m&&m===e||(h[e.keyNode.value]=Le.create("__"))}));var v="";f&&(v=n.evaluateSeparatorAfter(e,e.offsetAt(u.end))),t?n.getPropertyCompletions(t,r,s,f,v,d):n.getSchemaLessPropertyCompletions(r,s,p,d);var y=Qt(s);n.contributions.forEach((function(t){var r=t.collectPropertyCompletions(e.uri,y,l,f,""===v,d);r&&c.push(r)})),!t&&l.length>0&&'"'!==o.charAt(a-l.length-1)&&(d.add({kind:Ie.Property,label:n.getLabelForValue(l),insertText:n.getInsertTextForProperty(l,void 0,!1,v),insertTextFormat:Pe.Snippet,documentation:""}),d.setAsIncomplete())}var b={};return t?n.getValueCompletions(t,r,s,a,e,d,b):n.getSchemaLessValueCompletions(r,s,a,e,d),n.contributions.length>0&&n.getContributedValueCompletions(r,s,a,e,d,c),n.promiseConstructor.all(c).then((function(){if(0===d.getNumberOfProposals()){var t=a;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);var r=n.evaluateSeparatorAfter(e,t);n.addFillerValueCompletions(b,r,d)}return i}))}))},e.prototype.getPropertyCompletions=function(e,t,r,n,i,o){var a=this;t.getMatchingSchemas(e.schema,r.offset).forEach((function(e){if(e.node===r&&!e.inverted){var t=e.schema.properties;t&&Object.keys(t).forEach((function(e){var r=t[e];if("object"==typeof r&&!r.deprecationMessage&&!r.doNotSuggest){var s={kind:Ie.Property,label:e,insertText:a.getInsertTextForProperty(e,r,n,i),insertTextFormat:Pe.Snippet,filterText:a.getFilterTextForValue(e),documentation:a.fromMarkup(r.markdownDescription)||r.description||""};void 0!==r.suggestSortText&&(s.sortText=r.suggestSortText),s.insertText&&ge(s.insertText,"$1".concat(i))&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(s)}}));var s=e.schema.propertyNames;if("object"==typeof s&&!s.deprecationMessage&&!s.doNotSuggest){var c=function(e,t){void 0===t&&(t=void 0);var r={kind:Ie.Property,label:e,insertText:a.getInsertTextForProperty(e,void 0,n,i),insertTextFormat:Pe.Snippet,filterText:a.getFilterTextForValue(e),documentation:t||a.fromMarkup(s.markdownDescription)||s.description||""};void 0!==s.suggestSortText&&(r.sortText=s.suggestSortText),r.insertText&&ge(r.insertText,"$1".concat(i))&&(r.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(r)};if(s.enum)for(var u=0;u<s.enum.length;u++){var l=void 0;s.markdownEnumDescriptions&&u<s.markdownEnumDescriptions.length?l=a.fromMarkup(s.markdownEnumDescriptions[u]):s.enumDescriptions&&u<s.enumDescriptions.length&&(l=s.enumDescriptions[u]),c(s.enum[u],l)}s.const&&c(s.const)}}}))},e.prototype.getSchemaLessPropertyCompletions=function(e,t,r,n){var i=this,o=function(e){e.properties.forEach((function(e){var t=e.keyNode.value;n.add({kind:Ie.Property,label:t,insertText:i.getInsertTextForValue(t,""),insertTextFormat:Pe.Snippet,filterText:i.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){var a=t.parent.keyNode.value;e.visit((function(e){return"property"===e.type&&e!==t.parent&&e.keyNode.value===a&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0}))}else"array"===t.parent.type&&t.parent.items.forEach((function(e){"object"===e.type&&e!==t&&o(e)}));else"object"===t.type&&n.add({kind:Ie.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:Pe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(e,t,r,n,i){var o=this,a=r;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(a=t.offset+t.length,t=t.parent),!t)return i.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Pe.Snippet,documentation:""}),void i.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Pe.Snippet,documentation:""});var s=this.evaluateSeparatorAfter(n,a),c=function(e){e.parent&&!Yt(e.parent,r,!0)&&i.add({kind:o.getSuggestionKind(e.type),label:o.getLabelTextForMatchingNode(e,n),insertText:o.getInsertTextForMatchingNode(e,n,s),insertTextFormat:Pe.Snippet,documentation:""}),"boolean"===e.type&&o.addBooleanValueCompletion(!e.value,s,i)};if("property"===t.type&&r>(t.colonOffset||0)){var u=t.valueNode;if(u&&(r>u.offset+u.length||"object"===u.type||"array"===u.type))return;var l=t.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===l&&e.valueNode&&c(e.valueNode),!0})),"$schema"===l&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,i)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){var f=t.parent.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===f&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(c),!0}))}else t.items.forEach(c)},e.prototype.getValueCompletions=function(e,t,r,n,i,o,a){var s=n,c=void 0,u=void 0;if(!r||"string"!==r.type&&"number"!==r.type&&"boolean"!==r.type&&"null"!==r.type||(s=r.offset+r.length,u=r,r=r.parent),r){if("property"===r.type&&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&&(void 0!==c||"array"===r.type)){for(var f=this.evaluateSeparatorAfter(i,s),h=0,d=t.getMatchingSchemas(e.schema,r.offset,u);h<d.length;h++){var p=d[h];if(p.node===r&&!p.inverted&&p.schema){if("array"===r.type&&p.schema.items)if(Array.isArray(p.schema.items)){var m=this.findItemAtOffset(r,i,n);m<p.schema.items.length&&this.addSchemaValueCompletions(p.schema.items[m],f,o,a)}else this.addSchemaValueCompletions(p.schema.items,f,o,a);if(void 0!==c){var g=!1;if(p.schema.properties&&(A=p.schema.properties[c])&&(g=!0,this.addSchemaValueCompletions(A,f,o,a)),p.schema.patternProperties&&!g)for(var v=0,y=Object.keys(p.schema.patternProperties);v<y.length;v++){var b=y[v],x=ve(b);if(null==x?void 0:x.test(c)){g=!0;var A=p.schema.patternProperties[b];this.addSchemaValueCompletions(A,f,o,a)}}p.schema.additionalProperties&&!g&&(A=p.schema.additionalProperties,this.addSchemaValueCompletions(A,f,o,a))}}}"$schema"!==c||r.parent||this.addDollarSchemaCompletions(f,o),a.boolean&&(this.addBooleanValueCompletion(!0,f,o),this.addBooleanValueCompletion(!1,f,o)),a.null&&this.addNullValueCompletion(f,o)}}else this.addSchemaValueCompletions(e.schema,"",o,a)},e.prototype.getContributedValueCompletions=function(e,t,r,n,i,o){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),t&&"property"===t.type&&r>(t.colonOffset||0)){var a=t.keyNode.value,s=t.valueNode;if((!s||r<=s.offset+s.length)&&t.parent){var c=Qt(t.parent);this.contributions.forEach((function(e){var t=e.collectValueCompletions(n.uri,c,a,i);t&&o.push(t)}))}}}else this.contributions.forEach((function(e){var t=e.collectDefaultCompletions(n.uri,i);t&&o.push(t)}))},e.prototype.addSchemaValueCompletions=function(e,t,r,n){var i=this;"object"==typeof e&&(this.addEnumValueCompletions(e,t,r),this.addDefaultValueCompletions(e,t,r),this.collectTypes(e,n),Array.isArray(e.allOf)&&e.allOf.forEach((function(e){return i.addSchemaValueCompletions(e,t,r,n)})),Array.isArray(e.anyOf)&&e.anyOf.forEach((function(e){return i.addSchemaValueCompletions(e,t,r,n)})),Array.isArray(e.oneOf)&&e.oneOf.forEach((function(e){return i.addSchemaValueCompletions(e,t,r,n)})))},e.prototype.addDefaultValueCompletions=function(e,t,r,n){var i=this;void 0===n&&(n=0);var o=!1;if(pe(e.default)){for(var a=e.type,s=e.default,c=n;c>0;c--)s=[s],a="array";r.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:Pe.Snippet,detail:nr("json.suggest.default","Default value")}),o=!0}Array.isArray(e.examples)&&e.examples.forEach((function(a){for(var s=e.type,c=a,u=n;u>0;u--)c=[c],s="array";r.add({kind:i.getSuggestionKind(s),label:i.getLabelForValue(c),insertText:i.getInsertTextForValue(c,t),insertTextFormat:Pe.Snippet}),o=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((function(a){var s,c,u=e.type,l=a.body,f=a.label;if(pe(l)){e.type;for(var h=n;h>0;h--)l=[l];s=i.getInsertTextForSnippetValue(l,t),c=i.getFilterTextForSnippetValue(l),f=f||i.getLabelForSnippetValue(l)}else{if("string"!=typeof a.bodyText)return;var d="",p="",m="";for(h=n;h>0;h--)d=d+m+"[\n",p=p+"\n"+m+"]",m+="\t",u="array";s=d+m+a.bodyText.split("\n").join("\n"+m)+p+t,f=f||s,c=s.replace(/[\n]/g,"")}r.add({kind:i.getSuggestionKind(u),label:f,documentation:i.fromMarkup(a.markdownDescription)||a.description,insertText:s,insertTextFormat:Pe.Snippet,filterText:c}),o=!0})),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&n<5&&this.addDefaultValueCompletions(e.items,t,r,n+1)},e.prototype.addEnumValueCompletions=function(e,t,r){if(pe(e.const)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:Pe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(var n=0,i=e.enum.length;n<i;n++){var o=e.enum[n],a=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&n<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?a=this.fromMarkup(e.markdownEnumDescriptions[n]):e.enumDescriptions&&n<e.enumDescriptions.length&&(a=e.enumDescriptions[n]),r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:Pe.Snippet,documentation:a})}},e.prototype.collectTypes=function(e,t){if(!Array.isArray(e.enum)&&!pe(e.const)){var r=e.type;Array.isArray(r)?r.forEach((function(e){return t[e]=!0})):r&&(t[r]=!0)}},e.prototype.addFillerValueCompletions=function(e,t,r){e.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:Pe.Snippet,detail:nr("defaults.object","New object"),documentation:""}),e.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:Pe.Snippet,detail:nr("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(e,t,r){r.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:Pe.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Pe.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(e,t){var r=this,n=this.schemaService.getRegisteredSchemaIds((function(e){return"http"===e||"https"===e}));n.forEach((function(n){return t.add({kind:Ie.Module,label:r.getLabelForValue(n),filterText:r.getFilterTextForValue(n),insertText:r.getInsertTextForValue(n,e),insertTextFormat:Pe.Snippet,documentation:""})}))},e.prototype.getLabelForValue=function(e){return JSON.stringify(e)},e.prototype.getFilterTextForValue=function(e){return JSON.stringify(e)},e.prototype.getFilterTextForSnippetValue=function(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(e){return e.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(e,t){var r=JSON.stringify(e,null,"\t");return"{}"===r?"{$1}"+t:"[]"===r?"[$1]"+t:this.getInsertTextForPlainText(r+t)},e.prototype.getInsertTextForSnippetValue=function(e,t){return rr(e,"",(function(e){return"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)}))+t},e.prototype.getInsertTextForGuessedValue=function(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":var r=JSON.stringify(e);return r=r.substr(1,r.length-2),'"${1:'+(r=this.getInsertTextForPlainText(r))+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)},e.prototype.getSuggestionKind=function(e){if(Array.isArray(e)){var 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}},e.prototype.getLabelTextForMatchingNode=function(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}},e.prototype.getInsertTextForMatchingNode=function(e,t,r){switch(e.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:var n=t.getText().substr(e.offset,e.length)+r;return this.getInsertTextForPlainText(n)}},e.prototype.getInsertTextForProperty=function(e,t,r,n){var i=this.getInsertTextForValue(e,"");if(!r)return i;var o,a=i+": ",s=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){var c=t.defaultSnippets[0].body;pe(c)&&(o=this.getInsertTextForSnippetValue(c,""))}s+=t.defaultSnippets.length}if(t.enum&&(o||1!==t.enum.length||(o=this.getInsertTextForGuessedValue(t.enum[0],"")),s+=t.enum.length),pe(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),s++),Array.isArray(t.examples)&&t.examples.length&&(o||(o=this.getInsertTextForGuessedValue(t.examples[0],"")),s+=t.examples.length),0===s){var u=Array.isArray(t.type)?t.type[0]:t.type;switch(u||(t.properties?u="object":t.items&&(u="array")),u){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return i}}}return(!o||s>1)&&(o="$1"),a+o+n},e.prototype.getCurrentWord=function(e,t){for(var r=t-1,n=e.getText();r>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(n.charAt(r));)r--;return n.substring(r+1,t)},e.prototype.evaluateSeparatorAfter=function(e,t){var r=se(e.getText(),!0);switch(r.setPosition(t),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(e,t,r){for(var n=se(t.getText(),!0),i=e.items,o=i.length-1;o>=0;o--){var a=i[o];if(r>a.offset+a.length)return n.setPosition(a.offset+a.length),5===n.scan()&&r>=n.getTokenOffset()+n.getTokenLength()?o+1:o;if(r>=a.offset)return o}return 0},e.prototype.isInComment=function(e,t,r){var n=se(e.getText(),!1);n.setPosition(t);for(var i=n.scan();17!==i&&n.getTokenOffset()+n.getTokenLength()<r;)i=n.scan();return(12===i||13===i)&&n.getTokenOffset()<=r},e.prototype.fromMarkup=function(e){if(e&&this.doesSupportMarkdown())return{kind:we.Markdown,value:e}},e.prototype.doesSupportMarkdown=function(){if(!pe(this.supportsMarkdown)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&-1!==e.completionItem.documentationFormat.indexOf(we.Markdown)}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!pe(this.supportsCommitCharacters)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),or=function(){function e(e,t,r){void 0===t&&(t=[]),this.schemaService=e,this.contributions=t,this.promise=r||Promise}return e.prototype.doHover=function(e,t,r){var n=e.offsetAt(t),i=r.getNodeFromOffset(n);if(!i||("object"===i.type||"array"===i.type)&&n>i.offset+1&&n<i.offset+i.length-1)return this.promise.resolve(null);var o=i;if("string"===i.type){var a=i.parent;if(a&&"property"===a.type&&a.keyNode===i&&!(i=a.valueNode))return this.promise.resolve(null)}for(var s=y.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length)),c=function(e){return{contents:e,range:s}},u=Qt(i),l=this.contributions.length-1;l>=0;l--){var f=this.contributions[l].getInfoContribution(e.uri,u);if(f)return f.then((function(e){return c(e)}))}return this.schemaService.getSchemaForResource(e.uri,r).then((function(e){if(e&&i){var t=r.getMatchingSchemas(e.schema,i.offset),n=void 0,o=void 0,a=void 0,s=void 0;t.every((function(e){if(e.node===i&&!e.inverted&&e.schema&&(n=n||e.schema.title,o=o||e.schema.markdownDescription||ar(e.schema.description),e.schema.enum)){var t=e.schema.enum.indexOf(Zt(i));e.schema.markdownEnumDescriptions?a=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(a=ar(e.schema.enumDescriptions[t])),a&&"string"!=typeof(s=e.schema.enum[t])&&(s=JSON.stringify(s))}return!0}));var u="";return n&&(u=ar(n)),o&&(u.length>0&&(u+="\n\n"),u+=o),a&&(u.length>0&&(u+="\n\n"),u+="`".concat((l=s,-1!==l.indexOf("`")?"`` "+l+" ``":l),"`: ").concat(a)),c([u])}var l;return null}))},e}();function ar(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var sr=Mt(),cr=function(){function e(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:F.Error)},e.prototype.doValidation=function(e,t,r,n){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],a={},s=function(e){var t=e.range.start.line+" "+e.range.start.character+" "+e.message;a[t]||(a[t]=!0,o.push(e))},c=function(n){var a=(null==r?void 0:r.trailingCommas)?hr(r.trailingCommas):F.Error,c=(null==r?void 0:r.comments)?hr(r.comments):i.commentSeverity,u=(null==r?void 0:r.schemaValidation)?hr(r.schemaValidation):F.Warning,l=(null==r?void 0:r.schemaRequest)?hr(r.schemaRequest):F.Warning;if(n){if(n.errors.length&&t.root&&l){var f=t.root,h="object"===f.type?f.properties[0]:void 0;if(h&&"$schema"===h.keyNode.value){var d=h.valueNode||h,p=y.create(e.positionAt(d.offset),e.positionAt(d.offset+d.length));s(U.create(p,n.errors[0],l,kt.SchemaResolveError))}else p=y.create(e.positionAt(f.offset),e.positionAt(f.offset+1)),s(U.create(p,n.errors[0],l,kt.SchemaResolveError))}else if(u){var m=t.validate(e,n.schema,u);m&&m.forEach(s)}lr(n.schema)&&(c=void 0),fr(n.schema)&&(a=void 0)}for(var g=0,v=t.syntaxErrors;g<v.length;g++){var b=v[g];if(b.code===kt.TrailingComma){if("number"!=typeof a)continue;b.severity=a}s(b)}if("number"==typeof c){var x=sr("InvalidCommentToken","Comments are not permitted in JSON.");t.comments.forEach((function(e){s(U.create(e,x,c,kt.CommentNotPermitted))}))}return o};if(n){var u=n.id||"schemaservice://untitled/"+ur++;return this.jsonSchemaService.registerExternalSchema(u,[],n).getResolvedSchema().then((function(e){return c(e)}))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((function(e){return c(e)}))},e.prototype.getLanguageStatus=function(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}},e}(),ur=0;function lr(e){if(e&&"object"==typeof e){if(me(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=lr(r[t]);if(me(n))return n}}}function fr(e){if(e&&"object"==typeof e){if(me(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(me(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var r=0,n=e.allOf;r<n.length;r++){var i=fr(n[r]);if(me(i))return i}}}function hr(e){switch(e){case"error":return F.Error;case"warning":return F.Warning;case"ignore":return}}function dr(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function pr(e){if("#"===e[0])switch(e.length){case 4:return{red:17*dr(e.charCodeAt(1))/255,green:17*dr(e.charCodeAt(2))/255,blue:17*dr(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*dr(e.charCodeAt(1))/255,green:17*dr(e.charCodeAt(2))/255,blue:17*dr(e.charCodeAt(3))/255,alpha:17*dr(e.charCodeAt(4))/255};case 7:return{red:(16*dr(e.charCodeAt(1))+dr(e.charCodeAt(2)))/255,green:(16*dr(e.charCodeAt(3))+dr(e.charCodeAt(4)))/255,blue:(16*dr(e.charCodeAt(5))+dr(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*dr(e.charCodeAt(1))+dr(e.charCodeAt(2)))/255,green:(16*dr(e.charCodeAt(3))+dr(e.charCodeAt(4)))/255,blue:(16*dr(e.charCodeAt(5))+dr(e.charCodeAt(6)))/255,alpha:(16*dr(e.charCodeAt(7))+dr(e.charCodeAt(8)))/255}}}var mr=function(){function e(e){this.schemaService=e}return e.prototype.findDocumentSymbols=function(e,t,r){var n=this;void 0===r&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return[];var o=r.resultLimit||Number.MAX_VALUE,a=e.uri;if(("vscode://defaultsettings/keybindings.json"===a||ge(a.toLowerCase(),"/user/keybindings.json"))&&"array"===i.type){for(var s=[],c=0,u=i.items;c<u.length;c++){var l=u[c];if("object"===l.type)for(var f=0,h=l.properties;f<h.length;f++){var d=h[f];if("key"===d.keyNode.value&&d.valueNode){var p=x.create(e.uri,gr(e,l));if(s.push({name:Zt(d.valueNode),kind:He.Function,location:p}),--o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),s}}}return s}for(var m=[{node:i,containerName:""}],g=0,v=!1,y=[],b=function(t,r){"array"===t.type?t.items.forEach((function(e){e&&m.push({node:e,containerName:r})})):"object"===t.type&&t.properties.forEach((function(t){var i=t.valueNode;if(i)if(o>0){o--;var a=x.create(e.uri,gr(e,t)),s=r?r+"."+t.keyNode.value:t.keyNode.value;y.push({name:n.getKeyLabel(t),kind:n.getSymbolKind(i.type),location:a,containerName:r}),m.push({node:i,containerName:s})}else v=!0}))};g<m.length;){var A=m[g++];b(A.node,A.containerName)}return v&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),y},e.prototype.findDocumentSymbols2=function(e,t,r){var n=this;void 0===r&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return[];var o=r.resultLimit||Number.MAX_VALUE,a=e.uri;if(("vscode://defaultsettings/keybindings.json"===a||ge(a.toLowerCase(),"/user/keybindings.json"))&&"array"===i.type){for(var s=[],c=0,u=i.items;c<u.length;c++){var l=u[c];if("object"===l.type)for(var f=0,h=l.properties;f<h.length;f++){var d=h[f];if("key"===d.keyNode.value&&d.valueNode){var p=gr(e,l),m=gr(e,d.keyNode);if(s.push({name:Zt(d.valueNode),kind:He.Function,range:p,selectionRange:m}),--o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),s}}}return s}for(var g=[],v=[{node:i,result:g}],y=0,b=!1,x=function(t,r){"array"===t.type?t.items.forEach((function(t,i){if(t)if(o>0){o--;var a=gr(e,t),s=a,c={name:String(i),kind:n.getSymbolKind(t.type),range:a,selectionRange:s,children:[]};r.push(c),v.push({result:c.children,node:t})}else b=!0})):"object"===t.type&&t.properties.forEach((function(t){var i=t.valueNode;if(i)if(o>0){o--;var a=gr(e,t),s=gr(e,t.keyNode),c=[],u={name:n.getKeyLabel(t),kind:n.getSymbolKind(i.type),range:a,selectionRange:s,children:c,detail:n.getDetail(i)};r.push(u),v.push({result:c,node:i})}else b=!0}))};y<v.length;){var A=v[y++];x(A.node,A.result)}return b&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),g},e.prototype.getSymbolKind=function(e){switch(e){case"object":return He.Module;case"string":return He.String;case"number":return He.Number;case"array":return He.Array;case"boolean":return He.Boolean;default:return He.Variable}},e.prototype.getKeyLabel=function(e){var t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:'"'.concat(t,'"')},e.prototype.getDetail=function(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},e.prototype.findDocumentColors=function(e,t,r){return this.schemaService.getSchemaForResource(e.uri,t).then((function(n){var i=[];if(n)for(var o=r&&"number"==typeof r.resultLimit?r.resultLimit:Number.MAX_VALUE,a={},s=0,c=t.getMatchingSchemas(n.schema);s<c.length;s++){var u=c[s];if(!u.inverted&&u.schema&&("color"===u.schema.format||"color-hex"===u.schema.format)&&u.node&&"string"===u.node.type){var l=String(u.node.offset);if(!a[l]){var f=pr(Zt(u.node));if(f){var h=gr(e,u.node);i.push({color:f,range:h})}if(a[l]=!0,--o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(e.uri),i}}}return i}))},e.prototype.getColorPresentations=function(e,t,r,n){var i,o=[],a=Math.round(255*r.red),s=Math.round(255*r.green),c=Math.round(255*r.blue);function u(e){var t=e.toString(16);return 2!==t.length?"0"+t:t}return i=1===r.alpha?"#".concat(u(a)).concat(u(s)).concat(u(c)):"#".concat(u(a)).concat(u(s)).concat(u(c)).concat(u(Math.round(255*r.alpha))),o.push({label:i,textEdit:J.replace(n,JSON.stringify(i))}),o},e}();function gr(e,t){return y.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var vr,yr,br,xr,Ar,Sr,kr=Mt(),Cr={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"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","ipv4","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}}},Tr={id:kr("schema.json.id","A unique identifier for the schema."),$schema:kr("schema.json.$schema","The schema to verify this document against."),title:kr("schema.json.title","A descriptive title of the element."),description:kr("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:kr("schema.json.default","A default value. Used by suggestions."),multipleOf:kr("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:kr("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:kr("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:kr("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:kr("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:kr("schema.json.maxLength","The maximum length of a string."),minLength:kr("schema.json.minLength","The minimum length of a string."),pattern:kr("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:kr("schema.json.additionalItems","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:kr("schema.json.items","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:kr("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:kr("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:kr("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:kr("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:kr("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:kr("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:kr("schema.json.additionalProperties","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:kr("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:kr("schema.json.properties","A map of property names to schemas for each property."),patternProperties:kr("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:kr("schema.json.dependencies","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:kr("schema.json.enum","The set of literal values that are valid."),type:kr("schema.json.type","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:kr("schema.json.format","Describes the format expected for the value."),allOf:kr("schema.json.allOf","An array of schemas, all of which must match."),anyOf:kr("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:kr("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:kr("schema.json.not","A schema which must not match."),$id:kr("schema.json.$id","A unique identifier for the schema."),$ref:kr("schema.json.$ref","Reference a definition hosted on any location."),$comment:kr("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:kr("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:kr("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:kr("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:kr("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:kr("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:kr("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:kr("schema.json.contentEncoding","Describes the content encoding of a string property."),if:kr("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:kr("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:kr("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(Ar in Cr.schemas)for(xr in(vr=Cr.schemas[Ar]).properties)"boolean"==typeof(yr=vr.properties[xr])&&(yr=vr.properties[xr]={}),(br=Tr[xr])?yr.description=br:console.log("".concat(xr,": localize('schema.json.").concat(xr,'\', "")'));Sr=(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",i=0):i=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(n=a+"/"+n,i=47===a.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var o=e.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var c=r.length-s,u=a<c?a:c,l=-1,f=0;f<=u;++f){if(f===u){if(c>u){if(47===r.charCodeAt(s+f))return r.slice(s+f+1);if(0===f)return r.slice(s+f)}else a>u&&(47===e.charCodeAt(i+f)?l=f:0===f&&(l=0));break}var h=e.charCodeAt(i+f);if(h!==r.charCodeAt(s+f))break;47===h&&(l=f)}var d="";for(f=i+l+1;f<=o;++f)f!==o&&47!==e.charCodeAt(f)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(s+l):(s+=l,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,c=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!a){i=n+1;break}}else-1===c&&(a=!1,c=n+1),s>=0&&(u===r.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=c))}return i===o?o=c:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(47!==c)-1===i&&(o=!1,i=s+1),46===c?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!o){n=s+1;break}}return-1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return r=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),r?r===t.root?r+n:r+"/"+n:n;var t,r,n},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var a=-1,s=0,c=-1,u=!0,l=e.length-1,f=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===a?a=l:1!==f&&(f=1):-1!==a&&(f=-1);else if(!u){s=l+1;break}return-1===a||-1===c||0===f||1===f&&a===c-1&&a===s+1?-1!==c&&(r.base=r.name=0===s&&o?e.slice(1,c):e.slice(s,c)):(0===s&&o?(r.name=e.slice(1,a),r.base=e.slice(1,c)):(r.name=e.slice(s,a),r.base=e.slice(s,c)),r.ext=e.slice(a,c)),s>0?r.dir=e.slice(0,s-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},447:(e,t,r)=>{var n;if(r.r(t),r.d(t,{URI:()=>m,Utils:()=>w}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var i=navigator.userAgent;n=i.indexOf("Windows")>=0}var o,a,s=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//;function f(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(e.fragment,'"}'));if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.test(e.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(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}var h="",d="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=function(){function e(e,t,r,n,i,o){var a;void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||h,this.authority=e.authority||h,this.path=e.path||h,this.query=e.query||h,this.fragment=e.fragment||h):(this.scheme=(a=e)||o?a:"file",this.authority=t||h,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,f(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return A(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,r=e.authority,n=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new v(t,r,n,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var r=p.exec(e);return r?new v(r[2]||h,T(r[4]||h),T(r[5]||h),T(r[7]||h),T(r[9]||h),t):new v(h,h,h,h,h)},e.file=function(e){var t=h;if(n&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){var r=e.indexOf(d,2);-1===r?(t=e.substring(2),e=d):(t=e.substring(2,r),e=e.substring(r)||d)}return new v("file",t,e,h,h)},e.from=function(e){var t=new v(e.scheme,e.authority,e.path,e.query,e.fragment);return f(t,!0),t},e.prototype.toString=function(e){return void 0===e&&(e=!1),S(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new v(t);return r._formatted=t.external,r._fsPath=t._sep===g?t.fsPath:null,r}return t},e}(),g=n?1:void 0,v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?S(this,!0):(this._formatted||(this._formatted=S(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(m),y=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function b(e,t){for(var r=void 0,n=-1,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==n&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));var a=y[o];void 0!==a?(-1!==n&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=a):-1===n&&(n=i)}}return-1!==n&&(r+=encodeURIComponent(e.substring(n))),void 0!==r?r:e}function x(e){for(var t=void 0,r=0;r<e.length;r++){var n=e.charCodeAt(r);35===n||63===n?(void 0===t&&(t=e.substr(0,r)),t+=y[n]):void 0!==t&&(t+=e[r])}return void 0!==t?t:e}function A(e,t){var r;return r=e.authority&&e.path.length>1&&"file"===e.scheme?"//".concat(e.authority).concat(e.path):47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n&&(r=r.replace(/\//g,"\\")),r}function S(e,t){var r=t?x:b,n="",i=e.scheme,o=e.authority,a=e.path,s=e.query,c=e.fragment;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=d,n+=d),o){var u=o.indexOf("@");if(-1!==u){var l=o.substr(0,u);o=o.substr(u+1),-1===(u=l.indexOf(":"))?n+=r(l,!1):(n+=r(l.substr(0,u),!1),n+=":",n+=r(l.substr(u+1),!1)),n+="@"}-1===(u=(o=o.toLowerCase()).indexOf(":"))?n+=r(o,!1):(n+=r(o.substr(0,u),!1),n+=o.substr(u))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(f=a.charCodeAt(1))>=65&&f<=90&&(a="/".concat(String.fromCharCode(f+32),":").concat(a.substr(3)));else if(a.length>=2&&58===a.charCodeAt(1)){var f;(f=a.charCodeAt(0))>=65&&f<=90&&(a="".concat(String.fromCharCode(f+32),":").concat(a.substr(2)))}n+=r(a,!0)}return s&&(n+="?",n+=r(s,!1)),c&&(n+="#",n+=t?c:b(c,!1)),n}function k(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+k(e.substr(3)):e}}var C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(C)?e.replace(C,(function(e){return k(e)})):e}var w,O,E=r(470),I=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},j=E.posix||E;(O=w||(w={})).joinPath=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return e.with({path:j.join.apply(j,I([e.path],t,!1))})},O.resolvePath=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=e.path||"/";return e.with({path:j.resolve.apply(j,I([n],t,!1))})},O.dirname=function(e){var t=j.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)?e:e.with({path:t})},O.basename=function(e){return j.basename(e.path)},O.extname=function(e){return j.extname(e.path)}}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(447)})();var{URI:wr,Utils:Or}=Sr;function Er(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var r,n=String(e),i="",o=!!t&&!!t.extended,a=!!t&&!!t.globstar,s=!1,c=t&&"string"==typeof t.flags?t.flags:"",u=0,l=n.length;u<l;u++)switch(r=n[u]){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":i+="\\"+r;break;case"?":if(o){i+=".";break}case"[":case"]":if(o){i+=r;break}case"{":if(o){s=!0,i+="(";break}case"}":if(o){s=!1,i+=")";break}case",":if(s){i+="|";break}i+="\\"+r;break;case"*":for(var f=n[u-1],h=1;"*"===n[u+1];)h++,u++;var d=n[u+1];a?!(h>1)||"/"!==f&&void 0!==f&&"{"!==f&&","!==f||"/"!==d&&void 0!==d&&","!==d&&"}"!==d?i+="([^/]*)":("/"===d?u++:"/"===f&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+=".*";break;default:i+=r}return c&&~c.indexOf("g")||(i="^"+i+"$"),new RegExp(i,c)}var Ir,jr=Mt(),Pr=function(){function e(e,t){this.globWrappers=[];try{for(var r=0,n=e;r<n.length;r++){var i=n[r],o="!"!==i[0];o||(i=i.substring(1)),i.length>0&&("/"===i[0]&&(i=i.substring(1)),this.globWrappers.push({regexp:Er("**/"+i,{extended:!0,globstar:!0}),include:o}))}this.uris=t}catch(e){this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(e){for(var t=!1,r=0,n=this.globWrappers;r<n.length;r++){var i=n[r],o=i.regexp,a=i.include;o.test(e)&&(t=a)}return t},e.prototype.getURIs=function(){return this.uris},e}(),Mr=function(){function e(e,t,r){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,r&&(this.unresolvedSchema=this.service.promise.resolve(new Nr(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((function(t){return e.service.resolveSchemaContent(t,e)}))),this.resolvedSchema},e.prototype.clearSchema=function(){var e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e},e}(),Nr=function(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t},_r=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){var t=this.getSectionRecursive(e,this.schema);if(t)return zt(t)},e.prototype.getSectionRecursive=function(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;var r=e.shift();if(t.properties&&(t.properties[r],1))return this.getSectionRecursive(e,t.properties[r]);if(t.patternProperties)for(var n=0,i=Object.keys(t.patternProperties);n<i.length;n++){var o=i[n],a=ve(o);if(null==a?void 0:a.test(r))return this.getSectionRecursive(e,t.patternProperties[o])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(r.match("[0-9]+"))if(Array.isArray(t.items)){var s=parseInt(r,10);if(!isNaN(s)&&t.items[s])return this.getSectionRecursive(e,t.items[s])}else if(t.items)return this.getSectionRecursive(e,t.items)}},e}(),Vr=function(){function e(e,t,r){this.contextService=t,this.requestService=e,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter((function(t){var r=wr.parse(t).scheme;return"schemaservice"!==r&&(!e||e(r))}))},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){var t=this;this.cachedSchemaForResource=void 0;for(var r=!1,n=[e=Rr(e)],i=Object.keys(this.schemasById).map((function(e){return t.schemasById[e]}));n.length;)for(var o=n.pop(),a=0;a<i.length;a++){var s=i[a];s&&(s.uri===o||s.dependencies.has(o))&&(s.uri!==o&&n.push(s.uri),s.clearSchema()&&(r=!0),i[a]=void 0)}return r},e.prototype.setSchemaContributions=function(e){if(e.schemas){var t=e.schemas;for(var r in t){var n=Rr(r);this.contributionSchemas[n]=this.addSchemaHandle(n,t[r])}}if(Array.isArray(e.schemaAssociations))for(var i=0,o=e.schemaAssociations;i<o.length;i++){var a=o[i],s=a.uris.map(Rr),c=this.addFilePatternAssociation(a.pattern,s);this.contributionAssociations.push(c)}},e.prototype.addSchemaHandle=function(e,t){var r=new Mr(this,e,t);return this.schemasById[e]=r,r},e.prototype.getOrAddSchemaHandle=function(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)},e.prototype.addFilePatternAssociation=function(e,t){var r=new Pr(e,t);return this.filePatternAssociations.push(r),r},e.prototype.registerExternalSchema=function(e,t,r){var n=Rr(e);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,t&&this.addFilePatternAssociation(t,[n]),r?this.addSchemaHandle(n,r):this.getOrAddSchemaHandle(n)},e.prototype.clearExternalSchemas=function(){for(var e in this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0,this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var t=0,r=this.contributionAssociations;t<r.length;t++){var n=r[t];this.filePatternAssociations.push(n)}},e.prototype.getResolvedSchema=function(e){var t=Rr(e),r=this.schemasById[t];return r?r.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(e){if(!this.requestService){var t=jr("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Lr(e));return this.promise.resolve(new Nr({},[t]))}return this.requestService(e).then((function(t){if(!t){var r=jr("json.schema.nocontent","Unable to load schema from '{0}': No content.",Lr(e));return new Nr({},[r])}var n,i=[];n=ce(t,i);var o=i.length?[jr("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Lr(e),i[0].offset)]:[];return new Nr(n,o)}),(function(t){var r=t.toString(),n=t.toString().split("Error: ");return n.length>1&&(r=n[1]),ge(r,".")&&(r=r.substr(0,r.length-1)),new Nr({},[jr("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Lr(e),r)])}))},e.prototype.resolveSchemaContent=function(e,t){var r=this,n=e.errors.slice(0),i=e.schema;if(i.$schema){var o=Rr(i.$schema);if("http://json-schema.org/draft-03/schema"===o)return this.promise.resolve(new _r({},[jr("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));"https://json-schema.org/draft/2019-09/schema"===o?n.push(jr("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported.")):"https://json-schema.org/draft/2020-12/schema"===o&&n.push(jr("json.schema.draft202012.notsupported","Draft 2020-12 schemas are not yet fully supported."))}var a=this.contextService,s=function(e,t,r,i){var o,a,s,c;void 0===i||0===i.length?o=t:"/"===i.charAt(0)?o=function(e,t){t=decodeURIComponent(t);var r=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((function(e){return e=e.replace(/~1/g,"/").replace(/~0/g,"~"),!(r=r[e])})),r}(t,i):(a=t,c=i,(s=r).anchors||(s.anchors=l(a)),o=s.anchors.get(c)),o?function(e,t){for(var r in t)t.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&"id"!==r&&"$id"!==r&&(e[r]=t[r])}(e,o):n.push(jr("json.schema.invalidid","$ref '{0}' in '{1}' can not be resolved.",i,r.uri))},c=function(e,t,i,o){a&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=a.resolveRelativePath(t,o.uri)),t=Rr(t);var c=r.getOrAddSchemaHandle(t);return c.getUnresolvedSchema().then((function(r){if(o.dependencies.add(t),r.errors.length){var a=i?t+"#"+i:t;n.push(jr("json.schema.problemloadingref","Problems loading reference '{0}': {1}",a,r.errors[0]))}return s(e,r.schema,c,i),u(e,r.schema,c)}))},u=function(e,t,n){var i=[];return r.traverseNodes(e,(function(e){for(var r=new Set;e.$ref;){var o=e.$ref,a=o.split("#",2);if(delete e.$ref,a[0].length>0)return void i.push(c(e,a[0],a[1],n));if(!r.has(o)){var u=a[1];s(e,t,n,u),r.add(o)}}})),r.promise.all(i)},l=function(e){var t=new Map;return r.traverseNodes(e,(function(e){var r=e.$id||e.id;if("string"==typeof r&&"#"===r.charAt(0)){var i=r.substring(1);t.has(i)?n.push(jr("json.schema.duplicateid","Duplicate id declaration: '{0}'",r)):t.set(i,e)}})),t};return u(i,i,t).then((function(e){return new _r(i,n)}))},e.prototype.traverseNodes=function(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);for(var r=new Set,n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];"object"==typeof i&&a.push(i)}},i=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];if("object"==typeof i)for(var o in i){var s=o,c=i[s];"object"==typeof c&&a.push(c)}}},o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];if(Array.isArray(i))for(var o=0,s=i;o<s.length;o++){var c=s[o];"object"==typeof c&&a.push(c)}}},a=[e],s=a.pop();s;)r.has(s)||(r.add(s),t(s),n(s.items,s.additionalItems,s.additionalProperties,s.not,s.contains,s.propertyNames,s.if,s.then,s.else),i(s.definitions,s.properties,s.patternProperties,s.dependencies),o(s.anyOf,s.allOf,s.oneOf,s.items)),s=a.pop()},e.prototype.getSchemaFromProperty=function(e,t){var r,n;if("object"===(null===(r=t.root)||void 0===r?void 0:r.type))for(var i=0,o=t.root.properties;i<o.length;i++){var a=o[i];if("$schema"===a.keyNode.value&&"string"===(null===(n=a.valueNode)||void 0===n?void 0:n.type)){var s=a.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(s)&&(s=this.contextService.resolveRelativePath(s,e)),s}}},e.prototype.getAssociatedSchemas=function(e){for(var t=Object.create(null),r=[],n=function(e){try{return wr.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}(e),i=0,o=this.filePatternAssociations;i<o.length;i++){var a=o[i];if(a.matchesPattern(n))for(var s=0,c=a.getURIs();s<c.length;s++){var u=c[s];t[u]||(r.push(u),t[u]=!0)}}return r},e.prototype.getSchemaURIsForResource=function(e,t){var r=t&&this.getSchemaFromProperty(e,t);return r?[r]:this.getAssociatedSchemas(e)},e.prototype.getSchemaForResource=function(e,t){if(t){var r=this.getSchemaFromProperty(e,t);if(r){var n=Rr(r);return this.getOrAddSchemaHandle(n).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;var i=this.getAssociatedSchemas(e),o=i.length>0?this.createCombinedSchema(e,i).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:o},o},e.prototype.createCombinedSchema=function(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(e),n={allOf:t.map((function(e){return{$ref:e}}))};return this.addSchemaHandle(r,n)},e.prototype.getMatchingSchemas=function(e,t,r){if(r){var n=r.id||"schemaservice://untitled/matchingSchemas/"+Fr++;return this.addSchemaHandle(n,r).getResolvedSchema().then((function(e){return t.getMatchingSchemas(e.schema).filter((function(e){return!e.inverted}))}))}return this.getSchemaForResource(e.uri,t).then((function(e){return e?t.getMatchingSchemas(e.schema).filter((function(e){return!e.inverted})):[]}))},e}(),Fr=0;function Rr(e){try{return wr.parse(e).toString(!0)}catch(t){return e}}function Lr(e){try{var t=wr.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function Dr(e,t){var r=[],n=[],i=[],o=-1,a=se(e.getText(),!1),s=a.scan();function c(e){r.push(e),n.push(i.length)}for(;17!==s;){switch(s){case 1:case 3:var u={startLine:h=e.positionAt(a.getTokenOffset()).line,endLine:h,kind:1===s?"object":"array"};i.push(u);break;case 2:case 4:var l=2===s?"object":"array";if(i.length>0&&i[i.length-1].kind===l){u=i.pop();var f=e.positionAt(a.getTokenOffset()).line;u&&f>u.startLine+1&&o!==u.startLine&&(u.endLine=f-1,c(u),o=u.startLine)}break;case 13:var h=e.positionAt(a.getTokenOffset()).line,d=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;1===a.getTokenError()&&h+1<e.lineCount?a.setPosition(e.offsetAt(g.create(h+1,0))):h<d&&(c({startLine:h,endLine:d,kind:j.Comment}),o=h);break;case 12:var p=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(p)if(f=e.positionAt(a.getTokenOffset()).line,p[1])u={startLine:f,endLine:f,kind:j.Region},i.push(u);else{for(var m=i.length-1;m>=0&&i[m].kind!==j.Region;)m--;m>=0&&(u=i[m],i.length=m,f>u.startLine&&o!==u.startLine&&(u.endLine=f,c(u),o=u.startLine))}}s=a.scan()}var v=t&&t.rangeLimit;if("number"!=typeof v||r.length<=v)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var y=[],b=0,x=n;b<x.length;b++)(T=x[b])<30&&(y[T]=(y[T]||0)+1);var A=0,S=0;for(m=0;m<y.length;m++){var k=y[m];if(k){if(k+A>v){S=m;break}A+=k}}var C=[];for(m=0;m<r.length;m++){var T;"number"==typeof(T=n[m])&&(T<S||T===S&&A++<v)&&C.push(r[m])}return C}function $r(e,t,r){function n(t,r){return y.create(e.positionAt(t),e.positionAt(r))}var i=se(e.getText(),!0);function o(e,t){return i.setPosition(e),i.scan()===t?i.getTokenOffset()+i.getTokenLength():-1}return t.map((function(t){for(var i=e.offsetAt(t),a=r.getNodeFromOffset(i,!0),s=[];a;){switch(a.type){case"string":case"object":case"array":var c=a.offset+1,u=a.offset+a.length-1;c<u&&i>=c&&i<=u&&s.push(n(c,u)),s.push(n(a.offset,a.offset+a.length));break;case"number":case"boolean":case"null":case"property":s.push(n(a.offset,a.offset+a.length))}if("property"===a.type||a.parent&&"array"===a.parent.type){var l=o(a.offset+a.length,5);-1!==l&&s.push(n(a.offset,l))}a=a.parent}for(var f=void 0,h=s.length-1;h>=0;h--)f=ht.create(s[h],f);return f||(f=ht.create(y.create(t,t))),f}))}function Ur(e,t){var r=[];return t.visit((function(n){var i;if("property"===n.type&&"$ref"===n.keyNode.value&&"string"===(null===(i=n.valueNode)||void 0===i?void 0:i.type)){var o=n.valueNode.value,a=function(e,t){var r=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(Br)}(t);return r?qr(r,e.root):null}(t,o);if(a){var s=e.positionAt(a.offset);r.push({target:"".concat(e.uri,"#").concat(s.line+1,",").concat(s.character+1),range:Wr(e,n.valueNode)})}}return!0})),Promise.resolve(r)}function Wr(e,t){return y.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function qr(e,t){if(!t)return null;if(0===e.length)return t;var r=e.shift();if(t&&"object"===t.type){var n=t.properties.find((function(e){return e.keyNode.value===r}));return n?qr(e,n.valueNode):null}if(t&&"array"===t.type&&r.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(r),o=t.items[i];return o?qr(e,o):null}return null}function Br(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Jr(e){var t=e.promiseConstructor||Promise,r=new Vr(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(Cr);var n=new ir(r,e.contributions,t,e.clientCapabilities),i=new or(r,e.contributions,t),o=new mr(r),s=new cr(r,t);return{configure:function(e){r.clearExternalSchemas(),e.schemas&&e.schemas.forEach((function(e){r.registerExternalSchema(e.uri,e.fileMatch,e.schema)})),s.configure(e)},resetSchema:function(e){return r.onResourceChange(e)},doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:function(e){return function(e,t){var r=[],n=-1,i=e.getText(),o=se(i,!1),a=t&&t.collectComments?[]:void 0;function s(){for(;;){var t=o.scan();switch(l(),t){case 12:case 13:Array.isArray(a)&&a.push(y.create(e.positionAt(o.getTokenOffset()),e.positionAt(o.getTokenOffset()+o.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,i,o,a,s){if(void 0===s&&(s=F.Error),0===r.length||o!==n){var c=y.create(e.positionAt(o),e.positionAt(a));r.push(U.create(c,t,s,i,e.languageId)),n=o}}function u(e,t,r,n,a){void 0===r&&(r=void 0),void 0===n&&(n=[]),void 0===a&&(a=[]);var u=o.getTokenOffset(),l=o.getTokenOffset()+o.getTokenLength();if(u===l&&u>0){for(u--;u>0&&/\s/.test(i.charAt(u));)u--;l=u+1}if(c(e,t,u,l),r&&f(r,!1),n.length+a.length>0)for(var h=o.getToken();17!==h;){if(-1!==n.indexOf(h)){s();break}if(-1!==a.indexOf(h))break;h=s()}return r}function l(){switch(o.getTokenError()){case 4:return u(Rt("InvalidUnicode","Invalid unicode sequence in string."),kt.InvalidUnicode),!0;case 5:return u(Rt("InvalidEscapeCharacter","Invalid escape character in string."),kt.InvalidEscapeCharacter),!0;case 3:return u(Rt("UnexpectedEndOfNumber","Unexpected end of number."),kt.UnexpectedEndOfNumber),!0;case 1:return u(Rt("UnexpectedEndOfComment","Unexpected end of comment."),kt.UnexpectedEndOfComment),!0;case 2:return u(Rt("UnexpectedEndOfString","Unexpected end of string."),kt.UnexpectedEndOfString),!0;case 6:return u(Rt("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),kt.InvalidCharacter),!0}return!1}function f(e,t){return e.length=o.getTokenOffset()+o.getTokenLength()-e.offset,t&&s(),e}var h=new Bt(void 0,0,0);function d(t,r){var n=new Jt(t,o.getTokenOffset(),h),i=p(n);if(!i){if(16!==o.getToken())return;u(Rt("DoubleQuotesExpected","Property keys must be doublequoted"),kt.Undefined);var a=new Bt(n,o.getTokenOffset(),o.getTokenLength());a.value=o.getTokenValue(),i=a,s()}n.keyNode=i;var l=r[i.value];if(l?(c(Rt("DuplicateKeyWarning","Duplicate object key"),kt.DuplicateKey,n.keyNode.offset,n.keyNode.offset+n.keyNode.length,F.Warning),"object"==typeof l&&c(Rt("DuplicateKeyWarning","Duplicate object key"),kt.DuplicateKey,l.keyNode.offset,l.keyNode.offset+l.keyNode.length,F.Warning),r[i.value]=!0):r[i.value]=n,6===o.getToken())n.colonOffset=o.getTokenOffset(),s();else if(u(Rt("ColonExpected","Colon expected"),kt.ColonExpected),10===o.getToken()&&e.positionAt(i.offset+i.length).line<e.positionAt(o.getTokenOffset()).line)return n.length=i.length,n;var f=m(n);return f?(n.valueNode=f,n.length=f.offset+f.length-n.offset,n):u(Rt("ValueExpected","Value expected"),kt.ValueExpected,n,[],[2,5])}function p(e){if(10===o.getToken()){var t=new Bt(e,o.getTokenOffset());return t.value=o.getTokenValue(),f(t,!0)}}function m(e){return function(e){if(3===o.getToken()){var t=new Wt(e,o.getTokenOffset());s();for(var r=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){r||u(Rt("ValueExpected","Value expected"),kt.ValueExpected);var n=o.getTokenOffset();if(s(),4===o.getToken()){r&&c(Rt("TrailingComma","Trailing comma"),kt.TrailingComma,n,n+1);continue}}else r&&u(Rt("ExpectedComma","Expected comma"),kt.CommaExpected);var i=m(t);i?t.items.push(i):u(Rt("PropertyExpected","Value expected"),kt.ValueExpected,void 0,[],[4,5]),r=!0}return 4!==o.getToken()?u(Rt("ExpectedCloseBracket","Expected comma or closing bracket"),kt.CommaOrCloseBacketExpected,t):f(t,!0)}}(e)||function(e){if(1===o.getToken()){var t=new Kt(e,o.getTokenOffset()),r=Object.create(null);s();for(var n=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){n||u(Rt("PropertyExpected","Property expected"),kt.PropertyExpected);var i=o.getTokenOffset();if(s(),2===o.getToken()){n&&c(Rt("TrailingComma","Trailing comma"),kt.TrailingComma,i,i+1);continue}}else n&&u(Rt("ExpectedComma","Expected comma"),kt.CommaExpected);var a=d(t,r);a?t.properties.push(a):u(Rt("PropertyExpected","Property expected"),kt.PropertyExpected,void 0,[],[2,5]),n=!0}return 2!==o.getToken()?u(Rt("ExpectedCloseBrace","Expected comma or closing brace"),kt.CommaOrCloseBraceExpected,t):f(t,!0)}}(e)||p(e)||function(e){if(11===o.getToken()){var t=new qt(e,o.getTokenOffset());if(0===o.getTokenError()){var r=o.getTokenValue();try{var n=JSON.parse(r);if(!de(n))return u(Rt("InvalidNumberFormat","Invalid number format."),kt.Undefined,t);t.value=n}catch(e){return u(Rt("InvalidNumberFormat","Invalid number format."),kt.Undefined,t)}t.isInteger=-1===r.indexOf(".")}return f(t,!0)}}(e)||function(e){switch(o.getToken()){case 7:return f(new $t(e,o.getTokenOffset()),!0);case 8:return f(new Ut(e,!0,o.getTokenOffset()),!0);case 9:return f(new Ut(e,!1,o.getTokenOffset()),!0);default:return}}(e)}var g=void 0;return 17!==s()&&((g=m(g))?17!==o.getToken()&&u(Rt("End of file expected","End of file expected."),kt.Undefined):u(Rt("Invalid symbol","Expected a JSON object, array or literal."),kt.Undefined)),new er(g,r,a)}(e,{collectComments:!0})},newJSONDocument:function(e,t){return function(e,t){return void 0===t&&(t=[]),new er(e,t,[])}(e,t)},getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),findDocumentSymbols:o.findDocumentSymbols.bind(o),findDocumentSymbols2:o.findDocumentSymbols2.bind(o),findDocumentColors:o.findDocumentColors.bind(o),getColorPresentations:o.getColorPresentations.bind(o),doHover:i.doHover.bind(i),getFoldingRanges:Dr,getSelectionRanges:$r,findDefinition:function(){return Promise.resolve([])},findLinks:Ur,format:function(e,t,r){var n=void 0;if(t){var i=e.offsetAt(t.start);n={offset:i,length:e.offsetAt(t.end)-i}}var o={tabSize:r?r.tabSize:4,insertSpaces:!0===(null==r?void 0:r.insertSpaces),insertFinalNewline:!0===(null==r?void 0:r.insertFinalNewline),eol:"\n"};return function(e,t,r){return function(e,t,r){var n,i,o,s,c;if(t){for(s=t.offset,c=s+t.length,o=s;o>0&&!f(e,o-1);)o--;for(var u=c;u<e.length&&!f(e,u);)u++;i=e.substring(o,u),n=function(e,t){for(var r=0,n=0,i=t.tabSize||4;r<e.length;){var o=e.charAt(r);if(" "===o)n++;else{if("\t"!==o)break;n+=i}r++}return Math.floor(n/i)}(i,r)}else i=e,n=0,o=0,s=0,c=e.length;var h,d=function(e,t){for(var r=0;r<t.length;r++){var n=t.charAt(r);if("\r"===n)return r+1<t.length&&"\n"===t.charAt(r+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(r,e),p=!1,m=0;h=r.insertSpaces?l(" ",r.tabSize||4):"\t";var g=a(i,!1),v=!1;function y(){return d+l(h,n+m)}function b(){var e=g.scan();for(p=!1;15===e||14===e;)p=p||14===e,e=g.scan();return v=16===e||0!==g.getTokenError(),e}var x=[];function A(r,n,i){v||t&&!(n<c&&i>s)||e.substring(n,i)===r||x.push({offset:n,length:i-n,content:r})}var S=b();if(17!==S){var k=g.getTokenOffset()+o;A(l(h,n),o,k)}for(;17!==S;){for(var C=g.getTokenOffset()+g.getTokenLength()+o,T=b(),w="",O=!1;!p&&(12===T||13===T);)A(" ",C,g.getTokenOffset()+o),C=g.getTokenOffset()+g.getTokenLength()+o,w=(O=12===T)?y():"",T=b();if(2===T)1!==S&&(m--,w=y());else if(4===T)3!==S&&(m--,w=y());else{switch(S){case 3:case 1:m++,w=y();break;case 5:case 12:w=y();break;case 13:p?w=y():O||(w=" ");break;case 6:O||(w=" ");break;case 10:if(6===T){O||(w="");break}case 7:case 8:case 9:case 11:case 2:case 4:12===T||13===T?O||(w=" "):5!==T&&17!==T&&(v=!0);break;case 16:v=!0}!p||12!==T&&13!==T||(w=y())}17===T&&(w=r.insertFinalNewline?d:""),A(w,C,g.getTokenOffset()+o),S=T}return x}(e,t,r)}(e.getText(),n,o).map((function(t){return J.replace(y.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)}))}}}"undefined"!=typeof fetch&&(Ir=function(e){return fetch(e).then((e=>e.text()))});var Kr,zr=class{_ctx;_languageService;_languageSettings;_languageId;constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=Jr({workspaceContext:{resolveRelativePath:(e,t)=>function(e,t){if(function(e){return e.charCodeAt(0)===Hr}(t)){const r=wr.parse(e),n=t.split("/");return r.with({path:Xr(n)}).toString()}return function(e,...t){const r=wr.parse(e),n=r.path.split("/");for(let e of t)n.push(...e.split("/"));return r.with({path:Xr(n)}).toString()}(e,t)}(t.substr(0,t.lastIndexOf("/")+1),e)},schemaRequestService:t.enableSchemaRequest?Ir:void 0}),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 r=this._getTextDocument(e);if(!r)return null;let n=this._languageService.parseJSONDocument(r);return this._languageService.doComplete(r,t,n)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let r=this._getTextDocument(e);if(!r)return null;let n=this._languageService.parseJSONDocument(r);return this._languageService.doHover(r,t,n)}async format(e,t,r){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.format(n,t,r);return Promise.resolve(i)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let r=this._languageService.parseJSONDocument(t),n=this._languageService.findDocumentSymbols(t,r);return Promise.resolve(n)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let r=this._languageService.parseJSONDocument(t),n=this._languageService.findDocumentColors(t,r);return Promise.resolve(n)}async getColorPresentations(e,t,r){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.parseJSONDocument(n),o=this._languageService.getColorPresentations(n,i,t,r);return Promise.resolve(o)}async getFoldingRanges(e,t){let r=this._getTextDocument(e);if(!r)return[];let n=this._languageService.getFoldingRanges(r,t);return Promise.resolve(n)}async getSelectionRanges(e,t){let r=this._getTextDocument(e);if(!r)return[];let n=this._languageService.parseJSONDocument(r),i=this._languageService.getSelectionRanges(r,t,n);return Promise.resolve(i)}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let r of t)if(r.uri.toString()===e)return At.create(e,this._languageId,r.version,r.getValue());return null}},Hr="/".charCodeAt(0),Gr=".".charCodeAt(0);function Xr(e){const t=[];for(const r of e)0===r.length||1===r.length&&r.charCodeAt(0)===Gr||(2===r.length&&r.charCodeAt(0)===Gr&&r.charCodeAt(1)===Gr?t.pop():t.push(r));e.length>1&&0===e[e.length-1].length&&t.push("");let r=t.join("/");return 0===e[0].length&&(r="/"+r),r}function Zr(e,t){return new zr(e,t)}return Kr=o,((e,o,a,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let a of n(o))i.call(e,a)||undefined===a||t(e,a,{get:()=>o[a],enumerable:!(s=r(o,a))||s.enumerable});return e})(t({},"__esModule",{value:!0}),Kr)})()));
|