(function(){"use strict";class xo{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?lt.isErrorNoTelemetry(t)?new lt(t.message+` `+t.stack):new Error(t.message+` `+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const vo=new xo;function Qt(e){yo(e)||vo.onUnexpectedError(e)}function Tn(e){if(e instanceof Error){const{name:t,message:n,cause:r}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:lt.isErrorNoTelemetry(e),cause:r?Tn(r):void 0,code:e.code}}return e}const Pn="Canceled";function yo(e){return e instanceof Br?!0:e instanceof Error&&e.name===Pn&&e.message===Pn}class Br extends Error{constructor(){super(Pn),this.name=this.message}}class lt extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof lt)return t;const n=new lt;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}}class le extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,le.prototype)}}function Lo(e,t="Unreachable"){throw new Error(t)}function _o(e,t="unexpected state"){if(!e)throw typeof t=="string"?new le(`Assertion Failed: ${t}`):t}function Zt(e){if(!e()){debugger;e(),Qt(new le("Assertion Failed"))}}function Ur(e,t){let n=0;for(;n=0;S--)yield L[S]}e.reverse=o;function u(L){return!L||L[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(L){return L[Symbol.iterator]().next().value}e.first=l;function h(L,S){let P=0;for(const D of L)if(S(D,P++))return!0;return!1}e.some=h;function f(L,S){let P=0;for(const D of L)if(!S(D,P++))return!1;return!0}e.every=f;function d(L,S){for(const P of L)if(S(P))return P}e.find=d;function*m(L,S){for(const P of L)S(P)&&(yield P)}e.filter=m;function*g(L,S){let P=0;for(const D of L)yield S(D,P++)}e.map=g;function*p(L,S){let P=0;for(const D of L)yield*S(D,P++)}e.flatMap=p;function*w(...L){for(const S of L)So(S)?yield*S:yield S}e.concat=w;function v(L,S,P){let D=P;for(const T of L)D=S(D,T);return D}e.reduce=v;function y(L){let S=0;for(const P of L)S++;return S}e.length=y;function*b(L,S,P=L.length){for(S<-L.length&&(S=0),S<0&&(S+=L.length),P<0?P+=L.length:P>L.length&&(P=L.length);S1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Ao(...e){return Kt(()=>qr(e))}class ko{constructor(t){this._isDisposed=!1,this._fn=t}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function Kt(e){return new ko(e)}class Mt{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{qr(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===Et.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Mt.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}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}}class Et{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new Mt,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}class Q{static{this.Undefined=new Q(void 0)}constructor(t){this.element=t,this.next=Q.Undefined,this.prev=Q.Undefined}}class Ro{constructor(){this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Q.Undefined}clear(){let t=this._first;for(;t!==Q.Undefined;){const n=t.next;t.prev=Q.Undefined,t.next=Q.Undefined,t=n}this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new Q(t);if(this._first===Q.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==Q.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==Q.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==Q.Undefined&&t.next!==Q.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===Q.Undefined&&t.next===Q.Undefined?(this._first=Q.Undefined,this._last=Q.Undefined):t.next===Q.Undefined?(this._last=this._last.prev,this._last.next=Q.Undefined):t.prev===Q.Undefined&&(this._first=this._first.next,this._first.prev=Q.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==Q.Undefined;)yield t.element,t=t.next}}const Mo=globalThis.performance.now.bind(globalThis.performance);class en{static create(t){return new en(t)}constructor(t){this._now=t===!1?Date.now:Mo,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Cn;(function(e){e.None=()=>Et.None;function t(x,k){return d(x,()=>{},0,void 0,!0,void 0,k)}e.defer=t;function n(x){return(k,C=null,I)=>{let F=!1,V;return V=x(j=>{if(!F)return V?V.dispose():F=!0,k.call(C,j)},null,I),F&&V.dispose(),V}}e.once=n;function r(x,k){return e.once(e.filter(x,k))}e.onceIf=r;function i(x,k,C){return h((I,F=null,V)=>x(j=>I.call(F,k(j)),null,V),C)}e.map=i;function s(x,k,C){return h((I,F=null,V)=>x(j=>{k(j),I.call(F,j)},null,V),C)}e.forEach=s;function a(x,k,C){return h((I,F=null,V)=>x(j=>k(j)&&I.call(F,j),null,V),C)}e.filter=a;function o(x){return x}e.signal=o;function u(...x){return(k,C=null,I)=>{const F=Ao(...x.map(V=>V(j=>k.call(C,j))));return f(F,I)}}e.any=u;function l(x,k,C,I){let F=C;return i(x,V=>(F=k(F,V),F),I)}e.reduce=l;function h(x,k){let C;const I={onWillAddFirstListener(){C=x(F.fire,F)},onDidRemoveLastListener(){C?.dispose()}},F=new Te(I);return k?.add(F),F.event}function f(x,k){return k instanceof Array?k.push(x):k&&k.add(x),x}function d(x,k,C=100,I=!1,F=!1,V,j){let J,z,Se,Rn=0,Xt;const p1={leakWarningThreshold:V,onWillAddFirstListener(){J=x(b1=>{Rn++,z=k(z,b1),I&&!Se&&(Mn.fire(z),z=void 0),Xt=()=>{const w1=z;z=void 0,Se=void 0,(!I||Rn>1)&&Mn.fire(w1),Rn=0},typeof C=="number"?(Se&&clearTimeout(Se),Se=setTimeout(Xt,C)):Se===void 0&&(Se=null,queueMicrotask(Xt))})},onWillRemoveListener(){F&&Rn>0&&Xt?.()},onDidRemoveLastListener(){Xt=void 0,J.dispose()}},Mn=new Te(p1);return j?.add(Mn),Mn.event}e.debounce=d;function m(x,k=0,C){return e.debounce(x,(I,F)=>I?(I.push(F),I):[F],k,void 0,!0,void 0,C)}e.accumulate=m;function g(x,k=(I,F)=>I===F,C){let I=!0,F;return a(x,V=>{const j=I||!k(V,F);return I=!1,F=V,j},C)}e.latch=g;function p(x,k,C){return[e.filter(x,k,C),e.filter(x,I=>!k(I),C)]}e.split=p;function w(x,k=!1,C=[],I){let F=C.slice(),V=x(z=>{F?F.push(z):J.fire(z)});I&&I.add(V);const j=()=>{F?.forEach(z=>J.fire(z)),F=null},J=new Te({onWillAddFirstListener(){V||(V=x(z=>J.fire(z)),I&&I.add(V))},onDidAddFirstListener(){F&&(k?setTimeout(j):j())},onDidRemoveLastListener(){V&&V.dispose(),V=null}});return I&&I.add(J),J.event}e.buffer=w;function v(x,k){return(I,F,V)=>{const j=k(new b);return x(function(J){const z=j.evaluate(J);z!==y&&I.call(F,z)},void 0,V)}}e.chain=v;const y=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(C=>(k(C),C)),this}filter(k){return this.steps.push(C=>k(C)?C:y),this}reduce(k,C){let I=C;return this.steps.push(F=>(I=k(I,F),I)),this}latch(k=(C,I)=>C===I){let C=!0,I;return this.steps.push(F=>{const V=C||!k(F,I);return C=!1,I=F,V?F:y}),this}evaluate(k){for(const C of this.steps)if(k=C(k),k===y)break;return k}}function N(x,k,C=I=>I){const I=(...J)=>j.fire(C(...J)),F=()=>x.on(k,I),V=()=>x.removeListener(k,I),j=new Te({onWillAddFirstListener:F,onDidRemoveLastListener:V});return j.event}e.fromNodeEventEmitter=N;function _(x,k,C=I=>I){const I=(...J)=>j.fire(C(...J)),F=()=>x.addEventListener(k,I),V=()=>x.removeEventListener(k,I),j=new Te({onWillAddFirstListener:F,onDidRemoveLastListener:V});return j.event}e.fromDOMEventEmitter=_;function M(x,k){let C;const I=new Promise((F,V)=>{const j=n(x)(F,null,k);C=()=>j.dispose()});return I.cancel=C,I}e.toPromise=M;function L(x,k){return x(C=>k.fire(C))}e.forward=L;function S(x,k,C){return k(C),x(I=>k(I))}e.runAndSubscribe=S;class P{constructor(k,C){this._observable=k,this._counter=0,this._hasChanged=!1;const I={onWillAddFirstListener:()=>{k.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{k.removeObserver(this)}};this.emitter=new Te(I),C&&C.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,C){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(x,k){return new P(x,k).emitter.event}e.fromObservable=D;function T(x){return(k,C,I)=>{let F=0,V=!1;const j={beginUpdate(){F++},endUpdate(){F--,F===0&&(x.reportChanges(),V&&(V=!1,k.call(C)))},handlePossibleChange(){},handleChange(){V=!0}};x.addObserver(j),x.reportChanges();const J={dispose(){x.removeObserver(j)}};return I instanceof Mt?I.add(J):Array.isArray(I)&&I.push(J),J}}e.fromObservableLight=T})(Cn||(Cn={}));class tn{static{this.all=new Set}static{this._idPool=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${tn._idPool++}`,tn.all.add(this)}start(t){this._stopWatch=new en,this.listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}}let Eo=-1;class In{static{this._idPool=1}constructor(t,n,r=(In._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(const[r,i]of this._stacks)(!t||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new Po(`${o}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||Qt)(l),Et.None}if(this._disposed)return Et.None;n&&(t=t.bind(n));const i=new Vn(t);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Fn.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof Vn?(this._deliveryQueue??=new Io,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=Kt(()=>{s?.(),this._removeListener(i)});return r instanceof Mt?r.add(a):Array.isArray(r)&&r.push(a),a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(t);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*Co<=n.length){let s=0;for(let a=0;a0}}class Io{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function Fo(){return globalThis._VSCODE_NLS_MESSAGES}function jr(){return globalThis._VSCODE_NLS_LANGUAGE}const Vo=jr()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Wr(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=t[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),Vo&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function $(e,t,...n){return Wr(typeof e=="number"?Do(e,t):t,n)}function Do(e,t){const n=Fo()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}const ut="en";let Dn=!1,On=!1,$n=!1,nn,Bn=ut,Hr=ut,Oo,De;const Ke=globalThis;let he;typeof Ke.vscode<"u"&&typeof Ke.vscode.process<"u"?he=Ke.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(he=process);const $o=typeof he?.versions?.electron=="string"&&he?.type==="renderer";if(typeof he=="object"){Dn=he.platform==="win32",On=he.platform==="darwin",$n=he.platform==="linux",$n&&he.env.SNAP&&he.env.SNAP_REVISION,he.env.CI||he.env.BUILD_ARTIFACTSTAGINGDIRECTORY||he.env.GITHUB_WORKSPACE,nn=ut,Bn=ut;const e=he.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);nn=t.userLocale,Hr=t.osLocale,Bn=t.resolvedLanguage||ut,Oo=t.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!$o?(De=navigator.userAgent,Dn=De.indexOf("Windows")>=0,On=De.indexOf("Macintosh")>=0,(De.indexOf("Macintosh")>=0||De.indexOf("iPad")>=0||De.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,$n=De.indexOf("Linux")>=0,De?.indexOf("Mobi")>=0,Bn=jr()||ut,nn=navigator.language.toLowerCase(),Hr=nn):console.error("Unable to resolve platform.");const Tt=Dn,Bo=On,Pe=De,Uo=typeof Ke.postMessage=="function"&&!Ke.importScripts;(()=>{if(Uo){const e=[];Ke.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{const r=++t;e.push({id:r,callback:n}),Ke.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();const qo=!!(Pe&&Pe.indexOf("Chrome")>=0);Pe&&Pe.indexOf("Firefox")>=0,!qo&&Pe&&Pe.indexOf("Safari")>=0,Pe&&Pe.indexOf("Edg/")>=0,Pe&&Pe.indexOf("Android")>=0;function jo(e){return e}class Wo{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=jo):(this._fn=n,this._computeKey=t.getCacheKey)}get(t){const n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(t)),this.lastCache}}var et;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Running=1]="Running",e[e.Completed=2]="Completed"})(et||(et={}));class Un{constructor(t){this.executor=t,this._state=et.Uninitialized}get value(){if(this._state===et.Uninitialized){this._state=et.Running;try{this._value=this.executor()}catch(t){this._error=t}finally{this._state=et.Completed}}else if(this._state===et.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Ho(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function zo(e){return e.source==="^"||e.source==="^$"||e.source==="$"||e.source==="^\\s*$"?!1:!!(e.exec("")&&e.lastIndex===0)}function Go(e){return e.split(/\r\n|\r|\n/)}function Jo(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function zr(e){return e>=65&&e<=90}function Qo(e,t){const n=Math.min(e.length,t.length);let r;for(r=0;rJSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new Wo({getCacheKey:JSON.stringify},t=>{function n(h){const f=new Map;for(let d=0;d!h.startsWith("_")&&Object.hasOwn(s,h));a.length===0&&(a=["_default"]);let o;for(const h of a){const f=n(s[h]);o=i(o,f)}const u=n(s._common),l=r(u,o);return new je(l)})}static getInstance(t){return je.cache.get(Array.from(t))}static{this._locales=new Un(()=>Object.keys(je.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))}static getLocales(){return je._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class tt{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static{this._data=void 0}static getData(){return this._data||(this._data=new Set([...Object.values(tt.getRawData())].flat())),this._data}static isInvisibleCharacter(t){return tt.getData().has(t)}static get codePoints(){return tt.getData()}}const jn="default",rl="$initialize";class il{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}}class Gr{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}}class sl{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}}class al{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}}class ol{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}}class ll{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}async sendMessage(t,n,r){const i=String(++this._lastSentReq);return new Promise((s,a)=>{this._pendingReplies[i]={resolve:s,reject:a},this._send(new il(this._workerId,i,t,n,r))})}listen(t,n,r){let i=null;const s=new Te({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new sl(this._workerId,i,t,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new ol(this._workerId,i)),i=null}});return s.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}createProxyToRemoteChannel(t,n){const r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(Xr(s)?i[s]=a=>this.listen(t,s,a):Jr(s)?i[s]=this.listen(t,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...a)=>(await n?.(),this.sendMessage(t,s,a)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;if(t.err.$isError){const i=new Error;i.name=t.err.name,i.message=t.err.message,i.stack=t.err.stack,r=i}n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){const n=t.req;this._handler.handleMessage(t.channel,t.method,t.args).then(i=>{this._send(new Gr(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=Tn(i.detail)),this._send(new Gr(this._workerId,n,void 0,Tn(i)))})}_handleSubscribeEventMessage(t){const n=t.req,r=this._handler.handleEvent(t.channel,t.eventName,t.arg)(i=>{this._send(new al(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){const n=[];if(t.type===0)for(let r=0;r{t(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)}),this.requestHandler=n(this)}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n,r){if(t===jn&&n===rl)return this.initialize(r[0]);const i=t===jn?this.requestHandler:this._localChannels.get(t);if(!i)return Promise.reject(new Error(`Missing channel ${t} on worker thread`));const s=i[n];if(typeof s!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`));try{return Promise.resolve(s.apply(i,r))}catch(a){return Promise.reject(a)}}_handleEvent(t,n,r){const i=t===jn?this.requestHandler:this._localChannels.get(t);if(!i)throw new Error(`Missing channel ${t} on worker thread`);if(Xr(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);const a=s.call(i,r);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return a}if(Jr(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(t){if(!this._remoteChannels.has(t)){const n=this._protocol.createProxyToRemoteChannel(t);this._remoteChannels.set(t,n)}return this._remoteChannels.get(t)}async initialize(t){this._protocol.setWorkerId(t)}}let Qr=!1;function cl(e){if(Qr)throw new Error("WebWorker already initialized!");Qr=!0;const t=new ul(n=>globalThis.postMessage(n),n=>e(n));return globalThis.onmessage=n=>{t.onmessage(n.data)},t}class We{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}new Un(()=>new Uint8Array(256));function Zr(e,t){return(t<<5)-t+e|0}function fl(e,t){t=Zr(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new We(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,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),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 He{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,s,a]=He._getElements(t),[o,u,l]=He._getElements(n);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 n=t.getElements();if(He._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let f;return r<=i?(ct.Assert(t===n+1,"originalStart should only be one more than originalEnd"),f=[new We(t,0,r,i-r+1)]):t<=n?(ct.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new We(t,n-t+1,r,0)]):(ct.Assert(t===n+1,"originalStart should only be one more than originalEnd"),ct.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,n,r,i,a,o,s),l=a[0],h=o[0];if(u!==null)return u;if(!s[0]){const f=this.ComputeDiffRecursive(t,l,r,h,s);let d=[];return s[0]?d=[new We(l+1,n-(l+1)+1,h+1,i-(h+1)+1)]:d=this.ComputeDiffRecursive(l+1,n,h+1,i,s),this.ConcatenateChanges(f,d)}return[new We(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,a,o,u,l,h,f,d,m,g,p,w,v,y){let b=null,N=null,_=new Kr,M=n,L=r,S=m[0]-w[0]-i,P=-1073741824,D=this.m_forwardHistory.length-1;do{const T=S+t;T===M||T=0&&(l=this.m_forwardHistory[D],t=l[0],M=1,L=l.length-1)}while(--D>=-1);if(b=_.getReverseChanges(),y[0]){let T=m[0]+1,x=w[0]+1;if(b!==null&&b.length>0){const k=b[b.length-1];T=Math.max(T,k.getOriginalEnd()),x=Math.max(x,k.getModifiedEnd())}N=[new We(T,d-T+1,x,p-x+1)]}else{_=new Kr,M=a,L=o,S=m[0]-w[0]-u,P=1073741824,D=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const T=S+s;T===M||T=h[T+1]?(f=h[T+1]-1,g=f-S-u,f>P&&_.MarkNextChange(),P=f+1,_.AddOriginalElement(f+1,g+1),S=T+1-s):(f=h[T-1],g=f-S-u,f>P&&_.MarkNextChange(),P=f,_.AddModifiedElement(f+1,g+1),S=T-1-s),D>=0&&(h=this.m_reverseHistory[D],s=h[0],M=1,L=h.length-1)}while(--D>=-1);N=_.getChanges()}return this.ConcatenateChanges(b,N)}ComputeRecursionPoint(t,n,r,i,s,a,o){let u=0,l=0,h=0,f=0,d=0,m=0;t--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-t+(i-r),p=g+1,w=new Int32Array(p),v=new Int32Array(p),y=i-r,b=n-t,N=t-r,_=n-i,L=(b-y)%2===0;w[y]=t,v[b]=n,o[0]=!1;for(let S=1;S<=g/2+1;S++){let P=0,D=0;h=this.ClipDiagonalBound(y-S,S,y,p),f=this.ClipDiagonalBound(y+S,S,y,p);for(let x=h;x<=f;x+=2){x===h||xP+D&&(P=u,D=l),!L&&Math.abs(x-b)<=S-1&&u>=v[x])return s[0]=u,a[0]=l,k<=v[x]&&S<=1448?this.WALKTRACE(y,h,f,N,b,d,m,_,w,v,u,n,s,l,i,a,L,o):null}const T=(P-t+(D-r)-S)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(P,T))return o[0]=!0,s[0]=P,a[0]=D,T>0&&S<=1448?this.WALKTRACE(y,h,f,N,b,d,m,_,w,v,u,n,s,l,i,a,L,o):(t++,r++,[new We(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(b-S,S,b,p),m=this.ClipDiagonalBound(b+S,S,b,p);for(let x=d;x<=m;x+=2){x===d||x=v[x+1]?u=v[x+1]-1:u=v[x-1],l=u-(x-b)-_;const k=u;for(;u>t&&l>r&&this.ElementsAreEqual(u,l);)u--,l--;if(v[x]=u,L&&Math.abs(x-y)<=S&&u<=w[x])return s[0]=u,a[0]=l,k>=w[x]&&S<=1448?this.WALKTRACE(y,h,f,N,b,d,m,_,w,v,u,n,s,l,i,a,L,o):null}if(S<=1447){let x=new Int32Array(f-h+2);x[0]=y-h+1,ft.Copy2(w,h,x,1,f-h+1),this.m_forwardHistory.push(x),x=new Int32Array(m-d+2),x[0]=b-d+1,ft.Copy2(v,d,x,1,m-d+1),this.m_reverseHistory.push(x)}}return this.WALKTRACE(y,h,f,N,b,d,m,_,w,v,u,n,s,l,i,a,L,o)}PrettifyChanges(t){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,s=0;if(n>0){const f=t[n-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let u=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let f=1;;f++){const d=r.originalStart-f,m=r.modifiedStart-f;if(dl&&(l=p,u=f)}r.originalStart-=u,r.modifiedStart-=u;const h=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],h)){t[n-1]=h[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&m>u&&(u=m,l=f,h=d)}return u>0?[l,h]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const s=this._OriginalRegionIsBoundary(t,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(t,n){const r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return ft.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],ft.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return ft.Copy(t,0,i,0,t.length),ft.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(ct.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),ct.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new We(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return ne.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return ne.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return ne.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return ne.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return ne.plusRange(this,t)}static plusRange(t,n){let r,i,s,a;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new ne(r,i,s,a)}intersectRanges(t){return ne.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn;const o=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,h=n.endColumn;return rl?(s=l,a=h):s===l&&(a=Math.min(a,h)),r>s||r===s&&i>a?null:new ne(r,i,s,a)}equalsRange(t){return ne.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return ne.getEndPosition(this)}static getEndPosition(t){return new X(t.endLineNumber,t.endColumn)}getStartPosition(){return ne.getStartPosition(this)}static getStartPosition(t){return new X(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new ne(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new ne(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return ne.collapseToStart(this)}static collapseToStart(t){return new ne(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return ne.collapseToEnd(this)}static collapseToEnd(t){return new ne(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new ne(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(t,n=t){return new ne(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new ne(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,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function ei(e){return e<0?0:e>255?255:e|0}function ht(e){return e<0?0:e>4294967295?4294967295:e|0}class Wn{constructor(t){const n=ei(t);this._defaultValue=n,this._asciiMap=Wn._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=ei(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class dl{constructor(t,n,r){const i=new Uint8Array(t*n);for(let s=0,a=t*n;sn&&(n=u),o>r&&(r=o),l>r&&(r=l)}n++,r++;const i=new dl(r,n,0);for(let s=0,a=t.length;s=this._maxCharCode?0:this._states.get(t,n)}}let Hn=null;function ml(){return Hn===null&&(Hn=new gl([[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]])),Hn}let Pt=null;function pl(){if(Pt===null){Pt=new Wn(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),u=n.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(t,n=ml()){const r=pl(),i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,h=0,f=0,d=1,m=!1,g=!1,p=!1,w=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}const ti=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var sn;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof an?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Cn.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ti})})(sn||(sn={}));class an{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?ti:(this._emitter||(this._emitter=new Te),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class wl{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 an),this._token}cancel(){this._token?this._token instanceof an&&this._token.cancel():this._token=sn.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof an&&this._token.dispose():this._token=sn.None}}class Gn{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const on=new Gn,Jn=new Gn,Xn=new Gn,xl=new Array(230),vl=Object.create(null),yl=Object.create(null);(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],r=[];for(const i of t){const[s,a,o,u,l,h,f,d,m]=i;if(r[a]||(r[a]=!0,vl[o]=a,yl[o.toLowerCase()]=a),!n[u]){if(n[u]=!0,!l)throw new Error(`String representation missing for key code ${u} around scan code ${o}`);on.define(u,l),Jn.define(u,d||l),Xn.define(u,m||d||l)}h&&(xl[h]=u)}})();var ni;(function(e){function t(o){return on.keyCodeToStr(o)}e.toString=t;function n(o){return on.strToKeyCode(o)}e.fromString=n;function r(o){return Jn.keyCodeToStr(o)}e.toUserSettingsUS=r;function i(o){return Xn.keyCodeToStr(o)}e.toUserSettingsGeneral=i;function s(o){return Jn.strToKeyCode(o)||Xn.strToKeyCode(o)}e.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return on.keyCodeToStr(o)}e.toElectronAccelerator=a})(ni||(ni={}));function Ll(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}var ri={};let dt;const Qn=globalThis.vscode;if(typeof Qn<"u"&&typeof Qn.process<"u"){const e=Qn.process;dt={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?dt={get platform(){return process.platform},get arch(){return process.arch},get env(){return ri},cwd(){return ri.VSCODE_CWD||process.cwd()}}:dt={get platform(){return Tt?"win32":Bo?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const ln=dt.cwd,_l=dt.env,Nl=dt.platform,Sl=65,Al=97,kl=90,Rl=122,nt=46,ae=47,de=92,Oe=58,Ml=63;class ii extends Error{constructor(t,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";const s=t.indexOf(".")!==-1?"property":"argument";let a=`The "${t}" ${s} ${i} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function El(e,t){if(e===null||typeof e!="object")throw new ii(t,"Object",e)}function ee(e,t){if(typeof e!="string")throw new ii(t,"string",e)}const ze=Nl==="win32";function q(e){return e===ae||e===de}function Zn(e){return e===ae}function $e(e){return e>=Sl&&e<=kl||e>=Al&&e<=Rl}function un(e,t,n,r){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l2){const h=i.lastIndexOf(n);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(n)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===nt&&o!==-1?++o:o=-1}return i}function Tl(e){return e?`${e[0]==="."?"":"."}${e}`:""}function si(e,t){El(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${Tl(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const fe={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],ee(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=ln():(s=_l[`=${t}`]||ln(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===de)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const h=s.charCodeAt(0);if(a===1)q(h)&&(o=1,l=!0);else if(q(h))if(l=!0,q(s.charCodeAt(1))){let f=2,d=f;for(;f2&&q(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(r){if(t.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=l,l&&t.length>0)break}return n=un(n,!r,"\\",q),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){ee(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const s=e.charCodeAt(0);if(t===1)return Zn(s)?"\\":e;if(q(s))if(i=!0,q(e.charCodeAt(1))){let o=2,u=o;for(;o2&&q(e.charCodeAt(2))&&(i=!0,n=3));let a=n0&&q(e.charCodeAt(t-1))&&(a+="\\"),!i&&r===void 0&&e.includes(":")){if(a.length>=2&&$e(a.charCodeAt(0))&&a.charCodeAt(1)===Oe)return`.\\${a}`;let o=e.indexOf(":");do if(o===t-1||q(e.charCodeAt(o+1)))return`.\\${a}`;while((o=e.indexOf(":",o+1))!==-1)}return r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(e){ee(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return q(n)||t>2&&$e(n)&&e.charCodeAt(1)===Oe&&q(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=a:t+=`\\${a}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&q(n.charCodeAt(0))){++i;const s=n.length;s>1&&q(n.charCodeAt(1))&&(++i,s>2&&(q(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return fe.normalize(t)},relative(e,t){if(ee(e,"from"),ee(t,"to"),e===t)return"";const n=fe.resolve(e),r=fe.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";if(n.length!==e.length||r.length!==t.length){const g=n.split("\\"),p=r.split("\\");g[g.length-1]===""&&g.pop(),p[p.length-1]===""&&p.pop();const w=g.length,v=p.length,y=wy?p.slice(b).join("\\"):w>y?"..\\".repeat(w-1-b)+"..":"":"..\\".repeat(w-b)+p.slice(b).join("\\")}let i=0;for(;ii&&e.charCodeAt(s-1)===de;)s--;const a=s-i;let o=0;for(;oo&&t.charCodeAt(u-1)===de;)u--;const l=u-o,h=ah){if(t.charCodeAt(o+d)===de)return r.slice(o+d+1);if(d===2)return r.slice(o+d)}a>h&&(e.charCodeAt(i+d)===de?f=d:d===2&&(f=3)),f===-1&&(f=0)}let m="";for(d=i+f+1;d<=s;++d)(d===s||e.charCodeAt(d)===de)&&(m+=m.length===0?"..":"\\..");return o+=f,m.length>0?`${m}${r.slice(o,u)}`:(r.charCodeAt(o)===de&&++o,r.slice(o,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=fe.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===de){if(t.charCodeAt(1)===de){const n=t.charCodeAt(2);if(n!==Ml&&n!==nt)return`\\\\?\\UNC\\${t.slice(2)}`}}else if($e(t.charCodeAt(0))&&t.charCodeAt(1)===Oe&&t.charCodeAt(2)===de)return`\\\\?\\${t}`;return t},dirname(e){ee(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return q(i)?e:".";if(q(i)){if(n=r=1,q(e.charCodeAt(1))){let o=2,u=o;for(;o2&&q(e.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=t-1;o>=r;--o)if(q(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&ee(t,"suffix"),ee(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&$e(e.charCodeAt(0))&&e.charCodeAt(1)===Oe&&(n=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>=n;--s){const u=e.charCodeAt(s);if(q(u)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(q(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){ee(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===Oe&&$e(e.charCodeAt(0))&&(t=r=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(q(u)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===nt?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:si.bind(null,"\\"),parse(e){ee(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return q(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(q(i)){if(r=1,q(e.charCodeAt(1))){let f=2,d=f;for(;f0&&(t.root=e.slice(0,r));let s=-1,a=r,o=-1,u=!0,l=e.length-1,h=0;for(;l>=r;--l){if(i=e.charCodeAt(l),q(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===nt?s===-1?s=l:h!==1&&(h=1):s!==-1&&(h=-1)}return o!==-1&&(s===-1||h===0||h===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!==r?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Pl=(()=>{if(ze){const e=/\\/g;return()=>{const t=ln().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>ln()})(),ge={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=0&&!n;r--){const i=e[r];ee(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===ae)}if(!n){const r=Pl();t=`${r}/${t}`,n=r.charCodeAt(0)===ae}return t=un(t,!n,"/",Zn),n?`/${t}`:t.length>0?t:"."},normalize(e){if(ee(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ae,n=e.charCodeAt(e.length-1)===ae;return e=un(e,!t,"/",Zn),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return ee(e,"path"),e.length>0&&e.charCodeAt(0)===ae},join(...e){if(e.length===0)return".";const t=[];for(let n=0;n0&&t.push(r)}return t.length===0?".":ge.normalize(t.join("/"))},relative(e,t){if(ee(e,"from"),ee(t,"to"),e===t||(e=ge.resolve(e),t=ge.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,s=1,a=t.length-s,o=io){if(t.charCodeAt(s+l)===ae)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(n+l)===ae?u=l:l===0&&(u=0));let h="";for(l=n+u+1;l<=r;++l)(l===r||e.charCodeAt(l)===ae)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(ee(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ae;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===ae){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&ee(t,"suffix"),ee(e,"path");let n=0,r=-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===ae){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===ae){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){ee(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e[a];if(o==="/"){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o==="."?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:si.bind(null,"/"),parse(e){ee(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===ae;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=r;--u){const h=e.charCodeAt(u);if(h===ae){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),h===nt?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const h=s===0&&n?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(h,a):(t.name=e.slice(h,i),t.base=e.slice(h,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ge.win32=fe.win32=fe,ge.posix=fe.posix=ge,ze?fe.normalize:ge.normalize,ze?fe.resolve:ge.resolve,ze?fe.relative:ge.relative,ze?fe.dirname:ge.dirname,ze?fe.basename:ge.basename,ze?fe.extname:ge.extname,ze?fe.sep:ge.sep;const Cl=/^\w[\w\d+.-]*$/,Il=/^\//,Fl=/^\/\//;function Vl(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&&!Cl.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Il.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(Fl.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 Dl(e,t){return!e&&!t?"file":e}function Ol(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Ae&&(t=Ae+t):t=Ae;break}return t}const Z="",Ae="/",$l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Yn=class En{static isUri(t){return t instanceof En?!0:!t||typeof t!="object"?!1: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"}constructor(t,n,r,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Z,this.authority=t.authority||Z,this.path=t.path||Z,this.query=t.query||Z,this.fragment=t.fragment||Z):(this.scheme=Dl(t,a),this.authority=n||Z,this.path=Ol(this.scheme,r||Z),this.query=i||Z,this.fragment=s||Z,Vl(this,a))}get fsPath(){return Kn(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=t;return n===void 0?n=this.scheme:n===null&&(n=Z),r===void 0?r=this.authority:r===null&&(r=Z),i===void 0?i=this.path:i===null&&(i=Z),s===void 0?s=this.query:s===null&&(s=Z),a===void 0?a=this.fragment:a===null&&(a=Z),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new gt(n,r,i,s,a)}static parse(t,n=!1){const r=$l.exec(t);return r?new gt(r[2]||Z,cn(r[4]||Z),cn(r[5]||Z),cn(r[7]||Z),cn(r[9]||Z),n):new gt(Z,Z,Z,Z,Z)}static file(t){let n=Z;if(Tt&&(t=t.replace(/\\/g,Ae)),t[0]===Ae&&t[1]===Ae){const r=t.indexOf(Ae,2);r===-1?(n=t.substring(2),t=Ae):(n=t.substring(2,r),t=t.substring(r)||Ae)}return new gt("file",n,t,Z,Z)}static from(t,n){return new gt(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Tt&&t.scheme==="file"?r=En.file(fe.join(Kn(t,!0),...n)).path:r=ge.join(t.path,...n),t.with({path:r})}toString(t=!1){return er(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof En)return t;{const n=new gt(t);return n._formatted=t.external??null,n._fsPath=t._sep===ai?t.fsPath??null:null,n}}else return t}};const ai=Tt?1:void 0;class gt extends Yn{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Kn(this,!1)),this._fsPath}toString(t=!1){return t?er(this,!0):(this._formatted||(this._formatted=er(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=ai),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 oi={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 li(e,t,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));const o=oi[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function Bl(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${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?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Tt&&(n=n.replace(/\//g,"\\")),n}function er(e,t){const n=t?Bl:li;let r="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=Ae,r+=Ae),s){let l=s.indexOf("@");if(l!==-1){const h=s.substr(0,l);s=s.substr(l+1),l=h.lastIndexOf(":"),l===-1?r+=n(h,!1,!1):(r+=n(h.substr(0,l),!1,!1),r+=":",r+=n(h.substr(l+1),!1,!0)),r+="@"}s=s.toLowerCase(),l=s.lastIndexOf(":"),l===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,l),!1,!0),r+=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)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),u&&(r+="#",r+=t?u:li(u,!1,!1)),r}function ui(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ui(e.substr(3)):e}}const ci=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function cn(e){return e.match(ci)?e.replace(ci,t=>ui(t)):e}class me extends U{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return me.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new me(this.startLineNumber,this.startColumn,t,n):new me(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new X(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new X(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new me(t,n,this.endLineNumber,this.endColumn):new me(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new me(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new me(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new me(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new me(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){this._factories.get(t)?.dispose();const r=new Wl(this,t,n);return this._factories.set(t,r),Kt(()=>{const i=this._factories.get(t);!i||i!==r||(this._factories.delete(t),i.dispose())})}async getOrCreate(t){const n=this.get(t);if(n)return n;const r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;const r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Wl extends Et{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}}class Hl{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var hi;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(hi||(hi={}));var di;(function(e){const t=new Map;t.set(0,O.symbolMethod),t.set(1,O.symbolFunction),t.set(2,O.symbolConstructor),t.set(3,O.symbolField),t.set(4,O.symbolVariable),t.set(5,O.symbolClass),t.set(6,O.symbolStruct),t.set(7,O.symbolInterface),t.set(8,O.symbolModule),t.set(9,O.symbolProperty),t.set(10,O.symbolEvent),t.set(11,O.symbolOperator),t.set(12,O.symbolUnit),t.set(13,O.symbolValue),t.set(15,O.symbolEnum),t.set(14,O.symbolConstant),t.set(15,O.symbolEnum),t.set(16,O.symbolEnumMember),t.set(17,O.symbolKeyword),t.set(28,O.symbolSnippet),t.set(18,O.symbolText),t.set(19,O.symbolColor),t.set(20,O.symbolFile),t.set(21,O.symbolReference),t.set(22,O.symbolCustomColor),t.set(23,O.symbolFolder),t.set(24,O.symbolTypeParameter),t.set(25,O.account),t.set(26,O.issues),t.set(27,O.tools);function n(a){let o=t.get(a);return o||(console.info("No codicon found for CompletionItemKind "+a),o=O.symbolProperty),o}e.toIcon=n;function r(a){switch(a){case 0:return $(728,"Method");case 1:return $(729,"Function");case 2:return $(730,"Constructor");case 3:return $(731,"Field");case 4:return $(732,"Variable");case 5:return $(733,"Class");case 6:return $(734,"Struct");case 7:return $(735,"Interface");case 8:return $(736,"Module");case 9:return $(737,"Property");case 10:return $(738,"Event");case 11:return $(739,"Operator");case 12:return $(740,"Unit");case 13:return $(741,"Value");case 14:return $(742,"Constant");case 15:return $(743,"Enum");case 16:return $(744,"Enum Member");case 17:return $(745,"Keyword");case 18:return $(746,"Text");case 19:return $(747,"Color");case 20:return $(748,"File");case 21:return $(749,"Reference");case 22:return $(750,"Custom Color");case 23:return $(751,"Folder");case 24:return $(752,"Type Parameter");case 25:return $(753,"User");case 26:return $(754,"Issue");case 27:return $(755,"Tool");case 28:return $(756,"Snippet");default:return""}}e.toLabel=r;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",28),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),i.set("tool",27);function s(a,o){let u=i.get(a);return typeof u>"u"&&!o&&(u=9),u}e.fromString=s})(di||(di={}));var gi;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(gi||(gi={}));var mi;(function(e){e[e.Code=1]="Code",e[e.Label=2]="Label"})(mi||(mi={}));var pi;(function(e){e[e.Accepted=0]="Accepted",e[e.Rejected=1]="Rejected",e[e.Ignored=2]="Ignored"})(pi||(pi={}));var bi;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(bi||(bi={}));var wi;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(wi||(wi={}));var xi;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(xi||(xi={})),$(757,"array"),$(758,"boolean"),$(759,"class"),$(760,"constant"),$(761,"constructor"),$(762,"enumeration"),$(763,"enumeration member"),$(764,"event"),$(765,"field"),$(766,"file"),$(767,"function"),$(768,"interface"),$(769,"key"),$(770,"method"),$(771,"module"),$(772,"namespace"),$(773,"null"),$(774,"number"),$(775,"object"),$(776,"operator"),$(777,"package"),$(778,"property"),$(779,"string"),$(780,"struct"),$(781,"type parameter"),$(782,"variable");var vi;(function(e){const t=new Map;t.set(0,O.symbolFile),t.set(1,O.symbolModule),t.set(2,O.symbolNamespace),t.set(3,O.symbolPackage),t.set(4,O.symbolClass),t.set(5,O.symbolMethod),t.set(6,O.symbolProperty),t.set(7,O.symbolField),t.set(8,O.symbolConstructor),t.set(9,O.symbolEnum),t.set(10,O.symbolInterface),t.set(11,O.symbolFunction),t.set(12,O.symbolVariable),t.set(13,O.symbolConstant),t.set(14,O.symbolString),t.set(15,O.symbolNumber),t.set(16,O.symbolBoolean),t.set(17,O.symbolArray),t.set(18,O.symbolObject),t.set(19,O.symbolKey),t.set(20,O.symbolNull),t.set(21,O.symbolEnumMember),t.set(22,O.symbolStruct),t.set(23,O.symbolEvent),t.set(24,O.symbolOperator),t.set(25,O.symbolTypeParameter);function n(s){let a=t.get(s);return a||(console.info("No codicon found for SymbolKind "+s),a=O.symbolProperty),a}e.toIcon=n;const r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function i(s){let a=r.get(s);return a===void 0&&(console.info("No completion kind found for SymbolKind "+s),a=20),a}e.toCompletionKind=i})(vi||(vi={}));let y1=class Ye{static{this.Comment=new Ye("comment")}static{this.Imports=new Ye("imports")}static{this.Region=new Ye("region")}static fromValue(t){switch(t){case"comment":return Ye.Comment;case"imports":return Ye.Imports;case"region":return Ye.Region}return new Ye(t)}constructor(t){this.value=t}};var yi;(function(e){e[e.AIGenerated=1]="AIGenerated"})(yi||(yi={}));var Li;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Li||(Li={}));var _i;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(_i||(_i={}));var Ni;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Ni||(Ni={})),new jl;var Si;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(Si||(Si={}));var Ai;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(Ai||(Ai={}));var ki;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(ki||(ki={}));var Ri;(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.Tool=27]="Tool",e[e.Snippet=28]="Snippet"})(Ri||(Ri={}));var Mi;(function(e){e[e.Deprecated=1]="Deprecated"})(Mi||(Mi={}));var Ei;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Ei||(Ei={}));var Ti;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(Ti||(Ti={}));var Pi;(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"})(Pi||(Pi={}));var Ci;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Ci||(Ci={}));var Ii;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Ii||(Ii={}));var Fi;(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"})(Fi||(Fi={}));var Vi;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.allowOverflow=4]="allowOverflow",e[e.allowVariableLineHeights=5]="allowVariableLineHeights",e[e.allowVariableFonts=6]="allowVariableFonts",e[e.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",e[e.ariaLabel=8]="ariaLabel",e[e.ariaRequired=9]="ariaRequired",e[e.autoClosingBrackets=10]="autoClosingBrackets",e[e.autoClosingComments=11]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=13]="autoClosingDelete",e[e.autoClosingOvertype=14]="autoClosingOvertype",e[e.autoClosingQuotes=15]="autoClosingQuotes",e[e.autoIndent=16]="autoIndent",e[e.autoIndentOnPaste=17]="autoIndentOnPaste",e[e.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",e[e.automaticLayout=19]="automaticLayout",e[e.autoSurround=20]="autoSurround",e[e.bracketPairColorization=21]="bracketPairColorization",e[e.guides=22]="guides",e[e.codeLens=23]="codeLens",e[e.codeLensFontFamily=24]="codeLensFontFamily",e[e.codeLensFontSize=25]="codeLensFontSize",e[e.colorDecorators=26]="colorDecorators",e[e.colorDecoratorsLimit=27]="colorDecoratorsLimit",e[e.columnSelection=28]="columnSelection",e[e.comments=29]="comments",e[e.contextmenu=30]="contextmenu",e[e.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",e[e.cursorBlinking=32]="cursorBlinking",e[e.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",e[e.cursorStyle=34]="cursorStyle",e[e.cursorSurroundingLines=35]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",e[e.cursorWidth=37]="cursorWidth",e[e.cursorHeight=38]="cursorHeight",e[e.disableLayerHinting=39]="disableLayerHinting",e[e.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",e[e.domReadOnly=41]="domReadOnly",e[e.dragAndDrop=42]="dragAndDrop",e[e.dropIntoEditor=43]="dropIntoEditor",e[e.editContext=44]="editContext",e[e.emptySelectionClipboard=45]="emptySelectionClipboard",e[e.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",e[e.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",e[e.extraEditorClassName=48]="extraEditorClassName",e[e.fastScrollSensitivity=49]="fastScrollSensitivity",e[e.find=50]="find",e[e.fixedOverflowWidgets=51]="fixedOverflowWidgets",e[e.folding=52]="folding",e[e.foldingStrategy=53]="foldingStrategy",e[e.foldingHighlight=54]="foldingHighlight",e[e.foldingImportsByDefault=55]="foldingImportsByDefault",e[e.foldingMaximumRegions=56]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=58]="fontFamily",e[e.fontInfo=59]="fontInfo",e[e.fontLigatures=60]="fontLigatures",e[e.fontSize=61]="fontSize",e[e.fontWeight=62]="fontWeight",e[e.fontVariations=63]="fontVariations",e[e.formatOnPaste=64]="formatOnPaste",e[e.formatOnType=65]="formatOnType",e[e.glyphMargin=66]="glyphMargin",e[e.gotoLocation=67]="gotoLocation",e[e.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",e[e.hover=69]="hover",e[e.inDiffEditor=70]="inDiffEditor",e[e.inlineSuggest=71]="inlineSuggest",e[e.letterSpacing=72]="letterSpacing",e[e.lightbulb=73]="lightbulb",e[e.lineDecorationsWidth=74]="lineDecorationsWidth",e[e.lineHeight=75]="lineHeight",e[e.lineNumbers=76]="lineNumbers",e[e.lineNumbersMinChars=77]="lineNumbersMinChars",e[e.linkedEditing=78]="linkedEditing",e[e.links=79]="links",e[e.matchBrackets=80]="matchBrackets",e[e.minimap=81]="minimap",e[e.mouseStyle=82]="mouseStyle",e[e.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=84]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",e[e.multiCursorModifier=86]="multiCursorModifier",e[e.mouseMiddleClickAction=87]="mouseMiddleClickAction",e[e.multiCursorPaste=88]="multiCursorPaste",e[e.multiCursorLimit=89]="multiCursorLimit",e[e.occurrencesHighlight=90]="occurrencesHighlight",e[e.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",e[e.overtypeCursorStyle=92]="overtypeCursorStyle",e[e.overtypeOnPaste=93]="overtypeOnPaste",e[e.overviewRulerBorder=94]="overviewRulerBorder",e[e.overviewRulerLanes=95]="overviewRulerLanes",e[e.padding=96]="padding",e[e.pasteAs=97]="pasteAs",e[e.parameterHints=98]="parameterHints",e[e.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",e[e.placeholder=100]="placeholder",e[e.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",e[e.quickSuggestions=102]="quickSuggestions",e[e.quickSuggestionsDelay=103]="quickSuggestionsDelay",e[e.readOnly=104]="readOnly",e[e.readOnlyMessage=105]="readOnlyMessage",e[e.renameOnType=106]="renameOnType",e[e.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",e[e.renderControlCharacters=108]="renderControlCharacters",e[e.renderFinalNewline=109]="renderFinalNewline",e[e.renderLineHighlight=110]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=112]="renderValidationDecorations",e[e.renderWhitespace=113]="renderWhitespace",e[e.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",e[e.roundedSelection=115]="roundedSelection",e[e.rulers=116]="rulers",e[e.scrollbar=117]="scrollbar",e[e.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=119]="scrollBeyondLastLine",e[e.scrollPredominantAxis=120]="scrollPredominantAxis",e[e.selectionClipboard=121]="selectionClipboard",e[e.selectionHighlight=122]="selectionHighlight",e[e.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",e[e.selectionHighlightMultiline=124]="selectionHighlightMultiline",e[e.selectOnLineNumbers=125]="selectOnLineNumbers",e[e.showFoldingControls=126]="showFoldingControls",e[e.showUnused=127]="showUnused",e[e.snippetSuggestions=128]="snippetSuggestions",e[e.smartSelect=129]="smartSelect",e[e.smoothScrolling=130]="smoothScrolling",e[e.stickyScroll=131]="stickyScroll",e[e.stickyTabStops=132]="stickyTabStops",e[e.stopRenderingLineAfter=133]="stopRenderingLineAfter",e[e.suggest=134]="suggest",e[e.suggestFontSize=135]="suggestFontSize",e[e.suggestLineHeight=136]="suggestLineHeight",e[e.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",e[e.suggestSelection=138]="suggestSelection",e[e.tabCompletion=139]="tabCompletion",e[e.tabIndex=140]="tabIndex",e[e.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",e[e.unicodeHighlighting=142]="unicodeHighlighting",e[e.unusualLineTerminators=143]="unusualLineTerminators",e[e.useShadowDOM=144]="useShadowDOM",e[e.useTabStops=145]="useTabStops",e[e.wordBreak=146]="wordBreak",e[e.wordSegmenterLocales=147]="wordSegmenterLocales",e[e.wordSeparators=148]="wordSeparators",e[e.wordWrap=149]="wordWrap",e[e.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=152]="wordWrapColumn",e[e.wordWrapOverride1=153]="wordWrapOverride1",e[e.wordWrapOverride2=154]="wordWrapOverride2",e[e.wrappingIndent=155]="wrappingIndent",e[e.wrappingStrategy=156]="wrappingStrategy",e[e.showDeprecated=157]="showDeprecated",e[e.inertialScroll=158]="inertialScroll",e[e.inlayHints=159]="inlayHints",e[e.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",e[e.effectiveCursorStyle=161]="effectiveCursorStyle",e[e.editorClassName=162]="editorClassName",e[e.pixelRatio=163]="pixelRatio",e[e.tabFocusMode=164]="tabFocusMode",e[e.layoutInfo=165]="layoutInfo",e[e.wrappingInfo=166]="wrappingInfo",e[e.defaultColorDecorators=167]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",e[e.effectiveEditContext=170]="effectiveEditContext",e[e.scrollOnMiddleClick=171]="scrollOnMiddleClick",e[e.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts"})(Vi||(Vi={}));var Di;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Di||(Di={}));var Oi;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(Oi||(Oi={}));var $i;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})($i||($i={}));var Bi;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Bi||(Bi={}));var Ui;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(Ui||(Ui={}));var qi;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(qi||(qi={}));var ji;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(ji||(ji={}));var Wi;(function(e){e[e.Accepted=0]="Accepted",e[e.Rejected=1]="Rejected",e[e.Ignored=2]="Ignored"})(Wi||(Wi={}));var Hi;(function(e){e[e.Code=1]="Code",e[e.Label=2]="Label"})(Hi||(Hi={}));var zi;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(zi||(zi={}));var tr;(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.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",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.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(tr||(tr={}));var nr;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(nr||(nr={}));var rr;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(rr||(rr={}));var Gi;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(Gi||(Gi={}));var Ji;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(Ji||(Ji={}));var Xi;(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"})(Xi||(Xi={}));var Qi;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Qi||(Qi={}));var Zi;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Zi||(Zi={}));var Yi;(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"})(Yi||(Yi={}));var Ki;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Ki||(Ki={}));var es;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(es||(es={}));var ts;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(ts||(ts={}));var ns;(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"})(ns||(ns={}));var rs;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(rs||(rs={}));var is;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(is||(is={}));var ss;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(ss||(ss={}));var ir;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(ir||(ir={}));var as;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(as||(as={}));var os;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(os||(os={}));var ls;(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"})(ls||(ls={}));var us;(function(e){e[e.Deprecated=1]="Deprecated"})(us||(us={}));var cs;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(cs||(cs={}));var fs;(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"})(fs||(fs={}));var hs;(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"})(hs||(hs={}));var ds;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(ds||(ds={}));var gs;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(gs||(gs={}));class zl{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(t,n){return Ll(t,n)}}function Gl(){return{editor:void 0,languages:void 0,CancellationTokenSource:wl,Emitter:Te,KeyCode:tr,KeyMod:zl,Position:X,Range:U,Selection:me,SelectionDirection:ir,MarkerSeverity:nr,MarkerTag:rr,Uri:Yn,Token:Hl}}var ms;class Jl{constructor(){this[ms]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,n=0){const r=this._map.get(t);if(r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let i=this._map.get(t);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){const r=this._state;let i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){const t=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(ms=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;const r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;const r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){const t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(const[n,r]of t)this.set(n,r)}}class Xl extends Jl{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,n=2){return super.get(t,n)}peek(t){return super.get(t,0)}set(t,n){return super.set(t,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class Ql extends Xl{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}}class Zl{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){const r=this.map.get(t);r&&(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){const r=this.map.get(t);r&&r.forEach(n)}}new Ql(10);var ps;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(ps||(ps={}));var bs;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(bs||(bs={}));var ws;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(ws||(ws={}));var xs;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(xs||(xs={}));function Yl(e){if(!e||e.length===0)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(i===110||i===114||i===87)return!0}}return!1}function Kl(e,t,n,r,i){if(r===0)return!0;const s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r);if(e.get(a)!==0)return!0}return!1}function eu(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r+i-1);if(e.get(a)!==0)return!0}return!1}function tu(e,t,n,r,i){return Kl(e,t,n,r,i)&&eu(e,t,n,r,i)}class nu{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){const n=t.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){el(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||tu(this._wordSeparators,t,n,i,s))return r}while(r);return null}}const ru="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function iu(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of ru)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const vs=iu();function ys(e){let t=vs;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const Ls=new Ro;Ls.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function sr(e,t,n,r,i){if(t=ys(t),i||(i=Yt.first(Ls)),n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),sr(e,t,n,r,i)}const s=Date.now(),a=e-1-r;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const h=a-i.windowSize*l;t.lastIndex=Math.max(0,h);const f=su(t,n,a,o);if(!f&&u||(u=f,h<=0))break;o=h}if(u){const l={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function su(e,t,n,r){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class au{static computeUnicodeHighlights(t,n,r){const i=r?r.startLineNumber:1,s=r?r.endLineNumber:t.getLineCount(),a=new _s(n),o=a.getCandidateCodePoints();let u;o==="allNonBasicAscii"?u=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):u=new RegExp(`${ou(Array.from(o))}`,"g");const l=new nu(null,u),h=[];let f=!1,d,m=0,g=0,p=0;e:for(let w=i,v=s;w<=v;w++){const y=t.getLineContent(w),b=y.length;l.reset(0);do if(d=l.next(y),d){let N=d.index,_=d.index+d[0].length;if(N>0){const P=y.charCodeAt(N-1);qn(P)&&N--}if(_+1=1e3){f=!0;break e}h.push(new U(w,N+1,w,_+1))}}while(d)}return{ranges:h,hasMore:f,ambiguousCharacterCount:m,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(t,n){const r=new _s(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=t.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),o=je.getLocales().filter(u=>!je.getInstance(new Set([...n.allowedLocales,u])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function ou(e,t){return`[${Ho(e.map(r=>String.fromCodePoint(r)).join(""))}]`}class _s{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=je.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const n of tt.codePoints)Ns(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(const n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){const r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const o=a.codePointAt(0),u=nl(a);i=i||u,!u&&!this.ambiguousCharacters.isAmbiguous(o)&&!tt.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Ns(t)&&tt.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function Ns(e){return e===" "||e===` `||e===" "}class fn{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}}class lu{constructor(t,n){this.lineRangeMapping=t,this.changes=n}}function uu(e,t,n=(r,i)=>r===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(ar||(ar={}));function Ct(e,t){return(n,r)=>t(e(n),e(r))}const It=(e,t)=>e-t;function gu(e){return(t,n)=>-e(t,n)}class hn{static{this.empty=new hn(t=>{})}constructor(t){this.iterate=t}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new hn(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new hn(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||ar.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}}class W{static fromTo(t,n){return new W(t,n)}static addRange(t,n){let r=0;for(;rn))return new W(t,n)}static ofLength(t){return new W(0,t)}static ofStartAndLength(t,n){return new W(t,t+n)}static emptyAt(t){return new W(t,t)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new le(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new W(this.start+t,this.endExclusive+t)}deltaStart(t){return new W(this.start+t,this.endExclusive)}deltaEnd(t){return new W(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new le(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nt.startLineNumber,It)}static joinMany(t){if(t.length===0)return[];let n=new Ce(t[0].slice());for(let r=1;rn)throw new le(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=pt(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){const n=mt(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=mt(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=a.startLineNumber?s=new B(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new Ce(n)}subtractFrom(t){const n=or(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),r=pt(this._normalizedRanges,a=>a.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new Ce([t]);const i=[];let s=t.startLineNumber;for(let a=n;as&&i.push(new B(s,o.startLineNumber)),s=o.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){const n=[];let r=0,i=0;for(;rn.delta(t)))}}class xe{static{this.zero=new xe(0,0)}static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new xe(0,n.column-t.column):new xe(n.lineNumber-t.lineNumber,n.column-1)}static fromPosition(t){return new xe(t.lineNumber-1,t.column-1)}static ofRange(t){return xe.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(const i of t)i===` `?(n++,r=0):r++;return new xe(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}add(t){return t.lineCount===0?new xe(this.lineCount,this.columnCount+t.columnCount):new xe(this.lineCount+t.lineCount,t.columnCount)}createRange(t){return this.lineCount===0?new U(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new U(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new U(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return B.ofLength(1,this.lineCount+1)}addToPosition(t){return this.lineCount===0?new X(t.lineNumber,t.column+this.columnCount):new X(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}class pu{getOffsetRange(t){return new W(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getRange(t){return U.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getStringReplacement(t){return new gn.deps.StringReplacement(this.getOffsetRange(t.range),t.text)}getTextReplacement(t){return new gn.deps.TextReplacement(this.getRange(t.replaceRange),t.newText)}getTextEdit(t){const n=t.replacements.map(r=>this.getTextReplacement(r));return new gn.deps.TextEdit(n)}}class gn{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}}class bu extends pu{constructor(t){super(),this.text=t,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n0&&t.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(t.length)}getOffset(t){const n=this._validatePosition(t);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(t){if(t.lineNumber<1)return new X(1,1);const n=this.textLength.lineCount+1;if(t.lineNumber>n){const i=this.getLineLength(n);return new X(n,i+1)}if(t.column<1)return new X(t.lineNumber,1);const r=this.getLineLength(t.lineNumber);return t.column-1>r?new X(t.lineNumber,r+1):t}getPosition(t){const n=pt(this.lineStartOffsetByLineIdx,s=>s<=t),r=n+1,i=t-this.lineStartOffsetByLineIdx[n]+1;return new X(r,i)}get textLength(){const t=this.lineStartOffsetByLineIdx.length-1;return new gn.deps.TextLength(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}}class wu{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new X(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(t){return this.getValueOfRange(this.getTransformer().getRange(t))}getLineLength(t){return this.getValueOfRange(new U(t,1,t,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new bu(this.getValue())),this._transformer}getLineAt(t){return this.getValueOfRange(new U(t,1,t,Number.MAX_SAFE_INTEGER))}}class xu extends wu{constructor(t,n){_o(n>=1),super(),this._getLineContent=t,this._lineCount=n}getValueOfRange(t){if(t.startLineNumber===t.endLineNumber)return this._getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);let n=this._getLineContent(t.startLineNumber).substring(t.startColumn-1);for(let r=t.startLineNumber+1;rt[n-1],t.length)}}class Ge{static joinReplacements(t,n){if(t.length===0)throw new le;if(t.length===1)return t[0];const r=t[0].range.getStartPosition(),i=t[t.length-1].range.getEndPosition();let s="";for(let a=0;a ${n.lineNumber},${n.column}): "${this.text}"`}}class ve{static inverse(t,n,r){const i=[];let s=1,a=1;for(const u of t){const l=new ve(new B(s,u.original.startLineNumber),new B(a,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,a=u.modified.endLineNumberExclusive}const o=new ve(new B(s,n+1),new B(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(t,n,r){const i=[];for(const s of t){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new ve(a,o))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ve(this.modified,this.original)}join(t){return new ve(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){const t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new ye(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new le("not a valid diff");return new ye(new U(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new U(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new ye(new U(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new U(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(Ss(this.original.endLineNumberExclusive,t)&&Ss(this.modified.endLineNumberExclusive,n))return new ye(new U(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new U(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ye(U.fromPositions(new X(this.original.startLineNumber,1),bt(new X(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),U.fromPositions(new X(this.modified.startLineNumber,1),bt(new X(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ye(U.fromPositions(bt(new X(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),bt(new X(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),U.fromPositions(bt(new X(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),bt(new X(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new le}}function bt(e,t){if(e.lineNumber<1)return new X(1,1);if(e.lineNumber>t.length)return new X(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new X(e.lineNumber,n.length+1):e}function Ss(e,t){return e>=1&&e<=t.length}class Be extends ve{static fromRangeMappings(t){const n=B.join(t.map(i=>B.fromRangeInclusive(i.originalRange))),r=B.join(t.map(i=>B.fromRangeInclusive(i.modifiedRange)));return new Be(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new Be(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new Be(this.original,this.modified,[this.toRangeMapping()])}}class ye{static fromEdit(t){const n=t.getNewRanges();return t.replacements.map((i,s)=>new ye(i.range,n[s]))}static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new ye(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new Ge(this.originalRange,n)}}function As(e,t,n,r=!1){const i=[];for(const s of cu(e.map(a=>vu(a,t,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new Be(a.original.join(o.original),a.modified.join(o.modified),s.map(u=>u.innerChanges[0])))}return Zt(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==t.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:Ur(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n.getLineLength(e.modifiedRange.startLineNumber)&&e.originalRange.startColumn-1>=t.getLineLength(e.originalRange.startLineNumber)&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);const s=new B(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),a=new B(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new Be(s,a,[e])}const yu=3;class Lu{computeDiff(t,n,r){const s=new Su(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let o=null;for(const u of s.changes){let l;u.originalEndLineNumber===0?l=new B(u.originalStartLineNumber+1,u.originalStartLineNumber+1):l=new B(u.originalStartLineNumber,u.originalEndLineNumber+1);let h;u.modifiedEndLineNumber===0?h=new B(u.modifiedStartLineNumber+1,u.modifiedStartLineNumber+1):h=new B(u.modifiedStartLineNumber,u.modifiedEndLineNumber+1);let f=new Be(l,h,u.charChanges?.map(d=>new ye(new U(d.originalStartLineNumber,d.originalStartColumn,d.originalEndLineNumber,d.originalEndColumn),new U(d.modifiedStartLineNumber,d.modifiedStartColumn,d.modifiedEndLineNumber,d.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===f.modified.startLineNumber||o.original.endLineNumberExclusive===f.original.startLineNumber)&&(f=new Be(o.original.join(f.original),o.modified.join(f.modified),o.innerChanges&&f.innerChanges?o.innerChanges.concat(f.innerChanges):void 0),a.pop()),a.push(f),o=f}return Zt(()=>Ur(a,(u,l)=>l.original.startLineNumber-u.original.endLineNumberExclusive===l.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.original.endLineNumberExclusive(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}}class wt{constructor(t,n,r,i,s,a,o,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){const i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),a=n.getEndLineNumber(t.originalStart+t.originalLength-1),o=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),h=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new wt(i,s,a,o,u,l,h,f)}}function Nu(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const m=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&g.getElements().length>0){let p=ks(m,g,s,!0).changes;o&&(p=Nu(p)),d=[];for(let w=0,v=p.length;w1&&p>1;){const w=d.charCodeAt(g-2),v=m.charCodeAt(p-2);if(w!==v)break;g--,p--}(g>1||p>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,a+1,1,p)}{let g=ur(d,1),p=ur(m,1);const w=d.length+1,v=m.length+1;for(;g!0;const t=Date.now();return()=>Date.now()-t{r.push(Y.fromOffsetPairs(i?i.getEndExclusives():ke.zero,s?s.getStarts():new ke(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new Y(new W(t.offset1,n.offset1),new W(t.offset2,n.offset2))}static assertSorted(t){let n;for(const r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new le("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new Y(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new Y(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new Y(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new Y(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new Y(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){const n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new Y(n,r)}getStarts(){return new ke(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new ke(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class ke{static{this.zero=new ke(0,0)}static{this.max=new ke(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new ke(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}}class Vt{static{this.instance=new Vt}isValid(){return!0}}class Au{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new le("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&p>0&&a.get(g-1,p-1)===3&&(y+=o.get(g-1,p-1)),y+=i?i(g,p):1):y=-1;const b=Math.max(w,v,y);if(b===y){const N=g>0&&p>0?o.get(g-1,p-1):0;o.set(g,p,N+1),a.set(g,p,3)}else b===w?(o.set(g,p,0),a.set(g,p,1)):b===v&&(o.set(g,p,0),a.set(g,p,2));s.set(g,p,b)}const u=[];let l=t.length,h=n.length;function f(g,p){(g+1!==l||p+1!==h)&&u.push(new Y(new W(g+1,l),new W(p+1,h))),l=g,h=p}let d=t.length-1,m=n.length-1;for(;d>=0&&m>=0;)a.get(d,m)===3?(f(d,m),d--,m--):a.get(d,m)===1?d--:m--;return f(-1,-1),u.reverse(),new Ue(u,!1)}}class Es{compute(t,n,r=Vt.instance){if(t.length===0||n.length===0)return Ue.trivial(t,n);const i=t,s=n;function a(p,w){for(;pi.length||N>s.length)continue;const _=a(b,N);u.set(h,_);const M=b===v?l.get(h+1):l.get(h-1);if(l.set(h,_!==b?new Ts(M,b,N,_-b):M),u.get(h)===i.length&&u.get(h)-h===s.length)break e}}let f=l.get(h);const d=[];let m=i.length,g=s.length;for(;;){const p=f?f.x+f.length:0,w=f?f.y+f.length:0;if((p!==m||w!==g)&&d.push(new Y(new W(p,m),new W(w,g))),!f)break;m=f.x,g=f.y,f=f.prev}return d.reverse(),new Ue(d,!1)}}class Ts{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}}class Ru{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}}class Mu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}}class pn{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=t[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const l=s.trimStart();o=s.length-l.length,s=l.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let l=0;lString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){const n=Is(t>0?this.elements[t-1]:-1),r=Is(ts<=t),i=t-this.firstElementOffsetByLineIdx[r];return new X(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){const n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?U.fromPositions(r,r):U.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!xt(this.elements[t]))return;let n=t;for(;n>0&&xt(this.elements[n-1]);)n--;let r=t;for(;r=this.elements.length||!xt(this.elements[t]))return;let n=t;for(;n>0&&xt(this.elements[n-1])&&!Ps(this.elements[n]);)n--;let r=t;for(;ri<=t.start)??0,r=mu(this.firstElementOffsetByLineIdx,i=>t.endExclusive<=i)??this.elements.length;return new W(n,r)}}function xt(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function Ps(e){return e>=65&&e<=90}const Eu={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Cs(e){return Eu[e]}function Is(e){return e===10?8:e===13?7:fr(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Tu(e,t,n,r,i,s){let{moves:a,excludedChanges:o}=Cu(e,t,n,s);if(!s.isValid())return[];const u=e.filter(h=>!o.has(h)),l=Iu(u,r,i,t,n,s);return du(a,l),a=Fu(a),a=a.filter(h=>{const f=h.original.toOffsetRange().slice(t).map(m=>m.trim());return f.join(` `).length>=15&&Pu(f,m=>m.length>=2)>=2}),a=Vu(e,a),a}function Pu(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function Cu(e,t,n,r){const i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Dt(u.original,t,u)),a=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Dt(u.modified,n,u))),o=new Set;for(const u of s){let l=-1,h;for(const f of a){const d=u.computeSimilarity(f);d>l&&(l=d,h=f)}if(l>.9&&h&&(a.delete(h),i.push(new ve(u.range,h.range)),o.add(u.source),o.add(h.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function Iu(e,t,n,r,i,s){const a=[],o=new Zl;for(const d of e)for(let m=d.original.startLineNumber;md.modified.startLineNumber,It));for(const d of e){let m=[];for(let g=d.modified.startLineNumber;g{for(const N of m)if(N.originalLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive&&N.modifiedLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive){N.originalLineRange=new B(N.originalLineRange.startLineNumber,y.endLineNumberExclusive),N.modifiedLineRange=new B(N.modifiedLineRange.startLineNumber,w.endLineNumberExclusive),v.push(N);return}const b={modifiedLineRange:w,originalLineRange:y};u.push(b),v.push(b)}),m=v}if(!s.isValid())return[]}u.sort(gu(Ct(d=>d.modifiedLineRange.length,It)));const l=new Ce,h=new Ce;for(const d of u){const m=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,g=l.subtractFrom(d.modifiedLineRange),p=h.subtractFrom(d.originalLineRange).getWithDelta(m),w=g.getIntersection(p);for(const v of w.ranges){if(v.length<3)continue;const y=v,b=v.delta(-m);a.push(new ve(b,y)),l.addRange(y),h.addRange(b)}}a.sort(Ct(d=>d.original.startLineNumber,It));const f=new dn(e);for(let d=0;dM.original.startLineNumber<=m.original.startLineNumber),p=mt(e,M=>M.modified.startLineNumber<=m.modified.startLineNumber),w=Math.max(m.original.startLineNumber-g.original.startLineNumber,m.modified.startLineNumber-p.modified.startLineNumber),v=f.findLastMonotonous(M=>M.original.startLineNumberM.modified.startLineNumberr.length||L>i.length||l.contains(L)||h.contains(M)||!Fs(r[M-1],i[L-1],s))break}N>0&&(h.addRange(new B(m.original.startLineNumber-N,m.original.startLineNumber)),l.addRange(new B(m.modified.startLineNumber-N,m.modified.startLineNumber)));let _;for(_=0;_r.length||L>i.length||l.contains(L)||h.contains(M)||!Fs(r[M-1],i[L-1],s))break}_>0&&(h.addRange(new B(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+_)),l.addRange(new B(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+_))),(N>0||_>0)&&(a[d]=new ve(new B(m.original.startLineNumber-N,m.original.endLineNumberExclusive+_),new B(m.modified.startLineNumber-N,m.modified.endLineNumberExclusive+_)))}return a}function Fs(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new Es().compute(new pn([e],new U(1,1,1,e.length),!1),new pn([t],new U(1,1,1,t.length),!1),n);let s=0;const a=Y.invert(i.diffs,e.length);for(const h of a)h.seq1Range.forEach(f=>{fr(e.charCodeAt(f))||s++});function o(h){let f=0;for(let d=0;dt.length?e:t);return s/u>.6&&u>10}function Fu(e){if(e.length===0)return e;e.sort(Ct(n=>n.original.startLineNumber,It));const t=[e[0]];for(let n=1;n=0&&a>=0&&s+a<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function Vu(e,t){const n=new dn(e);return t=t.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumbero.modified.startLineNumber0&&(o=o.delta(l))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function Du(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&e.seq2Range.start-a>=i.start&&n.isStronglyEqual(e.seq2Range.start-a,e.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;e.seq1Range.start+ol&&(l=g,u=h)}return e.delta(u)}function Ou(e,t,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new Y(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function $s(e,t,n,r,i=!1){const s=Y.invert(n,e.length),a=[];let o=new ke(0,0);function u(h,f){if(h.offset10;){const y=s[0];if(!(y.seq1Range.intersects(g.seq1Range)||y.seq2Range.intersects(g.seq2Range)))break;const N=r(e,y.seq1Range.start),_=r(t,y.seq2Range.start),M=new Y(N,_),L=M.intersect(y);if(w+=L.seq1Range.length,v+=L.seq2Range.length,g=g.join(M),g.seq1Range.endExclusive>=y.seq1Range.endExclusive)s.shift();else break}(i&&w+v0;){const h=s.shift();h.seq1Range.isEmpty||(u(h.getStarts(),h),u(h.getEndExclusives().delta(-1),h))}return $u(n,a)}function $u(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Bu(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let o=1;o5||m.seq1Range.length+m.seq2Range.length>5)};const u=r[o],l=a[a.length-1];h(l,u)?(s=!0,a[a.length-1]=a[a.length-1].join(u)):a.push(u)}r=a}while(i++<10&&s);return r}function Uu(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const o=[r[0]];for(let u=1;u5||p.length>500)return!1;const v=e.getText(p).trim();if(v.length>20||v.split(/\r\n|\r|\n/).length>1)return!1;const y=e.countLinesIn(m.seq1Range),b=m.seq1Range.length,N=t.countLinesIn(m.seq2Range),_=m.seq2Range.length,M=e.countLinesIn(g.seq1Range),L=g.seq1Range.length,S=t.countLinesIn(g.seq2Range),P=g.seq2Range.length,D=2*40+50;function T(x){return Math.min(x,D)}return Math.pow(Math.pow(T(y*40+b),1.5)+Math.pow(T(N*40+_),1.5),1.5)+Math.pow(Math.pow(T(M*40+L),1.5)+Math.pow(T(S*40+P),1.5),1.5)>(D**1.5)**1.5*1.3};const l=r[u],h=o[o.length-1];f(h,l)?(s=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}r=o}while(i++<10&&s);const a=[];return hu(r,(o,u,l)=>{let h=u;function f(v){return v.length>0&&v.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}const d=e.extendToFullLines(u.seq1Range),m=e.getText(new W(d.start,u.seq1Range.start));f(m)&&(h=h.deltaStart(-m.length));const g=e.getText(new W(u.seq1Range.endExclusive,d.endExclusive));f(g)&&(h=h.deltaEnd(g.length));const p=Y.fromOffsetPairs(o?o.getEndExclusives():ke.zero,l?l.getStarts():ke.max),w=h.intersect(p);a.length>0&&w.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(w):a.push(w)}),a}class Bs{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){const n=t===0?0:Us(this.lines[t-1]),r=t===this.lines.length?0:Us(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(` `)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}}function Us(e){let t=0;for(;tL===S))return new fn([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new fn([new Be(new B(1,t.length+1),new B(1,n.length+1),[new ye(new U(1,1,t.length,t[t.length-1].length+1),new U(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?Vt.instance:new Au(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(L){let S=a.get(L);return S===void 0&&(S=a.size,a.set(L,S)),S}const u=t.map(L=>o(L.trim())),l=n.map(L=>o(L.trim())),h=new Bs(u,t),f=new Bs(l,n),d=h.length+f.length<1700?this.dynamicProgrammingDiffing.compute(h,f,i,(L,S)=>t[L]===n[S]?n[S].length===0?.1:1+Math.log(1+n[S].length):.99):this.myersDiffingAlgorithm.compute(h,f,i);let m=d.diffs,g=d.hitTimeout;m=Vs(h,f,m),m=Bu(h,f,m);const p=[],w=L=>{if(s)for(let S=0;SL.seq1Range.start-v===L.seq2Range.start-y);const S=L.seq1Range.start-v;w(S),v=L.seq1Range.endExclusive,y=L.seq2Range.endExclusive;const P=this.refineDiff(t,n,L,i,s,r);P.hitTimeout&&(g=!0);for(const D of P.mappings)p.push(D)}w(t.length-v);const b=new mn(t),N=new mn(n),_=As(p,b,N);let M=[];return r.computeMoves&&(M=this.computeMoves(_,t,n,u,l,i,s,r)),Zt(()=>{function L(P,D){if(P.lineNumber<1||P.lineNumber>D.length)return!1;const T=D[P.lineNumber-1];return!(P.column<1||P.column>T.length+1)}function S(P,D){return!(P.startLineNumber<1||P.startLineNumber>D.length+1||P.endLineNumberExclusive<1||P.endLineNumberExclusive>D.length+1)}for(const P of _){if(!P.innerChanges)return!1;for(const D of P.innerChanges)if(!(L(D.modifiedRange.getStartPosition(),n)&&L(D.modifiedRange.getEndPosition(),n)&&L(D.originalRange.getStartPosition(),t)&&L(D.originalRange.getEndPosition(),t)))return!1;if(!S(P.modified,n)||!S(P.original,t))return!1}return!0}),new fn(_,M,g)}computeMoves(t,n,r,i,s,a,o,u){return Tu(t,n,r,i,s,a).map(f=>{const d=this.refineDiff(n,r,new Y(f.original.toOffsetRange(),f.modified.toOffsetRange()),a,o,u),m=As(d.mappings,new mn(n),new mn(r),!0);return new lu(f,m)})}refineDiff(t,n,r,i,s,a){const u=ju(r).toRangeMapping2(t,n),l=new pn(t,u.originalRange,s),h=new pn(n,u.modifiedRange,s),f=l.length+h.length<500?this.dynamicProgrammingDiffing.compute(l,h,i):this.myersDiffingAlgorithm.compute(l,h,i);let d=f.diffs;return d=Vs(l,h,d),d=$s(l,h,d,(g,p)=>g.findWordContaining(p)),a.extendToSubwords&&(d=$s(l,h,d,(g,p)=>g.findSubWordContaining(p),!0)),d=Ou(l,h,d),d=Uu(l,h,d),{mappings:d.map(g=>new ye(l.translateRange(g.seq1Range),h.translateRange(g.seq2Range))),hitTimeout:f.hitTimeout}}}function ju(e){return new ve(new B(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new B(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const qs={getLegacy:()=>new Lu,getDefault:()=>new qu};function Je(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class A{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=Je(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}}class Le{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Je(Math.max(Math.min(1,n),0),3),this.l=Je(Math.max(Math.min(1,r),0),3),this.a=Je(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let u=0,l=0;const h=(o+a)/2,f=a-o;if(f>0){switch(l=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),a){case n:u=(r-i)/f+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){const n=t.h/360,{s:r,l:i,a:s}=t;let a,o,u;if(r===0)a=o=u=i;else{const l=i<.5?i*(1+r):i+r-i*r,h=2*i-l;a=Le._hue2rgb(h,l,n+1/3),o=Le._hue2rgb(h,l,n),u=Le._hue2rgb(h,l,n-1/3)}return new A(Math.round(a*255),Math.round(o*255),Math.round(u*255),s)}}class vt{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Je(Math.max(Math.min(1,n),0),3),this.v=Je(Math.max(Math.min(1,r),0),3),this.a=Je(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,u=s===0?0:o/s;let l;return o===0?l=0:s===n?l=((r-i)/o%6+6)%6:s===r?l=(i-n)/o+2:l=(n-r)/o+4,new vt(Math.round(l*60),u,s,t.a)}static toRGBA(t){const{h:n,s:r,v:i,a:s}=t,a=i*r,o=a*(1-Math.abs(n/60%2-1)),u=i-a;let[l,h,f]=[0,0,0];return n<60?(l=a,h=o):n<120?(l=o,h=a):n<180?(h=a,f=o):n<240?(h=o,f=a):n<300?(l=o,f=a):n<=360&&(l=a,f=o),l=Math.round((l+u)*255),h=Math.round((h+u)*255),f=Math.round((f+u)*255),new A(l,h,f,s)}}let bn=class re{static fromHex(t){return re.Format.CSS.parseHex(t)||re.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Le.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:vt.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof A)this.rgba=t;else if(t instanceof Le)this._hsla=t,this.rgba=Le.toRGBA(t);else if(t instanceof vt)this._hsva=t,this.rgba=vt.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&A.equals(this.rgba,t.rgba)&&Le.equals(this.hsla,t.hsla)&&vt.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=re._relativeLuminanceForComponent(this.rgba.r),n=re._relativeLuminanceForComponent(this.rgba.g),r=re._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return Je(i,4)}static _relativeLuminanceForComponent(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(t,n,r){if(t.isLighterThan(n))return t;r=r||.5;const i=t.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(s-i)/s,t.lighten(r)}static getDarkerColor(t,n,r){if(t.isDarkerThan(n))return t;r=r||.5;const i=t.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(i-s)/i,t.darken(r)}static{this.white=new re(new A(255,255,255,1))}static{this.black=new re(new A(0,0,0,1))}static{this.red=new re(new A(255,0,0,1))}static{this.blue=new re(new A(0,0,255,1))}static{this.green=new re(new A(0,255,0,1))}static{this.cyan=new re(new A(0,255,255,1))}static{this.lightgrey=new re(new A(211,211,211,1))}static{this.transparent=new re(new A(0,0,0,0))}};(function(e){(function(t){(function(n){function r(p){return p.rgba.a===1?`rgb(${p.rgba.r}, ${p.rgba.g}, ${p.rgba.b})`:e.Format.CSS.formatRGBA(p)}n.formatRGB=r;function i(p){return`rgba(${p.rgba.r}, ${p.rgba.g}, ${p.rgba.b}, ${+p.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(p){return p.hsla.a===1?`hsl(${p.hsla.h}, ${Math.round(p.hsla.s*100)}%, ${Math.round(p.hsla.l*100)}%)`:e.Format.CSS.formatHSLA(p)}n.formatHSL=s;function a(p){return`hsla(${p.hsla.h}, ${Math.round(p.hsla.s*100)}%, ${Math.round(p.hsla.l*100)}%, ${p.hsla.a.toFixed(2)})`}n.formatHSLA=a;function o(p){const w=p.toString(16);return w.length!==2?"0"+w:w}function u(p){return`#${o(p.rgba.r)}${o(p.rgba.g)}${o(p.rgba.b)}`}n.formatHex=u;function l(p,w=!1){return w&&p.rgba.a===1?e.Format.CSS.formatHex(p):`#${o(p.rgba.r)}${o(p.rgba.g)}${o(p.rgba.b)}${o(Math.round(p.rgba.a*255))}`}n.formatHexA=l;function h(p){return p.isOpaque()?e.Format.CSS.formatHex(p):e.Format.CSS.formatRGBA(p)}n.format=h;function f(p){if(p==="transparent")return e.transparent;if(p.startsWith("#"))return m(p);if(p.startsWith("rgba(")){const w=p.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!w)throw new Error("Invalid color format "+p);const v=parseInt(w.groups?.r??"0"),y=parseInt(w.groups?.g??"0"),b=parseInt(w.groups?.b??"0"),N=parseFloat(w.groups?.a??"0");return new e(new A(v,y,b,N))}if(p.startsWith("rgb(")){const w=p.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!w)throw new Error("Invalid color format "+p);const v=parseInt(w.groups?.r??"0"),y=parseInt(w.groups?.g??"0"),b=parseInt(w.groups?.b??"0");return new e(new A(v,y,b))}return d(p)}n.parse=f;function d(p){switch(p){case"aliceblue":return new e(new A(240,248,255,1));case"antiquewhite":return new e(new A(250,235,215,1));case"aqua":return new e(new A(0,255,255,1));case"aquamarine":return new e(new A(127,255,212,1));case"azure":return new e(new A(240,255,255,1));case"beige":return new e(new A(245,245,220,1));case"bisque":return new e(new A(255,228,196,1));case"black":return new e(new A(0,0,0,1));case"blanchedalmond":return new e(new A(255,235,205,1));case"blue":return new e(new A(0,0,255,1));case"blueviolet":return new e(new A(138,43,226,1));case"brown":return new e(new A(165,42,42,1));case"burlywood":return new e(new A(222,184,135,1));case"cadetblue":return new e(new A(95,158,160,1));case"chartreuse":return new e(new A(127,255,0,1));case"chocolate":return new e(new A(210,105,30,1));case"coral":return new e(new A(255,127,80,1));case"cornflowerblue":return new e(new A(100,149,237,1));case"cornsilk":return new e(new A(255,248,220,1));case"crimson":return new e(new A(220,20,60,1));case"cyan":return new e(new A(0,255,255,1));case"darkblue":return new e(new A(0,0,139,1));case"darkcyan":return new e(new A(0,139,139,1));case"darkgoldenrod":return new e(new A(184,134,11,1));case"darkgray":return new e(new A(169,169,169,1));case"darkgreen":return new e(new A(0,100,0,1));case"darkgrey":return new e(new A(169,169,169,1));case"darkkhaki":return new e(new A(189,183,107,1));case"darkmagenta":return new e(new A(139,0,139,1));case"darkolivegreen":return new e(new A(85,107,47,1));case"darkorange":return new e(new A(255,140,0,1));case"darkorchid":return new e(new A(153,50,204,1));case"darkred":return new e(new A(139,0,0,1));case"darksalmon":return new e(new A(233,150,122,1));case"darkseagreen":return new e(new A(143,188,143,1));case"darkslateblue":return new e(new A(72,61,139,1));case"darkslategray":return new e(new A(47,79,79,1));case"darkslategrey":return new e(new A(47,79,79,1));case"darkturquoise":return new e(new A(0,206,209,1));case"darkviolet":return new e(new A(148,0,211,1));case"deeppink":return new e(new A(255,20,147,1));case"deepskyblue":return new e(new A(0,191,255,1));case"dimgray":return new e(new A(105,105,105,1));case"dimgrey":return new e(new A(105,105,105,1));case"dodgerblue":return new e(new A(30,144,255,1));case"firebrick":return new e(new A(178,34,34,1));case"floralwhite":return new e(new A(255,250,240,1));case"forestgreen":return new e(new A(34,139,34,1));case"fuchsia":return new e(new A(255,0,255,1));case"gainsboro":return new e(new A(220,220,220,1));case"ghostwhite":return new e(new A(248,248,255,1));case"gold":return new e(new A(255,215,0,1));case"goldenrod":return new e(new A(218,165,32,1));case"gray":return new e(new A(128,128,128,1));case"green":return new e(new A(0,128,0,1));case"greenyellow":return new e(new A(173,255,47,1));case"grey":return new e(new A(128,128,128,1));case"honeydew":return new e(new A(240,255,240,1));case"hotpink":return new e(new A(255,105,180,1));case"indianred":return new e(new A(205,92,92,1));case"indigo":return new e(new A(75,0,130,1));case"ivory":return new e(new A(255,255,240,1));case"khaki":return new e(new A(240,230,140,1));case"lavender":return new e(new A(230,230,250,1));case"lavenderblush":return new e(new A(255,240,245,1));case"lawngreen":return new e(new A(124,252,0,1));case"lemonchiffon":return new e(new A(255,250,205,1));case"lightblue":return new e(new A(173,216,230,1));case"lightcoral":return new e(new A(240,128,128,1));case"lightcyan":return new e(new A(224,255,255,1));case"lightgoldenrodyellow":return new e(new A(250,250,210,1));case"lightgray":return new e(new A(211,211,211,1));case"lightgreen":return new e(new A(144,238,144,1));case"lightgrey":return new e(new A(211,211,211,1));case"lightpink":return new e(new A(255,182,193,1));case"lightsalmon":return new e(new A(255,160,122,1));case"lightseagreen":return new e(new A(32,178,170,1));case"lightskyblue":return new e(new A(135,206,250,1));case"lightslategray":return new e(new A(119,136,153,1));case"lightslategrey":return new e(new A(119,136,153,1));case"lightsteelblue":return new e(new A(176,196,222,1));case"lightyellow":return new e(new A(255,255,224,1));case"lime":return new e(new A(0,255,0,1));case"limegreen":return new e(new A(50,205,50,1));case"linen":return new e(new A(250,240,230,1));case"magenta":return new e(new A(255,0,255,1));case"maroon":return new e(new A(128,0,0,1));case"mediumaquamarine":return new e(new A(102,205,170,1));case"mediumblue":return new e(new A(0,0,205,1));case"mediumorchid":return new e(new A(186,85,211,1));case"mediumpurple":return new e(new A(147,112,219,1));case"mediumseagreen":return new e(new A(60,179,113,1));case"mediumslateblue":return new e(new A(123,104,238,1));case"mediumspringgreen":return new e(new A(0,250,154,1));case"mediumturquoise":return new e(new A(72,209,204,1));case"mediumvioletred":return new e(new A(199,21,133,1));case"midnightblue":return new e(new A(25,25,112,1));case"mintcream":return new e(new A(245,255,250,1));case"mistyrose":return new e(new A(255,228,225,1));case"moccasin":return new e(new A(255,228,181,1));case"navajowhite":return new e(new A(255,222,173,1));case"navy":return new e(new A(0,0,128,1));case"oldlace":return new e(new A(253,245,230,1));case"olive":return new e(new A(128,128,0,1));case"olivedrab":return new e(new A(107,142,35,1));case"orange":return new e(new A(255,165,0,1));case"orangered":return new e(new A(255,69,0,1));case"orchid":return new e(new A(218,112,214,1));case"palegoldenrod":return new e(new A(238,232,170,1));case"palegreen":return new e(new A(152,251,152,1));case"paleturquoise":return new e(new A(175,238,238,1));case"palevioletred":return new e(new A(219,112,147,1));case"papayawhip":return new e(new A(255,239,213,1));case"peachpuff":return new e(new A(255,218,185,1));case"peru":return new e(new A(205,133,63,1));case"pink":return new e(new A(255,192,203,1));case"plum":return new e(new A(221,160,221,1));case"powderblue":return new e(new A(176,224,230,1));case"purple":return new e(new A(128,0,128,1));case"rebeccapurple":return new e(new A(102,51,153,1));case"red":return new e(new A(255,0,0,1));case"rosybrown":return new e(new A(188,143,143,1));case"royalblue":return new e(new A(65,105,225,1));case"saddlebrown":return new e(new A(139,69,19,1));case"salmon":return new e(new A(250,128,114,1));case"sandybrown":return new e(new A(244,164,96,1));case"seagreen":return new e(new A(46,139,87,1));case"seashell":return new e(new A(255,245,238,1));case"sienna":return new e(new A(160,82,45,1));case"silver":return new e(new A(192,192,192,1));case"skyblue":return new e(new A(135,206,235,1));case"slateblue":return new e(new A(106,90,205,1));case"slategray":return new e(new A(112,128,144,1));case"slategrey":return new e(new A(112,128,144,1));case"snow":return new e(new A(255,250,250,1));case"springgreen":return new e(new A(0,255,127,1));case"steelblue":return new e(new A(70,130,180,1));case"tan":return new e(new A(210,180,140,1));case"teal":return new e(new A(0,128,128,1));case"thistle":return new e(new A(216,191,216,1));case"tomato":return new e(new A(255,99,71,1));case"turquoise":return new e(new A(64,224,208,1));case"violet":return new e(new A(238,130,238,1));case"wheat":return new e(new A(245,222,179,1));case"white":return new e(new A(255,255,255,1));case"whitesmoke":return new e(new A(245,245,245,1));case"yellow":return new e(new A(255,255,0,1));case"yellowgreen":return new e(new A(154,205,50,1));default:return null}}function m(p){const w=p.length;if(w===0||p.charCodeAt(0)!==35)return null;if(w===7){const v=16*g(p.charCodeAt(1))+g(p.charCodeAt(2)),y=16*g(p.charCodeAt(3))+g(p.charCodeAt(4)),b=16*g(p.charCodeAt(5))+g(p.charCodeAt(6));return new e(new A(v,y,b,1))}if(w===9){const v=16*g(p.charCodeAt(1))+g(p.charCodeAt(2)),y=16*g(p.charCodeAt(3))+g(p.charCodeAt(4)),b=16*g(p.charCodeAt(5))+g(p.charCodeAt(6)),N=16*g(p.charCodeAt(7))+g(p.charCodeAt(8));return new e(new A(v,y,b,N/255))}if(w===4){const v=g(p.charCodeAt(1)),y=g(p.charCodeAt(2)),b=g(p.charCodeAt(3));return new e(new A(16*v+v,16*y+y,16*b+b))}if(w===5){const v=g(p.charCodeAt(1)),y=g(p.charCodeAt(2)),b=g(p.charCodeAt(3)),N=g(p.charCodeAt(4));return new e(new A(16*v+v,16*y+y,16*b+b,(16*N+N)/255))}return null}n.parseHex=m;function g(p){switch(p){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(t.CSS||(t.CSS={}))})(e.Format||(e.Format={}))})(bn||(bn={}));function js(e){const t=[];for(const n of e){const r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&t.push(r)}return t}function hr(e,t,n,r){return{red:e/255,blue:n/255,green:t/255,alpha:r}}function Ot(e,t){const n=t.index,r=t[0].length;if(n===void 0)return;const i=e.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Wu(e,t){if(!e)return;const n=bn.Format.CSS.parseHex(t);if(n)return{range:e,color:hr(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function Ws(e,t,n){if(!e||t.length!==1)return;const i=t[0].values(),s=js(i);return{range:e,color:hr(s[0],s[1],s[2],n?s[3]:1)}}function Hs(e,t,n){if(!e||t.length!==1)return;const i=t[0].values(),s=js(i),a=new bn(new Le(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:e,color:hr(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function $t(e,t){return typeof e=="string"?[...e.matchAll(t)]:e.findMatches(t)}function Hu(e){const t=[],r=$t(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);if(r.length>0)for(const i of r){const s=i.filter(l=>l!==void 0),a=s[1],o=s[2];if(!o)continue;let u;if(a==="rgb"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=Ws(Ot(e,i),$t(o,l),!1)}else if(a==="rgba"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=Ws(Ot(e,i),$t(o,l),!0)}else if(a==="hsl"){const l=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=Hs(Ot(e,i),$t(o,l),!1)}else if(a==="hsla"){const l=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;u=Hs(Ot(e,i),$t(o,l),!0)}else a==="#"&&(u=Wu(Ot(e,i),a+o));u&&t.push(u)}return t}function zu(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:Hu(e)}const Gu=/^-+|-+$/g,zs=100,Ju=5;function Xu(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=Qu(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const r=Zu(e,t);n=n.concat(r)}return n}function Qu(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const s=e.getLineContent(i),a=s.match(t.foldingRules.markers.start);if(a){const o={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:s.length+1};if(o.endColumn>o.startColumn){const u={range:o,...Yu(s.substring(a[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function Zu(e,t){const n=[],r=e.getLineCount();if(!t.markSectionHeaderRegex||t.markSectionHeaderRegex.trim()==="")return n;const i=Yl(t.markSectionHeaderRegex),s=new RegExp(t.markSectionHeaderRegex,`gdm${i?"s":""}`);if(zo(s))return n;for(let a=1;a<=r;a+=zs-Ju){const o=Math.min(a+zs-1,r),u=[];for(let f=a;f<=o;f++)u.push(e.getLineContent(f));const l=u.join(` `);s.lastIndex=0;let h;for(;(h=s.exec(l))!==null;){const f=l.substring(0,h.index),d=(f.match(/\n/g)||[]).length,m=a+d,g=h[0].split(` `),p=g.length,w=m+p-1,v=f.lastIndexOf(` `)+1,y=h.index-v+1,b=g[g.length-1],N=p===1?y+h[0].length:b.length+1,_={startLineNumber:m,startColumn:y,endLineNumber:w,endColumn:N},M=(h.groups??{}).label??"",L=((h.groups??{}).separator??"")!=="",S={range:_,text:M,hasSeparatorLine:L,shouldBeInComments:!0};(S.text||S.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber{this.completeCallback=t,this.errorCallback=n})}complete(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(t),this.outcome={outcome:0,value:t},n()})}error(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(t),this.outcome={outcome:1,value:t},n()})}cancel(){return this.error(new Br)}}var Gs;(function(e){async function t(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}e.withAsyncBody=n})(Gs||(Gs={}));class ec{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(t){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,t)}else this._unconsumedValues.push(t)}produceFinal(t){this._ensureNoFinalValue(),this._finalValue=t;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,t);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new le("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(t,n){n.ok?t.complete(n.value):t.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const t=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return t.ok?Promise.resolve(t.value):Promise.reject(t.error)}else{const t=new Ku;return this._unsatisfiedConsumers.push(t),t.p}}}class _e{constructor(t,n){this._onReturn=n,this._producerConsumer=new ec,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=t({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(t){return new _e(n=>{n.emitMany(t)})}static fromPromise(t){return new _e(async n=>{n.emitMany(await t)})}static fromPromisesResolveOrder(t){return new _e(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new _e(async n=>{await Promise.all(t.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static{this.EMPTY=_e.fromArray([])}static map(t,n){return new _e(async r=>{for await(const i of t)r.emitOne(n(i))})}map(t){return _e.map(this,t)}static coalesce(t){return _e.filter(t,n=>!!n)}coalesce(){return _e.coalesce(this)}static filter(t,n){return new _e(async r=>{for await(const i of t)n(i)&&r.emitOne(i)})}filter(t){return _e.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(t){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:t})}[Symbol.asyncIterator](){return this._iterator}}class tc{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=ht(t);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=ht(t),n=ht(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;const s=r.length-t;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=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=ht(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],t=s)n=i+1;else break;return new nc(i,t-a)}}class nc{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class rc{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,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 n=t.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new X(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;it.push(this._models[n])),t}$acceptNewModel(t){this._models[t.url]=new sc(Yn.parse(t.url),t.lines,t.EOL,t.versionId)}$acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}$acceptRemovedModel(t){this._models[t]&&delete this._models[t]}}class sc extends rc{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:t}}class Bt{constructor(t=null){this._foreignModule=t,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new ic}dispose(){}async $ping(){return"pong"}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){const i=this._getModel(t);return i?au.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){const r=this._getModel(t);return r?Xu(r,n):[]}async $computeDiff(t,n,r,i){const s=this._getModel(t),a=this._getModel(n);return!s||!a?null:Bt.computeDiff(s,a,r,i)}static computeDiff(t,n,r,i){const s=i==="advanced"?qs.getDefault():qs.getLegacy(),a=t.getLinesContent(),o=n.getLinesContent(),u=s.computeDiff(a,o,r),l=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function h(f){return f.map(d=>[d.original.startLineNumber,d.original.endLineNumberExclusive,d.modified.startLineNumber,d.modified.endLineNumberExclusive,d.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:l,quitEarly:u.hitTimeout,changes:h(u.changes),moves:u.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,h(f.changes)])}}static _modelsAreIdentical(t,n){const r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=t.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(t,n,r){const i=this._getModel(t);if(!i)return n;const s=[];let a;n=n.slice(0).sort((u,l)=>{if(u.range&&l.range)return U.compareRangesUsingStarts(u.range,l.range);const h=u.range?0:1,f=l.range?0:1;return h-f});let o=0;for(let u=1;uBt._diffLimit){s.push({range:u,text:l});continue}const d=hl(f,l,r),m=i.offsetAt(U.lift(u).getStartPosition());for(const g of d){const p=i.positionAt(m+g.originalStart),w=i.positionAt(m+g.originalStart+g.originalLength),v={text:l.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:p.lineNumber,startColumn:p.column,endLineNumber:w.lineNumber,endColumn:w.column}};i.getValueInRange(v.range)!==v.text&&s.push(v)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(t){const n=this._getModel(t);return n?bl(n):null}async $computeDefaultDocumentColors(t){const n=this._getModel(t);return n?zu(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){const s=new en,a=new RegExp(r,i),o=new Set;e:for(const u of t){const l=this._getModel(u);if(l){for(const h of l.words(a))if(!(h===n||!isNaN(Number(h)))&&(o.add(h),o.size>Bt._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}}async $computeWordRanges(t,n,r,i){const s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let u=n.startLineNumber;u{const i=wn.getChannel(r),a={host:new Proxy({},{get(o,u,l){if(u!=="then"){if(typeof u!="string")throw new Error("Not supported");return(...h)=>i.$fhr(u,h)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return t=e(a),new Bt(t)});return t}function oc(e){self.onmessage=t=>{ac(n=>e(n,t.data))}}function dr(e,t=!1){const n=e.length;let r=0,i="",s=0,a=16,o=0,u=0,l=0,h=0,f=0;function d(b,N){let _=0,M=0;for(;_=48&&L<=57)M=M*16+L-48;else if(L>=65&&L<=70)M=M*16+L-65+10;else if(L>=97&&L<=102)M=M*16+L-97+10;else break;r++,_++}return _=n){b+=e.substring(N,r),f=2;break}const _=e.charCodeAt(r);if(_===34){b+=e.substring(N,r),r++;break}if(_===92){if(b+=e.substring(N,r),r++,r>=n){f=2;break}switch(e.charCodeAt(r++)){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=` `;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:const L=d(4);L>=0?b+=String.fromCharCode(L):f=4;break;default:f=5}N=r;continue}if(_>=0&&_<=31)if(Ut(_)){b+=e.substring(N,r),f=2;break}else f=6;r++}return b}function w(){if(i="",f=0,s=r,u=o,h=l,r>=n)return s=n,a=17;let b=e.charCodeAt(r);if(gr(b)){do r++,i+=String.fromCharCode(b),b=e.charCodeAt(r);while(gr(b));return a=15}if(Ut(b))return r++,i+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,i+=` `),o++,l=r,a=14;switch(b){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=p(),a=10;case 47:const N=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&b<=15);return b}return{setPosition:m,getPosition:()=>r,scan:t?y:w,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-h,getTokenError:()=>f}}function gr(e){return e===32||e===9}function Ut(e){return e===10||e===13}function yt(e){return e>=48&&e<=57}var Js;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Js||(Js={}));const Ne=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),Lt=200,Xs={" ":{"\n":new Array(Lt).fill(0).map((e,t)=>` `+" ".repeat(t)),"\r":new Array(Lt).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Lt).fill(0).map((e,t)=>`\r `+" ".repeat(t))}," ":{"\n":new Array(Lt).fill(0).map((e,t)=>` `+" ".repeat(t)),"\r":new Array(Lt).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Lt).fill(0).map((e,t)=>`\r `+" ".repeat(t))}},lc=[` `,"\r",`\r `];function uc(e,t,n){let r,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!Qs(e,s-1);)s--;let _=o;for(;_1)return _t(u,h)+_t(d,r+f);const _=d.length*(r+f);return!l||_>Xs[m][u].length?u+_t(d,r+f):_<=0?u:Xs[m][u][_]}function v(){let _=g.scan();for(h=0;_===15||_===14;)_===14&&n.keepLines?h+=1:_===14&&(h=1),_=g.scan();return p=_===16||g.getTokenError()!==0,_}const y=[];function b(_,M,L){!p&&(!t||Ma)&&e.substring(M,L)!==_&&y.push({offset:M,length:L-M,content:_})}let N=v();if(n.keepLines&&h>0&&b(_t(u,h),0,0),N!==17){let _=g.getTokenOffset()+s,M=d.length*r<20&&n.insertSpaces?Ne[d.length*r]:_t(d,r);b(M,s,_)}for(;N!==17;){let _=g.getTokenOffset()+g.getTokenLength()+s,M=v(),L="",S=!1;for(;h===0&&(M===12||M===13);){let D=g.getTokenOffset()+s;b(Ne[1],_,D),_=g.getTokenOffset()+g.getTokenLength()+s,S=M===12,L=S?w():"",M=v()}if(M===2)N!==1&&f--,n.keepLines&&h>0||!n.keepLines&&N!==1?L=w():n.keepLines&&(L=Ne[1]);else if(M===4)N!==3&&f--,n.keepLines&&h>0||!n.keepLines&&N!==3?L=w():n.keepLines&&(L=Ne[1]);else{switch(N){case 3:case 1:f++,n.keepLines&&h>0||!n.keepLines?L=w():L=Ne[1];break;case 5:n.keepLines&&h>0||!n.keepLines?L=w():L=Ne[1];break;case 12:L=w();break;case 13:h>0?L=w():S||(L=Ne[1]);break;case 6:n.keepLines&&h>0?L=w():S||(L=Ne[1]);break;case 10:n.keepLines&&h>0?L=w():M===6&&!S&&(L="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&h>0?L=w():(M===12||M===13)&&!S?L=Ne[1]:M!==5&&M!==17&&(p=!0);break;case 16:p=!0;break}h>0&&(M===12||M===13)&&(L=w())}M===17&&(n.keepLines&&h>0?L=w():L=n.insertFinalNewline?u:"");const P=g.getTokenOffset()+s;b(L,_,P),N=M}return y}function _t(e,t){let n="";for(let r=0;r{const u={};a(u),s.push(i),i=u,r=null},onObjectProperty:u=>{r=u},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const u=[];a(u),s.push(i),i=u,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(u,l,h)=>{t.push({error:u,offset:l,length:h})}},n),i[0]}function Zs(e){if(!e.parent||!e.parent.children)return[];const t=Zs(e.parent);if(e.parent.type==="property"){const n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){const 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":const t=Object.create(null);for(let n of e.children){const r=n.children[1];r&&(t[n.children[0].value]=mr(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function dc(e,t,n=!1){return t>=e.offset&&tx(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(x){return x?()=>x(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function o(x){return x?k=>x(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(x){return x?k=>x(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}const l=a(t.onObjectBegin),h=u(t.onObjectProperty),f=s(t.onObjectEnd),d=a(t.onArrayBegin),m=s(t.onArrayEnd),g=u(t.onLiteralValue),p=o(t.onSeparator),w=s(t.onComment),v=o(t.onError),y=n&&n.disallowComments,b=n&&n.allowTrailingComma;function N(){for(;;){const x=r.scan();switch(r.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:y||_(11);break;case 2:_(12);break;case 6:_(16);break}switch(x){case 12:case 13:y?_(10):w();break;case 16:_(1);break;case 15:case 14:break;default:return x}}}function _(x,k=[],C=[]){if(v(x),k.length+C.length>0){let I=r.getToken();for(;I!==17;){if(k.indexOf(I)!==-1){N();break}else if(C.indexOf(I)!==-1)break;I=N()}}}function M(x){const k=r.getTokenValue();return x?g(k):(h(k),i.push(k)),N(),!0}function L(){switch(r.getToken()){case 11:const x=r.getTokenValue();let k=Number(x);isNaN(k)&&(_(2),k=0),g(k);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return N(),!0}function S(){return r.getToken()!==10?(_(3,[],[2,5]),!1):(M(!1),r.getToken()===6?(p(":"),N(),T()||_(4,[],[2,5])):_(5,[],[2,5]),i.pop(),!0)}function P(){l(),N();let x=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(x||_(4,[],[]),p(","),N(),r.getToken()===2&&b)break}else x&&_(6,[],[]);S()||_(4,[],[2,5]),x=!0}return f(),r.getToken()!==2?_(7,[2],[]):N(),!0}function D(){d(),N();let x=!0,k=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(k||_(4,[],[]),p(","),N(),r.getToken()===4&&b)break}else k&&_(6,[],[]);x?(i.push(0),x=!1):i[i.length-1]++,T()||_(4,[],[4,5]),k=!0}return m(),x||i.pop(),r.getToken()!==4?_(8,[4],[]):N(),!0}function T(){switch(r.getToken()){case 3:return D();case 1:return P();case 10:return M(!0);default:return L()}}return N(),r.getToken()===17?n.allowEmptyContent?!0:(_(4,[],[]),!1):T()?(r.getToken()!==17&&_(9,[],[]),!0):(_(4,[],[]),!1)}const rt=dr;var Ks;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Ks||(Ks={}));var ea;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(ea||(ea={}));const mc=hc,pc=Ys,bc=Zs,wc=mr;var ta;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(ta||(ta={}));function xc(e,t,n){return uc(e,t,n)}function Nt(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;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n0?e.lastIndexOf(t)===n:n===0?e===t:!1}function vn(e){let t="";vc(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function ra(e){let t=0;for(let n=0;n0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.title)&&R.string(i.command)}e.is=n})(At||(At={}));var Fe;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function n(s,a){return{range:{start:s,end:s},newText:a}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){const a=s;return R.objectLiteral(a)&&R.string(a.newText)&&H.is(a.range)}e.is=i})(Fe||(Fe={}));var xr;(function(e){function t(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){const i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(R.string(i.description)||i.description===void 0)}e.is=n})(xr||(xr={}));var kt;(function(e){function t(n){const r=n;return R.string(r)}e.is=t})(kt||(kt={}));var ha;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}e.del=r;function i(s){const a=s;return Fe.is(a)&&(xr.is(a.annotationId)||kt.is(a.annotationId))}e.is=i})(ha||(ha={}));var vr;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&Sr.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(vr||(vr={}));var yr;(function(e){function t(r,i,s){let a={kind:"create",uri:r};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 n(r){let i=r;return i&&i.kind==="create"&&R.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||kt.is(i.annotationId))}e.is=n})(yr||(yr={}));var Lr;(function(e){function t(r,i,s,a){let o={kind:"rename",oldUri:r,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 n(r){let i=r;return i&&i.kind==="rename"&&R.string(i.oldUri)&&R.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||kt.is(i.annotationId))}e.is=n})(Lr||(Lr={}));var _r;(function(e){function t(r,i,s){let a={kind:"delete",uri:r};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 n(r){let i=r;return i&&i.kind==="delete"&&R.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||R.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||R.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||kt.is(i.annotationId))}e.is=n})(_r||(_r={}));var Nr;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>R.string(i.kind)?yr.is(i)||Lr.is(i)||_r.is(i):vr.is(i)))}e.is=t})(Nr||(Nr={}));var da;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)}e.is=n})(da||(da={}));var ga;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.integer(i.version)}e.is=n})(ga||(ga={}));var Sr;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&(i.version===null||R.integer(i.version))}e.is=n})(Sr||(Sr={}));var ma;(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.string(i.languageId)&&R.integer(i.version)&&R.string(i.text)}e.is=n})(ma||(ma={}));var it;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(it||(it={}));var Wt;(function(e){function t(n){const r=n;return R.objectLiteral(n)&&it.is(r.kind)&&R.string(r.value)}e.is=t})(Wt||(Wt={}));var be;(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})(be||(be={}));var ie;(function(e){e.PlainText=1,e.Snippet=2})(ie||(ie={}));var pa;(function(e){e.Deprecated=1})(pa||(pa={}));var ba;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){const i=r;return i&&R.string(i.newText)&&H.is(i.insert)&&H.is(i.replace)}e.is=n})(ba||(ba={}));var wa;(function(e){e.asIs=1,e.adjustIndentation=2})(wa||(wa={}));var xa;(function(e){function t(n){const r=n;return r&&(R.string(r.detail)||r.detail===void 0)&&(R.string(r.description)||r.description===void 0)}e.is=t})(xa||(xa={}));var Ar;(function(e){function t(n){return{label:n}}e.create=t})(Ar||(Ar={}));var va;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(va||(va={}));var Ln;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return R.string(i)||R.objectLiteral(i)&&R.string(i.language)&&R.string(i.value)}e.is=n})(Ln||(Ln={}));var ya;(function(e){function t(n){let r=n;return!!r&&R.objectLiteral(r)&&(Wt.is(r.contents)||Ln.is(r.contents)||R.typedArray(r.contents,Ln.is))&&(n.range===void 0||H.is(n.range))}e.is=t})(ya||(ya={}));var La;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(La||(La={}));var _a;(function(e){function t(n,r,...i){let s={label:n};return R.defined(r)&&(s.documentation=r),R.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(_a||(_a={}));var Na;(function(e){e.Text=1,e.Read=2,e.Write=3})(Na||(Na={}));var Sa;(function(e){function t(n,r){let i={range:n};return R.number(r)&&(i.kind=r),i}e.create=t})(Sa||(Sa={}));var Ve;(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})(Ve||(Ve={}));var Aa;(function(e){e.Deprecated=1})(Aa||(Aa={}));var ka;(function(e){function t(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(ka||(ka={}));var Ra;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(Ra||(Ra={}));var Ma;(function(e){function t(r,i,s,a,o,u){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}e.create=t;function n(r){let i=r;return i&&R.string(i.name)&&R.number(i.kind)&&H.is(i.range)&&H.is(i.selectionRange)&&(i.detail===void 0||R.string(i.detail))&&(i.deprecated===void 0||R.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(Ma||(Ma={}));var Ea;(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"})(Ea||(Ea={}));var _n;(function(e){e.Invoked=1,e.Automatic=2})(_n||(_n={}));var Ta;(function(e){function t(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function n(r){let i=r;return R.defined(i)&&R.typedArray(i.diagnostics,qe.is)&&(i.only===void 0||R.typedArray(i.only,R.string))&&(i.triggerKind===void 0||i.triggerKind===_n.Invoked||i.triggerKind===_n.Automatic)}e.is=n})(Ta||(Ta={}));var Pa;(function(e){function t(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):At.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return i&&R.string(i.title)&&(i.diagnostics===void 0||R.typedArray(i.diagnostics,qe.is))&&(i.kind===void 0||R.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||At.is(i.command))&&(i.isPreferred===void 0||R.boolean(i.isPreferred))&&(i.edit===void 0||Nr.is(i.edit))}e.is=n})(Pa||(Pa={}));var Ca;(function(e){function t(r,i){let s={range:r};return R.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return R.defined(i)&&H.is(i.range)&&(R.undefined(i.command)||At.is(i.command))}e.is=n})(Ca||(Ca={}));var Ia;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.uinteger(i.tabSize)&&R.boolean(i.insertSpaces)}e.is=n})(Ia||(Ia={}));var Fa;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return R.defined(i)&&H.is(i.range)&&(R.undefined(i.target)||R.string(i.target))}e.is=n})(Fa||(Fa={}));var Nn;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&H.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(Nn||(Nn={}));var Va;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Va||(Va={}));var Da;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Da||(Da={}));var Oa;(function(e){function t(n){const r=n;return R.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Oa||(Oa={}));var $a;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&H.is(i.range)&&R.string(i.text)}e.is=n})($a||($a={}));var Ba;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){const i=r;return i!=null&&H.is(i.range)&&R.boolean(i.caseSensitiveLookup)&&(R.string(i.variableName)||i.variableName===void 0)}e.is=n})(Ba||(Ba={}));var Ua;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&H.is(i.range)&&(R.string(i.expression)||i.expression===void 0)}e.is=n})(Ua||(Ua={}));var qa;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return R.defined(i)&&H.is(r.stoppedLocation)}e.is=n})(qa||(qa={}));var kr;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(kr||(kr={}));var Rr;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return R.objectLiteral(i)&&(i.tooltip===void 0||R.string(i.tooltip)||Wt.is(i.tooltip))&&(i.location===void 0||St.is(i.location))&&(i.command===void 0||At.is(i.command))}e.is=n})(Rr||(Rr={}));var ja;(function(e){function t(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function n(r){const i=r;return R.objectLiteral(i)&&K.is(i.position)&&(R.string(i.label)||R.typedArray(i.label,Rr.is))&&(i.kind===void 0||kr.is(i.kind))&&i.textEdits===void 0||R.typedArray(i.textEdits,Fe.is)&&(i.tooltip===void 0||R.string(i.tooltip)||Wt.is(i.tooltip))&&(i.paddingLeft===void 0||R.boolean(i.paddingLeft))&&(i.paddingRight===void 0||R.boolean(i.paddingRight))}e.is=n})(ja||(ja={}));var Wa;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(Wa||(Wa={}));var Ha;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(Ha||(Ha={}));var za;(function(e){function t(n){return{items:n}}e.create=t})(za||(za={}));var Ga;(function(e){e.Invoked=0,e.Automatic=1})(Ga||(Ga={}));var Ja;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Ja||(Ja={}));var Xa;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Xa||(Xa={}));var Qa;(function(e){function t(n){const r=n;return R.objectLiteral(r)&&pr.is(r.uri)&&R.string(r.name)}e.is=t})(Qa||(Qa={}));var Za;(function(e){function t(s,a,o,u){return new yc(s,a,o,u)}e.create=t;function n(s){let a=s;return!!(R.defined(a)&&R.string(a.uri)&&(R.undefined(a.languageId)||R.string(a.languageId))&&R.uinteger(a.lineCount)&&R.func(a.getText)&&R.func(a.positionAt)&&R.func(a.offsetAt))}e.is=n;function r(s,a){let o=s.getText(),u=i(a,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=o.length;for(let h=u.length-1;h>=0;h--){let f=u[h],d=s.offsetAt(f.range.start),m=s.offsetAt(f.range.end);if(m<=l)o=o.substring(0,d)+f.newText+o.substring(m,o.length);else throw new Error("Overlapping edit");l=d}return o}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);let h=0,f=0,d=0;for(;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return K.create(0,t);for(;rt?i=a:r=a+1}let s=r-1;return K.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1"u"}e.undefined=r;function i(m){return m===!0||m===!1}e.boolean=i;function s(m){return t.call(m)==="[object String]"}e.string=s;function a(m){return t.call(m)==="[object Number]"}e.number=a;function o(m,g,p){return t.call(m)==="[object Number]"&&g<=m&&m<=p}e.numberRange=o;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=u;function l(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=l;function h(m){return t.call(m)==="[object Function]"}e.func=h;function f(m){return m!==null&&typeof m=="object"}e.objectLiteral=f;function d(m,g){return Array.isArray(m)&&m.every(g)}e.typedArray=d})(R||(R={}));class Ht{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(Ht.isIncremental(r)){const i=Ka(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),u=Math.max(i.end.line,0);let l=this._lineOffsets;const h=Ya(r.text,!1,s);if(u-o===h.length)for(let d=0,m=h.length;dt?i=a:r=a+1}let s=r-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=0;const l=[];for(const h of o){let f=i.offsetAt(h.range.start);if(fu&&l.push(a.substring(u,f)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(a.substr(u)),l.join("")}e.applyEdits=r})(Me||(Me={}));function Mr(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Mr(r,t),Mr(i,t);let s=0,a=0,o=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Lc(e){const t=Ka(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var G;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"})(G||(G={}));var Ee;(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(Ee||(Ee={}));var Er;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[it.Markdown,it.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(Er||(Er={}));function E(...e){const t=e[0];let n,r,i;if(typeof t=="string")n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){const s=e.slice(1);if(t.length!==s.length+1)throw new Error("expected a string as the first argument to l10n.t");let a=t[0];for(let o=1;o0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};return Nc(r,i)}var _c=/{([^}]+)}/g;function Nc(e,t){return Object.keys(t).length===0?e:e.replace(_c,(n,r)=>t[r]??n)}const Sc={"color-hex":{errorMessage:E("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:E("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:E("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:E("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:E("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:E("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:E("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:E("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class st{constructor(t,n,r=0){this.offset=n,this.length=r,this.parent=t}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class Ac extends st{constructor(t,n){super(t,n),this.type="null",this.value=null}}class eo extends st{constructor(t,n,r){super(t,r),this.type="boolean",this.value=n}}class kc extends st{constructor(t,n){super(t,n),this.type="array",this.items=[]}get children(){return this.items}}class Rc extends st{constructor(t,n){super(t,n),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class Tr extends st{constructor(t,n,r){super(t,n,r),this.type="string",this.value=""}}class Mc extends st{constructor(t,n,r){super(t,n),this.type="property",this.colonOffset=-1,this.keyNode=r}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class Ec extends st{constructor(t,n){super(t,n),this.type="object",this.properties=[]}get children(){return this.properties}}function we(e){return Ie(e)?e?{}:{not:{}}:e}var to;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(to||(to={}));const Tc={"http://json-schema.org/draft-03/schema#":Ee.v3,"http://json-schema.org/draft-04/schema#":Ee.v4,"http://json-schema.org/draft-06/schema#":Ee.v6,"http://json-schema.org/draft-07/schema#":Ee.v7,"https://json-schema.org/draft/2019-09/schema":Ee.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ee.v2020_12};class no{constructor(t){this.schemaDraft=t}}class Pr{constructor(t=-1,n){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||ro(t,this.focusOffset))&&t!==this.exclude}newSub(){return new Pr(-1,this.exclude)}}class zt{constructor(){}get schemas(){return[]}add(t){}merge(t){}include(t){return!0}newSub(){return this}}zt.instance=new zt;class ce{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches+=t.propertiesMatches,this.propertiesValueMatches+=t.propertiesValueMatches,this.mergeProcessedProperties(t)}mergeEnumValues(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(const n of this.problems)n.code===G.EnumValueMismatch&&(n.message=E("Value is not accepted. Valid values: {0}.",this.enumValues.map(r=>JSON.stringify(r)).join(", ")))}}mergePropertyMatch(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(t){t.processedProperties.forEach(n=>this.processedProperties.add(n))}compare(t){const n=this.hasProblems();return n!==t.hasProblems()?n?-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}}function Pc(e,t=[]){return new io(e,t,[])}function at(e){return wc(e)}function Cr(e){return bc(e)}function ro(e,t,n=!1){return t>=e.offset&&t{let i=t(r);const s=r.children;if(Array.isArray(s))for(let a=0;a{const o=H.create(t.positionAt(a.location.offset),t.positionAt(a.location.offset+a.location.length));return qe.create(o,a.message,a.severity??r,a.code)})}}getMatchingSchemas(t,n=-1,r){if(this.root&&t){const i=new Pr(n,r),s=so(t),a=new no(s);return oe(this.root,t,new ce,i,a),i.schemas}return[]}}function so(e,t=Ee.v2020_12){let n=e.$schema;return n?Tc[n]??t:t}function oe(e,t,n,r,i){if(!e||!r.include(e))return;if(e.type==="property")return oe(e.valueNode,t,n,r,i);const s=e;switch(a(),s.type){case"object":h(s);break;case"array":l(s);break;case"string":u(s);break;case"number":o(s);break}r.add({node:s,schema:t});function a(){function f(y){return s.type===y||y==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(t.type)?t.type.some(f)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||E("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(f(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||E('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const y of t.allOf){const b=new ce,N=r.newSub();oe(s,we(y),b,N,i),n.merge(b),r.merge(N)}const d=we(t.not);if(d){const y=new ce,b=r.newSub();oe(s,d,y,b,i),y.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||E("Matches a schema that is not allowed.")});for(const N of b.schemas)N.inverted=!N.inverted,r.add(N)}const m=(y,b)=>{const N=[];let _;for(const M of y){const L=we(M),S=new ce,P=r.newSub();if(oe(s,L,S,P,i),S.hasProblems()||N.push(L),!_)_={schema:L,validationResult:S,matchingSchemas:P};else if(!b&&!S.hasProblems()&&!_.validationResult.hasProblems())_.matchingSchemas.merge(P),_.validationResult.propertiesMatches+=S.propertiesMatches,_.validationResult.propertiesValueMatches+=S.propertiesValueMatches,_.validationResult.mergeProcessedProperties(S);else{const D=S.compare(_.validationResult);D>0?_={schema:L,validationResult:S,matchingSchemas:P}:D===0&&(_.matchingSchemas.merge(P),_.validationResult.mergeEnumValues(S))}}return N.length>1&&b&&n.problems.push({location:{offset:s.offset,length:1},message:E("Matches multiple schemas when only one must validate.")}),_&&(n.merge(_.validationResult),r.merge(_.matchingSchemas)),N.length};Array.isArray(t.anyOf)&&m(t.anyOf,!1),Array.isArray(t.oneOf)&&m(t.oneOf,!0);const g=y=>{const b=new ce,N=r.newSub();oe(s,we(y),b,N,i),n.merge(b),r.merge(N)},p=(y,b,N)=>{const _=we(y),M=new ce,L=r.newSub();oe(s,_,M,L,i),r.merge(L),n.mergeProcessedProperties(M),M.hasProblems()?N&&g(N):b&&g(b)},w=we(t.if);if(w&&p(w,we(t.then),we(t.else)),Array.isArray(t.enum)){const y=at(s);let b=!1;for(const N of t.enum)if(Nt(y,N)){b=!0;break}n.enumValues=t.enum,n.enumValueMatch=b,b||n.problems.push({location:{offset:s.offset,length:s.length},code:G.EnumValueMismatch,message:t.errorMessage||E("Value is not accepted. Valid values: {0}.",t.enum.map(N=>JSON.stringify(N)).join(", "))})}if(Re(t.const)){const y=at(s);Nt(y,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:G.EnumValueMismatch,message:t.errorMessage||E("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let v=t.deprecationMessage;if(v||t.deprecated){v=v||E("Value is deprecated");let y=s.parent?.type==="property"?s.parent:s;n.problems.push({location:{offset:y.offset,length:y.length},severity:pe.Warning,message:v,code:G.Deprecated})}}function o(f){const d=f.value;function m(N){const _=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(N.toString());return _&&{value:Number(_[1]+(_[2]||"")),multiplier:(_[2]?.length||0)-(parseInt(_[3])||0)}}if(ue(t.multipleOf)){let N=-1;if(Number.isInteger(t.multipleOf))N=d%t.multipleOf;else{let _=m(t.multipleOf),M=m(d);if(_&&M){const L=10**Math.abs(M.multiplier-_.multiplier);M.multiplier<_.multiplier?M.value*=L:_.value*=L,N=M.value%_.value}}N!==0&&n.problems.push({location:{offset:f.offset,length:f.length},message:E("Value is not divisible by {0}.",t.multipleOf)})}function g(N,_){if(ue(_))return _;if(Ie(_)&&_)return N}function p(N,_){if(!Ie(_)||!_)return N}const w=g(t.minimum,t.exclusiveMinimum);ue(w)&&d<=w&&n.problems.push({location:{offset:f.offset,length:f.length},message:E("Value is below the exclusive minimum of {0}.",w)});const v=g(t.maximum,t.exclusiveMaximum);ue(v)&&d>=v&&n.problems.push({location:{offset:f.offset,length:f.length},message:E("Value is above the exclusive maximum of {0}.",v)});const y=p(t.minimum,t.exclusiveMinimum);ue(y)&&db&&n.problems.push({location:{offset:f.offset,length:f.length},message:E("Value is above the maximum of {0}.",b)})}function u(f){if(ue(t.minLength)&&ra(f.value)t.maxLength&&n.problems.push({location:{offset:f.offset,length:f.length},message:E("String is longer than the maximum length of {0}.",t.maxLength)}),na(t.pattern)&&(vn(t.pattern)?.test(f.value)||n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||E('String does not match the pattern of "{0}".',t.pattern)})),t.format)switch(t.format){case"uri":case"uri-reference":{let m;if(!f.value)m=E("URI expected.");else{const g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(f.value);g?!g[2]&&t.format==="uri"&&(m=E("URI with a scheme is expected.")):m=E("URI is expected.")}m&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||E("String is not a URI: {0}",m)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const d=Sc[t.format];(!f.value||!d.pattern.exec(f.value))&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||d.errorMessage})}}function l(f){let d,m;i.schemaDraft>=Ee.v2020_12?(d=t.prefixItems,m=Array.isArray(t.items)?void 0:t.items):(d=Array.isArray(t.items)?t.items:void 0,m=Array.isArray(t.items)?t.additionalItems:t.items);let g=0;if(d!==void 0){const v=Math.min(d.length,f.items.length);for(;g=Ee.v2020_12&&n.processedProperties.add(String(y)))}v===0&&!ue(t.minContains)&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||E("Array does not contain required item.")}),ue(t.minContains)&&vt.maxContains&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||E("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const w=t.unevaluatedItems;if(w!==void 0)for(let v=0;vt.maxItems&&n.problems.push({location:{offset:f.offset,length:f.length},message:E("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let y=function(){for(let b=0;b{m.delete(b),n.processedProperties.add(b)};if(t.properties)for(const b of Object.keys(t.properties)){g(b);const N=t.properties[b],_=d[b];if(_)if(Ie(N))if(N)n.propertiesMatches++,n.propertiesValueMatches++;else{const M=_.parent;n.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",b)})}else{const M=new ce;oe(_,N,M,r,i),n.mergePropertyMatch(M)}}if(t.patternProperties)for(const b of Object.keys(t.patternProperties)){const N=vn(b);if(N){const _=[];for(const M of m)if(N.test(M)){_.push(M);const L=d[M];if(L){const S=t.patternProperties[b];if(Ie(S))if(S)n.propertiesMatches++,n.propertiesValueMatches++;else{const P=L.parent;n.problems.push({location:{offset:P.keyNode.offset,length:P.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",M)})}else{const P=new ce;oe(L,S,P,r,i),n.mergePropertyMatch(P)}}}_.forEach(g)}}const p=t.additionalProperties;if(p!==void 0)for(const b of m){g(b);const N=d[b];if(N){if(p===!1){const _=N.parent;n.problems.push({location:{offset:_.keyNode.offset,length:_.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",b)})}else if(p!==!0){const _=new ce;oe(N,p,_,r,i),n.mergePropertyMatch(_)}}}const w=t.unevaluatedProperties;if(w!==void 0){const b=[];for(const N of m)if(!n.processedProperties.has(N)){b.push(N);const _=d[N];if(_){if(w===!1){const M=_.parent;n.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",N)})}else if(w!==!0){const M=new ce;oe(_,w,M,r,i),n.mergePropertyMatch(M)}}}b.forEach(g)}if(ue(t.maxProperties)&&f.properties.length>t.maxProperties&&n.problems.push({location:{offset:f.offset,length:f.length},message:E("Object has more properties than limit of {0}.",t.maxProperties)}),ue(t.minProperties)&&f.properties.length0){for(T--;T>0&&/\s/.test(i.charAt(T));)T--;x=T+1}if(u(M,L,T,x),S&&f(S,!1),P.length+D.length>0){let k=s.getToken();for(;k!==17;){if(P.indexOf(k)!==-1){o();break}else if(D.indexOf(k)!==-1)break;k=o()}}return S}function h(){switch(s.getTokenError()){case 4:return l(E("Invalid unicode sequence in string."),G.InvalidUnicode),!0;case 5:return l(E("Invalid escape character in string."),G.InvalidEscapeCharacter),!0;case 3:return l(E("Unexpected end of number."),G.UnexpectedEndOfNumber),!0;case 1:return l(E("Unexpected end of comment."),G.UnexpectedEndOfComment),!0;case 2:return l(E("Unexpected end of string."),G.UnexpectedEndOfString),!0;case 6:return l(E("Invalid characters in string. Control characters must be escaped."),G.InvalidCharacter),!0}return!1}function f(M,L){return M.length=s.getTokenOffset()+s.getTokenLength()-M.offset,L&&o(),M}function d(M){if(s.getToken()!==3)return;const L=new kc(M,s.getTokenOffset());o();let S=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){S||l(E("Value expected"),G.ValueExpected);const D=s.getTokenOffset();if(o(),s.getToken()===4){S&&u(E("Trailing comma"),G.TrailingComma,D,D+1);continue}}else S&&l(E("Expected comma"),G.CommaExpected);const P=b(L);P?L.items.push(P):l(E("Value expected"),G.ValueExpected,void 0,[],[4,5]),S=!0}return s.getToken()!==4?l(E("Expected comma or closing bracket"),G.CommaOrCloseBacketExpected,L):f(L,!0)}const m=new Tr(void 0,0,0);function g(M,L){const S=new Mc(M,s.getTokenOffset(),m);let P=w(S);if(!P)if(s.getToken()===16){l(E("Property keys must be doublequoted"),G.PropertyKeysMustBeDoublequoted);const T=new Tr(S,s.getTokenOffset(),s.getTokenLength());T.value=s.getTokenValue(),P=T,o()}else return;if(S.keyNode=P,P.value!=="//"){const T=L[P.value];T?(u(E("Duplicate object key"),G.DuplicateKey,S.keyNode.offset,S.keyNode.offset+S.keyNode.length,pe.Warning),Xe(T)&&u(E("Duplicate object key"),G.DuplicateKey,T.keyNode.offset,T.keyNode.offset+T.keyNode.length,pe.Warning),L[P.value]=!0):L[P.value]=S}if(s.getToken()===6)S.colonOffset=s.getTokenOffset(),o();else if(l(E("Colon expected"),G.ColonExpected),s.getToken()===10&&e.positionAt(P.offset+P.length).line=0;n--){const r=this.contributions[n].resolveCompletion;if(r){const i=r(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,n,r){const i={items:[],isIncomplete:!1},s=t.getText(),a=t.offsetAt(n);let o=r.getNodeFromOffset(a,!0);if(this.isInComment(t,o?o.offset:0,a))return Promise.resolve(i);if(o&&a===o.offset+o.length&&a>0){const d=s[a-1];(o.type==="object"&&d==="}"||o.type==="array"&&d==="]")&&(o=o.parent)}const u=this.getCurrentWord(t,a);let l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=H.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length));else{let d=a-u.length;d>0&&s[d-1]==='"'&&d--,l=H.create(t.positionAt(d),n)}const h=new Map,f={add:d=>{let m=d.label;const g=h.get(m);if(g)g.documentation||(g.documentation=d.documentation),g.detail||(g.detail=d.detail),g.labelDetails||(g.labelDetails=d.labelDetails);else{if(m=m.replace(/[\n]/g,"↵"),m.length>60){const p=m.substr(0,57).trim()+"...";h.has(p)||(m=p)}d.textEdit=Fe.replace(l,d.insertText),d.label=m,h.set(m,d),i.items.push(d)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:d=>{console.error(d)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,r).then(d=>{const m=[];let g=!0,p="",w;if(o&&o.type==="string"){const y=o.parent;y&&y.type==="property"&&y.keyNode===o&&(g=!y.valueNode,w=y,p=s.substr(o.offset+1,o.length-2),y&&(o=y.parent))}if(o&&o.type==="object"){if(o.offset===a)return i;o.properties.forEach(_=>{(!w||w!==_)&&h.set(_.keyNode.value,Ar.create("__"))});let b="";g&&(b=this.evaluateSeparatorAfter(t,t.offsetAt(l.end))),d?this.getPropertyCompletions(d,r,o,g,b,f):this.getSchemaLessPropertyCompletions(r,o,p,f);const N=Cr(o);this.contributions.forEach(_=>{const M=_.collectPropertyCompletions(t.uri,N,u,g,b==="",f);M&&m.push(M)}),!d&&u.length>0&&s.charAt(a-u.length-1)!=='"'&&(f.add({kind:be.Property,label:this.getLabelForValue(u),insertText:this.getInsertTextForProperty(u,void 0,!1,b),insertTextFormat:ie.Snippet,documentation:""}),f.setAsIncomplete())}const v={};return d?this.getValueCompletions(d,r,o,a,t,f,v):this.getSchemaLessValueCompletions(r,o,a,t,f),this.contributions.length>0&&this.getContributedValueCompletions(r,o,a,t,f,m),this.promiseConstructor.all(m).then(()=>{if(f.getNumberOfProposals()===0){let y=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(y=o.offset+o.length);const b=this.evaluateSeparatorAfter(t,y);this.addFillerValueCompletions(v,b,f)}return i})})}getPropertyCompletions(t,n,r,i,s,a){n.getMatchingSchemas(t.schema,r.offset).forEach(u=>{if(u.node===r&&!u.inverted){const l=u.schema.properties;l&&Object.keys(l).forEach(f=>{const d=l[f];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){const m={kind:be.Property,label:f,insertText:this.getInsertTextForProperty(f,d,i,s),insertTextFormat:ie.Snippet,filterText:this.getFilterTextForValue(f),documentation:this.fromMarkup(d.markdownDescription)||d.description||""};d.suggestSortText!==void 0&&(m.sortText=d.suggestSortText),m.insertText&&qt(m.insertText,`$1${s}`)&&(m.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(m)}});const h=u.schema.propertyNames;if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){const f=(d,m=void 0)=>{const g={kind:be.Property,label:d,insertText:this.getInsertTextForProperty(d,void 0,i,s),insertTextFormat:ie.Snippet,filterText:this.getFilterTextForValue(d),documentation:m||this.fromMarkup(h.markdownDescription)||h.description||""};h.suggestSortText!==void 0&&(g.sortText=h.suggestSortText),g.insertText&&qt(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(g)};if(h.enum)for(let d=0;d{a.properties.forEach(o=>{const u=o.keyNode.value;i.add({kind:be.Property,label:u,insertText:this.getInsertTextForValue(u,""),insertTextFormat:ie.Snippet,filterText:this.getFilterTextForValue(u),documentation:""})})};if(n.parent)if(n.parent.type==="property"){const a=n.parent.keyNode.value;t.visit(o=>(o.type==="property"&&o!==n.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(a=>{a.type==="object"&&a!==n&&s(a)});else n.type==="object"&&i.add({kind:be.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:ie.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,n,r,i,s){let a=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(a=n.offset+n.length,n=n.parent),!n){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:ie.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:ie.Snippet,documentation:""});return}const o=this.evaluateSeparatorAfter(i,a),u=l=>{l.parent&&!ro(l.parent,r,!0)&&s.add({kind:this.getSuggestionKind(l.type),label:this.getLabelTextForMatchingNode(l,i),insertText:this.getInsertTextForMatchingNode(l,i,o),insertTextFormat:ie.Snippet,documentation:""}),l.type==="boolean"&&this.addBooleanValueCompletion(!l.value,o,s)};if(n.type==="property"&&r>(n.colonOffset||0)){const l=n.valueNode;if(l&&(r>l.offset+l.length||l.type==="object"||l.type==="array"))return;const h=n.keyNode.value;t.visit(f=>(f.type==="property"&&f.keyNode.value===h&&f.valueNode&&u(f.valueNode),!0)),h==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(o,s)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){const l=n.parent.keyNode.value;t.visit(h=>(h.type==="property"&&h.keyNode.value===l&&h.valueNode&&h.valueNode.type==="array"&&h.valueNode.items.forEach(u),!0))}else n.items.forEach(u)}getValueCompletions(t,n,r,i,s,a,o){let u=i,l,h;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(u=r.offset+r.length,h=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(r.type==="property"&&i>(r.colonOffset||0)){const f=r.valueNode;if(f&&i>f.offset+f.length)return;l=r.keyNode.value,r=r.parent}if(r&&(l!==void 0||r.type==="array")){const f=this.evaluateSeparatorAfter(s,u),d=n.getMatchingSchemas(t.schema,r.offset,h);for(const m of d)if(m.node===r&&!m.inverted&&m.schema){if(r.type==="array"&&m.schema.items){let g=a;if(m.schema.uniqueItems){const p=new Set;r.children.forEach(w=>{w.type!=="array"&&w.type!=="object"&&p.add(this.getLabelForValue(at(w)))}),g={...a,add(w){p.has(w.label)||a.add(w)}}}if(Array.isArray(m.schema.items)){const p=this.findItemAtOffset(r,s,i);p{const u=o.collectDefaultCompletions(i.uri,s);u&&a.push(u)});else if((n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(n=n.parent),n&&n.type==="property"&&r>(n.colonOffset||0)){const o=n.keyNode.value,u=n.valueNode;if((!u||r<=u.offset+u.length)&&n.parent){const l=Cr(n.parent);this.contributions.forEach(h=>{const f=h.collectValueCompletions(i.uri,l,o,s);f&&a.push(f)})}}}addSchemaValueCompletions(t,n,r,i){typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.anyOf)&&t.anyOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.oneOf)&&t.oneOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)))}addDefaultValueCompletions(t,n,r,i=0){let s=!1;if(Re(t.default)){let a=t.type,o=t.default;for(let l=i;l>0;l--)o=[o],a="array";const u={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,n),insertTextFormat:ie.Snippet};this.doesSupportsLabelDetails()?u.labelDetails={description:E("Default value")}:u.detail=E("Default value"),r.add(u),s=!0}Array.isArray(t.examples)&&t.examples.forEach(a=>{let o=t.type,u=a;for(let l=i;l>0;l--)u=[u],o="array";r.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,n),insertTextFormat:ie.Snippet}),s=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(a=>{let o=t.type,u=a.body,l=a.label,h,f;if(Re(u)){t.type;for(let d=i;d>0;d--)u=[u];h=this.getInsertTextForSnippetValue(u,n),f=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else if(typeof a.bodyText=="string"){let d="",m="",g="";for(let p=i;p>0;p--)d=d+g+`[ `,m=m+` `+g+"]",g+=" ",o="array";h=d+g+a.bodyText.split(` `).join(` `+g)+m+n,l=l||h,f=h.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:h,insertTextFormat:ie.Snippet,filterText:f}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,n,r,i+1)}addEnumValueCompletions(t,n,r){if(Re(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:ie.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,s=t.enum.length;in[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(t,n,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:ie.Snippet,detail:E("New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:ie.Snippet,detail:E("New array"),documentation:""})}addBooleanValueCompletion(t,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,n),insertTextFormat:ie.Snippet,documentation:""})}addNullValueCompletion(t,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:ie.Snippet,documentation:""})}addDollarSchemaCompletions(t,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("http://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:be.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:ie.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,n){const r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(t,n){return Ir(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(t,n){switch(typeof t){case"object":return t===null?"${1:null}"+n:this.getInsertTextForValue(t,n);case"string":let r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+n}return this.getInsertTextForValue(t,n)}getSuggestionKind(t){if(Array.isArray(t)){const n=t;t=n.length>0?n[0]:void 0}if(!t)return be.Value;switch(t){case"string":return be.Value;case"object":return be.Module;case"property":return be.Property;default:return be.Value}}getLabelTextForMatchingNode(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:const i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,n,r,i){const s=this.getInsertTextForValue(t,"");if(!r)return s;const a=s+": ";let o,u=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){const l=n.defaultSnippets[0].body;Re(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),u+=n.enum.length),Re(n.const)&&(o||(o=this.getInsertTextForGuessedValue(n.const,"")),u++),Re(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),u++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),u+=n.examples.length),u===0){let l=Array.isArray(n.type)?n.type[0]:n.type;switch(l||(n.properties?l="object":n.items&&(l="array")),l){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}getCurrentWord(t,n){let r=n-1;const i=t.getText();for(;r>=0&&` \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(t,n){const r=rt(t.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,n,r){const i=rt(n.getText(),!0),s=t.items;for(let a=s.length-1;a>=0;a--){const o=s[a];if(r>o.offset+o.length)return i.setPosition(o.offset+o.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(r>=o.offset)return a}return 0}isInComment(t,n,r){const i=rt(t.getText(),!1);i.setPosition(n);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()s.offset+1&&i({contents:h,range:o}),l=Cr(s);for(let h=this.contributions.length-1;h>=0;h--){const d=this.contributions[h].getInfoContribution(t.uri,l);if(d)return d.then(m=>u(m))}return this.schemaService.getSchemaForResource(t.uri,r).then(h=>{if(h&&s){const f=r.getMatchingSchemas(h.schema,s.offset);let d,m,g,p;f.every(v=>{if(v.node===s&&!v.inverted&&v.schema&&(d=d||v.schema.title,m=m||v.schema.markdownDescription||Fr(v.schema.description),v.schema.enum)){const y=v.schema.enum.indexOf(at(s));v.schema.markdownEnumDescriptions?g=v.schema.markdownEnumDescriptions[y]:v.schema.enumDescriptions&&(g=Fr(v.schema.enumDescriptions[y])),g&&(p=v.schema.enum[y],typeof p!="string"&&(p=JSON.stringify(p)))}return!0});let w="";return d&&(w=Fr(d)),m&&(w.length>0&&(w+=` `),w+=m),g&&(w.length>0&&(w+=` `),w+=`\`${Vc(p)}\`: ${g}`),u([w])}return null})}}function Fr(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function Vc(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}class Dc{constructor(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:pe.Error)}doValidation(t,n,r,i){if(!this.validationEnabled)return this.promise.resolve([]);const s=[],a={},o=l=>{const h=l.range.start.line+" "+l.range.start.character+" "+l.message;a[h]||(a[h]=!0,s.push(l))},u=l=>{let h=r?.trailingCommas?Sn(r.trailingCommas):pe.Error,f=r?.comments?Sn(r.comments):this.commentSeverity,d=r?.schemaValidation?Sn(r.schemaValidation):pe.Warning,m=r?.schemaRequest?Sn(r.schemaRequest):pe.Warning;if(l){const g=(p,w)=>{if(n.root&&m){const v=n.root,y=v.type==="object"?v.properties[0]:void 0;if(y&&y.keyNode.value==="$schema"){const b=y.valueNode||y,N=H.create(t.positionAt(b.offset),t.positionAt(b.offset+b.length));o(qe.create(N,p,m,w))}else{const b=H.create(t.positionAt(v.offset),t.positionAt(v.offset+1));o(qe.create(b,p,m,w))}}};if(l.errors.length)g(l.errors[0],G.SchemaResolveError);else if(d){for(const w of l.warnings)g(w,G.SchemaUnsupportedFeature);const p=n.validate(t,l.schema,d,r?.schemaDraft);p&&p.forEach(o)}ao(l.schema)&&(f=void 0),oo(l.schema)&&(h=void 0)}for(const g of n.syntaxErrors){if(g.code===G.TrailingComma){if(typeof h!="number")continue;g.severity=h}o(g)}if(typeof f=="number"){const g=E("Comments are not permitted in JSON.");n.comments.forEach(p=>{o(qe.create(p,g,f,G.CommentNotPermitted))})}return s};if(i){const l=i.id||"schemaservice://untitled/"+Oc++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:i}).getResolvedSchema().then(f=>u(f))}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(l=>u(l))}getLanguageStatus(t,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,n)}}}let Oc=0;function ao(e){if(e&&typeof e=="object"){if(Ie(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const n=ao(t);if(Ie(n))return n}}}function oo(e){if(e&&typeof e=="object"){if(Ie(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(Ie(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const n of e.allOf){const r=oo(n);if(Ie(r))return r}}}function Sn(e){switch(e){case"error":return pe.Error;case"warning":return pe.Warning;case"ignore":return}}const lo=48,$c=57,Bc=65,An=97,Uc=102;function te(e){return e=An&&e<=Uc?e-An+10:0)}function qc(e){if(e[0]==="#")switch(e.length){case 4:return{red:te(e.charCodeAt(1))*17/255,green:te(e.charCodeAt(2))*17/255,blue:te(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:te(e.charCodeAt(1))*17/255,green:te(e.charCodeAt(2))*17/255,blue:te(e.charCodeAt(3))*17/255,alpha:te(e.charCodeAt(4))*17/255};case 7:return{red:(te(e.charCodeAt(1))*16+te(e.charCodeAt(2)))/255,green:(te(e.charCodeAt(3))*16+te(e.charCodeAt(4)))/255,blue:(te(e.charCodeAt(5))*16+te(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(te(e.charCodeAt(1))*16+te(e.charCodeAt(2)))/255,green:(te(e.charCodeAt(3))*16+te(e.charCodeAt(4)))/255,blue:(te(e.charCodeAt(5))*16+te(e.charCodeAt(6)))/255,alpha:(te(e.charCodeAt(7))*16+te(e.charCodeAt(8)))/255}}}class jc{constructor(t){this.schemaService=t}findDocumentSymbols(t,n,r={resultLimit:Number.MAX_VALUE}){const i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE;const a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||qt(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){const d=[];for(const m of i.items)if(m.type==="object"){for(const g of m.properties)if(g.keyNode.value==="key"&&g.valueNode){const p=St.create(t.uri,Qe(t,m));if(d.push({name:uo(g.valueNode),kind:Ve.Function,location:p}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),d}}return d}const o=[{node:i,containerName:""}];let u=0,l=!1;const h=[],f=(d,m)=>{d.type==="array"?d.items.forEach(g=>{g&&o.push({node:g,containerName:m})}):d.type==="object"&&d.properties.forEach(g=>{const p=g.valueNode;if(p)if(s>0){s--;const w=St.create(t.uri,Qe(t,g)),v=m?m+"."+g.keyNode.value:g.keyNode.value;h.push({name:this.getKeyLabel(g),kind:this.getSymbolKind(p.type),location:w,containerName:m}),o.push({node:p,containerName:v})}else l=!0})};for(;u{d.type==="array"?d.items.forEach((g,p)=>{if(g)if(s>0){s--;const w=Qe(t,g),v=w,b={name:String(p),kind:this.getSymbolKind(g.type),range:w,selectionRange:v,children:[]};m.push(b),u.push({result:b.children,node:g})}else h=!0}):d.type==="object"&&d.properties.forEach(g=>{const p=g.valueNode;if(p)if(s>0){s--;const w=Qe(t,g),v=Qe(t,g.keyNode),y=[],b={name:this.getKeyLabel(g),kind:this.getSymbolKind(p.type),range:w,selectionRange:v,children:y,detail:this.getDetail(p)};m.push(b),u.push({result:y,node:p})}else h=!0})};for(;l{const s=[];if(i){let a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE;const o=n.getMatchingSchemas(i.schema),u={};for(const l of o)if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){const h=String(l.node.offset);if(!u[h]){const f=qc(at(l.node));if(f){const d=Qe(t,l.node);s.push({color:f,range:d})}if(u[h]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),s}}}return s})}getColorPresentations(t,n,r,i){const s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),u=Math.round(r.blue*255);function l(f){const d=f.toString(16);return d.length!==2?"0"+d:d}let h;return r.alpha===1?h=`#${l(a)}${l(o)}${l(u)}`:h=`#${l(a)}${l(o)}${l(u)}${l(Math.round(r.alpha*255))}`,s.push({label:h,textEdit:Fe.replace(i,JSON.stringify(h))}),s}}function Qe(e,t){return H.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function uo(e){return at(e)||E("")}const Vr={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Wc={id:E("A unique identifier for the schema."),$schema:E("The schema to verify this document against."),title:E("A descriptive title of the element."),description:E("A long description of the element. Used in hover menus and suggestions."),default:E("A default value. Used by suggestions."),multipleOf:E("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:E("The maximum numerical value, inclusive by default."),exclusiveMaximum:E("Makes the maximum property exclusive."),minimum:E("The minimum numerical value, inclusive by default."),exclusiveMinimum:E("Makes the minimum property exclusive."),maxLength:E("The maximum length of a string."),minLength:E("The minimum length of a string."),pattern:E("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:E("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:E("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:E("The maximum number of items that can be inside an array. Inclusive."),minItems:E("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:E("If all of the items in the array must be unique. Defaults to false."),maxProperties:E("The maximum number of properties an object can have. Inclusive."),minProperties:E("The minimum number of properties an object can have. Inclusive."),required:E("An array of strings that lists the names of all properties required on this object."),additionalProperties:E("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:E("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:E("A map of property names to schemas for each property."),patternProperties:E("A map of regular expressions on property names to schemas for matching properties."),dependencies:E("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:E("The set of literal values that are valid."),type:E("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:E("Describes the format expected for the value."),allOf:E("An array of schemas, all of which must match."),anyOf:E("An array of schemas, where at least one must match."),oneOf:E("An array of schemas, exactly one of which must match."),not:E("A schema which must not match."),$id:E("A unique identifier for the schema."),$ref:E("Reference a definition hosted on any location."),$comment:E("Comments from schema authors to readers or maintainers of the schema."),readOnly:E("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:E("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:E('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:E("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:E("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:E("Describes the media type of a string property."),contentEncoding:E("Describes the content encoding of a string property."),if:E('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:E('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:E('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in Vr.schemas){const t=Vr.schemas[e];for(const n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});const i=Wc[n];i&&(r.description=i)}}var co;(()=>{var e={470:i=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function a(u,l){for(var h,f="",d=0,m=-1,g=0,p=0;p<=u.length;++p){if(p2){var w=f.lastIndexOf("/");if(w!==f.length-1){w===-1?(f="",d=0):d=(f=f.slice(0,w)).length-1-f.lastIndexOf("/"),m=p,g=0;continue}}else if(f.length===2||f.length===1){f="",d=0,m=p,g=0;continue}}l&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+u.slice(m+1,p):f=u.slice(m+1,p),d=p-m-1;m=p,g=0}else h===46&&g!==-1?++g:g=-1}return f}var o={resolve:function(){for(var u,l="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(u===void 0&&(u=process.cwd()),d=u),s(d),d.length!==0&&(l=d+"/"+l,h=d.charCodeAt(0)===47)}return l=a(l,!h),h?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(u){if(s(u),u.length===0)return".";var l=u.charCodeAt(0)===47,h=u.charCodeAt(u.length-1)===47;return(u=a(u,!l)).length!==0||l||(u="."),u.length>0&&h&&(u+="/"),l?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,l=0;l0&&(u===void 0?u=h:u+="/"+h)}return u===void 0?".":o.normalize(u)},relative:function(u,l){if(s(u),s(l),u===l||(u=o.resolve(u))===(l=o.resolve(l)))return"";for(var h=1;hp){if(l.charCodeAt(m+v)===47)return l.slice(m+v+1);if(v===0)return l.slice(m+v)}else d>p&&(u.charCodeAt(h+v)===47?w=v:v===0&&(w=0));break}var y=u.charCodeAt(h+v);if(y!==l.charCodeAt(m+v))break;y===47&&(w=v)}var b="";for(v=h+w+1;v<=f;++v)v!==f&&u.charCodeAt(v)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(m+w):(m+=w,l.charCodeAt(m)===47&&++m,l.slice(m))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var l=u.charCodeAt(0),h=l===47,f=-1,d=!0,m=u.length-1;m>=1;--m)if((l=u.charCodeAt(m))===47){if(!d){f=m;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":u.slice(0,f)},basename:function(u,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(u);var h,f=0,d=-1,m=!0;if(l!==void 0&&l.length>0&&l.length<=u.length){if(l.length===u.length&&l===u)return"";var g=l.length-1,p=-1;for(h=u.length-1;h>=0;--h){var w=u.charCodeAt(h);if(w===47){if(!m){f=h+1;break}}else p===-1&&(m=!1,p=h+1),g>=0&&(w===l.charCodeAt(g)?--g==-1&&(d=h):(g=-1,d=p))}return f===d?d=p:d===-1&&(d=u.length),u.slice(f,d)}for(h=u.length-1;h>=0;--h)if(u.charCodeAt(h)===47){if(!m){f=h+1;break}}else d===-1&&(m=!1,d=h+1);return d===-1?"":u.slice(f,d)},extname:function(u){s(u);for(var l=-1,h=0,f=-1,d=!0,m=0,g=u.length-1;g>=0;--g){var p=u.charCodeAt(g);if(p!==47)f===-1&&(d=!1,f=g+1),p===46?l===-1?l=g:m!==1&&(m=1):l!==-1&&(m=-1);else if(!d){h=g+1;break}}return l===-1||f===-1||m===0||m===1&&l===f-1&&l===h+1?"":u.slice(l,f)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(l,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d}(0,u)},parse:function(u){s(u);var l={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return l;var h,f=u.charCodeAt(0),d=f===47;d?(l.root="/",h=1):h=0;for(var m=-1,g=0,p=-1,w=!0,v=u.length-1,y=0;v>=h;--v)if((f=u.charCodeAt(v))!==47)p===-1&&(w=!1,p=v+1),f===46?m===-1?m=v:y!==1&&(y=1):m!==-1&&(y=-1);else if(!w){g=v+1;break}return m===-1||p===-1||y===0||y===1&&m===p-1&&m===g+1?p!==-1&&(l.base=l.name=g===0&&d?u.slice(1,p):u.slice(g,p)):(g===0&&d?(l.name=u.slice(1,m),l.base=u.slice(1,p)):(l.name=u.slice(g,m),l.base=u.slice(g,p)),l.ext=u.slice(m,p)),g>0?l.dir=u.slice(0,g-1):d&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>D}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function u(T,x){if(!T.scheme&&x)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${T.authority}", path: "${T.path}", query: "${T.query}", fragment: "${T.fragment}"}`);if(T.scheme&&!s.test(T.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(T.path){if(T.authority){if(!a.test(T.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(T.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const l="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(x){return x instanceof d||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="string"&&typeof x.with=="function"&&typeof x.toString=="function"}scheme;authority;path;query;fragment;constructor(x,k,C,I,F,V=!1){typeof x=="object"?(this.scheme=x.scheme||l,this.authority=x.authority||l,this.path=x.path||l,this.query=x.query||l,this.fragment=x.fragment||l):(this.scheme=function(j,J){return j||J?j:"file"}(x,V),this.authority=k||l,this.path=function(j,J){switch(j){case"https":case"http":case"file":J?J[0]!==h&&(J=h+J):J=h}return J}(this.scheme,C||l),this.query=I||l,this.fragment=F||l,u(this,V))}get fsPath(){return y(this)}with(x){if(!x)return this;let{scheme:k,authority:C,path:I,query:F,fragment:V}=x;return k===void 0?k=this.scheme:k===null&&(k=l),C===void 0?C=this.authority:C===null&&(C=l),I===void 0?I=this.path:I===null&&(I=l),F===void 0?F=this.query:F===null&&(F=l),V===void 0?V=this.fragment:V===null&&(V=l),k===this.scheme&&C===this.authority&&I===this.path&&F===this.query&&V===this.fragment?this:new g(k,C,I,F,V)}static parse(x,k=!1){const C=f.exec(x);return C?new g(C[2]||l,M(C[4]||l),M(C[5]||l),M(C[7]||l),M(C[9]||l),k):new g(l,l,l,l,l)}static file(x){let k=l;if(i&&(x=x.replace(/\\/g,h)),x[0]===h&&x[1]===h){const C=x.indexOf(h,2);C===-1?(k=x.substring(2),x=h):(k=x.substring(2,C),x=x.substring(C)||h)}return new g("file",k,x,l,l)}static from(x){const k=new g(x.scheme,x.authority,x.path,x.query,x.fragment);return u(k,!0),k}toString(x=!1){return b(this,x)}toJSON(){return this}static revive(x){if(x){if(x instanceof d)return x;{const k=new g(x);return k._formatted=x.external,k._fsPath=x._sep===m?x.fsPath:null,k}}return x}}const m=i?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this)),this._fsPath}toString(x=!1){return x?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=m),this._formatted&&(x.external=this._formatted),this.path&&(x.path=this.path),this.scheme&&(x.scheme=this.scheme),this.authority&&(x.authority=this.authority),this.query&&(x.query=this.query),this.fragment&&(x.fragment=this.fragment),x}}const p={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 w(T,x,k){let C,I=-1;for(let F=0;F=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===45||V===46||V===95||V===126||x&&V===47||k&&V===91||k&&V===93||k&&V===58)I!==-1&&(C+=encodeURIComponent(T.substring(I,F)),I=-1),C!==void 0&&(C+=T.charAt(F));else{C===void 0&&(C=T.substr(0,F));const j=p[V];j!==void 0?(I!==-1&&(C+=encodeURIComponent(T.substring(I,F)),I=-1),C+=j):I===-1&&(I=F)}}return I!==-1&&(C+=encodeURIComponent(T.substring(I))),C!==void 0?C:T}function v(T){let x;for(let k=0;k1&&T.scheme==="file"?`//${T.authority}${T.path}`:T.path.charCodeAt(0)===47&&(T.path.charCodeAt(1)>=65&&T.path.charCodeAt(1)<=90||T.path.charCodeAt(1)>=97&&T.path.charCodeAt(1)<=122)&&T.path.charCodeAt(2)===58?T.path[1].toLowerCase()+T.path.substr(2):T.path,i&&(k=k.replace(/\//g,"\\")),k}function b(T,x){const k=x?v:w;let C="",{scheme:I,authority:F,path:V,query:j,fragment:J}=T;if(I&&(C+=I,C+=":"),(F||I==="file")&&(C+=h,C+=h),F){let z=F.indexOf("@");if(z!==-1){const Se=F.substr(0,z);F=F.substr(z+1),z=Se.lastIndexOf(":"),z===-1?C+=k(Se,!1,!1):(C+=k(Se.substr(0,z),!1,!1),C+=":",C+=k(Se.substr(z+1),!1,!0)),C+="@"}F=F.toLowerCase(),z=F.lastIndexOf(":"),z===-1?C+=k(F,!1,!0):(C+=k(F.substr(0,z),!1,!0),C+=F.substr(z))}if(V){if(V.length>=3&&V.charCodeAt(0)===47&&V.charCodeAt(2)===58){const z=V.charCodeAt(1);z>=65&&z<=90&&(V=`/${String.fromCharCode(z+32)}:${V.substr(3)}`)}else if(V.length>=2&&V.charCodeAt(1)===58){const z=V.charCodeAt(0);z>=65&&z<=90&&(V=`${String.fromCharCode(z+32)}:${V.substr(2)}`)}C+=k(V,!0,!1)}return j&&(C+="?",C+=k(j,!1,!1)),J&&(C+="#",C+=x?J:w(J,!1,!1)),C}function N(T){try{return decodeURIComponent(T)}catch{return T.length>3?T.substr(0,3)+N(T.substr(3)):T}}const _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function M(T){return T.match(_)?T.replace(_,x=>N(x)):T}var L=n(470);const S=L.posix||L,P="/";var D;(function(T){T.joinPath=function(x,...k){return x.with({path:S.join(x.path,...k)})},T.resolvePath=function(x,...k){let C=x.path,I=!1;C[0]!==P&&(C=P+C,I=!0);let F=S.resolve(C,...k);return I&&F[0]===P&&!x.authority&&(F=F.substring(1)),x.with({path:F})},T.dirname=function(x){if(x.path.length===0||x.path===P)return x;let k=S.dirname(x.path);return k.length===1&&k.charCodeAt(0)===46&&(k=""),x.with({path:k})},T.basename=function(x){return S.basename(x.path)},T.extname=function(x){return S.extname(x.path)}})(D||(D={}))})(),co=r})();const{URI:Rt,Utils:L1}=co;function Hc(e,t){if(typeof e!="string")throw new TypeError("Expected a string");const n=String(e);let r="";const i=!!t,s=!!t;let a=!1;const o=t&&typeof t.flags=="string"?t.flags:"";let u;for(let l=0,h=n.length;l1&&(f==="/"||f===void 0||f==="{"||f===",")&&(m==="/"||m===void 0||m===","||m==="}")?(m==="/"?l++:f==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=u}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}const zc="!",Gc="/";class Jc{constructor(t,n,r){this.folderUri=n,this.uris=r,this.globWrappers=[];try{for(let i of t){const s=i[0]!==zc;s||(i=i.substring(1)),i.length>0&&(i[0]===Gc&&(i=i.substring(1)),this.globWrappers.push({regexp:Hc("**/"+i,{extended:!0,globstar:!0}),include:s}))}n&&(n=ho(n),n.endsWith("/")||(n=n+"/"),this.folderUri=n)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(t){if(this.folderUri&&!t.startsWith(this.folderUri))return!1;let n=!1;for(const{regexp:r,include:i}of this.globWrappers)r.test(t)&&(n=i);return n}getURIs(){return this.uris}}class Xc{constructor(t,n,r){this.service=t,this.uri=n,this.dependencies=new Set,this.anchors=void 0,r&&(this.unresolvedSchema=this.service.promise.resolve(new Gt(r)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(t=>this.service.resolveSchemaContent(t,this))),this.resolvedSchema}clearSchema(){const t=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,t}}class Gt{constructor(t,n=[]){this.schema=t,this.errors=n}}class fo{constructor(t,n=[],r=[],i){this.schema=t,this.errors=n,this.warnings=r,this.schemaDraft=i}getSection(t){const n=this.getSectionRecursive(t,this.schema);if(n)return we(n)}getSectionRecursive(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;const r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties){for(const i of Object.keys(n.patternProperties))if(vn(i)?.test(r))return this.getSectionRecursive(t,n.patternProperties[i])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){const i=parseInt(r,10);if(!isNaN(i)&&n.items[i])return this.getSectionRecursive(t,n.items[i])}else if(n.items)return this.getSectionRecursive(t,n.items)}}}}class Qc{constructor(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(t){return Object.keys(this.registeredSchemasIds).filter(n=>{const r=Rt.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(t){this.cachedSchemaForResource=void 0;let n=!1;t=Ze(t);const r=[t],i=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;r.length;){const s=r.pop();for(let a=0;a{if(!n){const a=E("Unable to load schema from '{0}': No content.",Jt(t));return new Gt({},[a])}const r=[];n.charCodeAt(0)===65279&&(r.push(E("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Jt(t))),n=n.trimStart());let i={};const s=[];return i=mc(n,s),s.length&&r.push(E("Unable to parse content from '{0}': Parse error at offset {1}.",Jt(t),s[0].offset)),new Gt(i,r)},n=>{let r=n.toString();const i=n.toString().split("Error: ");return i.length>1&&(r=i[1]),qt(r,".")&&(r=r.substr(0,r.length-1)),new Gt({},[E("Unable to load schema from '{0}': {1}.",Jt(t),r)])})}resolveSchemaContent(t,n){const r=t.errors.slice(0),i=t.schema;let s=i.$schema?Ze(i.$schema):void 0;if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new fo({},[E("Draft-03 schemas are not supported.")],[],s));let a=new Set;const o=this.contextService,u=(p,w)=>{w=decodeURIComponent(w);let v=p;return w[0]==="/"&&(w=w.substring(1)),w.split("/").some(y=>(y=y.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[y],!v)),v},l=(p,w,v)=>(w.anchors||(w.anchors=g(p)),w.anchors.get(v)),h=(p,w)=>{for(const v in w)w.hasOwnProperty(v)&&v!=="id"&&v!=="$id"&&(p[v]=w[v])},f=(p,w,v,y)=>{let b;y===void 0||y.length===0?b=w:y.charAt(0)==="/"?b=u(w,y):b=l(w,v,y),b?h(p,b):r.push(E("$ref '{0}' in '{1}' can not be resolved.",y||"",v.uri))},d=(p,w,v,y)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(w)&&(w=o.resolveRelativePath(w,y.uri)),w=Ze(w);const b=this.getOrAddSchemaHandle(w);return b.getUnresolvedSchema().then(N=>{if(y.dependencies.add(w),N.errors.length){const _=v?w+"#"+v:w;r.push(E("Problems loading reference '{0}': {1}",_,N.errors[0]))}return f(p,N.schema,b,v),m(p,N.schema,b)})},m=(p,w,v)=>{const y=[];return this.traverseNodes(p,b=>{const N=new Set;for(;b.$ref;){const _=b.$ref,M=_.split("#",2);if(delete b.$ref,M[0].length>0){y.push(d(b,M[0],M[1],v));return}else if(!N.has(_)){const L=M[1];f(b,w,v,L),N.add(_)}}b.$recursiveRef&&a.add("$recursiveRef"),b.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(y)},g=p=>{const w=new Map;return this.traverseNodes(p,v=>{const y=v.$id||v.id,b=na(y)&&y.charAt(0)==="#"?y.substring(1):v.$anchor;b&&(w.has(b)?r.push(E("Duplicate anchor declaration: '{0}'",b)):w.set(b,v)),v.$recursiveAnchor&&a.add("$recursiveAnchor"),v.$dynamicAnchor&&a.add("$dynamicAnchor")}),w};return m(i,i,n).then(p=>{let w=[];return a.size&&w.push(E("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", "))),new fo(i,r,w,s)})}traverseNodes(t,n){if(!t||typeof t!="object")return Promise.resolve(null);const r=new Set,i=(...h)=>{for(const f of h)Xe(f)&&u.push(f)},s=(...h)=>{for(const f of h)if(Xe(f))for(const d in f){const g=f[d];Xe(g)&&u.push(g)}},a=(...h)=>{for(const f of h)if(Array.isArray(f))for(const d of f)Xe(d)&&u.push(d)},o=h=>{if(Array.isArray(h))for(const f of h)Xe(f)&&u.push(f);else Xe(h)&&u.push(h)},u=[t];let l=u.pop();for(;l;)r.has(l)||(r.add(l),n(l),i(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),s(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),a(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=u.pop()}getSchemaFromProperty(t,n){if(n.root?.type==="object"){for(const r of n.root.properties)if(r.keyNode.value==="$schema"&&r.valueNode?.type==="string"){let i=r.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(i)&&(i=this.contextService.resolveRelativePath(i,t)),i}}}getAssociatedSchemas(t){const n=Object.create(null),r=[],i=ho(t);for(const s of this.filePatternAssociations)if(s.matchesPattern(i))for(const a of s.getURIs())n[a]||(r.push(a),n[a]=!0);return r}getSchemaURIsForResource(t,n){let r=n&&this.getSchemaFromProperty(t,n);return r?[r]:this.getAssociatedSchemas(t)}getSchemaForResource(t,n){if(n){let s=this.getSchemaFromProperty(t,n);if(s){const a=Ze(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;const r=this.getAssociatedSchemas(t),i=r.length>0?this.createCombinedSchema(t,r).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:i},i}createCombinedSchema(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);{const r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(s=>({$ref:s}))};return this.addSchemaHandle(r,i)}}getMatchingSchemas(t,n,r){if(r){const i=r.id||"schemaservice://untitled/matchingSchemas/"+Zc++;return this.addSchemaHandle(i,r).getResolvedSchema().then(a=>n.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(t.uri,n).then(i=>i?n.getMatchingSchemas(i.schema).filter(s=>!s.inverted):[])}}let Zc=0;function Ze(e){try{return Rt.parse(e).toString(!0)}catch{return e}}function ho(e){try{return Rt.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function Jt(e){try{const t=Rt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function Yc(e,t){const n=[],r=[],i=[];let s=-1;const a=rt(e.getText(),!1);let o=a.scan();function u(g){n.push(g),r.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{const g=e.positionAt(a.getTokenOffset()).line,p={startLine:g,endLine:g,kind:o===1?"object":"array"};i.push(p);break}case 2:case 4:{const g=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===g){const p=i.pop(),w=e.positionAt(a.getTokenOffset()).line;p&&w>p.startLine+1&&s!==p.startLine&&(p.endLine=w-1,u(p),s=p.startLine)}break}case 13:{const g=e.positionAt(a.getTokenOffset()).line,p=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&g+1=0&&i[v].kind!==jt.Region;)v--;if(v>=0){const y=i[v];i.length=v,w>y.startLine&&s!==y.startLine&&(y.endLine=w,u(y),s=y.startLine)}}}break}}o=a.scan()}const l=t&&t.rangeLimit;if(typeof l!="number"||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const h=[];for(let g of r)g<30&&(h[g]=(h[g]||0)+1);let f=0,d=0;for(let g=0;gl){d=g;break}f+=p}}const m=[];for(let g=0;g=d&&u<=m&&h.push(i(d,m)),h.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":h.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){const d=a(l.offset+l.length,5);d!==-1&&h.push(i(l.offset,d))}l=l.parent}let f;for(let d=h.length-1;d>=0;d--)f=Nn.create(h[d],f);return f||(f=Nn.create(H.create(o,o))),f}function i(o,u){return H.create(e.positionAt(o),e.positionAt(u))}const s=rt(e.getText(),!0);function a(o,u){return s.setPosition(o),s.scan()===u?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}function Dr(e,t,n){let r;if(n){const s=e.offsetAt(n.start),a=e.offsetAt(n.end)-s;r={offset:s,length:a}}const i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:` `,keepLines:t?.keepLines===!0};return xc(e.getText(),r,i).map(s=>Fe.replace(H.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var se;(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(se||(se={}));class kn{constructor(t,n){this.propertyName=t??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let n=0;t.noKeyName?n=this.childrenProperties.length:n=t1(this.childrenProperties,t,e1),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,t)}else this.childrenProperties.push(t);return t}}function e1(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return nr?1:0}function t1(e,t,n){const r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(rs)return e.length;let a=0,o=e.length-1;for(;a<=o;){let u=o+a>>1,l=n(t,e[u]);if(l>0)a=u+1;else if(l<0)o=u-1;else return u}return-a-1}function n1(e,t){const n={...t,keepLines:!1},r=Me.applyEdits(e,Dr(e,n,void 0)),i=Me.create("test://test.json","json",0,r),s=r1(i),a=i1(i,s),o=Dr(a,n,void 0),u=Me.applyEdits(a,o);return[Fe.replace(H.create(K.create(0,0),e.positionAt(e.getText().length)),u)]}function r1(e){const t=e.getText(),n=rt(t,!1);let r=new kn,i=r,s=r,a=r,o,u=0,l=0,h,f,d=-1,m=-1,g=0,p=0,w=[],v=!1,y=!1;for(;(o=n.scan())!==17;){if(v===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let b=n.getTokenStartLine();f===2||f===4?a.endLineNumber=b-1:s.endLineNumber=b-1,g=b,v=!1}if(y===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(g=n.getTokenStartLine(),y=!1),n.getTokenStartLine()!==u){for(let b=u;b0;){const i=r.shift(),s=i.propertyTreeArray;let a=i.beginningLineNumber;for(let o=0;o{if(r.type==="property"&&r.keyNode.value==="$ref"&&r.valueNode?.type==="string"){const i=r.valueNode.value,s=o1(t,i);if(s){const a=e.positionAt(s.offset);n.push({target:`${e.uri}#${a.line+1},${a.character+1}`,range:a1(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function a1(e,t){return H.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function o1(e,t){const n=l1(t);return n?Or(n,e.root):null}function Or(e,t){if(!t)return null;if(e.length===0)return t;const n=e.shift();if(t&&t.type==="object"){const r=t.properties.find(i=>i.keyNode.value===n);return r?Or(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),i=t.items[r];return i?Or(e,i):null}return null}function l1(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(u1)}function u1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c1(e){const t=e.promiseConstructor||Promise,n=new Qc(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Vr);const r=new Ic(n,e.contributions,t,e.clientCapabilities),i=new Fc(n,e.contributions,t),s=new jc(n),a=new Dc(n,t);return{configure:o=>{n.clearExternalSchemas(),o.schemas?.forEach(n.registerExternalSchema.bind(n)),a.configure(o)},resetSchema:o=>n.onResourceChange(o),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:o=>Cc(o,{collectComments:!0}),newJSONDocument:(o,u)=>Pc(o,u),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),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:Yc,getSelectionRanges:Kc,findDefinition:()=>Promise.resolve([]),findLinks:s1,format:(o,u,l)=>Dr(o,l,u),sort:(o,u)=>n1(o,u)}}let bo;typeof fetch<"u"&&(bo=function(e){return fetch(e).then(t=>t.text())});class f1{constructor(t,n){this._ctx=t,this._languageSettings=n.languageSettings,this._languageId=n.languageId,this._languageService=c1({workspaceContext:{resolveRelativePath:(r,i)=>{const s=i.substr(0,i.lastIndexOf("/")+1);return g1(s,r)}},schemaRequestService:n.enableSchemaRequest?bo:void 0,clientCapabilities:Er.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(t){let n=this._getTextDocument(t);if(n){let r=this._languageService.parseJSONDocument(n);return this._languageService.doValidation(n,r,this._languageSettings)}return Promise.resolve([])}async doComplete(t,n){let r=this._getTextDocument(t);if(!r)return null;let i=this._languageService.parseJSONDocument(r);return this._languageService.doComplete(r,n,i)}async doResolve(t){return this._languageService.doResolve(t)}async doHover(t,n){let r=this._getTextDocument(t);if(!r)return null;let i=this._languageService.parseJSONDocument(r);return this._languageService.doHover(r,n,i)}async format(t,n,r){let i=this._getTextDocument(t);if(!i)return[];let s=this._languageService.format(i,n,r);return Promise.resolve(s)}async resetSchema(t){return Promise.resolve(this._languageService.resetSchema(t))}async findDocumentSymbols(t){let n=this._getTextDocument(t);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.findDocumentSymbols2(n,r);return Promise.resolve(i)}async findDocumentColors(t){let n=this._getTextDocument(t);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.findDocumentColors(n,r);return Promise.resolve(i)}async getColorPresentations(t,n,r){let i=this._getTextDocument(t);if(!i)return[];let s=this._languageService.parseJSONDocument(i),a=this._languageService.getColorPresentations(i,s,n,r);return Promise.resolve(a)}async getFoldingRanges(t,n){let r=this._getTextDocument(t);if(!r)return[];let i=this._languageService.getFoldingRanges(r,n);return Promise.resolve(i)}async getSelectionRanges(t,n){let r=this._getTextDocument(t);if(!r)return[];let i=this._languageService.parseJSONDocument(r),s=this._languageService.getSelectionRanges(r,n,i);return Promise.resolve(s)}async parseJSONDocument(t){let n=this._getTextDocument(t);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return Promise.resolve(r)}async getMatchingSchemas(t){let n=this._getTextDocument(t);if(!n)return[];let r=this._languageService.parseJSONDocument(n);return Promise.resolve(this._languageService.getMatchingSchemas(n,r))}_getTextDocument(t){let n=this._ctx.getMirrorModels();for(let r of n)if(r.uri.toString()===t)return Me.create(t,this._languageId,r.version,r.getValue());return null}}const h1=47,$r=46;function d1(e){return e.charCodeAt(0)===h1}function g1(e,t){if(d1(t)){const n=Rt.parse(e),r=t.split("/");return n.with({path:wo(r)}).toString()}return m1(e,t)}function wo(e){const t=[];for(const r of e)r.length===0||r.length===1&&r.charCodeAt(0)===$r||(r.length===2&&r.charCodeAt(0)===$r&&r.charCodeAt(1)===$r?t.pop():t.push(r));e.length>1&&e[e.length-1].length===0&&t.push("");let n=t.join("/");return e[0].length===0&&(n="/"+n),n}function m1(e,...t){const n=Rt.parse(e),r=n.path.split("/");for(let i of t)r.push(...i.split("/"));return n.with({path:wo(r)}).toString()}self.onmessage=()=>{oc((e,t)=>new f1(e,t))}})();