Files
lit-examples/assets/json.worker-DkmBn0cG.js
2026-07-05 02:38:01 +00:00

30 lines
213 KiB
JavaScript

(function(){"use strict";class Hi{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+`
`+t.stack):t},0)}}emit(t){this.listeners.forEach(r=>{r(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Bi=new Hi;function Yi(e){zi(e)||Bi.onUnexpectedError(e)}function Ur(e){if(e instanceof Error){let{name:t,message:r}=e;const n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:n}}return e}const Or="Canceled";function zi(e){return e instanceof Error&&e.name===Or&&e.message===Or}var Ot;(function(e){function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(p){yield p}e.single=i;function s(p){return p||r}e.from=s;function a(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=a;function o(p){return p[Symbol.iterator]().next().value}e.first=o;function u(p,d){for(const _ of p)if(d(_))return!0;return!1}e.some=u;function l(p,d){for(const _ of p)if(d(_))return _}e.find=l;function*c(p,d){for(const _ of p)d(_)&&(yield _)}e.filter=c;function*f(p,d){let _=0;for(const L of p)yield d(L,_++)}e.map=f;function*h(...p){for(const d of p)for(const _ of d)yield _}e.concat=h;function*g(p){for(const d of p)for(const _ of d)yield _}e.concatNested=g;function m(p,d,_){let L=_;for(const S of p)L=d(L,S);return L}e.reduce=m;function*v(p,d,_=p.length){for(d<0&&(d+=p.length),_<0?_+=p.length:_>p.length&&(_=p.length);d<_;d++)yield p[d]}e.slice=v;function b(p,d=Number.POSITIVE_INFINITY){const _=[];if(d===0)return[_,p];const L=p[Symbol.iterator]();for(let S=0;S<d;S++){const A=L.next();if(A.done)return[_,e.empty()];_.push(A.value)}return[_,{[Symbol.iterator](){return L}}]}e.consume=b;function N(p,d,_=(L,S)=>L===S){const L=p[Symbol.iterator](),S=d[Symbol.iterator]();for(;;){const A=L.next(),w=S.next();if(A.done!==w.done)return!1;if(A.done)return!0;if(!_(A.value,w.value))return!1}}e.equals=N})(Ot||(Ot={}));function Gi(e){}function Za(e){return e}class Ji extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`),this.errors=t}}function Vr(e){if(Ot.is(e)){let t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new Ji(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Qi(...e){return e.forEach(Gi),Xi(()=>Vr(e))}function Xi(e){return{dispose:()=>{e()}}}class rt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Vr(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?rt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}rt.DISABLE_DISPOSED_WARNING=!1;class $r{constructor(){this._store=new rt}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}$r.None=Object.freeze({dispose(){}});var Vt;const yt="en";let $t=!1,Wt=!1,qt=!1,St,Ht=yt,Zi,De;const ee=typeof self=="object"?self:typeof global=="object"?global:{};let G;typeof ee.vscode<"u"&&typeof ee.vscode.process<"u"?G=ee.vscode.process:typeof process<"u"&&(G=process);const Wr=typeof((Vt=G==null?void 0:G.versions)===null||Vt===void 0?void 0:Vt.electron)=="string"&&G.type==="renderer",Ki=Wr&&(G==null?void 0:G.sandboxed);if((()=>{if(Ki)return"bypassHeatCheck";const e=G==null?void 0:G.env.VSCODE_BROWSER_CODE_LOADING;if(typeof e=="string")return e==="none"||e==="code"||e==="bypassHeatCheck"||e==="bypassHeatCheckAndEagerCompile"?e:"bypassHeatCheck"})(),typeof navigator=="object"&&!Wr)De=navigator.userAgent,$t=De.indexOf("Windows")>=0,Wt=De.indexOf("Macintosh")>=0,(De.indexOf("Macintosh")>=0||De.indexOf("iPad")>=0||De.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,qt=De.indexOf("Linux")>=0,St=navigator.language,Ht=St;else if(typeof G=="object"){$t=G.platform==="win32",Wt=G.platform==="darwin",qt=G.platform==="linux",qt&&G.env.SNAP&&G.env.SNAP_REVISION,St=yt,Ht=yt;const e=G.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),r=t.availableLanguages["*"];St=t.locale,Ht=r||yt,Zi=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const nt=$t,es=Wt,qr=function(){if(ee.setImmediate)return ee.setImmediate.bind(ee);if(typeof ee.postMessage=="function"&&!ee.importScripts){let r=[];ee.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let s=0,a=r.length;s<a;s++){const o=r[s];if(o.id===i.data.vscodeSetImmediateId){r.splice(s,1),o.callback();return}}});let n=0;return i=>{const s=++n;r.push({id:s,callback:i}),ee.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(G==null?void 0:G.nextTick)=="function")return G.nextTick.bind(G);const t=Promise.resolve();return r=>t.then(r)}();function ts(e){let t=[],r=Object.getPrototypeOf(e);for(;Object.prototype!==r;)t=t.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return t}function Bt(e){const t=[];for(const r of ts(e))typeof e[r]=="function"&&t.push(r);return t}function Hr(e,t){const r=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)};let n={};for(const i of e)n[i]=r(i);return n}const rs="$initialize";class ns{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,r){let n=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[n]={resolve:i,reject:s},this._send({vsWorker:this._workerId,req:n,method:t,args:r})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let s=t;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let a=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let o=s.err;s.err.$isError&&(o=new Error,o.name=s.err.name,o.message=s.err.message,o.stack=s.err.stack),a.reject(o);return}a.resolve(s.res);return}let r=t,n=r.req;this._handler.handleMessage(r.method,r.args).then(s=>{this._send({vsWorker:this._workerId,seq:n,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=Ur(s.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:Ur(s)})})}_send(t){let r=[];if(t.req){const n=t;for(let i=0;i<n.args.length;i++)n.args[i]instanceof ArrayBuffer&&r.push(n.args[i])}else{const n=t;n.res instanceof ArrayBuffer&&r.push(n.res)}this._handler.sendMessage(t,r)}}class is{constructor(t,r){this._requestHandlerFactory=r,this._requestHandler=null,this._protocol=new ns({sendMessage:(n,i)=>{t(n,i)},handleMessage:(n,i)=>this._handleMessage(n,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,r){if(t===rs)return this.initialize(r[0],r[1],r[2],r[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,r))}catch(n){return Promise.reject(n)}}initialize(t,r,n,i){this._protocol.setWorkerId(t);const a=Hr(i,(o,u)=>this._protocol.sendMessage(o,u));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(a),Promise.resolve(Bt(this._requestHandler))):(r&&(typeof r.baseUrl<"u"&&delete r.baseUrl,typeof r.paths<"u"&&typeof r.paths.vs<"u"&&delete r.paths.vs,typeof r.trustedTypesPolicy!==void 0&&delete r.trustedTypesPolicy,r.catchError=!0,self.require.config(r)),new Promise((o,u)=>{self.require([n],l=>{if(this._requestHandler=l.create(a),!this._requestHandler){u(new Error("No RequestHandler!"));return}o(Bt(this._requestHandler))},u)}))}}class Le{constructor(t,r,n,i){this.originalStart=t,this.originalLength=r,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function ss(e){return e.split(/\r\n|\r|\n/)}function as(e){for(let t=0,r=e.length;t<r;t++){const n=e.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function os(e,t=e.length-1){for(let r=t;r>=0;r--){const n=e.charCodeAt(r);if(n!==32&&n!==9)return r}return-1}function Br(e,t){return(t<<5)-t+e|0}function us(e,t){t=Br(149417,t);for(let r=0,n=e.length;r<n;r++)t=Br(e.charCodeAt(r),t);return t}class Yr{constructor(t){this.source=t}getElements(){const t=this.source,r=new Int32Array(t.length);for(let n=0,i=t.length;n<i;n++)r[n]=t.charCodeAt(n);return r}}function ls(e,t,r){return new Ce(new Yr(e),new Yr(t)).ComputeDiff(r).changes}class qe{static Assert(t,r){if(!t)throw new Error(r)}}class He{static Copy(t,r,n,i,s){for(let a=0;a<s;a++)n[i+a]=t[r+a]}static Copy2(t,r,n,i,s){for(let a=0;a<s;a++)n[i+a]=t[r+a]}}class zr{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Le(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_originalCount++}AddModifiedElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Ce{constructor(t,r,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=t,this._modifiedSequence=r;const[i,s,a]=Ce._getElements(t),[o,u,l]=Ce._getElements(r);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const r=t.getElements();if(Ce._isStringArray(r)){const n=new Int32Array(r.length);for(let i=0,s=r.length;i<s;i++)n[i]=us(r[i],0);return[r,n,!0]}return r instanceof Int32Array?[[],r,!1]:[[],new Int32Array(r),!1]}ElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._modifiedStringElements[r]:!0}ElementsAreStrictEqual(t,r){if(!this.ElementsAreEqual(t,r))return!1;const n=Ce._getStrictElement(this._originalSequence,t),i=Ce._getStrictElement(this._modifiedSequence,r);return n===i}static _getStrictElement(t,r){return typeof t.getStrictElement=="function"?t.getStrictElement(r):null}OriginalElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._originalElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._originalStringElements[r]:!0}ModifiedElementsAreEqual(t,r){return this._modifiedElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._modifiedStringElements[t]===this._modifiedStringElements[r]:!0}ComputeDiff(t){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,t)}_ComputeDiff(t,r,n,i,s){const a=[!1];let o=this.ComputeDiffRecursive(t,r,n,i,a);return s&&(o=this.PrettifyChanges(o)),{quitEarly:a[0],changes:o}}ComputeDiffRecursive(t,r,n,i,s){for(s[0]=!1;t<=r&&n<=i&&this.ElementsAreEqual(t,n);)t++,n++;for(;r>=t&&i>=n&&this.ElementsAreEqual(r,i);)r--,i--;if(t>r||n>i){let f;return n<=i?(qe.Assert(t===r+1,"originalStart should only be one more than originalEnd"),f=[new Le(t,0,n,i-n+1)]):t<=r?(qe.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new Le(t,r-t+1,n,0)]):(qe.Assert(t===r+1,"originalStart should only be one more than originalEnd"),qe.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,r,n,i,a,o,s),l=a[0],c=o[0];if(u!==null)return u;if(!s[0]){const f=this.ComputeDiffRecursive(t,l,n,c,s);let h=[];return s[0]?h=[new Le(l+1,r-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,r,c+1,i,s),this.ConcatenateChanges(f,h)}return[new Le(t,r-t+1,n,i-n+1)]}WALKTRACE(t,r,n,i,s,a,o,u,l,c,f,h,g,m,v,b,N,p){let d=null,_=null,L=new zr,S=r,A=n,w=g[0]-b[0]-i,y=-1073741824,T=this.m_forwardHistory.length-1;do{const P=w+t;P===S||P<A&&l[P-1]<l[P+1]?(f=l[P+1],m=f-w-i,f<y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m),w=P+1-t):(f=l[P-1]+1,m=f-w-i,f<y&&L.MarkNextChange(),y=f-1,L.AddOriginalElement(f,m+1),w=P-1-t),T>=0&&(l=this.m_forwardHistory[T],t=l[0],S=1,A=l.length-1)}while(--T>=-1);if(d=L.getReverseChanges(),p[0]){let P=g[0]+1,k=b[0]+1;if(d!==null&&d.length>0){const F=d[d.length-1];P=Math.max(P,F.getOriginalEnd()),k=Math.max(k,F.getModifiedEnd())}_=[new Le(P,h-P+1,k,v-k+1)]}else{L=new zr,S=a,A=o,w=g[0]-b[0]-u,y=1073741824,T=N?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const P=w+s;P===S||P<A&&c[P-1]>=c[P+1]?(f=c[P+1]-1,m=f-w-u,f>y&&L.MarkNextChange(),y=f+1,L.AddOriginalElement(f+1,m+1),w=P+1-s):(f=c[P-1],m=f-w-u,f>y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m+1),w=P-1-s),T>=0&&(c=this.m_reverseHistory[T],s=c[0],S=1,A=c.length-1)}while(--T>=-1);_=L.getChanges()}return this.ConcatenateChanges(d,_)}ComputeRecursionPoint(t,r,n,i,s,a,o){let u=0,l=0,c=0,f=0,h=0,g=0;t--,n--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=r-t+(i-n),v=m+1,b=new Int32Array(v),N=new Int32Array(v),p=i-n,d=r-t,_=t-n,L=r-i,A=(d-p)%2===0;b[p]=t,N[d]=r,o[0]=!1;for(let w=1;w<=m/2+1;w++){let y=0,T=0;c=this.ClipDiagonalBound(p-w,w,p,v),f=this.ClipDiagonalBound(p+w,w,p,v);for(let k=c;k<=f;k+=2){k===c||k<f&&b[k-1]<b[k+1]?u=b[k+1]:u=b[k-1]+1,l=u-(k-p)-_;const F=u;for(;u<r&&l<i&&this.ElementsAreEqual(u+1,l+1);)u++,l++;if(b[k]=u,u+l>y+T&&(y=u,T=l),!A&&Math.abs(k-d)<=w-1&&u>=N[k])return s[0]=u,a[0]=l,F<=N[k]&&w<=1448?this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o):null}const P=(y-t+(T-n)-w)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(y,P))return o[0]=!0,s[0]=y,a[0]=T,P>0&&w<=1448?this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o):(t++,n++,[new Le(t,r-t+1,n,i-n+1)]);h=this.ClipDiagonalBound(d-w,w,d,v),g=this.ClipDiagonalBound(d+w,w,d,v);for(let k=h;k<=g;k+=2){k===h||k<g&&N[k-1]>=N[k+1]?u=N[k+1]-1:u=N[k-1],l=u-(k-d)-L;const F=u;for(;u>t&&l>n&&this.ElementsAreEqual(u,l);)u--,l--;if(N[k]=u,A&&Math.abs(k-p)<=w&&u<=b[k])return s[0]=u,a[0]=l,F>=b[k]&&w<=1448?this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o):null}if(w<=1447){let k=new Int32Array(f-c+2);k[0]=p-c+1,He.Copy2(b,c,k,1,f-c+1),this.m_forwardHistory.push(k),k=new Int32Array(g-h+2),k[0]=d-h+1,He.Copy2(N,h,k,1,g-h+1),this.m_reverseHistory.push(k)}}return this.WALKTRACE(p,c,f,_,d,h,g,L,b,N,u,r,s,l,i,a,A,o)}PrettifyChanges(t){for(let r=0;r<t.length;r++){const n=t[r],i=r<t.length-1?t[r+1].originalStart:this._originalElementsOrHash.length,s=r<t.length-1?t[r+1].modifiedStart:this._modifiedElementsOrHash.length,a=n.originalLength>0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<s&&(!a||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!o||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const l=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!l)break;n.originalStart++,n.modifiedStart++}let u=[null];if(r<t.length-1&&this.ChangesOverlap(t[r],t[r+1],u)){t[r]=u[0],t.splice(r+1,1),r--;continue}}for(let r=t.length-1;r>=0;r--){const n=t[r];let i=0,s=0;if(r>0){const f=t[r-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const a=n.originalLength>0,o=n.modifiedLength>0;let u=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let f=1;;f++){const h=n.originalStart-f,g=n.modifiedStart-f;if(h<i||g<s||a&&!this.OriginalElementsAreEqual(h,h+n.originalLength)||o&&!this.ModifiedElementsAreEqual(g,g+n.modifiedLength))break;const v=(h===i&&g===s?5:0)+this._boundaryScore(h,n.originalLength,g,n.modifiedLength);v>l&&(l=v,u=f)}n.originalStart-=u,n.modifiedStart-=u;const c=[null];if(r>0&&this.ChangesOverlap(t[r-1],t[r],c)){t[r-1]=c[0],t.splice(r,1),r++;continue}}if(this._hasStrings)for(let r=1,n=t.length;r<n;r++){const i=t[r-1],s=t[r],a=s.originalStart-i.originalStart-i.originalLength,o=i.originalStart,u=s.originalStart+s.originalLength,l=u-o,c=i.modifiedStart,f=s.modifiedStart+s.modifiedLength,h=f-c;if(a<5&&l<20&&h<20){const g=this._findBetterContiguousSequence(o,l,c,h,a);if(g){const[m,v]=g;(m!==i.originalStart+i.originalLength||v!==i.modifiedStart+i.modifiedLength)&&(i.originalLength=m-i.originalStart,i.modifiedLength=v-i.modifiedStart,s.originalStart=m+a,s.modifiedStart=v+a,s.originalLength=u-s.originalStart,s.modifiedLength=f-s.modifiedStart)}}}return t}_findBetterContiguousSequence(t,r,n,i,s){if(r<s||i<s)return null;const a=t+r-s+1,o=n+i-s+1;let u=0,l=0,c=0;for(let f=t;f<a;f++)for(let h=n;h<o;h++){const g=this._contiguousSequenceScore(f,h,s);g>0&&g>u&&(u=g,l=f,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,r,n){let i=0;for(let s=0;s<n;s++){if(!this.ElementsAreEqual(t+s,r+s))return 0;i+=this._originalStringElements[t+s].length}return i}_OriginalIsBoundary(t){return t<=0||t>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,r){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,r){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(t,r,n,i){const s=this._OriginalRegionIsBoundary(t,r)?1:0,a=this._ModifiedRegionIsBoundary(n,i)?1:0;return s+a}ConcatenateChanges(t,r){let n=[];if(t.length===0||r.length===0)return r.length>0?r:t;if(this.ChangesOverlap(t[t.length-1],r[0],n)){const i=new Array(t.length+r.length-1);return He.Copy(t,0,i,0,t.length-1),i[t.length-1]=n[0],He.Copy(r,1,i,t.length,r.length-1),i}else{const i=new Array(t.length+r.length);return He.Copy(t,0,i,0,t.length),He.Copy(r,0,i,t.length,r.length),i}}ChangesOverlap(t,r,n){if(qe.Assert(t.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),qe.Assert(t.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=r.originalStart||t.modifiedStart+t.modifiedLength>=r.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=r.originalStart&&(s=r.originalStart+r.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=r.modifiedStart&&(o=r.modifiedStart+r.modifiedLength-t.modifiedStart),n[0]=new Le(i,s,a,o),!0}else return n[0]=null,!1}ClipDiagonalBound(t,r,n,i){if(t>=0&&t<i)return t;const s=n,a=i-n-1,o=r%2===0;if(t<0){const u=s%2===0;return o===u?0:1}else{const u=a%2===0;return o===u?i-1:i-2}}}var Gr={};let Be;if(typeof ee.vscode<"u"&&typeof ee.vscode.process<"u"){const e=ee.vscode.process;Be={get platform(){return e.platform},get env(){return e.env},cwd(){return e.cwd()},nextTick(t){return qr(t)}}}else typeof process<"u"?Be={get platform(){return process.platform},get env(){return Gr},cwd(){return Gr.VSCODE_CWD||process.cwd()},nextTick(e){return process.nextTick(e)}}:Be={get platform(){return nt?"win32":es?"darwin":"linux"},nextTick(e){return qr(e)},get env(){return{}},cwd(){return"/"}};const Yt=Be.cwd,fs=Be.env,je=Be.platform,cs=65,hs=97,gs=90,ds=122,xe=46,Z=47,se=92,ke=58,ms=63;class Jr extends Error{constructor(t,r,n){let i;typeof r=="string"&&r.indexOf("not ")===0?(i="must not be",r=r.replace(/^not /,"")):i="must be";const s=t.indexOf(".")!==-1?"property":"argument";let a=`The "${t}" ${s} ${i} of type ${r}`;a+=`. Received type ${typeof n}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function J(e,t){if(typeof e!="string")throw new Jr(t,"string",e)}function U(e){return e===Z||e===se}function zt(e){return e===Z}function Te(e){return e>=cs&&e<=gs||e>=hs&&e<=ds}function _t(e,t,r,n){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l<e.length)u=e.charCodeAt(l);else{if(n(u))break;u=Z}if(n(u)){if(!(a===l-1||o===1))if(o===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==xe||i.charCodeAt(i.length-2)!==xe){if(i.length>2){const c=i.lastIndexOf(r);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(r)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===xe&&o!==-1?++o:o=-1}return i}function Qr(e,t){if(t===null||typeof t!="object")throw new Jr("pathObject","Object",t);const r=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}const ie={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],J(s,"path"),s.length===0)continue}else t.length===0?s=Yt():(s=fs[`=${t}`]||Yt(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===se)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const c=s.charCodeAt(0);if(a===1)U(c)&&(o=1,l=!0);else if(U(c))if(l=!0,U(s.charCodeAt(1))){let f=2,h=f;for(;f<a&&!U(s.charCodeAt(f));)f++;if(f<a&&f!==h){const g=s.slice(h,f);for(h=f;f<a&&U(s.charCodeAt(f));)f++;if(f<a&&f!==h){for(h=f;f<a&&!U(s.charCodeAt(f));)f++;(f===a||f!==h)&&(u=`\\\\${g}\\${s.slice(h,f)}`,o=f)}}}else o=1;else Te(c)&&s.charCodeAt(1)===ke&&(u=s.slice(0,2),o=2,a>2&&U(s.charCodeAt(2))&&(l=!0,o=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(o)}\\${r}`,n=l,l&&t.length>0)break}return r=_t(r,!n,"\\",U),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){J(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return zt(s)?"\\":e;if(U(s))if(i=!0,U(e.charCodeAt(1))){let o=2,u=o;for(;o<t&&!U(e.charCodeAt(o));)o++;if(o<t&&o!==u){const l=e.slice(u,o);for(u=o;o<t&&U(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&!U(e.charCodeAt(o));)o++;if(o===t)return`\\\\${l}\\${e.slice(u)}\\`;o!==u&&(n=`\\\\${l}\\${e.slice(u,o)}`,r=o)}}}else r=1;else Te(s)&&e.charCodeAt(1)===ke&&(n=e.slice(0,2),r=2,t>2&&U(e.charCodeAt(2))&&(i=!0,r=3));let a=r<t?_t(e.slice(r),!i,"\\",U):"";return a.length===0&&!i&&(a="."),a.length>0&&U(e.charCodeAt(t-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(e){J(e,"path");const t=e.length;if(t===0)return!1;const r=e.charCodeAt(0);return U(r)||t>2&&Te(r)&&e.charCodeAt(1)===ke&&U(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let s=0;s<e.length;++s){const a=e[s];J(a,"path"),a.length>0&&(t===void 0?t=r=a:t+=`\\${a}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&U(r.charCodeAt(0))){++i;const s=r.length;s>1&&U(r.charCodeAt(1))&&(++i,s>2&&(U(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&U(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return ie.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t)return"";const r=ie.resolve(e),n=ie.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";let i=0;for(;i<e.length&&e.charCodeAt(i)===se;)i++;let s=e.length;for(;s-1>i&&e.charCodeAt(s-1)===se;)s--;const a=s-i;let o=0;for(;o<t.length&&t.charCodeAt(o)===se;)o++;let u=t.length;for(;u-1>o&&t.charCodeAt(u-1)===se;)u--;const l=u-o,c=a<l?a:l;let f=-1,h=0;for(;h<c;h++){const m=e.charCodeAt(i+h);if(m!==t.charCodeAt(o+h))break;m===se&&(f=h)}if(h!==c){if(f===-1)return n}else{if(l>c){if(t.charCodeAt(o+h)===se)return n.slice(o+h+1);if(h===2)return n.slice(o+h)}a>c&&(e.charCodeAt(i+h)===se?f=h:h===2&&(f=3)),f===-1&&(f=0)}let g="";for(h=i+f+1;h<=s;++h)(h===s||e.charCodeAt(h)===se)&&(g+=g.length===0?"..":"\\..");return o+=f,g.length>0?`${g}${n.slice(o,u)}`:(n.charCodeAt(o)===se&&++o,n.slice(o,u))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ie.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===se){if(t.charCodeAt(1)===se){const r=t.charCodeAt(2);if(r!==ms&&r!==xe)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Te(t.charCodeAt(0))&&t.charCodeAt(1)===ke&&t.charCodeAt(2)===se)return`\\\\?\\${t}`;return e},dirname(e){J(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return U(i)?e:".";if(U(i)){if(r=n=1,U(e.charCodeAt(1))){let o=2,u=o;for(;o<t&&!U(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&U(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&!U(e.charCodeAt(o));)o++;if(o===t)return e;o!==u&&(r=n=o+1)}}}}else Te(i)&&e.charCodeAt(1)===ke&&(r=t>2&&U(e.charCodeAt(2))?3:2,n=r);let s=-1,a=!0;for(let o=t-1;o>=n;--o)if(U(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(e.length>=2&&Te(e.charCodeAt(0))&&e.charCodeAt(1)===ke&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=r;--s){const u=e.charCodeAt(s);if(U(u)){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=r;--s)if(U(e.charCodeAt(s))){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===ke&&Te(e.charCodeAt(0))&&(t=n=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(U(u)){if(!s){n=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===xe?r===-1?r=o:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:Qr.bind(null,"\\"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.length;let n=0,i=e.charCodeAt(0);if(r===1)return U(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(U(i)){if(n=1,U(e.charCodeAt(1))){let f=2,h=f;for(;f<r&&!U(e.charCodeAt(f));)f++;if(f<r&&f!==h){for(h=f;f<r&&U(e.charCodeAt(f));)f++;if(f<r&&f!==h){for(h=f;f<r&&!U(e.charCodeAt(f));)f++;f===r?n=f:f!==h&&(n=f+1)}}}}else if(Te(i)&&e.charCodeAt(1)===ke){if(r<=2)return t.root=t.dir=e,t;if(n=2,U(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,a=n,o=-1,u=!0,l=e.length-1,c=0;for(;l>=n;--l){if(i=e.charCodeAt(l),U(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===xe?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return o!==-1&&(s===-1||c===0||c===1&&s===o-1&&s===a+1?t.base=t.name=e.slice(a,o):(t.name=e.slice(a,s),t.base=e.slice(a,o),t.ext=e.slice(s,o))),a>0&&a!==n?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ae={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Yt();J(i,"path"),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===Z)}return t=_t(t,!r,"/",zt),r?`/${t}`:t.length>0?t:"."},normalize(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===Z,r=e.charCodeAt(e.length-1)===Z;return e=_t(e,!t,"/",zt),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return J(e,"path"),e.length>0&&e.charCodeAt(0)===Z},join(...e){if(e.length===0)return".";let t;for(let r=0;r<e.length;++r){const n=e[r];J(n,"path"),n.length>0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":ae.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t||(e=ae.resolve(e),t=ae.resolve(t),e===t))return"";const r=1,n=e.length,i=n-r,s=1,a=t.length-s,o=i<a?i:a;let u=-1,l=0;for(;l<o;l++){const f=e.charCodeAt(r+l);if(f!==t.charCodeAt(s+l))break;f===Z&&(u=l)}if(l===o)if(a>o){if(t.charCodeAt(s+l)===Z)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(r+l)===Z?u=l:l===0&&(u=0));let c="";for(l=r+u+1;l<=n;++l)(l===n||e.charCodeAt(l)===Z)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===Z;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===Z){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===Z){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===Z){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e.charCodeAt(a);if(o===Z){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),o===xe?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:Qr.bind(null,"/"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.charCodeAt(0)===Z;let n;r?(t.root="/",n=1):n=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=n;--u){const c=e.charCodeAt(u);if(c===Z){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),c===xe?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=s===0&&r?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(c,a):(t.name=e.slice(c,i),t.base=e.slice(c,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ae.win32=ie.win32=ie,ae.posix=ie.posix=ae,je==="win32"?ie.normalize:ae.normalize,je==="win32"?ie.resolve:ae.resolve,je==="win32"?ie.relative:ae.relative,je==="win32"?ie.dirname:ae.dirname,je==="win32"?ie.basename:ae.basename,je==="win32"?ie.extname:ae.extname,je==="win32"?ie.sep:ae.sep;const ps=/^\w[\w\d+.-]*$/,vs=/^\//,bs=/^\/\//;function Xr(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!ps.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!vs.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(bs.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function ys(e,t){return!e&&!t?"file":e}function Ss(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ge&&(t=ge+t):t=ge;break}return t}const Y="",ge="/",_s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Gt=class Ut{constructor(t,r,n,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Y,this.authority=t.authority||Y,this.path=t.path||Y,this.query=t.query||Y,this.fragment=t.fragment||Y):(this.scheme=ys(t,a),this.authority=r||Y,this.path=Ss(this.scheme,n||Y),this.query=i||Y,this.fragment=s||Y,Xr(this,a))}static isUri(t){return t instanceof Ut?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return Jt(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:s,fragment:a}=t;return r===void 0?r=this.scheme:r===null&&(r=Y),n===void 0?n=this.authority:n===null&&(n=Y),i===void 0?i=this.path:i===null&&(i=Y),s===void 0?s=this.query:s===null&&(s=Y),a===void 0?a=this.fragment:a===null&&(a=Y),r===this.scheme&&n===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Ye(r,n,i,s,a)}static parse(t,r=!1){const n=_s.exec(t);return n?new Ye(n[2]||Y,At(n[4]||Y),At(n[5]||Y),At(n[7]||Y),At(n[9]||Y),r):new Ye(Y,Y,Y,Y,Y)}static file(t){let r=Y;if(nt&&(t=t.replace(/\\/g,ge)),t[0]===ge&&t[1]===ge){const n=t.indexOf(ge,2);n===-1?(r=t.substring(2),t=ge):(r=t.substring(2,n),t=t.substring(n)||ge)}return new Ye("file",r,t,Y,Y)}static from(t){const r=new Ye(t.scheme,t.authority,t.path,t.query,t.fragment);return Xr(r,!0),r}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return nt&&t.scheme==="file"?n=Ut.file(ie.join(Jt(t,!0),...r)).path:n=ae.join(t.path,...r),t.with({path:n})}toString(t=!1){return Qt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Ut)return t;{const r=new Ye(t);return r._formatted=t.external,r._fsPath=t._sep===Zr?t.fsPath:null,r}}else return t}};const Zr=nt?1:void 0;class Ye extends Gt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Jt(this,!1)),this._fsPath}toString(t=!1){return t?Qt(this,!0):(this._formatted||(this._formatted=Qt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Zr),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const Kr={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function en(e,t){let r,n=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||t&&s===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));const a=Kr[s];a!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=a):n===-1&&(n=i)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function As(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=Kr[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function Jt(e,t){let r;return e.authority&&e.path.length>1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,nt&&(r=r.replace(/\//g,"\\")),r}function Qt(e,t){const r=t?As:en;let n="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(n+=i,n+=":"),(s||i==="file")&&(n+=ge,n+=ge),s){let l=s.indexOf("@");if(l!==-1){const c=s.substr(0,l);s=s.substr(l+1),l=c.indexOf(":"),l===-1?n+=r(c,!1):(n+=r(c.substr(0,l),!1),n+=":",n+=r(c.substr(l+1),!1)),n+="@"}s=s.toLowerCase(),l=s.indexOf(":"),l===-1?n+=r(s,!1):(n+=r(s.substr(0,l),!1),n+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}n+=r(a,!0)}return o&&(n+="?",n+=r(o,!1)),u&&(n+="#",n+=t?u:en(u,!1)),n}function tn(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+tn(e.substr(3)):e}}const rn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function At(e){return e.match(rn)?e.replace(rn,t=>tn(t)):e}let ze=class We{constructor(t,r){this.lineNumber=t,this.column=r}with(t=this.lineNumber,r=this.column){return t===this.lineNumber&&r===this.column?this:new We(t,r)}delta(t=0,r=0){return this.with(this.lineNumber+t,this.column+r)}equals(t){return We.equals(this,t)}static equals(t,r){return!t&&!r?!0:!!t&&!!r&&t.lineNumber===r.lineNumber&&t.column===r.column}isBefore(t){return We.isBefore(this,t)}static isBefore(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<r.column}isBeforeOrEqual(t){return We.isBeforeOrEqual(this,t)}static isBeforeOrEqual(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<=r.column}static compare(t,r){let n=t.lineNumber|0,i=r.lineNumber|0;if(n===i){let s=t.column|0,a=r.column|0;return s-a}return n-i}clone(){return new We(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(t){return new We(t.lineNumber,t.column)}static isIPosition(t){return t&&typeof t.lineNumber=="number"&&typeof t.column=="number"}},Ge=class K{constructor(t,r,n,i){t>n||t===n&&r>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=t,this.endColumn=r):(this.startLineNumber=t,this.startColumn=r,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return K.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return K.containsPosition(this,t)}static containsPosition(t,r){return!(r.lineNumber<t.startLineNumber||r.lineNumber>t.endLineNumber||r.lineNumber===t.startLineNumber&&r.column<t.startColumn||r.lineNumber===t.endLineNumber&&r.column>t.endColumn)}containsRange(t){return K.containsRange(this,t)}static containsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>t.endColumn)}strictContainsRange(t){return K.strictContainsRange(this,t)}static strictContainsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<=t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>=t.endColumn)}plusRange(t){return K.plusRange(this,t)}static plusRange(t,r){let n,i,s,a;return r.startLineNumber<t.startLineNumber?(n=r.startLineNumber,i=r.startColumn):r.startLineNumber===t.startLineNumber?(n=r.startLineNumber,i=Math.min(r.startColumn,t.startColumn)):(n=t.startLineNumber,i=t.startColumn),r.endLineNumber>t.endLineNumber?(s=r.endLineNumber,a=r.endColumn):r.endLineNumber===t.endLineNumber?(s=r.endLineNumber,a=Math.max(r.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new K(n,i,s,a)}intersectRanges(t){return K.intersectRanges(this,t)}static intersectRanges(t,r){let n=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn,o=r.startLineNumber,u=r.startColumn,l=r.endLineNumber,c=r.endColumn;return n<o?(n=o,i=u):n===o&&(i=Math.max(i,u)),s>l?(s=l,a=c):s===l&&(a=Math.min(a,c)),n>s||n===s&&i>a?null:new K(n,i,s,a)}equalsRange(t){return K.equalsRange(this,t)}static equalsRange(t,r){return!!t&&!!r&&t.startLineNumber===r.startLineNumber&&t.startColumn===r.startColumn&&t.endLineNumber===r.endLineNumber&&t.endColumn===r.endColumn}getEndPosition(){return K.getEndPosition(this)}static getEndPosition(t){return new ze(t.endLineNumber,t.endColumn)}getStartPosition(){return K.getStartPosition(this)}static getStartPosition(t){return new ze(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,r){return new K(this.startLineNumber,this.startColumn,t,r)}setStartPosition(t,r){return new K(t,r,this.endLineNumber,this.endColumn)}collapseToStart(){return K.collapseToStart(this)}static collapseToStart(t){return new K(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,r=t){return new K(t.lineNumber,t.column,r.lineNumber,r.column)}static lift(t){return t?new K(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<t.startColumn)}static areIntersecting(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<=r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<=t.startColumn)}static compareRangesUsingStarts(t,r){if(t&&r){const s=t.startLineNumber|0,a=r.startLineNumber|0;if(s===a){const o=t.startColumn|0,u=r.startColumn|0;if(o===u){const l=t.endLineNumber|0,c=r.endLineNumber|0;if(l===c){const f=t.endColumn|0,h=r.endColumn|0;return f-h}return l-c}return o-u}return s-a}return(t?1:0)-(r?1:0)}static compareRangesUsingEnds(t,r){return t.endLineNumber===r.endLineNumber?t.endColumn===r.endColumn?t.startLineNumber===r.startLineNumber?t.startColumn-r.startColumn:t.startLineNumber-r.startLineNumber:t.endColumn-r.endColumn:t.endLineNumber-r.endLineNumber}static spansMultipleLines(t){return t.endLineNumber>t.startLineNumber}};const ws=3;function nn(e,t,r,n){return new Ce(e,t,r).ComputeDiff(n)}class sn{constructor(t){const r=[],n=[];for(let i=0,s=t.length;i<s;i++)r[i]=Xt(t[i],1),n[i]=Zt(t[i],1);this.lines=t,this._startColumns=r,this._endColumns=n}getElements(){const t=[];for(let r=0,n=this.lines.length;r<n;r++)t[r]=this.lines[r].substring(this._startColumns[r]-1,this._endColumns[r]-1);return t}getStrictElement(t){return this.lines[t]}getStartLineNumber(t){return t+1}getEndLineNumber(t){return t+1}createCharSequence(t,r,n){const i=[],s=[],a=[];let o=0;for(let u=r;u<=n;u++){const l=this.lines[u],c=t?this._startColumns[u]:1,f=t?this._endColumns[u]:l.length+1;for(let h=c;h<f;h++)i[o]=l.charCodeAt(h-1),s[o]=u+1,a[o]=h,o++}return new Ns(i,s,a)}}class Ns{constructor(t,r,n){this._charCodes=t,this._lineNumbers=r,this._columns=n}getElements(){return this._charCodes}getStartLineNumber(t){return this._lineNumbers[t]}getStartColumn(t){return this._columns[t]}getEndLineNumber(t){return this._lineNumbers[t]}getEndColumn(t){return this._columns[t]+1}}class it{constructor(t,r,n,i,s,a,o,u){this.originalStartLineNumber=t,this.originalStartColumn=r,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=u}static createFromDiffChange(t,r,n){let i,s,a,o,u,l,c,f;return t.originalLength===0?(i=0,s=0,a=0,o=0):(i=r.getStartLineNumber(t.originalStart),s=r.getStartColumn(t.originalStart),a=r.getEndLineNumber(t.originalStart+t.originalLength-1),o=r.getEndColumn(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(u=0,l=0,c=0,f=0):(u=n.getStartLineNumber(t.modifiedStart),l=n.getStartColumn(t.modifiedStart),c=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=n.getEndColumn(t.modifiedStart+t.modifiedLength-1)),new it(i,s,a,o,u,l,c,f)}}function Ls(e){if(e.length<=1)return e;const t=[e[0]];let r=t[0];for(let n=1,i=e.length;n<i;n++){const s=e[n],a=s.originalStart-(r.originalStart+r.originalLength),o=s.modifiedStart-(r.modifiedStart+r.modifiedLength);Math.min(a,o)<ws?(r.originalLength=s.originalStart+s.originalLength-r.originalStart,r.modifiedLength=s.modifiedStart+s.modifiedLength-r.modifiedStart):(t.push(s),r=s)}return t}class st{constructor(t,r,n,i,s){this.originalStartLineNumber=t,this.originalEndLineNumber=r,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=s}static createFromDiffResult(t,r,n,i,s,a,o){let u,l,c,f,h;if(r.originalLength===0?(u=n.getStartLineNumber(r.originalStart)-1,l=0):(u=n.getStartLineNumber(r.originalStart),l=n.getEndLineNumber(r.originalStart+r.originalLength-1)),r.modifiedLength===0?(c=i.getStartLineNumber(r.modifiedStart)-1,f=0):(c=i.getStartLineNumber(r.modifiedStart),f=i.getEndLineNumber(r.modifiedStart+r.modifiedLength-1)),a&&r.originalLength>0&&r.originalLength<20&&r.modifiedLength>0&&r.modifiedLength<20&&s()){const g=n.createCharSequence(t,r.originalStart,r.originalStart+r.originalLength-1),m=i.createCharSequence(t,r.modifiedStart,r.modifiedStart+r.modifiedLength-1);let v=nn(g,m,s,!0).changes;o&&(v=Ls(v)),h=[];for(let b=0,N=v.length;b<N;b++)h.push(it.createFromDiffChange(v[b],g,m))}return new st(u,l,c,f,h)}}class Cs{constructor(t,r,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=t,this.modifiedLines=r,this.original=new sn(t),this.modified=new sn(r),this.continueLineDiff=an(n.maxComputationTime),this.continueCharDiff=an(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const t=nn(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),r=t.changes,n=t.quitEarly;if(this.shouldIgnoreTrimWhitespace){const o=[];for(let u=0,l=r.length;u<l;u++)o.push(st.createFromDiffResult(this.shouldIgnoreTrimWhitespace,r[u],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:o}}const i=[];let s=0,a=0;for(let o=-1,u=r.length;o<u;o++){const l=o+1<u?r[o+1]:null,c=l?l.originalStart:this.originalLines.length,f=l?l.modifiedStart:this.modifiedLines.length;for(;s<c&&a<f;){const h=this.originalLines[s],g=this.modifiedLines[a];if(h!==g){{let m=Xt(h,1),v=Xt(g,1);for(;m>1&&v>1;){const b=h.charCodeAt(m-2),N=g.charCodeAt(v-2);if(b!==N)break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,m,a+1,1,v)}{let m=Zt(h,1),v=Zt(g,1);const b=h.length+1,N=g.length+1;for(;m<b&&v<N;){const p=h.charCodeAt(m-1),d=h.charCodeAt(v-1);if(p!==d)break;m++,v++}(m<b||v<N)&&this._pushTrimWhitespaceCharChange(i,s+1,m,b,a+1,v,N)}}s++,a++}l&&(i.push(st.createFromDiffResult(this.shouldIgnoreTrimWhitespace,l,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=l.originalLength,a+=l.modifiedLength)}return{quitEarly:n,changes:i}}_pushTrimWhitespaceCharChange(t,r,n,i,s,a,o){if(this._mergeTrimWhitespaceCharChange(t,r,n,i,s,a,o))return;let u;this.shouldComputeCharChanges&&(u=[new it(r,n,r,i,s,a,s,o)]),t.push(new st(r,r,s,s,u))}_mergeTrimWhitespaceCharChange(t,r,n,i,s,a,o){const u=t.length;if(u===0)return!1;const l=t[u-1];return l.originalEndLineNumber===0||l.modifiedEndLineNumber===0?!1:l.originalEndLineNumber+1===r&&l.modifiedEndLineNumber+1===s?(l.originalEndLineNumber=r,l.modifiedEndLineNumber=s,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new it(r,n,r,i,s,a,s,o)),!0):!1}}function Xt(e,t){const r=as(e);return r===-1?t:r+1}function Zt(e,t){const r=os(e);return r===-1?t:r+2}function an(e){if(e===0)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}function on(e){return e<0?0:e>255?255:e|0}function Je(e){return e<0?0:e>4294967295?4294967295:e|0}class xs{constructor(t,r){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=r}}class ks{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,r){t=Je(t);const n=this.values,i=this.prefixSum,s=r.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t),t+s),this.values.set(r,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,r){return t=Je(t),r=Je(r),this.values[t]===r?!1:(this.values[t]=r,t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),!0)}removeValues(t,r){t=Je(t),r=Je(r);const n=this.values,i=this.prefixSum;if(t>=n.length)return!1;let s=n.length-t;return r>=s&&(r=s),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t+r),t),this.prefixSum=new Uint32Array(this.values.length),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Je(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),t>=this.values.length&&(t=this.values.length-1);for(let n=r;n<=t;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let r=0,n=this.values.length-1,i=0,s=0,a=0;for(;r<=n;)if(i=r+(n-r)/2|0,s=this.prefixSum[i],a=s-this.values[i],t<a)n=i-1;else if(t>=s)r=i+1;else break;return new xs(i,t-a)}}class Ts{constructor(t,r,n,i){this._uri=t,this._lines=r,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const r=t.changes;for(const n of r)this._acceptDeleteRange(n.range),this._acceptInsertText(new ze(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,r=this._lines.length,n=new Uint32Array(r);for(let i=0;i<r;i++)n[i]=this._lines[i].length+t;this._lineStarts=new ks(n)}}_setLineText(t,r){this._lines[t]=r,this._lineStarts&&this._lineStarts.changeValue(t,this._lines[t].length+this._eol.length)}_acceptDeleteRange(t){if(t.startLineNumber===t.endLineNumber){if(t.startColumn===t.endColumn)return;this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.startLineNumber-1].substring(t.endColumn-1));return}this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.endLineNumber-1].substring(t.endColumn-1)),this._lines.splice(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(t.startLineNumber,t.endLineNumber-t.startLineNumber)}_acceptInsertText(t,r){if(r.length===0)return;let n=ss(r);if(n.length===1){this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]+this._lines[t.lineNumber-1].substring(t.column-1));return}n[n.length-1]+=this._lines[t.lineNumber-1].substring(t.column-1),this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]);let i=new Uint32Array(n.length-1);for(let s=1;s<n.length;s++)this._lines.splice(t.lineNumber+s-1,0,n[s]),i[s-1]=n[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(t.lineNumber,i)}}const Ps="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Es(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const r of Ps)e.indexOf(r)>=0||(t+="\\"+r);return t+="\\s]+)",new RegExp(t,"g")}const Ms=Es();function Is(e){let t=Ms;if(e&&e instanceof RegExp)if(e.global)t=e;else{let r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),t=new RegExp(e.source,r)}return t.lastIndex=0,t}const Fs={maxLen:1e3,windowSize:15,timeBudget:150};function un(e,t,r,n,i=Fs){if(r.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:n+=l,r=r.substring(l,e+i.maxLen/2),un(e,t,r,n,i)}const s=Date.now(),a=e-1-n;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const c=a-i.windowSize*l;t.lastIndex=Math.max(0,c);const f=Rs(t,r,a,o);if(!f&&u||(u=f,c<=0))break;o=c}if(u){let l={word:u[0],startColumn:n+1+u.index,endColumn:n+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function Rs(e,t,r,n){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=r&&e.lastIndex>=r)return i;if(n>0&&s>n)return null}return null}class Kt{constructor(t){let r=on(t);this._defaultValue=r,this._asciiMap=Kt._createAsciiMap(r),this._map=new Map}static _createAsciiMap(t){let r=new Uint8Array(256);for(let n=0;n<256;n++)r[n]=t;return r}set(t,r){let n=on(r);t>=0&&t<256?this._asciiMap[t]=n:this._map.set(t,n)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Ds{constructor(t,r,n){const i=new Uint8Array(t*r);for(let s=0,a=t*r;s<a;s++)i[s]=n;this._data=i,this.rows=t,this.cols=r}get(t,r){return this._data[t*this.cols+r]}set(t,r,n){this._data[t*this.cols+r]=n}}class js{constructor(t){let r=0,n=0;for(let s=0,a=t.length;s<a;s++){let[o,u,l]=t[s];u>r&&(r=u),o>n&&(n=o),l>n&&(n=l)}r++,n++;let i=new Ds(n,r,0);for(let s=0,a=t.length;s<a;s++){let[o,u,l]=t[s];i.set(o,u,l)}this._states=i,this._maxCharCode=r}nextState(t,r){return r<0||r>=this._maxCharCode?0:this._states.get(t,r)}}let er=null;function Us(){return er===null&&(er=new js([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),er}let at=null;function Os(){if(at===null){at=new Kt(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let r=0;r<e.length;r++)at.set(e.charCodeAt(r),1);const t=".,;";for(let r=0;r<t.length;r++)at.set(t.charCodeAt(r),2)}return at}class wt{static _createLink(t,r,n,i,s){let a=s-1;do{const o=r.charCodeAt(a);if(t.get(o)!==2)break;a--}while(a>i);if(i>0){const o=r.charCodeAt(i-1),u=r.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:a+2},url:r.substring(i,a+1)}}static computeLinks(t,r=Us()){const n=Os();let i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,c=0,f=0,h=1,g=!1,m=!1,v=!1,b=!1;for(;l<u;){let N=!1;const p=o.charCodeAt(l);if(h===13){let d;switch(p){case 40:g=!0,d=0;break;case 41:d=g?0:1;break;case 91:v=!0,m=!0,d=0;break;case 93:v=!1,d=m?0:1;break;case 123:b=!0,d=0;break;case 125:d=b?0:1;break;case 39:d=f===34||f===96?0:1;break;case 34:d=f===39||f===96?0:1;break;case 96:d=f===39||f===34?0:1;break;case 42:d=f===42?1:0;break;case 124:d=f===124?1:0;break;case 32:d=v?0:1;break;default:d=n.get(p)}d===1&&(i.push(wt._createLink(n,o,s,c,l)),N=!0)}else if(h===12){let d;p===91?(m=!0,d=0):d=n.get(p),d===1?N=!0:h=13}else h=r.nextState(h,p),h===0&&(N=!0);N&&(h=1,g=!1,m=!1,b=!1,c=l+1,f=p),l++}h===13&&i.push(wt._createLink(n,o,s,c,u))}return i}}function Vs(e){return!e||typeof e.getLineCount!="function"||typeof e.getLineContent!="function"?[]:wt.computeLinks(e)}class tr{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(t,r,n,i,s){if(t&&r){let a=this.doNavigateValueSet(r,s);if(a)return{range:t,value:a}}if(n&&i){let a=this.doNavigateValueSet(i,s);if(a)return{range:n,value:a}}return null}doNavigateValueSet(t,r){let n=this.numberReplace(t,r);return n!==null?n:this.textReplace(t,r)}numberReplace(t,r){let n=Math.pow(10,t.length-(t.lastIndexOf(".")+1)),i=Number(t),s=parseFloat(t);return!isNaN(i)&&!isNaN(s)&&i===s?i===0&&!r?null:(i=Math.floor(i*n),i+=r?n:-n,String(i/n)):null}textReplace(t,r){return this.valueSetsReplace(this._defaultValueSet,t,r)}valueSetsReplace(t,r,n){let i=null;for(let s=0,a=t.length;i===null&&s<a;s++)i=this.valueSetReplace(t[s],r,n);return i}valueSetReplace(t,r,n){let i=t.indexOf(r);return i>=0?(i+=n?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}tr.INSTANCE=new tr;class H{constructor(t){this.element=t,this.next=H.Undefined,this.prev=H.Undefined}}H.Undefined=new H(void 0);class ln{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let t=this._first;for(;t!==H.Undefined;){const r=t.next;t.prev=H.Undefined,t.next=H.Undefined,t=r}this._first=H.Undefined,this._last=H.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,r){const n=new H(t);if(this._first===H.Undefined)this._first=n,this._last=n;else if(r){const s=this._last;this._last=n,n.prev=s,s.next=n}else{const s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==H.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==H.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==H.Undefined&&t.next!==H.Undefined){const r=t.prev;r.next=t.next,t.next.prev=r}else t.prev===H.Undefined&&t.next===H.Undefined?(this._first=H.Undefined,this._last=H.Undefined):t.next===H.Undefined?(this._last=this._last.prev,this._last.next=H.Undefined):t.prev===H.Undefined&&(this._first=this._first.next,this._first.prev=H.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==H.Undefined;)yield t.element,t=t.next}}const $s=ee.performance&&typeof ee.performance.now=="function";class Nt{constructor(t){this._highResolution=$s&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new Nt(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ee.performance.now():Date.now()}}var rr;(function(e){e.None=()=>$r.None;function t(p){return(d,_=null,L)=>{let S=!1,A;return A=p(w=>{if(!S)return A?A.dispose():S=!0,d.call(_,w)},null,L),S&&A.dispose(),A}}e.once=t;function r(p,d){return u((_,L=null,S)=>p(A=>_.call(L,d(A)),null,S))}e.map=r;function n(p,d){return u((_,L=null,S)=>p(A=>{d(A),_.call(L,A)},null,S))}e.forEach=n;function i(p,d){return u((_,L=null,S)=>p(A=>d(A)&&_.call(L,A),null,S))}e.filter=i;function s(p){return p}e.signal=s;function a(...p){return(d,_=null,L)=>Qi(...p.map(S=>S(A=>d.call(_,A),null,L)))}e.any=a;function o(p,d,_){let L=_;return r(p,S=>(L=d(L,S),L))}e.reduce=o;function u(p){let d;const _=new ye({onFirstListenerAdd(){d=p(_.fire,_)},onLastListenerRemove(){d.dispose()}});return _.event}function l(p,d,_=100,L=!1,S){let A,w,y,T=0;const P=new ye({leakWarningThreshold:S,onFirstListenerAdd(){A=p(k=>{T++,w=d(w,k),L&&!y&&(P.fire(w),w=void 0),clearTimeout(y),y=setTimeout(()=>{const F=w;w=void 0,y=void 0,(!L||T>1)&&P.fire(F),T=0},_)})},onLastListenerRemove(){A.dispose()}});return P.event}e.debounce=l;function c(p,d=(_,L)=>_===L){let _=!0,L;return i(p,S=>{const A=_||!d(S,L);return _=!1,L=S,A})}e.latch=c;function f(p,d){return[e.filter(p,d),e.filter(p,_=>!d(_))]}e.split=f;function h(p,d=!1,_=[]){let L=_.slice(),S=p(y=>{L?L.push(y):w.fire(y)});const A=()=>{L&&L.forEach(y=>w.fire(y)),L=null},w=new ye({onFirstListenerAdd(){S||(S=p(y=>w.fire(y)))},onFirstListenerDidAdd(){L&&(d?setTimeout(A):A())},onLastListenerRemove(){S&&S.dispose(),S=null}});return w.event}e.buffer=h;class g{constructor(d){this.event=d}map(d){return new g(r(this.event,d))}forEach(d){return new g(n(this.event,d))}filter(d){return new g(i(this.event,d))}reduce(d,_){return new g(o(this.event,d,_))}latch(){return new g(c(this.event))}debounce(d,_=100,L=!1,S){return new g(l(this.event,d,_,L,S))}on(d,_,L){return this.event(d,_,L)}once(d,_,L){return t(this.event)(d,_,L)}}function m(p){return new g(p)}e.chain=m;function v(p,d,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.on(d,L),A=()=>p.removeListener(d,L),w=new ye({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromNodeEventEmitter=v;function b(p,d,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.addEventListener(d,L),A=()=>p.removeEventListener(d,L),w=new ye({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromDOMEventEmitter=b;function N(p){return new Promise(d=>t(p)(d))}e.toPromise=N})(rr||(rr={}));class Lt{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Lt._idPool++}`}start(t){this._stopWatch=new Nt(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Lt._idPool=0;class ye{constructor(t){var r;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new Lt(this._options._profName):void 0}get event(){return this._event||(this._event=(t,r,n)=>{var i;this._listeners||(this._listeners=new ln);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(r?[t,r]:t);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,r);const o=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size);let u;return u={dispose:()=>{o&&o(),u.dispose=ye._noop,this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))}},n instanceof rt?n.add(u):Array.isArray(n)&&n.push(u),u}),this._event}fire(t){var r,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ln);for(let i of this._listeners)this._deliveryQueue.push([i,t]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,s]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,s):i[0].call(i[1],s)}catch(a){Yi(a)}}(n=this._perfMon)===null||n===void 0||n.stop()}}dispose(){var t,r,n,i,s;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(i=(n=this._options)===null||n===void 0?void 0:n.onLastListenerRemove)===null||i===void 0||i.call(n),(s=this._leakageMon)===null||s===void 0||s.dispose())}}ye._noop=function(){};const fn=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}});var Ct;(function(e){function t(r){return r===e.None||r===e.Cancelled||r instanceof xt?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:rr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:fn})})(Ct||(Ct={}));class xt{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?fn:(this._emitter||(this._emitter=new ye),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Ws{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new xt),this._token}cancel(){this._token?this._token instanceof xt&&this._token.cancel():this._token=Ct.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof xt&&this._token.dispose():this._token=Ct.None}}class nr{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,r){this._keyCodeToStr[t]=r,this._strToKeyCode[r.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const ir=new nr,sr=new nr,ar=new nr;(function(){function e(t,r,n=r,i=n){ir.define(t,r),sr.define(t,n),ar.define(t,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var cn;(function(e){function t(a){return ir.keyCodeToStr(a)}e.toString=t;function r(a){return ir.strToKeyCode(a)}e.fromString=r;function n(a){return sr.keyCodeToStr(a)}e.toUserSettingsUS=n;function i(a){return ar.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return sr.strToKeyCode(a)||ar.strToKeyCode(a)}e.fromUserSettings=s})(cn||(cn={}));function qs(e,t){const r=(t&65535)<<16>>>0;return(e|r)>>>0}class de extends Ge{constructor(t,r,n,i){super(t,r,n,i),this.selectionStartLineNumber=t,this.selectionStartColumn=r,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return de.selectionsEqual(this,t)}static selectionsEqual(t,r){return t.selectionStartLineNumber===r.selectionStartLineNumber&&t.selectionStartColumn===r.selectionStartColumn&&t.positionLineNumber===r.positionLineNumber&&t.positionColumn===r.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,r){return this.getDirection()===0?new de(this.startLineNumber,this.startColumn,t,r):new de(t,r,this.startLineNumber,this.startColumn)}getPosition(){return new ze(this.positionLineNumber,this.positionColumn)}setStartPosition(t,r){return this.getDirection()===0?new de(t,r,this.endLineNumber,this.endColumn):new de(this.endLineNumber,this.endColumn,t,r)}static fromPositions(t,r=t){return new de(t.lineNumber,t.column,r.lineNumber,r.column)}static liftSelection(t){return new de(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,r){if(t&&!r||!t&&r)return!1;if(!t&&!r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;n<i;n++)if(!this.selectionsEqual(t[n],r[n]))return!1;return!0}static isISelection(t){return t&&typeof t.selectionStartLineNumber=="number"&&typeof t.selectionStartColumn=="number"&&typeof t.positionLineNumber=="number"&&typeof t.positionColumn=="number"}static createWithDirection(t,r,n,i,s){return s===0?new de(t,r,n,i):new de(n,i,t,r)}}class Hs{constructor(t,r,n){this._tokenBrand=void 0,this.offset=t|0,this.type=r,this.language=n}toString(){return"("+this.offset+", "+this.type+")"}}var hn;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(hn||(hn={}));var gn;(function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(gn||(gn={}));var dn;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(dn||(dn={}));var mn;(function(e){e[e.Deprecated=1]="Deprecated"})(mn||(mn={}));var pn;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(pn||(pn={}));var vn;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(vn||(vn={}));var bn;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(bn||(bn={}));var yn;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(yn||(yn={}));var Sn;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Sn||(Sn={}));var _n;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(_n||(_n={}));var An;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.codeLens=12]="codeLens",e[e.codeLensFontFamily=13]="codeLensFontFamily",e[e.codeLensFontSize=14]="codeLensFontSize",e[e.colorDecorators=15]="colorDecorators",e[e.columnSelection=16]="columnSelection",e[e.comments=17]="comments",e[e.contextmenu=18]="contextmenu",e[e.copyWithSyntaxHighlighting=19]="copyWithSyntaxHighlighting",e[e.cursorBlinking=20]="cursorBlinking",e[e.cursorSmoothCaretAnimation=21]="cursorSmoothCaretAnimation",e[e.cursorStyle=22]="cursorStyle",e[e.cursorSurroundingLines=23]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=24]="cursorSurroundingLinesStyle",e[e.cursorWidth=25]="cursorWidth",e[e.disableLayerHinting=26]="disableLayerHinting",e[e.disableMonospaceOptimizations=27]="disableMonospaceOptimizations",e[e.domReadOnly=28]="domReadOnly",e[e.dragAndDrop=29]="dragAndDrop",e[e.emptySelectionClipboard=30]="emptySelectionClipboard",e[e.extraEditorClassName=31]="extraEditorClassName",e[e.fastScrollSensitivity=32]="fastScrollSensitivity",e[e.find=33]="find",e[e.fixedOverflowWidgets=34]="fixedOverflowWidgets",e[e.folding=35]="folding",e[e.foldingStrategy=36]="foldingStrategy",e[e.foldingHighlight=37]="foldingHighlight",e[e.unfoldOnClickAfterEndOfLine=38]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=39]="fontFamily",e[e.fontInfo=40]="fontInfo",e[e.fontLigatures=41]="fontLigatures",e[e.fontSize=42]="fontSize",e[e.fontWeight=43]="fontWeight",e[e.formatOnPaste=44]="formatOnPaste",e[e.formatOnType=45]="formatOnType",e[e.glyphMargin=46]="glyphMargin",e[e.gotoLocation=47]="gotoLocation",e[e.hideCursorInOverviewRuler=48]="hideCursorInOverviewRuler",e[e.highlightActiveIndentGuide=49]="highlightActiveIndentGuide",e[e.hover=50]="hover",e[e.inDiffEditor=51]="inDiffEditor",e[e.inlineSuggest=52]="inlineSuggest",e[e.letterSpacing=53]="letterSpacing",e[e.lightbulb=54]="lightbulb",e[e.lineDecorationsWidth=55]="lineDecorationsWidth",e[e.lineHeight=56]="lineHeight",e[e.lineNumbers=57]="lineNumbers",e[e.lineNumbersMinChars=58]="lineNumbersMinChars",e[e.linkedEditing=59]="linkedEditing",e[e.links=60]="links",e[e.matchBrackets=61]="matchBrackets",e[e.minimap=62]="minimap",e[e.mouseStyle=63]="mouseStyle",e[e.mouseWheelScrollSensitivity=64]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=65]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=66]="multiCursorMergeOverlapping",e[e.multiCursorModifier=67]="multiCursorModifier",e[e.multiCursorPaste=68]="multiCursorPaste",e[e.occurrencesHighlight=69]="occurrencesHighlight",e[e.overviewRulerBorder=70]="overviewRulerBorder",e[e.overviewRulerLanes=71]="overviewRulerLanes",e[e.padding=72]="padding",e[e.parameterHints=73]="parameterHints",e[e.peekWidgetDefaultFocus=74]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=75]="definitionLinkOpensInPeek",e[e.quickSuggestions=76]="quickSuggestions",e[e.quickSuggestionsDelay=77]="quickSuggestionsDelay",e[e.readOnly=78]="readOnly",e[e.renameOnType=79]="renameOnType",e[e.renderControlCharacters=80]="renderControlCharacters",e[e.renderIndentGuides=81]="renderIndentGuides",e[e.renderFinalNewline=82]="renderFinalNewline",e[e.renderLineHighlight=83]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=84]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=85]="renderValidationDecorations",e[e.renderWhitespace=86]="renderWhitespace",e[e.revealHorizontalRightPadding=87]="revealHorizontalRightPadding",e[e.roundedSelection=88]="roundedSelection",e[e.rulers=89]="rulers",e[e.scrollbar=90]="scrollbar",e[e.scrollBeyondLastColumn=91]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=92]="scrollBeyondLastLine",e[e.scrollPredominantAxis=93]="scrollPredominantAxis",e[e.selectionClipboard=94]="selectionClipboard",e[e.selectionHighlight=95]="selectionHighlight",e[e.selectOnLineNumbers=96]="selectOnLineNumbers",e[e.showFoldingControls=97]="showFoldingControls",e[e.showUnused=98]="showUnused",e[e.snippetSuggestions=99]="snippetSuggestions",e[e.smartSelect=100]="smartSelect",e[e.smoothScrolling=101]="smoothScrolling",e[e.stickyTabStops=102]="stickyTabStops",e[e.stopRenderingLineAfter=103]="stopRenderingLineAfter",e[e.suggest=104]="suggest",e[e.suggestFontSize=105]="suggestFontSize",e[e.suggestLineHeight=106]="suggestLineHeight",e[e.suggestOnTriggerCharacters=107]="suggestOnTriggerCharacters",e[e.suggestSelection=108]="suggestSelection",e[e.tabCompletion=109]="tabCompletion",e[e.tabIndex=110]="tabIndex",e[e.unusualLineTerminators=111]="unusualLineTerminators",e[e.useShadowDOM=112]="useShadowDOM",e[e.useTabStops=113]="useTabStops",e[e.wordSeparators=114]="wordSeparators",e[e.wordWrap=115]="wordWrap",e[e.wordWrapBreakAfterCharacters=116]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=117]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=118]="wordWrapColumn",e[e.wordWrapOverride1=119]="wordWrapOverride1",e[e.wordWrapOverride2=120]="wordWrapOverride2",e[e.wrappingIndent=121]="wrappingIndent",e[e.wrappingStrategy=122]="wrappingStrategy",e[e.showDeprecated=123]="showDeprecated",e[e.inlayHints=124]="inlayHints",e[e.editorClassName=125]="editorClassName",e[e.pixelRatio=126]="pixelRatio",e[e.tabFocusMode=127]="tabFocusMode",e[e.layoutInfo=128]="layoutInfo",e[e.wrappingInfo=129]="wrappingInfo"})(An||(An={}));var wn;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(wn||(wn={}));var Nn;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(Nn||(Nn={}));var Ln;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(Ln||(Ln={}));var Cn;(function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Cn||(Cn={}));var xn;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(xn||(xn={}));var or;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"})(or||(or={}));var ur;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(ur||(ur={}));var lr;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(lr||(lr={}));var kn;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(kn||(kn={}));var Tn;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Tn||(Tn={}));var Pn;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(Pn||(Pn={}));var En;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(En||(En={}));var Mn;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(Mn||(Mn={}));var In;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(In||(In={}));var Fn;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Fn||(Fn={}));var Rn;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Rn||(Rn={}));var fr;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(fr||(fr={}));var Dn;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Dn||(Dn={}));var jn;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(jn||(jn={}));var Un;(function(e){e[e.Deprecated=1]="Deprecated"})(Un||(Un={}));var On;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(On||(On={}));var Vn;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(Vn||(Vn={}));var $n;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})($n||($n={}));var Wn;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Wn||(Wn={}));class ot{static chord(t,r){return qs(t,r)}}ot.CtrlCmd=2048,ot.Shift=1024,ot.Alt=512,ot.WinCtrl=256;function Bs(){return{editor:void 0,languages:void 0,CancellationTokenSource:Ws,Emitter:ye,KeyCode:or,KeyMod:ot,Position:ze,Range:Ge,Selection:de,SelectionDirection:fr,MarkerSeverity:ur,MarkerTag:lr,Uri:Gt,Token:Hs}}var Qe=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})};class Ys extends Ts{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(t){return this._lines[t-1]}getWordAtPosition(t,r){let n=un(t.column,Is(r),this._lines[t.lineNumber-1],0);return n?new Ge(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn):null}words(t){const r=this._lines,n=this._wordenize.bind(this);let i=0,s="",a=0,o=[];return{*[Symbol.iterator](){for(;;)if(a<o.length){const u=s.substring(o[a].start,o[a].end);a+=1,yield u}else if(i<r.length)s=r[i],o=n(s,t),a=0,i+=1;else break}}}getLineWords(t,r){let n=this._lines[t-1],i=this._wordenize(n,r),s=[];for(const a of i)s.push({word:n.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1});return s}_wordenize(t,r){const n=[];let i;for(r.lastIndex=0;(i=r.exec(t))&&i[0].length!==0;)n.push({start:i.index,end:i.index+i[0].length});return n}getValueInRange(t){if(t=this._validateRange(t),t.startLineNumber===t.endLineNumber)return this._lines[t.startLineNumber-1].substring(t.startColumn-1,t.endColumn-1);let r=this._eol,n=t.startLineNumber-1,i=t.endLineNumber-1,s=[];s.push(this._lines[n].substring(t.startColumn-1));for(let a=n+1;a<i;a++)s.push(this._lines[a]);return s.push(this._lines[i].substring(0,t.endColumn-1)),s.join(r)}offsetAt(t){return t=this._validatePosition(t),this._ensureLineStarts(),this._lineStarts.getPrefixSum(t.lineNumber-2)+(t.column-1)}positionAt(t){t=Math.floor(t),t=Math.max(0,t),this._ensureLineStarts();let r=this._lineStarts.getIndexOf(t),n=this._lines[r.index].length;return{lineNumber:1+r.index,column:1+Math.min(r.remainder,n)}}_validateRange(t){const r=this._validatePosition({lineNumber:t.startLineNumber,column:t.startColumn}),n=this._validatePosition({lineNumber:t.endLineNumber,column:t.endColumn});return r.lineNumber!==t.startLineNumber||r.column!==t.startColumn||n.lineNumber!==t.endLineNumber||n.column!==t.endColumn?{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:n.lineNumber,endColumn:n.column}:t}_validatePosition(t){if(!ze.isIPosition(t))throw new Error("bad position");let{lineNumber:r,column:n}=t,i=!1;if(r<1)r=1,n=1,i=!0;else if(r>this._lines.length)r=this._lines.length,n=this._lines[r-1].length+1,i=!0;else{let s=this._lines[r-1].length+1;n<1?(n=1,i=!0):n>s&&(n=s,i=!0)}return i?{lineNumber:r,column:n}:t}}class Xe{constructor(t,r){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=r,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(r=>t.push(this._models[r])),t}acceptNewModel(t){this._models[t.url]=new Ys(Gt.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,r){if(!this._models[t])return;this._models[t].onEvents(r)}acceptRemovedModel(t){this._models[t]&&delete this._models[t]}computeDiff(t,r,n,i){return Qe(this,void 0,void 0,function*(){const s=this._getModel(t),a=this._getModel(r);if(!s||!a)return null;const o=s.getLinesContent(),u=a.getLinesContent(),c=new Cs(o,u,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),f=c.changes.length>0?!1:this._modelsAreIdentical(s,a);return{quitEarly:c.quitEarly,identical:f,changes:c.changes}})}_modelsAreIdentical(t,r){const n=t.getLineCount(),i=r.getLineCount();if(n!==i)return!1;for(let s=1;s<=n;s++){const a=t.getLineContent(s),o=r.getLineContent(s);if(a!==o)return!1}return!0}computeMoreMinimalEdits(t,r){return Qe(this,void 0,void 0,function*(){const n=this._getModel(t);if(!n)return r;const i=[];let s;r=r.slice(0).sort((a,o)=>{if(a.range&&o.range)return Ge.compareRangesUsingStarts(a.range,o.range);let u=a.range?0:1,l=o.range?0:1;return u-l});for(let{range:a,text:o,eol:u}of r){if(typeof u=="number"&&(s=u),Ge.isEmpty(a)&&!o)continue;const l=n.getValueInRange(a);if(o=o.replace(/\r\n|\n|\r/g,n.eol),l===o)continue;if(Math.max(o.length,l.length)>Xe._diffLimit){i.push({range:a,text:o});continue}const c=ls(l,o,!1),f=n.offsetAt(Ge.lift(a).getStartPosition());for(const h of c){const g=n.positionAt(f+h.originalStart),m=n.positionAt(f+h.originalStart+h.originalLength),v={text:o.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:m.lineNumber,endColumn:m.column}};n.getValueInRange(v.range)!==v.text&&i.push(v)}}return typeof s=="number"&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(t){return Qe(this,void 0,void 0,function*(){let r=this._getModel(t);return r?Vs(r):null})}textualSuggest(t,r,n,i){return Qe(this,void 0,void 0,function*(){const s=new Nt(!0),a=new RegExp(n,i),o=new Set;e:for(let u of t){const l=this._getModel(u);if(l){for(let c of l.words(a))if(!(c===r||!isNaN(Number(c)))&&(o.add(c),o.size>Xe._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(t,r,n,i){return Qe(this,void 0,void 0,function*(){let s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(n,i),o=Object.create(null);for(let u=r.startLineNumber;u<r.endLineNumber;u++){let l=s.getLineWords(u,a);for(const c of l){if(!isNaN(Number(c.word)))continue;let f=o[c.word];f||(f=[],o[c.word]=f),f.push({startLineNumber:u,startColumn:c.startColumn,endLineNumber:u,endColumn:c.endColumn})}}return o})}navigateValueSet(t,r,n,i,s){return Qe(this,void 0,void 0,function*(){let a=this._getModel(t);if(!a)return null;let o=new RegExp(i,s);r.startColumn===r.endColumn&&(r={startLineNumber:r.startLineNumber,startColumn:r.startColumn,endLineNumber:r.endLineNumber,endColumn:r.endColumn+1});let u=a.getValueInRange(r),l=a.getWordAtPosition({lineNumber:r.startLineNumber,column:r.startColumn},o);if(!l)return null;let c=a.getValueInRange(l);return tr.INSTANCE.navigateValueSet(r,u,l,c,n)})}loadForeignModule(t,r,n){let a={host:Hr(n,(o,u)=>this._host.fhr(o,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,r),Promise.resolve(Bt(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,r){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,r))}catch(n){return Promise.reject(n)}}}Xe._diffLimit=1e5,Xe._suggestionsLimit=1e4,typeof importScripts=="function"&&(ee.monaco=Bs());let cr=!1;function qn(e){if(cr)return;cr=!0;const t=new is(r=>{self.postMessage(r)},r=>new Xe(r,e));self.onmessage=r=>{t.onmessage(r.data)}}self.onmessage=e=>{cr||qn(null)};function hr(e,t){t===void 0&&(t=!1);var r=e.length,n=0,i="",s=0,a=16,o=0,u=0,l=0,c=0,f=0;function h(d,_){for(var L=0,S=0;L<d;){var A=e.charCodeAt(n);if(A>=48&&A<=57)S=S*16+A-48;else if(A>=65&&A<=70)S=S*16+A-65+10;else if(A>=97&&A<=102)S=S*16+A-97+10;else break;n++,L++}return L<d&&(S=-1),S}function g(d){n=d,i="",s=0,a=16,f=0}function m(){var d=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&Ze(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&Ze(e.charCodeAt(n)))for(n++;n<e.length&&Ze(e.charCodeAt(n));)n++;else return f=3,e.substring(d,n);var _=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&Ze(e.charCodeAt(n))){for(n++;n<e.length&&Ze(e.charCodeAt(n));)n++;_=n}else f=3;return e.substring(d,_)}function v(){for(var d="",_=n;;){if(n>=r){d+=e.substring(_,n),f=2;break}var L=e.charCodeAt(n);if(L===34){d+=e.substring(_,n),n++;break}if(L===92){if(d+=e.substring(_,n),n++,n>=r){f=2;break}var S=e.charCodeAt(n++);switch(S){case 34:d+='"';break;case 92:d+="\\";break;case 47:d+="/";break;case 98:d+="\b";break;case 102:d+="\f";break;case 110:d+=`
`;break;case 114:d+="\r";break;case 116:d+=" ";break;case 117:var A=h(4);A>=0?d+=String.fromCharCode(A):f=4;break;default:f=5}_=n;continue}if(L>=0&&L<=31)if(ut(L)){d+=e.substring(_,n),f=2;break}else f=6;n++}return d}function b(){if(i="",f=0,s=n,u=o,c=l,n>=r)return s=r,a=17;var d=e.charCodeAt(n);if(gr(d)){do n++,i+=String.fromCharCode(d),d=e.charCodeAt(n);while(gr(d));return a=15}if(ut(d))return n++,i+=String.fromCharCode(d),d===13&&e.charCodeAt(n)===10&&(n++,i+=`
`),o++,l=n,a=14;switch(d){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=v(),a=10;case 47:var _=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<r&&!ut(e.charCodeAt(n));)n++;return i=e.substring(_,n),a=12}if(e.charCodeAt(n+1)===42){n+=2;for(var L=r-1,S=!1;n<L;){var A=e.charCodeAt(n);if(A===42&&e.charCodeAt(n+1)===47){n+=2,S=!0;break}n++,ut(A)&&(A===13&&e.charCodeAt(n)===10&&n++,o++,l=n)}return S||(n++,f=1),i=e.substring(_,n),a=13}return i+=String.fromCharCode(d),n++,a=16;case 45:if(i+=String.fromCharCode(d),n++,n===r||!Ze(e.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),a=11;default:for(;n<r&&N(d);)n++,d=e.charCodeAt(n);if(s!==n){switch(i=e.substring(s,n),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(d),n++,a=16}}function N(d){if(gr(d)||ut(d))return!1;switch(d){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function p(){var d;do d=b();while(d>=12&&d<=15);return d}return{setPosition:g,getPosition:function(){return n},scan:t?p:b,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return s},getTokenLength:function(){return n-s},getTokenStartLine:function(){return u},getTokenStartCharacter:function(){return s-c},getTokenError:function(){return f}}}function gr(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 ut(e){return e===10||e===13||e===8232||e===8233}function Ze(e){return e>=48&&e<=57}function zs(e,t,r){var n,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!Hn(e,s-1);)s--;for(var u=o;u<e.length&&!Hn(e,u);)u++;i=e.substring(s,u),n=Gs(i,r)}else i=e,n=0,s=0,a=0,o=e.length;var l=Js(r,e),c=!1,f=0,h;r.insertSpaces?h=dr(" ",r.tabSize||4):h=" ";var g=hr(i,!1),m=!1;function v(){return l+dr(h,n+f)}function b(){var k=g.scan();for(c=!1;k===15||k===14;)c=c||k===14,k=g.scan();return m=k===16||g.getTokenError()!==0,k}var N=[];function p(k,F,V){!m&&(!t||F<o&&V>a)&&e.substring(F,V)!==k&&N.push({offset:F,length:V-F,content:k})}var d=b();if(d!==17){var _=g.getTokenOffset()+s,L=dr(h,n);p(L,s,_)}for(;d!==17;){for(var S=g.getTokenOffset()+g.getTokenLength()+s,A=b(),w="",y=!1;!c&&(A===12||A===13);){var T=g.getTokenOffset()+s;p(" ",S,T),S=g.getTokenOffset()+g.getTokenLength()+s,y=A===12,w=y?v():"",A=b()}if(A===2)d!==1&&(f--,w=v());else if(A===4)d!==3&&(f--,w=v());else{switch(d){case 3:case 1:f++,w=v();break;case 5:case 12:w=v();break;case 13:c?w=v():y||(w=" ");break;case 6:y||(w=" ");break;case 10:if(A===6){y||(w="");break}case 7:case 8:case 9:case 11:case 2:case 4:A===12||A===13?y||(w=" "):A!==5&&A!==17&&(m=!0);break;case 16:m=!0;break}c&&(A===12||A===13)&&(w=v())}A===17&&(w=r.insertFinalNewline?l:"");var P=g.getTokenOffset()+s;p(w,S,P),d=A}return N}function dr(e,t){for(var r="",n=0;n<t;n++)r+=e;return r}function Gs(e,t){for(var r=0,n=0,i=t.tabSize||4;r<e.length;){var s=e.charAt(r);if(s===" ")n++;else if(s===" ")n+=i;else break;r++}return Math.floor(n/i)}function Js(e,t){for(var r=0;r<t.length;r++){var n=t.charAt(r);if(n==="\r")return r+1<t.length&&t.charAt(r+1)===`
`?`\r
`:"\r";if(n===`
`)return`
`}return e&&e.eol||`
`}function Hn(e,t){return`\r
`.indexOf(e.charAt(t))!==-1}var kt;(function(e){e.DEFAULT={allowTrailingComma:!1}})(kt||(kt={}));function Qs(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=kt.DEFAULT);var n=null,i=[],s=[];function a(u){Array.isArray(i)?i.push(u):n!==null&&(i[n]=u)}var o={onObjectBegin:function(){var u={};a(u),s.push(i),i=u,n=null},onObjectProperty:function(u){n=u},onObjectEnd:function(){i=s.pop()},onArrayBegin:function(){var u=[];a(u),s.push(i),i=u,n=null},onArrayEnd:function(){i=s.pop()},onLiteralValue:a,onError:function(u,l,c){t.push({error:u,offset:l,length:c})}};return Zs(e,o,r),i[0]}function Bn(e){if(!e.parent||!e.parent.children)return[];var t=Bn(e.parent);if(e.parent.type==="property"){var r=e.parent.children[0].value;t.push(r)}else if(e.parent.type==="array"){var n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function mr(e){switch(e.type){case"array":return e.children.map(mr);case"object":for(var t=Object.create(null),r=0,n=e.children;r<n.length;r++){var i=n[r],s=i.children[1];s&&(t[i.children[0].value]=mr(s))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Xs(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function Yn(e,t,r){if(r===void 0&&(r=!1),Xs(e,t,r)){var n=e.children;if(Array.isArray(n))for(var i=0;i<n.length&&n[i].offset<=t;i++){var s=Yn(n[i],t,r);if(s)return s}return e}}function Zs(e,t,r){r===void 0&&(r=kt.DEFAULT);var n=hr(e,!1);function i(y){return y?function(){return y(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}function s(y){return y?function(T){return y(T,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}var a=i(t.onObjectBegin),o=s(t.onObjectProperty),u=i(t.onObjectEnd),l=i(t.onArrayBegin),c=i(t.onArrayEnd),f=s(t.onLiteralValue),h=s(t.onSeparator),g=i(t.onComment),m=s(t.onError),v=r&&r.disallowComments,b=r&&r.allowTrailingComma;function N(){for(;;){var y=n.scan();switch(n.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:v||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(y){case 12:case 13:v?p(10):g();break;case 16:p(1);break;case 15:case 14:break;default:return y}}}function p(y,T,P){if(T===void 0&&(T=[]),P===void 0&&(P=[]),m(y),T.length+P.length>0)for(var k=n.getToken();k!==17;){if(T.indexOf(k)!==-1){N();break}else if(P.indexOf(k)!==-1)break;k=N()}}function d(y){var T=n.getTokenValue();return y?f(T):o(T),N(),!0}function _(){switch(n.getToken()){case 11:var y=n.getTokenValue(),T=Number(y);isNaN(T)&&(p(2),T=0),f(T);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return N(),!0}function L(){return n.getToken()!==10?(p(3,[],[2,5]),!1):(d(!1),n.getToken()===6?(h(":"),N(),w()||p(4,[],[2,5])):p(5,[],[2,5]),!0)}function S(){a(),N();for(var y=!1;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===2&&b)break}else y&&p(6,[],[]);L()||p(4,[],[2,5]),y=!0}return u(),n.getToken()!==2?p(7,[2],[]):N(),!0}function A(){l(),N();for(var y=!1;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===4&&b)break}else y&&p(6,[],[]);w()||p(4,[],[4,5]),y=!0}return c(),n.getToken()!==4?p(8,[4],[]):N(),!0}function w(){switch(n.getToken()){case 3:return A();case 1:return S();case 10:return d(!0);default:return _()}}return N(),n.getToken()===17?r.allowEmptyContent?!0:(p(4,[],[]),!1):w()?(n.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var Ke=hr,Ks=Qs,ea=Yn,ta=Bn,ra=mr;function na(e,t,r){return zs(e,t,r)}function lt(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!lt(e[r],t[r]))return!1}else{var i=[];for(n in e)i.push(n);i.sort();var s=[];for(n in t)s.push(n);if(s.sort(),!lt(i,s))return!1;for(r=0;r<i.length;r++)if(!lt(e[i[r]],t[i[r]]))return!1}return!0}function le(e){return typeof e=="number"}function Ae(e){return typeof e<"u"}function Se(e){return typeof e=="boolean"}function ia(e){return typeof e=="string"}var zn;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(zn||(zn={}));var Tt;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647})(Tt||(Tt={}));var me;(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=Tt.MAX_VALUE),i===Number.MAX_VALUE&&(i=Tt.MAX_VALUE),{line:n,character:i}}e.create=t;function r(n){var i=n;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}e.is=r})(me||(me={}));var q;(function(e){function t(n,i,s,a){if(C.uinteger(n)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(a))return{start:me.create(n,i),end:me.create(s,a)};if(me.is(n)&&me.is(i))return{start:n,end:i};throw new Error("Range#create called with invalid arguments["+n+", "+i+", "+s+", "+a+"]")}e.create=t;function r(n){var i=n;return C.objectLiteral(i)&&me.is(i.start)&&me.is(i.end)}e.is=r})(q||(q={}));var ft;(function(e){function t(n,i){return{uri:n,range:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}e.is=r})(ft||(ft={}));var Gn;(function(e){function t(n,i,s,a){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.targetRange)&&C.string(i.targetUri)&&(q.is(i.targetSelectionRange)||C.undefined(i.targetSelectionRange))&&(q.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}e.is=r})(Gn||(Gn={}));var pr;(function(e){function t(n,i,s,a){return{red:n,green:i,blue:s,alpha:a}}e.create=t;function r(n){var i=n;return C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}e.is=r})(pr||(pr={}));var Jn;(function(e){function t(n,i){return{range:n,color:i}}e.create=t;function r(n){var i=n;return q.is(i.range)&&pr.is(i.color)}e.is=r})(Jn||(Jn={}));var Qn;(function(e){function t(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}e.create=t;function r(n){var i=n;return C.string(i.label)&&(C.undefined(i.textEdit)||pe.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,pe.is))}e.is=r})(Qn||(Qn={}));var ct;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ct||(ct={}));var Xn;(function(e){function t(n,i,s,a,o){var u={startLine:n,endLine:i};return C.defined(s)&&(u.startCharacter=s),C.defined(a)&&(u.endCharacter=a),C.defined(o)&&(u.kind=o),u}e.create=t;function r(n){var i=n;return C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}e.is=r})(Xn||(Xn={}));var vr;(function(e){function t(n,i){return{location:n,message:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&ft.is(i.location)&&C.string(i.message)}e.is=r})(vr||(vr={}));var fe;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(fe||(fe={}));var Zn;(function(e){e.Unnecessary=1,e.Deprecated=2})(Zn||(Zn={}));var Kn;(function(e){function t(r){var n=r;return n!=null&&C.string(n.href)}e.is=t})(Kn||(Kn={}));var we;(function(e){function t(n,i,s,a,o,u){var l={range:n,message:i};return C.defined(s)&&(l.severity=s),C.defined(a)&&(l.code=a),C.defined(o)&&(l.source=o),C.defined(u)&&(l.relatedInformation=u),l}e.create=t;function r(n){var i,s=n;return C.defined(s)&&q.is(s.range)&&C.string(s.message)&&(C.number(s.severity)||C.undefined(s.severity))&&(C.integer(s.code)||C.string(s.code)||C.undefined(s.code))&&(C.undefined(s.codeDescription)||C.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(C.string(s.source)||C.undefined(s.source))&&(C.undefined(s.relatedInformation)||C.typedArray(s.relatedInformation,vr.is))}e.is=r})(we||(we={}));var ht;(function(e){function t(n,i){for(var s=[],a=2;a<arguments.length;a++)s[a-2]=arguments[a];var o={title:n,command:i};return C.defined(s)&&s.length>0&&(o.arguments=s),o}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.title)&&C.string(i.command)}e.is=r})(ht||(ht={}));var pe;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function r(s,a){return{range:{start:s,end:s},newText:a}}e.insert=r;function n(s){return{range:s,newText:""}}e.del=n;function i(s){var a=s;return C.objectLiteral(a)&&C.string(a.newText)&&q.is(a.range)}e.is=i})(pe||(pe={}));var et;(function(e){function t(n,i,s){var a={label:n};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function r(n){var i=n;return i!==void 0&&C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}e.is=r})(et||(et={}));var ne;(function(e){function t(r){var n=r;return typeof n=="string"}e.is=t})(ne||(ne={}));var Pe;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function r(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=r;function n(s,a){return{range:s,newText:"",annotationId:a}}e.del=n;function i(s){var a=s;return pe.is(a)&&(et.is(a.annotationId)||ne.is(a.annotationId))}e.is=i})(Pe||(Pe={}));var Pt;(function(e){function t(n,i){return{textDocument:n,edits:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&Mt.is(i.textDocument)&&Array.isArray(i.edits)}e.is=r})(Pt||(Pt={}));var gt;(function(e){function t(n,i,s){var a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){var i=n;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(gt||(gt={}));var dt;(function(e){function t(n,i,s,a){var o={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function r(n){var i=n;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(dt||(dt={}));var mt;(function(e){function t(n,i,s){var a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){var i=n;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(mt||(mt={}));var br;(function(e){function t(r){var n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(i){return C.string(i.kind)?gt.is(i)||dt.is(i)||mt.is(i):Pt.is(i)}))}e.is=t})(br||(br={}));var Et=function(){function e(t,r){this.edits=t,this.changeAnnotations=r}return e.prototype.insert=function(t,r,n){var i,s;if(n===void 0?i=pe.insert(t,r):ne.is(n)?(s=n,i=Pe.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.insert(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.replace=function(t,r,n){var i,s;if(n===void 0?i=pe.replace(t,r):ne.is(n)?(s=n,i=Pe.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.replace(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.delete=function(t,r){var n,i;if(r===void 0?n=pe.del(t):ne.is(r)?(i=r,n=Pe.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=Pe.del(t,i)),this.edits.push(n),i!==void 0)return i},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}(),ei=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,r){var n;if(ne.is(t)?n=t:(n=this.nextId(),r=t),this._annotations[n]!==void 0)throw new Error("Id "+n+" is already in use.");if(r===void 0)throw new Error("No annotation provided for id "+n);return this._annotations[n]=r,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(t){var r=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new ei(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(n){if(Pt.is(n)){var i=new Et(n.edits,r._changeAnnotations);r._textEditChanges[n.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(n){var i=new Et(t.changes[n]);r._textEditChanges[n]=i})):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(Mt.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version},n=this._textEditChanges[r.uri];if(!n){var i=[],s={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(s),n=new Et(i,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[t];if(!n){var i=[];this._workspaceEdit.changes[t]=i,n=new Et(i),this._textEditChanges[t]=n}return n}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ei,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,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;et.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=gt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=gt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e.prototype.renameFile=function(t,r,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;et.is(n)||ne.is(n)?s=n:i=n;var a,o;if(s===void 0?a=dt.create(t,r,i):(o=ne.is(s)?s:this._changeAnnotations.manage(s),a=dt.create(t,r,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;et.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=mt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=mt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e})();var ti;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)}e.is=r})(ti||(ti={}));var ri;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}e.is=r})(ri||(ri={}));var Mt;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}e.is=r})(Mt||(Mt={}));var ni;(function(e){function t(n,i,s,a){return{uri:n,languageId:i,version:s,text:a}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}e.is=r})(ni||(ni={}));var Ne;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(Ne||(Ne={})),function(e){function t(r){var n=r;return n===e.PlainText||n===e.Markdown}e.is=t}(Ne||(Ne={}));var yr;(function(e){function t(r){var n=r;return C.objectLiteral(r)&&Ne.is(n.kind)&&C.string(n.value)}e.is=t})(yr||(yr={}));var ce;(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})(ce||(ce={}));var X;(function(e){e.PlainText=1,e.Snippet=2})(X||(X={}));var ii;(function(e){e.Deprecated=1})(ii||(ii={}));var si;(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}e.create=t;function r(n){var i=n;return i&&C.string(i.newText)&&q.is(i.insert)&&q.is(i.replace)}e.is=r})(si||(si={}));var ai;(function(e){e.asIs=1,e.adjustIndentation=2})(ai||(ai={}));var Sr;(function(e){function t(r){return{label:r}}e.create=t})(Sr||(Sr={}));var oi;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(oi||(oi={}));var It;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){var i=n;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}e.is=r})(It||(It={}));var ui;(function(e){function t(r){var n=r;return!!n&&C.objectLiteral(n)&&(yr.is(n.contents)||It.is(n.contents)||C.typedArray(n.contents,It.is))&&(r.range===void 0||q.is(r.range))}e.is=t})(ui||(ui={}));var li;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(li||(li={}));var fi;(function(e){function t(r,n){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var a={label:r};return C.defined(n)&&(a.documentation=n),C.defined(i)?a.parameters=i:a.parameters=[],a}e.create=t})(fi||(fi={}));var ci;(function(e){e.Text=1,e.Read=2,e.Write=3})(ci||(ci={}));var hi;(function(e){function t(r,n){var i={range:r};return C.number(n)&&(i.kind=n),i}e.create=t})(hi||(hi={}));var _e;(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})(_e||(_e={}));var gi;(function(e){e.Deprecated=1})(gi||(gi={}));var di;(function(e){function t(r,n,i,s,a){var o={name:r,kind:n,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(di||(di={}));var mi;(function(e){function t(n,i,s,a,o,u){var l={name:n,detail:i,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}e.create=t;function r(n){var i=n;return i&&C.string(i.name)&&C.number(i.kind)&&q.is(i.range)&&q.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=r})(mi||(mi={}));var pi;(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"})(pi||(pi={}));var vi;(function(e){function t(n,i){var s={diagnostics:n};return i!=null&&(s.only=i),s}e.create=t;function r(n){var i=n;return C.defined(i)&&C.typedArray(i.diagnostics,we.is)&&(i.only===void 0||C.typedArray(i.only,C.string))}e.is=r})(vi||(vi={}));var bi;(function(e){function t(n,i,s){var a={title:n},o=!0;return typeof i=="string"?(o=!1,a.kind=i):ht.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function r(n){var i=n;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,we.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||ht.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||br.is(i.edit))}e.is=r})(bi||(bi={}));var yi;(function(e){function t(n,i){var s={range:n};return C.defined(i)&&(s.data=i),s}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.undefined(i.command)||ht.is(i.command))}e.is=r})(yi||(yi={}));var Si;(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}e.is=r})(Si||(Si={}));var _i;(function(e){function t(n,i,s){return{range:n,target:i,data:s}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}e.is=r})(_i||(_i={}));var Ft;(function(e){function t(n,i){return{range:n,parent:i}}e.create=t;function r(n){var i=n;return i!==void 0&&q.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=r})(Ft||(Ft={}));var Ai;(function(e){function t(s,a,o,u){return new sa(s,a,o,u)}e.create=t;function r(s){var a=s;return!!(C.defined(a)&&C.string(a.uri)&&(C.undefined(a.languageId)||C.string(a.languageId))&&C.uinteger(a.lineCount)&&C.func(a.getText)&&C.func(a.positionAt)&&C.func(a.offsetAt))}e.is=r;function n(s,a){for(var o=s.getText(),u=i(a,function(m,v){var b=m.range.start.line-v.range.start.line;return b===0?m.range.start.character-v.range.start.character:b}),l=o.length,c=u.length-1;c>=0;c--){var f=u[c],h=s.offsetAt(f.range.start),g=s.offsetAt(f.range.end);if(g<=l)o=o.substring(0,h)+f.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");l=h}return o}e.applyEdits=n;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);for(var c=0,f=0,h=0;c<u.length&&f<l.length;){var g=a(u[c],l[f]);g<=0?s[h++]=u[c++]:s[h++]=l[f++]}for(;c<u.length;)s[h++]=u[c++];for(;f<l.length;)s[h++]=l[f++];return s}})(Ai||(Ai={}));var sa=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,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 r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],r=this._content,n=!0,i=0;i<r.length;i++){n&&(t.push(i),n=!1);var s=r.charAt(i);n=s==="\r"||s===`
`,s==="\r"&&i+1<r.length&&r.charAt(i+1)===`
`&&i++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return me.create(0,t);for(;n<i;){var s=Math.floor((n+i)/2);r[s]>t?i=s:n=s+1}var a=n-1;return me.create(a,t-r[a])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),C;(function(e){var t=Object.prototype.toString;function r(g){return typeof g<"u"}e.defined=r;function n(g){return typeof g>"u"}e.undefined=n;function i(g){return g===!0||g===!1}e.boolean=i;function s(g){return t.call(g)==="[object String]"}e.string=s;function a(g){return t.call(g)==="[object Number]"}e.number=a;function o(g,m,v){return t.call(g)==="[object Number]"&&m<=g&&g<=v}e.numberRange=o;function u(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=u;function l(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=l;function c(g){return t.call(g)==="[object Function]"}e.func=c;function f(g){return g!==null&&typeof g=="object"}e.objectLiteral=f;function h(g,m){return Array.isArray(g)&&g.every(m)}e.typedArray=h})(C||(C={}));var wi=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){for(var n=0,i=t;n<i.length;n++){var s=i[n];if(e.isIncremental(s)){var a=Li(s.range),o=this.offsetAt(a.start),u=this.offsetAt(a.end);this._content=this._content.substring(0,o)+s.text+this._content.substring(u,this._content.length);var l=Math.max(a.start.line,0),c=Math.max(a.end.line,0),f=this._lineOffsets,h=Ni(s.text,!1,o);if(c-l===h.length)for(var g=0,m=h.length;g<m;g++)f[g+l+1]=h[g];else h.length<1e4?f.splice.apply(f,[l+1,c-l].concat(h)):this._lineOffsets=f=f.slice(0,l+1).concat(h,f.slice(c+1));var v=s.text.length-(u-o);if(v!==0)for(var g=l+1+h.length,m=f.length;g<m;g++)f[g]=f[g]+v}else if(e.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=r},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Ni(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:t};for(;n<i;){var s=Math.floor((n+i)/2);r[s]>t?i=s:n=s+1}var a=n-1;return{line:a,character:t-r[a]}},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")},e.isFull=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0},e}(),_r;(function(e){function t(i,s,a,o){return new wi(i,s,a,o)}e.create=t;function r(i,s,a){if(i instanceof wi)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(i,s){for(var a=i.getText(),o=Ar(s.map(aa),function(m,v){var b=m.range.start.line-v.range.start.line;return b===0?m.range.start.character-v.range.start.character:b}),u=0,l=[],c=0,f=o;c<f.length;c++){var h=f[c],g=i.offsetAt(h.range.start);if(g<u)throw new Error("Overlapping edit");g>u&&l.push(a.substring(u,g)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(a.substr(u)),l.join("")}e.applyEdits=n})(_r||(_r={}));function Ar(e,t){if(e.length<=1)return e;var r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Ar(n,t),Ar(i,t);for(var s=0,a=0,o=0;s<n.length&&a<i.length;){var u=t(n[s],i[a]);u<=0?e[o++]=n[s++]:e[o++]=i[a++]}for(;s<n.length;)e[o++]=n[s++];for(;a<i.length;)e[o++]=i[a++];return e}function Ni(e,t,r){r===void 0&&(r=0);for(var n=t?[r]:[],i=0;i<e.length;i++){var s=e.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function Li(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function aa(e){var t=Li(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var W;(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"})(W||(W={}));var Ci;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ne.Markdown,Ne.PlainText],commitCharactersSupport:!0}}}}})(Ci||(Ci={}));function oa(e,t){var r;return t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,function(n,i){var s=i[0];return typeof t[s]<"u"?t[s]:n}),r}function ua(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return oa(t,r)}function pt(e){return ua}var Ue=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=pt(),la={"color-hex":{errorMessage:R("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:R("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:R("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:R("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:R("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,}))$/}},Oe=function(){function e(t,r,n){n===void 0&&(n=0),this.offset=r,this.length=n,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}(),fa=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="null",i.value=null,i}return t}(Oe),xi=function(e){Ue(t,e);function t(r,n,i){var s=e.call(this,r,i)||this;return s.type="boolean",s.value=n,s}return t}(Oe),ca=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(Oe),ha=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(Oe),wr=function(e){Ue(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s.type="string",s.value="",s}return t}(Oe),ga=function(e){Ue(t,e);function t(r,n,i){var s=e.call(this,r,n)||this;return s.type="property",s.colonOffset=-1,s.keyNode=i,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(Oe),da=function(e){Ue(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(Oe);function oe(e){return Se(e)?e?{}:{not:{}}:e}var ki;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(ki||(ki={}));var ma=function(){function e(t,r){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=r,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||Ti(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Nr=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}(),ue=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 r=0,n=t;r<n.length;r++){var i=n[r];this.merge(i)}},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 r=0,n=this.problems;r<n.length;r++){var i=n[r];i.code===W.EnumValueMismatch&&(i.message=R("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(s){return JSON.stringify(s)}).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 r=this.hasProblems();return r!==t.hasProblems()?r?-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 pa(e,t){return t===void 0&&(t=[]),new Pi(e,t,[])}function Ee(e){return ra(e)}function Lr(e){return ta(e)}function Ti(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var Pi=function(){function e(t,r,n){r===void 0&&(r=[]),n===void 0&&(n=[]),this.root=t,this.syntaxErrors=r,this.comments=n}return e.prototype.getNodeFromOffset=function(t,r){if(r===void 0&&(r=!1),this.root)return ea(this.root,t,r)},e.prototype.visit=function(t){if(this.root){var r=function(n){var i=t(n),s=n.children;if(Array.isArray(s))for(var a=0;a<s.length&&i;a++)i=r(s[a]);return i};r(this.root)}},e.prototype.validate=function(t,r,n){if(n===void 0&&(n=fe.Warning),this.root&&r){var i=new ue;return te(this.root,r,i,Nr.instance),i.problems.map(function(s){var a,o=q.create(t.positionAt(s.location.offset),t.positionAt(s.location.offset+s.location.length));return we.create(o,s.message,(a=s.severity)!==null&&a!==void 0?a:n,s.code)})}},e.prototype.getMatchingSchemas=function(t,r,n){r===void 0&&(r=-1);var i=new ma(r,n);return this.root&&t&&te(this.root,t,new ue,i),i.schemas},e}();function te(e,t,r,n){if(!e||!n.include(e))return;var i=e;switch(i.type){case"object":l(i,t,r,n);break;case"array":u(i,t,r,n);break;case"string":o(i,t,r);break;case"number":a(i,t,r);break;case"property":return te(i.valueNode,t,r,n)}s(),n.add({node:i,schema:t});function s(){function c(F){return i.type===F||F==="integer"&&i.type==="number"&&i.isInteger}if(Array.isArray(t.type)?t.type.some(c)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||R("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(c(t.type)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||R("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var f=0,h=t.allOf;f<h.length;f++){var g=h[f];te(i,oe(g),r,n)}var m=oe(t.not);if(m){var v=new ue,b=n.newSub();te(i,m,v,b),v.hasProblems()||r.problems.push({location:{offset:i.offset,length:i.length},message:R("notSchemaWarning","Matches a schema that is not allowed.")});for(var N=0,p=b.schemas;N<p.length;N++){var d=p[N];d.inverted=!d.inverted,n.add(d)}}var _=function(F,V){for(var z=[],E=void 0,x=0,M=F;x<M.length;x++){var I=M[x],$=oe(I),D=new ue,O=n.newSub();if(te(i,$,D,O),D.hasProblems()||z.push($),!E)E={schema:$,validationResult:D,matchingSchemas:O};else if(!V&&!D.hasProblems()&&!E.validationResult.hasProblems())E.matchingSchemas.merge(O),E.validationResult.propertiesMatches+=D.propertiesMatches,E.validationResult.propertiesValueMatches+=D.propertiesValueMatches;else{var B=D.compare(E.validationResult);B>0?E={schema:$,validationResult:D,matchingSchemas:O}:B===0&&(E.matchingSchemas.merge(O),E.validationResult.mergeEnumValues(D))}}return z.length>1&&V&&r.problems.push({location:{offset:i.offset,length:1},message:R("oneOfWarning","Matches multiple schemas when only one must validate.")}),E&&(r.merge(E.validationResult),r.propertiesMatches+=E.validationResult.propertiesMatches,r.propertiesValueMatches+=E.validationResult.propertiesValueMatches,n.merge(E.matchingSchemas)),z.length};Array.isArray(t.anyOf)&&_(t.anyOf,!1),Array.isArray(t.oneOf)&&_(t.oneOf,!0);var L=function(F){var V=new ue,z=n.newSub();te(i,oe(F),V,z),r.merge(V),r.propertiesMatches+=V.propertiesMatches,r.propertiesValueMatches+=V.propertiesValueMatches,n.merge(z)},S=function(F,V,z){var E=oe(F),x=new ue,M=n.newSub();te(i,E,x,M),n.merge(M),x.hasProblems()?z&&L(z):V&&L(V)},A=oe(t.if);if(A&&S(A,oe(t.then),oe(t.else)),Array.isArray(t.enum)){for(var w=Ee(i),y=!1,T=0,P=t.enum;T<P.length;T++){var k=P[T];if(lt(w,k)){y=!0;break}}r.enumValues=t.enum,r.enumValueMatch=y,y||r.problems.push({location:{offset:i.offset,length:i.length},code:W.EnumValueMismatch,message:t.errorMessage||R("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(F){return JSON.stringify(F)}).join(", "))})}if(Ae(t.const)){var w=Ee(i);lt(w,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:i.offset,length:i.length},code:W.EnumValueMismatch,message:t.errorMessage||R("constWarning","Value must be {0}.",JSON.stringify(t.const))}),r.enumValueMatch=!1),r.enumValues=[t.const]}t.deprecationMessage&&i.parent&&r.problems.push({location:{offset:i.parent.offset,length:i.parent.length},severity:fe.Warning,message:t.deprecationMessage,code:W.Deprecated})}function a(c,f,h,g){var m=c.value;function v(T){var P,k=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(T.toString());return k&&{value:Number(k[1]+(k[2]||"")),multiplier:(((P=k[2])===null||P===void 0?void 0:P.length)||0)-(parseInt(k[3])||0)}}if(le(f.multipleOf)){var b=-1;if(Number.isInteger(f.multipleOf))b=m%f.multipleOf;else{var N=v(f.multipleOf),p=v(m);if(N&&p){var d=Math.pow(10,Math.abs(p.multiplier-N.multiplier));p.multiplier<N.multiplier?p.value*=d:N.value*=d,b=p.value%N.value}}b!==0&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("multipleOfWarning","Value is not divisible by {0}.",f.multipleOf)})}function _(T,P){if(le(P))return P;if(Se(P)&&P)return T}function L(T,P){if(!Se(P)||!P)return T}var S=_(f.minimum,f.exclusiveMinimum);le(S)&&m<=S&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",S)});var A=_(f.maximum,f.exclusiveMaximum);le(A)&&m>=A&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",A)});var w=L(f.minimum,f.exclusiveMinimum);le(w)&&m<w&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("minimumWarning","Value is below the minimum of {0}.",w)});var y=L(f.maximum,f.exclusiveMaximum);le(y)&&m>y&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("maximumWarning","Value is above the maximum of {0}.",y)})}function o(c,f,h,g){if(le(f.minLength)&&c.value.length<f.minLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("minLengthWarning","String is shorter than the minimum length of {0}.",f.minLength)}),le(f.maxLength)&&c.value.length>f.maxLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("maxLengthWarning","String is longer than the maximum length of {0}.",f.maxLength)}),ia(f.pattern)){var m=new RegExp(f.pattern);m.test(c.value)||h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||R("patternWarning",'String does not match the pattern of "{0}".',f.pattern)})}if(f.format)switch(f.format){case"uri":case"uri-reference":{var v=void 0;if(!c.value)v=R("uriEmpty","URI expected.");else{var b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(c.value);b?!b[2]&&f.format==="uri"&&(v=R("uriSchemeMissing","URI with a scheme is expected.")):v=R("uriMissing","URI is expected.")}v&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||R("uriFormatWarning","String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var N=la[f.format];(!c.value||!N.pattern.exec(c.value))&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||N.errorMessage})}}function u(c,f,h,g){if(Array.isArray(f.items)){for(var m=f.items,v=0;v<m.length;v++){var b=m[v],N=oe(b),p=new ue,d=c.items[v];d?(te(d,N,p,g),h.mergePropertyMatch(p)):c.items.length>=m.length&&h.propertiesValueMatches++}if(c.items.length>m.length)if(typeof f.additionalItems=="object")for(var _=m.length;_<c.items.length;_++){var p=new ue;te(c.items[_],f.additionalItems,p,g),h.mergePropertyMatch(p)}else f.additionalItems===!1&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",m.length)})}else{var L=oe(f.items);if(L)for(var S=0,A=c.items;S<A.length;S++){var d=A[S],p=new ue;te(d,L,p,g),h.mergePropertyMatch(p)}}var w=oe(f.contains);if(w){var y=c.items.some(function(k){var F=new ue;return te(k,w,F,Nr.instance),!F.hasProblems()});y||h.problems.push({location:{offset:c.offset,length:c.length},message:f.errorMessage||R("requiredItemMissingWarning","Array does not contain required item.")})}if(le(f.minItems)&&c.items.length<f.minItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("minItemsWarning","Array has too few items. Expected {0} or more.",f.minItems)}),le(f.maxItems)&&c.items.length>f.maxItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("maxItemsWarning","Array has too many items. Expected {0} or fewer.",f.maxItems)}),f.uniqueItems===!0){var T=Ee(c),P=T.some(function(k,F){return F!==T.lastIndexOf(k)});P&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("uniqueItemsWarning","Array has duplicate items.")})}}function l(c,f,h,g){for(var m=Object.create(null),v=[],b=0,N=c.properties;b<N.length;b++){var p=N[b],d=p.keyNode.value;m[d]=p.valueNode,v.push(d)}if(Array.isArray(f.required))for(var _=0,L=f.required;_<L.length;_++){var S=L[_];if(!m[S]){var A=c.parent&&c.parent.type==="property"&&c.parent.keyNode,w=A?{offset:A.offset,length:A.length}:{offset:c.offset,length:1};h.problems.push({location:w,message:R("MissingRequiredPropWarning",'Missing property "{0}".',S)})}}var y=function(qi){for(var jr=v.indexOf(qi);jr>=0;)v.splice(jr,1),jr=v.indexOf(qi)};if(f.properties)for(var T=0,P=Object.keys(f.properties);T<P.length;T++){var S=P[T];y(S);var k=f.properties[S],F=m[S];if(F)if(Se(k))if(k)h.propertiesMatches++,h.propertiesValueMatches++;else{var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||R("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}else{var V=new ue;te(F,k,V,g),h.mergePropertyMatch(V)}}if(f.patternProperties)for(var z=0,E=Object.keys(f.patternProperties);z<E.length;z++)for(var x=E[z],M=new RegExp(x),I=0,$=v.slice(0);I<$.length;I++){var S=$[I];if(M.test(S)){y(S);var F=m[S];if(F){var k=f.patternProperties[x];if(Se(k))if(k)h.propertiesMatches++,h.propertiesValueMatches++;else{var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||R("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}else{var V=new ue;te(F,k,V,g),h.mergePropertyMatch(V)}}}}if(typeof f.additionalProperties=="object")for(var D=0,O=v;D<O.length;D++){var S=O[D],F=m[S];if(F){var V=new ue;te(F,f.additionalProperties,V,g),h.mergePropertyMatch(V)}}else if(f.additionalProperties===!1&&v.length>0)for(var B=0,re=v;B<re.length;B++){var S=re[B],F=m[S];if(F){var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||R("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}}if(le(f.maxProperties)&&c.properties.length>f.maxProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("MaxPropWarning","Object has more properties than limit of {0}.",f.maxProperties)}),le(f.minProperties)&&c.properties.length<f.minProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:R("MinPropWarning","Object has fewer properties than the required number of {0}",f.minProperties)}),f.dependencies)for(var he=0,$e=Object.keys(f.dependencies);he<$e.length;he++){var d=$e[he],Re=m[d];if(Re){var Fr=f.dependencies[d];if(Array.isArray(Fr))for(var Rr=0,Oi=Fr;Rr<Oi.length;Rr++){var Vi=Oi[Rr];m[Vi]?h.propertiesValueMatches++:h.problems.push({location:{offset:c.offset,length:c.length},message:R("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",Vi,d)})}else{var k=oe(Fr);if(k){var V=new ue;te(c,k,V,g),h.mergePropertyMatch(V)}}}}var $i=oe(f.propertyNames);if($i)for(var Dr=0,Wi=c.properties;Dr<Wi.length;Dr++){var Xa=Wi[Dr],d=Xa.keyNode;d&&te(d,$i,h,Nr.instance)}}}function va(e,t){var r=[],n=-1,i=e.getText(),s=Ke(i,!1),a=t&&t.collectComments?[]:void 0;function o(){for(;;){var S=s.scan();switch(c(),S){case 12:case 13:Array.isArray(a)&&a.push(q.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return S}}}function u(S,A,w,y,T){if(T===void 0&&(T=fe.Error),r.length===0||w!==n){var P=q.create(e.positionAt(w),e.positionAt(y));r.push(we.create(P,S,T,A,e.languageId)),n=w}}function l(S,A,w,y,T){w===void 0&&(w=void 0),y===void 0&&(y=[]),T===void 0&&(T=[]);var P=s.getTokenOffset(),k=s.getTokenOffset()+s.getTokenLength();if(P===k&&P>0){for(P--;P>0&&/\s/.test(i.charAt(P));)P--;k=P+1}if(u(S,A,P,k),w&&f(w,!1),y.length+T.length>0)for(var F=s.getToken();F!==17;){if(y.indexOf(F)!==-1){o();break}else if(T.indexOf(F)!==-1)break;F=o()}return w}function c(){switch(s.getTokenError()){case 4:return l(R("InvalidUnicode","Invalid unicode sequence in string."),W.InvalidUnicode),!0;case 5:return l(R("InvalidEscapeCharacter","Invalid escape character in string."),W.InvalidEscapeCharacter),!0;case 3:return l(R("UnexpectedEndOfNumber","Unexpected end of number."),W.UnexpectedEndOfNumber),!0;case 1:return l(R("UnexpectedEndOfComment","Unexpected end of comment."),W.UnexpectedEndOfComment),!0;case 2:return l(R("UnexpectedEndOfString","Unexpected end of string."),W.UnexpectedEndOfString),!0;case 6:return l(R("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),W.InvalidCharacter),!0}return!1}function f(S,A){return S.length=s.getTokenOffset()+s.getTokenLength()-S.offset,A&&o(),S}function h(S){if(s.getToken()===3){var A=new ca(S,s.getTokenOffset());o();for(var w=!1;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){w||l(R("ValueExpected","Value expected"),W.ValueExpected);var y=s.getTokenOffset();if(o(),s.getToken()===4){w&&u(R("TrailingComma","Trailing comma"),W.TrailingComma,y,y+1);continue}}else w&&l(R("ExpectedComma","Expected comma"),W.CommaExpected);var T=d(A);T?A.items.push(T):l(R("PropertyExpected","Value expected"),W.ValueExpected,void 0,[],[4,5]),w=!0}return s.getToken()!==4?l(R("ExpectedCloseBracket","Expected comma or closing bracket"),W.CommaOrCloseBacketExpected,A):f(A,!0)}}var g=new wr(void 0,0,0);function m(S,A){var w=new ga(S,s.getTokenOffset(),g),y=b(w);if(!y)if(s.getToken()===16){l(R("DoubleQuotesExpected","Property keys must be doublequoted"),W.Undefined);var T=new wr(w,s.getTokenOffset(),s.getTokenLength());T.value=s.getTokenValue(),y=T,o()}else return;w.keyNode=y;var P=A[y.value];if(P?(u(R("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,w.keyNode.offset,w.keyNode.offset+w.keyNode.length,fe.Warning),typeof P=="object"&&u(R("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,P.keyNode.offset,P.keyNode.offset+P.keyNode.length,fe.Warning),A[y.value]=!0):A[y.value]=w,s.getToken()===6)w.colonOffset=s.getTokenOffset(),o();else if(l(R("ColonExpected","Colon expected"),W.ColonExpected),s.getToken()===10&&e.positionAt(y.offset+y.length).line<e.positionAt(s.getTokenOffset()).line)return w.length=y.length,w;var k=d(w);return k?(w.valueNode=k,w.length=k.offset+k.length-w.offset,w):l(R("ValueExpected","Value expected"),W.ValueExpected,w,[],[2,5])}function v(S){if(s.getToken()===1){var A=new da(S,s.getTokenOffset()),w=Object.create(null);o();for(var y=!1;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){y||l(R("PropertyExpected","Property expected"),W.PropertyExpected);var T=s.getTokenOffset();if(o(),s.getToken()===2){y&&u(R("TrailingComma","Trailing comma"),W.TrailingComma,T,T+1);continue}}else y&&l(R("ExpectedComma","Expected comma"),W.CommaExpected);var P=m(A,w);P?A.properties.push(P):l(R("PropertyExpected","Property expected"),W.PropertyExpected,void 0,[],[2,5]),y=!0}return s.getToken()!==2?l(R("ExpectedCloseBrace","Expected comma or closing brace"),W.CommaOrCloseBraceExpected,A):f(A,!0)}}function b(S){if(s.getToken()===10){var A=new wr(S,s.getTokenOffset());return A.value=s.getTokenValue(),f(A,!0)}}function N(S){if(s.getToken()===11){var A=new ha(S,s.getTokenOffset());if(s.getTokenError()===0){var w=s.getTokenValue();try{var y=JSON.parse(w);if(!le(y))return l(R("InvalidNumberFormat","Invalid number format."),W.Undefined,A);A.value=y}catch{return l(R("InvalidNumberFormat","Invalid number format."),W.Undefined,A)}A.isInteger=w.indexOf(".")===-1}return f(A,!0)}}function p(S){switch(s.getToken()){case 7:return f(new fa(S,s.getTokenOffset()),!0);case 8:return f(new xi(S,!0,s.getTokenOffset()),!0);case 9:return f(new xi(S,!1,s.getTokenOffset()),!0);default:return}}function d(S){return h(S)||v(S)||b(S)||N(S)||p(S)}var _=void 0,L=o();return L!==17&&(_=d(_),_?s.getToken()!==17&&l(R("End of file expected","End of file expected."),W.Undefined):l(R("Invalid symbol","Expected a JSON object, array or literal."),W.Undefined)),new Pi(_,r,a)}function Cr(e,t,r){if(e!==null&&typeof e=="object"){var n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var i=`[
`,s=0;s<e.length;s++)i+=n+Cr(e[s],n,r),s<e.length-1&&(i+=","),i+=`
`;return i+=t+"]",i}else{var a=Object.keys(e);if(a.length===0)return"{}";for(var i=`{
`,s=0;s<a.length;s++){var o=a[s];i+=n+JSON.stringify(o)+": "+Cr(e[o],n,r),s<a.length-1&&(i+=","),i+=`
`}return i+=t+"}",i}}return r(e)}function ba(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function vt(e,t){var r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:r===0?e===t:!1}function ya(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}var xr=pt(),Sa=function(){function e(t,r,n,i){r===void 0&&(r=[]),n===void 0&&(n=Promise),i===void 0&&(i={}),this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}return e.prototype.doResolve=function(t){for(var r=this.contributions.length-1;r>=0;r--){var n=this.contributions[r].resolveCompletion;if(n){var i=n(t);if(i)return i}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,r,n){var i=this,s={items:[],isIncomplete:!1},a=t.getText(),o=t.offsetAt(r),u=n.getNodeFromOffset(o,!0);if(this.isInComment(t,u?u.offset:0,o))return Promise.resolve(s);if(u&&o===u.offset+u.length&&o>0){var l=a[o-1];(u.type==="object"&&l==="}"||u.type==="array"&&l==="]")&&(u=u.parent)}var c=this.getCurrentWord(t,o),f;if(u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null"))f=q.create(t.positionAt(u.offset),t.positionAt(u.offset+u.length));else{var h=o-c.length;h>0&&a[h-1]==='"'&&h--,f=q.create(t.positionAt(h),r)}var g={},m={add:function(v){var b=v.label,N=g[b];if(N)N.documentation||(N.documentation=v.documentation),N.detail||(N.detail=v.detail);else{if(b=b.replace(/[\n]/g,"↵"),b.length>60){var p=b.substr(0,57).trim()+"...";g[p]||(b=p)}f&&v.insertText!==void 0&&(v.textEdit=pe.replace(f,v.insertText)),v.label=b,g[b]=v,s.items.push(v)}},setAsIncomplete:function(){s.isIncomplete=!0},error:function(v){console.error(v)},log:function(v){console.log(v)},getNumberOfProposals:function(){return s.items.length}};return this.schemaService.getSchemaForResource(t.uri,n).then(function(v){var b=[],N=!0,p="",d=void 0;if(u&&u.type==="string"){var _=u.parent;_&&_.type==="property"&&_.keyNode===u&&(N=!_.valueNode,d=_,p=a.substr(u.offset+1,u.length-2),_&&(u=_.parent))}if(u&&u.type==="object"){if(u.offset===o)return s;var L=u.properties;L.forEach(function(y){(!d||d!==y)&&(g[y.keyNode.value]=Sr.create("__"))});var S="";N&&(S=i.evaluateSeparatorAfter(t,t.offsetAt(f.end))),v?i.getPropertyCompletions(v,n,u,N,S,m):i.getSchemaLessPropertyCompletions(n,u,p,m);var A=Lr(u);i.contributions.forEach(function(y){var T=y.collectPropertyCompletions(t.uri,A,c,N,S==="",m);T&&b.push(T)}),!v&&c.length>0&&a.charAt(o-c.length-1)!=='"'&&(m.add({kind:ce.Property,label:i.getLabelForValue(c),insertText:i.getInsertTextForProperty(c,void 0,!1,S),insertTextFormat:X.Snippet,documentation:""}),m.setAsIncomplete())}var w={};return v?i.getValueCompletions(v,n,u,o,t,m,w):i.getSchemaLessValueCompletions(n,u,o,t,m),i.contributions.length>0&&i.getContributedValueCompletions(n,u,o,t,m,b),i.promiseConstructor.all(b).then(function(){if(m.getNumberOfProposals()===0){var y=o;u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null")&&(y=u.offset+u.length);var T=i.evaluateSeparatorAfter(t,y);i.addFillerValueCompletions(w,T,m)}return s})})},e.prototype.getPropertyCompletions=function(t,r,n,i,s,a){var o=this,u=r.getMatchingSchemas(t.schema,n.offset);u.forEach(function(l){if(l.node===n&&!l.inverted){var c=l.schema.properties;c&&Object.keys(c).forEach(function(v){var b=c[v];if(typeof b=="object"&&!b.deprecationMessage&&!b.doNotSuggest){var N={kind:ce.Property,label:v,insertText:o.getInsertTextForProperty(v,b,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:o.fromMarkup(b.markdownDescription)||b.description||""};b.suggestSortText!==void 0&&(N.sortText=b.suggestSortText),N.insertText&&vt(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)}});var f=l.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){var h=function(v,b){b===void 0&&(b=void 0);var N={kind:ce.Property,label:v,insertText:o.getInsertTextForProperty(v,void 0,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:b||o.fromMarkup(f.markdownDescription)||f.description||""};f.suggestSortText!==void 0&&(N.sortText=f.suggestSortText),N.insertText&&vt(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)};if(f.enum)for(var g=0;g<f.enum.length;g++){var m=void 0;f.markdownEnumDescriptions&&g<f.markdownEnumDescriptions.length?m=o.fromMarkup(f.markdownEnumDescriptions[g]):f.enumDescriptions&&g<f.enumDescriptions.length&&(m=f.enumDescriptions[g]),h(f.enum[g],m)}f.const&&h(f.const)}}})},e.prototype.getSchemaLessPropertyCompletions=function(t,r,n,i){var s=this,a=function(u){u.properties.forEach(function(l){var c=l.keyNode.value;i.add({kind:ce.Property,label:c,insertText:s.getInsertTextForValue(c,""),insertTextFormat:X.Snippet,filterText:s.getFilterTextForValue(c),documentation:""})})};if(r.parent)if(r.parent.type==="property"){var o=r.parent.keyNode.value;t.visit(function(u){return u.type==="property"&&u!==r.parent&&u.keyNode.value===o&&u.valueNode&&u.valueNode.type==="object"&&a(u.valueNode),!0})}else r.parent.type==="array"&&r.parent.items.forEach(function(u){u.type==="object"&&u!==r&&a(u)});else r.type==="object"&&i.add({kind:ce.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:X.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,r,n,i,s){var a=this,o=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(o=r.offset+r.length,r=r.parent),!r){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:X.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:X.Snippet,documentation:""});return}var u=this.evaluateSeparatorAfter(i,o),l=function(g){g.parent&&!Ti(g.parent,n,!0)&&s.add({kind:a.getSuggestionKind(g.type),label:a.getLabelTextForMatchingNode(g,i),insertText:a.getInsertTextForMatchingNode(g,i,u),insertTextFormat:X.Snippet,documentation:""}),g.type==="boolean"&&a.addBooleanValueCompletion(!g.value,u,s)};if(r.type==="property"&&n>(r.colonOffset||0)){var c=r.valueNode;if(c&&(n>c.offset+c.length||c.type==="object"||c.type==="array"))return;var f=r.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===f&&g.valueNode&&l(g.valueNode),!0}),f==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(u,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){var h=r.parent.keyNode.value;t.visit(function(g){return g.type==="property"&&g.keyNode.value===h&&g.valueNode&&g.valueNode.type==="array"&&g.valueNode.items.forEach(l),!0})}else r.items.forEach(l)},e.prototype.getValueCompletions=function(t,r,n,i,s,a,o){var u=i,l=void 0,c=void 0;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(u=n.offset+n.length,c=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(n.type==="property"&&i>(n.colonOffset||0)){var f=n.valueNode;if(f&&i>f.offset+f.length)return;l=n.keyNode.value,n=n.parent}if(n&&(l!==void 0||n.type==="array")){for(var h=this.evaluateSeparatorAfter(s,u),g=r.getMatchingSchemas(t.schema,n.offset,c),m=0,v=g;m<v.length;m++){var b=v[m];if(b.node===n&&!b.inverted&&b.schema){if(n.type==="array"&&b.schema.items)if(Array.isArray(b.schema.items)){var N=this.findItemAtOffset(n,s,i);N<b.schema.items.length&&this.addSchemaValueCompletions(b.schema.items[N],h,a,o)}else this.addSchemaValueCompletions(b.schema.items,h,a,o);if(l!==void 0){var p=!1;if(b.schema.properties){var d=b.schema.properties[l];d&&(p=!0,this.addSchemaValueCompletions(d,h,a,o))}if(b.schema.patternProperties&&!p)for(var _=0,L=Object.keys(b.schema.patternProperties);_<L.length;_++){var S=L[_],A=new RegExp(S);if(A.test(l)){p=!0;var d=b.schema.patternProperties[S];this.addSchemaValueCompletions(d,h,a,o)}}if(b.schema.additionalProperties&&!p){var d=b.schema.additionalProperties;this.addSchemaValueCompletions(d,h,a,o)}}}}l==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(h,a),o.boolean&&(this.addBooleanValueCompletion(!0,h,a),this.addBooleanValueCompletion(!1,h,a)),o.null&&this.addNullValueCompletion(h,a)}},e.prototype.getContributedValueCompletions=function(t,r,n,i,s,a){if(!r)this.contributions.forEach(function(c){var f=c.collectDefaultCompletions(i.uri,s);f&&a.push(f)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&n>(r.colonOffset||0)){var o=r.keyNode.value,u=r.valueNode;if((!u||n<=u.offset+u.length)&&r.parent){var l=Lr(r.parent);this.contributions.forEach(function(c){var f=c.collectValueCompletions(i.uri,l,o,s);f&&a.push(f)})}}},e.prototype.addSchemaValueCompletions=function(t,r,n,i){var s=this;typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}))},e.prototype.addDefaultValueCompletions=function(t,r,n,i){var s=this;i===void 0&&(i=0);var a=!1;if(Ae(t.default)){for(var o=t.type,u=t.default,l=i;l>0;l--)u=[u],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,r),insertTextFormat:X.Snippet,detail:xr("json.suggest.default","Default value")}),a=!0}Array.isArray(t.examples)&&t.examples.forEach(function(c){for(var f=t.type,h=c,g=i;g>0;g--)h=[h],f="array";n.add({kind:s.getSuggestionKind(f),label:s.getLabelForValue(h),insertText:s.getInsertTextForValue(h,r),insertTextFormat:X.Snippet}),a=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(c){var f=t.type,h=c.body,g=c.label,m,v;if(Ae(h)){t.type;for(var b=i;b>0;b--)h=[h];m=s.getInsertTextForSnippetValue(h,r),v=s.getFilterTextForSnippetValue(h),g=g||s.getLabelForSnippetValue(h)}else if(typeof c.bodyText=="string"){for(var N="",p="",d="",b=i;b>0;b--)N=N+d+`[
`,p=p+`
`+d+"]",d+=" ",f="array";m=N+d+c.bodyText.split(`
`).join(`
`+d)+p+r,g=g||m,v=m.replace(/[\n]/g,"")}else return;n.add({kind:s.getSuggestionKind(f),label:g,documentation:s.fromMarkup(c.markdownDescription)||c.description,insertText:m,insertTextFormat:X.Snippet,filterText:v}),a=!0}),!a&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,r,n,i+1)},e.prototype.addEnumValueCompletions=function(t,r,n){if(Ae(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:X.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,s=t.enum.length;i<s;i++){var a=t.enum[i],o=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(o=t.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,r),insertTextFormat:X.Snippet,documentation:o})}},e.prototype.collectTypes=function(t,r){if(!(Array.isArray(t.enum)||Ae(t.const))){var n=t.type;Array.isArray(n)?n.forEach(function(i){return r[i]=!0}):n&&(r[n]=!0)}},e.prototype.addFillerValueCompletions=function(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:X.Snippet,detail:xr("defaults.object","New object"),documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:X.Snippet,detail:xr("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:X.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:X.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,r){var n=this,i=this.schemaService.getRegisteredSchemaIds(function(s){return s==="http"||s==="https"});i.forEach(function(s){return r.add({kind:ce.Module,label:n.getLabelForValue(s),filterText:n.getFilterTextForValue(s),insertText:n.getInsertTextForValue(s,t),insertTextFormat:X.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 r=JSON.stringify(t);return r.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,r){var n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)},e.prototype.getInsertTextForSnippetValue=function(t,r){var n=function(i){return typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i)};return Cr(t,"",n)+r},e.prototype.getInsertTextForGuessedValue=function(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":var n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var r=t;t=r.length>0?r[0]:void 0}if(!t)return ce.Value;switch(t){case"string":return ce.Value;case"object":return ce.Module;case"property":return ce.Property;default:return ce.Value}},e.prototype.getLabelTextForMatchingNode=function(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:var n=r.getText().substr(t.offset,t.length);return n}},e.prototype.getInsertTextForMatchingNode=function(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var i=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,r,n,i){var s=this.getInsertTextForValue(t,"");if(!n)return s;var a=s+": ",o,u=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){var l=r.defaultSnippets[0].body;Ae(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=r.defaultSnippets.length}if(r.enum&&(!o&&r.enum.length===1&&(o=this.getInsertTextForGuessedValue(r.enum[0],"")),u+=r.enum.length),Ae(r.default)&&(o||(o=this.getInsertTextForGuessedValue(r.default,"")),u++),Array.isArray(r.examples)&&r.examples.length&&(o||(o=this.getInsertTextForGuessedValue(r.examples[0],"")),u+=r.examples.length),u===0){var c=Array.isArray(r.type)?r.type[0]:r.type;switch(c||(r.properties?c="object":r.items&&(c="array")),c){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||u>1)&&(o="$1"),a+o+i},e.prototype.getCurrentWord=function(t,r){for(var n=r-1,i=t.getText();n>=0&&`
\r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)},e.prototype.evaluateSeparatorAfter=function(t,r){var n=Ke(t.getText(),!0);n.setPosition(r);var i=n.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,r,n){for(var i=Ke(r.getText(),!0),s=t.items,a=s.length-1;a>=0;a--){var o=s[a];if(n>o.offset+o.length){i.setPosition(o.offset+o.length);var u=i.scan();return u===5&&n>=i.getTokenOffset()+i.getTokenLength()?a+1:a}else if(n>=o.offset)return a}return 0},e.prototype.isInComment=function(t,r,n){var i=Ke(t.getText(),!1);i.setPosition(r);for(var s=i.scan();s!==17&&i.getTokenOffset()+i.getTokenLength()<n;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=n},e.prototype.fromMarkup=function(t){if(t&&this.doesSupportMarkdown())return{kind:Ne.Markdown,value:t}},e.prototype.doesSupportMarkdown=function(){if(!Ae(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(Ne.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!Ae(this.supportsCommitCharacters)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=t&&t.completionItem&&!!t.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),_a=function(){function e(t,r,n){r===void 0&&(r=[]),this.schemaService=t,this.contributions=r,this.promise=n||Promise}return e.prototype.doHover=function(t,r,n){var i=t.offsetAt(r),s=n.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);var a=s;if(s.type==="string"){var o=s.parent;if(o&&o.type==="property"&&o.keyNode===s&&(s=o.valueNode,!s))return this.promise.resolve(null)}for(var u=q.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length)),l=function(m){var v={contents:m,range:u};return v},c=Lr(s),f=this.contributions.length-1;f>=0;f--){var h=this.contributions[f],g=h.getInfoContribution(t.uri,c);if(g)return g.then(function(m){return l(m)})}return this.schemaService.getSchemaForResource(t.uri,n).then(function(m){if(m&&s){var v=n.getMatchingSchemas(m.schema,s.offset),b=void 0,N=void 0,p=void 0,d=void 0;v.every(function(L){if(L.node===s&&!L.inverted&&L.schema&&(b=b||L.schema.title,N=N||L.schema.markdownDescription||kr(L.schema.description),L.schema.enum)){var S=L.schema.enum.indexOf(Ee(s));L.schema.markdownEnumDescriptions?p=L.schema.markdownEnumDescriptions[S]:L.schema.enumDescriptions&&(p=kr(L.schema.enumDescriptions[S])),p&&(d=L.schema.enum[S],typeof d!="string"&&(d=JSON.stringify(d)))}return!0});var _="";return b&&(_=kr(b)),N&&(_.length>0&&(_+=`
`),_+=N),p&&(_.length>0&&(_+=`
`),_+="`"+Aa(d)+"`: "+p),l([_])}return null})},e}();function kr(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
$3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Aa(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ei;Ei=(()=>{var e={470:n=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,u){for(var l,c="",f=0,h=-1,g=0,m=0;m<=o.length;++m){if(m<o.length)l=o.charCodeAt(m);else{if(l===47)break;l=47}if(l===47){if(!(h===m-1||g===1))if(h!==m-1&&g===2){if(c.length<2||f!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var v=c.lastIndexOf("/");if(v!==c.length-1){v===-1?(c="",f=0):f=(c=c.slice(0,v)).length-1-c.lastIndexOf("/"),h=m,g=0;continue}}else if(c.length===2||c.length===1){c="",f=0,h=m,g=0;continue}}u&&(c.length>0?c+="/..":c="..",f=2)}else c.length>0?c+="/"+o.slice(h+1,m):c=o.slice(h+1,m),f=m-h-1;h=m,g=0}else l===46&&g!==-1?++g:g=-1}return c}var a={resolve:function(){for(var o,u="",l=!1,c=arguments.length-1;c>=-1&&!l;c--){var f;c>=0?f=arguments[c]:(o===void 0&&(o=process.cwd()),f=o),i(f),f.length!==0&&(u=f+"/"+u,l=f.charCodeAt(0)===47)}return u=s(u,!l),l?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(i(o),o.length===0)return".";var u=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return(o=s(o,!u)).length!==0||u||(o="."),o.length>0&&l&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return i(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var l=arguments[u];i(l),l.length>0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":a.normalize(o)},relative:function(o,u){if(i(o),i(u),o===u||(o=a.resolve(o))===(u=a.resolve(u)))return"";for(var l=1;l<o.length&&o.charCodeAt(l)===47;++l);for(var c=o.length,f=c-l,h=1;h<u.length&&u.charCodeAt(h)===47;++h);for(var g=u.length-h,m=f<g?f:g,v=-1,b=0;b<=m;++b){if(b===m){if(g>m){if(u.charCodeAt(h+b)===47)return u.slice(h+b+1);if(b===0)return u.slice(h+b)}else f>m&&(o.charCodeAt(l+b)===47?v=b:b===0&&(v=0));break}var N=o.charCodeAt(l+b);if(N!==u.charCodeAt(h+b))break;N===47&&(v=b)}var p="";for(b=l+v+1;b<=c;++b)b!==c&&o.charCodeAt(b)!==47||(p.length===0?p+="..":p+="/..");return p.length>0?p+u.slice(h+v):(h+=v,u.charCodeAt(h)===47&&++h,u.slice(h))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var u=o.charCodeAt(0),l=u===47,c=-1,f=!0,h=o.length-1;h>=1;--h)if((u=o.charCodeAt(h))===47){if(!f){c=h;break}}else f=!1;return c===-1?l?"/":".":l&&c===1?"//":o.slice(0,c)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');i(o);var l,c=0,f=-1,h=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var g=u.length-1,m=-1;for(l=o.length-1;l>=0;--l){var v=o.charCodeAt(l);if(v===47){if(!h){c=l+1;break}}else m===-1&&(h=!1,m=l+1),g>=0&&(v===u.charCodeAt(g)?--g==-1&&(f=l):(g=-1,f=m))}return c===f?f=m:f===-1&&(f=o.length),o.slice(c,f)}for(l=o.length-1;l>=0;--l)if(o.charCodeAt(l)===47){if(!h){c=l+1;break}}else f===-1&&(h=!1,f=l+1);return f===-1?"":o.slice(c,f)},extname:function(o){i(o);for(var u=-1,l=0,c=-1,f=!0,h=0,g=o.length-1;g>=0;--g){var m=o.charCodeAt(g);if(m!==47)c===-1&&(f=!1,c=g+1),m===46?u===-1?u=g:h!==1&&(h=1):u!==-1&&(h=-1);else if(!f){l=g+1;break}}return u===-1||c===-1||h===0||h===1&&u===c-1&&u===l+1?"":o.slice(u,c)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(u,l){var c=l.dir||l.root,f=l.base||(l.name||"")+(l.ext||"");return c?c===l.root?c+f:c+"/"+f:f}(0,o)},parse:function(o){i(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var l,c=o.charCodeAt(0),f=c===47;f?(u.root="/",l=1):l=0;for(var h=-1,g=0,m=-1,v=!0,b=o.length-1,N=0;b>=l;--b)if((c=o.charCodeAt(b))!==47)m===-1&&(v=!1,m=b+1),c===46?h===-1?h=b:N!==1&&(N=1):h!==-1&&(N=-1);else if(!v){g=b+1;break}return h===-1||m===-1||N===0||N===1&&h===m-1&&h===g+1?m!==-1&&(u.base=u.name=g===0&&f?o.slice(1,m):o.slice(g,m)):(g===0&&f?(u.name=o.slice(1,h),u.base=o.slice(1,m)):(u.name=o.slice(g,h),u.base=o.slice(g,m)),u.ext=o.slice(h,m)),g>0?u.dir=o.slice(0,g-1):f&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a},447:(n,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>N,Utils:()=>k}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var u,l,c=(u=function(E,x){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,I){M.__proto__=I}||function(M,I){for(var $ in I)Object.prototype.hasOwnProperty.call(I,$)&&(M[$]=I[$])})(E,x)},function(E,x){function M(){this.constructor=E}u(E,x),E.prototype=x===null?Object.create(x):(M.prototype=x.prototype,new M)}),f=/^\w[\w\d+.-]*$/,h=/^\//,g=/^\/\//,m="",v="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,N=function(){function E(x,M,I,$,D,O){O===void 0&&(O=!1),typeof x=="object"?(this.scheme=x.scheme||m,this.authority=x.authority||m,this.path=x.path||m,this.query=x.query||m,this.fragment=x.fragment||m):(this.scheme=function(B,re){return B||re?B:"file"}(x,O),this.authority=M||m,this.path=function(B,re){switch(B){case"https":case"http":case"file":re?re[0]!==v&&(re=v+re):re=v}return re}(this.scheme,I||m),this.query=$||m,this.fragment=D||m,function(B,re){if(!B.scheme&&re)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+B.authority+'", path: "'+B.path+'", query: "'+B.query+'", fragment: "'+B.fragment+'"}');if(B.scheme&&!f.test(B.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(B.path){if(B.authority){if(!h.test(B.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(g.test(B.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,O))}return E.isUri=function(x){return x instanceof E||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="function"&&typeof x.with=="function"&&typeof x.toString=="function"},Object.defineProperty(E.prototype,"fsPath",{get:function(){return A(this)},enumerable:!1,configurable:!0}),E.prototype.with=function(x){if(!x)return this;var M=x.scheme,I=x.authority,$=x.path,D=x.query,O=x.fragment;return M===void 0?M=this.scheme:M===null&&(M=m),I===void 0?I=this.authority:I===null&&(I=m),$===void 0?$=this.path:$===null&&($=m),D===void 0?D=this.query:D===null&&(D=m),O===void 0?O=this.fragment:O===null&&(O=m),M===this.scheme&&I===this.authority&&$===this.path&&D===this.query&&O===this.fragment?this:new d(M,I,$,D,O)},E.parse=function(x,M){M===void 0&&(M=!1);var I=b.exec(x);return I?new d(I[2]||m,P(I[4]||m),P(I[5]||m),P(I[7]||m),P(I[9]||m),M):new d(m,m,m,m,m)},E.file=function(x){var M=m;if(a&&(x=x.replace(/\\/g,v)),x[0]===v&&x[1]===v){var I=x.indexOf(v,2);I===-1?(M=x.substring(2),x=v):(M=x.substring(2,I),x=x.substring(I)||v)}return new d("file",M,x,m,m)},E.from=function(x){return new d(x.scheme,x.authority,x.path,x.query,x.fragment)},E.prototype.toString=function(x){return x===void 0&&(x=!1),w(this,x)},E.prototype.toJSON=function(){return this},E.revive=function(x){if(x){if(x instanceof E)return x;var M=new d(x);return M._formatted=x.external,M._fsPath=x._sep===p?x.fsPath:null,M}return x},E}(),p=a?1:void 0,d=function(E){function x(){var M=E!==null&&E.apply(this,arguments)||this;return M._formatted=null,M._fsPath=null,M}return c(x,E),Object.defineProperty(x.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=A(this)),this._fsPath},enumerable:!1,configurable:!0}),x.prototype.toString=function(M){return M===void 0&&(M=!1),M?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},x.prototype.toJSON=function(){var M={$mid:1};return this._fsPath&&(M.fsPath=this._fsPath,M._sep=p),this._formatted&&(M.external=this._formatted),this.path&&(M.path=this.path),this.scheme&&(M.scheme=this.scheme),this.authority&&(M.authority=this.authority),this.query&&(M.query=this.query),this.fragment&&(M.fragment=this.fragment),M},x}(N),_=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function L(E,x){for(var M=void 0,I=-1,$=0;$<E.length;$++){var D=E.charCodeAt($);if(D>=97&&D<=122||D>=65&&D<=90||D>=48&&D<=57||D===45||D===46||D===95||D===126||x&&D===47)I!==-1&&(M+=encodeURIComponent(E.substring(I,$)),I=-1),M!==void 0&&(M+=E.charAt($));else{M===void 0&&(M=E.substr(0,$));var O=_[D];O!==void 0?(I!==-1&&(M+=encodeURIComponent(E.substring(I,$)),I=-1),M+=O):I===-1&&(I=$)}}return I!==-1&&(M+=encodeURIComponent(E.substring(I))),M!==void 0?M:E}function S(E){for(var x=void 0,M=0;M<E.length;M++){var I=E.charCodeAt(M);I===35||I===63?(x===void 0&&(x=E.substr(0,M)),x+=_[I]):x!==void 0&&(x+=E[M])}return x!==void 0?x:E}function A(E,x){var M;return M=E.authority&&E.path.length>1&&E.scheme==="file"?"//"+E.authority+E.path:E.path.charCodeAt(0)===47&&(E.path.charCodeAt(1)>=65&&E.path.charCodeAt(1)<=90||E.path.charCodeAt(1)>=97&&E.path.charCodeAt(1)<=122)&&E.path.charCodeAt(2)===58?E.path[1].toLowerCase()+E.path.substr(2):E.path,a&&(M=M.replace(/\//g,"\\")),M}function w(E,x){var M=x?S:L,I="",$=E.scheme,D=E.authority,O=E.path,B=E.query,re=E.fragment;if($&&(I+=$,I+=":"),(D||$==="file")&&(I+=v,I+=v),D){var he=D.indexOf("@");if(he!==-1){var $e=D.substr(0,he);D=D.substr(he+1),(he=$e.indexOf(":"))===-1?I+=M($e,!1):(I+=M($e.substr(0,he),!1),I+=":",I+=M($e.substr(he+1),!1)),I+="@"}(he=(D=D.toLowerCase()).indexOf(":"))===-1?I+=M(D,!1):(I+=M(D.substr(0,he),!1),I+=D.substr(he))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58)(Re=O.charCodeAt(1))>=65&&Re<=90&&(O="/"+String.fromCharCode(Re+32)+":"+O.substr(3));else if(O.length>=2&&O.charCodeAt(1)===58){var Re;(Re=O.charCodeAt(0))>=65&&Re<=90&&(O=String.fromCharCode(Re+32)+":"+O.substr(2))}I+=M(O,!0)}return B&&(I+="?",I+=M(B,!1)),re&&(I+="#",I+=x?re:L(re,!1)),I}function y(E){try{return decodeURIComponent(E)}catch{return E.length>3?E.substr(0,3)+y(E.substr(3)):E}}var T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(E){return E.match(T)?E.replace(T,function(x){return y(x)}):E}var k,F=s(470),V=function(){for(var E=0,x=0,M=arguments.length;x<M;x++)E+=arguments[x].length;var I=Array(E),$=0;for(x=0;x<M;x++)for(var D=arguments[x],O=0,B=D.length;O<B;O++,$++)I[$]=D[O];return I},z=F.posix||F;(function(E){E.joinPath=function(x){for(var M=[],I=1;I<arguments.length;I++)M[I-1]=arguments[I];return x.with({path:z.join.apply(z,V([x.path],M))})},E.resolvePath=function(x){for(var M=[],I=1;I<arguments.length;I++)M[I-1]=arguments[I];var $=x.path||"/";return x.with({path:z.resolve.apply(z,V([$],M))})},E.dirname=function(x){var M=z.dirname(x.path);return M.length===1&&M.charCodeAt(0)===46?x:x.with({path:M})},E.basename=function(x){return z.basename(x.path)},E.extname=function(x){return z.extname(x.path)}})(k||(k={}))}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(n,i)=>{for(var s in i)r.o(i,s)&&!r.o(n,s)&&Object.defineProperty(n,s,{enumerable:!0,get:i[s]})},r.o=(n,i)=>Object.prototype.hasOwnProperty.call(n,i),r.r=n=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r(447)})();const{URI:tt,Utils:Ka}=Ei;var Me=pt(),wa=function(){function e(t,r){this.patternRegExps=[],this.isInclude=[];try{for(var n=0,i=t;n<i.length;n++){var s=i[n],a=s[0]!=="!";a||(s=s.substring(1)),this.patternRegExps.push(new RegExp(ya(s)+"$")),this.isInclude.push(a)}this.uris=r}catch{this.patternRegExps.length=0,this.isInclude.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var r=!1,n=0;n<this.patternRegExps.length;n++){var i=this.patternRegExps[n];i.test(t)&&(r=this.isInclude[n])}return r},e.prototype.getURIs=function(){return this.uris},e}(),Na=function(){function e(t,r,n){this.service=t,this.url=r,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new Ve(n)))}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(r){return t.service.resolveSchemaContent(r,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),Ve=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e}(),Mi=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e.prototype.getSection=function(t){var r=this.getSectionRecursive(t,this.schema);if(r)return oe(r)},e.prototype.getSectionRecursive=function(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;var n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties)for(var i=0,s=Object.keys(r.patternProperties);i<s.length;i++){var a=s[i],o=new RegExp(a);if(o.test(n))return this.getSectionRecursive(t,r.patternProperties[a])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){var u=parseInt(n,10);if(!isNaN(u)&&r.items[u])return this.getSectionRecursive(t,r.items[u])}else if(r.items)return this.getSectionRecursive(t,r.items)}}},e}(),La=function(){function e(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||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(r){var n=tt.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})},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 r=this,n=!1;t=Ie(t);for(var i=[t],s=Object.keys(this.schemasById).map(function(l){return r.schemasById[l]});i.length;)for(var a=i.pop(),o=0;o<s.length;o++){var u=s[o];u&&(u.url===a||u.dependencies[a])&&(u.url!==a&&i.push(u.url),u.clearSchema(),s[o]=void 0,n=!0)}return n},e.prototype.setSchemaContributions=function(t){if(t.schemas){var r=t.schemas;for(var n in r){var i=Ie(n);this.contributionSchemas[i]=this.addSchemaHandle(i,r[n])}}if(Array.isArray(t.schemaAssociations))for(var s=t.schemaAssociations,a=0,o=s;a<o.length;a++){var u=o[a],l=u.uris.map(Ie),c=this.addFilePatternAssociation(u.pattern,l);this.contributionAssociations.push(c)}},e.prototype.addSchemaHandle=function(t,r){var n=new Na(this,t,r);return this.schemasById[t]=n,n},e.prototype.getOrAddSchemaHandle=function(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)},e.prototype.addFilePatternAssociation=function(t,r){var n=new wa(t,r);return this.filePatternAssociations.push(n),n},e.prototype.registerExternalSchema=function(t,r,n){var i=Ie(t);return this.registeredSchemasIds[i]=!0,this.cachedSchemaForResource=void 0,r&&this.addFilePatternAssociation(r,[t]),n?this.addSchemaHandle(i,n):this.getOrAddSchemaHandle(i)},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 r=0,n=this.contributionAssociations;r<n.length;r++){var i=n[r];this.filePatternAssociations.push(i)}},e.prototype.getResolvedSchema=function(t){var r=Ie(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var r=Me("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Rt(t));return this.promise.resolve(new Ve({},[r]))}return this.requestService(t).then(function(n){if(!n){var i=Me("json.schema.nocontent","Unable to load schema from '{0}': No content.",Rt(t));return new Ve({},[i])}var s={},a=[];s=Ks(n,a);var o=a.length?[Me("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Rt(t),a[0].offset)]:[];return new Ve(s,o)},function(n){var i=n.toString(),s=n.toString().split("Error: ");return s.length>1&&(i=s[1]),vt(i,".")&&(i=i.substr(0,i.length-1)),new Ve({},[Me("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Rt(t),i)])})},e.prototype.resolveSchemaContent=function(t,r,n){var i=this,s=t.errors.slice(0),a=t.schema;if(a.$schema){var o=Ie(a.$schema);if(o==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Mi({},[Me("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));o==="https://json-schema.org/draft/2019-09/schema"&&s.push(Me("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var u=this.contextService,l=function(g,m){if(!m)return g;var v=g;return m[0]==="/"&&(m=m.substr(1)),m.split("/").some(function(b){return v=v[b],!v}),v},c=function(g,m,v,b){var N=b?decodeURIComponent(b):void 0,p=l(m,N);if(p)for(var d in p)p.hasOwnProperty(d)&&!g.hasOwnProperty(d)&&(g[d]=p[d]);else s.push(Me("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",N,v))},f=function(g,m,v,b,N){u&&!/^\w+:\/\/.*/.test(m)&&(m=u.resolveRelativePath(m,b)),m=Ie(m);var p=i.getOrAddSchemaHandle(m);return p.getUnresolvedSchema().then(function(d){if(N[m]=!0,d.errors.length){var _=v?m+"#"+v:m;s.push(Me("json.schema.problemloadingref","Problems loading reference '{0}': {1}",_,d.errors[0]))}return c(g,d.schema,m,v),h(g,d.schema,m,p.dependencies)})},h=function(g,m,v,b){if(!g||typeof g!="object")return Promise.resolve(null);for(var N=[g],p=[],d=[],_=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var P=0,k=y;P<k.length;P++){var F=k[P];typeof F=="object"&&N.push(F)}},L=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var P=0,k=y;P<k.length;P++){var F=k[P];if(typeof F=="object")for(var V in F){var z=V,E=F[z];typeof E=="object"&&N.push(E)}}},S=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var P=0,k=y;P<k.length;P++){var F=k[P];if(Array.isArray(F))for(var V=0,z=F;V<z.length;V++){var E=z[V];typeof E=="object"&&N.push(E)}}},A=function(y){for(var T=[];y.$ref;){var P=y.$ref,k=P.split("#",2);if(delete y.$ref,k[0].length>0){d.push(f(y,k[0],k[1],v,b));return}else T.indexOf(P)===-1&&(c(y,m,v,k[1]),T.push(P))}_(y.items,y.additionalItems,y.additionalProperties,y.not,y.contains,y.propertyNames,y.if,y.then,y.else),L(y.definitions,y.properties,y.patternProperties,y.dependencies),S(y.anyOf,y.allOf,y.oneOf,y.items)};N.length;){var w=N.pop();p.indexOf(w)>=0||(p.push(w),A(w))}return i.promise.all(d)};return h(a,a,r,n).then(function(g){return new Mi(a,s)})},e.prototype.getSchemaForResource=function(t,r){if(r&&r.root&&r.root.type==="object"){var n=r.root.properties.filter(function(N){return N.keyNode.value==="$schema"&&N.valueNode&&N.valueNode.type==="string"});if(n.length>0){var i=n[0].valueNode;if(i&&i.type==="string"){var s=Ee(i);if(s&&ba(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=Ie(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),u=[],l=xa(t),c=0,f=this.filePatternAssociations;c<f.length;c++){var h=f[c];if(h.matchesPattern(l))for(var g=0,m=h.getURIs();g<m.length;g++){var v=m[g];o[v]||(u.push(v),o[v]=!0)}}var b=u.length>0?this.createCombinedSchema(t,u).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:b},b},e.prototype.createCombinedSchema=function(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:r.map(function(s){return{$ref:s}})};return this.addSchemaHandle(n,i)},e.prototype.getMatchingSchemas=function(t,r,n){if(n){var i=n.id||"schemaservice://untitled/matchingSchemas/"+Ca++;return this.resolveSchemaContent(new Ve(n),i,{}).then(function(s){return r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(t.uri,r).then(function(s){return s?r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},e}(),Ca=0;function Ie(e){try{return tt.parse(e).toString()}catch{return e}}function xa(e){try{return tt.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function Rt(e){try{var t=tt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var ka=pt(),Ta=function(){function e(t,r){this.jsonSchemaService=t,this.promise=r,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,r,n,i){var s=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},u=function(f){var h=f.range.start.line+" "+f.range.start.character+" "+f.message;o[h]||(o[h]=!0,a.push(f))},l=function(f){var h=n?Dt(n.trailingCommas):fe.Error,g=n?Dt(n.comments):s.commentSeverity,m=n!=null&&n.schemaValidation?Dt(n.schemaValidation):fe.Warning,v=n!=null&&n.schemaRequest?Dt(n.schemaRequest):fe.Warning;if(f){if(f.errors.length&&r.root&&v){var b=r.root,N=b.type==="object"?b.properties[0]:void 0;if(N&&N.keyNode.value==="$schema"){var p=N.valueNode||N,d=q.create(t.positionAt(p.offset),t.positionAt(p.offset+p.length));u(we.create(d,f.errors[0],v,W.SchemaResolveError))}else{var d=q.create(t.positionAt(b.offset),t.positionAt(b.offset+1));u(we.create(d,f.errors[0],v,W.SchemaResolveError))}}else if(m){var _=r.validate(t,f.schema,m);_&&_.forEach(u)}Ii(f.schema)&&(g=void 0),Fi(f.schema)&&(h=void 0)}for(var L=0,S=r.syntaxErrors;L<S.length;L++){var A=S[L];if(A.code===W.TrailingComma){if(typeof h!="number")continue;A.severity=h}u(A)}if(typeof g=="number"){var w=ka("InvalidCommentToken","Comments are not permitted in JSON.");r.comments.forEach(function(y){u(we.create(y,w,g,W.CommentNotPermitted))})}return a};if(i){var c=i.id||"schemaservice://untitled/"+Pa++;return this.jsonSchemaService.resolveSchemaContent(new Ve(i),c,{}).then(function(f){return l(f)})}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(function(f){return l(f)})},e}(),Pa=0;function Ii(e){if(e&&typeof e=="object"){if(Se(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],i=Ii(n);if(Se(i))return i}}}function Fi(e){if(e&&typeof e=="object"){if(Se(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(Se(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var r=0,n=e.allOf;r<n.length;r++){var i=n[r],s=Fi(i);if(Se(s))return s}}}function Dt(e){switch(e){case"error":return fe.Error;case"warning":return fe.Warning;case"ignore":return}}var Ri=48,Ea=57,Ma=65,jt=97,Ia=102;function Q(e){return e<Ri?0:e<=Ea?e-Ri:(e<jt&&(e+=jt-Ma),e>=jt&&e<=Ia?e-jt+10:0)}function Fa(e){if(e[0]==="#")switch(e.length){case 4:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:Q(e.charCodeAt(4))*17/255};case 7:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:(Q(e.charCodeAt(7))*16+Q(e.charCodeAt(8)))/255}}}var Ra=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var s=r.root;if(!s)return[];var a=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||vt(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,c=s.items;l<c.length;l++){var f=c[l];if(f.type==="object")for(var h=0,g=f.properties;h<g.length;h++){var m=g[h];if(m.keyNode.value==="key"&&m.valueNode){var v=ft.create(t.uri,Fe(t,f));if(u.push({name:Ee(m.valueNode),kind:_e.Function,location:v}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),u}}}return u}for(var b=[{node:s,containerName:""}],N=0,p=!1,d=[],_=function(S,A){S.type==="array"?S.items.forEach(function(w){w&&b.push({node:w,containerName:A})}):S.type==="object"&&S.properties.forEach(function(w){var y=w.valueNode;if(y)if(a>0){a--;var T=ft.create(t.uri,Fe(t,w)),P=A?A+"."+w.keyNode.value:w.keyNode.value;d.push({name:i.getKeyLabel(w),kind:i.getSymbolKind(y.type),location:T,containerName:A}),b.push({node:y,containerName:P})}else p=!0})};N<b.length;){var L=b[N++];_(L.node,L.containerName)}return p&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),d},e.prototype.findDocumentSymbols2=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var s=r.root;if(!s)return[];var a=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||vt(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,c=s.items;l<c.length;l++){var f=c[l];if(f.type==="object")for(var h=0,g=f.properties;h<g.length;h++){var m=g[h];if(m.keyNode.value==="key"&&m.valueNode){var v=Fe(t,f),b=Fe(t,m.keyNode);if(u.push({name:Ee(m.valueNode),kind:_e.Function,range:v,selectionRange:b}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),u}}}return u}for(var N=[],p=[{node:s,result:N}],d=0,_=!1,L=function(A,w){A.type==="array"?A.items.forEach(function(y,T){if(y)if(a>0){a--;var P=Fe(t,y),k=P,F=String(T),V={name:F,kind:i.getSymbolKind(y.type),range:P,selectionRange:k,children:[]};w.push(V),p.push({result:V.children,node:y})}else _=!0}):A.type==="object"&&A.properties.forEach(function(y){var T=y.valueNode;if(T)if(a>0){a--;var P=Fe(t,y),k=Fe(t,y.keyNode),F=[],V={name:i.getKeyLabel(y),kind:i.getSymbolKind(T.type),range:P,selectionRange:k,children:F,detail:i.getDetail(T)};w.push(V),p.push({result:F,node:T})}else _=!0})};d<p.length;){var S=p[d++];L(S.node,S.result)}return _&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),N},e.prototype.getSymbolKind=function(t){switch(t){case"object":return _e.Module;case"string":return _e.String;case"number":return _e.Number;case"array":return _e.Array;case"boolean":return _e.Boolean;default:return _e.Variable}},e.prototype.getKeyLabel=function(t){var r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"↵")),r&&r.trim()?r:'"'+r+'"'},e.prototype.getDetail=function(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(function(i){var s=[];if(i)for(var a=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,o=r.getMatchingSchemas(i.schema),u={},l=0,c=o;l<c.length;l++){var f=c[l];if(!f.inverted&&f.schema&&(f.schema.format==="color"||f.schema.format==="color-hex")&&f.node&&f.node.type==="string"){var h=String(f.node.offset);if(!u[h]){var g=Fa(Ee(f.node));if(g){var m=Fe(t,f.node);s.push({color:g,range:m})}if(u[h]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),s}}}return s})},e.prototype.getColorPresentations=function(t,r,n,i){var s=[],a=Math.round(n.red*255),o=Math.round(n.green*255),u=Math.round(n.blue*255);function l(f){var h=f.toString(16);return h.length!==2?"0"+h:h}var c;return n.alpha===1?c="#"+l(a)+l(o)+l(u):c="#"+l(a)+l(o)+l(u)+l(Math.round(n.alpha*255)),s.push({label:c,textEdit:pe.replace(i,JSON.stringify(c))}),s},e}();function Fe(e,t){return q.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var j=pt(),Tr={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{title:j("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),$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#":{title:j("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),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}}},Da={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 ja in Tr.schemas){var Pr=Tr.schemas[ja];for(var bt in Pr.properties){var Er=Pr.properties[bt];typeof Er=="boolean"&&(Er=Pr.properties[bt]={});var Di=Da[bt];Di?Er.description=Di:console.log(bt+": localize('schema.json."+bt+`', "")`)}}function Ua(e,t){var r=[],n=[],i=[],s=-1,a=Ke(e.getText(),!1),o=a.scan();function u(T){r.push(T),n.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{var l=e.positionAt(a.getTokenOffset()).line,c={startLine:l,endLine:l,kind:o===1?"object":"array"};i.push(c);break}case 2:case 4:{var f=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===f){var c=i.pop(),h=e.positionAt(a.getTokenOffset()).line;c&&h>c.startLine+1&&s!==c.startLine&&(c.endLine=h-1,u(c),s=c.startLine)}break}case 13:{var l=e.positionAt(a.getTokenOffset()).line,g=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&l+1<e.lineCount?a.setPosition(e.offsetAt(me.create(l+1,0))):l<g&&(u({startLine:l,endLine:g,kind:ct.Comment}),s=l);break}case 12:{var m=e.getText().substr(a.getTokenOffset(),a.getTokenLength()),v=m.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(v){var h=e.positionAt(a.getTokenOffset()).line;if(v[1]){var c={startLine:h,endLine:h,kind:ct.Region};i.push(c)}else{for(var b=i.length-1;b>=0&&i[b].kind!==ct.Region;)b--;if(b>=0){var c=i[b];i.length=b,h>c.startLine&&s!==c.startLine&&(c.endLine=h,u(c),s=c.startLine)}}}break}}o=a.scan()}var N=t&&t.rangeLimit;if(typeof N!="number"||r.length<=N)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var p=[],d=0,_=n;d<_.length;d++){var L=_[d];L<30&&(p[L]=(p[L]||0)+1)}for(var S=0,A=0,b=0;b<p.length;b++){var w=p[b];if(w){if(w+S>N){A=b;break}S+=w}}for(var y=[],b=0;b<r.length;b++){var L=n[b];typeof L=="number"&&(L<A||L===A&&S++<N)&&y.push(r[b])}return y}function Oa(e,t,r){function n(o){for(var u=e.offsetAt(o),l=r.getNodeFromOffset(u,!0),c=[];l;){switch(l.type){case"string":case"object":case"array":var f=l.offset+1,h=l.offset+l.length-1;f<h&&u>=f&&u<=h&&c.push(i(f,h)),c.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":c.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){var g=a(l.offset+l.length,5);g!==-1&&c.push(i(l.offset,g))}l=l.parent}for(var m=void 0,v=c.length-1;v>=0;v--)m=Ft.create(c[v],m);return m||(m=Ft.create(q.create(o,o))),m}function i(o,u){return q.create(e.positionAt(o),e.positionAt(u))}var s=Ke(e.getText(),!0);function a(o,u){s.setPosition(o);var l=s.scan();return l===u?s.getTokenOffset()+s.getTokenLength():-1}return t.map(n)}function Va(e,t){var r=[];return t.visit(function(n){var i;if(n.type==="property"&&n.keyNode.value==="$ref"&&((i=n.valueNode)===null||i===void 0?void 0:i.type)==="string"){var s=n.valueNode.value,a=Wa(t,s);if(a){var o=e.positionAt(a.offset);r.push({target:e.uri+"#"+(o.line+1)+","+(o.character+1),range:$a(e,n.valueNode)})}}return!0}),Promise.resolve(r)}function $a(e,t){return q.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Wa(e,t){var r=qa(t);return r?Mr(r,e.root):null}function Mr(e,t){if(!t)return null;if(e.length===0)return t;var r=e.shift();if(t&&t.type==="object"){var n=t.properties.find(function(a){return a.keyNode.value===r});return n?Mr(e,n.valueNode):null}else if(t&&t.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(r),s=t.items[i];return s?Mr(e,s):null}return null}function qa(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(Ha)}function Ha(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ba(e){var t=e.promiseConstructor||Promise,r=new La(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(Tr);var n=new Sa(r,e.contributions,t,e.clientCapabilities),i=new _a(r,e.contributions,t),s=new Ra(r),a=new Ta(r,t);return{configure:function(o){r.clearExternalSchemas(),o.schemas&&o.schemas.forEach(function(u){r.registerExternalSchema(u.uri,u.fileMatch,u.schema)}),a.configure(o)},resetSchema:function(o){return r.onResourceChange(o)},doValidation:a.doValidation.bind(a),parseJSONDocument:function(o){return va(o,{collectComments:!0})},newJSONDocument:function(o,u){return pa(o,u)},getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:Ua,getSelectionRanges:Oa,findDefinition:function(){return Promise.resolve([])},findLinks:Va,format:function(o,u,l){var c=void 0;if(u){var f=o.offsetAt(u.start),h=o.offsetAt(u.end)-f;c={offset:f,length:h}}var g={tabSize:l?l.tabSize:4,insertSpaces:(l==null?void 0:l.insertSpaces)===!0,insertFinalNewline:(l==null?void 0:l.insertFinalNewline)===!0,eol:`
`};return na(o.getText(),c,g).map(function(m){return pe.replace(q.create(o.positionAt(m.offset),o.positionAt(m.offset+m.length)),m.content)})}}}var ve=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})},be=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ji;typeof fetch<"u"&&(ji=function(e){return fetch(e).then(function(t){return t.text()})});var Ya=function(){function e(t,r){this._ctx=t,this._languageSettings=r.languageSettings,this._languageId=r.languageId,this._languageService=Ba({workspaceContext:{resolveRelativePath:function(n,i){var s=i.substr(0,i.lastIndexOf("/")+1);return Ja(s,n)}},schemaRequestService:r.enableSchemaRequest&&ji}),this._languageService.configure(this._languageSettings)}return e.prototype.doValidation=function(t){return ve(this,void 0,void 0,function(){var r,n;return be(this,function(i){return r=this._getTextDocument(t),r?(n=this._languageService.parseJSONDocument(r),[2,this._languageService.doValidation(r,n,this._languageSettings)]):[2,Promise.resolve([])]})})},e.prototype.doComplete=function(t,r){return ve(this,void 0,void 0,function(){var n,i;return be(this,function(s){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),[2,this._languageService.doComplete(n,r,i)]})})},e.prototype.doResolve=function(t){return ve(this,void 0,void 0,function(){return be(this,function(r){return[2,this._languageService.doResolve(t)]})})},e.prototype.doHover=function(t,r){return ve(this,void 0,void 0,function(){var n,i;return be(this,function(s){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),[2,this._languageService.doHover(n,r,i)]})})},e.prototype.format=function(t,r,n){return ve(this,void 0,void 0,function(){var i,s;return be(this,function(a){return i=this._getTextDocument(t),s=this._languageService.format(i,r,n),[2,Promise.resolve(s)]})})},e.prototype.resetSchema=function(t){return ve(this,void 0,void 0,function(){return be(this,function(r){return[2,Promise.resolve(this._languageService.resetSchema(t))]})})},e.prototype.findDocumentSymbols=function(t){return ve(this,void 0,void 0,function(){var r,n,i;return be(this,function(s){return r=this._getTextDocument(t),n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentSymbols(r,n),[2,Promise.resolve(i)]})})},e.prototype.findDocumentColors=function(t){return ve(this,void 0,void 0,function(){var r,n,i;return be(this,function(s){return r=this._getTextDocument(t),n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentColors(r,n),[2,Promise.resolve(i)]})})},e.prototype.getColorPresentations=function(t,r,n){return ve(this,void 0,void 0,function(){var i,s,a;return be(this,function(o){return i=this._getTextDocument(t),s=this._languageService.parseJSONDocument(i),a=this._languageService.getColorPresentations(i,s,r,n),[2,Promise.resolve(a)]})})},e.prototype.getFoldingRanges=function(t,r){return ve(this,void 0,void 0,function(){var n,i;return be(this,function(s){return n=this._getTextDocument(t),i=this._languageService.getFoldingRanges(n,r),[2,Promise.resolve(i)]})})},e.prototype.getSelectionRanges=function(t,r){return ve(this,void 0,void 0,function(){var n,i,s;return be(this,function(a){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),s=this._languageService.getSelectionRanges(n,r,i),[2,Promise.resolve(s)]})})},e.prototype._getTextDocument=function(t){for(var r=this._ctx.getMirrorModels(),n=0,i=r;n<i.length;n++){var s=i[n];if(s.uri.toString()===t)return _r.create(t,this._languageId,s.version,s.getValue())}return null},e}(),za=47,Ir=46;function Ga(e){return e.charCodeAt(0)===za}function Ja(e,t){if(Ga(t)){var r=tt.parse(e),n=t.split("/");return r.with({path:Ui(n)}).toString()}return Qa(e,t)}function Ui(e){for(var t=[],r=0,n=e;r<n.length;r++){var i=n[r];i.length===0||i.length===1&&i.charCodeAt(0)===Ir||(i.length===2&&i.charCodeAt(0)===Ir&&i.charCodeAt(1)===Ir?t.pop():t.push(i))}e.length>1&&e[e.length-1].length===0&&t.push("");var s=t.join("/");return e[0].length===0&&(s="/"+s),s}function Qa(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=tt.parse(e),i=n.path.split("/"),s=0,a=t;s<a.length;s++){var o=a[s];i.push.apply(i,o.split("/"))}return n.with({path:Ui(i)}).toString()}self.onmessage=function(){qn(function(e,t){return new Ya(e,t)})}})();