You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/316.36773168.async.js

32 lines
141 KiB

(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<arguments.length;r++)i[r]=arguments[r];var n;return this._getClient().then(function(a){n=a}).then(function(a){return t._worker.withSyncedResources(i)}).then(function(a){return n})},e}();function Ye(e,t){t===void 0&&(t=!1);var i=e.length,r=0,n="",a=0,o=16,u=0,s=0,f=0,c=0,l=0;function h(y,I){for(var N=0,M=0;N<y||!I;){var w=e.charCodeAt(r);if(w>=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<y&&(M=-1),M}function d(y){r=y,n="",a=0,o=16,l=0}function p(){var y=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&me(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&me(e.charCodeAt(r)))for(r++;r<e.length&&me(e.charCodeAt(r));)r++;else return l=3,e.substring(y,r);var I=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&me(e.charCodeAt(r))){for(r++;r<e.length&&me(e.charCodeAt(r));)r++;I=r}else l=3;return e.substring(y,I)}function k(){for(var y="",I=r;;){if(r>=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<i&&!Se(e.charCodeAt(r));)r++;return n=e.substring(I,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;for(var N=i-1,M=!1;r<N;){var w=e.charCodeAt(r);if(w===42&&e.charCodeAt(r+1)===47){r+=2,M=!0;break}r++,Se(w)&&(w===13&&e.charCodeAt(r)===10&&r++,u++,f=r)}return M||(r++,l=1),n=e.substring(I,r),o=13}return n+=String.fromCharCode(y),r++,o=16;case 45:if(n+=String.fromCharCode(y),r++,r===i||!me(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=p(),o=11;default:for(;r<i&&T(y);)r++,y=e.charCodeAt(r);if(a!==r){n=e.substring(a,r);switch(n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(y),r++,o=16}}function T(y){if(et(y)||Se(y))return!1;switch(y){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function m(){var y;do y=g();while(y>=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;s<e.length&&!A(e,s);)s++;n=e.substring(a,s),r=ke(n,i)}else n=e,r=0,a=0,o=0,u=e.length;var f=ve(i,e),c=!1,l=0,h;i.insertSpaces?h=ne(" ",i.tabSize||4):h=" ";var d=Ye(n,!1),p=!1;function k(){return f+ne(h,r+l)}function g(){var P=d.scan();for(c=!1;P===15||P===14;)c=c||P===14,P=d.scan();return p=P===16||d.getTokenError()!==0,P}var T=[];function m(P,R,q){!p&&(!t||R<u&&q>o)&&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;r<t;r++)i+=e;return i}function ke(e,t){for(var i=0,r=0,n=t.tabSize||4;i<e.length;){var a=e.charAt(i);if(a===" ")r++;else if(a===" ")r+=n;else break;i++}return Math.floor(r/n)}function ve(e,t){for(var i=0;i<t.length;i++){var r=t.charAt(i);if(r==="\r")return i+1<t.length&&t.charAt(i+1)===`
`?`\r
`:"\r";if(r===`
`)return`
`}return e&&e.eol||`
`}function A(e,t){return`\r
`.indexOf(e.charAt(t))!==-1}var L;(function(e){e.DEFAULT={allowTrailingComma:!1}})(L||(L={}));function j(e,t){var i=[],r=new Object,n=void 0,a={value:{},offset:0,length:0,type:"object",parent:void 0},o=!1;function u(s,f,c,l){a.value=s,a.offset=f,a.length=c,a.type=l,a.colonOffset=void 0,n=a}try{de(e,{onObjectBegin:function(s,f){if(t<=s)throw r;n=void 0,o=t>s,i.push("")},onObjectProperty:function(s,f,c){if(t<f)throw r;if(u(s,f,c,"property"),i[i.length-1]=s,t<=f+c)throw r},onObjectEnd:function(s,f){if(t<=s)throw r;n=void 0,i.pop()},onArrayBegin:function(s,f){if(t<=s)throw r;n=void 0,i.push(0)},onArrayEnd:function(s,f){if(t<=s)throw r;n=void 0,i.pop()},onLiteralValue:function(s,f,c){if(t<f)throw r;if(u(s,f,c,Oe(s)),t<=f+c)throw r},onSeparator:function(s,f,c){if(t<=f)throw r;if(s===":"&&n&&n.type==="property")n.colonOffset=f,o=!1,n=void 0;else if(s===","){var l=i[i.length-1];typeof l=="number"?i[i.length-1]=l+1:(o=!0,i[i.length-1]=""),n=void 0}}})}catch(s){if(s!==r)throw s}return{path:i,previousNode:n,isAtPropertyKey:o,matches:function(s){for(var f=0,c=0;f<s.length&&c<i.length;c++)if(s[f]===i[c]||s[f]==="*")f++;else if(s[f]!=="**")return!1;return f===s.length}}}function _(e,t,i){t===void 0&&(t=[]),i===void 0&&(i=L.DEFAULT);var r=null,n=[],a=[];function o(s){Array.isArray(n)?n.push(s):r!==null&&(n[r]=s)}var u={onObjectBegin:function(){var s={};o(s),a.push(n),n=s,r=null},onObjectProperty:function(s){r=s},onObjectEnd:function(){n=a.pop()},onArrayBegin:function(){var s=[];o(s),a.push(n),n=s,r=null},onArrayEnd:function(){n=a.pop()},onLiteralValue:o,onError:function(s,f,c){t.push({error:s,offset:f,length:c})}};return de(e,u,i),n[0]}function W(e,t,i){t===void 0&&(t=[]),i===void 0&&(i=L.DEFAULT);var r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function n(s){r.type==="property"&&(r.length=s-r.offset,r=r.parent)}function a(s){return r.children.push(s),s}var o={onObjectBegin:function(s){r=a({type:"object",offset:s,length:-1,parent:r,children:[]})},onObjectProperty:function(s,f,c){r=a({type:"property",offset:f,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:s,offset:f,length:c,parent:r})},onObjectEnd:function(s,f){n(s+f),r.length=s+f-r.offset,r=r.parent,n(s+f)},onArrayBegin:function(s,f){r=a({type:"array",offset:s,length:-1,parent:r,children:[]})},onArrayEnd:function(s,f){r.length=s+f-r.offset,r=r.parent,n(s+f)},onLiteralValue:function(s,f,c){a({type:Oe(s),offset:f,length:c,parent:r,value:s}),n(f+c)},onSeparator:function(s,f,c){r.type==="property"&&(s===":"?r.colonOffset=f:s===","&&n(f))},onError:function(s,f,c){t.push({error:s,offset:f,length:c})}};de(e,o,i);var u=r.children[0];return u&&delete u.parent,u}function B(e,t){if(!e)return;for(var i=e,r=0,n=t;r<n.length;r++){var a=n[r];if(typeof a=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var o=!1,u=0,s=i.children;u<s.length;u++){var f=s[u];if(Array.isArray(f.children)&&f.children[0].value===a){i=f.children[1],o=!0;break}}if(!o)return}else{var c=a;if(i.type!=="array"||c<0||!Array.isArray(i.children)||c>=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<r.length;i++){var n=r[i],a=n.children[1];a&&(t[n.children[0].value]=V(a))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Z(e,t,i){return i===void 0&&(i=!1),t>=e.offset&&t<e.offset+e.length||i&&t===e.offset+e.length}function Y(e,t,i){if(i===void 0&&(i=!1),Z(e,t,i)){var r=e.children;if(Array.isArray(r))for(var n=0;n<r.length&&r[n].offset<=t;n++){var a=Y(r[n],t,i);if(a)return a}return e}return}function de(e,t,i){i===void 0&&(i=L.DEFAULT);var r=Ye(e,!1);function n(b){return b?function(){return b(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function a(b){return b?function(x){return b(x,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var o=n(t.onObjectBegin),u=a(t.onObjectProperty),s=n(t.onObjectEnd),f=n(t.onArrayBegin),c=n(t.onArrayEnd),l=a(t.onLiteralValue),h=a(t.onSeparator),d=n(t.onComment),p=a(t.onError),k=i&&i.disallowComments,g=i&&i.allowTrailingComma;function T(){for(;;){var b=r.scan();switch(r.getTokenError()){case 4:m(14);break;case 5:m(15);break;case 3:m(13);break;case 1:k||m(11);break;case 2:m(12);break;case 6:m(16);break}switch(b){case 12:case 13:k?m(10):d();break;case 16:m(1);break;case 15:case 14:break;default:return b}}}function m(b,x,D){if(x===void 0&&(x=[]),D===void 0&&(D=[]),p(b),x.length+D.length>0)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<r.length&&!A(r,a);)a++}for(var o=ce(r,{offset:n,length:a-n},i.formattingOptions),u=o.length-1;u>=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"<unknown ParseErrorCode>"}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;i<e.length;i++)if(!ie(e[i],t[i]))return!1}else{var n=[];for(r in e)n.push(r);n.sort();var a=[];for(r in t)a.push(r);if(a.sort(),!ie(n,a))return!1;for(i=0;i<n.length;i++)if(!ie(e[n[i]],t[n[i]]))return!1}return!0}function te(e){return typeof e=="number"}function ue(e){return typeof e!="undefined"}function ge(e){return typeof e=="boolean"}function Pe(e){return typeof e=="string"}function er(e,t){if(e.length<t.length)return!1;for(var i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0}function rt(e,t){var i=e.length-t.length;return i>0?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;o<arguments.length;o++)a[o-2]=arguments[o];var u={title:r,command:n};return v.defined(a)&&a.length>0&&(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<arguments.length;a++)n[a-2]=arguments[a];var o={label:i};return v.defined(r)&&(o.documentation=r),v.defined(n)?o.parameters=n:o.parameters=[],o}e.create=t})(yr||(yr={}));var br;(function(e){e.Text=1,e.Read=2,e.Write=3})(br||(br={}));var kr;(function(e){function t(i,r){var n={range:i};return v.number(r)&&(n.kind=r),n}e.create=t})(kr||(kr={}));var re;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(re||(re={}));var Tr;(function(e){e.Deprecated=1})(Tr||(Tr={}));var Cr;(function(e){function t(i,r,n,a,o){var u={name:i,kind:r,location:{uri:a,range:n}};return o&&(u.containerName=o),u}e.create=t})(Cr||(Cr={}));var wr;(function(e){function t(r,n,a,o,u,s){var f={name:r,detail:n,kind:a,range:o,selectionRange:u};return s!==void 0&&(f.children=s),f}e.create=t;function i(r){var n=r;return n&&v.string(n.name)&&v.number(n.kind)&&ee.is(n.range)&&ee.is(n.selectionRange)&&(n.detail===void 0||v.string(n.detail))&&(n.deprecated===void 0||v.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}e.is=i})(wr||(wr={}));var xr;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(xr||(xr={}));var Ar;(function(e){function t(r,n){var a={diagnostics:r};return n!=null&&(a.only=n),a}e.create=t;function i(r){var n=r;return v.defined(n)&&v.typedArray(n.diagnostics,Ne.is)&&(n.only===void 0||v.typedArray(n.only,v.string))}e.is=i})(Ar||(Ar={}));var Er;(function(e){function t(r,n,a){var o={title:r},u=!0;return typeof n=="string"?(u=!1,o.kind=n):it.is(n)?o.command=n:o.edit=n,u&&a!==void 0&&(o.kind=a),o}e.create=t;function i(r){var n=r;return n&&v.string(n.title)&&(n.diagnostics===void 0||v.typedArray(n.diagnostics,Ne.is))&&(n.kind===void 0||v.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||it.is(n.command))&&(n.isPreferred===void 0||v.boolean(n.isPreferred))&&(n.edit===void 0||Pt.is(n.edit))}e.is=i})(Er||(Er={}));var Sr;(function(e){function t(r,n){var a={range:r};return v.defined(n)&&(a.data=n),a}e.create=t;function i(r){var n=r;return v.defined(n)&&ee.is(n.range)&&(v.undefined(n.command)||it.is(n.command))}e.is=i})(Sr||(Sr={}));var Or;(function(e){function t(r,n){return{tabSize:r,insertSpaces:n}}e.create=t;function i(r){var n=r;return v.defined(n)&&v.uinteger(n.tabSize)&&v.boolean(n.insertSpaces)}e.is=i})(Or||(Or={}));var jr;(function(e){function t(r,n,a){return{range:r,target:n,data:a}}e.create=t;function i(r){var n=r;return v.defined(n)&&ee.is(n.range)&&(v.undefined(n.target)||v.string(n.target))}e.is=i})(jr||(jr={}));var wt;(function(e){function t(r,n){return{range:r,parent:n}}e.create=t;function i(r){var n=r;return n!==void 0&&ee.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=i})(wt||(wt={}));var Pi=[`
`,`\r
`,"\r"],Ir;(function(e){function t(a,o,u,s){return new un(a,o,u,s)}e.create=t;function i(a){var o=a;return!!(v.defined(o)&&v.string(o.uri)&&(v.undefined(o.languageId)||v.string(o.languageId))&&v.uinteger(o.lineCount)&&v.func(o.getText)&&v.func(o.positionAt)&&v.func(o.offsetAt))}e.is=i;function r(a,o){for(var u=a.getText(),s=n(o,function(p,k){var g=p.range.start.line-k.range.start.line;return g===0?p.range.start.character-k.range.start.character:g}),f=u.length,c=s.length-1;c>=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;c<s.length&&l<f.length;){var d=o(s[c],f[l]);d<=0?a[h++]=s[c++]:a[h++]=f[l++]}for(;c<s.length;)a[h++]=s[c++];for(;l<f.length;)a[h++]=f[l++];return a}})(Ir||(Ir={}));var un=function(){function e(t,i,r,n){this._uri=t,this._languageId=i,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var i=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(i,r)}return this._content},e.prototype.update=function(t,i){this._content=t.text,this._version=i,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],i=this._content,r=!0,n=0;n<i.length;n++){r&&(t.push(n),r=!1);var a=i.charAt(n);r=a==="\r"||a===`
`,a==="\r"&&n+1<i.length&&i.charAt(n+1)===`
`&&n++}r&&i.length>0&&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(;r<n;){var a=Math.floor((r+n)/2);i[a]>t?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+1<i.length?i[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,n),r)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),v;(function(e){var t=Object.prototype.toString;function i(d){return typeof d!="undefined"}e.defined=i;function r(d){return typeof d=="undefined"}e.undefined=r;function n(d){return d===!0||d===!1}e.boolean=n;function a(d){return t.call(d)==="[object String]"}e.string=a;function o(d){return t.call(d)==="[object Number]"}e.number=o;function u(d,p,k){return t.call(d)==="[object Number]"&&p<=d&&d<=k}e.numberRange=u;function s(d){return t.call(d)==="[object Number]"&&-2147483648<=d&&d<=2147483647}e.integer=s;function f(d){return t.call(d)==="[object Number]"&&0<=d&&d<=2147483647}e.uinteger=f;function c(d){return t.call(d)==="[object Function]"}e.func=c;function l(d){return d!==null&&typeof d=="object"}e.objectLiteral=l;function h(d,p){return Array.isArray(d)&&d.every(p)}e.typedArray=h})(v||(v={}));var cn=function(e,t,i){if(i||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Nr=function(){function e(t,i,r,n){this._uri=t,this._languageId=i,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var i=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(i,r)}return this._content},e.prototype.update=function(t,i){for(var r=0,n=t;r<n.length;r++){var a=n[r];if(e.isIncremental(a)){var o=Pr(a.range),u=this.offsetAt(o.start),s=this.offsetAt(o.end);this._content=this._content.substring(0,u)+a.text+this._content.substring(s,this._content.length);var f=Math.max(o.start.line,0),c=Math.max(o.end.line,0),l=this._lineOffsets,h=Mr(a.text,!1,u);if(c-f===h.length)for(var d=0,p=h.length;d<p;d++)l[d+f+1]=h[d];else h.length<1e4?l.splice.apply(l,cn([f+1,c-f],h,!1)):this._lineOffsets=l=l.slice(0,f+1).concat(h,l.slice(c+1));var k=a.text.length-(s-u);if(k!==0)for(var d=f+1+h.length,p=l.length;d<p;d++)l[d]=l[d]+k}else if(e.isFull(a))this._content=a.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Mr(this._content,!0)),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{line:0,character:t};for(;r<n;){var a=Math.floor((r+n)/2);i[a]>t?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+1<i.length?i[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,n),r)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(t){var i=t;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},e.isFull=function(t){var i=t;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},e}(),Lr;(function(e){function t(n,a,o,u){return new Nr(n,a,o,u)}e.create=t;function i(n,a,o){if(n instanceof Nr)return n.update(a,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=i;function r(n,a){for(var o=n.getText(),u=Vt(a.map(ln),function(p,k){var g=p.range.start.line-k.range.start.line;return g===0?p.range.start.character-k.range.start.character:g}),s=0,f=[],c=0,l=u;c<l.length;c++){var h=l[c],d=n.offsetAt(h.range.start);if(d<s)throw new Error("Overlapping edit");d>s&&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;a<r.length&&o<n.length;){var s=t(r[a],n[o]);s<=0?e[u++]=r[a++]:e[u++]=n[o++]}for(;a<r.length;)e[u++]=r[a++];for(;o<n.length;)e[u++]=n[o++];return e}function Mr(e,t,i){i===void 0&&(i=0);for(var r=t?[i]:[],n=0;n<e.length;n++){var a=e.charCodeAt(n);(a===13||a===10)&&(a===13&&n+1<e.length&&e.charCodeAt(n+1)===10&&n++,r.push(i+n+1))}return r}function Pr(e){var t=e.start,i=e.end;return t.line>i.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<arguments.length;r++)i[r-2]=arguments[r];return fn(t,i)}function Qe(e){return hn}function Fi(e){return Qe}var We=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},e(t,i)};return function(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function r(){this.constructor=t}t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),U=Qe(),dn={"color-hex":{errorMessage:U("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:U("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:U("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:U("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:U("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-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<r.length;i++){var n=r[i];this.merge(n)}},e.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},e.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var i=0,r=this.problems;i<r.length;i++){var n=r[i];n.code===G.EnumValueMismatch&&(n.message=U("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(a){return JSON.stringify(a)}).join(", ")))}}},e.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(t){var i=this.hasProblems();return i!==t.hasProblems()?i?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},e}();function kn(e,t){return t===void 0&&(t=[]),new Ur(e,t,[])}function Ve(e){return O(e)}function Rt(e){return Ie(e)}function _r(e,t,i){return i===void 0&&(i=!1),t>=e.offset&&t<e.offset+e.length||i&&t===e.offset+e.length}var Ur=function(){function e(t,i,r){i===void 0&&(i=[]),r===void 0&&(r=[]),this.root=t,this.syntaxErrors=i,this.comments=r}return e.prototype.getNodeFromOffset=function(t,i){return i===void 0&&(i=!1),this.root?mt(this.root,t,i):void 0},e.prototype.visit=function(t){if(this.root){var i=function(r){var n=t(r),a=r.children;if(Array.isArray(a))for(var o=0;o<a.length&&n;o++)n=i(a[o]);return n};i(this.root)}},e.prototype.validate=function(t,i,r){if(r===void 0&&(r=fe.Warning),this.root&&i){var n=new be;return he(this.root,i,n,Ut.instance),n.problems.map(function(a){var o,u=ee.create(t.positionAt(a.location.offset),t.positionAt(a.location.offset+a.location.length));return Ne.create(u,a.message,(o=a.severity)!==null&&o!==void 0?o:r,a.code)})}return},e.prototype.getMatchingSchemas=function(t,i,r){i===void 0&&(i=-1);var n=new bn(i,r);return this.root&&t&&he(this.root,t,new be,n),n.schemas},e}();function he(e,t,i,r){if(!e||!r.include(e))return;var n=e;switch(n.type){case"object":f(n,t,i,r);break;case"array":s(n,t,i,r);break;case"string":u(n,t,i,r);break;case"number":o(n,t,i,r);break;case"property":return he(n.valueNode,t,i,r)}a(),r.add({node:n,schema:t});function a(){function c(R){return n.type===R||R==="integer"&&n.type==="number"&&n.isInteger}if(Array.isArray(t.type)?t.type.some(c)||i.problems.push({location:{offset:n.offset,length:n.length},message:t.errorMessage||U("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(c(t.type)||i.problems.push({location:{offset:n.offset,length:n.length},message:t.errorMessage||U("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var l=0,h=t.allOf;l<h.length;l++){var d=h[l];he(n,ye(d),i,r)}var p=ye(t.not);if(p){var k=new be,g=r.newSub();he(n,p,k,g),k.hasProblems()||i.problems.push({location:{offset:n.offset,length:n.length},message:U("notSchemaWarning","Matches a schema that is not allowed.")});for(var T=0,m=g.schemas;T<m.length;T++){var y=m[T];y.inverted=!y.inverted,r.add(y)}}var I=function(R,q){for(var le=[],ae=void 0,Me=0,ze=R;Me<ze.length;Me++){var ft=ze[Me],He=ye(ft),Te=new be,Be=r.newSub();if(he(n,He,Te,Be),Te.hasProblems()||le.push(He),!ae)ae={schema:He,validationResult:Te,matchingSchemas:Be};else if(!q&&!Te.hasProblems()&&!ae.validationResult.hasProblems())ae.matchingSchemas.merge(Be),ae.validationResult.propertiesMatches+=Te.propertiesMatches,ae.validationResult.propertiesValueMatches+=Te.propertiesValueMatches;else{var Ze=Te.compare(ae.validationResult);Ze>0?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<D.length;x++){var P=D[x];if(ie(S,P)){b=!0;break}}i.enumValues=t.enum,i.enumValueMatch=b,b||i.problems.push({location:{offset:n.offset,length:n.length},code:G.EnumValueMismatch,message:t.errorMessage||U("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(R){return JSON.stringify(R)}).join(", "))})}if(ue(t.const)){var S=Ve(n);ie(S,t.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:n.offset,length:n.length},code:G.EnumValueMismatch,message:t.errorMessage||U("constWarning","Value must be {0}.",JSON.stringify(t.const))}),i.enumValueMatch=!1),i.enumValues=[t.const]}t.deprecationMessage&&n.parent&&i.problems.push({location:{offset:n.parent.offset,length:n.parent.length},severity:fe.Warning,message:t.deprecationMessage,code:G.Deprecated})}function o(c,l,h,d){var p=c.value;function k(x){var D,P=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(x.toString());return P&&{value:Number(P[1]+(P[2]||"")),multiplier:(((D=P[2])===null||D===void 0?void 0:D.length)||0)-(parseInt(P[3])||0)}}if(te(l.multipleOf)){var g=-1;if(Number.isInteger(l.multipleOf))g=p%l.multipleOf;else{var T=k(l.multipleOf),m=k(p);if(T&&m){var y=Math.pow(10,Math.abs(m.multiplier-T.multiplier));m.multiplier<T.multiplier?m.value*=y:T.value*=y,g=m.value%T.value}}g!==0&&h.problems.push({location:{offset:c.offset,length:c.length},message:U("multipleOfWarning","Value is not divisible by {0}.",l.multipleOf)})}function I(x,D){return te(D)?D:ge(D)&&D?x:void 0}function N(x,D){return!ge(D)||!D?x:void 0}var M=I(l.minimum,l.exclusiveMinimum);te(M)&&p<=M&&h.problems.push({location:{offset:c.offset,length:c.length},message:U("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",M)});var w=I(l.maximum,l.exclusiveMaximum);te(w)&&p>=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)&&p<S&&h.problems.push({location:{offset:c.offset,length:c.length},message:U("minimumWarning","Value is below the minimum of {0}.",S)});var b=N(l.maximum,l.exclusiveMaximum);te(b)&&p>b&&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.length<l.minLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:U("minLengthWarning","String is shorter than the minimum length of {0}.",l.minLength)}),te(l.maxLength)&&c.value.length>l.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;k++){var g=p[k],T=ye(g),m=new be,y=c.items[k];y?(he(y,T,m,d),h.mergePropertyMatch(m)):c.items.length>=p.length&&h.propertiesValueMatches++}if(c.items.length>p.length)if(typeof l.additionalItems=="object")for(var I=p.length;I<c.items.length;I++){var m=new be;he(c.items[I],l.additionalItems,m,d),h.mergePropertyMatch(m)}else l.additionalItems===!1&&h.problems.push({location:{offset:c.offset,length:c.length},message:U("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",p.length)})}else{var N=ye(l.items);if(N)for(var M=0,w=c.items;M<w.length;M++){var y=w[M],m=new be;he(y,N,m,d),h.mergePropertyMatch(m)}}var S=ye(l.contains);if(S){var b=c.items.some(function(P){var R=new be;return he(P,S,R,Ut.instance),!R.hasProblems()});b||h.problems.push({location:{offset:c.offset,length:c.length},message:l.errorMessage||U("requiredItemMissingWarning","Array does not contain required item.")})}if(te(l.minItems)&&c.items.length<l.minItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:U("minItemsWarning","Array has too few items. Expected {0} or more.",l.minItems)}),te(l.maxItems)&&c.items.length>l.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<T.length;g++){var m=T[g],y=m.keyNode.value;p[y]=m.valueNode,k.push(y)}if(Array.isArray(l.required))for(var I=0,N=l.required;I<N.length;I++){var M=N[I];if(!p[M]){var w=c.parent&&c.parent.type==="property"&&c.parent.keyNode,S=w?{offset:w.offset,length:w.length}:{offset:c.offset,length:1};h.problems.push({location:S,message:U("MissingRequiredPropWarning",'Missing property "{0}".',M)})}}var b=function(on){for(var Yt=k.indexOf(on);Yt>=0;)k.splice(Yt,1),Yt=k.indexOf(on)};if(l.properties)for(var x=0,D=Object.keys(l.properties);x<D.length;x++){var M=D[x];b(M);var P=l.properties[M],R=p[M];if(R)if(ge(P))if(P)h.propertiesMatches++,h.propertiesValueMatches++;else{var m=R.parent;h.problems.push({location:{offset:m.keyNode.offset,length:m.keyNode.length},message:l.errorMessage||U("DisallowedExtraPropWarning","Property {0} is not allowed.",M)})}else{var q=new be;he(R,P,q,d),h.mergePropertyMatch(q)}}if(l.patternProperties)for(var le=0,ae=Object.keys(l.patternProperties);le<ae.length;le++)for(var Me=ae[le],ze=vt(Me),ft=0,He=k.slice(0);ft<He.length;ft++){var M=He[ft];if(ze.test(M)){b(M);var R=p[M];if(R){var P=l.patternProperties[Me];if(ge(P))if(P)h.propertiesMatches++,h.propertiesValueMatches++;else{var m=R.parent;h.problems.push({location:{offset:m.keyNode.offset,length:m.keyNode.length},message:l.errorMessage||U("DisallowedExtraPropWarning","Property {0} is not allowed.",M)})}else{var q=new be;he(R,P,q,d),h.mergePropertyMatch(q)}}}}if(typeof l.additionalProperties=="object")for(var Te=0,Be=k;Te<Be.length;Te++){var M=Be[Te],R=p[M];if(R){var q=new be;he(R,l.additionalProperties,q,d),h.mergePropertyMatch(q)}}else if(l.additionalProperties===!1&&k.length>0)for(var Ze=0,Yr=k;Ze<Yr.length;Ze++){var M=Yr[Ze],R=p[M];if(R){var m=R.parent;h.problems.push({location:{offset:m.keyNode.offset,length:m.keyNode.length},message:l.errorMessage||U("DisallowedExtraPropWarning","Property {0} is not allowed.",M)})}}if(te(l.maxProperties)&&(c.properties.length>l.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.length<l.minProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:U("MinPropWarning","Object has fewer properties than the required number of {0}",l.minProperties)})),l.dependencies)for(var Gt=0,en=Object.keys(l.dependencies);Gt<en.length;Gt++){var y=en[Gt],ji=p[y];if(ji){var Xt=l.dependencies[y];if(Array.isArray(Xt))for(var Qt=0,tn=Xt;Qt<tn.length;Qt++){var rn=tn[Qt];p[rn]?h.propertiesValueMatches++:h.problems.push({location:{offset:c.offset,length:c.length},message:U("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",rn,y)})}else{var P=ye(Xt);if(P){var q=new be;he(c,P,q,d),h.mergePropertyMatch(q)}}}}var nn=ye(l.propertyNames);if(nn)for(var Zt=0,an=c.properties;Zt<an.length;Zt++){var Ii=an[Zt],y=Ii.keyNode;y&&he(y,nn,h,Ut.instance)}}}function Tn(e,t){var i=[],r=-1,n=e.getText(),a=Ae(n,!1),o=t&&t.collectComments?[]:void 0;function u(){for(;;){var w=a.scan();l();switch(w){case 12:case 13:Array.isArray(o)&&o.push(ee.create(e.positionAt(a.getTokenOffset()),e.positionAt(a.getTokenOffset()+a.getTokenLength())));break;case 15:case 14:break;default:return w}}}function s(w){return a.getToken()===w?(u(),!0):!1}function f(w,S,b,x,D){if(D===void 0&&(D=fe.Error),i.length===0||b!==r){var P=ee.create(e.positionAt(b),e.positionAt(x));i.push(Ne.create(P,w,D,S,e.languageId)),r=b}}function c(w,S,b,x,D){b===void 0&&(b=void 0),x===void 0&&(x=[]),D===void 0&&(D=[]);var P=a.getTokenOffset(),R=a.getTokenOffset()+a.getTokenLength();if(P===R&&P>0){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<e.positionAt(a.getTokenOffset()).line)return b.length=x.length,b;var R=I(b);return R?(b.valueNode=R,b.length=R.offset+R.length-b.offset,b):c(U("ValueExpected","Value expected"),G.ValueExpected,b,[],[2,5])}function g(w){if(a.getToken()!==1)return;var S=new yn(w,a.getTokenOffset()),b=Object.create(null);u();for(var x=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){x||c(U("PropertyExpected","Property expected"),G.PropertyExpected);var D=a.getTokenOffset();if(u(),a.getToken()===2){x&&f(U("TrailingComma","Trailing comma"),G.TrailingComma,D,D+1);continue}}else x&&c(U("ExpectedComma","Expected comma"),G.CommaExpected);var P=k(S,b);P?S.properties.push(P):c(U("PropertyExpected","Property expected"),G.PropertyExpected,void 0,[],[2,5]),x=!0}return a.getToken()!==2?c(U("ExpectedCloseBrace","Expected comma or closing brace"),G.CommaOrCloseBraceExpected,S):h(S,!0)}function T(w){if(a.getToken()!==10)return;var S=new _t(w,a.getTokenOffset());return S.value=a.getTokenValue(),h(S,!0)}function m(w){if(a.getToken()!==11)return;var S=new mn(w,a.getTokenOffset());if(a.getTokenError()===0){var b=a.getTokenValue();try{var x=JSON.parse(b);if(!te(x))return c(U("InvalidNumberFormat","Invalid number format."),G.Undefined,S);S.value=x}catch(D){return c(U("InvalidNumberFormat","Invalid number format."),G.Undefined,S)}S.isInteger=b.indexOf(".")===-1}return h(S,!0)}function y(w){var S;switch(a.getToken()){case 7:return h(new pn(w,a.getTokenOffset()),!0);case 8:return h(new Dr(w,!0,a.getTokenOffset()),!0);case 9:return h(new Dr(w,!1,a.getTokenOffset()),!0);default:return}}function I(w){return d(w)||g(w)||T(w)||m(w)||y(w)}var N=void 0,M=u();return M!==17&&(N=I(N),N?a.getToken()!==17&&c(U("End of file expected","End of file expected."),G.Undefined):c(U("Invalid symbol","Expected a JSON object, array or literal."),G.Undefined)),new Ur(N,i,o)}function Bt(e,t,i){if(e!==null&&typeof e=="object"){var r=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var n=`[
`,a=0;a<e.length;a++)n+=r+Bt(e[a],r,i),a<e.length-1&&(n+=","),n+=`
`;return n+=t+"]",n}else{var o=Object.keys(e);if(o.length===0)return"{}";for(var n=`{
`,a=0;a<o.length;a++){var u=o[a];n+=r+JSON.stringify(u)+": "+Bt(e[u],r,i),a<o.length-1&&(n+=","),n+=`
`}return n+=t+"}",n}}return i(e)}var $t=Qe(),Cn=[",","}","]"],wn=[":"],xn=function(){function e(t,i,r,n){i===void 0&&(i=[]),r===void 0&&(r=Promise),n===void 0&&(n={}),this.schemaService=t,this.contributions=i,this.promiseConstructor=r,this.clientCapabilities=n}return e.prototype.doResolve=function(t){for(var i=this.contributions.length-1;i>=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<l.enum.length;d++){var p=void 0;l.markdownEnumDescriptions&&d<l.markdownEnumDescriptions.length?p=u.fromMarkup(l.markdownEnumDescriptions[d]):l.enumDescriptions&&d<l.enumDescriptions.length&&(p=l.enumDescriptions[d]),h(l.enum[d],p)}l.const&&h(l.const)}}})},e.prototype.getSchemaLessPropertyCompletions=function(t,i,r,n){var a=this,o=function(s){s.properties.forEach(function(f){var c=f.keyNode.value;n.add({kind:$.Property,label:c,insertText:a.getInsertTextForValue(c,""),insertTextFormat:oe.Snippet,filterText:a.getFilterTextForValue(c),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var u=i.parent.keyNode.value;t.visit(function(s){return s.type==="property"&&s!==i.parent&&s.keyNode.value===u&&s.valueNode&&s.valueNode.type==="object"&&o(s.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(s){s.type==="object"&&s!==i&&o(s)});else i.type==="object"&&n.add({kind:$.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:oe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,i,r,n,a){var o=this,u=r;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(u=i.offset+i.length,i=i.parent),!i){a.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:oe.Snippet,documentation:""}),a.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:oe.Snippet,documentation:""});return}var s=this.evaluateSeparatorAfter(n,u),f=function(d){d.parent&&!_r(d.parent,r,!0)&&a.add({kind:o.getSuggestionKind(d.type),label:o.getLabelTextForMatchingNode(d,n),insertText:o.getInsertTextForMatchingNode(d,n,s),insertTextFormat:oe.Snippet,documentation:""}),d.type==="boolean"&&o.addBooleanValueCompletion(!d.value,s,a)};if(i.type==="property"&&r>(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<k.length;p++){var g=k[p];if(g.node===r&&!g.inverted&&g.schema){if(r.type==="array"&&g.schema.items)if(Array.isArray(g.schema.items)){var T=this.findItemAtOffset(r,a,n);T<g.schema.items.length&&this.addSchemaValueCompletions(g.schema.items[T],h,o,u)}else this.addSchemaValueCompletions(g.schema.items,h,o,u);if(f!==void 0){var m=!1;if(g.schema.properties){var y=g.schema.properties[f];y&&(m=!0,this.addSchemaValueCompletions(y,h,o,u))}if(g.schema.patternProperties&&!m)for(var I=0,N=Object.keys(g.schema.patternProperties);I<N.length;I++){var M=N[I],w=vt(M);if(w.test(f)){m=!0;var y=g.schema.patternProperties[M];this.addSchemaValueCompletions(y,h,o,u)}}if(g.schema.additionalProperties&&!m){var y=g.schema.additionalProperties;this.addSchemaValueCompletions(y,h,o,u)}}}}f==="$schema"&&!r.parent&&this.addDollarSchemaCompletions(h,o),u.boolean&&(this.addBooleanValueCompletion(!0,h,o),this.addBooleanValueCompletion(!1,h,o)),u.null&&this.addNullValueCompletion(h,o)}},e.prototype.getContributedValueCompletions=function(t,i,r,n,a,o){if(!i)this.contributions.forEach(function(c){var l=c.collectDefaultCompletions(n.uri,a);l&&o.push(l)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i&&i.type==="property"&&r>(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;n<a;n++){var o=t.enum[n],u=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&n<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?u=this.fromMarkup(t.markdownEnumDescriptions[n]):t.enumDescriptions&&n<t.enumDescriptions.length&&(u=t.enumDescriptions[n]),r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,i),insertTextFormat:oe.Snippet,documentation:u})}},e.prototype.collectTypes=function(t,i){if(Array.isArray(t.enum)||ue(t.const))return;var r=t.type;Array.isArray(r)?r.forEach(function(n){return i[n]=!0}):r&&(i[r]=!0)},e.prototype.addFillerValueCompletions=function(t,i,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},i),insertTextFormat:oe.Snippet,detail:$t("defaults.object","New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],i),insertTextFormat:oe.Snippet,detail:$t("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(t,i,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,i),insertTextFormat:oe.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,i){i.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:oe.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,i){var r=this,n=this.schemaService.getRegisteredSchemaIds(function(a){return a==="http"||a==="https"});n.forEach(function(a){return i.add({kind:$.Module,label:r.getLabelForValue(a),filterText:r.getFilterTextForValue(a),insertText:r.getInsertTextForValue(a,t),insertTextFormat:oe.Snippet,documentation:""})})},e.prototype.getLabelForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForSnippetValue=function(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(t){var i=JSON.stringify(t);return i.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,i){var r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+i:r==="[]"?"[$1]"+i:this.getInsertTextForPlainText(r+i)},e.prototype.getInsertTextForSnippetValue=function(t,i){var r=function(n){return typeof n=="string"&&n[0]==="^"?n.substr(1):JSON.stringify(n)};return Bt(t,"",r)+i},e.prototype.getInsertTextForGuessedValue=function(t,i){switch(typeof t){case"object":return t===null?"${1:null}"+i:this.getInsertTextForValue(t,i);case"string":var r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+i;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+i}return this.getInsertTextForValue(t,i)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var i=t;t=i.length>0?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()<r;)a=n.scan();return(a===12||a===13)&&n.getTokenOffset()<=r},e.prototype.fromMarkup=function(t){return t&&this.doesSupportMarkdown()?{kind:Le.Markdown,value:t}:void 0},e.prototype.doesSupportMarkdown=function(){if(!ue(this.supportsMarkdown)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=t&&t.completionItem&&Array.isArray(t.completionItem.documentationFormat)&&t.completionItem.documentationFormat.indexOf(Le.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!ue(this.supportsCommitCharacters)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=t&&t.completionItem&&!!t.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),An=function(){function e(t,i,r){i===void 0&&(i=[]),this.schemaService=t,this.contributions=i,this.promise=r||Promise}return e.prototype.doHover=function(t,i,r){var n=t.offsetAt(i),a=r.getNodeFromOffset(n);if(!a||(a.type==="object"||a.type==="array")&&n>a.offset+1&&n<a.offset+a.length-1)return this.promise.resolve(null);var o=a;if(a.type==="string"){var u=a.parent;if(u&&u.type==="property"&&u.keyNode===a&&(a=u.valueNode,!a))return this.promise.resolve(null)}for(var s=ee.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length)),f=function(p){var k={contents:p,range:s};return k},c=Rt(a),l=this.contributions.length-1;l>=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;f<c;f++){s=i[f];switch(s){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+s;break;case"?":if(n){r+=".";break}case"[":case"]":if(n){r+=s;break}case"{":if(n){o=!0,r+="(";break}case"}":if(n){o=!1,r+=")";break}case",":if(o){r+="|";break}r+="\\"+s;break;case"*":for(var l=i[f-1],h=1;i[f+1]==="*";)h++,f++;var d=i[f+1];if(!a)r+=".*";else{var p=h>1&&(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;r<n.length;r++){var a=n[r],o=a[0]!==On;o||(a=a.substring(1)),a.length>0&&(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;r<n.length;r++){var a=n[r],o=a.regexp,u=a.include;o.test(t)&&(i=u)}return i},e.prototype.getURIs=function(){return this.uris},e}(),Nn=function(){function e(t,i,r){this.service=t,this.url=i,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new qe(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(i){return t.service.resolveSchemaContent(i,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),qe=function(){function e(t,i){i===void 0&&(i=[]),this.schema=t,this.errors=i}return e}(),Rr=function(){function e(t,i){i===void 0&&(i=[]),this.schema=t,this.errors=i}return e.prototype.getSection=function(t){var i=this.getSectionRecursive(t,this.schema);return i?ye(i):void 0},e.prototype.getSectionRecursive=function(t,i){if(!i||typeof i=="boolean"||t.length===0)return i;var r=t.shift();if(i.properties&&typeof i.properties[r])return this.getSectionRecursive(t,i.properties[r]);if(i.patternProperties)for(var n=0,a=Object.keys(i.patternProperties);n<a.length;n++){var o=a[n],u=vt(o);if(u.test(r))return this.getSectionRecursive(t,i.patternProperties[o])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(t,i.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(i.items)){var s=parseInt(r,10);if(!isNaN(s)&&i.items[s])return this.getSectionRecursive(t,i.items[s])}else if(i.items)return this.getSectionRecursive(t,i.items)}}return},e}(),Ln=function(){function e(t,i,r){this.contextService=i,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(i){var r=xt.a.parse(i).scheme;return r!=="schemaservice"&&(!t||t(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(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;u<a.length;u++){var s=a[u];s&&(s.url===o||s.dependencies[o])&&(s.url!==o&&n.push(s.url),s.clearSchema(),a[u]=void 0,r=!0)}return r},e.prototype.setSchemaContributions=function(t){if(t.schemas){var i=t.schemas;for(var r in i){var n=Ue(r);this.contributionSchemas[n]=this.addSchemaHandle(n,i[r])}}if(Array.isArray(t.schemaAssociations))for(var a=t.schemaAssociations,o=0,u=a;o<u.length;o++){var s=u[o],f=s.uris.map(Ue),c=this.addFilePatternAssociation(s.pattern,f);this.contributionAssociations.push(c)}},e.prototype.addSchemaHandle=function(t,i){var r=new Nn(this,t,i);return this.schemasById[t]=r,r},e.prototype.getOrAddSchemaHandle=function(t,i){return this.schemasById[t]||this.addSchemaHandle(t,i)},e.prototype.addFilePatternAssociation=function(t,i){var r=new In(t,i);return this.filePatternAssociations.push(r),r},e.prototype.registerExternalSchema=function(t,i,r){var n=Ue(t);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,i&&this.addFilePatternAssociation(i,[n]),r?this.addSchemaHandle(n,r):this.getOrAddSchemaHandle(n)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var i=0,r=this.contributionAssociations;i<r.length;i++){var n=r[i];this.filePatternAssociations.push(n)}},e.prototype.getResolvedSchema=function(t){var i=Ue(t),r=this.schemasById[i];return r?r.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var i=_e("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",At(t));return this.promise.resolve(new qe({},[i]))}return this.requestService(t).then(function(r){if(!r){var n=_e("json.schema.nocontent","Unable to load schema from '{0}': No content.",At(t));return new qe({},[n])}var a={},o=[];a=Ge(r,o);var u=o.length?[_e("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",At(t),o[0].offset)]:[];return new qe(a,u)},function(r){var n=r.toString(),a=r.toString().split("Error: ");return a.length>1&&(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;x<arguments.length;x++)b[x]=arguments[x];for(var D=0,P=b;D<P.length;D++){var R=P[D];typeof R=="object"&&T.push(R)}},N=function(){for(var b=[],x=0;x<arguments.length;x++)b[x]=arguments[x];for(var D=0,P=b;D<P.length;D++){var R=P[D];if(typeof R=="object")for(var q in R){var le=q,ae=R[le];typeof ae=="object"&&T.push(ae)}}},M=function(){for(var b=[],x=0;x<arguments.length;x++)b[x]=arguments[x];for(var D=0,P=b;D<P.length;D++){var R=P[D];if(Array.isArray(R))for(var q=0,le=R;q<le.length;q++){var ae=le[q];typeof ae=="object"&&T.push(ae)}}},w=function(b){for(var x=[];b.$ref;){var D=b.$ref,P=D.split("#",2);if(delete b.$ref,P[0].length>0){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;c<l.length;c++){var h=l[c];if(h.matchesPattern(f))for(var d=0,p=h.getURIs();d<p.length;d++){var k=p[d];u[k]||(s.push(k),u[k]=!0)}}var g=s.length>0?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<M.length;N++){var w=M[N];if(w.code===G.TrailingComma){if(typeof h!="number")continue;w.severity=h}s(w)}if(typeof d=="number"){var S=Fn("InvalidCommentToken","Comments are not permitted in JSON.");i.comments.forEach(function(b){s(Ne.create(b,S,d,G.CommentNotPermitted))})}return o};if(n){var c=n.id||"schemaservice://untitled/"+Vn++;return this.jsonSchemaService.resolveSchemaContent(new qe(n),c,{}).then(function(l){return f(l)})}return this.jsonSchemaService.getSchemaForResource(t.uri,i).then(function(l){return f(l)})},e}(),Vn=0;function Br(e){if(e&&typeof e=="object"){if(ge(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,i=e.allOf;t<i.length;t++){var r=i[t],n=Br(r);if(ge(n))return n}}return}function $r(e){if(e&&typeof e=="object"){if(ge(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(ge(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var i=0,r=e.allOf;i<r.length;i++){var n=r[i],a=$r(n);if(ge(a))return a}}return}function Et(e){switch(e){case"error":return fe.Error;case"warning":return fe.Warning;case"ignore":return}return}var Wr=48,_n=57,Un=65,St=97,Rn=102;function se(e){return e<Wr?0:e<=_n?e-Wr:(e<St&&(e+=St-Un),e>=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;f<c.length;f++){var l=c[f];if(l.type==="object")for(var h=0,d=l.properties;h<d.length;h++){var p=d[h];if(p.keyNode.value==="key"&&p.valueNode){var k=nt.create(t.uri,Re(t,l));if(s.push({name:Ve(p.valueNode),kind:re.Function,location:k}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(u),s}}}return s}for(var g=[{node:a,containerName:""}],T=0,m=!1,y=[],I=function(M,w){M.type==="array"?M.items.forEach(function(S){S&&g.push({node:S,containerName:w})}):M.type==="object"&&M.properties.forEach(function(S){var b=S.valueNode;if(b)if(o>0){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})};T<g.length;){var N=g[T++];I(N.node,N.containerName)}return m&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(u),y},e.prototype.findDocumentSymbols2=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;f<c.length;f++){var l=c[f];if(l.type==="object")for(var h=0,d=l.properties;h<d.length;h++){var p=d[h];if(p.keyNode.value==="key"&&p.valueNode){var k=Re(t,l),g=Re(t,p.keyNode);if(s.push({name:Ve(p.valueNode),kind:re.Function,range:k,selectionRange:g}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(u),s}}}return s}for(var T=[],m=[{node:a,result:T}],y=0,I=!1,N=function(w,S){w.type==="array"?w.items.forEach(function(b,x){if(b)if(o>0){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})};y<m.length;){var M=m[y++];N(M.node,M.result)}return I&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(u),T},e.prototype.getSymbolKind=function(t){switch(t){case"object":return re.Module;case"string":return re.String;case"number":return re.Number;case"array":return re.Array;case"boolean":return re.Boolean;default:return re.Variable}},e.prototype.getKeyLabel=function(t){var i=t.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},e.prototype.getDetail=function(t){return t?t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string"?String(t.value):t.type==="array"?t.children.length?void 0:"[]":t.type==="object"?t.children.length?void 0:"{}":void 0:void 0},e.prototype.findDocumentColors=function(t,i,r){return this.schemaService.getSchemaForResource(t.uri,i).then(function(n){var a=[];if(n)for(var o=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,u=i.getMatchingSchemas(n.schema),s={},f=0,c=u;f<c.length;f++){var l=c[f];if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){var h=String(l.node.offset);if(!s[h]){var d=Bn(Ve(l.node));if(d){var p=Re(t,l.node);a.push({color:d,range:p})}if(s[h]=!0,o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),a}}}return a})},e.prototype.getColorPresentations=function(t,i,r,n){var a=[],o=Math.round(r.red*255),u=Math.round(r.green*255),s=Math.round(r.blue*255);function f(l){var h=l.toString(16);return h.length!==2?"0"+h:h}var c;return r.alpha===1?c="#"+f(o)+f(u)+f(s):c="#"+f(o)+f(u)+f(s)+f(Math.round(r.alpha*255)),a.push({label:c,textEdit:we.replace(n,JSON.stringify(c))}),a},e}();function Re(e,t){return ee.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var J=Qe(),Jt={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Wn={id:J("schema.json.id","A unique identifier for the schema."),$schema:J("schema.json.$schema","The schema to verify this document against."),title:J("schema.json.title","A descriptive title of the element."),description:J("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:J("schema.json.default","A default value. Used by suggestions."),multipleOf:J("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:J("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:J("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:J("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:J("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:J("schema.json.maxLength","The maximum length of a string."),minLength:J("schema.json.minLength","The minimum length of a string."),pattern:J("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:J("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:J("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:J("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:J("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:J("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:J("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:J("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:J("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:J("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:J("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:J("schema.json.properties","A map of property names to schemas for each property."),patternProperties:J("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:J("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:J("schema.json.enum","The set of literal values that are valid."),type:J("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:J("schema.json.format","Describes the format expected for the value."),allOf:J("schema.json.allOf","An array of schemas, all of which must match."),anyOf:J("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:J("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:J("schema.json.not","A schema which must not match."),$id:J("schema.json.$id","A unique identifier for the schema."),$ref:J("schema.json.$ref","Reference a definition hosted on any location."),$comment:J("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:J("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:J("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:J("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:J("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:J("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:J("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:J("schema.json.contentEncoding","Describes the content encoding of a string property."),if:J("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:J("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:J("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var Jn in Jt.schemas){var qt=Jt.schemas[Jn];for(var ut in qt.properties){var zt=qt.properties[ut];typeof zt=="boolean"&&(zt=qt.properties[ut]={});var Jr=Wn[ut];Jr?zt.description=Jr:console.log(ut+": localize('schema.json."+ut+`', "")`)}}function qn(e,t){var i=[],r=[],n=[],a=-1,o=Ae(e.getText(),!1),u=o.scan();function s(x){i.push(x),r.push(n.length)}for(;u!==17;){switch(u){case 1:case 3:{var f=e.positionAt(o.getTokenOffset()).line,c={startLine:f,endLine:f,kind:u===1?"object":"array"};n.push(c);break}case 2:case 4:{var l=u===2?"object":"array";if(n.length>0&&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<e.lineCount?o.setPosition(e.offsetAt(Ce.create(f+1,0))):f<d&&(s({startLine:f,endLine:d,kind:Fe.Comment}),a=f);break}case 12:{var p=e.getText().substr(o.getTokenOffset(),o.getTokenLength()),k=p.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(k){var h=e.positionAt(o.getTokenOffset()).line;if(k[1]){var c={startLine:h,endLine:h,kind:Fe.Region};n.push(c)}else{for(var g=n.length-1;g>=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;y<I.length;y++){var N=I[y];N<30&&(m[N]=(m[N]||0)+1)}for(var M=0,w=0,g=0;g<m.length;g++){var S=m[g];if(S){if(S+M>T){w=g;break}M+=S}}for(var b=[],g=0;g<i.length;g++){var N=r[g];typeof N=="number"&&((N<w||N===w&&M++<T)&&b.push(i[g]))}return b}function zn(e,t,i){function r(u){for(var s=e.offsetAt(u),f=i.getNodeFromOffset(s,!0),c=[];f;){switch(f.type){case"string":case"object":case"array":var l=f.offset+1,h=f.offset+f.length-1;l<h&&s>=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&&lt.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<arguments.length;s++)u[s]=arguments[s];return r.getLanguageServiceWorker.apply(r,u)};function a(){var u=e.languageId,s=e.modeConfiguration;Zr(i),s.documentFormattingEdits&&i.push(z.languages.registerDocumentFormattingEditProvider(u,new li(n))),s.documentRangeFormattingEdits&&i.push(z.languages.registerDocumentRangeFormattingEditProvider(u,new fi(n))),s.completionItems&&i.push(z.languages.registerCompletionItemProvider(u,new ii(n))),s.hovers&&i.push(z.languages.registerHoverProvider(u,new si(n))),s.documentSymbols&&i.push(z.languages.registerDocumentSymbolProvider(u,new ci(n))),s.tokens&&i.push(z.languages.setTokensProvider(u,mi(!0))),s.colors&&i.push(z.languages.registerColorProvider(u,new hi(n))),s.foldingRanges&&i.push(z.languages.registerFoldingRangeProvider(u,new di(n))),s.diagnostics&&i.push(new Zn(u,n,e)),s.selectionRanges&&i.push(z.languages.registerSelectionRangeProvider(u,new gi(n)))}a(),t.push(z.languages.setLanguageConfiguration(e.languageId,Oi));var o=e.modeConfiguration;return e.onDidChange(function(u){u.modeConfiguration!==o&&(o=u.modeConfiguration,a())}),t.push(Qr(i)),Qr(t)}function Qr(e){return{dispose:function(){return Zr(e)}}}function Zr(e){for(;e.length;)e.pop().dispose()}var Oi={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}},"xiP/":function(sn,ht,$e){"use strict";(function(z){$e.d(ht,"a",function(){return Ot});var dt;dt=(()=>{"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(V<A.length)j=A.charCodeAt(V);else{if(j===47)break;j=47}if(j===47){if(!(B===V-1||H===1))if(B!==V-1&&H===2){if(_.length<2||W!==2||_.charCodeAt(_.length-1)!==46||_.charCodeAt(_.length-2)!==46){if(_.length>2){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;L<arguments.length;++L){var j=arguments[L];ne(j),j.length>0&&(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;j<A.length&&A.charCodeAt(j)===47;++j);for(var _=A.length,W=_-j,B=1;B<L.length&&L.charCodeAt(B)===47;++B);for(var H=L.length-B,V=W<H?W:H,Z=-1,Y=0;Y<=V;++Y){if(Y===V){if(H>V){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<O.length;Q++){var K=O.charCodeAt(Q);if(K>=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;E<O.length;E++){var F=O.charCodeAt(E);F===35||F===63?(C===void 0&&(C=O.substr(0,E)),C+=jt[F]):C!==void 0&&(C+=O[E])}return C!==void 0?C:O}function Ke(O,C){var E;return E=O.authority&&O.path.length>1&&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<E;C++)O+=arguments[C].length;var F=Array(O),Q=0;for(C=0;C<E;C++)for(var K=arguments[C],X=0,ie=K.length;X<ie;X++,Q++)F[Q]=K[X];return F},Ie=Nt.posix||Nt;!function(O){O.joinPath=function(C){for(var E=[],F=1;F<arguments.length;F++)E[F-1]=arguments[F];return C.with({path:Ie.join.apply(Ie,mt([C.path],E))})},O.resolvePath=function(C){for(var E=[],F=1;F<arguments.length;F++)E[F-1]=arguments[F];var Q=C.path||"/";return C.with({path:Ie.resolve.apply(Ie,mt([Q],E))})},O.dirname=function(C){var E=Ie.dirname(C.path);return E.length===1&&E.charCodeAt(0)===46?C:C.with({path:E})},O.basename=function(C){return Ie.basename(C.path)},O.extname=function(C){return Ie.extname(C.path)}}(gt||(gt={}))}},Se={};function me(ce){if(Se[ce])return Se[ce].exports;var ne=Se[ce]={exports:{}};return et[ce](ne,ne.exports,me),ne.exports}return me.d=(ce,ne)=>{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"))}}]);