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