All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.monaco.min.vs.language.json.jsonWorker.js Maven / Gradle / Ivy

Go to download

RefactoringMiner is a library/API written in Java that can detect refactorings applied in the history of a Java project.

There is a newer version: 3.0.9
Show newest version
"use strict";/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/
define("vs/language/json/jsonWorker", ["require","require"],(require)=>{
var moduleExports=(()=>{var lt=Object.defineProperty;var Hr=Object.getOwnPropertyDescriptor;var Gr=Object.getOwnPropertyNames;var Xr=Object.prototype.hasOwnProperty;var Zr=(t,r)=>{for(var i in r)lt(t,i,{get:r[i],enumerable:!0})},Qr=(t,r,i,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Gr(r))!Xr.call(t,n)&&n!==i&<(t,n,{get:()=>r[n],enumerable:!(e=Hr(r,n))||e.enumerable});return t};var Yr=t=>Qr(lt({},"__esModule",{value:!0}),t);var _n={};Zr(_n,{JSONWorker:()=>st,create:()=>Bn});function Pe(t,r){r===void 0&&(r=!1);var i=t.length,e=0,n="",a=0,s=16,o=0,f=0,l=0,u=0,c=0;function h(v,O){for(var E=0,j=0;E=48&&A<=57)j=j*16+A-48;else if(A>=65&&A<=70)j=j*16+A-65+10;else if(A>=97&&A<=102)j=j*16+A-97+10;else break;e++,E++}return E=i){v+=t.substring(O,e),c=2;break}var E=t.charCodeAt(e);if(E===34){v+=t.substring(O,e),e++;break}if(E===92){if(v+=t.substring(O,e),e++,e>=i){c=2;break}var j=t.charCodeAt(e++);switch(j){case 34:v+='"';break;case 92:v+="\\";break;case 47:v+="/";break;case 98:v+="\b";break;case 102:v+="\f";break;case 110:v+=`
`;break;case 114:v+="\r";break;case 116:v+="	";break;case 117:var A=h(4,!0);A>=0?v+=String.fromCharCode(A):c=4;break;default:c=5}O=e;continue}if(E>=0&&E<=31)if(Le(E)){v+=t.substring(O,e),c=2;break}else c=6;e++}return v}function d(){if(n="",c=0,a=e,f=o,u=l,e>=i)return a=i,s=17;var v=t.charCodeAt(e);if(ht(v)){do e++,n+=String.fromCharCode(v),v=t.charCodeAt(e);while(ht(v));return s=15}if(Le(v))return e++,n+=String.fromCharCode(v),v===13&&t.charCodeAt(e)===10&&(e++,n+=`
`),o++,l=e,s=14;switch(v){case 123:return e++,s=1;case 125:return e++,s=2;case 91:return e++,s=3;case 93:return e++,s=4;case 58:return e++,s=6;case 44:return e++,s=5;case 34:return e++,n=p(),s=10;case 47:var O=e-1;if(t.charCodeAt(e+1)===47){for(e+=2;e=12&&v<=15);return v}return{setPosition:g,getPosition:function(){return e},scan:r?y:d,getToken:function(){return s},getTokenValue:function(){return n},getTokenOffset:function(){return a},getTokenLength:function(){return e-a},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return a-u},getTokenError:function(){return c}}}function ht(t){return t===32||t===9||t===11||t===12||t===160||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function Le(t){return t===10||t===13||t===8232||t===8233}function Ce(t){return t>=48&&t<=57}function pt(t,r,i){var e,n,a,s,o;if(r){for(s=r.offset,o=s+r.length,a=s;a>0&&!gt(t,a-1);)a--;for(var f=o;fs)&&t.substring(V,R)!==N&&b.push({offset:V,length:R-V,content:N})}var v=d();if(v!==17){var O=g.getTokenOffset()+a,E=dt(h,e);y(E,a,O)}for(;v!==17;){for(var j=g.getTokenOffset()+g.getTokenLength()+a,A=d(),P="",w=!1;!u&&(A===12||A===13);){var C=g.getTokenOffset()+a;y(" ",j,C),j=g.getTokenOffset()+g.getTokenLength()+a,w=A===12,P=w?p():"",A=d()}if(A===2)v!==1&&(c--,P=p());else if(A===4)v!==3&&(c--,P=p());else{switch(v){case 3:case 1:c++,P=p();break;case 5:case 12:P=p();break;case 13:u?P=p():w||(P=" ");break;case 6:w||(P=" ");break;case 10:if(A===6){w||(P="");break}case 7:case 8:case 9:case 11:case 2:case 4:A===12||A===13?w||(P=" "):A!==5&&A!==17&&(m=!0);break;case 16:m=!0;break}u&&(A===12||A===13)&&(P=p())}A===17&&(P=i.insertFinalNewline?l:"");var L=g.getTokenOffset()+a;y(P,j,L),v=A}return b}function dt(t,r){for(var i="",e=0;e=t.offset&&r0)for(var N=e.getToken();N!==17;){if(C.indexOf(N)!==-1){b();break}else if(L.indexOf(N)!==-1)break;N=b()}}function v(w){var C=e.getTokenValue();return w?c(C):o(C),b(),!0}function O(){switch(e.getToken()){case 11:var w=e.getTokenValue(),C=Number(w);isNaN(C)&&(y(2),C=0),c(C);break;case 7:c(null);break;case 8:c(!0);break;case 9:c(!1);break;default:return!1}return b(),!0}function E(){return e.getToken()!==10?(y(3,[],[2,5]),!1):(v(!1),e.getToken()===6?(h(":"),b(),P()||y(4,[],[2,5])):y(5,[],[2,5]),!0)}function j(){s(),b();for(var w=!1;e.getToken()!==2&&e.getToken()!==17;){if(e.getToken()===5){if(w||y(4,[],[]),h(","),b(),e.getToken()===2&&d)break}else w&&y(6,[],[]);E()||y(4,[],[2,5]),w=!0}return f(),e.getToken()!==2?y(7,[2],[]):b(),!0}function A(){l(),b();for(var w=!1;e.getToken()!==4&&e.getToken()!==17;){if(e.getToken()===5){if(w||y(4,[],[]),h(","),b(),e.getToken()===4&&d)break}else w&&y(6,[],[]);P()||y(4,[],[4,5]),w=!0}return u(),e.getToken()!==4?y(8,[4],[]):b(),!0}function P(){switch(e.getToken()){case 3:return A();case 1:return j();case 10:return v(!0);default:return O()}}return b(),e.getToken()===17?i.allowEmptyContent?!0:(y(4,[],[]),!1):P()?(e.getToken()!==17&&y(9,[],[]),!0):(y(4,[],[]),!1)}var le=Pe;var Qt=Xt;var Yt=vt,Kt=mt,er=_e;function tr(t,r,i){return pt(t,r,i)}function Ie(t,r){if(t===r)return!0;if(t==null||r===null||r===void 0||typeof t!=typeof r||typeof t!="object"||Array.isArray(t)!==Array.isArray(r))return!1;var i,e;if(Array.isArray(t)){if(t.length!==r.length)return!1;for(i=0;i0?t.lastIndexOf(r)===i:i===0?t===r:!1}function xe(t){var r="";un(t,"(?i)")&&(t=t.substring(4),r="i");try{return new RegExp(t,r+"u")}catch{try{return new RegExp(t,r)}catch{return}}}var ir;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(ir||(ir={}));var Ge;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(Ge||(Ge={}));var re;(function(t){function r(e,n){return e===Number.MAX_VALUE&&(e=Ge.MAX_VALUE),n===Number.MAX_VALUE&&(n=Ge.MAX_VALUE),{line:e,character:n}}t.create=r;function i(e){var n=e;return x.objectLiteral(n)&&x.uinteger(n.line)&&x.uinteger(n.character)}t.is=i})(re||(re={}));var U;(function(t){function r(e,n,a,s){if(x.uinteger(e)&&x.uinteger(n)&&x.uinteger(a)&&x.uinteger(s))return{start:re.create(e,n),end:re.create(a,s)};if(re.is(e)&&re.is(n))return{start:e,end:n};throw new Error("Range#create called with invalid arguments["+e+", "+n+", "+a+", "+s+"]")}t.create=r;function i(e){var n=e;return x.objectLiteral(n)&&re.is(n.start)&&re.is(n.end)}t.is=i})(U||(U={}));var Se;(function(t){function r(e,n){return{uri:e,range:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&U.is(n.range)&&(x.string(n.uri)||x.undefined(n.uri))}t.is=i})(Se||(Se={}));var ar;(function(t){function r(e,n,a,s){return{targetUri:e,targetRange:n,targetSelectionRange:a,originSelectionRange:s}}t.create=r;function i(e){var n=e;return x.defined(n)&&U.is(n.targetRange)&&x.string(n.targetUri)&&(U.is(n.targetSelectionRange)||x.undefined(n.targetSelectionRange))&&(U.is(n.originSelectionRange)||x.undefined(n.originSelectionRange))}t.is=i})(ar||(ar={}));var Xe;(function(t){function r(e,n,a,s){return{red:e,green:n,blue:a,alpha:s}}t.create=r;function i(e){var n=e;return x.numberRange(n.red,0,1)&&x.numberRange(n.green,0,1)&&x.numberRange(n.blue,0,1)&&x.numberRange(n.alpha,0,1)}t.is=i})(Xe||(Xe={}));var bt;(function(t){function r(e,n){return{range:e,color:n}}t.create=r;function i(e){var n=e;return U.is(n.range)&&Xe.is(n.color)}t.is=i})(bt||(bt={}));var xt;(function(t){function r(e,n,a){return{label:e,textEdit:n,additionalTextEdits:a}}t.create=r;function i(e){var n=e;return x.string(n.label)&&(x.undefined(n.textEdit)||Y.is(n))&&(x.undefined(n.additionalTextEdits)||x.typedArray(n.additionalTextEdits,Y.is))}t.is=i})(xt||(xt={}));var Ae;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Ae||(Ae={}));var St;(function(t){function r(e,n,a,s,o){var f={startLine:e,endLine:n};return x.defined(a)&&(f.startCharacter=a),x.defined(s)&&(f.endCharacter=s),x.defined(o)&&(f.kind=o),f}t.create=r;function i(e){var n=e;return x.uinteger(n.startLine)&&x.uinteger(n.startLine)&&(x.undefined(n.startCharacter)||x.uinteger(n.startCharacter))&&(x.undefined(n.endCharacter)||x.uinteger(n.endCharacter))&&(x.undefined(n.kind)||x.string(n.kind))}t.is=i})(St||(St={}));var At;(function(t){function r(e,n){return{location:e,message:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&Se.is(n.location)&&x.string(n.message)}t.is=i})(At||(At={}));var Z;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Z||(Z={}));var or;(function(t){t.Unnecessary=1,t.Deprecated=2})(or||(or={}));var sr;(function(t){function r(i){var e=i;return e!=null&&x.string(e.href)}t.is=r})(sr||(sr={}));var ae;(function(t){function r(e,n,a,s,o,f){var l={range:e,message:n};return x.defined(a)&&(l.severity=a),x.defined(s)&&(l.code=s),x.defined(o)&&(l.source=o),x.defined(f)&&(l.relatedInformation=f),l}t.create=r;function i(e){var n,a=e;return x.defined(a)&&U.is(a.range)&&x.string(a.message)&&(x.number(a.severity)||x.undefined(a.severity))&&(x.integer(a.code)||x.string(a.code)||x.undefined(a.code))&&(x.undefined(a.codeDescription)||x.string((n=a.codeDescription)===null||n===void 0?void 0:n.href))&&(x.string(a.source)||x.undefined(a.source))&&(x.undefined(a.relatedInformation)||x.typedArray(a.relatedInformation,At.is))}t.is=i})(ae||(ae={}));var je;(function(t){function r(e,n){for(var a=[],s=2;s0&&(o.arguments=a),o}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.title)&&x.string(n.command)}t.is=i})(je||(je={}));var Y;(function(t){function r(a,s){return{range:a,newText:s}}t.replace=r;function i(a,s){return{range:{start:a,end:a},newText:s}}t.insert=i;function e(a){return{range:a,newText:""}}t.del=e;function n(a){var s=a;return x.objectLiteral(s)&&x.string(s.newText)&&U.is(s.range)}t.is=n})(Y||(Y={}));var Ee;(function(t){function r(e,n,a){var s={label:e};return n!==void 0&&(s.needsConfirmation=n),a!==void 0&&(s.description=a),s}t.create=r;function i(e){var n=e;return n!==void 0&&x.objectLiteral(n)&&x.string(n.label)&&(x.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(x.string(n.description)||n.description===void 0)}t.is=i})(Ee||(Ee={}));var X;(function(t){function r(i){var e=i;return typeof e=="string"}t.is=r})(X||(X={}));var me;(function(t){function r(a,s,o){return{range:a,newText:s,annotationId:o}}t.replace=r;function i(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}t.insert=i;function e(a,s){return{range:a,newText:"",annotationId:s}}t.del=e;function n(a){var s=a;return Y.is(s)&&(Ee.is(s.annotationId)||X.is(s.annotationId))}t.is=n})(me||(me={}));var Ve;(function(t){function r(e,n){return{textDocument:e,edits:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&Qe.is(n.textDocument)&&Array.isArray(n.edits)}t.is=i})(Ve||(Ve={}));var Fe;(function(t){function r(e,n,a){var s={kind:"create",uri:e};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}t.create=r;function i(e){var n=e;return n&&n.kind==="create"&&x.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||x.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||x.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}t.is=i})(Fe||(Fe={}));var $e;(function(t){function r(e,n,a,s){var o={kind:"rename",oldUri:e,newUri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}t.create=r;function i(e){var n=e;return n&&n.kind==="rename"&&x.string(n.oldUri)&&x.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||x.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||x.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}t.is=i})($e||($e={}));var De;(function(t){function r(e,n,a){var s={kind:"delete",uri:e};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}t.create=r;function i(e){var n=e;return n&&n.kind==="delete"&&x.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||x.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||x.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||X.is(n.annotationId))}t.is=i})(De||(De={}));var Ze;(function(t){function r(i){var e=i;return e&&(e.changes!==void 0||e.documentChanges!==void 0)&&(e.documentChanges===void 0||e.documentChanges.every(function(n){return x.string(n.kind)?Fe.is(n)||$e.is(n)||De.is(n):Ve.is(n)}))}t.is=r})(Ze||(Ze={}));var He=function(){function t(r,i){this.edits=r,this.changeAnnotations=i}return t.prototype.insert=function(r,i,e){var n,a;if(e===void 0?n=Y.insert(r,i):X.is(e)?(a=e,n=me.insert(r,i,e)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(e),n=me.insert(r,i,a)),this.edits.push(n),a!==void 0)return a},t.prototype.replace=function(r,i,e){var n,a;if(e===void 0?n=Y.replace(r,i):X.is(e)?(a=e,n=me.replace(r,i,e)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(e),n=me.replace(r,i,a)),this.edits.push(n),a!==void 0)return a},t.prototype.delete=function(r,i){var e,n;if(i===void 0?e=Y.del(r):X.is(i)?(n=i,e=me.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(i),e=me.del(r,n)),this.edits.push(e),n!==void 0)return n},t.prototype.add=function(r){this.edits.push(r)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),fr=function(){function t(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(r,i){var e;if(X.is(r)?e=r:(e=this.nextId(),i=r),this._annotations[e]!==void 0)throw new Error("Id "+e+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+e);return this._annotations[e]=i,this._size++,e},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),ni=function(){function t(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new fr(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(e){if(Ve.is(e)){var n=new He(e.edits,i._changeAnnotations);i._textEditChanges[e.textDocument.uri]=n}})):r.changes&&Object.keys(r.changes).forEach(function(e){var n=new He(r.changes[e]);i._textEditChanges[e]=n})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(r){if(Qe.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},e=this._textEditChanges[i.uri];if(!e){var n=[],a={textDocument:i,edits:n};this._workspaceEdit.documentChanges.push(a),e=new He(n,this._changeAnnotations),this._textEditChanges[i.uri]=e}return e}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var e=this._textEditChanges[r];if(!e){var n=[];this._workspaceEdit.changes[r]=n,e=new He(n),this._textEditChanges[r]=e}return e}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new fr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(r,i,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ee.is(i)||X.is(i)?n=i:e=i;var a,s;if(n===void 0?a=Fe.create(r,e):(s=X.is(n)?n:this._changeAnnotations.manage(n),a=Fe.create(r,e,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s},t.prototype.renameFile=function(r,i,e,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Ee.is(e)||X.is(e)?a=e:n=e;var s,o;if(a===void 0?s=$e.create(r,i,n):(o=X.is(a)?a:this._changeAnnotations.manage(a),s=$e.create(r,i,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},t.prototype.deleteFile=function(r,i,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Ee.is(i)||X.is(i)?n=i:e=i;var a,s;if(n===void 0?a=De.create(r,e):(s=X.is(n)?n:this._changeAnnotations.manage(n),a=De.create(r,e,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s},t}();var ur;(function(t){function r(e){return{uri:e}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)}t.is=i})(ur||(ur={}));var wt;(function(t){function r(e,n){return{uri:e,version:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)&&x.integer(n.version)}t.is=i})(wt||(wt={}));var Qe;(function(t){function r(e,n){return{uri:e,version:n}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)&&(n.version===null||x.integer(n.version))}t.is=i})(Qe||(Qe={}));var cr;(function(t){function r(e,n,a,s){return{uri:e,languageId:n,version:a,text:s}}t.create=r;function i(e){var n=e;return x.defined(n)&&x.string(n.uri)&&x.string(n.languageId)&&x.integer(n.version)&&x.string(n.text)}t.is=i})(cr||(cr={}));var fe;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(fe||(fe={}));(function(t){function r(i){var e=i;return e===t.PlainText||e===t.Markdown}t.is=r})(fe||(fe={}));var Ye;(function(t){function r(i){var e=i;return x.objectLiteral(i)&&fe.is(e.kind)&&x.string(e.value)}t.is=r})(Ye||(Ye={}));var Q;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Q||(Q={}));var z;(function(t){t.PlainText=1,t.Snippet=2})(z||(z={}));var Tt;(function(t){t.Deprecated=1})(Tt||(Tt={}));var lr;(function(t){function r(e,n,a){return{newText:e,insert:n,replace:a}}t.create=r;function i(e){var n=e;return n&&x.string(n.newText)&&U.is(n.insert)&&U.is(n.replace)}t.is=i})(lr||(lr={}));var hr;(function(t){t.asIs=1,t.adjustIndentation=2})(hr||(hr={}));var Re;(function(t){function r(i){return{label:i}}t.create=r})(Re||(Re={}));var kt;(function(t){function r(i,e){return{items:i||[],isIncomplete:!!e}}t.create=r})(kt||(kt={}));var Ue;(function(t){function r(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=r;function i(e){var n=e;return x.string(n)||x.objectLiteral(n)&&x.string(n.language)&&x.string(n.value)}t.is=i})(Ue||(Ue={}));var Ot;(function(t){function r(i){var e=i;return!!e&&x.objectLiteral(e)&&(Ye.is(e.contents)||Ue.is(e.contents)||x.typedArray(e.contents,Ue.is))&&(i.range===void 0||U.is(i.range))}t.is=r})(Ot||(Ot={}));var dr;(function(t){function r(i,e){return e?{label:i,documentation:e}:{label:i}}t.create=r})(dr||(dr={}));var gr;(function(t){function r(i,e){for(var n=[],a=2;a=0;u--){var c=f[u],h=a.offsetAt(c.range.start),g=a.offsetAt(c.range.end);if(g<=l)o=o.substring(0,h)+c.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");l=h}return o}t.applyEdits=e;function n(a,s){if(a.length<=1)return a;var o=a.length/2|0,f=a.slice(0,o),l=a.slice(o);n(f,s),n(l,s);for(var u=0,c=0,h=0;u0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},t.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),e=0,n=i.length;if(n===0)return re.create(0,r);for(;er?n=a:e=a+1}var s=e-1;return re.create(s,r-i[s])},t.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var e=i[r.line],n=r.line+1"u"}t.undefined=e;function n(g){return g===!0||g===!1}t.boolean=n;function a(g){return r.call(g)==="[object String]"}t.string=a;function s(g){return r.call(g)==="[object Number]"}t.number=s;function o(g,m,p){return r.call(g)==="[object Number]"&&m<=g&&g<=p}t.numberRange=o;function f(g){return r.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}t.integer=f;function l(g){return r.call(g)==="[object Number]"&&0<=g&&g<=2147483647}t.uinteger=l;function u(g){return r.call(g)==="[object Function]"}t.func=u;function c(g){return g!==null&&typeof g=="object"}t.objectLiteral=c;function h(g,m){return Array.isArray(g)&&g.every(m)}t.typedArray=h})(x||(x={}));var we=class{constructor(r,i,e,n){this._uri=r,this._languageId=i,this._version=e,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(r){if(r){let i=this.offsetAt(r.start),e=this.offsetAt(r.end);return this._content.substring(i,e)}return this._content}update(r,i){for(let e of r)if(we.isIncremental(e)){let n=xr(e.range),a=this.offsetAt(n.start),s=this.offsetAt(n.end);this._content=this._content.substring(0,a)+e.text+this._content.substring(s,this._content.length);let o=Math.max(n.start.line,0),f=Math.max(n.end.line,0),l=this._lineOffsets,u=br(e.text,!1,a);if(f-o===u.length)for(let h=0,g=u.length;hr?n=s:e=s+1}let a=e-1;return{line:a,character:r-i[a]}}offsetAt(r){let i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;let e=i[r.line],n=r.line+1{let h=u.range.start.line-c.range.start.line;return h===0?u.range.start.character-c.range.start.character:h}),f=0,l=[];for(let u of o){let c=n.offsetAt(u.range.start);if(cf&&l.push(s.substring(f,c)),u.newText.length&&l.push(u.newText),f=n.offsetAt(u.range.end)}return l.push(s.substr(f)),l.join("")}t.applyEdits=e})(We||(We={}));function Vt(t,r){if(t.length<=1)return t;let i=t.length/2|0,e=t.slice(0,i),n=t.slice(i);Vt(e,r),Vt(n,r);let a=0,s=0,o=0;for(;ai.line||r.line===i.line&&r.character>i.character?{start:i,end:r}:t}function ln(t){let r=xr(t.range);return r!==t.range?{newText:t.newText,range:r}:t}var W;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(W||(W={}));var Sr;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[fe.Markdown,fe.PlainText],commitCharactersSupport:!0}}}}})(Sr||(Sr={}));function hn(t,r){let i;return r.length===0?i=t:i=t.replace(/\{(\d+)\}/g,(e,n)=>{let a=n[0];return typeof r[a]<"u"?r[a]:e}),i}function dn(t,r,...i){return hn(r,i)}function he(t){return dn}var Te=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},t(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(r,i);function e(){this.constructor=r}r.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}(),M=he(),gn={"color-hex":{errorMessage:M("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:M("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:M("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:M("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:M("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:M("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:M("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:M("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}},ke=function(){function t(r,i,e){e===void 0&&(e=0),this.offset=i,this.length=e,this.parent=r}return Object.defineProperty(t.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},t}();var pn=function(t){Te(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="null",n.value=null,n}return r}(ke);var Ar=function(t){Te(r,t);function r(i,e,n){var a=t.call(this,i,n)||this;return a.type="boolean",a.value=e,a}return r}(ke);var mn=function(t){Te(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="array",n.items=[],n}return Object.defineProperty(r.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),r}(ke);var vn=function(t){Te(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="number",n.isInteger=!0,n.value=Number.NaN,n}return r}(ke);var Ft=function(t){Te(r,t);function r(i,e,n){var a=t.call(this,i,e,n)||this;return a.type="string",a.value="",a}return r}(ke);var yn=function(t){Te(r,t);function r(i,e,n){var a=t.call(this,i,e)||this;return a.type="property",a.colonOffset=-1,a.keyNode=n,a}return Object.defineProperty(r.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),r}(ke);var bn=function(t){Te(r,t);function r(i,e){var n=t.call(this,i,e)||this;return n.type="object",n.properties=[],n}return Object.defineProperty(r.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),r}(ke);function K(t){return ie(t)?t?{}:{not:{}}:t}var wr;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(wr||(wr={}));var xn=function(){function t(r,i){r===void 0&&(r=-1),this.focusOffset=r,this.exclude=i,this.schemas=[]}return t.prototype.add=function(r){this.schemas.push(r)},t.prototype.merge=function(r){Array.prototype.push.apply(this.schemas,r.schemas)},t.prototype.include=function(r){return(this.focusOffset===-1||Dt(r,this.focusOffset))&&r!==this.exclude},t.prototype.newSub=function(){return new t(-1,this.exclude)},t}(),$t=function(){function t(){}return Object.defineProperty(t.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.add=function(r){},t.prototype.merge=function(r){},t.prototype.include=function(r){return!0},t.prototype.newSub=function(){return this},t.instance=new t,t}(),te=function(){function t(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return t.prototype.hasProblems=function(){return!!this.problems.length},t.prototype.mergeAll=function(r){for(var i=0,e=r;i=t.offset&&r0?q={schema:I,validationResult:F,matchingSchemas:D}:J===0&&(q.matchingSchemas.merge(D),q.validationResult.mergeEnumValues(F))}}return H.length>1&&R&&i.problems.push({location:{offset:n.offset,length:1},message:M("oneOfWarning","Matches multiple schemas when only one must validate.")}),q&&(i.merge(q.validationResult),i.propertiesMatches+=q.validationResult.propertiesMatches,i.propertiesValueMatches+=q.validationResult.propertiesValueMatches,e.merge(q.matchingSchemas)),H.length};Array.isArray(r.anyOf)&&O(r.anyOf,!1),Array.isArray(r.oneOf)&&O(r.oneOf,!0);var E=function(V){var R=new te,H=e.newSub();_(n,K(V),R,H),i.merge(R),i.propertiesMatches+=R.propertiesMatches,i.propertiesValueMatches+=R.propertiesValueMatches,e.merge(H)},j=function(V,R,H){var q=K(V),T=new te,S=e.newSub();_(n,q,T,S),e.merge(S),T.hasProblems()?H&&E(H):R&&E(R)},A=K(r.if);if(A&&j(A,K(r.then),K(r.else)),Array.isArray(r.enum)){for(var P=ge(n),w=!1,C=0,L=r.enum;C=A&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",A)});var P=E(c.minimum,c.exclusiveMinimum);ee(P)&&mw&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("maximumWarning","Value is above the maximum of {0}.",w)})}function o(u,c,h,g){if(ee(c.minLength)&&u.value.lengthc.maxLength&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("maxLengthWarning","String is longer than the maximum length of {0}.",c.maxLength)}),rr(c.pattern)){var m=xe(c.pattern);m?.test(u.value)||h.problems.push({location:{offset:u.offset,length:u.length},message:c.patternErrorMessage||c.errorMessage||M("patternWarning",'String does not match the pattern of "{0}".',c.pattern)})}if(c.format)switch(c.format){case"uri":case"uri-reference":{var p=void 0;if(!u.value)p=M("uriEmpty","URI expected.");else{var d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(u.value);d?!d[2]&&c.format==="uri"&&(p=M("uriSchemeMissing","URI with a scheme is expected.")):p=M("uriMissing","URI is expected.")}p&&h.problems.push({location:{offset:u.offset,length:u.length},message:c.patternErrorMessage||c.errorMessage||M("uriFormatWarning","String is not a URI: {0}",p)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":var b=gn[c.format];(!u.value||!b.pattern.exec(u.value))&&h.problems.push({location:{offset:u.offset,length:u.length},message:c.patternErrorMessage||c.errorMessage||b.errorMessage});default:}}function f(u,c,h,g){if(Array.isArray(c.items)){for(var m=c.items,p=0;p=m.length&&h.propertiesValueMatches++}if(u.items.length>m.length)if(typeof c.additionalItems=="object")for(var O=m.length;Oc.maxItems&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("maxItemsWarning","Array has too many items. Expected {0} or fewer.",c.maxItems)}),c.uniqueItems===!0){var C=ge(u),L=C.some(function(N,V){return V!==C.lastIndexOf(N)});L&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("uniqueItemsWarning","Array has duplicate items.")})}}function l(u,c,h,g){for(var m=Object.create(null),p=[],d=0,b=u.properties;d=0;)p.splice(ct,1),ct=p.indexOf(Gt)};if(c.properties)for(var C=0,L=Object.keys(c.properties);C0)for(var J=0,ue=p;Jc.maxProperties&&h.problems.push({location:{offset:u.offset,length:u.length},message:M("MaxPropWarning","Object has more properties than limit of {0}.",c.maxProperties)}),ee(c.minProperties)&&u.properties.length0){for(N--;N>0&&/\s/.test(n.charAt(N));)N--;V=N+1}if(l(A,P,N,V),w&&h(w,!1),C.length+L.length>0)for(var R=a.getToken();R!==17;){if(C.indexOf(R)!==-1){o();break}else if(L.indexOf(R)!==-1)break;R=o()}return w}function c(){switch(a.getTokenError()){case 4:return u(M("InvalidUnicode","Invalid unicode sequence in string."),W.InvalidUnicode),!0;case 5:return u(M("InvalidEscapeCharacter","Invalid escape character in string."),W.InvalidEscapeCharacter),!0;case 3:return u(M("UnexpectedEndOfNumber","Unexpected end of number."),W.UnexpectedEndOfNumber),!0;case 1:return u(M("UnexpectedEndOfComment","Unexpected end of comment."),W.UnexpectedEndOfComment),!0;case 2:return u(M("UnexpectedEndOfString","Unexpected end of string."),W.UnexpectedEndOfString),!0;case 6:return u(M("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),W.InvalidCharacter),!0}return!1}function h(A,P){return A.length=a.getTokenOffset()+a.getTokenLength()-A.offset,P&&o(),A}function g(A){if(a.getToken()===3){var P=new mn(A,a.getTokenOffset());o();for(var w=0,C=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){C||u(M("ValueExpected","Value expected"),W.ValueExpected);var L=a.getTokenOffset();if(o(),a.getToken()===4){C&&l(M("TrailingComma","Trailing comma"),W.TrailingComma,L,L+1);continue}}else C&&u(M("ExpectedComma","Expected comma"),W.CommaExpected);var N=O(P);N?P.items.push(N):u(M("PropertyExpected","Value expected"),W.ValueExpected,void 0,[],[4,5]),C=!0}return a.getToken()!==4?u(M("ExpectedCloseBracket","Expected comma or closing bracket"),W.CommaOrCloseBacketExpected,P):h(P,!0)}}var m=new Ft(void 0,0,0);function p(A,P){var w=new yn(A,a.getTokenOffset(),m),C=b(w);if(!C)if(a.getToken()===16){u(M("DoubleQuotesExpected","Property keys must be doublequoted"),W.Undefined);var L=new Ft(w,a.getTokenOffset(),a.getTokenLength());L.value=a.getTokenValue(),C=L,o()}else return;w.keyNode=C;var N=P[C.value];if(N?(l(M("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,w.keyNode.offset,w.keyNode.offset+w.keyNode.length,Z.Warning),typeof N=="object"&&l(M("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,N.keyNode.offset,N.keyNode.offset+N.keyNode.length,Z.Warning),P[C.value]=!0):P[C.value]=w,a.getToken()===6)w.colonOffset=a.getTokenOffset(),o();else if(u(M("ColonExpected","Colon expected"),W.ColonExpected),a.getToken()===10&&t.positionAt(C.offset+C.length).line=0;i--){var e=this.contributions[i].resolveCompletion;if(e){var n=e(r);if(n)return n}}return this.promiseConstructor.resolve(r)},t.prototype.doComplete=function(r,i,e){var n=this,a={items:[],isIncomplete:!1},s=r.getText(),o=r.offsetAt(i),f=e.getNodeFromOffset(o,!0);if(this.isInComment(r,f?f.offset:0,o))return Promise.resolve(a);if(f&&o===f.offset+f.length&&o>0){var l=s[o-1];(f.type==="object"&&l==="}"||f.type==="array"&&l==="]")&&(f=f.parent)}var u=this.getCurrentWord(r,o),c;if(f&&(f.type==="string"||f.type==="number"||f.type==="boolean"||f.type==="null"))c=U.create(r.positionAt(f.offset),r.positionAt(f.offset+f.length));else{var h=o-u.length;h>0&&s[h-1]==='"'&&h--,c=U.create(r.positionAt(h),i)}var g=!1,m={},p={add:function(d){var b=d.label,y=m[b];if(y)y.documentation||(y.documentation=d.documentation),y.detail||(y.detail=d.detail);else{if(b=b.replace(/[\n]/g,"\u21B5"),b.length>60){var v=b.substr(0,57).trim()+"...";m[v]||(b=v)}c&&d.insertText!==void 0&&(d.textEdit=Y.replace(c,d.insertText)),g&&(d.commitCharacters=d.kind===Q.Property?An:Sn),d.label=b,m[b]=d,a.items.push(d)}},setAsIncomplete:function(){a.isIncomplete=!0},error:function(d){console.error(d)},log:function(d){console.log(d)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(r.uri,e).then(function(d){var b=[],y=!0,v="",O=void 0;if(f&&f.type==="string"){var E=f.parent;E&&E.type==="property"&&E.keyNode===f&&(y=!E.valueNode,O=E,v=s.substr(f.offset+1,f.length-2),E&&(f=E.parent))}if(f&&f.type==="object"){if(f.offset===o)return a;var j=f.properties;j.forEach(function(C){(!O||O!==C)&&(m[C.keyNode.value]=Re.create("__"))});var A="";y&&(A=n.evaluateSeparatorAfter(r,r.offsetAt(c.end))),d?n.getPropertyCompletions(d,e,f,y,A,p):n.getSchemaLessPropertyCompletions(e,f,v,p);var P=qe(f);n.contributions.forEach(function(C){var L=C.collectPropertyCompletions(r.uri,P,u,y,A==="",p);L&&b.push(L)}),!d&&u.length>0&&s.charAt(o-u.length-1)!=='"'&&(p.add({kind:Q.Property,label:n.getLabelForValue(u),insertText:n.getInsertTextForProperty(u,void 0,!1,A),insertTextFormat:z.Snippet,documentation:""}),p.setAsIncomplete())}var w={};return d?n.getValueCompletions(d,e,f,o,r,p,w):n.getSchemaLessValueCompletions(e,f,o,r,p),n.contributions.length>0&&n.getContributedValueCompletions(e,f,o,r,p,b),n.promiseConstructor.all(b).then(function(){if(p.getNumberOfProposals()===0){var C=o;f&&(f.type==="string"||f.type==="number"||f.type==="boolean"||f.type==="null")&&(C=f.offset+f.length);var L=n.evaluateSeparatorAfter(r,C);n.addFillerValueCompletions(w,L,p)}return a})})},t.prototype.getPropertyCompletions=function(r,i,e,n,a,s){var o=this,f=i.getMatchingSchemas(r.schema,e.offset);f.forEach(function(l){if(l.node===e&&!l.inverted){var u=l.schema.properties;u&&Object.keys(u).forEach(function(p){var d=u[p];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){var b={kind:Q.Property,label:p,insertText:o.getInsertTextForProperty(p,d,n,a),insertTextFormat:z.Snippet,filterText:o.getFilterTextForValue(p),documentation:o.fromMarkup(d.markdownDescription)||d.description||""};d.suggestSortText!==void 0&&(b.sortText=d.suggestSortText),b.insertText&&pe(b.insertText,"$1".concat(a))&&(b.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(b)}});var c=l.schema.propertyNames;if(typeof c=="object"&&!c.deprecationMessage&&!c.doNotSuggest){var h=function(p,d){d===void 0&&(d=void 0);var b={kind:Q.Property,label:p,insertText:o.getInsertTextForProperty(p,void 0,n,a),insertTextFormat:z.Snippet,filterText:o.getFilterTextForValue(p),documentation:d||o.fromMarkup(c.markdownDescription)||c.description||""};c.suggestSortText!==void 0&&(b.sortText=c.suggestSortText),b.insertText&&pe(b.insertText,"$1".concat(a))&&(b.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(b)};if(c.enum)for(var g=0;g(i.colonOffset||0)){var u=i.valueNode;if(u&&(e>u.offset+u.length||u.type==="object"||u.type==="array"))return;var c=i.keyNode.value;r.visit(function(g){return g.type==="property"&&g.keyNode.value===c&&g.valueNode&&l(g.valueNode),!0}),c==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(f,a)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var h=i.parent.keyNode.value;r.visit(function(g){return g.type==="property"&&g.keyNode.value===h&&g.valueNode&&g.valueNode.type==="array"&&g.valueNode.items.forEach(l),!0})}else i.items.forEach(l)},t.prototype.getValueCompletions=function(r,i,e,n,a,s,o){var f=n,l=void 0,u=void 0;if(e&&(e.type==="string"||e.type==="number"||e.type==="boolean"||e.type==="null")&&(f=e.offset+e.length,u=e,e=e.parent),!e){this.addSchemaValueCompletions(r.schema,"",s,o);return}if(e.type==="property"&&n>(e.colonOffset||0)){var c=e.valueNode;if(c&&n>c.offset+c.length)return;l=e.keyNode.value,e=e.parent}if(e&&(l!==void 0||e.type==="array")){for(var h=this.evaluateSeparatorAfter(a,f),g=i.getMatchingSchemas(r.schema,e.offset,u),m=0,p=g;m(i.colonOffset||0)){var o=i.keyNode.value,f=i.valueNode;if((!f||e<=f.offset+f.length)&&i.parent){var l=qe(i.parent);this.contributions.forEach(function(u){var c=u.collectValueCompletions(n.uri,l,o,a);c&&s.push(c)})}}},t.prototype.addSchemaValueCompletions=function(r,i,e,n){var a=this;typeof r=="object"&&(this.addEnumValueCompletions(r,i,e),this.addDefaultValueCompletions(r,i,e),this.collectTypes(r,n),Array.isArray(r.allOf)&&r.allOf.forEach(function(s){return a.addSchemaValueCompletions(s,i,e,n)}),Array.isArray(r.anyOf)&&r.anyOf.forEach(function(s){return a.addSchemaValueCompletions(s,i,e,n)}),Array.isArray(r.oneOf)&&r.oneOf.forEach(function(s){return a.addSchemaValueCompletions(s,i,e,n)}))},t.prototype.addDefaultValueCompletions=function(r,i,e,n){var a=this;n===void 0&&(n=0);var s=!1;if(se(r.default)){for(var o=r.type,f=r.default,l=n;l>0;l--)f=[f],o="array";e.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(f),insertText:this.getInsertTextForValue(f,i),insertTextFormat:z.Snippet,detail:Rt("json.suggest.default","Default value")}),s=!0}Array.isArray(r.examples)&&r.examples.forEach(function(u){for(var c=r.type,h=u,g=n;g>0;g--)h=[h],c="array";e.add({kind:a.getSuggestionKind(c),label:a.getLabelForValue(h),insertText:a.getInsertTextForValue(h,i),insertTextFormat:z.Snippet}),s=!0}),Array.isArray(r.defaultSnippets)&&r.defaultSnippets.forEach(function(u){var c=r.type,h=u.body,g=u.label,m,p;if(se(h)){for(var d=r.type,b=n;b>0;b--)h=[h],d="array";m=a.getInsertTextForSnippetValue(h,i),p=a.getFilterTextForSnippetValue(h),g=g||a.getLabelForSnippetValue(h)}else if(typeof u.bodyText=="string"){for(var y="",v="",O="",b=n;b>0;b--)y=y+O+`[
`,v=v+`
`+O+"]",O+="	",c="array";m=y+O+u.bodyText.split(`
`).join(`
`+O)+v+i,g=g||m,p=m.replace(/[\n]/g,"")}else return;e.add({kind:a.getSuggestionKind(c),label:g,documentation:a.fromMarkup(u.markdownDescription)||u.description,insertText:m,insertTextFormat:z.Snippet,filterText:p}),s=!0}),!s&&typeof r.items=="object"&&!Array.isArray(r.items)&&n<5&&this.addDefaultValueCompletions(r.items,i,e,n+1)},t.prototype.addEnumValueCompletions=function(r,i,e){if(se(r.const)&&e.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(r.const),insertText:this.getInsertTextForValue(r.const,i),insertTextFormat:z.Snippet,documentation:this.fromMarkup(r.markdownDescription)||r.description}),Array.isArray(r.enum))for(var n=0,a=r.enum.length;n0?i[0]:void 0}if(!r)return Q.Value;switch(r){case"string":return Q.Value;case"object":return Q.Module;case"property":return Q.Property;default:return Q.Value}},t.prototype.getLabelTextForMatchingNode=function(r,i){switch(r.type){case"array":return"[]";case"object":return"{}";default:var e=i.getText().substr(r.offset,r.length);return e}},t.prototype.getInsertTextForMatchingNode=function(r,i,e){switch(r.type){case"array":return this.getInsertTextForValue([],e);case"object":return this.getInsertTextForValue({},e);default:var n=i.getText().substr(r.offset,r.length)+e;return this.getInsertTextForPlainText(n)}},t.prototype.getInsertTextForProperty=function(r,i,e,n){var a=this.getInsertTextForValue(r,"");if(!e)return a;var s=a+": ",o,f=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var l=i.defaultSnippets[0].body;se(l)&&(o=this.getInsertTextForSnippetValue(l,""))}f+=i.defaultSnippets.length}if(i.enum&&(!o&&i.enum.length===1&&(o=this.getInsertTextForGuessedValue(i.enum[0],"")),f+=i.enum.length),se(i.default)&&(o||(o=this.getInsertTextForGuessedValue(i.default,"")),f++),Array.isArray(i.examples)&&i.examples.length&&(o||(o=this.getInsertTextForGuessedValue(i.examples[0],"")),f+=i.examples.length),f===0){var u=Array.isArray(i.type)?i.type[0]:i.type;switch(u||(i.properties?u="object":i.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 a}}}return(!o||f>1)&&(o="$1"),s+o+n},t.prototype.getCurrentWord=function(r,i){for(var e=i-1,n=r.getText();e>=0&&` 	
\r\v":{[,]}`.indexOf(n.charAt(e))===-1;)e--;return n.substring(e+1,i)},t.prototype.evaluateSeparatorAfter=function(r,i){var e=le(r.getText(),!0);e.setPosition(i);var n=e.scan();switch(n){case 5:case 2:case 4:case 17:return"";default:return","}},t.prototype.findItemAtOffset=function(r,i,e){for(var n=le(i.getText(),!0),a=r.items,s=a.length-1;s>=0;s--){var o=a[s];if(e>o.offset+o.length){n.setPosition(o.offset+o.length);var f=n.scan();return f===5&&e>=n.getTokenOffset()+n.getTokenLength()?s+1:s}else if(e>=o.offset)return s}return 0},t.prototype.isInComment=function(r,i,e){var n=le(r.getText(),!1);n.setPosition(i);for(var a=n.scan();a!==17&&n.getTokenOffset()+n.getTokenLength()a.offset+1&&n=0;c--){var h=this.contributions[c],g=h.getInfoContribution(r.uri,u);if(g)return g.then(function(m){return l(m)})}return this.schemaService.getSchemaForResource(r.uri,e).then(function(m){if(m&&a){var p=e.getMatchingSchemas(m.schema,a.offset),d=void 0,b=void 0,y=void 0,v=void 0;p.every(function(E){if(E.node===a&&!E.inverted&&E.schema&&(d=d||E.schema.title,b=b||E.schema.markdownDescription||Ut(E.schema.description),E.schema.enum)){var j=E.schema.enum.indexOf(ge(a));E.schema.markdownEnumDescriptions?y=E.schema.markdownEnumDescriptions[j]:E.schema.enumDescriptions&&(y=Ut(E.schema.enumDescriptions[j])),y&&(v=E.schema.enum[j],typeof v!="string"&&(v=JSON.stringify(v)))}return!0});var O="";return d&&(O=Ut(d)),b&&(O.length>0&&(O+=`

`),O+=b),y&&(O.length>0&&(O+=`

`),O+="`".concat(wn(v),"`: ").concat(y)),l([O])}return null})},t}();function Ut(t){if(t){var r=t.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1

$3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function wn(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var Tn=he(),Ir=function(){function t(r,i){this.jsonSchemaService=r,this.promise=i,this.validationEnabled=!0}return t.prototype.configure=function(r){r&&(this.validationEnabled=r.validate!==!1,this.commentSeverity=r.allowComments?void 0:Z.Error)},t.prototype.doValidation=function(r,i,e,n){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var s=[],o={},f=function(h){var g=h.range.start.line+" "+h.range.start.character+" "+h.message;o[g]||(o[g]=!0,s.push(h))},l=function(h){var g=e?.trailingCommas?tt(e.trailingCommas):Z.Error,m=e?.comments?tt(e.comments):a.commentSeverity,p=e?.schemaValidation?tt(e.schemaValidation):Z.Warning,d=e?.schemaRequest?tt(e.schemaRequest):Z.Warning;if(h){if(h.errors.length&&i.root&&d){var b=i.root,y=b.type==="object"?b.properties[0]:void 0;if(y&&y.keyNode.value==="$schema"){var v=y.valueNode||y,O=U.create(r.positionAt(v.offset),r.positionAt(v.offset+v.length));f(ae.create(O,h.errors[0],d,W.SchemaResolveError))}else{var O=U.create(r.positionAt(b.offset),r.positionAt(b.offset+1));f(ae.create(O,h.errors[0],d,W.SchemaResolveError))}}else if(p){var E=i.validate(r,h.schema,p);E&&E.forEach(f)}Er(h.schema)&&(m=void 0),jr(h.schema)&&(g=void 0)}for(var j=0,A=i.syntaxErrors;j=rt&&t<=Pn?t-rt+10:0)}function Mr(t){if(t[0]==="#")switch(t.length){case 4:return{red:B(t.charCodeAt(1))*17/255,green:B(t.charCodeAt(2))*17/255,blue:B(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:B(t.charCodeAt(1))*17/255,green:B(t.charCodeAt(2))*17/255,blue:B(t.charCodeAt(3))*17/255,alpha:B(t.charCodeAt(4))*17/255};case 7:return{red:(B(t.charCodeAt(1))*16+B(t.charCodeAt(2)))/255,green:(B(t.charCodeAt(3))*16+B(t.charCodeAt(4)))/255,blue:(B(t.charCodeAt(5))*16+B(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(B(t.charCodeAt(1))*16+B(t.charCodeAt(2)))/255,green:(B(t.charCodeAt(3))*16+B(t.charCodeAt(4)))/255,blue:(B(t.charCodeAt(5))*16+B(t.charCodeAt(6)))/255,alpha:(B(t.charCodeAt(7))*16+B(t.charCodeAt(8)))/255}}}var Lr=function(){function t(r){this.schemaService=r}return t.prototype.findDocumentSymbols=function(r,i,e){var n=this;e===void 0&&(e={resultLimit:Number.MAX_VALUE});var a=i.root;if(!a)return[];var s=e.resultLimit||Number.MAX_VALUE,o=r.uri;if((o==="vscode://defaultsettings/keybindings.json"||pe(o.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var f=[],l=0,u=a.items;l0){s--;var C=Se.create(r.uri,ve(r,P)),L=A?A+"."+P.keyNode.value:P.keyNode.value;v.push({name:n.getKeyLabel(P),kind:n.getSymbolKind(w.type),location:C,containerName:A}),d.push({node:w,containerName:L})}else y=!0})};b0){s--;var L=ve(r,w),N=L,V=String(C),R={name:V,kind:n.getSymbolKind(w.type),range:L,selectionRange:N,children:[]};P.push(R),y.push({result:R.children,node:w})}else O=!0}):A.type==="object"&&A.properties.forEach(function(w){var C=w.valueNode;if(C)if(s>0){s--;var L=ve(r,w),N=ve(r,w.keyNode),V=[],R={name:n.getKeyLabel(w),kind:n.getSymbolKind(C.type),range:L,selectionRange:N,children:V,detail:n.getDetail(C)};P.push(R),y.push({result:V,node:C})}else O=!0})};v{"use strict";var t={470:e=>{function n(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,f){for(var l,u="",c=0,h=-1,g=0,m=0;m<=o.length;++m){if(m2){var p=u.lastIndexOf("/");if(p!==u.length-1){p===-1?(u="",c=0):c=(u=u.slice(0,p)).length-1-u.lastIndexOf("/"),h=m,g=0;continue}}else if(u.length===2||u.length===1){u="",c=0,h=m,g=0;continue}}f&&(u.length>0?u+="/..":u="..",c=2)}else u.length>0?u+="/"+o.slice(h+1,m):u=o.slice(h+1,m),c=m-h-1;h=m,g=0}else l===46&&g!==-1?++g:g=-1}return u}var s={resolve:function(){for(var o,f="",l=!1,u=arguments.length-1;u>=-1&&!l;u--){var c;u>=0?c=arguments[u]:(o===void 0&&(o=process.cwd()),c=o),n(c),c.length!==0&&(f=c+"/"+f,l=c.charCodeAt(0)===47)}return f=a(f,!l),l?f.length>0?"/"+f:"/":f.length>0?f:"."},normalize:function(o){if(n(o),o.length===0)return".";var f=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return(o=a(o,!f)).length!==0||f||(o="."),o.length>0&&l&&(o+="/"),f?"/"+o:o},isAbsolute:function(o){return n(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,f=0;f0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":s.normalize(o)},relative:function(o,f){if(n(o),n(f),o===f||(o=s.resolve(o))===(f=s.resolve(f)))return"";for(var l=1;lm){if(f.charCodeAt(h+d)===47)return f.slice(h+d+1);if(d===0)return f.slice(h+d)}else c>m&&(o.charCodeAt(l+d)===47?p=d:d===0&&(p=0));break}var b=o.charCodeAt(l+d);if(b!==f.charCodeAt(h+d))break;b===47&&(p=d)}var y="";for(d=l+p+1;d<=u;++d)d!==u&&o.charCodeAt(d)!==47||(y.length===0?y+="..":y+="/..");return y.length>0?y+f.slice(h+p):(h+=p,f.charCodeAt(h)===47&&++h,f.slice(h))},_makeLong:function(o){return o},dirname:function(o){if(n(o),o.length===0)return".";for(var f=o.charCodeAt(0),l=f===47,u=-1,c=!0,h=o.length-1;h>=1;--h)if((f=o.charCodeAt(h))===47){if(!c){u=h;break}}else c=!1;return u===-1?l?"/":".":l&&u===1?"//":o.slice(0,u)},basename:function(o,f){if(f!==void 0&&typeof f!="string")throw new TypeError('"ext" argument must be a string');n(o);var l,u=0,c=-1,h=!0;if(f!==void 0&&f.length>0&&f.length<=o.length){if(f.length===o.length&&f===o)return"";var g=f.length-1,m=-1;for(l=o.length-1;l>=0;--l){var p=o.charCodeAt(l);if(p===47){if(!h){u=l+1;break}}else m===-1&&(h=!1,m=l+1),g>=0&&(p===f.charCodeAt(g)?--g==-1&&(c=l):(g=-1,c=m))}return u===c?c=m:c===-1&&(c=o.length),o.slice(u,c)}for(l=o.length-1;l>=0;--l)if(o.charCodeAt(l)===47){if(!h){u=l+1;break}}else c===-1&&(h=!1,c=l+1);return c===-1?"":o.slice(u,c)},extname:function(o){n(o);for(var f=-1,l=0,u=-1,c=!0,h=0,g=o.length-1;g>=0;--g){var m=o.charCodeAt(g);if(m!==47)u===-1&&(c=!1,u=g+1),m===46?f===-1?f=g:h!==1&&(h=1):f!==-1&&(h=-1);else if(!c){l=g+1;break}}return f===-1||u===-1||h===0||h===1&&f===u-1&&f===l+1?"":o.slice(f,u)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(f,l){var u=l.dir||l.root,c=l.base||(l.name||"")+(l.ext||"");return u?u===l.root?u+c:u+"/"+c:c}(0,o)},parse:function(o){n(o);var f={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return f;var l,u=o.charCodeAt(0),c=u===47;c?(f.root="/",l=1):l=0;for(var h=-1,g=0,m=-1,p=!0,d=o.length-1,b=0;d>=l;--d)if((u=o.charCodeAt(d))!==47)m===-1&&(p=!1,m=d+1),u===46?h===-1?h=d:b!==1&&(b=1):h!==-1&&(b=-1);else if(!p){g=d+1;break}return h===-1||m===-1||b===0||b===1&&h===m-1&&h===g+1?m!==-1&&(f.base=f.name=g===0&&c?o.slice(1,m):o.slice(g,m)):(g===0&&c?(f.name=o.slice(1,h),f.base=o.slice(1,m)):(f.name=o.slice(g,h),f.base=o.slice(g,m)),f.ext=o.slice(h,m)),g>0?f.dir=o.slice(0,g-1):c&&(f.dir="/"),f},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s},447:(e,n,a)=>{var s;if(a.r(n),a.d(n,{URI:()=>y,Utils:()=>V}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;s=o.indexOf("Windows")>=0}var f,l,u=(f=function(T,S){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,I){k.__proto__=I}||function(k,I){for(var F in I)Object.prototype.hasOwnProperty.call(I,F)&&(k[F]=I[F])})(T,S)},function(T,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function k(){this.constructor=T}f(T,S),T.prototype=S===null?Object.create(S):(k.prototype=S.prototype,new k)}),c=/^\w[\w\d+.-]*$/,h=/^\//,g=/^\/\//;function m(T,S){if(!T.scheme&&S)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(T.authority,'", path: "').concat(T.path,'", query: "').concat(T.query,'", fragment: "').concat(T.fragment,'"}'));if(T.scheme&&!c.test(T.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(T.path){if(T.authority){if(!h.test(T.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(g.test(T.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var p="",d="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,y=function(){function T(S,k,I,F,D,J){J===void 0&&(J=!1),typeof S=="object"?(this.scheme=S.scheme||p,this.authority=S.authority||p,this.path=S.path||p,this.query=S.query||p,this.fragment=S.fragment||p):(this.scheme=function(ue,G){return ue||G?ue:"file"}(S,J),this.authority=k||p,this.path=function(ue,G){switch(ue){case"https":case"http":case"file":G?G[0]!==d&&(G=d+G):G=d}return G}(this.scheme,I||p),this.query=F||p,this.fragment=D||p,m(this,J))}return T.isUri=function(S){return S instanceof T||!!S&&typeof S.authority=="string"&&typeof S.fragment=="string"&&typeof S.path=="string"&&typeof S.query=="string"&&typeof S.scheme=="string"&&typeof S.fsPath=="string"&&typeof S.with=="function"&&typeof S.toString=="function"},Object.defineProperty(T.prototype,"fsPath",{get:function(){return P(this,!1)},enumerable:!1,configurable:!0}),T.prototype.with=function(S){if(!S)return this;var k=S.scheme,I=S.authority,F=S.path,D=S.query,J=S.fragment;return k===void 0?k=this.scheme:k===null&&(k=p),I===void 0?I=this.authority:I===null&&(I=p),F===void 0?F=this.path:F===null&&(F=p),D===void 0?D=this.query:D===null&&(D=p),J===void 0?J=this.fragment:J===null&&(J=p),k===this.scheme&&I===this.authority&&F===this.path&&D===this.query&&J===this.fragment?this:new O(k,I,F,D,J)},T.parse=function(S,k){k===void 0&&(k=!1);var I=b.exec(S);return I?new O(I[2]||p,N(I[4]||p),N(I[5]||p),N(I[7]||p),N(I[9]||p),k):new O(p,p,p,p,p)},T.file=function(S){var k=p;if(s&&(S=S.replace(/\\/g,d)),S[0]===d&&S[1]===d){var I=S.indexOf(d,2);I===-1?(k=S.substring(2),S=d):(k=S.substring(2,I),S=S.substring(I)||d)}return new O("file",k,S,p,p)},T.from=function(S){var k=new O(S.scheme,S.authority,S.path,S.query,S.fragment);return m(k,!0),k},T.prototype.toString=function(S){return S===void 0&&(S=!1),w(this,S)},T.prototype.toJSON=function(){return this},T.revive=function(S){if(S){if(S instanceof T)return S;var k=new O(S);return k._formatted=S.external,k._fsPath=S._sep===v?S.fsPath:null,k}return S},T}(),v=s?1:void 0,O=function(T){function S(){var k=T!==null&&T.apply(this,arguments)||this;return k._formatted=null,k._fsPath=null,k}return u(S,T),Object.defineProperty(S.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=P(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),S.prototype.toString=function(k){return k===void 0&&(k=!1),k?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},S.prototype.toJSON=function(){var k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=v),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k},S}(y),E=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function j(T,S){for(var k=void 0,I=-1,F=0;F=97&&D<=122||D>=65&&D<=90||D>=48&&D<=57||D===45||D===46||D===95||D===126||S&&D===47)I!==-1&&(k+=encodeURIComponent(T.substring(I,F)),I=-1),k!==void 0&&(k+=T.charAt(F));else{k===void 0&&(k=T.substr(0,F));var J=E[D];J!==void 0?(I!==-1&&(k+=encodeURIComponent(T.substring(I,F)),I=-1),k+=J):I===-1&&(I=F)}}return I!==-1&&(k+=encodeURIComponent(T.substring(I))),k!==void 0?k:T}function A(T){for(var S=void 0,k=0;k1&&T.scheme==="file"?"//".concat(T.authority).concat(T.path):T.path.charCodeAt(0)===47&&(T.path.charCodeAt(1)>=65&&T.path.charCodeAt(1)<=90||T.path.charCodeAt(1)>=97&&T.path.charCodeAt(1)<=122)&&T.path.charCodeAt(2)===58?S?T.path.substr(1):T.path[1].toLowerCase()+T.path.substr(2):T.path,s&&(k=k.replace(/\//g,"\\")),k}function w(T,S){var k=S?A:j,I="",F=T.scheme,D=T.authority,J=T.path,ue=T.query,G=T.fragment;if(F&&(I+=F,I+=":"),(D||F==="file")&&(I+=d,I+=d),D){var ne=D.indexOf("@");if(ne!==-1){var Oe=D.substr(0,ne);D=D.substr(ne+1),(ne=Oe.indexOf(":"))===-1?I+=k(Oe,!1):(I+=k(Oe.substr(0,ne),!1),I+=":",I+=k(Oe.substr(ne+1),!1)),I+="@"}(ne=(D=D.toLowerCase()).indexOf(":"))===-1?I+=k(D,!1):(I+=k(D.substr(0,ne),!1),I+=D.substr(ne))}if(J){if(J.length>=3&&J.charCodeAt(0)===47&&J.charCodeAt(2)===58)(ce=J.charCodeAt(1))>=65&&ce<=90&&(J="/".concat(String.fromCharCode(ce+32),":").concat(J.substr(3)));else if(J.length>=2&&J.charCodeAt(1)===58){var ce;(ce=J.charCodeAt(0))>=65&&ce<=90&&(J="".concat(String.fromCharCode(ce+32),":").concat(J.substr(2)))}I+=k(J,!0)}return ue&&(I+="?",I+=k(ue,!1)),G&&(I+="#",I+=S?G:j(G,!1)),I}function C(T){try{return decodeURIComponent(T)}catch{return T.length>3?T.substr(0,3)+C(T.substr(3)):T}}var L=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(T){return T.match(L)?T.replace(L,function(S){return C(S)}):T}var V,R=a(470),H=function(T,S,k){if(k||arguments.length===2)for(var I,F=0,D=S.length;F{for(var a in n)i.o(n,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(447)})();var{URI:ye,Utils:Pi}=Fr;function $r(t,r){if(typeof t!="string")throw new TypeError("Expected a string");for(var i=String(t),e="",n=r?!!r.extended:!1,a=r?!!r.globstar:!1,s=!1,o=r&&typeof r.flags=="string"?r.flags:"",f,l=0,u=i.length;l1&&(c==="/"||c===void 0||c==="{"||c===",")&&(g==="/"||g===void 0||g===","||g==="}");m?(g==="/"?l++:c==="/"&&e.endsWith("\\/")&&(e=e.substr(0,e.length-2)),e+="((?:[^/]*(?:/|$))*)"):e+="([^/]*)"}break;default:e+=f}return(!o||!~o.indexOf("g"))&&(e="^"+e+"$"),new RegExp(e,o)}var de=he(),En="!",jn="/",Nn=function(){function t(r,i){this.globWrappers=[];try{for(var e=0,n=r;e0&&(a[0]===jn&&(a=a.substring(1)),this.globWrappers.push({regexp:$r("**/"+a,{extended:!0,globstar:!0}),include:s}))}this.uris=i}catch{this.globWrappers.length=0,this.uris=[]}}return t.prototype.matchesPattern=function(r){for(var i=!1,e=0,n=this.globWrappers;e0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(r){var i=this;this.cachedSchemaForResource=void 0;var e=!1;r=be(r);for(var n=[r],a=Object.keys(this.schemasById).map(function(l){return i.schemasById[l]});n.length;)for(var s=n.pop(),o=0;o1&&(n=a[1]),pe(n,".")&&(n=n.substr(0,n.length-1)),new ze({},[de("json.schema.nocontent","Unable to load schema from '{0}': {1}.",ot(r),n)])})},t.prototype.resolveSchemaContent=function(r,i){var e=this,n=r.errors.slice(0),a=r.schema;if(a.$schema){var s=be(a.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Dr({},[de("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));s==="https://json-schema.org/draft/2019-09/schema"?n.push(de("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported.")):s==="https://json-schema.org/draft/2020-12/schema"&&n.push(de("json.schema.draft202012.notsupported","Draft 2020-12 schemas are not yet fully supported."))}var o=this.contextService,f=function(p,d){d=decodeURIComponent(d);var b=p;return d[0]==="/"&&(d=d.substring(1)),d.split("/").some(function(y){return y=y.replace(/~1/g,"/").replace(/~0/g,"~"),b=b[y],!b}),b},l=function(p,d,b){return d.anchors||(d.anchors=m(p)),d.anchors.get(b)},u=function(p,d){for(var b in d)d.hasOwnProperty(b)&&!p.hasOwnProperty(b)&&b!=="id"&&b!=="$id"&&(p[b]=d[b])},c=function(p,d,b,y){var v;y===void 0||y.length===0?v=d:y.charAt(0)==="/"?v=f(d,y):v=l(d,b,y),v?u(p,v):n.push(de("json.schema.invalidid","$ref '{0}' in '{1}' can not be resolved.",y,b.uri))},h=function(p,d,b,y){o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(d)&&(d=o.resolveRelativePath(d,y.uri)),d=be(d);var v=e.getOrAddSchemaHandle(d);return v.getUnresolvedSchema().then(function(O){if(y.dependencies.add(d),O.errors.length){var E=b?d+"#"+b:d;n.push(de("json.schema.problemloadingref","Problems loading reference '{0}': {1}",E,O.errors[0]))}return c(p,O.schema,v,b),g(p,O.schema,v)})},g=function(p,d,b){var y=[];return e.traverseNodes(p,function(v){for(var O=new Set;v.$ref;){var E=v.$ref,j=E.split("#",2);if(delete v.$ref,j[0].length>0){y.push(h(v,j[0],j[1],b));return}else if(!O.has(E)){var A=j[1];c(v,d,b,A),O.add(E)}}}),e.promise.all(y)},m=function(p){var d=new Map;return e.traverseNodes(p,function(b){var y=b.$id||b.id;if(typeof y=="string"&&y.charAt(0)==="#"){var v=y.substring(1);d.has(v)?n.push(de("json.schema.duplicateid","Duplicate id declaration: '{0}'",y)):d.set(v,b)}}),d};return g(a,a,i).then(function(p){return new Dr(a,n)})},t.prototype.traverseNodes=function(r,i){if(!r||typeof r!="object")return Promise.resolve(null);for(var e=new Set,n=function(){for(var l=[],u=0;u0?this.createCombinedSchema(r,a).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:r,resolvedSchema:s},s},t.prototype.createCombinedSchema=function(r,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var e="schemaservice://combinedSchema/"+encodeURIComponent(r),n={allOf:i.map(function(a){return{$ref:a}})};return this.addSchemaHandle(e,n)},t.prototype.getMatchingSchemas=function(r,i,e){if(e){var n=e.id||"schemaservice://untitled/matchingSchemas/"+Ln++,a=this.addSchemaHandle(n,e);return a.getResolvedSchema().then(function(s){return i.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted})})}return this.getSchemaForResource(r.uri,i).then(function(s){return s?i.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted}):[]})},t}();var Ln=0;function be(t){try{return ye.parse(t).toString(!0)}catch{return t}}function Vn(t){try{return ye.parse(t).with({fragment:null,query:null}).toString(!0)}catch{return t}}function ot(t){try{var r=ye.parse(t);if(r.scheme==="file")return r.fsPath}catch{}return t}function Ur(t,r){var i=[],e=[],n=[],a=-1,s=le(t.getText(),!1),o=s.scan();function f(C){i.push(C),e.push(n.length)}for(;o!==17;){switch(o){case 1:case 3:{var l=t.positionAt(s.getTokenOffset()).line,u={startLine:l,endLine:l,kind:o===1?"object":"array"};n.push(u);break}case 2:case 4:{var c=o===2?"object":"array";if(n.length>0&&n[n.length-1].kind===c){var u=n.pop(),h=t.positionAt(s.getTokenOffset()).line;u&&h>u.startLine+1&&a!==u.startLine&&(u.endLine=h-1,f(u),a=u.startLine)}break}case 13:{var l=t.positionAt(s.getTokenOffset()).line,g=t.positionAt(s.getTokenOffset()+s.getTokenLength()).line;s.getTokenError()===1&&l+1=0&&n[d].kind!==Ae.Region;)d--;if(d>=0){var u=n[d];n.length=d,h>u.startLine&&a!==u.startLine&&(u.endLine=h,f(u),a=u.startLine)}}}break}}o=s.scan()}var b=r&&r.rangeLimit;if(typeof b!="number"||i.length<=b)return i;r&&r.onRangeLimitExceeded&&r.onRangeLimitExceeded(t.uri);for(var y=[],v=0,O=e;vb){A=d;break}j+=P}}for(var w=[],d=0;d=c&&f<=h&&u.push(n(c,h)),u.push(n(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":u.push(n(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){var g=s(l.offset+l.length,5);g!==-1&&u.push(n(l.offset,g))}l=l.parent}for(var m=void 0,p=u.length-1;p>=0;p--)m=Ne.create(u[p],m);return m||(m=Ne.create(U.create(o,o))),m}function n(o,f){return U.create(t.positionAt(o),t.positionAt(f))}var a=le(t.getText(),!0);function s(o,f){a.setPosition(o);var l=a.scan();return l===f?a.getTokenOffset()+a.getTokenLength():-1}return r.map(e)}function Jr(t,r){var i=[];return r.visit(function(e){var n;if(e.type==="property"&&e.keyNode.value==="$ref"&&((n=e.valueNode)===null||n===void 0?void 0:n.type)==="string"){var a=e.valueNode.value,s=$n(r,a);if(s){var o=t.positionAt(s.offset);i.push({target:"".concat(t.uri,"#").concat(o.line+1,",").concat(o.character+1),range:Fn(t,e.valueNode)})}}return!0}),Promise.resolve(i)}function Fn(t,r){return U.create(t.positionAt(r.offset+1),t.positionAt(r.offset+r.length-1))}function $n(t,r){var i=Dn(r);return i?Jt(i,t.root):null}function Jt(t,r){if(!r)return null;if(t.length===0)return r;var i=t.shift();if(r&&r.type==="object"){var e=r.properties.find(function(s){return s.keyNode.value===i});return e?Jt(t,e.valueNode):null}else if(r&&r.type==="array"&&i.match(/^(0|[1-9][0-9]*)$/)){var n=Number.parseInt(i),a=r.items[n];return a?Jt(t,a):null}return null}function Dn(t){return t==="#"?[]:t[0]!=="#"||t[1]!=="/"?null:t.substring(2).split(/\//).map(Rn)}function Rn(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function qr(t){var r=t.promiseConstructor||Promise,i=new Rr(t.schemaRequestService,t.workspaceContext,r);i.setSchemaContributions(at);var e=new Cr(i,t.contributions,r,t.clientCapabilities),n=new Pr(i,t.contributions,r),a=new Lr(i),s=new Ir(i,r);return{configure:function(o){i.clearExternalSchemas(),o.schemas&&o.schemas.forEach(function(f){i.registerExternalSchema(f.uri,f.fileMatch,f.schema)}),s.configure(o)},resetSchema:function(o){return i.onResourceChange(o)},doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:function(o){return Or(o,{collectComments:!0})},newJSONDocument:function(o,f){return Tr(o,f)},getMatchingSchemas:i.getMatchingSchemas.bind(i),doResolve:e.doResolve.bind(e),doComplete:e.doComplete.bind(e),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:n.doHover.bind(n),getFoldingRanges:Ur,getSelectionRanges:Wr,findDefinition:function(){return Promise.resolve([])},findLinks:Jr,format:function(o,f,l){var u=void 0;if(f){var c=o.offsetAt(f.start),h=o.offsetAt(f.end)-c;u={offset:c,length:h}}var g={tabSize:l?l.tabSize:4,insertSpaces:l?.insertSpaces===!0,insertFinalNewline:l?.insertFinalNewline===!0,eol:`
`};return tr(o.getText(),u,g).map(function(m){return Y.replace(U.create(o.positionAt(m.offset),o.positionAt(m.offset+m.length)),m.content)})}}}var zr;typeof fetch<"u"&&(zr=function(t){return fetch(t).then(r=>r.text())});var st=class{_ctx;_languageService;_languageSettings;_languageId;constructor(r,i){this._ctx=r,this._languageSettings=i.languageSettings,this._languageId=i.languageId,this._languageService=qr({workspaceContext:{resolveRelativePath:(e,n)=>{let a=n.substr(0,n.lastIndexOf("/")+1);return qn(a,e)}},schemaRequestService:i.enableSchemaRequest?zr:void 0}),this._languageService.configure(this._languageSettings)}async doValidation(r){let i=this._getTextDocument(r);if(i){let e=this._languageService.parseJSONDocument(i);return this._languageService.doValidation(i,e,this._languageSettings)}return Promise.resolve([])}async doComplete(r,i){let e=this._getTextDocument(r);if(!e)return null;let n=this._languageService.parseJSONDocument(e);return this._languageService.doComplete(e,i,n)}async doResolve(r){return this._languageService.doResolve(r)}async doHover(r,i){let e=this._getTextDocument(r);if(!e)return null;let n=this._languageService.parseJSONDocument(e);return this._languageService.doHover(e,i,n)}async format(r,i,e){let n=this._getTextDocument(r);if(!n)return[];let a=this._languageService.format(n,i,e);return Promise.resolve(a)}async resetSchema(r){return Promise.resolve(this._languageService.resetSchema(r))}async findDocumentSymbols(r){let i=this._getTextDocument(r);if(!i)return[];let e=this._languageService.parseJSONDocument(i),n=this._languageService.findDocumentSymbols(i,e);return Promise.resolve(n)}async findDocumentColors(r){let i=this._getTextDocument(r);if(!i)return[];let e=this._languageService.parseJSONDocument(i),n=this._languageService.findDocumentColors(i,e);return Promise.resolve(n)}async getColorPresentations(r,i,e){let n=this._getTextDocument(r);if(!n)return[];let a=this._languageService.parseJSONDocument(n),s=this._languageService.getColorPresentations(n,a,i,e);return Promise.resolve(s)}async getFoldingRanges(r,i){let e=this._getTextDocument(r);if(!e)return[];let n=this._languageService.getFoldingRanges(e,i);return Promise.resolve(n)}async getSelectionRanges(r,i){let e=this._getTextDocument(r);if(!e)return[];let n=this._languageService.parseJSONDocument(e),a=this._languageService.getSelectionRanges(e,i,n);return Promise.resolve(a)}_getTextDocument(r){let i=this._ctx.getMirrorModels();for(let e of i)if(e.uri.toString()===r)return We.create(r,this._languageId,e.version,e.getValue());return null}},Wn="/".charCodeAt(0),qt=".".charCodeAt(0);function Jn(t){return t.charCodeAt(0)===Wn}function qn(t,r){if(Jn(r)){let i=ye.parse(t),e=r.split("/");return i.with({path:Br(e)}).toString()}return zn(t,r)}function Br(t){let r=[];for(let e of t)e.length===0||e.length===1&&e.charCodeAt(0)===qt||(e.length===2&&e.charCodeAt(0)===qt&&e.charCodeAt(1)===qt?r.pop():r.push(e));t.length>1&&t[t.length-1].length===0&&r.push("");let i=r.join("/");return t[0].length===0&&(i="/"+i),i}function zn(t,...r){let i=ye.parse(t),e=i.path.split("/");for(let n of r)e.push(...n.split("/"));return i.with({path:Br(e)}).toString()}function Bn(t,r){return new st(t,r)}return Yr(_n);})();
return moduleExports;
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy