!function(){"use strict";const e=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack){if(s.isErrorNoTelemetry(e))throw new s(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function t(t){(function(e){if(e instanceof i)return!0;return e instanceof Error&&e.name===r&&e.message===r})(t)||e.onUnexpectedError(t)}function n(e){if(e instanceof Error){const{name:t,message:r,cause:i}=e;return{$isError:!0,name:t,message:r,stack:e.stacktrace||e.stack,noTelemetry:s.isErrorNoTelemetry(e),cause:i?n(i):void 0,code:e.code}}return e}const r="Canceled";class i extends Error{constructor(){super(r),this.name=this.message}}class s extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof s)return e;const t=new s;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class o extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,o.prototype)}}function a(e,t="Unreachable"){throw new Error(t)}function l(e){e()||(e(),t(new o("Assertion Failed")))}function c(e,t){let n=0;for(;n1)throw new AggregateError(n,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}!function(e){function t(e){return!!e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function*r(e){yield e}e.empty=function(){return n},e.single=r,e.wrap=function(e){return t(e)?e:r(e)},e.from=function(e){return e||n},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let n=0;for(const r of e)if(t(r,n++))return!0;return!1},e.every=function(e,t){let n=0;for(const r of e)if(!t(r,n++))return!1;return!0},e.find=function(e,t){for(const n of e)if(t(n))return n},e.filter=function*(e,t){for(const n of e)t(n)&&(yield n)},e.map=function*(e,t){let n=0;for(const r of e)yield t(r,n++)},e.flatMap=function*(e,t){let n=0;for(const r of e)yield*t(r,n++)},e.concat=function*(...e){for(const t of e)h(t)?yield*t:yield t},e.reduce=function(e,t,n){let r=n;for(const i of e)r=t(r,i);return r},e.length=function(e){let t=0;for(const n of e)t++;return t},e.slice=function*(e,t,n=e.length){for(t<-e.length&&(t=0),t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);ti}]},e.asyncToArray=async function(e){const t=[];for await(const n of e)t.push(n);return t},e.asyncToArrayFlat=async function(e){let t=[];for await(const n of e)t=t.concat(n);return t}}(d||(d={}));class u{constructor(e){this._isDisposed=!1,this._fn=e}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 m(e){return new u(e)}class f{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(0!==this._toDispose.size)try{p(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===g.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed||this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}}class g{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new f,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}let b=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};class w{constructor(){this._first=b.Undefined,this._last=b.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===b.Undefined}clear(){let e=this._first;for(;e!==b.Undefined;){const t=e.next;e.prev=b.Undefined,e.next=b.Undefined,e=t}this._first=b.Undefined,this._last=b.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new b(e);if(this._first===b.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==b.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==b.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==b.Undefined&&e.next!==b.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===b.Undefined&&e.next===b.Undefined?(this._first=b.Undefined,this._last=b.Undefined):e.next===b.Undefined?(this._last=this._last.prev,this._last.next=b.Undefined):e.prev===b.Undefined&&(this._first=this._first.next,this._first.prev=b.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==b.Undefined;)yield e.element,e=e.next}}const v=globalThis.performance.now.bind(globalThis.performance);class y{static create(e){return new y(e)}constructor(e){this._now=!1===e?Date.now:v,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}var x;!function(e){function t(e){return(t,n=null,r)=>{let i,s=!1;return i=e(e=>{if(!s)return i?i.dispose():s=!0,t.call(n,e)},null,r),s&&i.dispose(),i}}function n(e,t,n){return i((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}function r(e,t,n){return i((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}function i(e,t){let n;const r=new R({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function s(e,t,n=100,r=!1,i=!1,s,o){let a,l,c,h,d=0;const p=new R({leakWarningThreshold:s,onWillAddFirstListener(){a=e(e=>{d++,l=t(l,e),r&&!c&&(p.fire(l),l=void 0),h=()=>{const e=l;l=void 0,c=void 0,(!r||d>1)&&p.fire(e),d=0},"number"==typeof n?(c&&clearTimeout(c),c=setTimeout(h,n)):void 0===c&&(c=null,queueMicrotask(h))})},onWillRemoveListener(){i&&d>0&&h?.()},onDidRemoveLastListener(){h=void 0,a.dispose()}});return o?.add(p),p.event}e.None=()=>g.None,e.defer=function(e,t){return s(e,()=>{},0,void 0,!0,void 0,t)},e.once=t,e.onceIf=function(t,n){return e.once(e.filter(t,n))},e.map=n,e.forEach=function(e,t,n){return i((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)},e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,r)=>{const i=function(...e){return m(()=>p(e))}(...e.map(e=>e(e=>t.call(n,e))));return function(e,t){t instanceof Array?t.push(e):t&&t.add(e);return e}(i,r)}},e.reduce=function(e,t,r,i){let s=r;return n(e,e=>(s=t(s,e),s),i)},e.debounce=s,e.accumulate=function(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)},e.latch=function(e,t=(e,t)=>e===t,n){let i,s=!0;return r(e,e=>{const n=s||!t(e,i);return s=!1,i=e,n},n)},e.split=function(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]},e.buffer=function(e,t=!1,n=[],r){let i=n.slice(),s=e(e=>{i?i.push(e):a.fire(e)});r&&r.add(s);const o=()=>{i?.forEach(e=>a.fire(e)),i=null},a=new R({onWillAddFirstListener(){s||(s=e(e=>a.fire(e)),r&&r.add(s))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return r&&r.add(a),a.event},e.chain=function(e,t){return(n,r,i)=>{const s=t(new a);return e(function(e){const t=s.evaluate(e);t!==o&&n.call(r,t)},void 0,i)}};const o=Symbol("HaltChainable");class a{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:o),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t,n=!0;return this.steps.push(r=>{const i=n||!e(r,t);return n=!1,t=r,i?r:o}),this}evaluate(e){for(const t of this.steps)if((e=t(e))===o)break;return e}}e.fromNodeEventEmitter=function(e,t,n=e=>e){const r=(...e)=>i.fire(n(...e)),i=new R({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event},e.fromDOMEventEmitter=function(e,t,n=e=>e){const r=(...e)=>i.fire(n(...e)),i=new R({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event},e.toPromise=function(e,n){let r;const i=new Promise((i,s)=>{const o=t(e)(i,null,n);r=()=>o.dispose()});return i.cancel=r,i},e.forward=function(e,t){return e(e=>t.fire(e))},e.runAndSubscribe=function(e,t,n){return t(n),e(e=>t(e))};class l{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const n={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new R(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new l(e,t).emitter.event},e.fromObservableLight=function(e){return(t,n,r)=>{let i=0,s=!1;const o={beginUpdate(){i++},endUpdate(){i--,0===i&&(e.reportChanges(),s&&(s=!1,t.call(n)))},handlePossibleChange(){},handleChange(){s=!0}};e.addObserver(o),e.reportChanges();const a={dispose(){e.removeObserver(o)}};return r instanceof f?r.add(a):Array.isArray(r)&&r.push(a),a}}}(x||(x={}));class S{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${S._idPool++}`,S.all.add(this)}start(e){this._stopWatch=new y,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}class C{static{this._idPool=1}constructor(e,t,n=(C._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,r]of this._stacks)(!e||t{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`,n=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],r=new E(`${e}. HINT: Stack shows most frequent listener (${n[1]}-times)`,n[0]);return(this._options?.onListenerError||t)(r),g.None}if(this._disposed)return g.None;n&&(e=e.bind(n));const i=new F(e);let s;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(i.stack=k.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof F?(this._deliveryQueue??=new N,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 o=m(()=>{s?.(),this._removeListener(i)});return r instanceof f?r.add(o):Array.isArray(r)&&r.push(o),o},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)throw new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const r=this._deliveryQueue.current===this;if(2*this._size<=t.length){let e=0;for(let n=0;n0}}class N{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function I(){return globalThis._VSCODE_NLS_LANGUAGE}const T="pseudo"===I()||"undefined"!=typeof document&&document.location&&"string"==typeof document.location.hash&&document.location.hash.indexOf("pseudo=true")>=0;function D(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,(e,n)=>{const r=n[0],i=t[r];let s=e;return"string"==typeof i?s=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(s=String(i)),s}),T&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function M(e,t,...n){return D("number"==typeof e?function(e,t){const n=globalThis._VSCODE_NLS_MESSAGES?.[e];if("string"!=typeof n){if("string"==typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}(e,t):t,n)}const A="en";let L,z,O,P=!1,W=!1,V=!1,$=A,U=A;const q=globalThis;let B;void 0!==q.vscode&&void 0!==q.vscode.process?B=q.vscode.process:"undefined"!=typeof process&&"string"==typeof process?.versions?.node&&(B=process);const K="string"==typeof B?.versions?.electron&&"renderer"===B?.type;if("object"==typeof B){P="win32"===B.platform,W="darwin"===B.platform,V="linux"===B.platform,V&&B.env.SNAP&&B.env.SNAP_REVISION,B.env.CI||B.env.BUILD_ARTIFACTSTAGINGDIRECTORY||B.env.GITHUB_WORKSPACE,L=A,$=A;const e=B.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);L=t.userLocale,U=t.osLocale,$=t.resolvedLanguage||A,z=t.languagePack?.translationsConfigFile}catch(yp){}}else"object"!=typeof navigator||K||(O=navigator.userAgent,P=O.indexOf("Windows")>=0,W=O.indexOf("Macintosh")>=0,(O.indexOf("Macintosh")>=0||O.indexOf("iPad")>=0||O.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,V=O.indexOf("Linux")>=0,O?.indexOf("Mobi"),$=I()||A,L=navigator.language.toLowerCase(),U=L);const j=P,H=W,G=O,J="function"==typeof q.postMessage&&!q.importScripts;(()=>{if(J){const e=[];q.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n{const r=++t;e.push({id:r,callback:n}),q.postMessage({vscodeScheduleAsyncWork:r},"*")}}})();const X=!!(G&&G.indexOf("Chrome")>=0);function Y(e){return e}G&&G.indexOf("Firefox"),!X&&G&&G.indexOf("Safari"),G&&G.indexOf("Edg/"),G&&G.indexOf("Android");class Q{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=Y):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}var Z;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Running=1]="Running",e[e.Completed=2]="Completed"}(Z||(Z={}));class ee{constructor(e){this.executor=e,this._state=Z.Uninitialized}get value(){if(this._state===Z.Uninitialized){this._state=Z.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=Z.Completed}}else if(this._state===Z.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 te(e){return e>=65&&e<=90}function ne(e){return 55296<=e&&e<=56319}function re(e,t,n){const r=e.charCodeAt(n);if(ne(r)&&n+1JSON.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 Q({getCacheKey:JSON.stringify},e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&Object.hasOwn(r,e));0===s.length&&(s=["_default"]);for(const a of s){i=n(i,t(r[a]))}const o=function(e,t){const n=new Map(e);for(const[r,i]of t)n.set(r,i);return n}(t(r._common),i);return new oe(o)})}static getInstance(e){return oe.cache.get(Array.from(e))}static{this._locales=new ee(()=>Object.keys(oe.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return oe._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class ae{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(ae.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return ae.getData().has(e)}static get codePoints(){return ae.getData()}}const le="default";class ce{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.method=r,this.args=i,this.type=0}}class he{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}}class de{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=r,this.arg=i,this.type=2}}class pe{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class ue{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class me{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,t,n){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new ce(this._workerId,r,e,t,n))})}listen(e,t,n){let r=null;const i=new R({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new de(this._workerId,r,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new ue(this._workerId,r)),r=null}});return i.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const n={get:(n,r)=>("string"!=typeof r||n[r]||(ge(r)?n[r]=t=>this.listen(e,r,t):fe(r)?n[r]=this.listen(e,r,void 0):36===r.charCodeAt(0)&&(n[r]=async(...n)=>(await(t?.()),this.sendMessage(e,r,n)))),n[r])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return;const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;if(e.err.$isError){const t=new Error;t.name=e.err.name,t.message=e.err.message,t.stack=e.err.stack,n=t}return void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(e=>{this._send(new he(this._workerId,t,e,void 0))},e=>{e.detail instanceof Error&&(e.detail=n(e.detail)),this._send(new he(this._workerId,t,void 0,n(e)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(e=>{this._send(new pe(this._workerId,t,e))});this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)&&this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)&&(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req))}_send(e){const t=[];if(0===e.type)for(let n=0;n{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this.requestHandler=t(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===le&&"$initialize"===t)return this.initialize(n[0]);const r=e===le?this.requestHandler:this._localChannels.get(e);if(!r)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));const i=r[t];if("function"!=typeof i)return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(i.apply(r,n))}catch(yp){return Promise.reject(yp)}}_handleEvent(e,t,n){const r=e===le?this.requestHandler:this._localChannels.get(e);if(!r)throw new Error(`Missing channel ${e} on worker thread`);if(ge(t)){const e=r[t];if("function"!=typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);const i=e.call(r,n);if("function"!=typeof i)throw new Error(`Missing dynamic event ${t} on request handler.`);return i}if(fe(t)){const e=r[t];if("function"!=typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e){this._protocol.setWorkerId(e)}}let we=!1;class ve{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function ye(e,t){return(t<<5)-t+e|0}function xe(e,t){t=ye(149417,t);for(let n=0,r=e.length;nnew Uint8Array(256));class Se{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ve(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(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),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 Fe{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[r,i,s]=Fe._getElements(e),[o,a,l]=Fe._getElements(t);this._hasStrings=s&&l,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(Fe._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,r=t.length;n=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){let i;return n<=r?(ke.Assert(e===t+1,"originalStart should only be one more than originalEnd"),i=[new ve(e,0,n,r-n+1)]):e<=t?(ke.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),i=[new ve(e,t-e+1,n,0)]):(ke.Assert(e===t+1,"originalStart should only be one more than originalEnd"),ke.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),i=[]),i}const s=[0],o=[0],a=this.ComputeRecursionPoint(e,t,n,r,s,o,i),l=s[0],c=o[0];if(null!==a)return a;if(!i[0]){const s=this.ComputeDiffRecursive(e,l,n,c,i);let o=[];return o=i[0]?[new ve(l+1,t-(l+1)+1,c+1,r-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,r,i),this.ConcatenateChanges(s,o)}return[new ve(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,i,s,o,a,l,c,h,d,p,u,m,f,g,b){let w=null,v=null,y=new Ee,x=t,S=n,C=p[0]-f[0]-r,k=-1073741824,_=this.m_forwardHistory.length-1;do{const t=C+e;t===x||t=0&&(e=(l=this.m_forwardHistory[_])[0],x=1,S=l.length-1)}while(--_>=-1);if(w=y.getReverseChanges(),b[0]){let e=p[0]+1,t=f[0]+1;if(null!==w&&w.length>0){const n=w[w.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}v=[new ve(e,d-e+1,t,m-t+1)]}else{y=new Ee,x=s,S=o,C=p[0]-f[0]-a,k=1073741824,_=g?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=C+i;e===x||e=c[e+1]?(u=(h=c[e+1]-1)-C-a,h>k&&y.MarkNextChange(),k=h+1,y.AddOriginalElement(h+1,u+1),C=e+1-i):(u=(h=c[e-1])-C-a,h>k&&y.MarkNextChange(),k=h,y.AddModifiedElement(h+1,u+1),C=e-1-i),_>=0&&(i=(c=this.m_reverseHistory[_])[0],x=1,S=c.length-1)}while(--_>=-1);v=y.getChanges()}return this.ConcatenateChanges(w,v)}ComputeRecursionPoint(e,t,n,r,i,s,o){let a=0,l=0,c=0,h=0,d=0,p=0;e--,n--,i[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const u=t-e+(r-n),m=u+1,f=new Int32Array(m),g=new Int32Array(m),b=r-n,w=t-e,v=e-n,y=t-r,x=(w-b)%2==0;f[b]=e,g[w]=t,o[0]=!1;for(let S=1;S<=u/2+1;S++){let u=0,C=0;c=this.ClipDiagonalBound(b-S,S,b,m),h=this.ClipDiagonalBound(b+S,S,b,m);for(let e=c;e<=h;e+=2){a=e===c||eu+C&&(u=a,C=l),!x&&Math.abs(e-w)<=S-1&&a>=g[e])return i[0]=a,s[0]=l,n<=g[e]&&S<=1448?this.WALKTRACE(b,c,h,v,w,d,p,y,f,g,a,t,i,l,r,s,x,o):null}const k=(u-e+(C-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(u,k))return o[0]=!0,i[0]=u,s[0]=C,k>0&&S<=1448?this.WALKTRACE(b,c,h,v,w,d,p,y,f,g,a,t,i,l,r,s,x,o):(e++,n++,[new ve(e,t-e+1,n,r-n+1)]);d=this.ClipDiagonalBound(w-S,S,w,m),p=this.ClipDiagonalBound(w+S,S,w,m);for(let m=d;m<=p;m+=2){a=m===d||m=g[m+1]?g[m+1]-1:g[m-1],l=a-(m-w)-y;const u=a;for(;a>e&&l>n&&this.ElementsAreEqual(a,l);)a--,l--;if(g[m]=a,x&&Math.abs(m-b)<=S&&a<=f[m])return i[0]=a,s[0]=l,u>=f[m]&&S<=1448?this.WALKTRACE(b,c,h,v,w,d,p,y,f,g,a,t,i,l,r,s,x,o):null}if(S<=1447){let e=new Int32Array(h-c+2);e[0]=b-c+1,_e.Copy2(f,c,e,1,h-c+1),this.m_forwardHistory.push(e),e=new Int32Array(p-d+2),e[0]=w-d+1,_e.Copy2(g,d,e,1,p-d+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,c,h,v,w,d,p,y,f,g,a,t,i,l,r,s,x,o)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let r=0,i=0;if(t>0){const n=e[t-1];r=n.originalStart+n.originalLength,i=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,c=n.modifiedStart-e;if(tl&&(l=h,a=e)}n.originalStart-=a,n.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&t>a&&(a=t,l=h,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const r=new Array(e.length+t.length-1);return _e.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],_e.Copy(t,1,r,e.length,t.length-1),r}{const n=new Array(e.length+t.length);return _e.Copy(e,0,n,0,e.length),_e.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(ke.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),ke.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let i=e.originalLength;const s=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(o=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new ve(r,i,s,o),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,r){if(e>=0&&en||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}isEmpty(){return e.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(t){return e.containsPosition(this,t)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(t){return e.containsRange(this,t)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(t){return e.strictContainsRange(this,t)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(t){return e.plusRange(this,t)}static plusRange(t,n){let r,i,s,o;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,o=t.endColumn),new e(r,i,s,o)}intersectRanges(t){return e.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,o=t.endColumn;const a=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,h=n.endColumn;return rc?(s=c,o=h):s===c&&(o=Math.min(o,h)),r>s||r===s&&i>o?null:new e(r,i,s,o)}equalsRange(t){return e.equalsRange(this,t)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return e.getEndPosition(this)}static getEndPosition(e){return new Re(e.endLineNumber,e.endColumn)}getStartPosition(){return e.getStartPosition(this)}static getStartPosition(e){return new Re(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return e.collapseToStart(this)}static collapseToStart(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return e.collapseToEnd(this)}static collapseToEnd(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new e(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(e){return!!e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function Ie(e){return e<0?0:e>255?255:0|e}function Te(e){return e<0?0:e>4294967295?4294967295:0|e}class De{constructor(e){const t=Ie(e);this._defaultValue=t,this._asciiMap=De._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=Ie(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Me{constructor(e,t,n){const r=new Uint8Array(e*t);for(let i=0,s=e*t;it&&(t=s),r>n&&(n=r),o>n&&(n=o)}t++,n++;const r=new Me(n,t,0);for(let i=0,s=e.length;i=this._maxCharCode?0:this._states.get(e,t)}}let Le=null;let ze=null;class Oe{static _createLink(e,t,n,r,i){let s=i-1;do{const n=t.charCodeAt(s);if(2!==e.get(n))break;s--}while(s>r);if(r>0){const e=t.charCodeAt(r-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:s+2},url:t.substring(r,s+1)}}static computeLinks(e,t=function(){return null===Le&&(Le=new Ae([[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]])),Le}()){const n=function(){if(null===ze){ze=new De(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|";for(let n=0;n=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}}const We=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Ve;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof $e||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:x.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:We})}(Ve||(Ve={}));class $e{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?We:(this._emitter||(this._emitter=new R),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Ue{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new $e),this._token}cancel(){this._token?this._token instanceof $e&&this._token.cancel():this._token=Ve.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof $e&&this._token.dispose():this._token=Ve.None}}class qe{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Be=new qe,Ke=new qe,je=new qe,He=new Array(230),Ge=Object.create(null),Je=Object.create(null);var Xe;!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[e,t,s,o,a,l,c,h,d]=i;if(r[t]||(r[t]=!0,Ge[s]=t,Je[s.toLowerCase()]=t),!n[o]){if(n[o]=!0,!a)throw new Error(`String representation missing for key code ${o} around scan code ${s}`);Be.define(o,a),Ke.define(o,h||a),je.define(o,d||h||a)}l&&(He[l]=o)}}(),function(e){e.toString=function(e){return Be.keyCodeToStr(e)},e.fromString=function(e){return Be.strToKeyCode(e)},e.toUserSettingsUS=function(e){return Ke.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return je.keyCodeToStr(e)},e.fromUserSettings=function(e){return Ke.strToKeyCode(e)||je.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Be.keyCodeToStr(e)}}(Xe||(Xe={}));var Ye={};let Qe;const Ze=globalThis.vscode;if(void 0!==Ze&&void 0!==Ze.process){const e=Ze.process;Qe={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else Qe="undefined"!=typeof process&&"string"==typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return Ye},cwd:()=>Ye.VSCODE_CWD||process.cwd()}:{get platform(){return j?"win32":H?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const et=Qe.cwd,tt=Qe.env,nt=Qe.platform,rt=46,it=47,st=92,ot=58;class at extends Error{constructor(e,t,n){let r;"string"==typeof t&&0===t.indexOf("not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be";const i=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${i} ${r} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function lt(e,t){if("string"!=typeof e)throw new at(t,"string",e)}const ct="win32"===nt;function ht(e){return e===it||e===st}function dt(e){return e===it}function pt(e){return e>=65&&e<=90||e>=97&&e<=122}function ut(e,t,n,r){let i="",s=0,o=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const e=i.lastIndexOf(n);-1===e?(i="",s=0):(i=i.slice(0,e),s=i.length-1-i.lastIndexOf(n)),o=c,a=0;continue}if(0!==i.length){i="",s=0,o=c,a=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,c)}`:i=e.slice(o+1,c),s=c-o-1;o=c,a=0}else l===rt&&-1!==a?++a:a=-1}return i}function mt(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new at(t,"Object",e)}(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${i=t.ext,i?`${"."===i[0]?"":"."}${i}`:""}`;var i;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ft={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],lt(s,`paths[${i}]`),0===s.length)continue}else 0===t.length?s=et():(s=tt[`=${t}`]||et(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===st)&&(s=`${t}\\`));const o=s.length;let a=0,l="",c=!1;const h=s.charCodeAt(0);if(1===o)ht(h)&&(a=1,c=!0);else if(ht(h))if(c=!0,ht(s.charCodeAt(1))){let e=2,t=e;for(;e2&&ht(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(r){if(t.length>0)break}else if(n=`${s.slice(a)}\\${n}`,r=c,c&&t.length>0)break}return n=ut(n,!r,"\\",ht),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){lt(e,"path");const t=e.length;if(0===t)return".";let n,r=0,i=!1;const s=e.charCodeAt(0);if(1===t)return dt(s)?"\\":e;if(ht(s))if(i=!0,ht(e.charCodeAt(1))){let i=2,s=i;for(;i2&&ht(e.charCodeAt(2))&&(i=!0,r=3));let o=r0&&ht(e.charCodeAt(t-1))&&(o+="\\"),!i&&void 0===n&&e.includes(":")){if(o.length>=2&&pt(o.charCodeAt(0))&&o.charCodeAt(1)===ot)return`.\\${o}`;let n=e.indexOf(":");do{if(n===t-1||ht(e.charCodeAt(n+1)))return`.\\${o}`}while(-1!==(n=e.indexOf(":",n+1)))}return void 0===n?i?`\\${o}`:o:i?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){lt(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return ht(n)||t>2&&pt(n)&&e.charCodeAt(1)===ot&&ht(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let s=0;s0&&(void 0===t?t=n=r:t+=`\\${r}`)}if(void 0===t)return".";let r=!0,i=0;if("string"==typeof n&&ht(n.charCodeAt(0))){++i;const e=n.length;e>1&&ht(n.charCodeAt(1))&&(++i,e>2&&(ht(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ft.normalize(t)},relative(e,t){if(lt(e,"from"),lt(t,"to"),e===t)return"";const n=ft.resolve(e),r=ft.resolve(t);if(n===r)return"";if((e=n.toLowerCase())===(t=r.toLowerCase()))return"";if(n.length!==e.length||r.length!==t.length){const e=n.split("\\"),t=r.split("\\");""===e[e.length-1]&&e.pop(),""===t[t.length-1]&&t.pop();const i=e.length,s=t.length,o=io?t.slice(a).join("\\"):i>o?"..\\".repeat(i-1-a)+"..":"":"..\\".repeat(i-a)+t.slice(a).join("\\")}let i=0;for(;ii&&e.charCodeAt(s-1)===st;)s--;const o=s-i;let a=0;for(;aa&&t.charCodeAt(l-1)===st;)l--;const c=l-a,h=oh){if(t.charCodeAt(a+p)===st)return r.slice(a+p+1);if(2===p)return r.slice(a+p)}o>h&&(e.charCodeAt(i+p)===st?d=p:2===p&&(d=3)),-1===d&&(d=0)}let u="";for(p=i+d+1;p<=s;++p)p!==s&&e.charCodeAt(p)!==st||(u+=0===u.length?"..":"\\..");return a+=d,u.length>0?`${u}${r.slice(a,l)}`:(r.charCodeAt(a)===st&&++a,r.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=ft.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===st){if(t.charCodeAt(1)===st){const e=t.charCodeAt(2);if(63!==e&&e!==rt)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(pt(t.charCodeAt(0))&&t.charCodeAt(1)===ot&&t.charCodeAt(2)===st)return`\\\\?\\${t}`;return t},dirname(e){lt(e,"path");const t=e.length;if(0===t)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(1===t)return ht(i)?e:".";if(ht(i)){if(n=r=1,ht(e.charCodeAt(1))){let i=2,s=i;for(;i2&&ht(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let a=t-1;a>=r;--a)if(ht(e.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&<(t,"suffix"),lt(e,"path");let n,r=0,i=-1,s=!0;if(e.length>=2&&pt(e.charCodeAt(0))&&e.charCodeAt(1)===ot&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=r;--n){const l=e.charCodeAt(n);if(ht(l)){if(!s){r=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(i=n):(o=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(ht(e.charCodeAt(n))){if(!s){r=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){lt(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===ot&&pt(e.charCodeAt(0))&&(t=r=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(ht(t)){if(!s){r=a+1;break}}else-1===i&&(s=!1,i=a+1),t===rt?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:mt.bind(null,"\\"),parse(e){lt(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(1===n)return ht(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(ht(i)){if(r=1,ht(e.charCodeAt(1))){let t=2,i=t;for(;t0&&(t.root=e.slice(0,r));let s=-1,o=r,a=-1,l=!0,c=e.length-1,h=0;for(;c>=r;--c)if(i=e.charCodeAt(c),ht(i)){if(!l){o=c+1;break}}else-1===a&&(l=!1,a=c+1),i===rt?-1===s?s=c:1!==h&&(h=1):-1!==s&&(h=-1);return-1!==a&&(-1===s||0===h||1===h&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==r?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},gt=(()=>{if(ct){const e=/\\/g;return()=>{const t=et().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>et()})(),bt={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=0&&!n;r--){const i=e[r];lt(i,`paths[${r}]`),0!==i.length&&(t=`${i}/${t}`,n=i.charCodeAt(0)===it)}if(!n){const e=gt();t=`${e}/${t}`,n=e.charCodeAt(0)===it}return t=ut(t,!n,"/",dt),n?`/${t}`:t.length>0?t:"."},normalize(e){if(lt(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===it,n=e.charCodeAt(e.length-1)===it;return 0===(e=ut(e,!t,"/",dt)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(lt(e,"path"),e.length>0&&e.charCodeAt(0)===it),join(...e){if(0===e.length)return".";const t=[];for(let n=0;n0&&t.push(r)}return 0===t.length?".":bt.normalize(t.join("/"))},relative(e,t){if(lt(e,"from"),lt(t,"to"),e===t)return"";if((e=bt.resolve(e))===(t=bt.resolve(t)))return"";const n=e.length,r=n-1,i=t.length-1,s=rs){if(t.charCodeAt(1+a)===it)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else r>s&&(e.charCodeAt(1+a)===it?o=a:0===a&&(o=0));let l="";for(a=1+o+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==it||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+o)}`},toNamespacedPath:e=>e,dirname(e){if(lt(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===it;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===it){if(!r){n=i;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&<(t,"suffix"),lt(e,"path");let n,r=0,i=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===it){if(!s){r=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(i=n):(o=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===it){if(!s){r=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){lt(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e[o];if("/"!==a)-1===r&&(i=!1,r=o+1),"."===a?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===s||1===s&&t===r-1&&t===n+1?"":e.slice(t,r)},format:mt.bind(null,"/"),parse(e){lt(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===it;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,l=e.length-1,c=0;for(;l>=r;--l){const t=e.charCodeAt(l);if(t!==it)-1===o&&(a=!1,o=l+1),t===rt?-1===i?i=l:1!==c&&(c=1):-1!==i&&(c=-1);else if(!a){s=l+1;break}}if(-1!==o){const r=0===s&&n?1:s;-1===i||0===c||1===c&&i===o-1&&i===s+1?t.base=t.name=e.slice(r,o):(t.name=e.slice(r,i),t.base=e.slice(r,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};bt.win32=ft.win32=ft,bt.posix=ft.posix=bt,ct?ft.normalize:bt.normalize,ct?ft.resolve:bt.resolve,ct?ft.relative:bt.relative,ct?ft.dirname:bt.dirname,ct?ft.basename:bt.basename,ct?ft.extname:bt.extname,ct?ft.sep:bt.sep;const wt=/^\w[\w\d+.-]*$/,vt=/^\//,yt=/^\/\//;const xt="",St="/",Ct=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let kt=class e{static isUri(t){return t instanceof e||!(!t||"object"!=typeof t)&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString)}constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||xt,this.authority=e.authority||xt,this.path=e.path||xt,this.query=e.query||xt,this.fragment=e.fragment||xt):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||xt,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==St&&(t=St+t):t=St}return t}(this.scheme,n||xt),this.query=r||xt,this.fragment=i||xt,function(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&&!wt.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!vt.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(yt.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 ("//")')}(this,s))}get fsPath(){return It(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=xt),void 0===n?n=this.authority:null===n&&(n=xt),void 0===r?r=this.path:null===r&&(r=xt),void 0===i?i=this.query:null===i&&(i=xt),void 0===s?s=this.fragment:null===s&&(s=xt),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new Et(t,n,r,i,s)}static parse(e,t=!1){const n=Ct.exec(e);return n?new Et(n[2]||xt,At(n[4]||xt),At(n[5]||xt),At(n[7]||xt),At(n[9]||xt),t):new Et(xt,xt,xt,xt,xt)}static file(e){let t=xt;if(j&&(e=e.replace(/\\/g,St)),e[0]===St&&e[1]===St){const n=e.indexOf(St,2);-1===n?(t=e.substring(2),e=St):(t=e.substring(2,n),e=e.substring(n)||St)}return new Et("file",t,e,xt,xt)}static from(e,t){return new Et(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return r=j&&"file"===t.scheme?e.file(ft.join(It(t,!0),...n)).path:bt.join(t.path,...n),t.with({path:r})}toString(e=!1){return Tt(this,e)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{const e=new Et(t);return e._formatted=t.external??null,e._fsPath=t._sep===_t?t.fsPath??null:null,e}}return t}};const _t=j?1:void 0;class Et extends kt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=It(this,!1)),this._fsPath}toString(e=!1){return e?Tt(this,!0):(this._formatted||(this._formatted=Tt(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=_t),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const Ft={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 Rt(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=Ft[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function Nt(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,j&&(n=n.replace(/\//g,"\\")),n}function Tt(e,t){const n=t?Nt:Rt;let r="",{scheme:i,authority:s,path:o,query:a,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=St,r+=St),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),l&&(r+="#",r+=t?l:Rt(l,!1,!1)),r}function Dt(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Dt(e.substr(3)):e}}const Mt=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function At(e){return e.match(Mt)?e.replace(Mt,e=>Dt(e)):e}class Lt extends Ne{constructor(e,t,n,r){super(e,t,n,r),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Lt.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new Lt(this.startLineNumber,this.startColumn,e,t):new Lt(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Re(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Re(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new Lt(e,t,this.endLineNumber,this.endColumn):new Lt(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Lt(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new Lt(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Lt(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Lt(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new Wt(this,e,t);return this._factories.set(e,n),m(()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,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}},function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(en||(en={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(tn||(tn={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(nn||(nn={})),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"}(rn||(rn={})),function(e){e[e.Deprecated=1]="Deprecated"}(sn||(sn={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(on||(on={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(an||(an={})),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"}(ln||(ln={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(cn||(cn={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(hn||(hn={})),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"}(dn||(dn={})),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"}(pn||(pn={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(un||(un={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(mn||(mn={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(fn||(fn={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(gn||(gn={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(bn||(bn={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(wn||(wn={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(vn||(vn={})),function(e){e[e.Accepted=0]="Accepted",e[e.Rejected=1]="Rejected",e[e.Ignored=2]="Ignored"}(yn||(yn={})),function(e){e[e.Code=1]="Code",e[e.Label=2]="Label"}(xn||(xn={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(Sn||(Sn={})),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"}(Cn||(Cn={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(kn||(kn={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(_n||(_n={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(En||(En={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(Fn||(Fn={})),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"}(Rn||(Rn={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(Nn||(Nn={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(In||(In={})),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"}(Tn||(Tn={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(Dn||(Dn={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(Mn||(Mn={})),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"}(An||(An={})),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"}(Ln||(Ln={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(zn||(zn={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(On||(On={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(Pn||(Pn={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(Wn||(Wn={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(Vn||(Vn={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}($n||($n={})),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"}(Un||(Un={})),function(e){e[e.Deprecated=1]="Deprecated"}(qn||(qn={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(Bn||(Bn={})),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"}(Kn||(Kn={})),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"}(jn||(jn={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(Hn||(Hn={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(Gn||(Gn={}));class er{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return function(e,t){return(e|(65535&t)<<16>>>0)>>>0}(e,t)}}class tr{constructor(){this[Jn]="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(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,0!==n&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:case 2:default:this.addItemLast(r);break;case 1:this.addItemFirst(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}[(Jn=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class nr extends tr{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class rr{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}}function ir(e,t,n,r,i){return function(e,t,n,r,i){if(0===r)return!0;const s=t.charCodeAt(r-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(i>0){const n=t.charCodeAt(r);if(0!==e.get(n))return!0}return!1}(e,t,0,r,i)&&function(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(i>0){const n=t.charCodeAt(r+i-1);if(0!==e.get(n))return!0}return!1}(e,t,n,r,i)}new class extends nr{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}(10),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(Xn||(Xn={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(Yn||(Yn={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(Qn||(Qn={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(Zn||(Zn={}));class sr{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const r=n.index,i=n[0].length;if(r===this._prevMatchStartIndex&&i===this._prevMatchLength){if(0===i){re(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=i,!this._wordSeparators||ir(this._wordSeparators,e,t,r,i))return n}while(n);return null}}const or=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?")e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}();function ar(e){let t=or;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 lr=new w;function cr(e,t,n,r,i){if(t=ar(t),i||(i=d.first(lr)),n.length>i.maxLen){let s=e-i.maxLen/2;return s<0?s=0:r+=s,cr(e,t,n=n.substring(s,e+i.maxLen/2),r,i)}const s=Date.now(),o=e-1-r;let a=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){const e=o-i.windowSize*c;t.lastIndex=Math.max(0,e);const r=hr(t,n,o,a);if(!r&&l)break;if(l=r,e<=0)break;a=e}if(l){const e={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function hr(e,t,n,r){let i;for(;i=e.exec(t);){const t=i.index||0;if(t<=n&&e.lastIndex>=n)return i;if(r>0&&t>r)return null}return null}lr.unshift({maxLen:1e3,windowSize:15,timeBudget:150});class dr{static computeUnicodeHighlights(e,t,n){const r=n?n.startLineNumber:1,i=n?n.endLineNumber:e.getLineCount(),s=new pr(t),o=s.getCandidateCodePoints();let l;var c,h;l="allNonBasicAscii"===o?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(""+(c=Array.from(o),`[${h=c.map(e=>String.fromCodePoint(e)).join(""),h.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}]`),"g");const d=new sr(null,l),p=[];let u,m=!1,f=0,g=0,b=0;e:for(let w=r,v=i;w<=v;w++){const t=e.getLineContent(w),n=t.length;d.reset(0);do{if(u=d.next(t),u){let e=u.index,r=u.index+u[0].length;if(e>0){ne(t.charCodeAt(e-1))&&e--}if(r+1=t){m=!0;break e}p.push(new Ne(w,e+1,w,r+1))}}}while(u)}return{ranges:p,hasMore:m,ambiguousCharacterCount:f,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,t){const n=new pr(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),i=n.ambiguousCharacters.getPrimaryConfusable(r),s=oe.getLocales().filter(e=>!oe.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(i),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class pr{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=oe.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of ae.codePoints)ur(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,i=!1;if(t)for(const s of t){const e=s.codePointAt(0),t=se(s);r=r||t,t||this.ambiguousCharacters.isAmbiguous(e)||ae.isInvisibleCharacter(e)||(i=!0)}return!r&&i?0:this.options.invisibleCharacters&&!ur(e)&&ae.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function ur(e){return" "===e||"\n"===e||"\t"===e}class mr{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class fr{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}var gr;function br(e,t){return(n,r)=>t(e(n),e(r))}!function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(gr||(gr={}));const wr=(e,t)=>e-t;class vr{static{this.empty=new vr(e=>{})}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new vr(t=>this.iterate(n=>!e(n)||t(n)))}map(e){return new vr(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||gr.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}}class yr{static fromTo(e,t){return new yr(e,t)}static addRange(e,t){let n=0;for(;nt))return new yr(e,t)}static ofLength(e){return new yr(0,e)}static ofStartAndLength(e,t){return new yr(e,e+t)}static emptyAt(e){return new yr(e,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new o(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new yr(this.start+e,this.endExclusive+e)}deltaStart(e){return new yr(this.start+e,this.endExclusive)}deltaEnd(e){return new yr(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new o(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new o(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.startLineNumber,wr)}static joinMany(e){if(0===e.length)return[];let t=new Er(e[0].slice());for(let n=1;nt)throw new o(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber),n=Sr(this._normalizedRanges,t=>t.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const r=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,r)}}contains(e){const t=xr(this._normalizedRanges,t=>t.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=xr(this._normalizedRanges,t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,r=0,i=null;for(;n=s.startLineNumber?i=new _r(i.startLineNumber,Math.max(i.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(i),i=s)}return null!==i&&t.push(i),new Er(t)}subtractFrom(e){const t=Cr(this._normalizedRanges,t=>t.endLineNumberExclusive>=e.startLineNumber),n=Sr(this._normalizedRanges,t=>t.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new Er([e]);const r=[];let i=e.startLineNumber;for(let s=t;si&&r.push(new _r(i,e.startLineNumber)),i=e.endLineNumberExclusive}return ie.toString()).join(", ")}getIntersection(e){const t=[];let n=0,r=0;for(;nt.delta(e)))}}class Fr{static{this.zero=new Fr(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new Fr(0,t.column-e.column):new Fr(t.lineNumber-e.lineNumber,t.column-1)}static fromPosition(e){return new Fr(e.lineNumber-1,e.column-1)}static ofRange(e){return Fr.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const r of e)"\n"===r?(t++,n=0):n++;return new Fr(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return 0===e.lineCount?new Fr(this.lineCount,this.columnCount+e.columnCount):new Fr(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return 0===this.lineCount?new Ne(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new Ne(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new Ne(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return _r.ofLength(1,this.lineCount+1)}addToPosition(e){return 0===this.lineCount?new Re(e.lineNumber,e.column+this.columnCount):new Re(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}class Rr{getOffsetRange(e){return new yr(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return Ne.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Nr.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Nr.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const t=e.replacements.map(e=>this.getTextReplacement(e));return new Nr.deps.TextEdit(t)}}class Nr{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}}class Ir extends Rr{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t0&&"\r"===e.charAt(t-1)?this.lineEndOffsetByLineIdx.push(t-1):this.lineEndOffsetByLineIdx.push(t));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const t=this._validatePosition(e);return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}_validatePosition(e){if(e.lineNumber<1)return new Re(1,1);const t=this.textLength.lineCount+1;if(e.lineNumber>t){const e=this.getLineLength(t);return new Re(t,e+1)}if(e.column<1)return new Re(e.lineNumber,1);const n=this.getLineLength(e.lineNumber);return e.column-1>n?new Re(e.lineNumber,n+1):e}getPosition(e){const t=Sr(this.lineStartOffsetByLineIdx,t=>t<=e),n=t+1,r=e-this.lineStartOffsetByLineIdx[t]+1;return new Re(n,r)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Nr.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Tr{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new Re(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new Ne(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Ir(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new Ne(e,1,e,Number.MAX_SAFE_INTEGER))}}class Dr extends Tr{constructor(e,t){!function(e,t="unexpected state"){if(!e)throw"string"==typeof t?new o(`Assertion Failed: ${t}`):t}(t>=1),super(),this._getLineContent=e,this._lineCount=t}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let n=e.startLineNumber+1;ne[t-1],e.length)}}class Ar{static joinReplacements(e,t){if(0===e.length)throw new o;if(1===e.length)return e[0];const n=e[0].range.getStartPosition(),r=e[e.length-1].range.getEndPosition();let i="";for(let s=0;s ${t.lineNumber},${t.column}): "${this.text}"`}}class Lr{static inverse(e,t,n){const r=[];let i=1,s=1;for(const a of e){const e=new Lr(new _r(i,a.original.startLineNumber),new _r(s,a.modified.startLineNumber));e.modified.isEmpty||r.push(e),i=a.original.endLineNumberExclusive,s=a.modified.endLineNumberExclusive}const o=new Lr(new _r(i,t+1),new _r(s,n+1));return o.modified.isEmpty||r.push(o),r}static clip(e,t,n){const r=[];for(const i of e){const e=i.original.intersect(t),s=i.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&r.push(new Lr(e,s))}return r}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Lr(this.modified,this.original)}join(e){return new Lr(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new Wr(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new o("not a valid diff");return new Wr(new Ne(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Ne(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new Wr(new Ne(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new Ne(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(Or(this.original.endLineNumberExclusive,e)&&Or(this.modified.endLineNumberExclusive,t))return new Wr(new Ne(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Ne(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Wr(Ne.fromPositions(new Re(this.original.startLineNumber,1),zr(new Re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),Ne.fromPositions(new Re(this.modified.startLineNumber,1),zr(new Re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Wr(Ne.fromPositions(zr(new Re(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),zr(new Re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),Ne.fromPositions(zr(new Re(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),zr(new Re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new o}}function zr(e,t){if(e.lineNumber<1)return new Re(1,1);if(e.lineNumber>t.length)return new Re(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new Re(e.lineNumber,n.length+1):e}function Or(e,t){return e>=1&&e<=t.length}class Pr extends Lr{static fromRangeMappings(e){const t=_r.join(e.map(e=>_r.fromRangeInclusive(e.originalRange))),n=_r.join(e.map(e=>_r.fromRangeInclusive(e.modifiedRange)));return new Pr(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new Pr(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Pr(this.original,this.modified,[this.toRangeMapping()])}}class Wr{static fromEdit(e){const t=e.getNewRanges();return e.replacements.map((e,n)=>new Wr(e.range,t[n]))}static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new Wr(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new Ar(this.originalRange,t)}}function Vr(e,t,n,r=!1){const i=[];for(const s of function*(e,t){let n,r;for(const i of e)void 0!==r&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}(e.map(e=>function(e,t,n){let r=0,i=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+r<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+r<=e.modifiedRange.endLineNumber&&(i=-1);e.modifiedRange.startColumn-1>=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 _r(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new _r(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new Pr(s,o,[e])}(e,t,n)),(e,t)=>e.original.intersectsOrTouches(t.original)||e.modified.intersectsOrTouches(t.modified))){const e=s[0],t=s[s.length-1];i.push(new Pr(e.original.join(t.original),e.modified.join(t.modified),s.map(e=>e.innerChanges[0])))}return l(()=>{if(!r&&i.length>0){if(i[0].modified.startLineNumber!==i[0].original.startLineNumber)return!1;if(n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==t.length.lineCount-i[i.length-1].original.endLineNumberExclusive)return!1}return c(i,(e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusivenew Wr(new Ne(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new Ne(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn))));s&&(s.modified.endLineNumberExclusive!==n.modified.startLineNumber&&s.original.endLineNumberExclusive!==n.original.startLineNumber||(n=new Pr(s.original.join(n.original),s.modified.join(n.modified),s.innerChanges&&n.innerChanges?s.innerChanges.concat(n.innerChanges):void 0),i.pop())),i.push(n),s=n}return l(()=>c(i,(e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class Kr{constructor(e,t,n,r,i,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=r,this.modifiedStartLineNumber=i,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const r=t.getStartLineNumber(e.originalStart),i=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new Kr(r,i,s,o,a,l,c,h)}}class jr{constructor(e,t,n,r,i){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=r,this.charChanges=i}static createFromDiffResult(e,t,n,r,i,s,o){let a,l,c,h,d;if(0===t.originalLength?(a=n.getStartLineNumber(t.originalStart)-1,l=0):(a=n.getStartLineNumber(t.originalStart),l=n.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=r.getStartLineNumber(t.modifiedStart)-1,h=0):(c=r.getStartLineNumber(t.modifiedStart),h=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&i()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=r.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=Ur(s,a,i,!0).changes;o&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r1&&o>1;){if(e.charCodeAt(n-2)!==t.charCodeAt(o-2))break;n--,o--}(n>1||o>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,n,s+1,1,o)}{let n=Jr(e,1),o=Jr(t,1);const a=e.length+1,l=t.length+1;for(;n=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}(e);return-1===n?t:n+2}function Xr(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t{n.push(Qr.fromOffsetPairs(e?e.getEndExclusives():Zr.zero,r?r.getStarts():new Zr(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new Qr(new yr(e.offset1,t.offset1),new yr(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new o("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new Qr(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Qr(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new Qr(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new Qr(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new Qr(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new Qr(t,n)}getStarts(){return new Zr(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Zr(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Zr{static{this.zero=new Zr(0,0)}static{this.max=new Zr(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new Zr(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class ei{static{this.instance=new ei}isValid(){return!0}}class ti{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new o("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&a>0&&3===s.get(u-1,a-1)&&(h+=o.get(u-1,a-1)),h+=r?r(u,a):1):h=-1;const d=Math.max(l,c,h);if(d===h){const e=u>0&&a>0?o.get(u-1,a-1):0;o.set(u,a,e+1),s.set(u,a,3)}else d===l?(o.set(u,a,0),s.set(u,a,1)):d===c&&(o.set(u,a,0),s.set(u,a,2));i.set(u,a,d)}const a=[];let l=e.length,c=t.length;function h(e,t){e+1===l&&t+1===c||a.push(new Qr(new yr(e+1,l),new yr(t+1,c))),l=e,c=t}let d=e.length-1,p=t.length-1;for(;d>=0&&p>=0;)3===s.get(d,p)?(h(d,p),d--,p--):1===s.get(d,p)?d--:p--;return h(-1,-1),a.reverse(),new Yr(a,!1)}}class oi{compute(e,t,n=ei.instance){if(0===e.length||0===t.length)return Yr.trivial(e,t);const r=e,i=t;function s(e,t){for(;er.length||d>i.length)continue;const p=s(h,d);a.set(c,p);const u=h===n?l.get(c+1):l.get(c-1);if(l.set(c,p!==h?new ai(u,h,d,p-h):u),a.get(c)===r.length&&a.get(c)-c===i.length)break e}}let h=l.get(c);const d=[];let p=r.length,u=i.length;for(;;){const e=h?h.x+h.length:0,t=h?h.y+h.length:0;if(e===p&&t===u||d.push(new Qr(new yr(e,p),new yr(t,u))),!h)break;p=h.x,u=h.y,h=h.prev}return d.reverse(),new Yr(d,!1)}}class ai{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}}class li{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class ci{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class hi{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let t=e[r-1],i=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(i=this.range.startColumn-1,t=t.substring(i)),this.lineStartOffsets.push(i);let s=0;if(!n){const e=t.trimStart();s=t.length-e.length,t=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-i-s,t.length):t.length;for(let e=0;eString.fromCharCode(e)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=fi(e>0?this.elements[e-1]:-1),n=fi(et<=e),r=e-this.firstElementOffsetByLineIdx[n];return new Re(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(0===r&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?Ne.fromPositions(n,n):Ne.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!di(this.elements[e]))return;let t=e;for(;t>0&&di(this.elements[t-1]);)t--;let n=e;for(;n=this.elements.length)return;if(!di(this.elements[e]))return;let t=e;for(;t>0&&di(this.elements[t-1])&&!pi(this.elements[t]);)t--;let n=e;for(;nt<=e.start)??0,n=function(e,t){const n=Cr(e,t);return n===e.length?void 0:e[n]}(this.firstElementOffsetByLineIdx,t=>e.endExclusive<=t)??this.elements.length;return new yr(t,n)}}function di(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function pi(e){return e>=65&&e<=90}const ui={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function mi(e){return ui[e]}function fi(e){return 10===e?8:13===e?7:ri(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function gi(e,t,n,r,i,s){let{moves:o,excludedChanges:a}=function(e,t,n,r){const i=[],s=e.filter(e=>e.modified.isEmpty&&e.original.length>=3).map(e=>new ii(e.original,t,e)),o=new Set(e.filter(e=>e.original.isEmpty&&e.modified.length>=3).map(e=>new ii(e.modified,n,e))),a=new Set;for(const l of s){let e,t=-1;for(const n of o){const r=l.computeSimilarity(n);r>t&&(t=r,e=n)}if(t>.9&&e&&(o.delete(e),i.push(new Lr(l.range,e.range)),a.add(l.source),a.add(e.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}(e,t,n,s);if(!s.isValid())return[];const l=function(e,t,n,r,i,s){const o=[],a=new rr;for(const u of e)for(let e=u.original.startLineNumber;ee.modified.startLineNumber,wr));for(const u of e){let e=[];for(let t=u.modified.startLineNumber;t{for(const r of e)if(r.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&r.modifiedLineRange.endLineNumberExclusive+1===i.endLineNumberExclusive)return r.originalLineRange=new _r(r.originalLineRange.startLineNumber,t.endLineNumberExclusive),r.modifiedLineRange=new _r(r.modifiedLineRange.startLineNumber,i.endLineNumberExclusive),void s.push(r);const n={modifiedLineRange:i,originalLineRange:t};l.push(n),s.push(n)}),e=s}if(!s.isValid())return[]}l.sort((c=br(e=>e.modifiedLineRange.length,wr),(e,t)=>-c(e,t)));var c;const h=new Er,d=new Er;for(const u of l){const e=u.modifiedLineRange.startLineNumber-u.originalLineRange.startLineNumber,t=h.subtractFrom(u.modifiedLineRange),n=d.subtractFrom(u.originalLineRange).getWithDelta(e),r=t.getIntersection(n);for(const i of r.ranges){if(i.length<3)continue;const t=i,n=i.delta(-e);o.push(new Lr(n,t)),h.addRange(t),d.addRange(n)}}o.sort(br(e=>e.original.startLineNumber,wr));const p=new kr(e);for(let u=0;ue.original.startLineNumber<=t.original.startLineNumber),a=xr(e,e=>e.modified.startLineNumber<=t.modified.startLineNumber),l=Math.max(t.original.startLineNumber-n.original.startLineNumber,t.modified.startLineNumber-a.modified.startLineNumber),c=p.findLastMonotonous(e=>e.original.startLineNumbere.modified.startLineNumberr.length||n>i.length)break;if(h.contains(n)||d.contains(e))break;if(!bi(r[e-1],i[n-1],s))break}for(g>0&&(d.addRange(new _r(t.original.startLineNumber-g,t.original.startLineNumber)),h.addRange(new _r(t.modified.startLineNumber-g,t.modified.startLineNumber))),b=0;br.length||n>i.length)break;if(h.contains(n)||d.contains(e))break;if(!bi(r[e-1],i[n-1],s))break}b>0&&(d.addRange(new _r(t.original.endLineNumberExclusive,t.original.endLineNumberExclusive+b)),h.addRange(new _r(t.modified.endLineNumberExclusive,t.modified.endLineNumberExclusive+b))),(g>0||b>0)&&(o[u]=new Lr(new _r(t.original.startLineNumber-g,t.original.endLineNumberExclusive+b),new _r(t.modified.startLineNumber-g,t.modified.endLineNumberExclusive+b)))}return o}(e.filter(e=>!a.has(e)),r,i,t,n,s);return function(e,t){for(const n of t)e.push(n)}(o,l),o=function(e){if(0===e.length)return e;e.sort(br(e=>e.original.startLineNumber,wr));const t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2?t[t.length-1]=r.join(i):t.push(i)}return t}(o),o=o.filter(e=>{const n=e.original.toOffsetRange().slice(t).map(e=>e.trim());return n.join("\n").length>=15&&function(e,t){let n=0;for(const r of e)t(r)&&n++;return n}(n,e=>e.length>=2)>=2}),o=function(e,t){const n=new kr(e);return t=t.filter(t=>(n.findLastMonotonous(e=>e.original.startLineNumbere.modified.startLineNumber300&&t.length>300)return!1;const r=(new oi).compute(new hi([e],new Ne(1,1,1,e.length),!1),new hi([t],new Ne(1,1,1,t.length),!1),n);let i=0;const s=Qr.invert(r.diffs,e.length);for(const a of s)a.seq1Range.forEach(t=>{ri(e.charCodeAt(t))||i++});const o=function(t){let n=0;for(let r=0;rt.length?e:t);return i/o>.6&&o>10}function wi(e,t,n){let r=n;return r=vi(e,t,r),r=vi(e,t,r),r=function(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+10&&(o=o.delta(a))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function yi(e,t,n,r,i){let s=1;for(;e.seq1Range.start-s>=r.start&&e.seq2Range.start-s>=i.start&&n.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let o=0;for(;e.seq1Range.start+ol&&(l=o,a=c)}return e.delta(a)}function xi(e,t,n,r,i=!1){const s=Qr.invert(n,e.length),o=[];let a=new Zr(0,0);function l(n,l){if(n.offset10;){const n=s[0];if(!(n.seq1Range.intersects(d.seq1Range)||n.seq2Range.intersects(d.seq2Range)))break;const i=r(e,n.seq1Range.start),o=r(t,n.seq2Range.start),a=new Qr(i,o),l=a.intersect(n);if(u+=l.seq1Range.length,m+=l.seq2Range.length,d=d.join(a),!(d.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;s.shift()}(i&&u+m0;){const e=s.shift();e.seq1Range.isEmpty||(l(e.getStarts(),e),l(e.getEndExclusives().delta(-1),e))}return function(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;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}(n,o)}class Si{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:Ci(this.lines[e-1]))+(e===this.lines.length?0:Ci(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Ci(e){let t=0;for(;te===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let r=0,i=e.length;re===t))return new mr([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new mr([new Pr(new _r(1,e.length+1),new _r(1,t.length+1),[new Wr(new Ne(1,1,e.length,e[e.length-1].length+1),new Ne(1,1,t.length,t[t.length-1].length+1))])],[],!1);const r=0===n.maxComputationTimeMs?ei.instance:new ti(n.maxComputationTimeMs),i=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map(e=>o(e.trim())),c=t.map(e=>o(e.trim())),h=new Si(a,e),d=new Si(c,t),p=(()=>h.length+d.length<1700?this.dynamicProgrammingDiffing.compute(h,d,r,(n,r)=>e[n]===t[r]?0===t[r].length?.1:1+Math.log(1+t[r].length):.99):this.myersDiffingAlgorithm.compute(h,d,r))();let u=p.diffs,m=p.hitTimeout;u=wi(h,d,u),u=function(e,t,n){let r=n;if(0===r.length)return r;let i,s=0;do{i=!1;const o=[r[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}h(c,l)?(i=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}r=o}while(s++<10&&i);return r}(h,0,u);const f=[],g=s=>{if(i)for(let o=0;oC.seq1Range.start-b===C.seq2Range.start-w);g(C.seq1Range.start-b),b=C.seq1Range.endExclusive,w=C.seq2Range.endExclusive;const s=this.refineDiff(e,t,C,r,i,n);s.hitTimeout&&(m=!0);for(const e of s.mappings)f.push(e)}g(e.length-b);const v=new Mr(e),y=new Mr(t),x=Vr(f,v,y);let S=[];return n.computeMoves&&(S=this.computeMoves(x,e,t,a,c,r,i,n)),l(()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function r(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const i of x){if(!i.innerChanges)return!1;for(const r of i.innerChanges){if(!(n(r.modifiedRange.getStartPosition(),t)&&n(r.modifiedRange.getEndPosition(),t)&&n(r.originalRange.getStartPosition(),e)&&n(r.originalRange.getEndPosition(),e)))return!1}if(!r(i.modified,t)||!r(i.original,e))return!1}return!0}),new mr(x,S,m)}computeMoves(e,t,n,r,i,s,o,a){return gi(e,t,n,r,i,s).map(e=>{const r=Vr(this.refineDiff(t,n,new Qr(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o,a).mappings,new Mr(t),new Mr(n),!0);return new fr(e,r)})}refineDiff(e,t,n,r,i,s){var o;const a=new Lr(new _r((o=n).seq1Range.start+1,o.seq1Range.endExclusive+1),new _r(o.seq2Range.start+1,o.seq2Range.endExclusive+1)).toRangeMapping2(e,t),l=new hi(e,a.originalRange,i),c=new hi(t,a.modifiedRange,i),h=l.length+c.length<500?this.dynamicProgrammingDiffing.compute(l,c,r):this.myersDiffingAlgorithm.compute(l,c,r);let d=h.diffs;d=wi(l,c,d),d=xi(l,c,d,(e,t)=>e.findWordContaining(t)),s.extendToSubwords&&(d=xi(l,c,d,(e,t)=>e.findSubWordContaining(t),!0)),d=function(e,t,n){const r=[];for(const i of n){const e=r[r.length-1];e&&(i.seq1Range.start-e.seq1Range.endExclusive<=2||i.seq2Range.start-e.seq2Range.endExclusive<=2)?r[r.length-1]=new Qr(e.seq1Range.join(i.seq1Range),e.seq2Range.join(i.seq2Range)):r.push(i)}return r}(0,0,d),d=function(e,t,n){let r=n;if(0===r.length)return r;let i,s=0;do{i=!1;const a=[r[0]];for(let l=1;l5||i.length>500)return!1;const s=e.getText(i).trim();if(s.length>20||s.split(/\r\n|\r|\n/).length>1)return!1;const o=e.countLinesIn(n.seq1Range),a=n.seq1Range.length,l=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,p=e.countLinesIn(r.seq1Range),u=r.seq1Range.length,m=t.countLinesIn(r.seq2Range),f=r.seq2Range.length;function g(e){return Math.min(e,130)}return Math.pow(Math.pow(g(40*o+a),1.5)+Math.pow(g(40*l+d),1.5),1.5)+Math.pow(Math.pow(g(40*p+u),1.5)+Math.pow(g(40*m+f),1.5),1.5)>74184.96480721243}d(h,c)?(i=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}r=a}while(s++<10&&i);const o=[];return function(e,t){for(let n=0;n{let i=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new yr(a.start,n.seq1Range.start));s(l)&&(i=i.deltaStart(-l.length));const c=e.getText(new yr(n.seq1Range.endExclusive,a.endExclusive));s(c)&&(i=i.deltaEnd(c.length));const h=Qr.fromOffsetPairs(t?t.getEndExclusives():Zr.zero,r?r.getStarts():Zr.max),d=i.intersect(h);o.length>0&&d.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(d):o.push(d)}),o}(l,c,d);return{mappings:d.map(e=>new Wr(l.translateRange(e.seq1Range),c.translateRange(e.seq2Range))),hitTimeout:h.hitTimeout}}}const _i=()=>new $r,Ei=()=>new ki;function Fi(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class Ri{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=Fi(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class Ni{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=Fi(Math.max(Math.min(1,t),0),3),this.l=Fi(Math.max(Math.min(1,n),0),3),this.a=Fi(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=e.a,s=Math.max(t,n,r),o=Math.min(t,n,r);let a=0,l=0;const c=(o+s)/2,h=s-o;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case t:a=(n-r)/h+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:r,a:i}=e;let s,o,a;if(0===n)s=o=a=r;else{const e=r<.5?r*(1+n):r+n-r*n,i=2*r-e;s=Ni._hue2rgb(i,e,t+1/3),o=Ni._hue2rgb(i,e,t),a=Ni._hue2rgb(i,e,t-1/3)}return new Ri(Math.round(255*s),Math.round(255*o),Math.round(255*a),i)}}class Ii{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=Fi(Math.max(Math.min(1,t),0),3),this.v=Fi(Math.max(Math.min(1,n),0),3),this.a=Fi(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),s=i-Math.min(t,n,r),o=0===i?0:s/i;let a;return a=0===s?0:i===t?((n-r)/s%6+6)%6:i===n?(r-t)/s+2:(t-n)/s+4,new Ii(Math.round(60*a),o,i,e.a)}static toRGBA(e){const{h:t,s:n,v:r,a:i}=e,s=r*n,o=s*(1-Math.abs(t/60%2-1)),a=r-s;let[l,c,h]=[0,0,0];return t<60?(l=s,c=o):t<120?(l=o,c=s):t<180?(c=s,h=o):t<240?(c=o,h=s):t<300?(l=o,h=s):t<=360&&(l=s,h=o),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),h=Math.round(255*(h+a)),new Ri(l,c,h,i)}}let Ti=class e{static fromHex(t){return e.Format.CSS.parseHex(t)||e.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:Ni.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Ii.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof Ri)this.rgba=e;else if(e instanceof Ni)this._hsla=e,this.rgba=Ni.toRGBA(e);else{if(!(e instanceof Ii))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=Ii.toRGBA(e)}}equals(e){return!!e&&Ri.equals(this.rgba,e.rgba)&&Ni.equals(this.hsla,e.hsla)&&Ii.equals(this.hsva,e.hsva)}getRelativeLuminance(){return Fi(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()>>0),this._toNumber32Bit}static getLighterColor(e,t,n){if(e.isLighterThan(t))return e;n=n||.5;const r=e.getRelativeLuminance(),i=t.getRelativeLuminance();return n=n*(i-r)/i,e.lighten(n)}static getDarkerColor(e,t,n){if(e.isDarkerThan(t))return e;n=n||.5;const r=e.getRelativeLuminance();return n=n*(r-t.getRelativeLuminance())/r,e.darken(n)}static{this.white=new e(new Ri(255,255,255,1))}static{this.black=new e(new Ri(0,0,0,1))}static{this.red=new e(new Ri(255,0,0,1))}static{this.blue=new e(new Ri(0,0,255,1))}static{this.green=new e(new Ri(0,255,0,1))}static{this.cyan=new e(new Ri(0,255,255,1))}static{this.lightgrey=new e(new Ri(211,211,211,1))}static{this.transparent=new e(new Ri(0,0,0,0))}};function Di(e){const t=[];for(const n of e){const e=Number(n);(e||0===e&&""!==n.replace(/\s/g,""))&&t.push(e)}return t}function Mi(e,t,n,r){return{red:e/255,blue:n/255,green:t/255,alpha:r}}function Ai(e,t){const n=t.index,r=t[0].length;if(void 0===n)return;const i=e.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Li(e,t){if(!e)return;const n=Ti.Format.CSS.parseHex(t);return n?{range:e,color:Mi(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}:void 0}function zi(e,t,n){if(!e||1!==t.length)return;const r=Di(t[0].values());return{range:e,color:Mi(r[0],r[1],r[2],n?r[3]:1)}}function Oi(e,t,n){if(!e||1!==t.length)return;const r=Di(t[0].values()),i=new Ti(new Ni(r[0],r[1]/100,r[2]/100,n?r[3]:1));return{range:e,color:Mi(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}}function Pi(e,t){return"string"==typeof e?[...e.matchAll(t)]:e.findMatches(t)}function Wi(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],n=Pi(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(n.length>0)for(const r of n){const n=r.filter(e=>void 0!==e),i=n[1],s=n[2];if(!s)continue;let o;if("rgb"===i){const t=/^\(\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;o=zi(Ai(e,r),Pi(s,t),!1)}else if("rgba"===i){const t=/^\(\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;o=zi(Ai(e,r),Pi(s,t),!0)}else if("hsl"===i){const t=/^\(\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;o=Oi(Ai(e,r),Pi(s,t),!1)}else if("hsla"===i){const t=/^\(\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;o=Oi(Ai(e,r),Pi(s,t),!0)}else"#"===i&&(o=Li(Ai(e,r),i+s));o&&t.push(o)}return t}(e):[]}!function(e){var t;(function(t){function n(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function r(t){const n=t.length;if(0===n)return null;if(35!==t.charCodeAt(0))return null;if(7===n){const n=16*i(t.charCodeAt(1))+i(t.charCodeAt(2)),r=16*i(t.charCodeAt(3))+i(t.charCodeAt(4)),s=16*i(t.charCodeAt(5))+i(t.charCodeAt(6));return new e(new Ri(n,r,s,1))}if(9===n){const n=16*i(t.charCodeAt(1))+i(t.charCodeAt(2)),r=16*i(t.charCodeAt(3))+i(t.charCodeAt(4)),s=16*i(t.charCodeAt(5))+i(t.charCodeAt(6)),o=16*i(t.charCodeAt(7))+i(t.charCodeAt(8));return new e(new Ri(n,r,s,o/255))}if(4===n){const n=i(t.charCodeAt(1)),r=i(t.charCodeAt(2)),s=i(t.charCodeAt(3));return new e(new Ri(16*n+n,16*r+r,16*s+s))}if(5===n){const n=i(t.charCodeAt(1)),r=i(t.charCodeAt(2)),s=i(t.charCodeAt(3)),o=i(t.charCodeAt(4));return new e(new Ri(16*n+n,16*r+r,16*s+s,(16*o+o)/255))}return null}function i(e){switch(e){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:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${Math.round(100*t.hsla.s)}%, ${Math.round(100*t.hsla.l)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${Math.round(100*e.hsla.s)}%, ${Math.round(100*e.hsla.l)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${n(e.rgba.r)}${n(e.rgba.g)}${n(e.rgba.b)}`},t.formatHexA=function(t,r=!1){return r&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${n(t.rgba.r)}${n(t.rgba.g)}${n(t.rgba.b)}${n(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parse=function(t){if("transparent"===t)return e.transparent;if(t.startsWith("#"))return r(t);if(t.startsWith("rgba(")){const n=t.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!n)throw new Error("Invalid color format "+t);const r=parseInt(n.groups?.r??"0"),i=parseInt(n.groups?.g??"0"),s=parseInt(n.groups?.b??"0"),o=parseFloat(n.groups?.a??"0");return new e(new Ri(r,i,s,o))}if(t.startsWith("rgb(")){const n=t.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!n)throw new Error("Invalid color format "+t);const r=parseInt(n.groups?.r??"0"),i=parseInt(n.groups?.g??"0"),s=parseInt(n.groups?.b??"0");return new e(new Ri(r,i,s))}return function(t){switch(t){case"aliceblue":return new e(new Ri(240,248,255,1));case"antiquewhite":return new e(new Ri(250,235,215,1));case"aqua":case"cyan":return new e(new Ri(0,255,255,1));case"aquamarine":return new e(new Ri(127,255,212,1));case"azure":return new e(new Ri(240,255,255,1));case"beige":return new e(new Ri(245,245,220,1));case"bisque":return new e(new Ri(255,228,196,1));case"black":return new e(new Ri(0,0,0,1));case"blanchedalmond":return new e(new Ri(255,235,205,1));case"blue":return new e(new Ri(0,0,255,1));case"blueviolet":return new e(new Ri(138,43,226,1));case"brown":return new e(new Ri(165,42,42,1));case"burlywood":return new e(new Ri(222,184,135,1));case"cadetblue":return new e(new Ri(95,158,160,1));case"chartreuse":return new e(new Ri(127,255,0,1));case"chocolate":return new e(new Ri(210,105,30,1));case"coral":return new e(new Ri(255,127,80,1));case"cornflowerblue":return new e(new Ri(100,149,237,1));case"cornsilk":return new e(new Ri(255,248,220,1));case"crimson":return new e(new Ri(220,20,60,1));case"darkblue":return new e(new Ri(0,0,139,1));case"darkcyan":return new e(new Ri(0,139,139,1));case"darkgoldenrod":return new e(new Ri(184,134,11,1));case"darkgray":case"darkgrey":return new e(new Ri(169,169,169,1));case"darkgreen":return new e(new Ri(0,100,0,1));case"darkkhaki":return new e(new Ri(189,183,107,1));case"darkmagenta":return new e(new Ri(139,0,139,1));case"darkolivegreen":return new e(new Ri(85,107,47,1));case"darkorange":return new e(new Ri(255,140,0,1));case"darkorchid":return new e(new Ri(153,50,204,1));case"darkred":return new e(new Ri(139,0,0,1));case"darksalmon":return new e(new Ri(233,150,122,1));case"darkseagreen":return new e(new Ri(143,188,143,1));case"darkslateblue":return new e(new Ri(72,61,139,1));case"darkslategray":case"darkslategrey":return new e(new Ri(47,79,79,1));case"darkturquoise":return new e(new Ri(0,206,209,1));case"darkviolet":return new e(new Ri(148,0,211,1));case"deeppink":return new e(new Ri(255,20,147,1));case"deepskyblue":return new e(new Ri(0,191,255,1));case"dimgray":case"dimgrey":return new e(new Ri(105,105,105,1));case"dodgerblue":return new e(new Ri(30,144,255,1));case"firebrick":return new e(new Ri(178,34,34,1));case"floralwhite":return new e(new Ri(255,250,240,1));case"forestgreen":return new e(new Ri(34,139,34,1));case"fuchsia":case"magenta":return new e(new Ri(255,0,255,1));case"gainsboro":return new e(new Ri(220,220,220,1));case"ghostwhite":return new e(new Ri(248,248,255,1));case"gold":return new e(new Ri(255,215,0,1));case"goldenrod":return new e(new Ri(218,165,32,1));case"gray":case"grey":return new e(new Ri(128,128,128,1));case"green":return new e(new Ri(0,128,0,1));case"greenyellow":return new e(new Ri(173,255,47,1));case"honeydew":return new e(new Ri(240,255,240,1));case"hotpink":return new e(new Ri(255,105,180,1));case"indianred":return new e(new Ri(205,92,92,1));case"indigo":return new e(new Ri(75,0,130,1));case"ivory":return new e(new Ri(255,255,240,1));case"khaki":return new e(new Ri(240,230,140,1));case"lavender":return new e(new Ri(230,230,250,1));case"lavenderblush":return new e(new Ri(255,240,245,1));case"lawngreen":return new e(new Ri(124,252,0,1));case"lemonchiffon":return new e(new Ri(255,250,205,1));case"lightblue":return new e(new Ri(173,216,230,1));case"lightcoral":return new e(new Ri(240,128,128,1));case"lightcyan":return new e(new Ri(224,255,255,1));case"lightgoldenrodyellow":return new e(new Ri(250,250,210,1));case"lightgray":case"lightgrey":return new e(new Ri(211,211,211,1));case"lightgreen":return new e(new Ri(144,238,144,1));case"lightpink":return new e(new Ri(255,182,193,1));case"lightsalmon":return new e(new Ri(255,160,122,1));case"lightseagreen":return new e(new Ri(32,178,170,1));case"lightskyblue":return new e(new Ri(135,206,250,1));case"lightslategray":case"lightslategrey":return new e(new Ri(119,136,153,1));case"lightsteelblue":return new e(new Ri(176,196,222,1));case"lightyellow":return new e(new Ri(255,255,224,1));case"lime":return new e(new Ri(0,255,0,1));case"limegreen":return new e(new Ri(50,205,50,1));case"linen":return new e(new Ri(250,240,230,1));case"maroon":return new e(new Ri(128,0,0,1));case"mediumaquamarine":return new e(new Ri(102,205,170,1));case"mediumblue":return new e(new Ri(0,0,205,1));case"mediumorchid":return new e(new Ri(186,85,211,1));case"mediumpurple":return new e(new Ri(147,112,219,1));case"mediumseagreen":return new e(new Ri(60,179,113,1));case"mediumslateblue":return new e(new Ri(123,104,238,1));case"mediumspringgreen":return new e(new Ri(0,250,154,1));case"mediumturquoise":return new e(new Ri(72,209,204,1));case"mediumvioletred":return new e(new Ri(199,21,133,1));case"midnightblue":return new e(new Ri(25,25,112,1));case"mintcream":return new e(new Ri(245,255,250,1));case"mistyrose":return new e(new Ri(255,228,225,1));case"moccasin":return new e(new Ri(255,228,181,1));case"navajowhite":return new e(new Ri(255,222,173,1));case"navy":return new e(new Ri(0,0,128,1));case"oldlace":return new e(new Ri(253,245,230,1));case"olive":return new e(new Ri(128,128,0,1));case"olivedrab":return new e(new Ri(107,142,35,1));case"orange":return new e(new Ri(255,165,0,1));case"orangered":return new e(new Ri(255,69,0,1));case"orchid":return new e(new Ri(218,112,214,1));case"palegoldenrod":return new e(new Ri(238,232,170,1));case"palegreen":return new e(new Ri(152,251,152,1));case"paleturquoise":return new e(new Ri(175,238,238,1));case"palevioletred":return new e(new Ri(219,112,147,1));case"papayawhip":return new e(new Ri(255,239,213,1));case"peachpuff":return new e(new Ri(255,218,185,1));case"peru":return new e(new Ri(205,133,63,1));case"pink":return new e(new Ri(255,192,203,1));case"plum":return new e(new Ri(221,160,221,1));case"powderblue":return new e(new Ri(176,224,230,1));case"purple":return new e(new Ri(128,0,128,1));case"rebeccapurple":return new e(new Ri(102,51,153,1));case"red":return new e(new Ri(255,0,0,1));case"rosybrown":return new e(new Ri(188,143,143,1));case"royalblue":return new e(new Ri(65,105,225,1));case"saddlebrown":return new e(new Ri(139,69,19,1));case"salmon":return new e(new Ri(250,128,114,1));case"sandybrown":return new e(new Ri(244,164,96,1));case"seagreen":return new e(new Ri(46,139,87,1));case"seashell":return new e(new Ri(255,245,238,1));case"sienna":return new e(new Ri(160,82,45,1));case"silver":return new e(new Ri(192,192,192,1));case"skyblue":return new e(new Ri(135,206,235,1));case"slateblue":return new e(new Ri(106,90,205,1));case"slategray":case"slategrey":return new e(new Ri(112,128,144,1));case"snow":return new e(new Ri(255,250,250,1));case"springgreen":return new e(new Ri(0,255,127,1));case"steelblue":return new e(new Ri(70,130,180,1));case"tan":return new e(new Ri(210,180,140,1));case"teal":return new e(new Ri(0,128,128,1));case"thistle":return new e(new Ri(216,191,216,1));case"tomato":return new e(new Ri(255,99,71,1));case"turquoise":return new e(new Ri(64,224,208,1));case"violet":return new e(new Ri(238,130,238,1));case"wheat":return new e(new Ri(245,222,179,1));case"white":return new e(new Ri(255,255,255,1));case"whitesmoke":return new e(new Ri(245,245,245,1));case"yellow":return new e(new Ri(255,255,0,1));case"yellowgreen":return new e(new Ri(154,205,50,1));default:return null}}(t)},t.parseHex=r})((t=e.Format||(e.Format={})).CSS||(t.CSS={}))}(Ti||(Ti={}));const Vi=/^-+|-+$/g,$i=100;function Ui(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=function(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const r=e.getLineContent(i),s=r.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:i,startColumn:s[0].length+1,endLineNumber:i,endColumn:r.length+1};if(e.endColumn>e.startColumn){const t={range:e,...qi(r.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const r=function(e,t){const n=[],r=e.getLineCount();if(!t.markSectionHeaderRegex||""===t.markSectionHeaderRegex.trim())return n;const i=function(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t=n)break;const r=e.charCodeAt(t);if(110===r||114===r||87===r)return!0}}return!1}(t.markSectionHeaderRegex),s=new RegExp(t.markSectionHeaderRegex,"gdm"+(i?"s":""));if(o=s,"^"!==o.source&&"^$"!==o.source&&"$"!==o.source&&"^\\s*$"!==o.source&&o.exec("")&&0===o.lastIndex)return n;var o;for(let a=1;a<=r;a+=95){const t=Math.min(a+$i-1,r),i=[];for(let n=a;n<=t;n++)i.push(e.getLineContent(n));const o=i.join("\n");let l;for(s.lastIndex=0;null!==(l=s.exec(o));){const e=o.substring(0,l.index),t=a+(e.match(/\n/g)||[]).length,r=l[0].split("\n"),i=r.length,c=t+i-1,h=e.lastIndexOf("\n")+1,d=l.index-h+1,p=r[r.length-1],u={range:{startLineNumber:t,startColumn:d,endLineNumber:c,endColumn:1===i?d+l[0].length:p.length+1},text:(l.groups??{}).label??"",hasSeparatorLine:""!==((l.groups??{}).separator??""),shouldBeInComments:!0};(u.text||u.hasSeparatorLine)&&(0===n.length||n[n.length-1].range.endLineNumber{this.completeCallback=e,this.errorCallback=t})}complete(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new i)}}var Ki,ji;!function(e){e.settled=async function(e){let t;const n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if(void 0!==t)throw t;return n},e.withAsyncBody=function(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(r){n(r)}})}}(Ki||(Ki={}));class Hi{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const t=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(t,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const t of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(t,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new o("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,t){t.ok?e.complete(t.value):e.error(t.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}{const e=new Bi;return this._unsatisfiedConsumers.push(e),e.p}}}class Gi{constructor(e,t){this._onReturn=t,this._producerConsumer=new Hi,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async e=>(this._finishError(e),{done:!0,value:void 0})},queueMicrotask(async()=>{const t=e({emitOne:e=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:e}}),emitMany:e=>{for(const t of e)this._producerConsumer.produce({ok:!0,value:{done:!1,value:t}})},reject:e=>this._finishError(e)});if(!this._producerConsumer.hasFinalValue)try{await t,this._finishOk()}catch(n){this._finishError(n)}})}static fromArray(e){return new Gi(t=>{t.emitMany(e)})}static fromPromise(e){return new Gi(async t=>{t.emitMany(await e)})}static fromPromisesResolveOrder(e){return new Gi(async t=>{await Promise.all(e.map(async e=>t.emitOne(await e)))})}static merge(e){return new Gi(async t=>{await Promise.all(e.map(async e=>{for await(const n of e)t.emitOne(n)}))})}static{this.EMPTY=Gi.fromArray([])}static map(e,t){return new Gi(async n=>{for await(const r of e)n.emitOne(t(r))})}map(e){return Gi.map(this,e)}static coalesce(e){return Gi.filter(e,e=>!!e)}coalesce(){return Gi.coalesce(this)}static filter(e,t){return new Gi(async n=>{for await(const r of e)t(r)&&n.emitOne(r)})}filter(e){return Gi.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}}class Ji{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Te(e);const n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Te(e),t=Te(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Te(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,s=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],s=i-this.values[r],e=i))break;t=r+1}return new Xi(r,e-s)}}class Xi{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class Yi{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new Re(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;re.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new Zi(kt.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class Zi extends Yi{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>e&&(n=e,r=!0)}return r?{lineNumber:t,column:n}:e}}class es{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new Qi}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){const r=this._getModel(e);return r?dr.computeUnicodeHighlights(r,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const n=this._getModel(e);return n?Ui(n,t):[]}async $computeDiff(e,t,n,r){const i=this._getModel(e),s=this._getModel(t);if(!i||!s)return null;return es.computeDiff(i,s,n,r)}static computeDiff(e,t,n,r){const i="advanced"===r?Ei():_i(),s=e.getLinesContent(),o=t.getLinesContent(),a=i.computeDiff(s,o,n);function l(e){return e.map(e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map(e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn])])}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map(e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)])}}static _modelsAreIdentical(e,t){const n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let r=1;r<=n;r++){if(e.getLineContent(r)!==t.getLineContent(r))return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){const r=this._getModel(e);if(!r)return t;const i=[];let s;t=t.slice(0).sort((e,t)=>{if(e.range&&t.range)return Ne.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)});let o=0;for(let a=1;aes._diffLimit){i.push({range:a,text:l});continue}const t=Ce(e,l,n),o=r.offsetAt(Ne.lift(a).getStartPosition());for(const n of t){const e=r.positionAt(o+n.originalStart),t=r.positionAt(o+n.originalStart+n.originalLength),s={text:l.substr(n.modifiedStart,n.modifiedLength),range:{startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:t.lineNumber,endColumn:t.column}};r.getValueInRange(s.range)!==s.text&&i.push(s)}}return"number"==typeof s&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}async $computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?Oe.computeLinks(e):[]}(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?Wi(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,r){const i=new y,s=new RegExp(n,r),o=new Set;e:for(const a of e){const e=this._getModel(a);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>es._suggestionsLimit))break e}return{words:Array.from(o),duration:i.elapsed()}}async $computeWordRanges(e,t,n,r){const i=this._getModel(e);if(!i)return Object.create(null);const s=new RegExp(n,r),o=Object.create(null);for(let a=t.startLineNumber;aglobalThis.postMessage(e),t=>e(t));return globalThis.onmessage=e=>{t.onmessage(e.data)},t}(r=>{const i=ts.getChannel(r),s=new Proxy({},{get(e,t,n){if("then"!==t){if("string"!=typeof t)throw new Error("Not supported");return(...e)=>i.$fhr(t,e)}}});return t=e({host:s,getMirrorModels:()=>n.requestHandler.getModels()}),new es(t)});return t}!function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.ContainerQueryLength=42]="ContainerQueryLength",e[e.CustomToken=43]="CustomToken"}(ji||(ji={}));class rs{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;tt&&n===Rs?(e=!0,!1):(t=n===vs,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e,t=0;return this.stream.peekChar()===qs&&(t=1),e=this.stream.peekChar(t),e>=hs&&e<=ds&&(this.stream.advance(t+1),this.stream.advanceWhileChar(e=>e>=hs&&e<=ds||0===t&&e===qs),!0)}_newline(e){const t=this.stream.peekChar();switch(t){case Is:case Ts:case Ns:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===Is&&this.stream.advanceIfChar(Ns)&&e.push("\n"),!0}return!1}_escape(e,t){let n=this.stream.peekChar();if(n===Fs){this.stream.advance(1),n=this.stream.peekChar();let r=0;for(;r<6&&(n>=hs&&n<=ds||n>=is&&n<=ss||n>=as&&n<=ls);)this.stream.advance(1),n=this.stream.peekChar(),r++;if(r>0){try{const t=parseInt(this.stream.substring(this.stream.pos()-r),16);t&&e.push(String.fromCharCode(t))}catch(yp){}return n===As||n===Ls?this.stream.advance(1):this._newline([]),!0}if(n!==Is&&n!==Ts&&n!==Ns)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){const n=this.stream.peekChar();return 0!==n&&n!==e&&n!==Fs&&n!==Is&&n!==Ts&&n!==Ns&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)}_string(e){if(this.stream.peekChar()===Ms||this.stream.peekChar()===Ds){const t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),ji.String):ji.BadString}return null}_unquotedChar(e){const t=this.stream.peekChar();return 0!==t&&t!==Fs&&t!==Ms&&t!==Ds&&t!==ys&&t!==xs&&t!==As&&t!==Ls&&t!==Ns&&t!==Ts&&t!==Is&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(e=>e===As||e===Ls||e===Ns||e===Ts||e===Is)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){const t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1}_identFirstChar(e){const t=this.stream.peekChar();return(t===bs||t>=is&&t<=os||t>=as&&t<=cs||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_minus(e){const t=this.stream.peekChar();return t===gs&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_identChar(e){const t=this.stream.peekChar();return(t===bs||t===gs||t>=is&&t<=os||t>=as&&t<=cs||t>=hs&&t<=ds||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unicodeRange(){if(this.stream.advanceIfChar(js)){const e=e=>e>=hs&&e<=ds||e>=is&&e<=ss||e>=as&&e<=ls,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(e=>e===Ks);if(t>=1&&t<=6){if(!this.stream.advanceIfChar(gs))return!0;{const t=this.stream.advanceWhileChar(e);if(t>=1&&t<=6)return!0}}}return!1}}function Xs(e,t){if(e.length0?e.lastIndexOf(t)===n:0===n&&e===t}function Qs(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}function Zs(e,t){let n="";for(;t>0;)1&~t||(n+=e),e+=e,t>>>=1;return n}var eo,to;function no(e,t){let n=null;return!e||te.end?null:(e.accept(e=>-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0)),n)}function ro(e,t){let n=no(e,t);const r=[];for(;n;)r.unshift(n),n=n.parent;return r}!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.RatioValue=33]="RatioValue",e[e.MixinDeclaration=34]="MixinDeclaration",e[e.MixinReference=35]="MixinReference",e[e.VariableName=36]="VariableName",e[e.VariableDeclaration=37]="VariableDeclaration",e[e.Prio=38]="Prio",e[e.Interpolation=39]="Interpolation",e[e.NestedProperties=40]="NestedProperties",e[e.ExtendsReference=41]="ExtendsReference",e[e.SelectorPlaceholder=42]="SelectorPlaceholder",e[e.Debug=43]="Debug",e[e.If=44]="If",e[e.Else=45]="Else",e[e.For=46]="For",e[e.Each=47]="Each",e[e.While=48]="While",e[e.MixinContentReference=49]="MixinContentReference",e[e.MixinContentDeclaration=50]="MixinContentDeclaration",e[e.Media=51]="Media",e[e.Keyframe=52]="Keyframe",e[e.FontFace=53]="FontFace",e[e.Import=54]="Import",e[e.Namespace=55]="Namespace",e[e.Invocation=56]="Invocation",e[e.FunctionDeclaration=57]="FunctionDeclaration",e[e.ReturnStatement=58]="ReturnStatement",e[e.MediaQuery=59]="MediaQuery",e[e.MediaCondition=60]="MediaCondition",e[e.MediaFeature=61]="MediaFeature",e[e.FunctionParameter=62]="FunctionParameter",e[e.FunctionArgument=63]="FunctionArgument",e[e.KeyframeSelector=64]="KeyframeSelector",e[e.ViewPort=65]="ViewPort",e[e.Document=66]="Document",e[e.AtApplyRule=67]="AtApplyRule",e[e.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",e[e.CustomPropertySet=69]="CustomPropertySet",e[e.ListEntry=70]="ListEntry",e[e.Supports=71]="Supports",e[e.SupportsCondition=72]="SupportsCondition",e[e.NamespacePrefix=73]="NamespacePrefix",e[e.GridLine=74]="GridLine",e[e.Plugin=75]="Plugin",e[e.UnknownAtRule=76]="UnknownAtRule",e[e.Use=77]="Use",e[e.ModuleConfiguration=78]="ModuleConfiguration",e[e.Forward=79]="Forward",e[e.ForwardVisibility=80]="ForwardVisibility",e[e.Module=81]="Module",e[e.UnicodeRange=82]="UnicodeRange",e[e.Layer=83]="Layer",e[e.LayerNameList=84]="LayerNameList",e[e.LayerName=85]="LayerName",e[e.PropertyAtRule=86]="PropertyAtRule",e[e.Container=87]="Container"}(eo||(eo={})),function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility",e[e.Property=9]="Property"}(to||(to={}));class io{get end(){return this.offset+this.length}constructor(e=-1,t=-1,n){this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}set type(e){this.nodeType=e}get type(){return this.nodeType||eo.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let n=this.children;return n||(n=this.children=[]),-1!==t?n.splice(t,0,e):n.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(t=>t.getRule()===e)}isErroneous(e=!1){return!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some(e=>e.isErroneous(!0))}setNode(e,t,n=-1){return!!t&&(t.attachTo(this,n),this[e]=t,!0)}addChild(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)}updateOffsetAndLength(e){(e.offsetthis.end||-1===this.length)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;n--)if(t=this.children[n],t.offset<=e)return t}return null}findChildAtOffset(e,t){const n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof so;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some(e=>t.type===e);)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null}}class so extends io{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}}class oo extends io{constructor(e,t){super(e,t)}get type(){return eo.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}class ao extends io{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return eo.Identifier}containsInterpolation(){return this.hasChildren()}}class lo extends io{constructor(e,t){super(e,t)}get type(){return eo.Stylesheet}}class co extends io{constructor(e,t){super(e,t)}get type(){return eo.Declarations}}class ho extends io{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class po extends ho{constructor(e,t){super(e,t)}get type(){return eo.Ruleset}getSelectors(){return this.selectors||(this.selectors=new so(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(eo.Declarations)}}class uo extends io{constructor(e,t){super(e,t)}get type(){return eo.Selector}}class mo extends io{constructor(e,t){super(e,t)}get type(){return eo.SimpleSelector}}class fo extends io{constructor(e,t){super(e,t)}}class go extends ho{constructor(e,t){super(e,t)}get type(){return eo.CustomPropertySet}}class bo extends fo{constructor(e,t){super(e,t),this.property=null}get type(){return eo.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof co&&this.parent.getParent()instanceof Do){const t=this.parent.getParent().getParent();if(t instanceof bo)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){const t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class wo extends bo{constructor(e,t){super(e,t)}get type(){return eo.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class vo extends io{constructor(e,t){super(e,t)}get type(){return eo.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e,t){const n=t.exec(e);return n&&n[0].length?e.substr(0,e.length-n[0].length):e}(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class yo extends io{constructor(e,t){super(e,t)}get type(){return eo.Invocation}getArguments(){return this.arguments||(this.arguments=new so(this)),this.arguments}}class xo extends yo{constructor(e,t){super(e,t)}get type(){return eo.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class So extends io{constructor(e,t){super(e,t)}get type(){return eo.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class Co extends io{constructor(e,t){super(e,t)}get type(){return eo.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class ko extends ho{constructor(e,t){super(e,t)}get type(){return eo.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class _o extends ho{constructor(e,t){super(e,t)}get type(){return eo.For}setVariable(e){return this.setNode("variable",e,0)}}class Eo extends ho{constructor(e,t){super(e,t)}get type(){return eo.Each}getVariables(){return this.variables||(this.variables=new so(this)),this.variables}}class Fo extends ho{constructor(e,t){super(e,t)}get type(){return eo.While}}class Ro extends ho{constructor(e,t){super(e,t)}get type(){return eo.Else}}class No extends ho{constructor(e,t){super(e,t)}get type(){return eo.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new so(this)),this.parameters}}class Io extends ho{constructor(e,t){super(e,t)}get type(){return eo.ViewPort}}class To extends ho{constructor(e,t){super(e,t)}get type(){return eo.FontFace}}class Do extends ho{constructor(e,t){super(e,t)}get type(){return eo.NestedProperties}}class Mo extends ho{constructor(e,t){super(e,t)}get type(){return eo.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class Ao extends ho{constructor(e,t){super(e,t)}get type(){return eo.KeyframeSelector}}class Lo extends io{constructor(e,t){super(e,t)}get type(){return eo.Import}setMedialist(e){return!!e&&(e.attachTo(this),!0)}}class zo extends io{get type(){return eo.Use}getParameters(){return this.parameters||(this.parameters=new so(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Oo extends io{get type(){return eo.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class Po extends io{get type(){return eo.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new so(this)),this.members}getParameters(){return this.parameters||(this.parameters=new so(this)),this.parameters}}class Wo extends io{get type(){return eo.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Vo extends io{constructor(e,t){super(e,t)}get type(){return eo.Namespace}}class $o extends ho{constructor(e,t){super(e,t)}get type(){return eo.Media}}class Uo extends ho{constructor(e,t){super(e,t)}get type(){return eo.Supports}}class qo extends ho{constructor(e,t){super(e,t)}get type(){return eo.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}}class Bo extends ho{constructor(e,t){super(e,t)}get type(){return eo.PropertyAtRule}setName(e){return!!e&&(e.attachTo(this),this.name=e,!0)}getName(){return this.name}}class Ko extends ho{constructor(e,t){super(e,t)}get type(){return eo.Document}}class jo extends ho{constructor(e,t){super(e,t)}get type(){return eo.Container}}class Ho extends io{constructor(e,t){super(e,t)}}class Go extends io{constructor(e,t){super(e,t)}get type(){return eo.MediaQuery}}class Jo extends io{constructor(e,t){super(e,t)}get type(){return eo.MediaCondition}}class Xo extends io{constructor(e,t){super(e,t)}get type(){return eo.MediaFeature}}class Yo extends io{constructor(e,t){super(e,t)}get type(){return eo.SupportsCondition}}class Qo extends ho{constructor(e,t){super(e,t)}get type(){return eo.Page}}class Zo extends ho{constructor(e,t){super(e,t)}get type(){return eo.PageBoxMarginBox}}class ea extends io{constructor(e,t){super(e,t)}get type(){return eo.Expression}}class ta extends io{constructor(e,t){super(e,t)}get type(){return eo.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class na extends io{constructor(e,t){super(e,t)}get type(){return eo.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class ra extends io{constructor(e,t){super(e,t)}get type(){return eo.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}}class ia extends io{constructor(e,t){super(e,t)}get type(){return eo.HexColorValue}}class sa extends io{constructor(e,t){super(e,t)}get type(){return eo.RatioValue}}const oa=".".charCodeAt(0),aa="0".charCodeAt(0),la="9".charCodeAt(0);class ca extends io{constructor(e,t){super(e,t)}get type(){return eo.NumericValue}getValue(){const e=this.getText();let t,n=0;for(let r=0,i=e.length;r0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{}}return function(e,t){if(0===Object.keys(t).length)return e;return e.replace(Fa,(e,n)=>t[n]??e)}(r,i)}var Fa=/{([^}]+)}/g;class Ra{constructor(e,t){this.id=e,this.message=t}}const Na={NumberExpected:new Ra("css-numberexpected",Ea("number expected")),ConditionExpected:new Ra("css-conditionexpected",Ea("condition expected")),RuleOrSelectorExpected:new Ra("css-ruleorselectorexpected",Ea("at-rule or selector expected")),DotExpected:new Ra("css-dotexpected",Ea("dot expected")),ColonExpected:new Ra("css-colonexpected",Ea("colon expected")),SemiColonExpected:new Ra("css-semicolonexpected",Ea("semi-colon expected")),TermExpected:new Ra("css-termexpected",Ea("term expected")),ExpressionExpected:new Ra("css-expressionexpected",Ea("expression expected")),OperatorExpected:new Ra("css-operatorexpected",Ea("operator expected")),IdentifierExpected:new Ra("css-identifierexpected",Ea("identifier expected")),PercentageExpected:new Ra("css-percentageexpected",Ea("percentage expected")),URIOrStringExpected:new Ra("css-uriorstringexpected",Ea("uri or string expected")),URIExpected:new Ra("css-uriexpected",Ea("URI expected")),VariableNameExpected:new Ra("css-varnameexpected",Ea("variable name expected")),VariableValueExpected:new Ra("css-varvalueexpected",Ea("variable value expected")),PropertyValueExpected:new Ra("css-propertyvalueexpected",Ea("property value expected")),LeftCurlyExpected:new Ra("css-lcurlyexpected",Ea("{ expected")),RightCurlyExpected:new Ra("css-rcurlyexpected",Ea("} expected")),LeftSquareBracketExpected:new Ra("css-rbracketexpected",Ea("[ expected")),RightSquareBracketExpected:new Ra("css-lbracketexpected",Ea("] expected")),LeftParenthesisExpected:new Ra("css-lparentexpected",Ea("( expected")),RightParenthesisExpected:new Ra("css-rparentexpected",Ea(") expected")),CommaExpected:new Ra("css-commaexpected",Ea("comma expected")),PageDirectiveOrDeclarationExpected:new Ra("css-pagedirordeclexpected",Ea("page directive or declaraton expected")),UnknownAtRule:new Ra("css-unknownatrule",Ea("at-rule unknown")),UnknownKeyword:new Ra("css-unknownkeyword",Ea("unknown keyword")),SelectorExpected:new Ra("css-selectorexpected",Ea("selector expected")),StringLiteralExpected:new Ra("css-stringliteralexpected",Ea("string literal expected")),WhitespaceExpected:new Ra("css-whitespaceexpected",Ea("whitespace expected")),MediaQueryExpected:new Ra("css-mediaqueryexpected",Ea("media query expected")),IdentifierOrWildcardExpected:new Ra("css-idorwildcardexpected",Ea("identifier or wildcard expected")),WildcardExpected:new Ra("css-wildcardexpected",Ea("wildcard expected")),IdentifierOrVariableExpected:new Ra("css-idorvarexpected",Ea("identifier or variable expected"))};var Ia,Ta,Da,Ma,Aa,La,za,Oa,Pa,Wa,Va,$a,Ua,qa,Ba,Ka,ja,Ha,Ga,Ja,Xa,Ya,Qa,Za,el,tl,nl,rl,il,sl,ol,al,ll,cl,hl,dl,pl,ul,ml,fl,gl,bl,wl,vl,yl,xl,Sl,Cl,kl,_l,El,Fl,Rl,Nl,Il,Tl,Dl,Ml,Al,Ll,zl,Ol,Pl,Wl,Vl,$l,Ul,ql,Bl,Kl,jl,Hl,Gl,Jl,Xl,Yl,Ql,Zl,ec;!function(e){e.is=function(e){return"string"==typeof e}}(Ia||(Ia={})),function(e){e.is=function(e){return"string"==typeof e}}(Ta||(Ta={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(Da||(Da={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(Ma||(Ma={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=Ma.MAX_VALUE),t===Number.MAX_VALUE&&(t=Ma.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return nc.objectLiteral(t)&&nc.uinteger(t.line)&&nc.uinteger(t.character)}}(Aa||(Aa={})),function(e){e.create=function(e,t,n,r){if(nc.uinteger(e)&&nc.uinteger(t)&&nc.uinteger(n)&&nc.uinteger(r))return{start:Aa.create(e,t),end:Aa.create(n,r)};if(Aa.is(e)&&Aa.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return nc.objectLiteral(t)&&Aa.is(t.start)&&Aa.is(t.end)}}(La||(La={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return nc.objectLiteral(t)&&La.is(t.range)&&(nc.string(t.uri)||nc.undefined(t.uri))}}(za||(za={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return nc.objectLiteral(t)&&La.is(t.targetRange)&&nc.string(t.targetUri)&&La.is(t.targetSelectionRange)&&(La.is(t.originSelectionRange)||nc.undefined(t.originSelectionRange))}}(Oa||(Oa={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return nc.objectLiteral(t)&&nc.numberRange(t.red,0,1)&&nc.numberRange(t.green,0,1)&&nc.numberRange(t.blue,0,1)&&nc.numberRange(t.alpha,0,1)}}(Pa||(Pa={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return nc.objectLiteral(t)&&La.is(t.range)&&Pa.is(t.color)}}(Wa||(Wa={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return nc.objectLiteral(t)&&nc.string(t.label)&&(nc.undefined(t.textEdit)||Ja.is(t))&&(nc.undefined(t.additionalTextEdits)||nc.typedArray(t.additionalTextEdits,Ja.is))}}(Va||(Va={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}($a||($a={})),function(e){e.create=function(e,t,n,r,i,s){const o={startLine:e,endLine:t};return nc.defined(n)&&(o.startCharacter=n),nc.defined(r)&&(o.endCharacter=r),nc.defined(i)&&(o.kind=i),nc.defined(s)&&(o.collapsedText=s),o},e.is=function(e){const t=e;return nc.objectLiteral(t)&&nc.uinteger(t.startLine)&&nc.uinteger(t.startLine)&&(nc.undefined(t.startCharacter)||nc.uinteger(t.startCharacter))&&(nc.undefined(t.endCharacter)||nc.uinteger(t.endCharacter))&&(nc.undefined(t.kind)||nc.string(t.kind))}}(Ua||(Ua={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return nc.defined(t)&&za.is(t.location)&&nc.string(t.message)}}(qa||(qa={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(Ba||(Ba={})),function(e){e.Unnecessary=1,e.Deprecated=2}(Ka||(Ka={})),function(e){e.is=function(e){const t=e;return nc.objectLiteral(t)&&nc.string(t.href)}}(ja||(ja={})),function(e){e.create=function(e,t,n,r,i,s){let o={range:e,message:t};return nc.defined(n)&&(o.severity=n),nc.defined(r)&&(o.code=r),nc.defined(i)&&(o.source=i),nc.defined(s)&&(o.relatedInformation=s),o},e.is=function(e){var t;let n=e;return nc.defined(n)&&La.is(n.range)&&nc.string(n.message)&&(nc.number(n.severity)||nc.undefined(n.severity))&&(nc.integer(n.code)||nc.string(n.code)||nc.undefined(n.code))&&(nc.undefined(n.codeDescription)||nc.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(nc.string(n.source)||nc.undefined(n.source))&&(nc.undefined(n.relatedInformation)||nc.typedArray(n.relatedInformation,qa.is))}}(Ha||(Ha={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return nc.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return nc.defined(t)&&nc.string(t.title)&&nc.string(t.command)}}(Ga||(Ga={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return nc.objectLiteral(t)&&nc.string(t.newText)&&La.is(t.range)}}(Ja||(Ja={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return nc.objectLiteral(t)&&nc.string(t.label)&&(nc.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(nc.string(t.description)||void 0===t.description)}}(Xa||(Xa={})),function(e){e.is=function(e){const t=e;return nc.string(t)}}(Ya||(Ya={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return Ja.is(t)&&(Xa.is(t.annotationId)||Ya.is(t.annotationId))}}(Qa||(Qa={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return nc.defined(t)&&ol.is(t.textDocument)&&Array.isArray(t.edits)}}(Za||(Za={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&nc.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||nc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||nc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ya.is(t.annotationId))}}(el||(el={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&nc.string(t.oldUri)&&nc.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||nc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||nc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ya.is(t.annotationId))}}(tl||(tl={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&nc.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||nc.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||nc.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Ya.is(t.annotationId))}}(nl||(nl={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>nc.string(e.kind)?el.is(e)||tl.is(e)||nl.is(e):Za.is(e)))}}(rl||(rl={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return nc.defined(t)&&nc.string(t.uri)}}(il||(il={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return nc.defined(t)&&nc.string(t.uri)&&nc.integer(t.version)}}(sl||(sl={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return nc.defined(t)&&nc.string(t.uri)&&(null===t.version||nc.integer(t.version))}}(ol||(ol={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return nc.defined(t)&&nc.string(t.uri)&&nc.string(t.languageId)&&nc.integer(t.version)&&nc.string(t.text)}}(al||(al={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(ll||(ll={})),function(e){e.is=function(e){const t=e;return nc.objectLiteral(e)&&ll.is(t.kind)&&nc.string(t.value)}}(cl||(cl={})),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}(hl||(hl={})),function(e){e.PlainText=1,e.Snippet=2}(dl||(dl={})),function(e){e.Deprecated=1}(pl||(pl={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&nc.string(t.newText)&&La.is(t.insert)&&La.is(t.replace)}}(ul||(ul={})),function(e){e.asIs=1,e.adjustIndentation=2}(ml||(ml={})),function(e){e.is=function(e){const t=e;return t&&(nc.string(t.detail)||void 0===t.detail)&&(nc.string(t.description)||void 0===t.description)}}(fl||(fl={})),function(e){e.create=function(e){return{label:e}}}(gl||(gl={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(bl||(bl={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return nc.string(t)||nc.objectLiteral(t)&&nc.string(t.language)&&nc.string(t.value)}}(wl||(wl={})),function(e){e.is=function(e){let t=e;return!!t&&nc.objectLiteral(t)&&(cl.is(t.contents)||wl.is(t.contents)||nc.typedArray(t.contents,wl.is))&&(void 0===e.range||La.is(e.range))}}(vl||(vl={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(yl||(yl={})),function(e){e.create=function(e,t,...n){let r={label:e};return nc.defined(t)&&(r.documentation=t),nc.defined(n)?r.parameters=n:r.parameters=[],r}}(xl||(xl={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Sl||(Sl={})),function(e){e.create=function(e,t){let n={range:e};return nc.number(t)&&(n.kind=t),n}}(Cl||(Cl={})),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}(kl||(kl={})),function(e){e.Deprecated=1}(_l||(_l={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(El||(El={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(Fl||(Fl={})),function(e){e.create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},e.is=function(e){let t=e;return t&&nc.string(t.name)&&nc.number(t.kind)&&La.is(t.range)&&La.is(t.selectionRange)&&(void 0===t.detail||nc.string(t.detail))&&(void 0===t.deprecated||nc.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Rl||(Rl={})),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"}(Nl||(Nl={})),function(e){e.Invoked=1,e.Automatic=2}(Il||(Il={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return nc.defined(t)&&nc.typedArray(t.diagnostics,Ha.is)&&(void 0===t.only||nc.typedArray(t.only,nc.string))&&(void 0===t.triggerKind||t.triggerKind===Il.Invoked||t.triggerKind===Il.Automatic)}}(Tl||(Tl={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):Ga.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&nc.string(t.title)&&(void 0===t.diagnostics||nc.typedArray(t.diagnostics,Ha.is))&&(void 0===t.kind||nc.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Ga.is(t.command))&&(void 0===t.isPreferred||nc.boolean(t.isPreferred))&&(void 0===t.edit||rl.is(t.edit))}}(Dl||(Dl={})),function(e){e.create=function(e,t){let n={range:e};return nc.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return nc.defined(t)&&La.is(t.range)&&(nc.undefined(t.command)||Ga.is(t.command))}}(Ml||(Ml={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return nc.defined(t)&&nc.uinteger(t.tabSize)&&nc.boolean(t.insertSpaces)}}(Al||(Al={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return nc.defined(t)&&La.is(t.range)&&(nc.undefined(t.target)||nc.string(t.target))}}(Ll||(Ll={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return nc.objectLiteral(n)&&La.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(zl||(zl={})),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"}(Ol||(Ol={})),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"}(Pl||(Pl={})),function(e){e.is=function(e){const t=e;return nc.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Wl||(Wl={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&La.is(t.range)&&nc.string(t.text)}}(Vl||(Vl={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&La.is(t.range)&&nc.boolean(t.caseSensitiveLookup)&&(nc.string(t.variableName)||void 0===t.variableName)}}($l||($l={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&La.is(t.range)&&(nc.string(t.expression)||void 0===t.expression)}}(Ul||(Ul={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return nc.defined(t)&&La.is(e.stoppedLocation)}}(ql||(ql={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Bl||(Bl={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return nc.objectLiteral(t)&&(void 0===t.tooltip||nc.string(t.tooltip)||cl.is(t.tooltip))&&(void 0===t.location||za.is(t.location))&&(void 0===t.command||Ga.is(t.command))}}(Kl||(Kl={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return nc.objectLiteral(t)&&Aa.is(t.position)&&(nc.string(t.label)||nc.typedArray(t.label,Kl.is))&&(void 0===t.kind||Bl.is(t.kind))&&void 0===t.textEdits||nc.typedArray(t.textEdits,Ja.is)&&(void 0===t.tooltip||nc.string(t.tooltip)||cl.is(t.tooltip))&&(void 0===t.paddingLeft||nc.boolean(t.paddingLeft))&&(void 0===t.paddingRight||nc.boolean(t.paddingRight))}}(jl||(jl={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Hl||(Hl={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Gl||(Gl={})),function(e){e.create=function(e){return{items:e}}}(Jl||(Jl={})),function(e){e.Invoked=0,e.Automatic=1}(Xl||(Xl={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Yl||(Yl={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Ql||(Ql={})),function(e){e.is=function(e){const t=e;return nc.objectLiteral(t)&&Ta.is(t.uri)&&nc.string(t.name)}}(Zl||(Zl={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,l=0;for(;o{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(ec||(ec={}));let tc=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Aa.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return Aa.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1e?r=i:n=i+1}let i=n-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function hc(e){const t=cc(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new oc(e,t,n,r)},e.update=function(e,t,n){if(e instanceof oc)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let n=e.getText(),r=ac(t.map(hc),(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),i=0;const s=[];for(const o of r){let t=e.offsetAt(o.range.start);if(ti&&s.push(n.substring(i,t)),o.newText.length&&s.push(o.newText),i=e.offsetAt(o.range.end)}return s.push(n.substr(i)),s.join("")}}(rc||(rc={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ll.Markdown,ll.PlainText]}},hover:{contentFormat:[ll.Markdown,ll.PlainText]}}}}(ic||(ic={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(sc||(sc={}));const dc=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,pc=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:Ea("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:Ea("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:Ea("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:Ea("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:Ea("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:Ea("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:Ea("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:Ea("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:Ea("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:Ea("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:Ea("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:Ea("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:Ea("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:Ea("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:Ea("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:Ea("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:Ea("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:Ea("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:Ea("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:Ea("Mix two colors together in a polar color space.")}],uc=/^(rgb|rgba|hsl|hsla|hwb)$/i,mc={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},fc=new RegExp(`^(${Object.keys(mc).join("|")})$`,"i"),gc={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},bc=new RegExp(`^(${Object.keys(gc).join("|")})$`,"i");function wc(e,t){const n=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(n){n[2]&&(t=100);const e=parseFloat(n[1])/t;if(e>=0&&e<=1)return e}throw new Error}function vc(e){const t=e.getText(),n=t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(t)%360;case"rad":return 180*parseFloat(t)/Math.PI%360;case"grad":return.9*parseFloat(t)%360;case"turn":return 360*parseFloat(t)%360;default:if(void 0===n[2])return parseFloat(t)%360}throw new Error}function yc(e){return dc.test(e)||fc.test(e)||bc.test(e)}function xc(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Sc(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*xc(e.charCodeAt(1))/255,green:17*xc(e.charCodeAt(2))/255,blue:17*xc(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*xc(e.charCodeAt(1))/255,green:17*xc(e.charCodeAt(2))/255,blue:17*xc(e.charCodeAt(3))/255,alpha:17*xc(e.charCodeAt(4))/255};case 7:return{red:(16*xc(e.charCodeAt(1))+xc(e.charCodeAt(2)))/255,green:(16*xc(e.charCodeAt(3))+xc(e.charCodeAt(4)))/255,blue:(16*xc(e.charCodeAt(5))+xc(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*xc(e.charCodeAt(1))+xc(e.charCodeAt(2)))/255,green:(16*xc(e.charCodeAt(3))+xc(e.charCodeAt(4)))/255,blue:(16*xc(e.charCodeAt(5))+xc(e.charCodeAt(6)))/255,alpha:(16*xc(e.charCodeAt(7))+xc(e.charCodeAt(8)))/255}}return null}function Cc(e,t,n,r=1){if(0===t)return{red:n,green:n,blue:n,alpha:r};{const i=(e,t,n)=>{for(;n<0;)n+=6;for(;n>=6;)n-=6;return n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e},s=n<=.5?n*(t+1):n+t-n*t,o=2*n-s;return{red:i(o,s,(e/=60)+2),green:i(o,s,e),blue:i(o,s,e-2),alpha:r}}}function kc(e){const t=e.red,n=e.green,r=e.blue,i=e.alpha,s=Math.max(t,n,r),o=Math.min(t,n,r);let a=0,l=0;const c=(o+s)/2,h=s-o;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case t:a=(n-r)/h+(n4)return null;try{const e=4===r.length?wc(r[3],1):1;if("rgb"===n||"rgba"===n)return{red:wc(r[0],255),green:wc(r[1],255),blue:wc(r[2],255),alpha:e};if("hsl"===n||"hsla"===n){const t=vc(r[0]),n=wc(r[1],100);return Cc(t,n,wc(r[2],100),e)}if("hwb"===n){const t=vc(r[0]),n=wc(r[1],100);return function(e,t,n,r=1){if(t+n>=1){const e=t/(t+n);return{red:e,green:e,blue:e,alpha:r}}const i=Cc(e,1,.5,r);let s=i.red;s*=1-t-n,s+=t;let o=i.green;o*=1-t-n,o+=t;let a=i.blue;return a*=1-t-n,a+=t,{red:s,green:o,blue:a,alpha:r}}(t,n,wc(r[2],100),e)}}catch(yp){return null}}else if(e.type===eo.Identifier){if(e.parent&&e.parent.type!==eo.Term)return null;const t=e.parent;if(t&&t.parent&&t.parent.type===eo.BinaryExpression){const e=t.parent;if(e.parent&&e.parent.type===eo.ListEntry&&e.parent.key===e)return null}const n=e.getText().toLowerCase();if("none"===n)return null;const r=mc[n];if(r)return Sc(r)}return null}const Ec={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},Fc={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},Rc={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},Nc=["medium","thick","thin"],Ic={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},Tc={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},Dc={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Mc={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},Ac={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},Lc={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},zc={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Oc={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Pc=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Wc=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Vc=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function $c(e){return Object.keys(e).map(t=>e[t])}function Uc(e){return void 0!==e}class qc{constructor(e=new Js){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:ji.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return ji.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return ji.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return ji.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return-1!==e.indexOf(this.token.type)}peekRegExp(e,t){return e===this.token.type&&t.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){const e=this.scanner.tryScanUnicode();return!!e&&(this.prevToken=e,this.token=this.scanner.scan(),!0)}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){const t=this.mark(),n=e();return n||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(ji.AtKeyword===this.token.type)for(const t of e)if(t.length===this.token.text.length&&t===this.token.text.toLowerCase())return this.consumeToken(),!0;return!1}accept(e){return e===this.token.type&&(this.consumeToken(),!0)}acceptIdent(e){return!!this.peekIdent(e)&&(this.consumeToken(),!0)}acceptKeyword(e){return!!this.peekKeyword(e)&&(this.consumeToken(),!0)}acceptDelim(e){return!!this.peekDelim(e)&&(this.consumeToken(),!0)}acceptRegexp(e){return!!e.test(this.token.text)&&(this.consumeToken(),!0)}_parseRegexp(e){let t=this.createNode(eo.Identifier);do{}while(this.acceptRegexp(e));return this.finish(t)}acceptUnquotedString(){const e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);const t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,t){for(;;){if(e&&-1!==e.indexOf(this.token.type))return this.consumeToken(),!0;if(t&&-1!==t.indexOf(this.token.type))return!0;if(this.token.type===ji.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new io(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,n,r){if(!(e instanceof so)&&(t&&this.markError(e,t,n,r),this.prevToken)){const t=this.prevToken.offset+this.prevToken.len;e.length=t>e.offset?t-e.offset:0}return e}markError(e,t,n,r){this.token!==this.lastErrorToken&&(e.addIssue(new ka(e,t,Ca.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||r)&&this.resync(n,r)}parseStylesheet(e){const t=e.version,n=e.getText();return this.internalParse(n,this._parseStylesheet,(r,i)=>{if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return n.substr(r,i)})}internalParse(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();const r=t.bind(this)();return r&&(r.textProvider=n||((t,n)=>e.substr(t,n))),r}_parseStylesheet(){const e=this.create(lo);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let n=!1;do{n=!1;const r=this._parseStylesheetStatement();for(r&&(e.addChild(r),n=!0,t=!1,this.peek(ji.EOF)||!this._needsSemicolonAfter(r)||this.accept(ji.SemiColon)||this.markError(e,Na.SemiColonExpected));this.accept(ji.SemiColon)||this.accept(ji.CDO)||this.accept(ji.CDC);)n=!0,t=!1}while(n);if(this.peek(ji.EOF))break;t||(this.peek(ji.AtKeyword)?this.markError(e,Na.UnknownAtRule):this.markError(e,Na.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(ji.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(ji.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){const t=this.mark();if(this._parseSelector(e)){for(;this.accept(ji.Comma)&&this._parseSelector(e););if(this.accept(ji.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){const t=this.create(po),n=t.getSelectors();if(!n.addChild(this._parseSelector(e)))return null;for(;this.accept(ji.Comma);)if(!n.addChild(this._parseSelector(e)))return this.finish(t,Na.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(ji.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(ji.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case eo.Keyframe:case eo.ViewPort:case eo.Media:case eo.Ruleset:case eo.Namespace:case eo.If:case eo.For:case eo.Each:case eo.While:case eo.MixinDeclaration:case eo.FunctionDeclaration:case eo.MixinContentDeclaration:return!1;case eo.ExtendsReference:case eo.MixinContentReference:case eo.ReturnStatement:case eo.MediaQuery:case eo.Debug:case eo.Import:case eo.AtApplyRule:case eo.CustomPropertyDeclaration:return!0;case eo.VariableDeclaration:return e.needsSemicolon;case eo.MixinReference:return!e.getContent();case eo.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const t=this.create(co);if(!this.accept(ji.CurlyL))return null;let n=e();for(;t.addChild(n)&&!this.peek(ji.CurlyR);){if(this._needsSemicolonAfter(n)&&!this.accept(ji.SemiColon))return this.finish(t,Na.SemiColonExpected,[ji.SemiColon,ji.CurlyR]);for(n&&this.prevToken&&this.prevToken.type===ji.SemiColon&&(n.semicolonPosition=this.prevToken.offset);this.accept(ji.SemiColon););n=e()}return this.accept(ji.CurlyR)?this.finish(t):this.finish(t,Na.RightCurlyExpected,[ji.CurlyR,ji.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,Na.LeftCurlyExpected,[ji.CurlyR,ji.SemiColon])}_parseSelector(e){const t=this.create(uo);let n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)n=!0,t.addChild(this._parseCombinator());return n?this.finish(t):null}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const n=this.create(bo);return n.setProperty(this._parseProperty())?this.accept(ji.Colon)?(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseExpr())?(n.addChild(this._parsePrio()),this.peek(ji.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):this.finish(n,Na.PropertyValueExpected)):this.finish(n,Na.ColonExpected,[ji.Colon],e||[ji.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(ji.Ident,/^--/))return null;const t=this.create(wo);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(ji.Colon))return this.finish(t,Na.ColonExpected,[ji.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);const n=this.mark();if(this.peek(ji.CurlyL)){const e=this.create(go),r=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(e.setDeclarations(r)&&!r.isErroneous(!0)&&(e.addChild(this._parsePrio()),this.peek(ji.SemiColon)))return this.finish(e),t.setPropertySet(e),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(n)}const r=this._parseExpr();return r&&!r.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],ji.SemiColon,ji.EOF))?(t.setValue(r),this.peek(ji.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(n),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),Uc(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,Na.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[ji.CurlyR]){const t=this.create(io),n=()=>0===i&&0===s&&0===o,r=()=>-1!==e.indexOf(this.token.type);let i=0,s=0,o=0;e:for(;;){switch(this.token.type){case ji.SemiColon:case ji.Exclamation:if(n())break e;break;case ji.CurlyL:i++;break;case ji.CurlyR:if(i--,i<0){if(r()&&0===s&&0===o)break e;return this.finish(t,Na.LeftCurlyExpected)}break;case ji.ParenthesisL:s++;break;case ji.ParenthesisR:if(s--,s<0){if(r()&&0===o&&0===i)break e;return this.finish(t,Na.LeftParenthesisExpected)}break;case ji.BracketL:o++;break;case ji.BracketR:if(o--,o<0)return this.finish(t,Na.LeftSquareBracketExpected);break;case ji.BadString:break e;case ji.EOF:let e=Na.RightCurlyExpected;return o>0?e=Na.RightSquareBracketExpected:s>0&&(e=Na.RightParenthesisExpected),this.finish(t,e)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){const t=this.mark();return this._parseProperty()&&this.accept(ji.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){const e=this.create(vo),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(ji.Charset))return null;const e=this.create(io);return this.consumeToken(),this.accept(ji.String)?this.accept(ji.SemiColon)?this.finish(e):this.finish(e,Na.SemiColonExpected):this.finish(e,Na.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(Lo);return this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?this._completeParseImport(e):this.finish(e,Na.URIOrStringExpected)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(ji.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,Na.IdentifierExpected,[ji.SemiColon]);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[ji.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(ji.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(ji.ParenthesisR))?this.finish(e,Na.RightParenthesisExpected,[ji.ParenthesisR],[]):(this.peek(ji.SemiColon)||this.peek(ji.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(Vo);return this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this.accept(ji.SemiColon)?this.finish(e):this.finish(e,Na.SemiColonExpected):this.finish(e,Na.URIExpected,[ji.SemiColon])}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(To);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;const e=this.create(Io);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(ji.AtKeyword,this.keyframeRegex))return null;const e=this.create(Mo),t=this.create(io);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,Na.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,Na.IdentifierExpected,[ji.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([to.Keyframe])}_parseKeyframeSelector(){const e=this.create(Ao);let t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(ji.Percentage)&&(t=!0),!t)return null;for(;this.accept(ji.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(ji.Percentage)&&(t=!0),!t)return this.finish(e,Na.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(Ao),t=this.mark();let n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(ji.Percentage)&&(n=!0),!n)return null;for(;this.accept(ji.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(ji.Percentage)&&(n=!0),!n)return this.restoreAtMark(t),null;return this.peek(ji.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(Bo);return this.consumeToken(),this.peekRegExp(ji.Ident,/^--/)&&e.setName(this._parseIdent([to.Property]))?this._parseBody(e,this._parseDeclaration.bind(this)):this.finish(e,Na.IdentifierExpected)}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const t=this.create(qo);this.consumeToken();const n=this._parseLayerNameList();return n&&t.setNames(n),n&&1!==n.getChildren().length||!this.peek(ji.CurlyL)?this.accept(ji.SemiColon)?this.finish(t):this.finish(t,Na.SemiColonExpected):this._parseBody(t,this._parseLayerDeclaration.bind(this,e))}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){const e=this.createNode(eo.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(ji.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,Na.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(eo.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,Na.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const t=this.create(Uo);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){const e=this.create(Yo);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(ji.Ident,/^(and|or)$/i)){const t=this.token.text.toLowerCase();for(;this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){const e=this.create(Yo);if(this.accept(ji.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration([ji.ParenthesisR]))||this._parseSupportsCondition()?this.accept(ji.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,Na.RightParenthesisExpected,[ji.ParenthesisR],[]):this.finish(e,Na.ConditionExpected);if(this.peek(ji.Ident)){const t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(ji.ParenthesisL)){let t=1;for(;this.token.type!==ji.EOF&&0!==t;)this.token.type===ji.ParenthesisL?t++:this.token.type===ji.ParenthesisR&&t--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,Na.LeftParenthesisExpected,[],[ji.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;const t=this.create($o);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,Na.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(Ho);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,Na.MediaQueryExpected);for(;this.accept(ji.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,Na.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(Go),t=this.mark();if(this.acceptIdent("not"),this.peek(ji.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){const e=this.mark(),t=this.create(sa);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,Na.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(Jo);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(ji.ParenthesisL))return this.finish(e,Na.LeftParenthesisExpected,[],[ji.CurlyL]);if(this.peek(ji.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[],[ji.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[ji.ParenthesisR],t=this.create(Xo);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(ji.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,Na.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,Na.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,Na.TermExpected,[],e)}}else{if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,Na.IdentifierExpected,[],e);if(!this._parseMediaFeatureRangeOperator())return this.finish(t,Na.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,Na.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,Na.TermExpected,[],e)}return this.finish(t)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){const e=this.create(io);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;const e=this.create(Qo);if(this.consumeToken(),e.addChild(this._parsePageSelector()))for(;this.accept(ji.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,Na.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(ji.AtKeyword))return null;const e=this.create(Zo);return this.acceptOneKeyword(Vc)||this.markError(e,Na.UnknownAtRule,[],[ji.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(ji.Ident)&&!this.peek(ji.Colon))return null;const e=this.create(io);return e.addChild(this._parseIdent()),this.accept(ji.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,Na.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(Ko);return this.consumeToken(),this.resync([],[ji.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;const t=this.create(jo);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(io);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){const e=this.create(io);if(this.accept(ji.ParenthesisL)){if(this.peekIdent("not")||this.peek(ji.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[],[ji.CurlyL])}else{if(!this.acceptIdent("style"))return this.finish(e,Na.LeftParenthesisExpected,[],[ji.CurlyL]);if(this.hasWhitespace()||!this.accept(ji.ParenthesisL))return this.finish(e,Na.LeftParenthesisExpected,[],[ji.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[],[ji.CurlyL])}return this.finish(e)}_parseStyleQuery(){const e=this.create(io);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(ji.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([ji.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(io);return this.accept(ji.ParenthesisL)?(e.addChild(this._parseStyleQuery()),this.accept(ji.ParenthesisR)?this.finish(e):this.finish(e,Na.RightParenthesisExpected,[],[ji.CurlyL])):this.finish(e,Na.LeftParenthesisExpected,[],[ji.CurlyL])}_parseUnknownAtRule(){if(!this.peek(ji.AtKeyword))return null;const e=this.create(wa);e.addChild(this._parseUnknownAtRuleName());const t=()=>0===r&&0===i&&0===s;let n=0,r=0,i=0,s=0;e:for(;;){switch(this.token.type){case ji.SemiColon:if(t())break e;break;case ji.EOF:return r>0?this.finish(e,Na.RightCurlyExpected):s>0?this.finish(e,Na.RightSquareBracketExpected):i>0?this.finish(e,Na.RightParenthesisExpected):this.finish(e);case ji.CurlyL:n++,r++;break;case ji.CurlyR:if(r--,n>0&&0===r){if(this.consumeToken(),s>0)return this.finish(e,Na.RightSquareBracketExpected);if(i>0)return this.finish(e,Na.RightParenthesisExpected);break e}if(r<0){if(0===i&&0===s)break e;return this.finish(e,Na.LeftCurlyExpected)}break;case ji.ParenthesisL:i++;break;case ji.ParenthesisR:if(i--,i<0)return this.finish(e,Na.LeftParenthesisExpected);break;case ji.BracketL:s++;break;case ji.BracketR:if(s--,s<0)return this.finish(e,Na.LeftSquareBracketExpected)}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(io);return this.accept(ji.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(ji.Dashmatch)||this.peek(ji.Includes)||this.peek(ji.SubstringOperator)||this.peek(ji.PrefixOperator)||this.peek(ji.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(eo.Operator);return this.consumeToken(),this.finish(e)}return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(io);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(io);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=eo.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=eo.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){const e=this.create(io);return this.consumeToken(),e.type=eo.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){const e=this.create(io);return this.consumeToken(),e.type=eo.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){const e=this.create(io);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=eo.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){const e=this.create(mo);let t=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&t++;(0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(eo.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(ji.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(eo.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,Na.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(eo.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,Na.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),t=this.createNode(eo.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),t.addChild(this._parseSelectorIdent())||this.acceptDelim("*")?this.finish(t):(this.restoreAtMark(e),null)}_parseNamespacePrefix(){const e=this.mark(),t=this.createNode(eo.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(ji.BracketL))return null;const e=this.create(ra);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(ji.BracketR)?this.finish(e):this.finish(e,Na.RightSquareBracketExpected)):this.finish(e,Na.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(ji.ParenthesisL)){const t=()=>{const e=this.create(io);if(!e.addChild(this._parseSelector(!0)))return null;for(;this.accept(ji.Comma)&&e.addChild(this._parseSelector(!0)););return this.peek(ji.ParenthesisR)?this.finish(e):null};if(!e.addChild(this.try(t))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(t)))return this.finish(e,Na.SelectorExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(ji.Colon))return null;const e=this.mark(),t=this.createNode(eo.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(ji.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,Na.IdentifierExpected):this.finish(t))}_tryParsePrio(){const e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(ji.Exclamation))return null;const e=this.createNode(eo.Prio);return this.accept(ji.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const t=this.create(ea);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(ji.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;const e=this.create(oo);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(ji.BracketL))return null;const e=this.createNode(eo.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(ji.BracketR)?this.finish(e):this.finish(e,Na.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let n=this.create(ta);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,Na.TermExpected);n=this.finish(n);const r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)}_parseTerm(){let e=this.create(na);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(ji.ParenthesisL))return null;const e=this.create(io);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(ji.ParenthesisR)?this.finish(e):this.finish(e,Na.RightParenthesisExpected)}_parseNumeric(){if(this.peek(ji.Num)||this.peek(ji.Percentage)||this.peek(ji.Resolution)||this.peek(ji.Length)||this.peek(ji.EMS)||this.peek(ji.EXS)||this.peek(ji.Angle)||this.peek(ji.Time)||this.peek(ji.Dimension)||this.peek(ji.ContainerQueryLength)||this.peek(ji.Freq)){const e=this.create(ca);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(ji.String)&&!this.peek(ji.BadString))return null;const e=this.createNode(eo.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(ji.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),t=this.createNode(eo.URILiteral);return this.accept(ji.Ident),this.hasWhitespace()||!this.peek(ji.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(ji.ParenthesisR)?this.finish(t):this.finish(t,Na.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(io);return this.accept(ji.String)||this.accept(ji.BadString)||this.acceptUnquotedString()?this.finish(e):null}_parseIdent(e){if(!this.peek(ji.Ident))return null;const t=this.create(ao);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(ji.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){const e=this.mark(),t=this.create(xo);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(ji.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,Na.ExpressionExpected);return this.accept(ji.ParenthesisR)?this.finish(t):this.finish(t,Na.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(ji.Ident))return null;const e=this.create(ao);if(e.referenceTypes=[to.Function],this.acceptIdent("progid")){if(this.accept(ji.Colon))for(;this.accept(ji.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(Co);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(ji.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){const e=this.create(ia);return this.consumeToken(),this.finish(e)}return null}}function Bc(e,t){return-1!==e.indexOf(t)}function Kc(...e){const t=[];for(const n of e)for(const e of n)Bc(t,e)||t.push(e);return t}class jc{constructor(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,t=0){return this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){const n=e+t,r=function(e,t){let n=0,r=e.length;if(0===r)return 0;for(;ne.offset>n);if(0===r)return this;const i=this.children[r-1];return i.offset<=e&&i.offset+i.length>=e+t?i.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let n=0;n/g,">")}function th(e,t){if(!e.description||""===e.description)return"";if("string"!=typeof e.description)return e.description.value;let n="";if(!1!==t?.documentation){e.status&&(n+=Qc(e.status)),n+=e.description;const t=rh(e.browsers);t&&(n+="\n("+t+")"),"syntax"in e&&(n+=`\n\nSyntax: ${e.syntax}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map(e=>`${e.name}: ${e.url}`).join(" | ")),n}function nh(e,t){if(!e.description||""===e.description)return"";let n="";if(!1!==t?.documentation){e.status&&(n+=Qc(e.status)),"string"==typeof e.description?n+=eh(e.description):n+=e.description.kind===ll.Markdown?e.description.value:eh(e.description.value);const t=rh(e.browsers);t&&(n+="\n\n("+eh(t)+")"),"syntax"in e&&e.syntax&&(n+=`\n\nSyntax: ${eh(e.syntax)}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | ")),n}function rh(e=[]){return 0===e.length?null:e.map(e=>{let t="";const n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in Yc&&(t+=Yc[r]),i&&(t+=" "+i),t}).join(", ")}var ih;(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else o>c&&(47===e.charCodeAt(i+d)?h=d:0===d&&(h=0));break}var p=e.charCodeAt(i+d);if(p!==n.charCodeAt(a+d))break;47===p&&(h=d)}var u="";for(d=i+h+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===u.length?u+="..":u+="/..");return u.length>0?u+n.slice(a+h):(a+=h,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!o){i=r+1;break}}else-1===l&&(o=!1,l=r+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=l))}return i===s?s=l:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(s=!1,i=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,l=-1,c=!0,h=e.length-1,d=0;h>=r;--h)if(47!==(i=e.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===i?-1===o?o=h:1!==d&&(d=1):-1!==o&&(d=-1);else if(!c){a=h+1;break}return-1===o||-1===l||0===d||1===d&&o===l-1&&o===a+1?-1!==l&&(n.base=n.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(a,o),n.base=e.slice(a,l)),n.ext=e.slice(o,l)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>h,Utils:()=>k}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.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(s.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 ("//")')}const a="",l="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,n||a),this.query=r||a,this.fragment=i||a,o(this,s))}get fsPath(){return g(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===i?i=this.query:null===i&&(i=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new p(t,n,r,i,s)}static parse(e,t=!1){const n=c.exec(e);return n?new p(n[2]||a,y(n[4]||a),y(n[5]||a),y(n[7]||a),y(n[9]||a),t):new p(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){const e=t.indexOf(l,2);-1===e?(n=t.substring(2),t=l):(n=t.substring(2,e),t=t.substring(e)||l)}return new p("file",n,t,a,a)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class p extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const u={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 m(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=u[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function f(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function b(e,t){const n=t?f:m;let r="",{scheme:i,authority:s,path:o,query:a,fragment:c}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=l,r+=l),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:m(c,!1,!1)),r}function w(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+w(e.substr(3)):e}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(e){return e.match(v)?e.replace(v,e=>w(e)):e}var x=n(470);const S=x.posix||x,C="/";var k;!function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==C&&(n=C+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===C&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===C)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}}(k||(k={}))})(),ih=r})();const{URI:sh,Utils:oh}=ih;function ah(e){return oh.dirname(sh.parse(e)).toString(!0)}function lh(e,...t){return oh.joinPath(sh.parse(e),...t).toString(!0)}class ch{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){const n={items:[],isIncomplete:!1};for(const r of this.literalCompletions){const i=r.uriValue,s=dh(i);if("."===s||".."===s)n.isIncomplete=!0;else{const s=await this.providePathSuggestions(i,r.position,r.range,e,t);for(let e of s)n.items.push(e)}}for(const r of this.importCompletions){const i=r.pathValue,s=dh(i);if("."===s||".."===s)n.isIncomplete=!0;else{let s=await this.providePathSuggestions(i,r.position,r.range,e,t);"scss"===e.languageId&&s.forEach(e=>{Xs(e.label,"_")&&Ys(e.label,".scss")&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))});for(let e of s)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,r,i){const s=dh(e),o=Xs(e,"'")||Xs(e,'"'),a=o?s.slice(0,t.character-(n.start.character+1)):s.slice(0,t.character-n.start.character),l=r.uri,c=o?function(e,t,n){const r=mh(e.start,t),i=mh(e.end,n);return La.create(r,i)}(n,1,-1):n,h=function(e,t,n){let r;const i=e.lastIndexOf("/");if(-1===i)r=n;else{const e=t.slice(i+1),s=mh(n.end,-e.length),o=e.indexOf(" ");let a;a=-1!==o?mh(s,o):n.end,r=La.create(s,a)}return r}(a,s,c),d=a.substring(0,a.lastIndexOf("/")+1);let p=i.resolveReference(d||".",l);if(p)try{const e=[],t=await this.readDirectory(p);for(const[n,r]of t)n.charCodeAt(0)===hh||r!==sc.Directory&&lh(p,n)===l||e.push(ph(n,r===sc.Directory,h));return e}catch(yp){}return[]}}const hh=".".charCodeAt(0);function dh(e){return Xs(e,"'")||Xs(e,'"')?e.slice(1,-1):e}function ph(e,t,n){return t?{label:uh(e+="/"),kind:hl.Folder,textEdit:Ja.replace(n,uh(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}:{label:uh(e),kind:hl.File,textEdit:Ja.replace(n,uh(e))}}function uh(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function mh(e,t){return Aa.create(e.line,e.character+t)}const fh=dl.Snippet,gh={title:"Suggest",command:"editor.action.triggerSuggest"};var bh;!function(e){e.Enums=" ",e.Normal="d",e.VendorPrefixed="x",e.Term="y",e.Variable="z"}(bh||(bh={}));class wh{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new Xc(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,r,i=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,i);const s=new ch(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[s].concat(o);const a=this.doComplete(e,t,n,i);try{const t=await s.computeCompletions(e,r);return{isIncomplete:a.isIncomplete||t.isIncomplete,itemDefaults:a.itemDefaults,items:t.items.concat(a.items)}}finally{this.completionParticipants=o}}doComplete(e,t,n,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=function(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}(e,this.offset),this.defaultReplaceRange=La.create(Aa.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=r;try{const e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=ro(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(n instanceof vo)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof ea)n.parent instanceof da?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof mo){const t=n.findAParent(eo.ExtendsReference,eo.Ruleset);if(t)if(t.type===eo.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{const n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof Co)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof co)this.getCompletionsForDeclarations(n,e);else if(n instanceof ha)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof po)this.getCompletionsForRuleSet(n,e);else if(n instanceof da)this.getCompletionsForInterpolation(n,e);else if(n instanceof No)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof ga)this.getCompletionsForMixinReference(n,e);else if(n instanceof xo)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof Uo)this.getCompletionsForSupports(n,e);else if(n instanceof Yo)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof ua)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===eo.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(null===n.parent)this.getCompletionForTopLevel(e);else{if(n.type!==eo.StringLiteral||!this.isImportPathParent(n.parent.type))continue;this.getCompletionForImportPath(n,e)}if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),0===e.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,e),this.finalize(e)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===eo.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(-1!==e.indexOf(n.type))return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){const n=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(i=>{let s,o,a=!1;e?(s=this.getCompletionRange(e.getProperty()),o=i.name,Uc(e.colonPosition)||(o+=": ",a=!0)):(s=this.getCompletionRange(null),o=i.name+": ",a=!0),!e&&r&&(o+="$0;"),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(s.end)&&(o+="$0;");const l={label:i.name,documentation:Zc(i,this.doesSupportMarkdown()),tags:vh(i)?[pl.Deprecated]:[],textEdit:Ja.replace(s,o),insertTextFormat:dl.Snippet,kind:hl.Property};i.restrictions||(a=!1),n&&a&&(l.command=gh);const c=(255-("number"==typeof i.relevance?Math.min(Math.max(i.relevance,0),99):50)).toString(16),h=Xs(i.name,"-")?bh.VendorPrefixed:bh.Normal;l.sortText=h+"_"+c,t.items.push(l)}),this.completionParticipants.forEach(e=>{e.onCssProperty&&e.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){const n=e.getFullPropertyName(),r=this.cssDataManager.getProperty(n);let i=e.getValue()||null;for(;i&&i.hasChildren();)i=i.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(i)})}),r){if(r.restrictions)for(const e of r.restrictions)switch(e){case"color":this.getColorProposals(r,i,t);break;case"position":this.getPositionProposals(r,i,t);break;case"repeat":this.getRepeatStyleProposals(r,i,t);break;case"line-style":this.getLineStyleProposals(r,i,t);break;case"line-width":this.getLineWidthProposals(r,i,t);break;case"geometry-box":this.getGeometryBoxProposals(r,i,t);break;case"box":this.getBoxProposals(r,i,t);break;case"image":this.getImageProposals(r,i,t);break;case"timing-function":this.getTimingFunctionProposals(r,i,t);break;case"shape":this.getBasicShapeProposals(r,i,t)}this.getValueEnumProposals(r,i,t),this.getCSSWideKeywordProposals(r,i,t),this.getUnitProposals(r,i,t)}else{const n=function(e,t){const n=t.getFullPropertyName(),r=new yh;function i(e){return(e instanceof ao||e instanceof ca||e instanceof ia)&&r.add(e.getText()),!0}function s(e){const t=e.getFullPropertyName();return n===t}function o(e){if(e instanceof bo&&e!==t&&s(e)){const t=e.getValue();t&&t.accept(i)}return!0}return e.accept(o),r}(this.styleSheet,e);for(const e of n.getEntries())t.items.push({label:e,textEdit:Ja.replace(this.getCompletionRange(i),e),kind:hl.Value})}return this.getVariableProposals(i,t),this.getTermProposals(r,i,t),t}getValueEnumProposals(e,t,n){if(e.values)for(const r of e.values){let i,s=r.name;if(Ys(s,")")){const e=s.lastIndexOf("(");-1!==e&&(s=s.substring(0,e+1)+"$1"+s.substring(e+1),i=fh)}let o=bh.Enums;Xs(r.name,"-")&&(o+=bh.VendorPrefixed);const a={label:r.name,documentation:Zc(r,this.doesSupportMarkdown()),tags:vh(e)?[pl.Deprecated]:[],textEdit:Ja.replace(this.getCompletionRange(t),s),sortText:o,kind:hl.Value,insertTextFormat:i};n.items.push(a)}return n}getCSSWideKeywordProposals(e,t,n){for(const r in Dc)n.items.push({label:r,documentation:Dc[r],textEdit:Ja.replace(this.getCompletionRange(t),r),kind:hl.Value});for(const r in Mc){const e=xh(r);n.items.push({label:r,documentation:Mc[r],textEdit:Ja.replace(this.getCompletionRange(t),e),kind:hl.Function,insertTextFormat:fh,command:Xs(r,"var")?gh:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){const n=this.getSymbolContext().findSymbolsAtOffset(this.offset,to.Variable);for(const r of n){const n=Xs(r.name,"--")?`var(${r.name})`:r.name,i={label:r.name,documentation:r.value?Qs(r.value):r.value,textEdit:Ja.replace(this.getCompletionRange(e),n),kind:hl.Variable,sortText:bh.Variable};if("string"==typeof i.documentation&&yc(i.documentation)&&(i.kind=hl.Color),r.node.type===eo.FunctionParameter){const e=r.node.getParent();e.type===eo.MixinDeclaration&&(i.detail=Ea("argument from '{0}'",e.getName()))}t.items.push(i)}return t}getVariableProposalsForCSSVarFunction(e){const t=new yh;this.styleSheet.acceptVisitor(new Ch(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,to.Variable);for(const r of n){if(Xs(r.name,"--")){const t={label:r.name,documentation:r.value?Qs(r.value):r.value,textEdit:Ja.replace(this.getCompletionRange(null),r.name),kind:hl.Variable};"string"==typeof t.documentation&&yc(t.documentation)&&(t.kind=hl.Color),e.items.push(t)}t.remove(r.name)}for(const r of t.getEntries())if(Xs(r,"--")){const t={label:r,textEdit:Ja.replace(this.getCompletionRange(null),r),kind:hl.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let r="0";if(this.currentWord.length>0){const e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(r=e[0],n.isIncomplete=r.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===eo.Term&&(t=t.getParent()),e.restrictions)for(const i of e.restrictions){const e=Oc[i];if(e)for(const i of e){const e=r+i;n.items.push({label:e,textEdit:Ja.replace(this.getCompletionRange(t),e),kind:hl.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const t=-1!==e.end?this.textDocument.positionAt(e.end):this.position,n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return La.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(const i in mc)n.items.push({label:i,documentation:mc[i],textEdit:Ja.replace(this.getCompletionRange(t),i),kind:hl.Color});for(const i in gc)n.items.push({label:i,documentation:gc[i],textEdit:Ja.replace(this.getCompletionRange(t),i),kind:hl.Value});const r=new yh;this.styleSheet.acceptVisitor(new Sh(r,this.offset));for(const i of r.getEntries())n.items.push({label:i,textEdit:Ja.replace(this.getCompletionRange(t),i),kind:hl.Color});for(const i of pc)n.items.push({label:i.label,detail:i.func,documentation:i.desc,textEdit:Ja.replace(this.getCompletionRange(t),i.insertText),insertTextFormat:fh,kind:hl.Function});return n}getPositionProposals(e,t,n){for(const r in Ec)n.items.push({label:r,documentation:Ec[r],textEdit:Ja.replace(this.getCompletionRange(t),r),kind:hl.Value});return n}getRepeatStyleProposals(e,t,n){for(const r in Fc)n.items.push({label:r,documentation:Fc[r],textEdit:Ja.replace(this.getCompletionRange(t),r),kind:hl.Value});return n}getLineStyleProposals(e,t,n){for(const r in Rc)n.items.push({label:r,documentation:Rc[r],textEdit:Ja.replace(this.getCompletionRange(t),r),kind:hl.Value});return n}getLineWidthProposals(e,t,n){for(const r of Nc)n.items.push({label:r,textEdit:Ja.replace(this.getCompletionRange(t),r),kind:hl.Value});return n}getGeometryBoxProposals(e,t,n){for(const r in Tc)n.items.push({label:r,documentation:Tc[r],textEdit:Ja.replace(this.getCompletionRange(t),r),kind:hl.Value});return n}getBoxProposals(e,t,n){for(const r in Ic)n.items.push({label:r,documentation:Ic[r],textEdit:Ja.replace(this.getCompletionRange(t),r),kind:hl.Value});return n}getImageProposals(e,t,n){for(const r in Ac){const e=xh(r);n.items.push({label:r,documentation:Ac[r],textEdit:Ja.replace(this.getCompletionRange(t),e),kind:hl.Function,insertTextFormat:r!==e?fh:void 0})}return n}getTimingFunctionProposals(e,t,n){for(const r in Lc){const e=xh(r);n.items.push({label:r,documentation:Lc[r],textEdit:Ja.replace(this.getCompletionRange(t),e),kind:hl.Function,insertTextFormat:r!==e?fh:void 0})}return n}getBasicShapeProposals(e,t,n){for(const r in zc){const e=xh(r);n.items.push({label:r,documentation:zc[r],textEdit:Ja.replace(this.getCompletionRange(t),e),kind:hl.Function,insertTextFormat:r!==e?fh:void 0})}return n}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof po?this.getCompletionsForRuleSet(t,e):t instanceof Uo?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:Ja.replace(this.getCompletionRange(null),t.name),documentation:Zc(t,this.doesSupportMarkdown()),tags:vh(t)?[pl.Deprecated]:[],kind:hl.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){const n=e.getDeclarations();if(n&&n.endsWith("}")&&this.offset>=n.end)return this.getCompletionForTopLevel(t);return!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){const r=this.findInNodePath(eo.PseudoSelector,eo.IdentifierSelector,eo.ClassSelector,eo.ElementNameSelector);!r&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=La.create(Aa.create(this.position.line,this.position.character-this.currentWord.length),this.position));this.cssDataManager.getPseudoClasses().forEach(e=>{const t=xh(e.name),i={label:e.name,textEdit:Ja.replace(this.getCompletionRange(r),t),documentation:Zc(e,this.doesSupportMarkdown()),tags:vh(e)?[pl.Deprecated]:[],kind:hl.Function,insertTextFormat:e.name!==t?fh:void 0};Xs(e.name,":-")&&(i.sortText=bh.VendorPrefixed),n.items.push(i)});if(this.cssDataManager.getPseudoElements().forEach(e=>{const t=xh(e.name),i={label:e.name,textEdit:Ja.replace(this.getCompletionRange(r),t),documentation:Zc(e,this.doesSupportMarkdown()),tags:vh(e)?[pl.Deprecated]:[],kind:hl.Function,insertTextFormat:e.name!==t?fh:void 0};Xs(e.name,"::-")&&(i.sortText=bh.VendorPrefixed),n.items.push(i)}),!t){for(const e of Pc)n.items.push({label:e,textEdit:Ja.replace(this.getCompletionRange(r),e),kind:hl.Keyword});for(const e of Wc)n.items.push({label:e,textEdit:Ja.replace(this.getCompletionRange(r),e),kind:hl.Keyword})}const i={};i[this.currentWord]=!0;const s=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===eo.SimpleSelector&&e.length>0){const t=s.substr(e.offset,e.length);return"."!==t.charAt(0)||i[t]||(i[t]=!0,n.items.push({label:t,textEdit:Ja.replace(this.getCompletionRange(r),t),kind:hl.Keyword})),!1}return!0}),e&&e.isNested()){const t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&0===e.getSelectors().getChildren().indexOf(t)&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;const n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof fo){const e=n;if(!Uc(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(Uc(e.semicolonPosition)&&e.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const n=e.getParent();if(n instanceof Co)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;const r=e.findParent(eo.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;const i=e.findChildAtOffset(this.offset,!0);return i?i instanceof ca||i instanceof ao?this.getCompletionsForDeclarationValue(r,t):t:this.getCompletionsForDeclarationValue(r,t)}getCompletionsForFunctionArgument(e,t,n){const r=t.getIdentifier();return r&&r.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(n)),n}getCompletionsForFunctionDeclaration(e,t){const n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),t}getTermProposals(e,t,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,to.Function);for(const i of r)i.node instanceof No&&n.items.push(this.makeTermProposal(i,i.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;const r=t.getChildren().map(e=>e instanceof So?e.getName():e.getText()),i=e.name+"("+r.map((e,t)=>"${"+(t+1)+":"+e+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+r.join(", ")+")",textEdit:Ja.replace(this.getCompletionRange(n),i),insertTextFormat:fh,kind:hl.Function,sortText:bh.Term}}getCompletionsForSupportsCondition(e,t){const n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof bo)return!Uc(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof Yo)return this.getCompletionsForSupportsCondition(n,t)}return Uc(e.lParent)&&this.offset>e.lParent&&(!Uc(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){const n=e.getDeclarations();if(!n||this.offset<=n.offset){const n=e.findFirstChildBeforeOffset(this.offset);return n instanceof Yo?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,r,i;if(e.hasChildren()){const t=e.getChild(0);n=t.getText(),r=this.position,i=this.getCompletionRange(t)}else{n="",r=this.position;const t=this.textDocument.positionAt(e.offset+4);i=La.create(t,t)}return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){const n=this.textDocument.getText();return e>=0&&e"),this.writeLine(t,r.join(""))}}var Rh;!function(e){function t(e){const t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,n){return n+t(e)+n},e.remove=t}(Rh||(Rh={}));class Nh{constructor(){this.id=0,this.attr=0,this.tag=0}}function Ih(e,t){let n=new kh;for(const r of e.getChildren())switch(r.type){case eo.SelectorCombinator:if(t){const e=r.getText().split("&");if(1===e.length){n.addAttr("name",e[0]);break}if(n=t.cloneWithParent(),e[0]){n.findRoot().prepend(e[0])}for(let r=1;r1){const e=t.cloneWithParent();n.addChild(e.findRoot()),n=e}n.append(e[r])}}break;case eo.SelectorPlaceholder:if(r.matches("@at-root"))return n;case eo.ElementNameSelector:const e=r.getText();n.addAttr("name","*"===e?"element":Th(e));break;case eo.ClassSelector:n.addAttr("class",Th(r.getText().substring(1)));break;case eo.IdentifierSelector:n.addAttr("id",Th(r.getText().substring(1)));break;case eo.MixinDeclaration:n.addAttr("class",r.getName());break;case eo.PseudoSelector:n.addAttr(Th(r.getText()),"");break;case eo.AttributeSelector:const i=r,s=i.getIdentifier();if(s){const e=i.getValue(),t=i.getOperator();let r;if(e&&t)switch(Th(t.getText())){case"|=":r=`${Rh.remove(Th(e.getText()))}-…`;break;case"^=":r=`${Rh.remove(Th(e.getText()))}…`;break;case"$=":r=`…${Rh.remove(Th(e.getText()))}`;break;case"~=":r=` … ${Rh.remove(Th(e.getText()))} … `;break;case"*=":r=`…${Rh.remove(Th(e.getText()))}…`;break;default:r=Rh.remove(Th(e.getText()))}n.addAttr(Th(s.getText()),r)}}return n}function Th(e){const t=new Js;t.setSource(e);const n=t.scanUnquotedString();return n?n.text:e}class Dh{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){const n=function(e){if(e.matches("@at-root"))return null;const t=new _h,n=[],r=e.getParent();if(r instanceof po){let e=r.getParent();for(;e&&!Ah(e);){if(e instanceof po){if(e.getSelectors().matches("@at-root"))break;n.push(e)}e=e.getParent()}}const i=new Mh(t);for(let s=n.length-1;s>=0;s--){const e=n[s].getSelectors().getChild(0);e&&i.processSelector(e)}return i.processSelector(e),t}(e);if(n){const r=new Fh('"').print(n,t);return r.push(this.selectorToSpecificityMarkedString(e)),r}return[]}simpleSelectorToMarkedString(e){const t=Ih(e),n=new Fh('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}isPseudoElementIdentifier(e){const t=e.match(/^::?([\w-]+)/);return!!t&&!!this.cssDataManager.getPseudoElement("::"+t[1])}selectorToSpecificityMarkedString(e){const t=e=>{const t=new Nh;let r=new Nh;for(const i of e)for(const e of i.getChildren()){const t=n(e);t.id>r.id?r=t:t.idr.attr?r=t:t.attrr.tag&&(r=t))}return t.id+=r.id,t.attr+=r.attr,t.tag+=r.tag,t},n=e=>{const r=new Nh;e:for(const i of e.getChildren()){switch(i.type){case eo.IdentifierSelector:r.id++;break;case eo.ClassSelector:case eo.AttributeSelector:r.attr++;break;case eo.ElementNameSelector:if(i.matches("*"))break;r.tag++;break;case eo.PseudoSelector:const e=i.getText(),n=i.getChildren();if(this.isPseudoElementIdentifier(e)){if(e.match(/^::slotted/i)&&n.length>0){r.tag++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}r.tag++;continue e}if(e.match(/^:where/i))continue e;if(e.match(/^:(?:not|has|is)/i)&&n.length>0){let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}if(e.match(/^:(?:host|host-context)/i)&&n.length>0){r.attr++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}if(e.match(/^:(?:nth-child|nth-last-child)/i)&&n.length>0){if(r.attr++,3===n.length&&23===n[1].type){let e=t(n[2].getChildren());r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue e}const e=new qc,i=n[1].getText();e.scanner.setSource(i);const s=e.scanner.scan(),o=e.scanner.scan();if("n"===s.text||"-n"===s.text&&"of"===o.text){const n=[],s=i.slice(o.offset+2).split(",");for(const t of s){const r=e.internalParse(t,e._parseSelector);r&&n.push(r)}let a=t(n);r.id+=a.id,r.attr+=a.attr,r.tag+=a.tag;continue e}continue e}r.attr++;continue e}if(i.getChildren().length>0){const e=n(i);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag}}return r},r=n(e);return`[${Ea("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${r.id}, ${r.attr}, ${r.tag})`}}class Mh{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof _h)&&e.getChildren().some(e=>e.hasChildren()&&e.getChild(0).type===eo.SelectorCombinator)){const e=this.element.findRoot();e.parent instanceof _h&&(t=this.element,this.element=e.parent,this.element.removeChild(e),this.prev=null)}for(const n of e.getChildren()){if(n instanceof mo){if(this.prev instanceof mo){const e=new Eh("…");this.element.addChild(e),this.element=e}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new Eh("⋮"));const e=Ih(n,t),r=e.findRoot();this.element.addChild(r),this.element=e}(n instanceof mo||n.type===eo.SelectorCombinatorParent||n.type===eo.SelectorCombinatorShadowPiercingDescendant||n.type===eo.SelectorCombinatorSibling||n.type===eo.SelectorCombinatorAllSiblings)&&(this.prev=n)}}}function Ah(e){switch(e.type){case eo.MixinDeclaration:case eo.Stylesheet:return!0}return!1}class Lh{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new Dh(t)}configure(e){this.defaultSettings=e}doHover(e,t,n,r=this.defaultSettings){function i(t){return La.create(e.positionAt(t.offset),e.positionAt(t.end))}const s=ro(n,e.offsetAt(t));let o,a=null;for(let l=0;l"string"==typeof e?e:e.value):e.value}doesSupportMarkdown(){if(!Uc(this.supportsMarkdown)){if(!Uc(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&-1!==e.contentFormat.indexOf(ll.Markdown)}return this.supportsMarkdown}}const zh=/^\w+:\/\//,Oh=/^data:/;class Ph{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,n){const r=new Xc(n),i=no(n,e.offsetAt(t));if(!i)return null;const s=r.findSymbolFromNode(i);return s?{uri:e.uri,range:Wh(s.node,e)}:null}findReferences(e,t,n){return this.findDocumentHighlights(e,t,n).map(t=>({uri:e.uri,range:t.range}))}getHighlightNode(e,t,n){let r=no(n,e.offsetAt(t));if(r&&r.type!==eo.Stylesheet&&r.type!==eo.Declarations)return r.type===eo.Identifier&&r.parent&&r.parent.type===eo.ClassSelector&&(r=r.parent),r}findDocumentHighlights(e,t,n){const r=[],i=this.getHighlightNode(e,t,n);if(!i)return r;const s=new Xc(n),o=s.findSymbolFromNode(i),a=i.getText();return n.accept(t=>{if(o){if(s.matchesSymbol(t,o))return r.push({kind:$h(t),range:Wh(t,e)}),!1}else i&&i.type===t.type&&t.matches(a)&&r.push({kind:$h(t),range:Wh(t,e)});return!0}),r}isRawStringDocumentLinkNode(e){return e.type===eo.Import}findDocumentLinks(e,t,n){const r=this.findUnresolvedLinks(e,t),i=[];for(let s of r){const t=s.link,r=t.target;if(!r||Oh.test(r));else if(zh.test(r))i.push(t);else{const s=n.resolveReference(r,e.uri);s&&(t.target=s),i.push(t)}}return i}async findDocumentLinks2(e,t,n){const r=this.findUnresolvedLinks(e,t),i=[];for(let s of r){const t=s.link,r=t.target;if(!r||Oh.test(r));else if(zh.test(r))i.push(t);else{const o=await this.resolveReference(r,e.uri,n,s.isRawLink);void 0!==o&&(t.target=o,i.push(t))}}return i}findUnresolvedLinks(e,t){const n=[],r=t=>{let r=t.getText();const i=Wh(t,e);if(i.start.line===i.end.line&&i.start.character===i.end.character)return;(Xs(r,"'")||Xs(r,'"'))&&(r=r.slice(1,-1));const s=!!t.parent&&this.isRawStringDocumentLinkNode(t.parent);n.push({link:{target:r,range:i},isRawLink:s})};return t.accept(e=>{if(e.type===eo.URILiteral){const t=e.getChild(0);return t&&r(t),!1}if(e.parent&&this.isRawStringDocumentLinkNode(e.parent)){const t=e.getText();return(Xs(t,"'")||Xs(t,'"'))&&r(e),!1}return!0}),n}findSymbolInformations(e,t){const n=[];return this.collectDocumentSymbols(e,t,(t,r,i)=>{const s=i instanceof io?Wh(i,e):i,o={name:t||Ea(""),kind:r,location:za.create(e.uri,s)};n.push(o)}),n}findDocumentSymbols(e,t){const n=[],r=[];return this.collectDocumentSymbols(e,t,(t,i,s,o,a)=>{const l=s instanceof io?Wh(s,e):s;let c=o instanceof io?Wh(o,e):o;c&&Vh(l,c)||(c=La.create(l.start,l.start));const h={name:t||Ea(""),kind:i,range:l,selectionRange:c};let d=r.pop();for(;d&&!Vh(d[1],l);)d=r.pop();if(d){const e=d[0];e.children||(e.children=[]),e.children.push(h),r.push(d)}else n.push(h);a&&r.push([h,Wh(a,e)])}),n}collectDocumentSymbols(e,t,n){t.accept(t=>{if(t instanceof po){for(const r of t.getSelectors().getChildren())if(r instanceof uo){const i=La.create(e.positionAt(r.offset),e.positionAt(t.end));n(r.getText(),kl.Class,i,r,t.getDeclarations())}}else if(t instanceof ha)n(t.getName(),kl.Variable,t,t.getVariable(),void 0);else if(t instanceof ba)n(t.getName(),kl.Method,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof No)n(t.getName(),kl.Function,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof Mo){const e=Ea("@keyframes {0}",t.getName());n(e,kl.Class,t,t.getIdentifier(),t.getDeclarations())}else if(t instanceof To){const e=Ea("@font-face");n(e,kl.Class,t,void 0,t.getDeclarations())}else if(t instanceof $o){const e=t.getChild(0);if(e instanceof Ho){const r="@media "+e.getText();n(r,kl.Module,t,e,t.getDeclarations())}}return!0})}findDocumentColors(e,t){const n=[];return t.accept(t=>{const r=function(e,t){const n=_c(e);if(n){return{color:n,range:Wh(e,t)}}return null}(t,e);return r&&n.push(r),!0}),n}getColorPresentations(e,t,n,r){const i=[],s=Math.round(255*n.red),o=Math.round(255*n.green),a=Math.round(255*n.blue);let l;l=1===n.alpha?`rgb(${s}, ${o}, ${a})`:`rgba(${s}, ${o}, ${a}, ${n.alpha})`,i.push({label:l,textEdit:Ja.replace(r,l)}),l=1===n.alpha?`#${Uh(s)}${Uh(o)}${Uh(a)}`:`#${Uh(s)}${Uh(o)}${Uh(a)}${Uh(Math.round(255*n.alpha))}`,i.push({label:l,textEdit:Ja.replace(r,l)});const c=kc(n);l=1===c.a?`hsl(${c.h}, ${Math.round(100*c.s)}%, ${Math.round(100*c.l)}%)`:`hsla(${c.h}, ${Math.round(100*c.s)}%, ${Math.round(100*c.l)}%, ${c.a})`,i.push({label:l,textEdit:Ja.replace(r,l)});const h=function(e){const t=kc(e),n=Math.min(e.red,e.green,e.blue),r=1-Math.max(e.red,e.green,e.blue);return{h:t.h,w:n,b:r,a:t.a}}(n);return l=1===h.a?`hwb(${h.h} ${Math.round(100*h.w)}% ${Math.round(100*h.b)}%)`:`hwb(${h.h} ${Math.round(100*h.w)}% ${Math.round(100*h.b)}% / ${h.a})`,i.push({label:l,textEdit:Ja.replace(r,l)}),i}prepareRename(e,t,n){const r=this.getHighlightNode(e,t,n);if(r)return La.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,t,n,r){const i=this.findDocumentHighlights(e,t,r).map(e=>Ja.replace(e.range,n));return{changes:{[e.uri]:i}}}async resolveModuleReference(e,t,n){if(Xs(t,"file://")){const r=function(e){const t=e.indexOf("/");if(-1===t)return"";if("@"===e[0]){const n=e.indexOf("/",t+1);return-1===n?e:e.substring(0,n)}return e.substring(0,t)}(e);if(r&&"."!==r&&".."!==r){const i=n.resolveReference("/",t),s=ah(t),o=await this.resolvePathToModule(r,s,i);if(o){return lh(o,e.substring(r.length+1))}}}}async mapReference(e,t){return e}async resolveReference(e,t,n,r=!1,i=this.defaultSettings){if("~"===e[0]&&"/"!==e[1]&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,n),r);const s=await this.mapReference(n.resolveReference(e,t),r);if(this.resolveModuleReferences){if(s&&await this.fileExists(s))return s;const i=await this.mapReference(await this.resolveModuleReference(e,t,n),r);if(i)return i}if(s&&!(await this.fileExists(s))){const s=n.resolveReference("/",t);if(i&&s){if(e in i)return this.mapReference(lh(s,i[e]),r);const t=e.indexOf("/"),n=`${e.substring(0,t)}/`;if(n in i){let t=lh(s,i[n].slice(0,-1));return this.mapReference(t=lh(t,e.substring(n.length-1)),r)}}}return s}async resolvePathToModule(e,t,n){const r=lh(t,"node_modules",e,"package.json");return await this.fileExists(r)?ah(r):n&&t.startsWith(n)&&t.length!==n.length?this.resolvePathToModule(e,ah(t),n):void 0}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const t=await this.fileSystemProvider.stat(e);return t.type!==sc.Unknown||-1!==t.size}catch(t){return!1}}}function Wh(e,t){return La.create(t.positionAt(e.offset),t.positionAt(e.end))}function Vh(e,t){const n=t.start.line,r=t.end.line,i=e.start.line,s=e.end.line;return!(ns||r>s)&&(!(n===i&&t.start.charactere.end.character)))}function $h(e){if(e.type===eo.Selector)return Sl.Write;if(e instanceof ao&&e.parent&&e.parent instanceof vo&&e.isCustomProperty)return Sl.Write;if(e.parent)switch(e.parent.type){case eo.FunctionDeclaration:case eo.MixinDeclaration:case eo.Keyframe:case eo.VariableDeclaration:case eo.FunctionParameter:return Sl.Write}return Sl.Read}function Uh(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}const qh=Ca.Warning,Bh=Ca.Error,Kh=Ca.Ignore;class jh{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}const Hh={AllVendorPrefixes:new jh("compatibleVendorPrefixes",Ea("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Kh),IncludeStandardPropertyWhenUsingVendorPrefix:new jh("vendorPrefix",Ea("When using a vendor-specific prefix also include the standard property"),qh),DuplicateDeclarations:new jh("duplicateProperties",Ea("Do not use duplicate style definitions"),Kh),EmptyRuleSet:new jh("emptyRules",Ea("Do not use empty rulesets"),qh),ImportStatemement:new jh("importStatement",Ea("Import statements do not load in parallel"),Kh),BewareOfBoxModelSize:new jh("boxModel",Ea("Do not use width or height when using padding or border"),Kh),UniversalSelector:new jh("universalSelector",Ea("The universal selector (*) is known to be slow"),Kh),ZeroWithUnit:new jh("zeroUnits",Ea("No unit for zero needed"),Kh),RequiredPropertiesForFontFace:new jh("fontFaceProperties",Ea("@font-face rule must define 'src' and 'font-family' properties"),qh),HexColorLength:new jh("hexColorLength",Ea("Hex colors must consist of three, four, six or eight hex numbers"),Bh),ArgsInColorFunction:new jh("argumentsInColorFunction",Ea("Invalid number of parameters"),Bh),UnknownProperty:new jh("unknownProperties",Ea("Unknown property."),qh),UnknownAtRules:new jh("unknownAtRules",Ea("Unknown at-rule."),qh),IEStarHack:new jh("ieHack",Ea("IE hacks are only necessary when supporting IE7 and older"),Kh),UnknownVendorSpecificProperty:new jh("unknownVendorSpecificProperties",Ea("Unknown vendor specific property."),Kh),PropertyIgnoredDueToDisplay:new jh("propertyIgnoredDueToDisplay",Ea("Property is ignored due to the display."),qh),AvoidImportant:new jh("important",Ea("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Kh),AvoidFloat:new jh("float",Ea("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Kh),AvoidIdSelector:new jh("idSelector",Ea("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Kh)},Gh={ValidProperties:new class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}("validProperties",Ea("A list of properties that are not validated against the `unknownProperties` rule."),[])};class Jh{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const t=function(e){switch(e){case"ignore":return Ca.Ignore;case"warning":return Ca.Warning;case"error":return Ca.Error}return null}(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}}class Xh{constructor(e){this.cssDataManager=e}doCodeActions(e,t,n,r){return this.doCodeActions2(e,t,n,r).map(t=>{const n=t.edit&&t.edit.documentChanges&&t.edit.documentChanges[0];return Ga.create(t.title,"_css.applyCodeAction",e.uri,e.version,n&&n.edits)})}doCodeActions2(e,t,n,r){const i=[];if(n.diagnostics)for(const s of n.diagnostics)this.appendFixesForMarker(e,r,s,i);return i}getFixesForUnknownProperty(e,t,n,r){const i=t.getName(),s=[];this.cssDataManager.getProperties().forEach(e=>{const t=function(e,t,n=4){let r=Math.abs(e.length-t.length);if(r>n)return 0;let i,s,o=[],a=[];for(i=0;i=i.length/2&&s.push({property:e.name,score:t})}),s.sort((e,t)=>t.score-e.score||e.property.localeCompare(t.property));let o=3;for(const a of s){const t=a.property,i=Ea("Rename to '{0}'",t),s=Ja.replace(n.range,t),l=sl.create(e.uri,e.version),c={documentChanges:[Za.create(l,[s])]},h=Dl.create(i,c,Nl.QuickFix);if(h.diagnostics=[n],r.push(h),--o<=0)return}}appendFixesForMarker(e,t,n,r){if(n.code!==Hh.UnknownProperty.id)return;const i=e.offsetAt(n.range.start),s=e.offsetAt(n.range.end),o=ro(t,i);for(let a=o.length-1;a>=0;a--){const t=o[a];if(t instanceof bo){const o=t.getProperty();if(o&&o.offset===i&&o.end===s)return void this.getFixesForUnknownProperty(e,o,n,r)}}}}class Yh{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function Qh(e,t,n,r){const i=e[t];i.value=n,n&&(Bc(i.properties,r)||i.properties.push(r))}function Zh(e,t,n,r){"top"===t||"right"===t||"bottom"===t||"left"===t?Qh(e,t,n,r):function(e,t,n){Qh(e,"top",t,n),Qh(e,"right",t,n),Qh(e,"bottom",t,n),Qh(e,"left",t,n)}(e,n,r)}function ed(e,t,n){switch(t.length){case 1:Zh(e,void 0,t[0],n);break;case 2:Zh(e,"top",t[0],n),Zh(e,"bottom",t[0],n),Zh(e,"right",t[1],n),Zh(e,"left",t[1],n);break;case 3:Zh(e,"top",t[0],n),Zh(e,"right",t[1],n),Zh(e,"left",t[1],n),Zh(e,"bottom",t[2],n);break;case 4:Zh(e,"top",t[0],n),Zh(e,"right",t[1],n),Zh(e,"bottom",t[2],n),Zh(e,"left",t[3],n)}}function td(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function nd(e,t=!0){return(!t||!td(e,["initial","unset"]))&&0!==parseFloat(e.getText())}function rd(e,t=!0){return e.map(e=>nd(e,t))}function id(e,t=!0){return!td(e,["none","hidden"])&&(!t||!td(e,["initial","unset"]))}function sd(e,t=!0){return e.map(e=>id(e,t))}function od(e){const t=e.getChildren();if(1===t.length){const e=t[0];return nd(e)&&id(e)}for(const n of t){const e=n;if(!nd(e,!1)||!id(e,!1))return!1}return!0}class ad{constructor(){this.data={}}add(e,t,n){let r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(t),n&&r.nodes.push(n)}}class ld{static entries(e,t,n,r,i){const s=new ld(t,n,r);return e.acceptVisitor(s),s.completeValidations(),s.getEntries(i)}constructor(e,t,n){this.cssDataManager=n,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new ad,this.validProperties={};const r=t.getSetting(Gh.ValidProperties);Array.isArray(r)&&r.forEach(e=>{if("string"==typeof e){const t=e.trim().toLowerCase();t.length&&(this.validProperties[t]=!0)}})}isValidPropertyDeclaration(e){const t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){const n=[];for(const r of e)r.fullPropertyName===t&&n.push(r);return n}fetchWithValue(e,t,n){const r=[];for(const i of e)if(i.fullPropertyName===t){const e=i.node.getValue();e&&this.findValueInExpression(e,n)&&r.push(i)}return r}findValueInExpression(e,t){let n=!1;return e.accept(e=>(e.type===eo.Identifier&&e.matches(t)&&(n=!0),!n)),n}getEntries(e=Ca.Warning|Ca.Error){return this.warnings.filter(t=>0!==(t.getLevel()&e))}addEntry(e,t,n){const r=new ka(e,t,this.settings.getRule(t),n);this.warnings.push(r)}getMissingNames(e,t){const n=e.slice(0);for(let i=0;i0){const e=this.fetch(n,"float");for(let t=0;t0){const e=this.fetch(n,"vertical-align");for(let t=0;t1)for(let n=0;ne.startsWith(i))&&o.delete(e)}}const a=[];for(let e=0,t=ld.prefixes.length;e!(e instanceof ta)||(r+=1,!1)),r!==n&&this.addEntry(e,Hh.ArgsInColorFunction)),!0}}ld.prefixes=["-ms-","-moz-","-o-","-webkit-"];class cd{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,n=this.settings){if(n&&!1===n.validate)return[];const r=[];r.push.apply(r,_a.entries(t)),r.push.apply(r,ld.entries(t,e,new Jh(n&&n.lint),this.cssDataManager));const i=[];for(const s in Hh)i.push(Hh[s].id);return r.filter(e=>e.getLevel()!==Ca.Ignore).map(function(t){const n=La.create(e.positionAt(t.getOffset()),e.positionAt(t.getOffset()+t.getLength())),r=e.languageId;return{code:t.getRule().id,source:r,message:t.getMessage(),severity:t.getLevel()===Ca.Warning?Ba.Warning:Ba.Error,range:n}})}}const hd="/".charCodeAt(0),dd="\n".charCodeAt(0),pd="\r".charCodeAt(0),ud="\f".charCodeAt(0),md="$".charCodeAt(0),fd="#".charCodeAt(0),gd="{".charCodeAt(0),bd="=".charCodeAt(0),wd="!".charCodeAt(0),vd="<".charCodeAt(0),yd=">".charCodeAt(0),xd=".".charCodeAt(0);let Sd=ji.CustomToken;const Cd=Sd++,kd=Sd++;Sd++;const _d=Sd++,Ed=Sd++,Fd=Sd++,Rd=Sd++,Nd=Sd++;Sd++;class Id extends Js{scanNext(e){if(this.stream.advanceIfChar(md)){const t=["$"];if(this.ident(t))return this.finishToken(e,Cd,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([fd,gd])?this.finishToken(e,kd):this.stream.advanceIfChars([bd,bd])?this.finishToken(e,_d):this.stream.advanceIfChars([wd,bd])?this.finishToken(e,Ed):this.stream.advanceIfChar(vd)?this.stream.advanceIfChar(bd)?this.finishToken(e,Rd):this.finishToken(e,ji.Delim):this.stream.advanceIfChar(yd)?this.stream.advanceIfChar(bd)?this.finishToken(e,Fd):this.finishToken(e,ji.Delim):this.stream.advanceIfChars([xd,xd,xd])?this.finishToken(e,Nd):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([hd,hd]))&&(this.stream.advanceWhileChar(e=>{switch(e){case dd:case pd:case ud:return!1;default:return!0}}),!0)}}class Td{constructor(e,t){this.id=e,this.message=t}}const Dd={FromExpected:new Td("scss-fromexpected",Ea("'from' expected")),ThroughOrToExpected:new Td("scss-throughexpected",Ea("'through' or 'to' expected")),InExpected:new Td("scss-fromexpected",Ea("'in' expected"))};class Md extends qc{constructor(){super(new Id)}_parseStylesheetStatement(e=!1){return this.peek(ji.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(Lo);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,Na.URIOrStringExpected);for(;this.accept(ji.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,Na.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Cd))return null;const t=this.create(ha);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(ji.Colon))return this.finish(t,Na.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,Na.VariableValueExpected,[],e);for(;this.peek(ji.Exclamation);)if(t.addChild(this._tryParsePrio()));else{if(this.consumeToken(),!this.peekRegExp(ji.Ident,/^(default|global)$/))return this.finish(t,Na.UnknownKeyword);this.consumeToken()}return this.peek(ji.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Rd)||this.accept(Fd)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(Cd))return null;const e=this.create(pa);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),t=this.create(Sa);return t.setIdentifier(this._parseIdent([to.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,Na.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(ji.Ident)&&!this.peek(kd)&&!this.peekDelim("-"))return null;const t=this.create(ao);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(ji.Ident,/^--/);let n=!1;const r=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()};for(;(this.accept(ji.Ident)||t.addChild(r())||n&&this.acceptRegexp(/^[\w-]/))&&(n=!0,!this.hasWhitespace()););return n?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(kd)){const e=this.create(da);return this.consumeToken(),e.addChild(this._parseExpr())||this._parseNestingSelector()?this.accept(ji.CurlyR)?this.finish(e):this.finish(e,Na.RightCurlyExpected):this.accept(ji.CurlyR)?this.finish(e):this.finish(e,Na.ExpressionExpected)}return null}_parseOperator(){if(this.peek(_d)||this.peek(Ed)||this.peek(Fd)||this.peek(Rd)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(eo.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(io);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(ji.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){const t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;const n=this.create(bo);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(ji.Colon))return this.finish(n,Na.ColonExpected,[ji.Colon],e||[ji.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);let r=!1;if(n.setValue(this._parseExpr())&&(r=!0,n.addChild(this._parsePrio())),this.peek(ji.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!r)return this.finish(n,Na.PropertyValueExpected);return this.peek(ji.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseNestedProperties(){const e=this.create(Do);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(ua);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,Na.SelectorExpected);for(;this.accept(ji.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(ji.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,Na.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(eo.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(ji.Num)||this.accept(ji.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(eo.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){const e=this.createNode(eo.SelectorPlaceholder);if(this.consumeToken(),this.accept(ji.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,Na.IdentifierExpected);if(!this.accept(ji.Colon))return this.finish(e,Na.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,Na.IdentifierExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[ji.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(ji.ParenthesisL)?(this.restoreAtMark(e),null):t}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;const e=this.createNode(eo.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(ji.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){const t=this.create(ko);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,Na.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else"))if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(ji.CurlyL)){const n=this.create(Ro);this._parseBody(n,e),t.setElseClause(n)}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const t=this.create(_o);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?this.acceptIdent("to")||this.acceptIdent("through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,Na.ExpressionExpected,[ji.CurlyR]):this.finish(t,Dd.ThroughOrToExpected,[ji.CurlyR]):this.finish(t,Na.ExpressionExpected,[ji.CurlyR]):this.finish(t,Dd.FromExpected,[ji.CurlyR]):this.finish(t,Na.VariableNameExpected,[ji.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const t=this.create(Eo);this.consumeToken();const n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,Na.VariableNameExpected,[ji.CurlyR]);for(;this.accept(ji.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,Na.VariableNameExpected,[ji.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,Na.ExpressionExpected,[ji.CurlyR]):this.finish(t,Dd.InExpected,[ji.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const t=this.create(Fo);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,Na.ExpressionExpected,[ji.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;const e=this.create(No);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([to.Function])))return this.finish(e,Na.IdentifierExpected,[ji.CurlyR]);if(!this.accept(ji.ParenthesisL))return this.finish(e,Na.LeftParenthesisExpected,[ji.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Na.VariableNameExpected);return this.accept(ji.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,Na.RightParenthesisExpected,[ji.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(eo.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,Na.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(ba);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([to.Mixin])))return this.finish(e,Na.IdentifierExpected,[ji.CurlyR]);if(this.accept(ji.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Na.VariableNameExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[ji.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(So);return e.setIdentifier(this._parseVariable())?(this.accept(Nd),this.accept(ji.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,Na.VariableValueExpected,[],[ji.Comma,ji.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(ma);if(this.consumeToken(),this.accept(ji.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,Na.ExpressionExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(ga);this.consumeToken();const t=this._parseIdent([to.Mixin]);if(!e.setIdentifier(t))return this.finish(e,Na.IdentifierExpected,[ji.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const n=this._parseIdent([to.Mixin]);if(!n)return this.finish(e,Na.IdentifierExpected,[ji.CurlyR]);const r=this.create(Sa);t.referenceTypes=[to.Module],r.setIdentifier(t),e.setIdentifier(n),e.addChild(r)}if(this.accept(ji.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,Na.ExpressionExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(ji.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(fa);if(this.acceptIdent("using")){if(!this.accept(ji.ParenthesisL))return this.finish(e,Na.LeftParenthesisExpected,[ji.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Na.VariableNameExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[ji.CurlyL])}return this.peek(ji.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(Co),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(ji.Colon))e.setIdentifier(n);else{if(this.accept(Nd))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(Nd),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(ji.ParenthesisR)){this.restoreAtMark(e);const t=this.create(io);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}_parseOperation(){if(!this.peek(ji.ParenthesisL))return null;const e=this.create(io);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(ji.Comma);return this.accept(ji.ParenthesisR)?this.finish(e):this.finish(e,Na.RightParenthesisExpected)}_parseListElement(){const e=this.create(va),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(ji.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,Na.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(zo);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,Na.StringLiteralExpected);if(!this.peek(ji.SemiColon)&&!this.peek(ji.EOF)){if(!this.peekRegExp(ji.Ident,/as|with/))return this.finish(e,Na.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([to.Module]))&&!this.acceptDelim("*"))return this.finish(e,Na.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(ji.ParenthesisL))return this.finish(e,Na.LeftParenthesisExpected,[ji.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Na.VariableNameExpected);for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Na.VariableNameExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected)}}return this.accept(ji.SemiColon)||this.accept(ji.EOF)?this.finish(e):this.finish(e,Na.SemiColonExpected)}_parseModuleConfigDeclaration(){const e=this.create(Oo);return e.setIdentifier(this._parseVariable())?this.accept(ji.Colon)&&e.setValue(this._parseExpr(!0))?!this.accept(ji.Exclamation)||!this.hasWhitespace()&&this.acceptIdent("default")?this.finish(e):this.finish(e,Na.UnknownKeyword):this.finish(e,Na.VariableValueExpected,[],[ji.Comma,ji.ParenthesisR]):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(Po);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,Na.StringLiteralExpected);if(this.acceptIdent("as")){const t=this._parseIdent([to.Forward]);if(!e.setIdentifier(t))return this.finish(e,Na.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,Na.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(ji.ParenthesisL))return this.finish(e,Na.LeftParenthesisExpected,[ji.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Na.VariableNameExpected);for(;this.accept(ji.Comma)&&!this.peek(ji.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Na.VariableNameExpected);if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,Na.IdentifierOrVariableExpected);return this.accept(ji.SemiColon)||this.accept(ji.EOF)?this.finish(e):this.finish(e,Na.SemiColonExpected)}_parseForwardVisibility(){const e=this.create(Wo);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(ji.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}}const Ad=Ea("Sass documentation");class Ld extends wh{constructor(e,t){super("$",e,t),zd(Ld.scssModuleLoaders),zd(Ld.scssModuleBuiltIns)}isImportPathParent(e){return e===eo.Forward||e===eo.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,t){const n=e.getParent().type;if(n===eo.Forward||n===eo.Use)for(let r of Ld.scssModuleBuiltIns){const n={label:r.label,documentation:r.documentation,textEdit:Ja.replace(this.getCompletionRange(e),`'${r.label}'`),kind:hl.Module};t.items.push(n)}return super.getCompletionForImportPath(e,t)}createReplaceFunction(){let e=1;return(t,n)=>"\\"+n+": ${"+e+++":"+(Ld.variableDefaults[n]||"")+"}"}createFunctionProposals(e,t,n,r){for(const i of e){const e=i.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),s={label:i.func.substr(0,i.func.indexOf("(")),detail:i.func,documentation:i.desc,textEdit:Ja.replace(this.getCompletionRange(t),e),insertTextFormat:dl.Snippet,kind:hl.Function};n&&(s.sortText="z"),r.items.push(s)}return r}getCompletionsForSelector(e,t,n){return this.createFunctionProposals(Ld.selectorFuncs,null,!0,n),super.getCompletionsForSelector(e,t,n)}getTermProposals(e,t,n){let r=Ld.builtInFuncs;return e&&(r=r.filter(t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type))),this.createFunctionProposals(r,t,!0,n),super.getTermProposals(e,t,n)}getColorProposals(e,t,n){return this.createFunctionProposals(Ld.colorProposals,t,!1,n),super.getColorProposals(e,t,n)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,to.Rule);for(const i of r){const e={label:i.name,textEdit:Ja.replace(this.getCompletionRange(t),i.name),kind:hl.Function};n.items.push(e)}return n}getCompletionForAtDirectives(e){return e.items.push(...Ld.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...Ld.scssModuleLoaders),e}}function zd(e){e.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const t="string"==typeof e.documentation?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+="\n\n",t.value+=e.references.map(e=>`[${e.name}](${e.url})`).join(" | "),e.documentation=t}})}Ld.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},Ld.colorProposals=[{func:"red($color)",desc:Ea("Gets the red component of a color.")},{func:"green($color)",desc:Ea("Gets the green component of a color.")},{func:"blue($color)",desc:Ea("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:Ea("Mixes two colors together.")},{func:"hue($color)",desc:Ea("Gets the hue component of a color.")},{func:"saturation($color)",desc:Ea("Gets the saturation component of a color.")},{func:"lightness($color)",desc:Ea("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:Ea("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:Ea("Makes a color lighter.")},{func:"darken($color, $amount)",desc:Ea("Makes a color darker.")},{func:"saturate($color, $amount)",desc:Ea("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:Ea("Makes a color less saturated.")},{func:"grayscale($color)",desc:Ea("Converts a color to grayscale.")},{func:"complement($color)",desc:Ea("Returns the complement of a color.")},{func:"invert($color)",desc:Ea("Returns the inverse of a color.")},{func:"alpha($color)",desc:Ea("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:Ea("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:Ea("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:Ea("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:Ea("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:Ea("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Ea("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:Ea("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Ea("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:Ea("Converts a color into the format understood by IE filters.")}],Ld.selectorFuncs=[{func:"selector-nest($selectors…)",desc:Ea("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:Ea("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:Ea("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:Ea("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:Ea("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:Ea("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:Ea("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:Ea("Parses a selector into the format returned by &.")}],Ld.builtInFuncs=[{func:"unquote($string)",desc:Ea("Removes quotes from a string.")},{func:"quote($string)",desc:Ea("Adds quotes to a string.")},{func:"str-length($string)",desc:Ea("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:Ea("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:Ea("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:Ea("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:Ea("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:Ea("Converts a string to lower case.")},{func:"percentage($number)",desc:Ea("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:Ea("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:Ea("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:Ea("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:Ea("Returns the absolute value of a number.")},{func:"min($numbers)",desc:Ea("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:Ea("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:Ea("Returns a random number.")},{func:"length($list)",desc:Ea("Returns the length of a list.")},{func:"nth($list, $n)",desc:Ea("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:Ea("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:Ea("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:Ea("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:Ea("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:Ea("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:Ea("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:Ea("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:Ea("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:Ea("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:Ea("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:Ea("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:Ea("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:Ea("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:Ea("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:Ea("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:Ea("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:Ea("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:Ea("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:Ea("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:Ea("Returns the type of a value.")},{func:"unit($number)",desc:Ea("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:Ea("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:Ea("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:Ea("Dynamically calls a Sass function.")}],Ld.scssAtDirectives=[{label:"@extend",documentation:Ea("Inherits the styles of another selector."),kind:hl.Keyword},{label:"@at-root",documentation:Ea("Causes one or more rules to be emitted at the root of the document."),kind:hl.Keyword},{label:"@debug",documentation:Ea("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:hl.Keyword},{label:"@warn",documentation:Ea("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:hl.Keyword},{label:"@error",documentation:Ea("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:hl.Keyword},{label:"@if",documentation:Ea("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:"@if ${1:expr} {\n\t$0\n}",insertTextFormat:dl.Snippet,kind:hl.Keyword},{label:"@for",documentation:Ea("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",insertTextFormat:dl.Snippet,kind:hl.Keyword},{label:"@each",documentation:Ea("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n\t$0\n}",insertTextFormat:dl.Snippet,kind:hl.Keyword},{label:"@while",documentation:Ea("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:"@while ${1:condition} {\n\t$0\n}",insertTextFormat:dl.Snippet,kind:hl.Keyword},{label:"@mixin",documentation:Ea("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:"@mixin ${1:name} {\n\t$0\n}",insertTextFormat:dl.Snippet,kind:hl.Keyword},{label:"@include",documentation:Ea("Includes the styles defined by another mixin into the current rule."),kind:hl.Keyword},{label:"@function",documentation:Ea("Defines complex operations that can be re-used throughout stylesheets."),kind:hl.Keyword}],Ld.scssModuleLoaders=[{label:"@use",documentation:Ea("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:Ad,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:dl.Snippet,kind:hl.Keyword},{label:"@forward",documentation:Ea("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:Ad,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:dl.Snippet,kind:hl.Keyword}],Ld.scssModuleBuiltIns=[{label:"sass:math",documentation:Ea("Provides functions that operate on numbers."),references:[{name:Ad,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:Ea("Makes it easy to combine, search, or split apart strings."),references:[{name:Ad,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:Ea("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:Ad,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:Ea("Lets you access and modify values in lists."),references:[{name:Ad,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:Ea("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:Ad,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:Ea("Provides access to Sass’s powerful selector engine."),references:[{name:Ad,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:Ea("Exposes the details of Sass’s inner workings."),references:[{name:Ad,url:"https://sass-lang.com/documentation/modules/meta"}]}];const Od="/".charCodeAt(0),Pd="\n".charCodeAt(0),Wd="\r".charCodeAt(0),Vd="\f".charCodeAt(0),$d="`".charCodeAt(0),Ud=".".charCodeAt(0);let qd=ji.CustomToken;const Bd=qd++;class Kd extends Js{scanNext(e){const t=this.escapedJavaScript();return null!==t?this.finishToken(e,t):this.stream.advanceIfChars([Ud,Ud,Ud])?this.finishToken(e,Bd):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([Od,Od]))&&(this.stream.advanceWhileChar(e=>{switch(e){case Pd:case Wd:case Vd:return!1;default:return!0}}),!0)}escapedJavaScript(){return this.stream.peekChar()===$d?(this.stream.advance(1),this.stream.advanceWhileChar(e=>e!==$d),this.stream.advanceIfChar($d)?ji.EscapedJavaScript:ji.BadEscapedJavaScript):null}}class jd extends qc{constructor(){super(new Kd)}_parseStylesheetStatement(e=!1){return this.peek(ji.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(Lo);if(this.consumeToken(),this.accept(ji.ParenthesisL)){if(!this.accept(ji.Ident))return this.finish(e,Na.IdentifierExpected,[ji.SemiColon]);do{if(!this.accept(ji.Comma))break}while(this.accept(ji.Ident));if(!this.accept(ji.ParenthesisR))return this.finish(e,Na.RightParenthesisExpected,[ji.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(ji.SemiColon)||this.peek(ji.EOF)||e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e)):this.finish(e,Na.URIOrStringExpected,[ji.SemiColon])}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(eo.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(ji.SemiColon)?this.finish(e):this.finish(e,Na.SemiColonExpected):this.finish(e,Na.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const e=this.create(Go);return e.addChild(this._parseVariable())?this.finish(e):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const t=this.create(ha),n=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(ji.Colon))return this.restoreAtMark(n),null;if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,Na.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(ji.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim(".")){if(this.consumeToken(),this.hasWhitespace()||!this.accept(ji.ParenthesisL))return this.restoreAtMark(e),null;{let t=this.create(ba);if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(ji.Comma)||this.accept(ji.SemiColon))&&!this.peek(ji.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,Na.IdentifierExpected,[],[ji.ParenthesisR]);if(!this.accept(ji.ParenthesisR))return this.restoreAtMark(e),null}}if(!this.peek(ji.CurlyL))return null;const t=this.create(ho);return this._parseBody(t,this._parseDetachedRuleSetBody.bind(this)),this.finish(t)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let t=!1;for(;this.peek(ji.BracketL)&&(t=!0),e.addChild(this._parseLookupValue());)t=!1;return!t}_parseLookupValue(){const e=this.create(io),t=this.mark();return this.accept(ji.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(ji.BracketR)||this.accept(ji.BracketR))?e:(this.restoreAtMark(t),null)}_parseVariable(e=!1,t=!1){const n=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(ji.AtKeyword))return null;const r=this.create(pa),i=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(i),null;return(this.accept(ji.AtKeyword)||this.accept(ji.Ident))&&(t||!this.peek(ji.BracketL)||this._addLookupChildren(r))?r:(this.restoreAtMark(i),null)}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(ji.EscapedJavaScript)||this.peek(ji.BadEscapedJavaScript)){const e=this.createNode(eo.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(eo.EscapedValue);return this.consumeToken(),this.accept(ji.String)||this.accept(ji.EscapedJavaScript)?this.finish(e):this.finish(e,Na.TermExpected)}return null}_parseOperator(){const e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(eo.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){const e=this.createNode(eo.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){const e=this.createNode(eo.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(ji.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([to.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const t=this.create(uo);let n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){n=!0;const e=this.mark();if(t.addChild(this._parseGuard())&&this.peek(ji.CurlyL))break;this.restoreAtMark(e),t.addChild(this._parseCombinator())}return n?this.finish(t):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(eo.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(ji.Num)||this.accept(ji.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(eo.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){const t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;const n=this.mark(),r=this.create(ao);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let i=!1;return i=e?r.isCustomProperty?r.addChild(this._parseIdent()):r.addChild(this._parseRegexp(t)):r.isCustomProperty?this._acceptInterpolatedIdent(r):this._acceptInterpolatedIdent(r,t),i?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(n),null)}peekInterpolatedIdent(){return this.peek(ji.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,t){let n=!1;const r=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()},i=t?()=>this.acceptRegexp(t):()=>this.accept(ji.Ident);for(;(i()||e.addChild(this._parseInterpolation()||this.try(r)))&&(n=!0,!this.hasWhitespace()););return n}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const t=this.createNode(eo.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(ji.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(ji.CurlyR)?this.finish(t):this.finish(t,Na.RightCurlyExpected):this.finish(t,Na.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),t=this.create(ba);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(ji.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(ji.Comma)||this.accept(ji.SemiColon))&&!this.peek(ji.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,Na.IdentifierExpected,[],[ji.ParenthesisR]);return this.accept(ji.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(ji.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(ao),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(ji.Hash))return null;e=this.create(ao),this.consumeToken()}return e.referenceTypes=[to.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(ji.Colon))return null;const e=this.mark(),t=this.create(ua);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;const e=this.mark(),t=this.create(ua);return this.consumeToken(),!this.hasWhitespace()&&this.accept(ji.Colon)&&this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),null)}_completeExtends(e){if(!this.accept(ji.ParenthesisL))return this.finish(e,Na.LeftParenthesisExpected);const t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,Na.SelectorExpected);for(;this.accept(ji.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,Na.SelectorExpected);return this.accept(ji.ParenthesisR)?this.finish(e):this.finish(e,Na.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(ji.AtKeyword))return null;const e=this.mark(),t=this.create(ga);return!t.addChild(this._parseVariable(!0))||!this.hasWhitespace()&&this.accept(ji.ParenthesisL)?this.accept(ji.ParenthesisR)?this.finish(t):this.finish(t,Na.RightParenthesisExpected):(this.restoreAtMark(e),null)}_tryParseMixinReference(e=!0){const t=this.mark(),n=this.create(ga);let r=this._parseMixinDeclarationIdentifier();for(;r;){this.acceptDelim(">");const e=this._parseMixinDeclarationIdentifier();if(!e)break;n.getNamespaces().addChild(r),r=e}if(!n.setIdentifier(r))return this.restoreAtMark(t),null;let i=!1;if(this.accept(ji.ParenthesisL)){if(i=!0,n.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(ji.Comma)||this.accept(ji.SemiColon))&&!this.peek(ji.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,Na.ExpressionExpected);if(!this.accept(ji.ParenthesisR))return this.finish(n,Na.RightParenthesisExpected);r.referenceTypes=[to.Mixin]}else r.referenceTypes=[to.Mixin,to.Rule];return this.peek(ji.BracketL)?e||this._addLookupChildren(n):n.addChild(this._parsePrio()),i||this.peek(ji.SemiColon)||this.peek(ji.CurlyR)||this.peek(ji.EOF)?this.finish(n):(this.restoreAtMark(t),null)}_parseMixinArgument(){const e=this.create(Co),t=this.mark(),n=this._parseVariable();return n&&(this.accept(ji.Colon)?e.setIdentifier(n):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)}_parseMixinParameter(){const e=this.create(So);if(this.peekKeyword("@rest")){const t=this.create(io);return this.consumeToken(),this.accept(Bd)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,Na.DotExpected,[],[ji.Comma,ji.ParenthesisR])}if(this.peek(Bd)){const t=this.create(io);return this.consumeToken(),e.setIdentifier(this.finish(t)),this.finish(e)}let t=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(ji.Colon),t=!0),e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))||t?this.finish(e):null}_parseGuard(){if(!this.peekIdent("when"))return null;const e=this.create(ya);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,Na.ConditionExpected);for(;this.acceptIdent("and")||this.accept(ji.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,Na.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(xa);return e.isNegated=this.acceptIdent("not"),this.accept(ji.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(ji.ParenthesisR)?this.finish(e):this.finish(e,Na.RightParenthesisExpected)):e.isNegated?this.finish(e,Na.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),t=this.create(xo);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(ji.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(ji.Comma)||this.accept(ji.SemiColon))&&!this.peek(ji.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,Na.ExpressionExpected);return this.accept(ji.ParenthesisR)?this.finish(t):this.finish(t,Na.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(ao);return e.referenceTypes=[to.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(ji.ParenthesisR)){this.restoreAtMark(e);const t=this.create(io);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}}class Hd extends wh{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,n,r){for(const i of e){const e={label:i.name,detail:i.example,documentation:i.description,textEdit:Ja.replace(this.getCompletionRange(t),i.name+"($0)"),insertTextFormat:dl.Snippet,kind:hl.Function};n&&(e.sortText="z"),r.items.push(e)}return r}getTermProposals(e,t,n){let r=Hd.builtInProposals;return e&&(r=r.filter(t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type))),this.createFunctionProposals(r,t,!0,n),super.getTermProposals(e,t,n)}getColorProposals(e,t,n){return this.createFunctionProposals(Hd.colorProposals,t,!1,n),super.getColorProposals(e,t,n)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}}function Gd(e,t){const n=function(e){function t(t){return e.positionAt(t.offset).line}function n(t){return e.positionAt(t.offset+t.len).line}function r(){switch(e.languageId){case"scss":return new Id;case"less":return new Kd;default:return new Js}}function i(e,r){const i=t(e),s=n(e);return i!==s?{startLine:i,endLine:s,kind:r}:null}const s=[],o=[],a=r();a.ignoreComment=!1,a.setSource(e.getText());let l=a.scan(),c=null;for(;l.type!==ji.EOF;){switch(l.type){case ji.CurlyL:case kd:o.push({line:t(l),type:"brace",isStart:!0});break;case ji.CurlyR:if(0!==o.length){const e=Jd(o,"brace");if(!e)break;let t=n(l);"brace"===e.type&&(c&&n(c)!==t&&t--,e.line!==t&&s.push({startLine:e.line,endLine:t,kind:void 0}))}break;case ji.Comment:{const r=e=>"#region"===e?{line:t(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1},a=t=>{const n=t.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(n)return r(n[1]);if("scss"===e.languageId||"less"===e.languageId){const e=t.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(e)return r(e[1])}return null},c=a(l);if(c)if(c.isStart)o.push(c);else{const e=Jd(o,"comment");if(!e)break;"comment"===e.type&&e.line!==c.line&&s.push({startLine:e.line,endLine:c.line,kind:"region"})}else{const e=i(l,"comment");e&&s.push(e)}break}}c=l,l=a.scan()}return s}(e);return function(e,t){const n=t&&t.rangeLimit||Number.MAX_VALUE,r=e.sort((e,t)=>{let n=e.startLine-t.startLine;return 0===n&&(n=e.endLine-t.endLine),n}),i=[];let s=-1;return r.forEach(e=>{e.startLine=0;n--)if(e[n].type===t&&e[n].isStart)return e.splice(n,1)[0];return null}var Xd,Yd,Qd;Hd.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:Ea("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:Ea('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:Ea("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:Ea("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:Ea("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:Ea("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:Ea("URL encodes a string")},{name:"e",example:"e(@string);",description:Ea("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:Ea("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:Ea("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:Ea("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:Ea("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:Ea("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:Ea("absolute value of a number"),example:"abs(number);"},{name:"acos",description:Ea("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:Ea("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:Ea("rounds up to an integer")},{name:"cos",description:Ea("cosine function"),example:"cos(number);"},{name:"floor",description:Ea("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:Ea("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:Ea("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:Ea("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:Ea("sine function"),example:"sin(number);"},{name:"tan",description:Ea("tangent function"),example:"tan(number);"},{name:"atan",description:Ea("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:Ea("returns pi"),example:"pi();"},{name:"pow",description:Ea("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:Ea("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:Ea("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:Ea("returns the lowest of one or more values"),example:"max(@x, @y);"}],Hd.colorProposals=[{name:"argb",example:"argb(@color);",description:Ea("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:Ea("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:Ea("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:Ea("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:Ea("creates a color")},{name:"hue",example:"hue(@color);",description:Ea("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:Ea("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:Ea("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:Ea("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:Ea("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:Ea("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:Ea("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:Ea("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:Ea("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:Ea("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:Ea("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:Ea("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:Ea("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:Ea("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:Ea("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:Ea("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:Ea("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:Ea("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:Ea("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:Ea("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:Ea("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:Ea("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],Xd=[,,function(e){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function r(e,r){this.__indent_cache=new n(e,r),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},t.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return 0===this.__items.length},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},n.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},n.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},n.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},r.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},r.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},r.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},r.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(e,n){for(var r=this.__lines.length-2;r>=0;){var i=this.__lines[r];if(i.is_empty())break;if(0!==i.item(0).indexOf(e)&&i.item(-1)!==n){this.__lines.splice(r+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=r},,,,function(e){function t(e,t){this.raw_options=n(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(e,t){var n,i={};for(n in e=r(e))n!==t&&(i[n]=e[n]);if(t&&e[t])for(n in e[t])i[n]=e[t][n];return i}function r(e){var t,n={};for(t in e)n[t.replace(/-/g,"_")]=e[t];return n}t.prototype._get_array=function(e,t){var n=this.raw_options[e],r=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(r=n.concat()):"string"==typeof n&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r},t.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},t.prototype._get_characters=function(e,t){var n=this.raw_options[e],r=t||"";return"string"==typeof n&&(r=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},t.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var r=parseInt(n,10);return isNaN(r)&&(r=t),r},t.prototype._get_selection=function(e,t,n){var r=this._get_selection_list(e,t,n);if(1!==r.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},t.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var r=this._get_array(e,n);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},t.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},e.exports.Options=t,e.exports.normalizeOpts=r,e.exports.mergeOpts=n},,function(e){var t=RegExp.prototype.hasOwnProperty("sticky");function n(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=n},,,,,function(e){function t(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}t.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},t.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=t},,function(e,t,n){var r=n(16).Beautifier,i=n(17).Options;e.exports=function(e,t){return new r(e,t).beautify()},e.exports.defaultOptions=function(){return new i}},function(e,t,n){var r=n(17).Options,i=n(2).Output,s=n(8).InputScanner,o=new(0,n(13).Directives)(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=/\s/,h=/(?:\s|\n)+/g,d=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,p=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function u(e,t){this._source_text=e||"",this._options=new r(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}u.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},u.prototype.eatWhitespace=function(e){for(var t=c.test(this._input.peek()),n=0;c.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n0&&this._indentLevel--},u.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===t&&(t="\n",e&&a.test(e||"")&&(t=e.match(a)[0]));var n=(e=e.replace(l,"\n")).match(/^[\t ]*/)[0];this._output=new i(this._options,n),this._input=new s(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r,u,m=0,f=!1,g=!1,b=!1,w=!1,v=!1,y=this._ch,x=!1;r=""!==this._input.read(h),u=y,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var S=this._input.read(d),C=o.get_directives(S);C&&"start"===C.ignore&&(S+=o.readIgnored(this._input)),this.print_string(S),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(p)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(r),this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s+$/,""),this.print_string(k),this._output.space_before_token=!0),0===m&&-1!==k.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(r),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var _=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);_.match(/[ :]$/)&&(_=this.eatString(": ").replace(/\s+$/,""),this.print_string(_),this._output.space_before_token=!0),0===m&&-1!==_.indexOf(":")?(g=!0,this.indent()):_ in this.NESTED_AT_RULE?(this._nestedLevel+=1,_ in this.CONDITIONAL_GROUP_RULE&&(b=!0)):0!==m||g||(w=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(r),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),w=!1,b?(b=!1,f=this._indentLevel>=this._nestedLevel):f=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&f&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===u?this._output.space_before_token=!1:","!==u&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===u&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),f=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var E=0;E"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==m)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(r),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var N='"'===u||"'"===u;this.preserveSingleSpace(N||r),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&x&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=""));return this._output.get_code(t)},e.exports.Beautifier=u},function(e,t,n){var r=n(6).Options;function i(e){r.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i0&&op(r,l-1);)l--;0===l||sp(r,l-1)?a=l:l=0;){const n=e.charCodeAt(t);if(n===np)return!0;if(n===rp)return!1;t--}return!1}(r,a),i=c===r.length,r=r.substring(a,c),0!==a){const r=e.offsetAt(Aa.create(t.start.line,0));s=function(e,t,n){let r=t,i=0;const s=n.tabSize||4;for(;r0){const e=n.insertSpaces?Zs(" ",a*s):Zs("\t",s);c=c.split("\n").join("\n"+e),0===t.start.character&&(c=e+c)}return[{range:t,newText:c}]}function tp(e){return e.replace(/^\s+/,"")}const np="{".charCodeAt(0),rp="}".charCodeAt(0);function ip(e,t,n){if(e&&e.hasOwnProperty(t)){const n=e[t];if(null!==n)return n}return n}function sp(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function op(e,t){return-1!==" \t".indexOf(e.charAt(t))}const ap={version:1.1,properties:[{name:"additive-symbols",browsers:["FF33"],atRule:"@counter-style",syntax:"[ && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",browsers:["E12","FF28","S9","C29","IE11","O16"],values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | | | ? ",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],description:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",browsers:["E12","FF20","S9","C29","IE11","O16"],values:[{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | | [ ? ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","IE10","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-self"}],description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","S9","C29","IE10","O12.1"],values:[{name:"auto",description:"Computes to the value of 'align-items' on the element's parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"normal"},{name:"self-end"},{name:"self-start"},{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"safe"},{name:"unsafe"}],syntax:"auto | normal | stretch | | ? ",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-self"}],description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert | revert-layer",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",browsers:["E12","FF16","S9","C43","IE10","O30"],values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",browsers:["E12","FF16","S9","C43","IE10","O30"],syntax:"