(window.webpackJsonp=window.webpackJsonp||[]).push([[315],{R7lK:function(Br,Je,Ie){"use strict";Ie.r(Je),Ie.d(Je,"setupMode",function(){return Yn});var qe=2*60*1e3,ft=function(){function e(t){var n=this;this._defaults=t,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return n._stopWorker()})}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){if(!this._worker)return;var t=Date.now()-this._lastUsedTime;t>qe&&this._stopWorker()},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var t=this,n=[],r=0;r=48&&x<=57)E=E*16+x-48;else if(x>=65&&x<=70)E=E*16+x-65+10;else if(x>=97&&x<=102)E=E*16+x-97+10;else break;r++,S++}return S=n){p+=e.substring(N,r),f=2;break}var S=e.charCodeAt(r);if(S===34){p+=e.substring(N,r),r++;break}if(S===92){if(p+=e.substring(N,r),r++,r>=n){f=2;break}var E=e.charCodeAt(r++);switch(E){case 34:p+='"';break;case 92:p+="\\";break;case 47:p+="/";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+=` `;break;case 114:p+="\r";break;case 116:p+=" ";break;case 117:var x=d(4,!0);x>=0?p+=String.fromCharCode(x):f=4;break;default:f=5}N=r;continue}if(S>=0&&S<=31)if(Ce(S)){p+=e.substring(N,r),f=2;break}else f=6;r++}return p}function T(){if(i="",f=0,a=r,c=u,s=l,r>=n)return a=n,o=17;var p=e.charCodeAt(r);if(ce(p)){do r++,i+=String.fromCharCode(p),p=e.charCodeAt(r);while(ce(p));return o=15}if(Ce(p))return r++,i+=String.fromCharCode(p),p===13&&e.charCodeAt(r)===10&&(r++,i+=` `),u++,l=r,o=14;switch(p){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=y(),o=10;case 47:var N=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&p<=15);return p}return{setPosition:h,getPosition:function(){return r},scan:t?k:T,getToken:function(){return o},getTokenValue:function(){return i},getTokenOffset:function(){return a},getTokenLength:function(){return r-a},getTokenStartLine:function(){return c},getTokenStartCharacter:function(){return a-s},getTokenError:function(){return f}}}function ce(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Ce(e){return e===10||e===13||e===8232||e===8233}function Te(e){return e>=48&&e<=57}function ht(e,t,n){var r,i,a,o,u;if(t){for(o=t.offset,u=o+t.length,a=o;a>0&&!Pe(e,a-1);)a--;for(var c=u;co&&e.substring(L,D)!==O&&b.push({offset:L,length:D-L,content:O})}var p=T();if(p!==17){var N=h.getTokenOffset()+a,S=He(d,r);k(S,a,N)}for(;p!==17;){for(var E=h.getTokenOffset()+h.getTokenLength()+a,x=T(),A="";!s&&(x===12||x===13);){var g=h.getTokenOffset()+a;k(" ",E,g),E=h.getTokenOffset()+h.getTokenLength()+a,A=x===12?y():"",x=T()}if(x===2)p!==1&&(f--,A=y());else if(x===4)p!==3&&(f--,A=y());else{switch(p){case 3:case 1:f++,A=y();break;case 5:case 12:A=y();break;case 13:s?A=y():A=" ";break;case 6:A=" ";break;case 10:if(x===6){A="";break}case 7:case 8:case 9:case 11:case 2:case 4:x===12||x===13?A=" ":x!==5&&x!==17&&(m=!0);break;case 16:m=!0;break}s&&(x===12||x===13)&&(A=y())}var I=h.getTokenOffset()+a;k(A,E,I),p=x}return b}function He(e,t){for(var n="",r=0;rc,n.push("")},onObjectProperty:function(c,l,s){if(t=n.children.length)return;n=n.children[s]}}return n}function Ke(e){if(!e.parent||!e.parent.children)return[];var t=Ke(e.parent);if(e.parent.type==="property"){var n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){var r=e.parent.children.indexOf(e);r!==-1&&t.push(r)}return t}function B(e){switch(e.type){case"array":return e.children.map(B);case"object":for(var t=Object.create(null),n=0,r=e.children;n=e.offset&&t0)for(var L=r.getToken();L!==17;){if(I.indexOf(L)!==-1){b();break}else if(O.indexOf(L)!==-1)break;L=b()}}function p(g){var I=r.getTokenValue();return g?f(I):u(I),b(),!0}function N(){switch(r.getToken()){case 11:var g=0;try{g=JSON.parse(r.getTokenValue()),typeof g!="number"&&(k(2),g=0)}catch(I){k(2)}f(g);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return b(),!0}function S(){return r.getToken()!==10?(k(3,[],[2,5]),!1):(p(!1),r.getToken()===6?(d(":"),b(),A()||k(4,[],[2,5])):k(5,[],[2,5]),!0)}function E(){o(),b();for(var g=!1;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(g||k(4,[],[]),d(","),b(),r.getToken()===2&&T)break}else g&&k(6,[],[]);S()||k(4,[],[2,5]),g=!0}return c(),r.getToken()!==2?k(7,[2],[]):b(),!0}function x(){l(),b();for(var g=!1;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(g||k(4,[],[]),d(","),b(),r.getToken()===4&&T)break}else g&&k(6,[],[]);A()||k(4,[],[4,5]),g=!0}return s(),r.getToken()!==4?k(8,[4],[]):b(),!0}function A(){switch(r.getToken()){case 3:return x();case 1:return E();case 10:return p(!0);default:return N()}}return b(),r.getToken()===17?n.allowEmptyContent?!0:(k(4,[],[]),!1):A()?(r.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}function Qe(e,t){var n=H(e),r=[],i,a=0,o;do{o=n.getPosition(),i=n.scan();switch(i){case 12:case 13:case 17:a!==o&&r.push(e.substring(a,o)),t!==void 0&&r.push(n.getTokenValue().replace(/[^\r\n]/g,t)),a=n.getPosition();break}}while(i!==17);return r.join("")}function le(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function vt(e,t,n){return _e(e,t,void 0,n)}function _e(e,t,n,r,i){for(var a,o=t.slice(),u=[],c=ze(e,u),l=void 0,s=void 0;o.length>0&&(s=o.pop(),l=Fe(c,o),l===void 0&&n!==void 0);)typeof s=="string"?n=(a={},a[s]=n,a):n=[n];if(l)if(l.type==="object"&&typeof s=="string"&&Array.isArray(l.children)){var f=Fe(l,[s]);if(f!==void 0)if(n===void 0){if(!f.parent)throw new Error("Malformed AST");var d=l.children.indexOf(f.parent),h=void 0,m=f.parent.offset+f.parent.length;if(d>0){var y=l.children[d-1];h=y.offset+y.length}else if(h=l.offset+1,l.children.length>1){var T=l.children[1];m=T.offset}return pe(e,{offset:h,length:m-h,content:""},r)}else return pe(e,{offset:f.offset,length:f.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];var b=JSON.stringify(s)+": "+JSON.stringify(n),k=i?i(l.children.map(function(g){return g.children[0].value})):l.children.length,p=void 0;if(k>0){var y=l.children[k-1];p={offset:y.offset+y.length,length:0,content:","+b}}else l.children.length===0?p={offset:l.offset+1,length:0,content:b}:p={offset:l.offset+1,length:0,content:b+","};return pe(e,p,r)}}else if(l.type==="array"&&typeof s=="number"&&Array.isArray(l.children)){var N=s;if(N===-1){var b=""+JSON.stringify(n),p=void 0;if(l.children.length===0)p={offset:l.offset+1,length:0,content:b};else{var y=l.children[l.children.length-1];p={offset:y.offset+y.length,length:0,content:","+b}}return pe(e,p,r)}else if(n===void 0&&l.children.length>=0){var S=s,E=l.children[S],p=void 0;if(l.children.length===1)p={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===S){var y=l.children[S-1],x=y.offset+y.length,A=l.offset+l.length;p={offset:x,length:A-2-x,content:""}}else p={offset:E.offset,length:l.children[S+1].offset-E.offset,content:""};return pe(e,p,r)}else throw new Error("Array modification not supported yet")}else throw new Error("Can not add "+(typeof s!="number"?"index":"property")+" to parent of type "+l.type);else{if(n===void 0)throw new Error("Can not delete in empty document");return pe(e,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(n)},r)}}function pe(e,t,n){var r=je(e,t),i=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!Pe(r,i-1);)i--;for(;a=0;u--){var c=o[u];r=je(r,c),i=Math.min(i,c.offset),a=Math.max(a,c.offset+c.length),a+=c.content.length-c.length}var l=e.length-(r.length-a)-i;return[{offset:i,length:l,content:r.substring(i,a)}]}function je(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}function Ze(e,t){return`\r `.indexOf(e.charAt(t))!==-1}var w=H,C=mt,j=gt,M=ze,W=Fe,V=Ge,$=Ke,Xe=B,Ye=xe,ne=Qe;function De(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}function ue(e,t,n){return ht(e,t,n)}function ni(e,t,n,r){return _e(e,t,n,r.formattingOptions,r.getInsertionIndex)}function ii(e,t){for(var n=t.length-1;n>=0;n--)e=je(e,t[n]);return e}function Ue(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0)return!1;if(typeof e!==typeof t)return!1;if(typeof e!="object")return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n0&&(u.arguments=a),u}e.create=t;function n(r){var i=r;return v.defined(i)&&v.string(i.title)&&v.string(i.command)}e.is=n})(Re||(Re={}));var se;(function(e){function t(a,o){return{range:a,newText:o}}e.replace=t;function n(a,o){return{range:{start:a,end:a},newText:o}}e.insert=n;function r(a){return{range:a,newText:""}}e.del=r;function i(a){var o=a;return v.objectLiteral(o)&&v.string(o.newText)&&q.is(o.range)}e.is=i})(se||(se={}));var et;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){var i=r;return v.defined(i)&&at.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(et||(et={}));var tt;(function(e){function t(r,i){var a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),a}e.create=t;function n(r){var i=r;return i&&i.kind==="create"&&v.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||v.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||v.boolean(i.options.ignoreIfExists)))}e.is=n})(tt||(tt={}));var rt;(function(e){function t(r,i,a){var o={kind:"rename",oldUri:r,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),o}e.create=t;function n(r){var i=r;return i&&i.kind==="rename"&&v.string(i.oldUri)&&v.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||v.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||v.boolean(i.options.ignoreIfExists)))}e.is=n})(rt||(rt={}));var nt;(function(e){function t(r,i){var a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),a}e.create=t;function n(r){var i=r;return i&&i.kind==="delete"&&v.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||v.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||v.boolean(i.options.ignoreIfNotExists)))}e.is=n})(nt||(nt={}));var kt;(function(e){function t(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return v.string(i.kind)?tt.is(i)||rt.is(i)||nt.is(i):et.is(i)}))}e.is=t})(kt||(kt={}));var it=function(){function e(t){this.edits=t}return e.prototype.insert=function(t,n){this.edits.push(se.insert(t,n))},e.prototype.replace=function(t,n){this.edits.push(se.replace(t,n))},e.prototype.delete=function(t){this.edits.push(se.del(t))},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),ai=function(){function e(t){var n=this;this._textEditChanges=Object.create(null),t&&(this._workspaceEdit=t,t.documentChanges?t.documentChanges.forEach(function(r){if(et.is(r)){var i=new it(r.edits);n._textEditChanges[r.textDocument.uri]=i}}):t.changes&&Object.keys(t.changes).forEach(function(r){var i=new it(t.changes[r]);n._textEditChanges[r]=i}))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(t){if(at.is(t)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n=t,r=this._textEditChanges[n.uri];if(!r){var i=[],a={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(a),r=new it(i),this._textEditChanges[n.uri]=r}return r}else{if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var i=[];this._workspaceEdit.changes[t]=i,r=new it(i),this._textEditChanges[t]=r}return r}},e.prototype.createFile=function(t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(tt.create(t,n))},e.prototype.renameFile=function(t,n,r){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(rt.create(t,n,r))},e.prototype.deleteFile=function(t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(nt.create(t,n))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}(),Jt;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){var i=r;return v.defined(i)&&v.string(i.uri)}e.is=n})(Jt||(Jt={}));var at;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return v.defined(i)&&v.string(i.uri)&&(i.version===null||v.number(i.version))}e.is=n})(at||(at={}));var qt;(function(e){function t(r,i,a,o){return{uri:r,languageId:i,version:a,text:o}}e.create=t;function n(r){var i=r;return v.defined(i)&&v.string(i.uri)&&v.string(i.languageId)&&v.number(i.version)&&v.string(i.text)}e.is=n})(qt||(qt={}));var de;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(de||(de={})),function(e){function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t}(de||(de={}));var Ct;(function(e){function t(n){var r=n;return v.objectLiteral(n)&&de.is(r.kind)&&v.string(r.value)}e.is=t})(Ct||(Ct={}));var F;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(F||(F={}));var Q;(function(e){e.PlainText=1,e.Snippet=2})(Q||(Q={}));var Ht;(function(e){e.Deprecated=1})(Ht||(Ht={}));var Tt;(function(e){function t(n){return{label:n}}e.create=t})(Tt||(Tt={}));var zt;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(zt||(zt={}));var ot;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){var i=r;return v.string(i)||v.objectLiteral(i)&&v.string(i.language)&&v.string(i.value)}e.is=n})(ot||(ot={}));var Kt;(function(e){function t(n){var r=n;return!!r&&v.objectLiteral(r)&&(Ct.is(r.contents)||ot.is(r.contents)||v.typedArray(r.contents,ot.is))&&(n.range===void 0||q.is(n.range))}e.is=t})(Kt||(Kt={}));var Gt;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Gt||(Gt={}));var Qt;(function(e){function t(n,r){for(var i=[],a=2;a=0;s--){var f=c[s],d=a.offsetAt(f.range.start),h=a.offsetAt(f.range.end);if(h<=l)u=u.substring(0,d)+f.newText+u.substring(h,u.length);else throw new Error("Overlapping edit");l=d}return u}e.applyEdits=r;function i(a,o){if(a.length<=1)return a;var u=a.length/2|0,c=a.slice(0,u),l=a.slice(u);i(c,o),i(l,o);for(var s=0,f=0,d=0;s0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ae.create(0,t);for(;rt?i=a:r=a+1}var o=r-1;return ae.create(o,t-n[o])},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],i=t.line+1t?i=a:r=a+1}var o=r-1;return{line:o,character:t-n[o]}},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],i=t.line+1=0;l--){var s=u[l],f=i.offsetAt(s.range.start),d=i.offsetAt(s.range.end);if(d<=c)o=o.substring(0,f)+s.newText+o.substring(d,o.length);else throw new Error("Overlapping edit");c=f}return o}e.applyEdits=r})(ur||(ur={}));function wt(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);wt(r,t),wt(i,t);for(var a=0,o=0,u=0;an.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Jr(e){var t=hr(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var R;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(R||(R={}));var dr;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[de.Markdown,de.PlainText],commitCharactersSupport:!0}}}}})(dr||(dr={}));function qr(e,t){var n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,function(r,i){var a=i[0];return typeof t[a]!="undefined"?t[a]:r}),n}function Hr(e,t){for(var n=[],r=2;r()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},Ee=function(){function e(t,n,r){this.offset=n,this.length=r,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),Kr=function(e){Se(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="null",i.value=null,i}return t}(Ee),pr=function(e){Se(t,e);function t(n,r,i){var a=e.call(this,n,i)||this;return a.type="boolean",a.value=r,a}return t}(Ee),Gr=function(e){Se(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(Ee),Qr=function(e){Se(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(Ee),mr=function(e){Se(t,e);function t(n,r,i){var a=e.call(this,n,r,i)||this;return a.type="string",a.value="",a}return t}(Ee),Zr=function(e){Se(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="property",i.colonOffset=-1,i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(Ee),Xr=function(e){Se(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(Ee);function X(e){return oe(e)?e?{}:{not:{}}:e}var gr;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(gr||(gr={}));var Yr=function(){function e(t,n){t===void 0&&(t=-1),n===void 0&&(n=null),this.focusOffset=t,this.exclude=n,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){var n;(n=this.schemas).push.apply(n,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||vr(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),xt=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),Y=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(t){for(var n=0,r=t;n=e.offset&&t0?z={schema:Oe,validationResult:re,matchingSchemas:ke}:Me===0&&(z.matchingSchemas.merge(ke),z.validationResult.mergeEnumValues(re))}}return K.length>1&&D&&n.problems.push({location:{offset:e.offset,length:1},severity:U.Warning,message:P("oneOfWarning","Matches multiple schemas when only one must validate.")}),z!==null&&(n.merge(z.validationResult),n.propertiesMatches+=z.validationResult.propertiesMatches,n.propertiesValueMatches+=z.validationResult.propertiesValueMatches,r.merge(z.matchingSchemas)),K.length};Array.isArray(t.anyOf)&&p(t.anyOf,!1),Array.isArray(t.oneOf)&&p(t.oneOf,!0);var N=function(L){var D=new Y,K=r.newSub();Z(e,X(L),D,K),n.merge(D),n.propertiesMatches+=D.propertiesMatches,n.propertiesValueMatches+=D.propertiesValueMatches,r.merge(K)},S=function(L,D,K){var z=X(L),ie=new Y,Ae=r.newSub();Z(e,z,ie,Ae),r.merge(Ae),ie.hasProblems()?K&&N(K):D&&N(D)},E=X(t.if);if(E&&S(E,X(t.then),X(t.else)),Array.isArray(t.enum)){for(var x=ge(e),A=!1,g=0,I=t.enum;g=b&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:P("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",b)});var k=y(s.minimum,s.exclusiveMinimum);te(k)&&hp&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:P("maximumWarning","Value is above the maximum of {0}.",p)})}function o(l,s,f,d){if(te(s.minLength)&&l.value.lengths.maxLength&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:P("maxLengthWarning","String is longer than the maximum length of {0}.",s.maxLength)}),$r(s.pattern)){var h=new RegExp(s.pattern);h.test(l.value)||f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:s.patternErrorMessage||s.errorMessage||P("patternWarning",'String does not match the pattern of "{0}".',s.pattern)})}if(s.format)switch(s.format){case"uri":case"uri-reference":{var m=void 0;if(!l.value)m=P("uriEmpty","URI expected.");else{var y=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(l.value);y?!y[2]&&s.format==="uri"&&(m=P("uriSchemeMissing","URI with a scheme is expected.")):m=P("uriMissing","URI is expected.")}m&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:s.patternErrorMessage||s.errorMessage||P("uriFormatWarning","String is not a URI: {0}",m)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var T=zr[s.format];(!l.value||!T.pattern.exec(l.value))&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:s.patternErrorMessage||s.errorMessage||T.errorMessage});default:}}function u(l,s,f,d){if(Array.isArray(s.items)){for(var h=s.items,m=0;m=h.length&&f.propertiesValueMatches++}if(l.items.length>h.length)if(typeof s.additionalItems=="object")for(var p=h.length;ps.maxItems&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:P("maxItemsWarning","Array has too many items. Expected {0} or fewer.",s.maxItems)}),s.uniqueItems===!0){var g=ge(l),I=g.some(function(O,L){return L!==g.lastIndexOf(O)});I&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:P("uniqueItemsWarning","Array has duplicate items.")})}}function c(l,s,f,d){for(var h=Object.create(null),m=[],y=0,T=l.properties;y=0;)m.splice(Ut,1),Ut=m.indexOf(Rr)};if(s.properties)for(var g=0,I=Object.keys(s.properties);g0)for(var Me=0,Pr=m;Mes.maxProperties&&f.problems.push({location:{offset:l.offset,length:l.length},severity:U.Warning,message:P("MaxPropWarning","Object has more properties than limit of {0}.",s.maxProperties)})),te(s.minProperties)&&(l.properties.length0){for(O--;O>0&&/\s/.test(i.charAt(O));)O--;L=O+1}if(l(E,x,O,L),A&&d(A,!1),g.length+I.length>0)for(var D=a.getToken();D!==17;){if(g.indexOf(D)!==-1){u();break}else if(I.indexOf(D)!==-1)break;D=u()}return A}function f(){switch(a.getTokenError()){case 4:return s(P("InvalidUnicode","Invalid unicode sequence in string."),R.InvalidUnicode),!0;case 5:return s(P("InvalidEscapeCharacter","Invalid escape character in string."),R.InvalidEscapeCharacter),!0;case 3:return s(P("UnexpectedEndOfNumber","Unexpected end of number."),R.UnexpectedEndOfNumber),!0;case 1:return s(P("UnexpectedEndOfComment","Unexpected end of comment."),R.UnexpectedEndOfComment),!0;case 2:return s(P("UnexpectedEndOfString","Unexpected end of string."),R.UnexpectedEndOfString),!0;case 6:return s(P("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),R.InvalidCharacter),!0}return!1}function d(E,x){return E.length=a.getTokenOffset()+a.getTokenLength()-E.offset,x&&u(),E}function h(E){if(a.getToken()!==3)return null;var x=new Gr(E,a.getTokenOffset());u();for(var A=0,g=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){g||s(P("ValueExpected","Value expected"),R.ValueExpected);var I=a.getTokenOffset();if(u(),a.getToken()===4){g&&l(P("TrailingComma","Trailing comma"),R.TrailingComma,I,I+1);continue}}else g&&s(P("ExpectedComma","Expected comma"),R.CommaExpected);var O=p(x,A++);O?x.items.push(O):s(P("PropertyExpected","Value expected"),R.ValueExpected,null,[],[4,5]),g=!0}return a.getToken()!==4?s(P("ExpectedCloseBracket","Expected comma or closing bracket"),R.CommaOrCloseBacketExpected,x):d(x,!0)}function m(E,x){var A=new Zr(E,a.getTokenOffset()),g=T(A);if(!g)if(a.getToken()===16){s(P("DoubleQuotesExpected","Property keys must be doublequoted"),R.Undefined);var I=new mr(A,a.getTokenOffset(),a.getTokenLength());I.value=a.getTokenValue(),g=I,u()}else return null;A.keyNode=g;var O=x[g.value];if(O?(l(P("DuplicateKeyWarning","Duplicate object key"),R.DuplicateKey,A.keyNode.offset,A.keyNode.offset+A.keyNode.length,U.Warning),typeof O=="object"&&l(P("DuplicateKeyWarning","Duplicate object key"),R.DuplicateKey,O.keyNode.offset,O.keyNode.offset+O.keyNode.length,U.Warning),x[g.value]=!0):x[g.value]=A,a.getToken()===6)A.colonOffset=a.getTokenOffset(),u();else if(s(P("ColonExpected","Colon expected"),R.ColonExpected),a.getToken()===10&&e.positionAt(g.offset+g.length).line0?e.lastIndexOf(t)===n:n===0?e===t:!1}function nn(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function ci(e,t){for(var n="";t>0;)(t&1)===1&&(n+=e),e+=e,t=t>>>1;return n}var At=Ne(),an=[",","}","]"],on=[":"],sn=function(){function e(t,n,r,i){n===void 0&&(n=[]),r===void 0&&(r=Promise),i===void 0&&(i={}),this.schemaService=t,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i,this.templateVarIdCounter=0}return e.prototype.doResolve=function(t){for(var n=this.contributions.length-1;n>=0;n--)if(this.contributions[n].resolveCompletion){var r=this.contributions[n].resolveCompletion(t);if(r)return r}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,n,r){var i=this,a={items:[],isIncomplete:!1},o=t.getText(),u=t.offsetAt(n),c=r.getNodeFromOffset(u,!0);if(this.isInComment(t,c?c.offset:0,u))return Promise.resolve(a);if(c&&u===c.offset+c.length&&u>0){var l=o[u-1];(c.type==="object"&&l==="}"||c.type==="array"&&l==="]")&&(c=c.parent)}var s=this.getCurrentWord(t,u),f=null;if(c&&(c.type==="string"||c.type==="number"||c.type==="boolean"||c.type==="null"))f=q.create(t.positionAt(c.offset),t.positionAt(c.offset+c.length));else{var d=u-s.length;d>0&&o[d-1]==='"'&&d--,f=q.create(t.positionAt(d),n)}var h=!1,m={},y={add:function(T){var b=T.label,k=m[b];if(k)k.documentation||(k.documentation=T.documentation);else{if(b=b.replace(/[\n]/g,"\u21B5"),b.length>60){var p=b.substr(0,57).trim()+"...";m[p]||(b=p)}f&&(T.textEdit=se.replace(f,T.insertText)),h&&(T.commitCharacters=T.kind===F.Property?on:an),T.label=b,m[b]=T,a.items.push(T)}},setAsIncomplete:function(){a.isIncomplete=!0},error:function(T){console.error(T)},log:function(T){console.log(T)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(t.uri,r).then(function(T){var b=[],k=!0,p="",N=null;if(c&&c.type==="string"){var S=c.parent;S&&S.type==="property"&&S.keyNode===c&&(k=!S.valueNode,N=S,p=o.substr(c.offset+1,c.length-2),S&&(c=S.parent))}if(c&&c.type==="object"){if(c.offset===u)return a;var E=c.properties;E.forEach(function(I){(!N||N!==I)&&(m[I.keyNode.value]=Tt.create("__"))});var x="";k&&(x=i.evaluateSeparatorAfter(t,t.offsetAt(f.end))),T?i.getPropertyCompletions(T,r,c,k,x,y):i.getSchemaLessPropertyCompletions(r,c,p,y);var A=St(c);i.contributions.forEach(function(I){var O=I.collectPropertyCompletions(t.uri,A,s,k,x==="",y);O&&b.push(O)}),!T&&s.length>0&&o.charAt(u-s.length-1)!=='"'&&(y.add({kind:F.Property,label:i.getLabelForValue(s),insertText:i.getInsertTextForProperty(s,null,!1,x),insertTextFormat:Q.Snippet,documentation:""}),y.setAsIncomplete())}var g={};return T?i.getValueCompletions(T,r,c,u,t,y,g):i.getSchemaLessValueCompletions(r,c,u,t,y),i.contributions.length>0&&i.getContributedValueCompletions(r,c,u,t,y,b),i.promiseConstructor.all(b).then(function(){if(y.getNumberOfProposals()===0){var I=u;c&&(c.type==="string"||c.type==="number"||c.type==="boolean"||c.type==="null")&&(I=c.offset+c.length);var O=i.evaluateSeparatorAfter(t,I);i.addFillerValueCompletions(g,O,y)}return a})})},e.prototype.getPropertyCompletions=function(t,n,r,i,a,o){var u=this,c=n.getMatchingSchemas(t.schema,r.offset);c.forEach(function(l){if(l.node===r&&!l.inverted){var s=l.schema.properties;s&&Object.keys(s).forEach(function(f){var d=s[f];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){var h={kind:F.Property,label:f,insertText:u.getInsertTextForProperty(f,d,i,a),insertTextFormat:Q.Snippet,filterText:u.getFilterTextForValue(f),documentation:u.fromMarkup(d.markdownDescription)||d.description||""};ct(h.insertText,"$1"+a)&&(h.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(h)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(t,n,r,i){var a=this,o=function(c){c.properties.forEach(function(l){var s=l.keyNode.value;i.add({kind:F.Property,label:s,insertText:a.getInsertTextForValue(s,""),insertTextFormat:Q.Snippet,filterText:a.getFilterTextForValue(s),documentation:""})})};if(n.parent)if(n.parent.type==="property"){var u=n.parent.keyNode.value;t.visit(function(c){return c.type==="property"&&c!==n.parent&&c.keyNode.value===u&&c.valueNode&&c.valueNode.type==="object"&&o(c.valueNode),!0})}else n.parent.type==="array"&&n.parent.items.forEach(function(c){c.type==="object"&&c!==n&&o(c)});else n.type==="object"&&i.add({kind:F.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:Q.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,n,r,i,a){var o=this,u=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(u=n.offset+n.length,n=n.parent),!n){a.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Q.Snippet,documentation:""}),a.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Q.Snippet,documentation:""});return}var c=this.evaluateSeparatorAfter(i,u),l=function(h){vr(h.parent,r,!0)||a.add({kind:o.getSuggestionKind(h.type),label:o.getLabelTextForMatchingNode(h,i),insertText:o.getInsertTextForMatchingNode(h,i,c),insertTextFormat:Q.Snippet,documentation:""}),h.type==="boolean"&&o.addBooleanValueCompletion(!h.value,c,a)};if(n.type==="property"&&r>n.colonOffset){var s=n.valueNode;if(s&&(r>s.offset+s.length||s.type==="object"||s.type==="array"))return;var f=n.keyNode.value;t.visit(function(h){return h.type==="property"&&h.keyNode.value===f&&h.valueNode&&l(h.valueNode),!0}),f==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(c,a)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){var d=n.parent.keyNode.value;t.visit(function(h){return h.type==="property"&&h.keyNode.value===d&&h.valueNode&&h.valueNode.type==="array"&&h.valueNode.items.forEach(l),!0})}else n.items.forEach(l)},e.prototype.getValueCompletions=function(t,n,r,i,a,o,u){var c=this,l=i,s=null,f=null;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(l=r.offset+r.length,f=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",o,u);return}if(r.type==="property"&&i>r.colonOffset){var d=r.valueNode;if(d&&i>d.offset+d.length)return;s=r.keyNode.value,r=r.parent}if(r&&(s!==null||r.type==="array")){var h=this.evaluateSeparatorAfter(a,l),m=n.getMatchingSchemas(t.schema,r.offset,f);m.forEach(function(y){if(y.node===r&&!y.inverted&&y.schema){if(r.type==="array"&&y.schema.items)if(Array.isArray(y.schema.items)){var T=c.findItemAtOffset(r,a,i);Tn.colonOffset){var u=n.keyNode.value,c=n.valueNode;if(!c||r<=c.offset+c.length){var l=St(n.parent);this.contributions.forEach(function(s){var f=s.collectValueCompletions(i.uri,l,u,a);f&&o.push(f)})}}},e.prototype.addSchemaValueCompletions=function(t,n,r,i){var a=this;typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(o){return a.addSchemaValueCompletions(o,n,r,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(o){return a.addSchemaValueCompletions(o,n,r,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(o){return a.addSchemaValueCompletions(o,n,r,i)}))},e.prototype.addDefaultValueCompletions=function(t,n,r,i){var a=this;i===void 0&&(i=0);var o=!1;if(fe(t.default)){for(var u=t.type,c=t.default,l=i;l>0;l--)c=[c],u="array";r.add({kind:this.getSuggestionKind(u),label:this.getLabelForValue(c),insertText:this.getInsertTextForValue(c,n),insertTextFormat:Q.Snippet,detail:At("json.suggest.default","Default value")}),o=!0}Array.isArray(t.examples)&&t.examples.forEach(function(s){for(var f=t.type,d=s,h=i;h>0;h--)d=[d],f="array";r.add({kind:a.getSuggestionKind(f),label:a.getLabelForValue(d),insertText:a.getInsertTextForValue(d,n),insertTextFormat:Q.Snippet}),o=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(s){var f=t.type,d=s.body,h=s.label,m,y;if(fe(d)){for(var T=t.type,b=i;b>0;b--)d=[d],T="array";m=a.getInsertTextForSnippetValue(d,n),y=a.getFilterTextForSnippetValue(d),h=h||a.getLabelForSnippetValue(d)}else if(typeof s.bodyText=="string"){for(var k="",p="",N="",b=i;b>0;b--)k=k+N+`[ `,p=p+` `+N+"]",N+=" ",f="array";m=k+N+s.bodyText.split(` `).join(` `+N)+p+n,h=h||m,y=m.replace(/[\n]/g,"")}r.add({kind:a.getSuggestionKind(f),label:h,documentation:a.fromMarkup(s.markdownDescription)||s.description,insertText:m,insertTextFormat:Q.Snippet,filterText:y}),o=!0}),!o&&typeof t.items=="object"&&!Array.isArray(t.items)&&this.addDefaultValueCompletions(t.items,n,r,i+1)},e.prototype.addEnumValueCompletions=function(t,n,r){if(fe(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:Q.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,a=t.enum.length;i0?n[0]:null}if(!t)return F.Value;switch(t){case"string":return F.Value;case"object":return F.Module;case"property":return F.Property;default:return F.Value}},e.prototype.getLabelTextForMatchingNode=function(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:var r=n.getText().substr(t.offset,t.length);return r}},e.prototype.getInsertTextForMatchingNode=function(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:var i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,n,r,i){var a=this.getInsertTextForValue(t,"");if(!r)return a;var o=a+": ",u,c=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){var l=n.defaultSnippets[0].body;fe(l)&&(u=this.getInsertTextForSnippetValue(l,""))}c+=n.defaultSnippets.length}if(n.enum&&(!u&&n.enum.length===1&&(u=this.getInsertTextForGuessedValue(n.enum[0],"")),c+=n.enum.length),fe(n.default)&&(u||(u=this.getInsertTextForGuessedValue(n.default,"")),c++),Array.isArray(n.examples)&&n.examples.length&&(u||(u=this.getInsertTextForGuessedValue(n.examples[0],"")),c+=n.examples.length),c===0){var s=Array.isArray(n.type)?n.type[0]:n.type;s||(n.properties?s="object":n.items&&(s="array"));switch(s){case"boolean":u="$1";break;case"string":u='"$1"';break;case"object":u="{$1}";break;case"array":u="[$1]";break;case"number":case"integer":u="${1:0}";break;case"null":u="${1:null}";break;default:return a}}}return(!u||c>1)&&(u="$1"),o+u+i},e.prototype.getCurrentWord=function(t,n){for(var r=n-1,i=t.getText();r>=0&&` \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)},e.prototype.evaluateSeparatorAfter=function(t,n){var r=w(t.getText(),!0);r.setPosition(n);var i=r.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,n,r){for(var i=w(n.getText(),!0),a=t.items,o=a.length-1;o>=0;o--){var u=a[o];if(r>u.offset+u.length){i.setPosition(u.offset+u.length);var c=i.scan();return c===5&&r>=i.getTokenOffset()+i.getTokenLength()?o+1:o}else if(r>=u.offset)return o}return 0},e.prototype.isInComment=function(t,n,r){var i=w(t.getText(),!1);i.setPosition(n);for(var a=i.scan();a!==17&&i.getTokenOffset()+i.getTokenLength()a.offset+1&&i=0;f--){var d=this.contributions[f],h=d.getInfoContribution(t.uri,s);if(h)return h.then(function(m){return l(m)})}return this.schemaService.getSchemaForResource(t.uri,r).then(function(m){if(m){var y=r.getMatchingSchemas(m.schema,a.offset),T=null,b=null,k=null,p=null;y.every(function(S){if(S.node===a&&!S.inverted&&S.schema&&(T=T||S.schema.title,b=b||S.schema.markdownDescription||Ot(S.schema.description),S.schema.enum)){var E=S.schema.enum.indexOf(ge(a));S.schema.markdownEnumDescriptions?k=S.schema.markdownEnumDescriptions[E]:S.schema.enumDescriptions&&(k=Ot(S.schema.enumDescriptions[E])),k&&(p=S.schema.enum[E],typeof p!="string"&&(p=JSON.stringify(p)))}return!0});var N="";return T&&(N=Ot(T)),b&&(N.length>0&&(N+=` `),N+=b),k&&(N.length>0&&(N+=` `),N+="`"+ln(p)+"`: "+k),l([N])}return null})},e}();function Ot(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}return}function ln(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var It=Ie("xiP/"),ve=Ne(),un=function(){function e(t){try{this.patternRegExp=new RegExp(nn(t)+"$")}catch(n){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(t){this.schemas.push(t)},e.prototype.matchesPattern=function(t){return this.patternRegExp&&this.patternRegExp.test(t)},e.prototype.getSchemas=function(){return this.schemas},e}(),fn=function(){function e(t,n,r){this.service=t,this.url=n,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new Le(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(n){return t.service.resolveSchemaContent(n,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Le=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e}(),br=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e.prototype.getSection=function(t){return X(this.getSectionRecursive(t,this.schema))},e.prototype.getSectionRecursive=function(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;var r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties)for(var i=0,a=Object.keys(n.patternProperties);i0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var n=this,r=!1;t=this.normalizeId(t);for(var i=[t],a=Object.keys(this.schemasById).map(function(l){return n.schemasById[l]});i.length;)for(var o=i.pop(),u=0;u1&&(i=a[1]),ct(i,".")&&(i=i.substr(0,i.length-1)),new Le({},[ve("json.schema.nocontent","Unable to load schema from '{0}': {1}.",lt(t),i)])})},e.prototype.resolveSchemaContent=function(t,n,r){var i=this,a=t.errors.slice(0),o=t.schema;if(o.$schema){var u=this.normalizeId(o.$schema);if(u==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new br({},[ve("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));u==="https://json-schema.org/draft/2019-09/schema"&&t.errors.push(ve("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var c=this.contextService,l=function(h,m){if(!m)return h;var y=h;return m[0]==="/"&&(m=m.substr(1)),m.split("/").some(function(T){return y=y[T],!y}),y},s=function(h,m,y,T){var b=l(m,T);if(b)for(var k in b)b.hasOwnProperty(k)&&!h.hasOwnProperty(k)&&(h[k]=b[k]);else a.push(ve("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",T,y))},f=function(h,m,y,T,b){c&&!/^\w+:\/\/.*/.test(m)&&(m=c.resolveRelativePath(m,T)),m=i.normalizeId(m);var k=i.getOrAddSchemaHandle(m);return k.getUnresolvedSchema().then(function(p){if(b[m]=!0,p.errors.length){var N=y?m+"#"+y:m;a.push(ve("json.schema.problemloadingref","Problems loading reference '{0}': {1}",N,p.errors[0]))}return s(h,p.schema,m,y),d(h,p.schema,m,k.dependencies)})},d=function(h,m,y,T){if(!h||typeof h!="object")return Promise.resolve(null);for(var b=[h],k=[],p=[],N=function(){for(var g=[],I=0;I0){p.push(f(g,L[0],L[1],y,T));return}else I.indexOf(O)===-1&&(s(g,m,y,L[1]),I.push(O))}N(g.items,g.additionalProperties,g.not,g.contains,g.propertyNames,g.if,g.then,g.else),S(g.definitions,g.properties,g.patternProperties,g.dependencies),E(g.anyOf,g.allOf,g.oneOf,g.items)};b.length;){var A=b.pop();if(k.indexOf(A)>=0)continue;k.push(A),x(A)}return i.promise.all(p)};return d(o,o,n,r).then(function(h){return new br(o,a)})},e.prototype.getSchemaForResource=function(t,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(m){return m.keyNode.value==="$schema"&&m.valueNode&&m.valueNode.type==="string"});if(r.length>0){var i=ge(r[0].valueNode);if(i&&rn(i,".")&&this.contextService&&(i=this.contextService.resolveRelativePath(i,t)),i){var a=this.normalizeId(i);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}for(var o=Object.create(null),u=[],c=0,l=this.filePatternAssociations;c0?this.createCombinedSchema(t,u).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(function(a){return{$ref:a}})};return this.addSchemaHandle(r,i)},e}();function lt(e){try{var t=It.a.parse(e);if(t.scheme==="file")return t.fsPath}catch(n){}return e}var dn=Ne(),pn=function(){function e(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate,this.commentSeverity=t.allowComments?void 0:U.Error)},e.prototype.doValidation=function(t,n,r,i){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],u={},c=function(f){var d=f.range.start.line+" "+f.range.start.character+" "+f.message;u[d]||(u[d]=!0,o.push(f))},l=function(f){var d=r?Tr(r.trailingCommas):U.Error,h=r?Tr(r.comments):a.commentSeverity;if(f){if(f.errors.length&&n.root){var m=n.root,y=m.type==="object"?m.properties[0]:null;if(y&&y.keyNode.value==="$schema"){var T=y.valueNode||y,b=q.create(t.positionAt(T.offset),t.positionAt(T.offset+T.length));c(he.create(b,f.errors[0],U.Warning,R.SchemaResolveError))}else{var b=q.create(t.positionAt(m.offset),t.positionAt(m.offset+1));c(he.create(b,f.errors[0],U.Warning,R.SchemaResolveError))}}else{var k=n.validate(t,f.schema);k&&k.forEach(c)}kr(f.schema)&&(h=void 0),Cr(f.schema)&&(d=void 0)}for(var p=0,N=n.syntaxErrors;p=ut&&e<=yn?e-ut+10:0)}function bn(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:G(e.charCodeAt(1))*17/255,green:G(e.charCodeAt(2))*17/255,blue:G(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:G(e.charCodeAt(1))*17/255,green:G(e.charCodeAt(2))*17/255,blue:G(e.charCodeAt(3))*17/255,alpha:G(e.charCodeAt(4))*17/255};case 7:return{red:(G(e.charCodeAt(1))*16+G(e.charCodeAt(2)))/255,green:(G(e.charCodeAt(3))*16+G(e.charCodeAt(4)))/255,blue:(G(e.charCodeAt(5))*16+G(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(G(e.charCodeAt(1))*16+G(e.charCodeAt(2)))/255,green:(G(e.charCodeAt(3))*16+G(e.charCodeAt(4)))/255,blue:(G(e.charCodeAt(5))*16+G(e.charCodeAt(6)))/255,alpha:(G(e.charCodeAt(7))*16+G(e.charCodeAt(8)))/255}}return null}function li(e,t,n,r){return r===void 0&&(r=1),{red:e/255,green:t/255,blue:n/255,alpha:r}}var kn=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var a=n.root;if(!a)return null;var o=r.resultLimit,u=t.uri;if((u==="vscode://defaultsettings/keybindings.json"||ct(u.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var c=[],l=0,s=a.items;l0){o--;var I=Ve.create(t.uri,ye(t,A)),O=x?x+"."+A.keyNode.value:A.keyNode.value;p.push({name:i.getKeyLabel(A),kind:i.getSymbolKind(g.type),location:I,containerName:x}),T.push({node:g,containerName:O})}else k=!0})};b0){o--;var O=ye(t,g),L=O,D=String(I),K={name:D,kind:i.getSymbolKind(g.type),range:O,selectionRange:L,children:[]};A.push(K),k.push({result:K.children,node:g})}else N=!0}):x.type==="object"&&x.properties.forEach(function(g){var I=g.valueNode;if(I)if(o>0){o--;var O=ye(t,g),L=ye(t,g.keyNode),D={name:i.getKeyLabel(g),kind:i.getSymbolKind(I.type),range:O,selectionRange:L,children:[]};A.push(D),k.push({result:D.children,node:I})}else N=!0})};p0&&i[i.length-1].kind===f){var s=i.pop(),d=e.positionAt(o.getTokenOffset()).line;s&&d>s.startLine+1&&a!==s.startLine&&(s.endLine=d-1,c(s),a=s.startLine)}break}case 13:{var l=e.positionAt(o.getTokenOffset()).line,h=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&l+1=0&&i[T].kind!==me.Region;)T--;if(T>=0){var s=i[T];i.length=T,d>s.startLine&&a!==s.startLine&&(s.endLine=d,c(s),a=s.startLine)}}}break}}u=o.scan()}var b=t&&t.rangeLimit;if(typeof b!="number"||n.length<=b)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var k=[],p=0,N=r;pb){x=T;break}E+=A}}for(var g=[],T=0;T=f&&c<=d&&s.push(i(f,d)),s.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":s.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){var h=o(l.offset+l.length,5);h!==-1&&s.push(i(l.offset,h))}l=l.parent}for(var m=void 0,y=s.length-1;y>=0;y--)m=st.create(s[y],m);return m||(m=st.create(q.create(u,u))),m}function i(u,c){return q.create(e.positionAt(u),e.positionAt(c))}var a=w(e.getText(),!0);function o(u,c){a.setPosition(u);var l=a.scan();return l===c?a.getTokenOffset()+a.getTokenLength():-1}return t.map(r)}function ui(e){var t=e.promiseConstructor||Promise,n=new hn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(jt);var r=new sn(n,e.contributions,t,e.clientCapabilities),i=new cn(n,e.contributions,t),a=new kn(n),o=new pn(n,t);return{configure:function(u){n.clearExternalSchemas(),u.schemas&&u.schemas.forEach(function(c){n.registerExternalSchema(c.uri,c.fileMatch,c.schema)}),o.configure(u)},resetSchema:function(u){return n.onResourceChange(u)},doValidation:o.doValidation.bind(o),parseJSONDocument:function(u){return tn(u,{collectComments:!0})},newJSONDocument:function(u,c){return en(u,c)},doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findColorSymbols:function(u,c){return a.findDocumentColors(u,c).then(function(l){return l.map(function(s){return s.range})})},findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:i.doHover.bind(i),getFoldingRanges:wn,getSelectionRanges:xn,format:function(u,c,l){var s=void 0;if(c){var f=u.offsetAt(c.start),d=u.offsetAt(c.end)-f;s={offset:f,length:d}}var h={tabSize:l?l.tabSize:4,insertSpaces:l?l.insertSpaces:!0,eol:` `};return ue(u.getText(),s,h).map(function(m){return se.replace(q.create(u.positionAt(m.offset),u.positionAt(m.offset+m.length)),m.content)})}}}var Sn=monaco.Uri,Sr=monaco.Range,En=function(){function e(t,n,r){var i=this;this._languageId=t,this._worker=n,this._disposables=[],this._listener=Object.create(null);var a=function(u){var c=u.getModeId();if(c!==i._languageId)return;var l;i._listener[u.uri.toString()]=u.onDidChangeContent(function(){clearTimeout(l),l=setTimeout(function(){return i._doValidate(u.uri,c)},500)}),i._doValidate(u.uri,c)},o=function(u){monaco.editor.setModelMarkers(u,i._languageId,[]);var c=u.uri.toString(),l=i._listener[c];l&&(l.dispose(),delete i._listener[c])};this._disposables.push(monaco.editor.onDidCreateModel(a)),this._disposables.push(monaco.editor.onWillDisposeModel(function(u){o(u),i._resetSchema(u.uri)})),this._disposables.push(monaco.editor.onDidChangeModelLanguage(function(u){o(u.model),a(u.model),i._resetSchema(u.model.uri)})),this._disposables.push(r.onDidChange(function(u){monaco.editor.getModels().forEach(function(c){c.getModeId()===i._languageId&&(o(c),a(c))})})),this._disposables.push({dispose:function(){monaco.editor.getModels().forEach(o);for(var u in i._listener)i._listener[u].dispose()}}),monaco.editor.getModels().forEach(a)}return e.prototype.dispose=function(){this._disposables.forEach(function(t){return t&&t.dispose()}),this._disposables=[]},e.prototype._resetSchema=function(t){this._worker().then(function(n){n.resetSchema(t.toString())})},e.prototype._doValidate=function(t,n){this._worker(t).then(function(r){return r.doValidation(t.toString()).then(function(i){var a=i.map(function(u){return On(t,u)}),o=monaco.editor.getModel(t);o&&o.getModeId()===n&&monaco.editor.setModelMarkers(o,n,a)})}).then(void 0,function(r){console.error(r)})},e}();function An(e){switch(e){case U.Error:return monaco.MarkerSeverity.Error;case U.Warning:return monaco.MarkerSeverity.Warning;case U.Information:return monaco.MarkerSeverity.Info;case U.Hint:return monaco.MarkerSeverity.Hint;default:return monaco.MarkerSeverity.Info}}function On(e,t){var n=typeof t.code=="number"?String(t.code):t.code;return{severity:An(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:n,source:t.source}}function Mt(e){return e?{character:e.column-1,line:e.lineNumber-1}:void 0}function Er(e){return e?{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}:void 0}function be(e){return e?new Sr(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1):void 0}function In(e){var t=monaco.languages.CompletionItemKind;switch(e){case F.Text:return t.Text;case F.Method:return t.Method;case F.Function:return t.Function;case F.Constructor:return t.Constructor;case F.Field:return t.Field;case F.Variable:return t.Variable;case F.Class:return t.Class;case F.Interface:return t.Interface;case F.Module:return t.Module;case F.Property:return t.Property;case F.Unit:return t.Unit;case F.Value:return t.Value;case F.Enum:return t.Enum;case F.Keyword:return t.Keyword;case F.Snippet:return t.Snippet;case F.Color:return t.Color;case F.File:return t.File;case F.Reference:return t.Reference}return t.Property}function fi(e){var t=monaco.languages.CompletionItemKind;switch(e){case t.Text:return F.Text;case t.Method:return F.Method;case t.Function:return F.Function;case t.Constructor:return F.Constructor;case t.Field:return F.Field;case t.Variable:return F.Variable;case t.Class:return F.Class;case t.Interface:return F.Interface;case t.Module:return F.Module;case t.Property:return F.Property;case t.Unit:return F.Unit;case t.Value:return F.Value;case t.Enum:return F.Enum;case t.Keyword:return F.Keyword;case t.Snippet:return F.Snippet;case t.Color:return F.Color;case t.File:return F.File;case t.Reference:return F.Reference}return F.Property}function $e(e){return e?{range:be(e.range),text:e.newText}:void 0}var jn=function(){function e(t){this._worker=t}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return[" ",":"]},enumerable:!0,configurable:!0}),e.prototype.provideCompletionItems=function(t,n,r,i){var a=t.uri;return this._worker(a).then(function(o){return o.doComplete(a.toString(),Mt(n))}).then(function(o){if(!o)return;var u=t.getWordUntilPosition(n),c=new Sr(n.lineNumber,u.startColumn,n.lineNumber,u.endColumn),l=o.items.map(function(s){var f={label:s.label,insertText:s.insertText||s.label,sortText:s.sortText,filterText:s.filterText,documentation:s.documentation,detail:s.detail,range:c,kind:In(s.kind)};return s.textEdit&&(f.range=be(s.textEdit.range),f.insertText=s.textEdit.newText),s.additionalTextEdits&&(f.additionalTextEdits=s.additionalTextEdits.map($e)),s.insertTextFormat===Q.Snippet&&(f.insertTextRules=monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet),f});return{isIncomplete:o.isIncomplete,suggestions:l}})},e}();function Nn(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Ar(e){return typeof e=="string"?{value:e}:Nn(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function Ln(e){return e?Array.isArray(e)?e.map(Ar):[Ar(e)]:void 0}var Mn=function(){function e(t){this._worker=t}return e.prototype.provideHover=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.doHover(i.toString(),Mt(n))}).then(function(a){return a?{range:be(a.range),contents:Ln(a.contents)}:void 0})},e}();function hi(e){return{uri:Sn.parse(e.uri),range:be(e.range)}}function Pn(e){var t=monaco.languages.SymbolKind;switch(e){case J.File:return t.Array;case J.Module:return t.Module;case J.Namespace:return t.Namespace;case J.Package:return t.Package;case J.Class:return t.Class;case J.Method:return t.Method;case J.Property:return t.Property;case J.Field:return t.Field;case J.Constructor:return t.Constructor;case J.Enum:return t.Enum;case J.Interface:return t.Interface;case J.Function:return t.Function;case J.Variable:return t.Variable;case J.Constant:return t.Constant;case J.String:return t.String;case J.Number:return t.Number;case J.Boolean:return t.Boolean;case J.Array:return t.Array}return t.Function}var Fn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentSymbols=function(t,n){var r=t.uri;return this._worker(r).then(function(i){return i.findDocumentSymbols(r.toString())}).then(function(i){return i?i.map(function(a){return{name:a.name,detail:"",containerName:a.containerName,kind:Pn(a.kind),range:be(a.location.range),selectionRange:be(a.location.range),tags:[]}}):void 0})},e}();function Or(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var _n=function(){function e(t){this._worker=t}return e.prototype.provideDocumentFormattingEdits=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.format(i.toString(),null,Or(n)).then(function(o){return!o||o.length===0?void 0:o.map($e)})})},e}(),Dn=function(){function e(t){this._worker=t}return e.prototype.provideDocumentRangeFormattingEdits=function(t,n,r,i){var a=t.uri;return this._worker(a).then(function(o){return o.format(a.toString(),Er(n),Or(r)).then(function(u){return!u||u.length===0?void 0:u.map($e)})})},e}(),Un=function(){function e(t){this._worker=t}return e.prototype.provideDocumentColors=function(t,n){var r=t.uri;return this._worker(r).then(function(i){return i.findDocumentColors(r.toString())}).then(function(i){return i?i.map(function(a){return{color:a.color,range:be(a.range)}}):void 0})},e.prototype.provideColorPresentations=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.getColorPresentations(i.toString(),n.color,Er(n.range))}).then(function(a){return a?a.map(function(o){var u={label:o.label};return o.textEdit&&(u.textEdit=$e(o.textEdit)),o.additionalTextEdits&&(u.additionalTextEdits=o.additionalTextEdits.map($e)),u}):void 0})},e}(),Vn=function(){function e(t){this._worker=t}return e.prototype.provideFoldingRanges=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.getFoldingRanges(i.toString(),n)}).then(function(a){return a?a.map(function(o){var u={start:o.startLine+1,end:o.endLine+1};return typeof o.kind!="undefined"&&(u.kind=Rn(o.kind)),u}):void 0})},e}();function Rn(e){switch(e){case me.Comment:return monaco.languages.FoldingRangeKind.Comment;case me.Imports:return monaco.languages.FoldingRangeKind.Imports;case me.Region:return monaco.languages.FoldingRangeKind.Region}return}var Bn=function(){function e(t){this._worker=t}return e.prototype.provideSelectionRanges=function(t,n,r){var i=t.uri;return this._worker(i).then(function(a){return a.getSelectionRanges(i.toString(),n.map(Mt))}).then(function(a){return a?a.map(function(o){for(var u=[];o;)u.push({range:be(o.range)}),o=o.parent;return u}):void 0})},e}();function $n(e){return{getInitialState:function(){return new Nr(null,null,!1)},tokenize:function(t,n,r,i){return Xn(e,t,n,r,i)}}}var Ir="delimiter.bracket.json",jr="delimiter.array.json",Wn="delimiter.colon.json",Jn="delimiter.comma.json",qn="keyword.json",Hn="keyword.json",zn="string.value.json",Kn="number.json",Gn="string.key.json",Qn="comment.block.json",Zn="comment.line.json",Nr=function(){function e(t,n,r){this._state=t,this.scanError=n,this.lastWasColon=r}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon)},e.prototype.equals=function(t){return t===this?!0:!t||!(t instanceof e)?!1:this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(t){this._state=t},e}();function Xn(e,t,n,r,i){r===void 0&&(r=0);var a=0,o=!1;switch(n.scanError){case 2:t='"'+t,a=1;break;case 1:t="/*"+t,a=2;break}var u=w(t),c,l,s=n.lastWasColon;for(l={tokens:[],endState:n.clone()};;){var f=r+u.getPosition(),d="";if(c=u.scan(),c===17)break;if(f===r+u.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(u.getPosition(),3));o&&(f-=a),o=a>0;switch(c){case 1:d=Ir,s=!1;break;case 2:d=Ir,s=!1;break;case 3:d=jr,s=!1;break;case 4:d=jr,s=!1;break;case 6:d=Wn,s=!0;break;case 5:d=Jn,s=!1;break;case 8:case 9:d=qn,s=!1;break;case 7:d=Hn,s=!1;break;case 10:d=s?zn:Gn,s=!1;break;case 11:d=Kn,s=!1;break}if(e)switch(c){case 12:d=Zn;break;case 13:d=Qn;break}l.endState=new Nr(n.getStateData(),u.getTokenError(),s),l.tokens.push({startIndex:f,scopes:d})}return l}function Yn(e){var t=[],n=[],r=new ft(e);t.push(r);var i=function(){for(var u=[],c=0;c=0}function Te(w){return 55296<=w&&w<=56319}function ht(w){return 56320<=w&&w<=57343}function He(w){return w>=97&&w<=102}function dt(w){return w>=97&&w<=122}function pt(w){return w>=65&&w<=90}function Pe(w){return dt(w)||pt(w)}var we=/^\w[\w\d+.-]*$/,mt=/^\//,gt=/^\/\//;function ze(w,C){if(!w.scheme&&C)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+w.authority+'", path: "'+w.path+'", query: "'+w.query+'", fragment: "'+w.fragment+'"}');if(w.scheme&&!we.test(w.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(w.path){if(w.authority){if(!mt.test(w.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(gt.test(w.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Fe(w,C){return!w&&!C?"file":w}function Ke(w,C){switch(w){case"https":case"http":case"file":C?C[0]!==ee&&(C=ee+C):C=ee;break}return C}var B="",ee="/",Ge=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,xe=function(){function w(C,j,M,W,V,$){$===void 0&&($=!1),typeof C=="object"?(this.scheme=C.scheme||B,this.authority=C.authority||B,this.path=C.path||B,this.query=C.query||B,this.fragment=C.fragment||B):(this.scheme=Fe(C,$),this.authority=j||B,this.path=Ke(this.scheme,M||B),this.query=W||B,this.fragment=V||B,ze(this,$))}return w.isUri=function(C){return C instanceof w?!0:C?typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="function"&&typeof C.with=="function"&&typeof C.toString=="function":!1},Object.defineProperty(w.prototype,"fsPath",{get:function(){return je(this)},enumerable:!0,configurable:!0}),w.prototype.with=function(C){if(!C)return this;var j=C.scheme,M=C.authority,W=C.path,V=C.query,$=C.fragment;return j===void 0?j=this.scheme:j===null&&(j=B),M===void 0?M=this.authority:M===null&&(M=B),W===void 0?W=this.path:W===null&&(W=B),V===void 0?V=this.query:V===null&&(V=B),$===void 0?$=this.fragment:$===null&&($=B),j===this.scheme&&M===this.authority&&W===this.path&&V===this.query&&$===this.fragment?this:new le(j,M,W,V,$)},w.parse=function(C,j){j===void 0&&(j=!1);var M=Ge.exec(C);return M?new le(M[2]||B,decodeURIComponent(M[4]||B),decodeURIComponent(M[5]||B),decodeURIComponent(M[7]||B),decodeURIComponent(M[9]||B),j):new le(B,B,B,B,B)},w.file=function(C){var j=B;if(ce&&(C=C.replace(/\\/g,ee)),C[0]===ee&&C[1]===ee){var M=C.indexOf(ee,2);M===-1?(j=C.substring(2),C=ee):(j=C.substring(2,M),C=C.substring(M)||ee)}return new le("file",j,C,B,B)},w.from=function(C){return new le(C.scheme,C.authority,C.path,C.query,C.fragment)},w.prototype.toString=function(C){return C===void 0&&(C=!1),Ze(this,C)},w.prototype.toJSON=function(){return this},w.revive=function(C){if(C){if(C instanceof w)return C;var j=new le(C);return j._formatted=C.external,j._fsPath=C._sep===Qe?C.fsPath:null,j}else return C},w}(),Qe=ce?1:void 0,le=function(w){ft(C,w);function C(){var j=w!==null&&w.apply(this,arguments)||this;return j._formatted=null,j._fsPath=null,j}return Object.defineProperty(C.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=je(this)),this._fsPath},enumerable:!0,configurable:!0}),C.prototype.toString=function(j){return j===void 0&&(j=!1),j?Ze(this,!0):(this._formatted||(this._formatted=Ze(this,!1)),this._formatted)},C.prototype.toJSON=function(){var j={$mid:1};return this._fsPath&&(j.fsPath=this._fsPath,j._sep=Qe),this._formatted&&(j.external=this._formatted),this.path&&(j.path=this.path),this.scheme&&(j.scheme=this.scheme),this.authority&&(j.authority=this.authority),this.query&&(j.query=this.query),this.fragment&&(j.fragment=this.fragment),j},C}(xe),vt=(H={},H[58]="%3A",H[47]="%2F",H[63]="%3F",H[35]="%23",H[91]="%5B",H[93]="%5D",H[64]="%40",H[33]="%21",H[36]="%24",H[38]="%26",H[39]="%27",H[40]="%28",H[41]="%29",H[42]="%2A",H[43]="%2B",H[44]="%2C",H[59]="%3B",H[61]="%3D",H[32]="%20",H);function _e(w,C){for(var j=void 0,M=-1,W=0;W=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===45||V===46||V===95||V===126||C&&V===47)M!==-1&&(j+=encodeURIComponent(w.substring(M,W)),M=-1),j!==void 0&&(j+=w.charAt(W));else{j===void 0&&(j=w.substr(0,W));var $=vt[V];$!==void 0?(M!==-1&&(j+=encodeURIComponent(w.substring(M,W)),M=-1),j+=$):M===-1&&(M=W)}}return M!==-1&&(j+=encodeURIComponent(w.substring(M))),j!==void 0?j:w}function pe(w){for(var C=void 0,j=0;j1&&w.scheme==="file"?C="//"+w.authority+w.path:w.path.charCodeAt(0)===47&&(w.path.charCodeAt(1)>=65&&w.path.charCodeAt(1)<=90||w.path.charCodeAt(1)>=97&&w.path.charCodeAt(1)<=122)&&w.path.charCodeAt(2)===58?C=w.path[1].toLowerCase()+w.path.substr(2):C=w.path,ce&&(C=C.replace(/\//g,"\\")),C}function Ze(w,C){var j=C?pe:_e,M="",W=w.scheme,V=w.authority,$=w.path,Xe=w.query,Ye=w.fragment;if(W&&(M+=W,M+=":"),(V||W==="file")&&(M+=ee,M+=ee),V){var ne=V.indexOf("@");if(ne!==-1){var De=V.substr(0,ne);V=V.substr(ne+1),ne=De.indexOf(":"),ne===-1?M+=j(De,!1):(M+=j(De.substr(0,ne),!1),M+=":",M+=j(De.substr(ne+1),!1)),M+="@"}V=V.toLowerCase(),ne=V.indexOf(":"),ne===-1?M+=j(V,!1):(M+=j(V.substr(0,ne),!1),M+=V.substr(ne))}if($){if($.length>=3&&$.charCodeAt(0)===47&&$.charCodeAt(2)===58){var ue=$.charCodeAt(1);ue>=65&&ue<=90&&($="/"+String.fromCharCode(ue+32)+":"+$.substr(3))}else if($.length>=2&&$.charCodeAt(1)===58){var ue=$.charCodeAt(0);ue>=65&&ue<=90&&($=String.fromCharCode(ue+32)+":"+$.substr(2))}M+=j($,!0)}return Xe&&(M+="?",M+=j(Xe,!1)),Ye&&(M+="#",M+=C?Ye:_e(Ye,!1)),M}}).call(this,Ie("Q2Ig"))}}]);