diff --git a/docs/css.worker.js b/docs/css.worker.js index 9965fa8..9866d5a 100644 --- a/docs/css.worker.js +++ b/docs/css.worker.js @@ -1,2 +1,2 @@ /*! For license information please see css.worker.js.LICENSE.txt */ -!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){var n;(n=t)instanceof r||n instanceof Error&&n.name===i&&n.message===i||e.onUnexpectedError(t)}function n(e){if(e instanceof Error){const{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack,noTelemetry:s.isErrorNoTelemetry(e)}}return e}const i="Canceled";class r extends Error{constructor(){super(i),this.name=this.message}}Error;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){const n=this;let i,r=!1;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var l;!function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function*i(e){yield e}e.empty=function(){return n},e.single=i,e.wrap=function(e){return t(e)?e:i(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 i of e)if(t(i,n++))return!0;return!1},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 i of e)yield t(i,n++)},e.flatMap=function*(e,t){let n=0;for(const i of e)yield*t(i,n++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,n){let i=n;for(const n of e)i=t(i,n);return i},e.slice=function*(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function u(e){const t=h({dispose:a((()=>{d(t),e()}))});return t}class f{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,h(this)}dispose(){this._isDisposed||(d(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{m(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return p(e,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),p(e,null))}}class g{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new f,h(this),p(this._store,this)}dispose(){d(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Symbol.iterator;class b{static{this.Undefined=new b(void 0)}constructor(e){this.element=e,this.next=b.Undefined,this.prev=b.Undefined}}class v{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 i=!1;return()=>{i||(i=!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 y=globalThis.performance&&"function"==typeof globalThis.performance.now;class w{static create(e){return new w(e)}constructor(e){this._now=y&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),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 S;!function(e){function t(e){return(t,n=null,i)=>{let r,s=!1;return r=e((e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)}),null,i),s&&r.dispose(),r}}function n(e,t,n){return r(((n,i=null,r)=>e((e=>n.call(i,t(e))),null,r)),n)}function i(e,t,n){return r(((n,i=null,r)=>e((e=>t(e)&&n.call(i,e)),null,r)),n)}function r(e,t){let n;const i=new R({onWillAddFirstListener(){n=e(i.fire,i)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(i),i.event}function s(e,t,n=100,i=!1,r=!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),i&&!c&&(p.fire(l),l=void 0),h=()=>{const e=l;l=void 0,c=void 0,(!i||d>1)&&p.fire(e),d=0},"number"==typeof n?(clearTimeout(c),c=setTimeout(h,n)):void 0===c&&(c=0,queueMicrotask(h))}))},onWillRemoveListener(){r&&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.map=n,e.forEach=function(e,t,n){return r(((n,i=null,r)=>e((e=>{t(e),n.call(i,e)}),null,r)),n)},e.filter=i,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,i)=>{return r=function(...e){const t=u((()=>m(e)));return function(e,t){if(c)for(const n of e)c.setParent(n,t)}(e,t),t}(...e.map((e=>e((e=>t.call(n,e)))))),(s=i)instanceof Array?s.push(r):s&&s.add(r),r;var r,s}},e.reduce=function(e,t,i,r){let s=i;return n(e,(e=>(s=t(s,e),s)),r)},e.debounce=s,e.accumulate=function(t,n=0,i){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),n,void 0,!0,void 0,i)},e.latch=function(e,t=(e,t)=>e===t,n){let r,s=!0;return i(e,(e=>{const n=s||!t(e,r);return s=!1,r=e,n}),n)},e.split=function(t,n,i){return[e.filter(t,n,i),e.filter(t,(e=>!n(e)),i)]},e.buffer=function(e,t=!1,n=[],i){let r=n.slice(),s=e((e=>{r?r.push(e):a.fire(e)}));i&&i.add(s);const o=()=>{r?.forEach((e=>a.fire(e))),r=null},a=new R({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),i&&i.add(s))},onDidAddFirstListener(){r&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return i&&i.add(a),a.event},e.chain=function(e,t){return(n,i,r)=>{const s=t(new a);return e((function(e){const t=s.evaluate(e);t!==o&&n.call(i,t)}),void 0,r)}};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((i=>{const r=n||!e(i,t);return n=!1,t=i,r?i: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 i=(...e)=>r.fire(n(...e)),r=new R({onWillAddFirstListener:()=>e.on(t,i),onDidRemoveLastListener:()=>e.removeListener(t,i)});return r.event},e.fromDOMEventEmitter=function(e,t,n=e=>e){const i=(...e)=>r.fire(n(...e)),r=new R({onWillAddFirstListener:()=>e.addEventListener(t,i),onDidRemoveLastListener:()=>e.removeEventListener(t,i)});return r.event},e.toPromise=function(e){return new Promise((n=>t(e)(n)))},e.fromPromise=function(e){const t=new R;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},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)},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,i)=>{let r=0,s=!1;const o={beginUpdate(){r++},endUpdate(){r--,0===r&&(e.reportChanges(),s&&(s=!1,t.call(n)))},handlePossibleChange(){},handleChange(){s=!0}};e.addObserver(o),e.reportChanges();const a={dispose(){e.removeObserver(o)}};return i instanceof f?i.add(a):Array.isArray(i)&&i.push(a),a}}}(S||(S={}));class x{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}_${x._idPool++}`,x.all.add(this)}start(e){this._stopWatch=new w,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,i]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})`;console.warn(e);const n=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],i=new E(`${e}. HINT: Stack shows most frequent listener (${n[1]}-times)`,n[0]);return(this._options?.onListenerError||t)(i),g.None}if(this._disposed)return g.None;n&&(e=e.bind(n));const r=new F(e);let s;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(r.stack=_.create(),s=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof F?(this._deliveryQueue??=new N,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;const o=u((()=>{s?.(),this._removeListener(r)}));return i instanceof f?i.add(o):Array.isArray(i)&&i.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 console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const i=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(e){const t=[];for(const n of function(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}(e))"function"==typeof e[n]&&t.push(n);return t}function D(){return globalThis._VSCODE_NLS_LANGUAGE}Object.prototype.hasOwnProperty;const T="pseudo"===D()||"undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function M(e,t,...n){return function(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const i=n[0],r=t[i];let s=e;return"string"==typeof r?s=r:"number"!=typeof r&&"boolean"!=typeof r&&null!=r||(s=String(r)),s})),T&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}("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 z,L,O=!1,P=!1,W=!1,V=!1,U=!1,$=!1,q=!1,K=!1,B=!1,j=!1,H=null,G=null,J=null;const X=globalThis;let Y;void 0!==X.vscode&&void 0!==X.vscode.process?Y=X.vscode.process:"undefined"!=typeof process&&"string"==typeof process?.versions?.node&&(Y=process);const Q="string"==typeof Y?.versions?.electron,Z=Q&&"renderer"===Y?.type;if("object"==typeof Y){O="win32"===Y.platform,P="darwin"===Y.platform,W="linux"===Y.platform,V=W&&!!Y.env.SNAP&&!!Y.env.SNAP_REVISION,q=Q,B=!!Y.env.CI||!!Y.env.BUILD_ARTIFACTSTAGINGDIRECTORY,z=A,H=A;const e=Y.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);z=t.userLocale,G=t.osLocale,H=t.resolvedLanguage||A,J=t.languagePack?.translationsConfigFile}catch(e){}U=!0}else"object"!=typeof navigator||Z?console.error("Unable to resolve platform."):(L=navigator.userAgent,O=L.indexOf("Windows")>=0,P=L.indexOf("Macintosh")>=0,(L.indexOf("Macintosh")>=0||L.indexOf("iPad")>=0||L.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,W=L.indexOf("Linux")>=0,L?.indexOf("Mobi")>=0,$=!0,H=D()||A,z=navigator.language.toLowerCase(),G=z);let ee=0;P?ee=1:O?ee=3:W&&(ee=2);const te=O,ne=P,ie=($&&"function"==typeof X.importScripts&&X.origin,L),re="function"==typeof X.postMessage&&!X.importScripts;(()=>{if(re){const e=[];X.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n=0);function oe(e){return e}ie&&ie.indexOf("Firefox"),!se&&ie&&ie.indexOf("Safari"),ie&&ie.indexOf("Edg/"),ie&&ie.indexOf("Android");class ae{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=oe):(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}}class le{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function ce(e){return e>=65&&e<=90}function he(e){return 55296<=e&&e<=56319}function de(e){return 56320<=e&&e<=57343}function pe(e,t){return t-56320+(e-55296<<10)+65536}function me(e,t,n){const i=e.charCodeAt(n);if(he(i)&&n+1t[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}class ge{static{this.ambiguousCharacterData=new le((()=>JSON.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,8218,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,8242,96,1370,96,1523,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,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,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,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,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,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,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,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,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,71922,67,71913,67,65315,67,8557,67,8450,67,8493,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,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,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,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,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,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,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,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,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,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,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,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,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,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,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,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,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,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,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,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,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,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,71919,87,71910,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,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,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,66293,90,71909,90,65338,90,8484,90,8488,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,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,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,65283,35,65292,44,65307,59],"ko":[8211,45,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,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,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,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[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,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,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,65283,35,65307,59]}')))}static{this.cache=new ae({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&e in i));0===s.length&&(s=["_default"]);for(const e of s)r=n(r,t(i[e]));const o=function(e,t){const n=new Map(e);for(const[e,i]of t)n.set(e,i);return n}(t(i._common),r);return new ge(o)}))}static getInstance(e){return ge.cache.get(Array.from(e))}static{this._locales=new le((()=>Object.keys(ge.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return ge._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 be{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,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,12288,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]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(be.getRawData())),this._data}static isInvisibleCharacter(e){return be.getData().has(e)}static get codePoints(){return be.getData()}}let ve;class ye{constructor(e,t,n,i){this.vsWorker=e,this.req=t,this.method=n,this.args=i,this.type=0}}class we{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class Se{constructor(e,t,n,i){this.vsWorker=e,this.req=t,this.eventName=n,this.arg=i,this.type=2}}class xe{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class Ce{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class _e{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}sendMessage(e,t){const n=String(++this._lastSentReq);return new Promise(((i,r)=>{this._pendingReplies[n]={resolve:i,reject:r},this._send(new ye(this._workerId,n,e,t))}))}listen(e,t){let n=null;const i=new R({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,i),this._send(new Se(this._workerId,n,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new Ce(this._workerId,n)),n=null}});return i.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_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 void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new we(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=n(e.detail)),this._send(new we(this._workerId,t,void 0,n(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new xe(this._workerId,t,e))}));this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;n{e(t,n)},handleMessage:(e,t)=>this._handleMessage(e,t),handleEvent:(e,t)=>this._handleEvent(e,t)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t){if("$initialize"===e)return this.initialize(t[0],t[1],t[2],t[3]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return Promise.reject(e)}}_handleEvent(e,t){if(!this._requestHandler)throw new Error("Missing requestHandler");if(Ee(e)){const n=this._requestHandler[e].call(this._requestHandler,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on request handler.`);return n}if(ke(e)){const t=this._requestHandler[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on request handler.`);return t}throw new Error(`Malformed event name ${e}`)}initialize(e,t,n,i){this._protocol.setWorkerId(e);const r=function(e,t,n){const i=e=>function(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},r=e=>function(t){return n(e,t)},s={};for(const t of e)Ee(t)?s[t]=r(t):ke(t)?s[t]=n(t,void 0):s[t]=i(t);return s}(i,((e,t)=>this._protocol.sendMessage(e,t)),((e,t)=>this._protocol.listen(e,t)));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(r),Promise.resolve(I(this._requestHandler))):(t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,void 0!==t.trustedTypesPolicy&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t)),new Promise(((e,t)=>{(0,globalThis.require)([n],(n=>{this._requestHandler=n.create(r),this._requestHandler?e(I(this._requestHandler)):t(new Error("No RequestHandler!"))}),t)})))}}class Re{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function Ne(e,t){return(t<<5)-t+e|0}function Ie(e,t){t=Ne(149417,t);for(let n=0,i=e.length;n>>i)>>>0}function Te(e,t=0,n=e.byteLength,i=0){for(let r=0;re.toString(16).padStart(2,"0"))).join(""):function(e,t,n="0"){for(;e.length>>0).toString(16),t/4)}class Ae{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let i,r,s=this._buffLen,o=this._leftoverHighSurrogate;for(0!==o?(i=o,r=-1,o=0):(i=e.charCodeAt(0),r=0);;){let a=i;if(he(i)){if(!(r+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Me(this._h0)+Me(this._h1)+Me(this._h2)+Me(this._h3)+Me(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Te(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Te(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=Ae._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,De(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,i,r,s=this._h0,o=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(n=o&a|~o&l,i=1518500249):t<40?(n=o^a^l,i=1859775393):t<60?(n=o&a|o&l|a&l,i=2400959708):(n=o^a^l,i=3395469782),r=De(s,5)+n+c+i+e.getUint32(4*t,!1)&4294967295,c=l,l=a,a=De(o,30),o=s,s=r;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}class ze{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new Re(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 Ve{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,s]=Ve._getElements(e),[o,a,l]=Ve._getElements(t);this._hasStrings=s&&l,this._originalStringElements=i,this._originalElementsOrHash=r,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(Ve._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){let r;return n<=i?(Oe.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new Re(e,0,n,i-n+1)]):e<=t?(Oe.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[new Re(e,t-e+1,n,0)]):(Oe.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Oe.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}const s=[0],o=[0],a=this.ComputeRecursionPoint(e,t,n,i,s,o,r),l=s[0],c=o[0];if(null!==a)return a;if(!r[0]){const s=this.ComputeDiffRecursive(e,l,n,c,r);let o=[];return o=r[0]?[new Re(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,i,r),this.ConcatenateChanges(s,o)}return[new Re(e,t-e+1,n,i-n+1)]}WALKTRACE(e,t,n,i,r,s,o,a,l,c,h,d,p,m,u,f,g,b){let v=null,y=null,w=new We,S=t,x=n,C=p[0]-f[0]-i,_=-1073741824,k=this.m_forwardHistory.length-1;do{const t=C+e;t===S||t=0&&(e=(l=this.m_forwardHistory[k])[0],S=1,x=l.length-1)}while(--k>=-1);if(v=w.getReverseChanges(),b[0]){let e=p[0]+1,t=f[0]+1;if(null!==v&&v.length>0){const n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}y=[new Re(e,d-e+1,t,u-t+1)]}else{w=new We,S=s,x=o,C=p[0]-f[0]-a,_=1073741824,k=g?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=C+r;e===S||e=c[e+1]?(m=(h=c[e+1]-1)-C-a,h>_&&w.MarkNextChange(),_=h+1,w.AddOriginalElement(h+1,m+1),C=e+1-r):(m=(h=c[e-1])-C-a,h>_&&w.MarkNextChange(),_=h,w.AddModifiedElement(h+1,m+1),C=e-1-r),k>=0&&(r=(c=this.m_reverseHistory[k])[0],S=1,x=c.length-1)}while(--k>=-1);y=w.getChanges()}return this.ConcatenateChanges(v,y)}ComputeRecursionPoint(e,t,n,i,r,s,o){let a=0,l=0,c=0,h=0,d=0,p=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(i-n),u=m+1,f=new Int32Array(u),g=new Int32Array(u),b=i-n,v=t-e,y=e-n,w=t-i,S=(v-b)%2==0;f[b]=e,g[v]=t,o[0]=!1;for(let x=1;x<=m/2+1;x++){let m=0,C=0;c=this.ClipDiagonalBound(b-x,x,b,u),h=this.ClipDiagonalBound(b+x,x,b,u);for(let e=c;e<=h;e+=2){a=e===c||em+C&&(m=a,C=l),!S&&Math.abs(e-v)<=x-1&&a>=g[e])return r[0]=a,s[0]=l,n<=g[e]&&x<=1448?this.WALKTRACE(b,c,h,y,v,d,p,w,f,g,a,t,r,l,i,s,S,o):null}const _=(m-e+(C-n)-x)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,_))return o[0]=!0,r[0]=m,s[0]=C,_>0&&x<=1448?this.WALKTRACE(b,c,h,y,v,d,p,w,f,g,a,t,r,l,i,s,S,o):(e++,n++,[new Re(e,t-e+1,n,i-n+1)]);d=this.ClipDiagonalBound(v-x,x,v,u),p=this.ClipDiagonalBound(v+x,x,v,u);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-v)-w;const u=a;for(;a>e&&l>n&&this.ElementsAreEqual(a,l);)a--,l--;if(g[m]=a,S&&Math.abs(m-b)<=x&&a<=f[m])return r[0]=a,s[0]=l,u>=f[m]&&x<=1448?this.WALKTRACE(b,c,h,y,v,d,p,w,f,g,a,t,r,l,i,s,S,o):null}if(x<=1447){let e=new Int32Array(h-c+2);e[0]=b-c+1,Pe.Copy2(f,c,e,1,h-c+1),this.m_forwardHistory.push(e),e=new Int32Array(p-d+2),e[0]=v-d+1,Pe.Copy2(g,d,e,1,p-d+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,c,h,y,v,d,p,w,f,g,a,t,r,l,i,s,S,o)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,r=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&&n>a&&(a=n,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=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,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?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 i=new Array(e.length+t.length-1);return Pe.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],Pe.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return Pe.Copy(e,0,n,0,e.length),Pe.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(Oe.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Oe.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 i=e.originalStart;let r=e.originalLength;const s=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(o=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new Re(i,r,s,o),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e=65&&e<=90||e>=97&&e<=122}function tt(e,t,n,i){let r="",s=0,o=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const e=r.lastIndexOf(n);-1===e?(r="",s=0):(r=r.slice(0,e),s=r.length-1-r.lastIndexOf(n)),o=c,a=0;continue}if(0!==r.length){r="",s=0,o=c,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(o+1,c)}`:r=e.slice(o+1,c),s=c-o-1;o=c,a=0}else l===Be&&-1!==a?++a:a=-1}return r}function nt(e,t){!function(e){if(null===e||"object"!=typeof e)throw new Je("pathObject","Object",e)}(t);const n=t.dir||t.root,i=t.base||`${t.name||""}${r=t.ext,r?`${"."===r[0]?"":"."}${r}`:""}`;var r;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const it={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],Xe(s,`paths[${r}]`),0===s.length)continue}else 0===t.length?s=$e():(s=qe[`=${t}`]||$e(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===He)&&(s=`${t}\\`));const o=s.length;let a=0,l="",c=!1;const h=s.charCodeAt(0);if(1===o)Qe(h)&&(a=1,c=!0);else if(Qe(h))if(c=!0,Qe(s.charCodeAt(1))){let e=2,t=e;for(;e2&&Qe(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(i){if(t.length>0)break}else if(n=`${s.slice(a)}\\${n}`,i=c,c&&t.length>0)break}return n=tt(n,!i,"\\",Qe),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){Xe(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const s=e.charCodeAt(0);if(1===t)return Ze(s)?"\\":e;if(Qe(s))if(r=!0,Qe(e.charCodeAt(1))){let r=2,s=r;for(;r2&&Qe(e.charCodeAt(2))&&(r=!0,i=3));let o=i0&&Qe(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){Xe(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return Qe(n)||t>2&&et(n)&&e.charCodeAt(1)===Ge&&Qe(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let i=0;i0&&(void 0===t?t=n=r:t+=`\\${r}`)}if(void 0===t)return".";let i=!0,r=0;if("string"==typeof n&&Qe(n.charCodeAt(0))){++r;const e=n.length;e>1&&Qe(n.charCodeAt(1))&&(++r,e>2&&(Qe(n.charCodeAt(2))?++r:i=!1))}if(i){for(;r=2&&(t=`\\${t.slice(r)}`)}return it.normalize(t)},relative(e,t){if(Xe(e,"from"),Xe(t,"to"),e===t)return"";const n=it.resolve(e),i=it.resolve(t);if(n===i)return"";if((e=n.toLowerCase())===(t=i.toLowerCase()))return"";let r=0;for(;rr&&e.charCodeAt(s-1)===He;)s--;const o=s-r;let a=0;for(;aa&&t.charCodeAt(l-1)===He;)l--;const c=l-a,h=oh){if(t.charCodeAt(a+p)===He)return i.slice(a+p+1);if(2===p)return i.slice(a+p)}o>h&&(e.charCodeAt(r+p)===He?d=p:2===p&&(d=3)),-1===d&&(d=0)}let m="";for(p=r+d+1;p<=s;++p)p!==s&&e.charCodeAt(p)!==He||(m+=0===m.length?"..":"\\..");return a+=d,m.length>0?`${m}${i.slice(a,l)}`:(i.charCodeAt(a)===He&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=it.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===He){if(t.charCodeAt(1)===He){const e=t.charCodeAt(2);if(63!==e&&e!==Be)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(et(t.charCodeAt(0))&&t.charCodeAt(1)===Ge&&t.charCodeAt(2)===He)return`\\\\?\\${t}`;return e},dirname(e){Xe(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return Qe(r)?e:".";if(Qe(r)){if(n=i=1,Qe(e.charCodeAt(1))){let r=2,s=r;for(;r2&&Qe(e.charCodeAt(2))?3:2,i=n);let s=-1,o=!0;for(let n=t-1;n>=i;--n)if(Qe(e.charCodeAt(n))){if(!o){s=n;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&Xe(t,"suffix"),Xe(e,"path");let n,i=0,r=-1,s=!0;if(e.length>=2&&et(e.charCodeAt(0))&&e.charCodeAt(1)===Ge&&(i=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>=i;--n){const l=e.charCodeAt(n);if(Qe(l)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(Qe(e.charCodeAt(n))){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){Xe(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===Ge&&et(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(Qe(t)){if(!s){i=a+1;break}}else-1===r&&(s=!1,r=a+1),t===Be?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:nt.bind(null,"\\"),parse(e){Xe(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return Qe(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(Qe(r)){if(i=1,Qe(e.charCodeAt(1))){let t=2,r=t;for(;t0&&(t.root=e.slice(0,i));let s=-1,o=i,a=-1,l=!0,c=e.length-1,h=0;for(;c>=i;--c)if(r=e.charCodeAt(c),Qe(r)){if(!l){o=c+1;break}}else-1===a&&(l=!1,a=c+1),r===Be?-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!==i?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},rt=(()=>{if(Ye){const e=/\\/g;return()=>{const t=$e().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>$e()})(),st={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const r=i>=0?e[i]:rt();Xe(r,`paths[${i}]`),0!==r.length&&(t=`${r}/${t}`,n=r.charCodeAt(0)===je)}return t=tt(t,!n,"/",Ze),n?`/${t}`:t.length>0?t:"."},normalize(e){if(Xe(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===je,n=e.charCodeAt(e.length-1)===je;return 0===(e=tt(e,!t,"/",Ze)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return Xe(e,"path"),e.length>0&&e.charCodeAt(0)===je},join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":st.normalize(t)},relative(e,t){if(Xe(e,"from"),Xe(t,"to"),e===t)return"";if((e=st.resolve(e))===(t=st.resolve(t)))return"";const n=e.length,i=n-1,r=t.length-1,s=is){if(t.charCodeAt(1+a)===je)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else i>s&&(e.charCodeAt(1+a)===je?o=a:0===a&&(o=0));let l="";for(a=1+o+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==je||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+o)}`},toNamespacedPath(e){return e},dirname(e){if(Xe(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===je;let n=-1,i=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===je){if(!i){n=t;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&Xe(t,"ext"),Xe(e,"path");let n,i=0,r=-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===je){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1==--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===je){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){Xe(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==je)-1===i&&(r=!1,i=o+1),a===Be?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:nt.bind(null,"/"),parse(e){Xe(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===je;let i;n?(t.root="/",i=1):i=0;let r=-1,s=0,o=-1,a=!0,l=e.length-1,c=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==je)-1===o&&(a=!1,o=l+1),t===Be?-1===r?r=l:1!==c&&(c=1):-1!==r&&(c=-1);else if(!a){s=l+1;break}}if(-1!==o){const i=0===s&&n?1:s;-1===r||0===c||1===c&&r===o-1&&r===s+1?t.base=t.name=e.slice(i,o):(t.name=e.slice(i,r),t.base=e.slice(i,o),t.ext=e.slice(r,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};st.win32=it.win32=it,st.posix=it.posix=st,Ye?it.normalize:st.normalize,Ye?it.resolve:st.resolve,Ye?it.relative:st.relative,Ye?it.dirname:st.dirname,Ye?it.basename:st.basename,Ye?it.extname:st.extname,Ye?it.sep:st.sep;const ot=/^\w[\w\d+.-]*$/,at=/^\//,lt=/^\/\//,ct="",ht="/",dt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class pt{static isUri(e){return e instanceof pt||!!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}constructor(e,t,n,i,r,s=!1){"object"==typeof e?(this.scheme=e.scheme||ct,this.authority=e.authority||ct,this.path=e.path||ct,this.query=e.query||ct,this.fragment=e.fragment||ct):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||ct,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ht&&(t=ht+t):t=ht}return t}(this.scheme,n||ct),this.query=i||ct,this.fragment=r||ct,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&&!ot.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!at.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(lt.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 vt(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=ct),void 0===n?n=this.authority:null===n&&(n=ct),void 0===i?i=this.path:null===i&&(i=ct),void 0===r?r=this.query:null===r&&(r=ct),void 0===s?s=this.fragment:null===s&&(s=ct),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new ut(t,n,i,r,s)}static parse(e,t=!1){const n=dt.exec(e);return n?new ut(n[2]||ct,xt(n[4]||ct),xt(n[5]||ct),xt(n[7]||ct),xt(n[9]||ct),t):new ut(ct,ct,ct,ct,ct)}static file(e){let t=ct;if(te&&(e=e.replace(/\\/g,ht)),e[0]===ht&&e[1]===ht){const n=e.indexOf(ht,2);-1===n?(t=e.substring(2),e=ht):(t=e.substring(2,n),e=e.substring(n)||ht)}return new ut("file",t,e,ct,ct)}static from(e,t){return new ut(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=te&&"file"===e.scheme?pt.file(it.join(vt(e,!0),...t)).path:st.join(e.path,...t),e.with({path:n})}toString(e=!1){return yt(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof pt)return e;{const t=new ut(e);return t._formatted=e.external??null,t._fsPath=e._sep===mt?e.fsPath??null:null,t}}return e}}const mt=te?1:void 0;class ut extends pt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=vt(this,!1)),this._fsPath}toString(e=!1){return e?yt(this,!0):(this._formatted||(this._formatted=yt(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=mt),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 gt(e,t,n){let i,r=-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!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=ft[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function bt(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,te&&(n=n.replace(/\//g,"\\")),n}function yt(e,t){const n=t?bt:gt;let i="",{scheme:r,authority:s,path:o,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=ht,i+=ht),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=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)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=t?l:gt(l,!1,!1)),i}function wt(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+wt(e.substr(3)):e}}const St=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function xt(e){return e.match(St)?e.replace(St,(e=>wt(e))):e}class Ct{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Ct(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Ct.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Ct.isBefore(this,e)}static isBefore(e,t){return e.lineNumbern||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return _t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return _t.containsPosition(this,e)}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(e){return _t.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return _t.strictContainsRange(this,e)}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(e){return _t.plusRange(this,e)}static plusRange(e,t){let n,i,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new _t(n,i,r,s)}intersectRanges(e){return _t.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn;const o=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;return nl?(r=l,s=c):r===l&&(s=Math.min(s,c)),n>r||n===r&&i>s?null:new _t(n,i,r,s)}equalsRange(e){return _t.equalsRange(this,e)}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 _t.getEndPosition(this)}static getEndPosition(e){return new Ct(e.endLineNumber,e.endColumn)}getStartPosition(){return _t.getStartPosition(this)}static getStartPosition(e){return new Ct(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new _t(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new _t(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return _t.collapseToStart(this)}static collapseToStart(e){return new _t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return _t.collapseToEnd(this)}static collapseToEnd(e){return new _t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new _t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new _t(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new _t(e.startLineNumber,e.startColumn,e.endLineNumber,e.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}}var kt;function Et(e,t){return(n,i)=>t(e(n),e(i))}!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}(kt||(kt={}));const Ft=(e,t)=>e-t;class Rt{static{this.empty=new Rt((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new Rt((t=>this.iterate((n=>!e(n)||t(n)))))}map(e){return new Rt((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((i=>((n||kt.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0))),t}}function Nt(e){return e<0?0:e>255?255:0|e}function It(e){return e<0?0:e>4294967295?4294967295:0|e}class Dt{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=It(e);const n=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=It(e),t=It(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),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(i.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=It(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,i=0,r=0,s=0;for(;t<=n;)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new Tt(i,e-s)}}class Tt{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class Mt{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,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 e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new Ct(e.range.startLineNumber,e.range.startColumn),e.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 i=0;i/?")e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}();function zt(e){let t=At;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 Lt=new v;function Ot(e,t,n,i,r){if(t=zt(t),r||(r=l.first(Lt)),n.length>r.maxLen){let s=e-r.maxLen/2;return s<0?s=0:i+=s,Ot(e,t,n=n.substring(s,e+r.maxLen/2),i,r)}const s=Date.now(),o=e-1-i;let a=-1,c=null;for(let e=1;!(Date.now()-s>=r.timeBudget);e++){const i=o-r.windowSize*e;t.lastIndex=Math.max(0,i);const s=Pt(t,n,o,a);if(!s&&c)break;if(c=s,i<=0)break;a=i}if(c){const e={word:c[0],startColumn:i+1+c.index,endColumn:i+1+c.index+c[0].length};return t.lastIndex=0,e}return null}function Pt(e,t,n,i){let r;for(;r=e.exec(t);){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}Lt.unshift({maxLen:1e3,windowSize:15,timeBudget:150});class Wt{constructor(e){const t=Nt(e);this._defaultValue=t,this._asciiMap=Wt._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=Nt(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 Vt{constructor(e,t,n){const i=new Uint8Array(e*t);for(let r=0,s=e*t;rt&&(t=s),r>n&&(n=r),o>n&&(n=o)}t++,n++;const i=new Vt(n,t,0);for(let t=0,n=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let $t=null,qt=null;class Kt{static _createLink(e,t,n,i,r){let s=r-1;do{const n=t.charCodeAt(s);if(2!==e.get(n))break;s--}while(s>i);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:s+2},url:t.substring(i,s+1)}}static computeLinks(e,t=function(){return null===$t&&($t=new Ut([[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]])),$t}()){const n=function(){if(null===qt){qt=new Wt(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}const jt=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var Ht;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof Gt||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:S.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:jt})}(Ht||(Ht={}));class Gt{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?jt:(this._emitter||(this._emitter=new R),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Jt{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 Xt=new Jt,Yt=new Jt,Qt=new Jt,Zt=new Array(230),en={},tn=[],nn=Object.create(null),rn=Object.create(null),sn=[],on=[];for(let e=0;e<=193;e++)sn[e]=-1;for(let e=0;e<=132;e++)on[e]=-1;var an;!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=[],i=[];for(const e of t){const[t,r,s,o,a,l,c,h,d]=e;if(i[r]||(i[r]=!0,tn[r]=s,nn[s]=r,rn[s.toLowerCase()]=r,t&&(sn[r]=o,0!==o&&3!==o&&5!==o&&4!==o&&6!==o&&57!==o&&(on[o]=r))),!n[o]){if(n[o]=!0,!a)throw new Error(`String representation missing for key code ${o} around scan code ${s}`);Xt.define(o,a),Yt.define(o,h||a),Qt.define(o,d||h||a)}l&&(Zt[l]=o),c&&(en[c]=o)}on[3]=46}(),function(e){e.toString=function(e){return Xt.keyCodeToStr(e)},e.fromString=function(e){return Xt.strToKeyCode(e)},e.toUserSettingsUS=function(e){return Yt.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return Qt.keyCodeToStr(e)},e.fromUserSettings=function(e){return Yt.strToKeyCode(e)||Qt.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 Xt.keyCodeToStr(e)}}(an||(an={}));class ln extends _t{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return ln.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 ln(this.startLineNumber,this.startColumn,e,t):new ln(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Ct(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Ct(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new ln(e,t,this.endLineNumber,this.endColumn):new ln(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new ln(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new ln(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new ln(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new ln(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,i=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 pn(this,e,t);return this._factories.set(e,n),u((()=>{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.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(_n||(_n={})),function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(kn||(kn={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(En||(En={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(Fn||(Fn={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(Rn||(Rn={})),function(e){e[e.Deprecated=1]="Deprecated"}(Nn||(Nn={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(In||(In={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(Dn||(Dn={})),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"}(Tn||(Tn={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(Mn||(Mn={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(An||(An={})),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"}(zn||(zn={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"}(Ln||(Ln={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(On||(On={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(Pn||(Pn={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(Wn||(Wn={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(Vn||(Vn={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Un||(Un={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}($n||($n={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(qn||(qn={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(Kn||(Kn={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(Bn||(Bn={})),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"}(jn||(jn={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(Hn||(Hn={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(Gn||(Gn={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(Jn||(Jn={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(Xn||(Xn={})),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"}(Yn||(Yn={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(Qn||(Qn={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(Zn||(Zn={})),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"}(ei||(ei={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(ti||(ti={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(ni||(ni={})),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"}(ii||(ii={})),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"}(ri||(ri={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(si||(si={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(oi||(oi={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(ai||(ai={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(li||(li={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(ci||(ci={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(hi||(hi={})),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"}(di||(di={})),function(e){e[e.Deprecated=1]="Deprecated"}(pi||(pi={})),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"}(mi||(mi={})),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"}(ui||(ui={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(fi||(fi={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(gi||(gi={}));class Ci{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 _i{constructor(e,t){this.uri=e,this.value=t}}class ki{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[bi]="ResourceMap",e instanceof ki)this.map=new Map(e.map),this.toKey=t??ki.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=t??ki.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??ki.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new _i(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(bi=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class Ei{constructor(){this[vi]="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 i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:case 2:default:this.addItemLast(i);break;case 1:this.addItemFirst(i)}this._map.set(e,i),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 i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},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 i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},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 i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},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 i}[(vi=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 Fi extends Ei{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 Ri{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)}get(e){return this.map.get(e)||new Set}}function Ni(e,t,n,i,r){return function(e,t,n,i,r){if(0===i)return!0;const s=t.charCodeAt(i-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}(e,t,0,i,r)&&function(e,t,n,i,r){if(i+r===n)return!0;const s=t.charCodeAt(i+r);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i+r-1);if(0!==e.get(n))return!0}return!1}(e,t,n,i,r)}new class extends Fi{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"}(yi||(yi={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(wi||(wi={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(Si||(Si={}));class Ii{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 i=n.index,r=n[0].length;if(i===this._prevMatchStartIndex&&r===this._prevMatchLength){if(0===r){me(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=r,!this._wordSeparators||Ni(this._wordSeparators,e,t,i,r))return n}while(n);return null}}function Di(e,t="Unreachable"){throw new Error(t)}function Ti(e){e()||(e(),t(new o("Assertion Failed")))}function Mi(e,t){let n=0;for(;nString.fromCodePoint(e))).join(""),l.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}]`,"g");const c=new Ii(null,a),h=[];let d,p=!1,m=0,u=0,f=0;e:for(let t=i,n=r;t<=n;t++){const n=e.getLineContent(t),i=n.length;c.reset(0);do{if(d=c.next(n),d){let e=d.index,r=d.index+d[0].length;e>0&&he(n.charCodeAt(e-1))&&e--,r+1=n){p=!0;break e}h.push(new _t(t,e+1,t,r+1))}}}while(d)}return{ranges:h,hasMore:p,ambiguousCharacterCount:m,invisibleCharacterCount:u,nonBasicAsciiCharacterCount:f}}static computeUnicodeHighlightReason(e,t){const n=new zi(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),r=n.ambiguousCharacters.getPrimaryConfusable(i),s=ge.getLocales().filter((e=>!ge.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(i)));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class zi{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=ge.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of be.codePoints)Li(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 i=!1,r=!1;if(t)for(const e of t){const t=e.codePointAt(0),n=(s=e,ue.test(s));i=i||n,n||this.ambiguousCharacters.isAmbiguous(t)||be.isInvisibleCharacter(t)||(r=!0)}var s;return!i&&r?0:this.options.invisibleCharacters&&!Li(e)&&be.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function Li(e){return" "===e||"\n"===e||"\t"===e}class Oi{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class Pi{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class Wi{static addRange(e,t){let n=0;for(;nt))return new Wi(e,t)}static ofLength(e){return new Wi(0,e)}static ofStartAndLength(e,t){return new Wi(e,e+t)}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 Wi(this.start+e,this.endExclusive+e)}deltaStart(e){return new Wi(this.start+e,this.endExclusive)}deltaEnd(e){return new Wi(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.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;tt)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=Ui(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 i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=Vi(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=Vi(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,i=0,r=null;for(;n=s.startLineNumber?r=new Ki(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return null!==r&&t.push(r),new Bi(t)}subtractFrom(e){const t=$i(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=Ui(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)return new Bi([e]);const i=[];let r=e.startLineNumber;for(let e=t;er&&i.push(new Ki(r,t.startLineNumber)),r=t.endLineNumberExclusive}return re.toString())).join(", ")}getIntersection(e){const t=[];let n=0,i=0;for(;nt.delta(e))))}}class ji{static{this.zero=new ji(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new ji(0,t.column-e.column):new ji(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return ji.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const i of e)"\n"===i?(t++,n=0):n++;return new ji(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}createRange(e){return 0===this.lineCount?new _t(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new _t(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new Ct(e.lineNumber,e.column+this.columnCount):new Ct(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}class Hi{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class Gi{static inverse(e,t,n){const i=[];let r=1,s=1;for(const t of e){const e=new Gi(new Ki(r,t.original.startLineNumber),new Ki(s,t.modified.startLineNumber));e.modified.isEmpty||i.push(e),r=t.original.endLineNumberExclusive,s=t.modified.endLineNumberExclusive}const o=new Gi(new Ki(r,t+1),new Ki(s,n+1));return o.modified.isEmpty||i.push(o),i}static clip(e,t,n){const i=[];for(const r of e){const e=r.original.intersect(t),s=r.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&i.push(new Gi(e,s))}return i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Gi(this.modified,this.original)}join(e){return new Gi(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 Qi(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 Qi(new _t(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new _t(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new Qi(new _t(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new _t(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(Xi(this.original.endLineNumberExclusive,e)&&Xi(this.modified.endLineNumberExclusive,t))return new Qi(new _t(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new _t(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Qi(_t.fromPositions(new Ct(this.original.startLineNumber,1),Ji(new Ct(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),_t.fromPositions(new Ct(this.modified.startLineNumber,1),Ji(new Ct(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Qi(_t.fromPositions(Ji(new Ct(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Ji(new Ct(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),_t.fromPositions(Ji(new Ct(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Ji(new Ct(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new o}}function Ji(e,t){if(e.lineNumber<1)return new Ct(1,1);if(e.lineNumber>t.length)return new Ct(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new Ct(e.lineNumber,n.length+1):e}function Xi(e,t){return e>=1&&e<=t.length}class Yi extends Gi{static fromRangeMappings(e){const t=Ki.join(e.map((e=>Ki.fromRangeInclusive(e.originalRange)))),n=Ki.join(e.map((e=>Ki.fromRangeInclusive(e.modifiedRange))));return new Yi(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new Yi(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new Yi(this.original,this.modified,[this.toRangeMapping()])}}class Qi{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new Qi(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new Hi(this.originalRange,t)}}class Zi{computeDiff(e,t,n){const i=new sr(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),r=[];let s=null;for(const e of i.changes){let t,n;t=0===e.originalEndLineNumber?new Ki(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new Ki(e.originalStartLineNumber,e.originalEndLineNumber+1),n=0===e.modifiedEndLineNumber?new Ki(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new Ki(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let i=new Yi(t,n,e.charChanges?.map((e=>new Qi(new _t(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new _t(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));s&&(s.modified.endLineNumberExclusive!==i.modified.startLineNumber&&s.original.endLineNumberExclusive!==i.original.startLineNumber||(i=new Yi(s.original.join(i.original),s.modified.join(i.modified),s.innerChanges&&i.innerChanges?s.innerChanges.concat(i.innerChanges):void 0),r.pop())),r.push(i),s=i}return Ti((()=>Mi(r,((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 ir{constructor(e,t,n,i,r,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=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 ir(i,r,s,o,a,l,c,h)}}class rr{constructor(e,t,n,i,r){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=r}static createFromDiffResult(e,t,n,i,r,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=i.getStartLineNumber(t.modifiedStart)-1,h=0):(c=i.getStartLineNumber(t.modifiedStart),h=i.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=er(s,a,r,!0).changes;o&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,r=e.length;i1&&o>1&&e.charCodeAt(n-2)===t.charCodeAt(o-2);)n--,o--;(n>1||o>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,n,s+1,1,o)}{let n=ar(e,1),o=ar(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 lr(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t{n.push(hr.fromOffsetPairs(e?e.getEndExclusives():dr.zero,i?i.getStarts():new dr(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),n}static fromOffsetPairs(e,t){return new hr(new Wi(e.offset1,t.offset1),new Wi(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 hr(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new hr(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new hr(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new hr(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new hr(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 hr(t,n)}getStarts(){return new dr(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new dr(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class dr{static{this.zero=new dr(0,0)}static{this.max=new dr(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 dr(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class pr{static{this.instance=new pr}isValid(){return!0}}class mr{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&&l>0&&3===s.get(a-1,l-1)&&(d+=o.get(a-1,l-1)),d+=i?i(a,l):1):d=-1;const p=Math.max(c,h,d);if(p===d){const e=a>0&&l>0?o.get(a-1,l-1):0;o.set(a,l,e+1),s.set(a,l,3)}else p===c?(o.set(a,l,0),s.set(a,l,1)):p===h&&(o.set(a,l,0),s.set(a,l,2));r.set(a,l,p)}const a=[];let l=e.length,c=t.length;function h(e,t){e+1===l&&t+1===c||a.push(new hr(new Wi(e+1,l),new Wi(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 cr(a,!1)}}class vr{compute(e,t,n=pr.instance){if(0===e.length||0===t.length)return cr.trivial(e,t);const i=e,r=t;function s(e,t){for(;ei.length||p>r.length)continue;const m=s(d,p);a.set(c,m);const u=d===o?l.get(c+1):l.get(c-1);if(l.set(c,m!==d?new yr(u,d,p,m-d):u),a.get(c)===i.length&&a.get(c)-c===r.length)break e}}let h=l.get(c);const d=[];let p=i.length,m=r.length;for(;;){const e=h?h.x+h.length:0,t=h?h.y+h.length:0;if(e===p&&t===m||d.push(new hr(new Wi(e,p),new Wi(t,m))),!h)break;p=h.x,m=h.y,h=h.prev}return d.reverse(),new cr(d,!1)}}class yr{constructor(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i}}class wr{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 Sr{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 xr{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 t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let i=e[t-1],r=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(r=this.range.startColumn-1,i=i.substring(r)),this.lineStartOffsets.push(r);let s=0;if(!n){const e=i.trimStart();s=i.length-e.length,i=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-r-s,i.length):i.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=Er(e>0?this.elements[e-1]:-1),n=Er(et<=e)),i=e-this.firstElementOffsetByLineIdx[n];return new Ct(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(0===i&&"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)?_t.fromPositions(n,n):_t.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!Cr(this.elements[e]))return;let t=e;for(;t>0&&Cr(this.elements[t-1]);)t--;let n=e;for(;nt<=e.start))??0,n=function(t){const n=$i(t,(t=>e.endExclusive<=t));return n===t.length?void 0:t[n]}(this.firstElementOffsetByLineIdx)??this.elements.length;return new Wi(t,n)}}function Cr(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const _r={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function kr(e){return _r[e]}function Er(e){return 10===e?8:13===e?7:fr(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 Fr(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=(new vr).compute(new xr([e],new _t(1,1,1,e.length),!1),new xr([t],new _t(1,1,1,t.length),!1),n);let r=0;const s=hr.invert(i.diffs,e.length);for(const t of s)t.seq1Range.forEach((t=>{fr(e.charCodeAt(t))||r++}));const o=function(t){let n=0;for(let i=0;it.length?e:t);return r/o>.6&&o>10}function Rr(e,t,n){let i=n;return i=Nr(e,t,i),i=Nr(e,t,i),i=function(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let i=0;i0?n[i-1]:void 0,s=n[i],o=i+10&&(o=o.delta(a))}r.push(o)}return i.length>0&&r.push(i[i.length-1]),r}function Ir(e,t,n,i,r){let s=1;for(;e.seq1Range.start-s>=i.start&&e.seq2Range.start-s>=r.start&&n.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let o=0;for(;e.seq1Range.start+ol&&(l=c,a=i)}return e.delta(a)}class Dr{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:Tr(this.lines[e-1]))+(e===this.lines.length?0:Tr(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 Tr(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 i=0,r=e.length;ie===t)))return new Oi([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new Oi([new Yi(new Ki(1,e.length+1),new Ki(1,t.length+1),[new Qi(new _t(1,1,e.length,e[e.length-1].length+1),new _t(1,1,t.length,t[t.length-1].length+1))])],[],!1);const i=0===n.maxComputationTimeMs?pr.instance:new mr(n.maxComputationTimeMs),r=!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()))),l=t.map((e=>o(e.trim()))),c=new Dr(a,e),h=new Dr(l,t),d=(()=>c.length+h.length<1700?this.dynamicProgrammingDiffing.compute(c,h,i,((n,i)=>e[n]===t[i]?0===t[i].length?.1:1+Math.log(1+t[i].length):.99)):this.myersDiffingAlgorithm.compute(c,h,i))();let p=d.diffs,m=d.hitTimeout;p=Rr(c,h,p),p=function(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const o=[i[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}h(c,l)?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}i=o}while(s++<10&&r);return i}(c,0,p);const u=[],f=n=>{if(r)for(let s=0;sn.seq1Range.start-g==n.seq2Range.start-b)),f(n.seq1Range.start-g),g=n.seq1Range.endExclusive,b=n.seq2Range.endExclusive;const s=this.refineDiff(e,t,n,i,r);s.hitTimeout&&(m=!0);for(const e of s.mappings)u.push(e)}f(e.length-g);const v=Ar(u,e,t);let y=[];return n.computeMoves&&(y=this.computeMoves(v,e,t,a,l,i,r)),Ti((()=>{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 i(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const r of v){if(!r.innerChanges)return!1;for(const i of r.innerChanges)if(!(n(i.modifiedRange.getStartPosition(),t)&&n(i.modifiedRange.getEndPosition(),t)&&n(i.originalRange.getStartPosition(),e)&&n(i.originalRange.getEndPosition(),e)))return!1;if(!i(r.modified,t)||!i(r.original,e))return!1}return!0})),new Oi(v,y,m)}computeMoves(e,t,n,i,r,s,o){return function(e,t,n,i,r,s){let{moves:o,excludedChanges:a}=function(e,t,n,i){const r=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new gr(e.original,t,e))),o=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new gr(e.modified,n,e)))),a=new Set;for(const e of s){let t,n=-1;for(const i of o){const r=e.computeSimilarity(i);r>n&&(n=r,t=i)}if(n>.9&&t&&(o.delete(t),r.push(new Gi(e.range,t.range)),a.add(e.source),a.add(t.source)),!i.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}(e,t,n,s);if(!s.isValid())return[];const l=function(e,t,n,i,r,s){const o=[],a=new Ri;for(const n of e)for(let e=n.original.startLineNumber;ee.modified.startLineNumber),Ft));for(const t of e){let e=[];for(let i=t.modified.startLineNumber;i{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===r.endLineNumberExclusive)return n.originalLineRange=new Ki(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new Ki(n.modifiedLineRange.startLineNumber,r.endLineNumberExclusive),void s.push(n);const n={modifiedLineRange:r,originalLineRange:t};l.push(n),s.push(n)})),e=s}if(!s.isValid())return[]}var c;l.sort((c=Et((e=>e.modifiedLineRange.length),Ft),(e,t)=>-c(e,t)));const h=new Bi,d=new Bi;for(const e of l){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,n=h.subtractFrom(e.modifiedLineRange),i=d.subtractFrom(e.originalLineRange).getWithDelta(t),r=n.getIntersection(i);for(const e of r.ranges){if(e.length<3)continue;const n=e,i=e.delta(-t);o.push(new Gi(i,n)),h.addRange(n),d.addRange(i)}}o.sort(Et((e=>e.original.startLineNumber),Ft));const p=new qi(e);for(let t=0;te.original.startLineNumber<=n.original.startLineNumber)),l=Vi(e,(e=>e.modified.startLineNumber<=n.modified.startLineNumber)),c=Math.max(n.original.startLineNumber-a.original.startLineNumber,n.modified.startLineNumber-l.modified.startLineNumber),m=p.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumberi.length||t>r.length)break;if(h.contains(t)||d.contains(e))break;if(!Fr(i[e-1],r[t-1],s))break}for(g>0&&(d.addRange(new Ki(n.original.startLineNumber-g,n.original.startLineNumber)),h.addRange(new Ki(n.modified.startLineNumber-g,n.modified.startLineNumber))),b=0;bi.length||t>r.length)break;if(h.contains(t)||d.contains(e))break;if(!Fr(i[e-1],r[t-1],s))break}b>0&&(d.addRange(new Ki(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+b)),h.addRange(new Ki(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+b))),(g>0||b>0)&&(o[t]=new Gi(new Ki(n.original.startLineNumber-g,n.original.endLineNumberExclusive+b),new Ki(n.modified.startLineNumber-g,n.modified.endLineNumberExclusive+b)))}return o}(e.filter((e=>!a.has(e))),i,r,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(Et((e=>e.original.startLineNumber),Ft));const t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2?t[t.length-1]=i.join(r):t.push(r)}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){let t=0;for(const n of e)n.length>=2&&t++;return t}(n)>=2})),o=function(e,t){const n=new qi(e);return t.filter((t=>(n.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber{const i=Ar(this.refineDiff(t,n,new hr(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o).mappings,t,n,!0);return new Pi(e,i)}))}refineDiff(e,t,n,i,r){var s;const o=new Gi(new Ki((s=n).seq1Range.start+1,s.seq1Range.endExclusive+1),new Ki(s.seq2Range.start+1,s.seq2Range.endExclusive+1)).toRangeMapping2(e,t),a=new xr(e,o.originalRange,r),l=new xr(t,o.modifiedRange,r),c=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,i):this.myersDiffingAlgorithm.compute(a,l,i);let h=c.diffs;h=Rr(a,l,h),h=function(e,t,n){const i=hr.invert(n,e.length),r=[];let s=new dr(0,0);function o(n,o){if(n.offset10;){const n=i[0];if(!n.seq1Range.intersects(c.seq1Range)&&!n.seq2Range.intersects(c.seq2Range))break;const r=e.findWordContaining(n.seq1Range.start),s=t.findWordContaining(n.seq2Range.start),o=new hr(r,s),a=o.intersect(n);if(d+=a.seq1Range.length,p+=a.seq2Range.length,c=c.join(o),!(c.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;i.shift()}d+p<2*(c.seq1Range.length+c.seq2Range.length)/3&&r.push(c),s=c.getEndExclusives()}for(;i.length>0;){const e=i.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}return function(e,t){const n=[];for(;e.length>0||t.length>0;){const i=e[0],r=t[0];let s;s=i&&(!r||i.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,r)}(a,l,h),h=function(e,t,n){const i=[];for(const e of n){const t=i[i.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?i[i.length-1]=new hr(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):i.push(e)}return i}(0,0,h),h=function(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const a=[i[0]];for(let l=1;l5||r.length>500)return!1;const s=e.getText(r).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(i.seq1Range),m=i.seq1Range.length,u=t.countLinesIn(i.seq2Range),f=i.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+m),1.5)+Math.pow(g(40*u+f),1.5),1.5)>74184.96480721243}d(h,c)?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}i=a}while(s++<10&&r);const o=[];return function(e,t){for(let n=0;n{let r=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 Wi(a.start,n.seq1Range.start));s(l)&&(r=r.deltaStart(-l.length));const c=e.getText(new Wi(n.seq1Range.endExclusive,a.endExclusive));s(c)&&(r=r.deltaEnd(c.length));const h=hr.fromOffsetPairs(t?t.getEndExclusives():dr.zero,i?i.getStarts():dr.max),d=r.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}(a,l,h);return{mappings:h.map((e=>new Qi(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range)))),hitTimeout:c.hitTimeout}}}function Ar(e,t,n,i=!1){const r=[];for(const i of function*(e){let t,n;for(const s of e)void 0!==n&&(r=s,(i=n).original.overlapOrTouch(r.original)||i.modified.overlapOrTouch(r.modified))?t.push(s):(t&&(yield t),t=[s]),n=s;var i,r;t&&(yield t)}(e.map((e=>function(e,t,n){let i=0,r=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+i<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+i<=e.modifiedRange.endLineNumber&&(r=-1),e.modifiedRange.startColumn-1>=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+r&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+r&&(i=1);const s=new Ki(e.originalRange.startLineNumber+i,e.originalRange.endLineNumber+1+r),o=new Ki(e.modifiedRange.startLineNumber+i,e.modifiedRange.endLineNumber+1+r);return new Yi(s,o,[e])}(e,t,n))))){const e=i[0],t=i[i.length-1];r.push(new Yi(e.original.join(t.original),e.modified.join(t.modified),i.map((e=>e.innerChanges[0]))))}return Ti((()=>{if(!i&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(n.length-r[r.length-1].modified.endLineNumberExclusive!=t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return Mi(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case t:a=(n-i)/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:i,a:r}=e;let s,o,a;if(0===n)s=o=a=i;else{const e=i<.5?i*(1+n):i+n-i*n,r=2*i-e;s=Or._hue2rgb(r,e,t+1/3),o=Or._hue2rgb(r,e,t),a=Or._hue2rgb(r,e,t-1/3)}return new Lr(Math.round(255*s),Math.round(255*o),Math.round(255*a),r)}}class Pr{constructor(e,t,n,i){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=zr(Math.max(Math.min(1,t),0),3),this.v=zr(Math.max(Math.min(1,n),0),3),this.a=zr(Math.max(Math.min(1,i),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,i=e.b/255,r=Math.max(t,n,i),s=r-Math.min(t,n,i),o=0===r?0:s/r;let a;return a=0===s?0:r===t?((n-i)/s%6+6)%6:r===n?(i-t)/s+2:(t-n)/s+4,new Pr(Math.round(60*a),o,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:r}=e,s=i*n,o=s*(1-Math.abs(t/60%2-1)),a=i-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 Lr(l,c,h,r)}}class Wr{static fromHex(e){return Wr.Format.CSS.parseHex(e)||Wr.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:Or.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Pr.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof Lr)this.rgba=e;else if(e instanceof Or)this._hsla=e,this.rgba=Or.toRGBA(e);else{if(!(e instanceof Pr))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=Pr.toRGBA(e)}}equals(e){return!!e&&Lr.equals(this.rgba,e.rgba)&&Or.equals(this.hsla,e.hsla)&&Pr.equals(this.hsva,e.hsva)}getRelativeLuminance(){return zr(.2126*Wr._relativeLuminanceForComponent(this.rgba.r)+.7152*Wr._relativeLuminanceForComponent(this.rgba.g)+.0722*Wr._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()e.startColumn){const t={range:e,...Xr(i[1]),shouldBeInComments:!0};(t.text||t.hasSeparatorLine)&&n.push(t)}}}function Xr(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(Gr,""),hasSeparatorLine:t}}class Yr extends Mt{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,i=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}class Qr{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new Yr(pt.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,n){const i=this._getModel(e);return i?Ai.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async findSectionHeaders(e,t){const n=this._getModel(e);return n?function(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const i=function(e,t){const n=[],i=e.getLineCount();for(let r=1;r<=i;r++){const i=e.getLineContent(r),s=i.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:i.length+1};if(e.endColumn>e.startColumn){const t={range:e,...Xr(i.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],n=e.getLineCount();for(let i=1;i<=n;i++)Jr(e.getLineContent(i),i,t);return t}(e);n=n.concat(t)}return n}(n,t):[]}async computeDiff(e,t,n,i){const r=this._getModel(e),s=this._getModel(t);return r&&s?Qr.computeDiff(r,s,n,i):null}static computeDiff(e,t,n,i){const r="advanced"===i?new Mr:new Zi,s=e.getLinesContent(),o=t.getLinesContent(),a=r.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 i=1;i<=n;i++)if(e.getLineContent(i)!==t.getLineContent(i))return!1;return!0}static{this._diffLimit=1e5}async computeMoreMinimalEdits(e,t,n){const i=this._getModel(e);if(!i)return t;const r=[];let s;t=t.slice(0).sort(((e,t)=>e.range&&t.range?_t.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));let o=0;for(let e=1;eQr._diffLimit){r.push({range:e,text:o});continue}const l=Le(t,o,n),c=i.offsetAt(_t.lift(e).getStartPosition());for(const e of l){const t=i.positionAt(c+e.originalStart),n=i.positionAt(c+e.originalStart+e.originalLength),s={text:o.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};i.getValueInRange(s.range)!==s.text&&r.push(s)}}return"number"==typeof s&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?Kt.computeLinks(e):[]}(t):null}async computeDefaultDocumentColors(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],n=jr(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/gm);if(n.length>0)for(const i of n){const n=i.filter((e=>void 0!==e)),r=n[1],s=n[2];if(!s)continue;let o;if("rgb"===r){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=Kr($r(e,i),jr(s,t),!1)}else if("rgba"===r){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=Kr($r(e,i),jr(s,t),!0)}else if("hsl"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=Br($r(e,i),jr(s,t),!1)}else if("hsla"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Br($r(e,i),jr(s,t),!0)}else"#"===r&&(o=qr($r(e,i),r+s));o&&t.push(o)}return t}(e):[]}(t):null}static{this._suggestionsLimit=1e4}async textualSuggest(e,t,n,i){const r=new w,s=new RegExp(n,i),o=new Set;e:for(const n of e){const e=this._getModel(n);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>Qr._suggestionsLimit))break e}return{words:Array.from(o),duration:r.elapsed()}}async computeWordRanges(e,t,n,i){const r=this._getModel(e);if(!r)return Object.create(null);const s=new RegExp(n,i),o=Object.create(null);for(let e=t.startLineNumber;efunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},i={};for(const t of e)i[t]=n(t);return i}(n,((e,t)=>this._host.fhr(e,t))),r={host:i,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve(I(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}"function"==typeof importScripts&&(globalThis.monaco={editor:void 0,languages:void 0,CancellationTokenSource:class{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 Gt),this._token}cancel(){this._token?this._token instanceof Gt&&this._token.cancel():this._token=Ht.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Gt&&this._token.dispose():this._token=Ht.None}},Emitter:R,KeyCode:jn,KeyMod:Ci,Position:Ct,Range:_t,Selection:ln,SelectionDirection:li,MarkerSeverity:Hn,MarkerTag:Gn,Uri:pt,Token:class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}});let Zr=!1;function es(e){if(Zr)return;Zr=!0;const t=new Fe((e=>{globalThis.postMessage(e)}),(t=>new Qr(t,e)));globalThis.onmessage=e=>{t.onmessage(e.data)}}var ts,ns;globalThis.onmessage=e=>{Zr||es(null)},(ns=ts||(ts={}))[ns.Ident=0]="Ident",ns[ns.AtKeyword=1]="AtKeyword",ns[ns.String=2]="String",ns[ns.BadString=3]="BadString",ns[ns.UnquotedString=4]="UnquotedString",ns[ns.Hash=5]="Hash",ns[ns.Num=6]="Num",ns[ns.Percentage=7]="Percentage",ns[ns.Dimension=8]="Dimension",ns[ns.UnicodeRange=9]="UnicodeRange",ns[ns.CDO=10]="CDO",ns[ns.CDC=11]="CDC",ns[ns.Colon=12]="Colon",ns[ns.SemiColon=13]="SemiColon",ns[ns.CurlyL=14]="CurlyL",ns[ns.CurlyR=15]="CurlyR",ns[ns.ParenthesisL=16]="ParenthesisL",ns[ns.ParenthesisR=17]="ParenthesisR",ns[ns.BracketL=18]="BracketL",ns[ns.BracketR=19]="BracketR",ns[ns.Whitespace=20]="Whitespace",ns[ns.Includes=21]="Includes",ns[ns.Dashmatch=22]="Dashmatch",ns[ns.SubstringOperator=23]="SubstringOperator",ns[ns.PrefixOperator=24]="PrefixOperator",ns[ns.SuffixOperator=25]="SuffixOperator",ns[ns.Delim=26]="Delim",ns[ns.EMS=27]="EMS",ns[ns.EXS=28]="EXS",ns[ns.Length=29]="Length",ns[ns.Angle=30]="Angle",ns[ns.Time=31]="Time",ns[ns.Freq=32]="Freq",ns[ns.Exclamation=33]="Exclamation",ns[ns.Resolution=34]="Resolution",ns[ns.Comma=35]="Comma",ns[ns.Charset=36]="Charset",ns[ns.EscapedJavaScript=37]="EscapedJavaScript",ns[ns.BadEscapedJavaScript=38]="BadEscapedJavaScript",ns[ns.Comment=39]="Comment",ns[ns.SingleLineComment=40]="SingleLineComment",ns[ns.EOF=41]="EOF",ns[ns.ContainerQueryLength=42]="ContainerQueryLength",ns[ns.CustomToken=43]="CustomToken";var is=class{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(;t".charCodeAt(0),_s="@".charCodeAt(0),ks="#".charCodeAt(0),Es="$".charCodeAt(0),Fs="\\".charCodeAt(0),Rs="/".charCodeAt(0),Ns="\n".charCodeAt(0),Is="\r".charCodeAt(0),Ds="\f".charCodeAt(0),Ts='"'.charCodeAt(0),Ms="'".charCodeAt(0),As=" ".charCodeAt(0),zs="\t".charCodeAt(0),Ls=";".charCodeAt(0),Os=":".charCodeAt(0),Ps="{".charCodeAt(0),Ws="}".charCodeAt(0),Vs="[".charCodeAt(0),Us="]".charCodeAt(0),$s=",".charCodeAt(0),qs=".".charCodeAt(0),Ks="!".charCodeAt(0),Bs="?".charCodeAt(0),js="+".charCodeAt(0),Hs={};Hs[Ls]=ts.SemiColon,Hs[Os]=ts.Colon,Hs[Ps]=ts.CurlyL,Hs[Ws]=ts.CurlyR,Hs[Us]=ts.BracketR,Hs[Vs]=ts.BracketL,Hs[ws]=ts.ParenthesisL,Hs[Ss]=ts.ParenthesisR,Hs[$s]=ts.Comma;var Gs={};Gs.em=ts.EMS,Gs.ex=ts.EXS,Gs.px=ts.Length,Gs.cm=ts.Length,Gs.mm=ts.Length,Gs.in=ts.Length,Gs.pt=ts.Length,Gs.pc=ts.Length,Gs.deg=ts.Angle,Gs.rad=ts.Angle,Gs.grad=ts.Angle,Gs.ms=ts.Time,Gs.s=ts.Time,Gs.hz=ts.Freq,Gs.khz=ts.Freq,Gs["%"]=ts.Percentage,Gs.fr=ts.Percentage,Gs.dpi=ts.Resolution,Gs.dpcm=ts.Resolution,Gs.cqw=ts.ContainerQueryLength,Gs.cqh=ts.ContainerQueryLength,Gs.cqi=ts.ContainerQueryLength,Gs.cqb=ts.ContainerQueryLength,Gs.cqmin=ts.ContainerQueryLength,Gs.cqmax=ts.ContainerQueryLength;var Js,Xs,Ys,Qs,Zs=class{constructor(){this.stream=new is(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new is(e)}finishToken(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}}substring(e,t){return this.stream.substring(e,e+t)}pos(){return this.stream.pos()}goBackTo(e){this.stream.goBackTo(e)}scanUnquotedString(){const e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,ts.UnquotedString,t.join("")):null}scan(){const e=this.trivia();if(null!==e)return e;const t=this.stream.pos();return this.stream.eos()?this.finishToken(t,ts.EOF):this.scanNext(t)}tryScanUnicode(){const e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,ts.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([xs,Ks,gs,gs]))return this.finishToken(e,ts.CDO);if(this.stream.advanceIfChars([gs,gs,Cs]))return this.finishToken(e,ts.CDC);let t=[];if(this.ident(t))return this.finishToken(e,ts.Ident,t.join(""));if(this.stream.advanceIfChar(_s)){if(t=["@"],this._name(t)){const n=t.join("");return"@charset"===n?this.finishToken(e,ts.Charset,n):this.finishToken(e,ts.AtKeyword,n)}return this.finishToken(e,ts.Delim)}if(this.stream.advanceIfChar(ks))return t=["#"],this._name(t)?this.finishToken(e,ts.Hash,t.join("")):this.finishToken(e,ts.Delim);if(this.stream.advanceIfChar(Ks))return this.finishToken(e,ts.Exclamation);if(this._number()){const n=this.stream.pos();if(t=[this.stream.substring(e,n)],this.stream.advanceIfChar(vs))return this.finishToken(e,ts.Percentage);if(this.ident(t)){const i=this.stream.substring(n).toLowerCase(),r=Gs[i];return void 0!==r?this.finishToken(e,r,t.join("")):this.finishToken(e,ts.Dimension,t.join(""))}return this.finishToken(e,ts.Num)}t=[];let n=this._string(t);return null!==n?this.finishToken(e,n,t.join("")):(n=Hs[this.stream.peekChar()],void 0!==n?(this.stream.advance(1),this.finishToken(e,n)):this.stream.peekChar(0)===ps&&this.stream.peekChar(1)===us?(this.stream.advance(2),this.finishToken(e,ts.Includes)):this.stream.peekChar(0)===fs&&this.stream.peekChar(1)===us?(this.stream.advance(2),this.finishToken(e,ts.Dashmatch)):this.stream.peekChar(0)===ys&&this.stream.peekChar(1)===us?(this.stream.advance(2),this.finishToken(e,ts.SubstringOperator)):this.stream.peekChar(0)===ms&&this.stream.peekChar(1)===us?(this.stream.advance(2),this.finishToken(e,ts.PrefixOperator)):this.stream.peekChar(0)===Es&&this.stream.peekChar(1)===us?(this.stream.advance(2),this.finishToken(e,ts.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,ts.Delim)))}trivia(){for(;;){const e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,ts.Whitespace)}else{if(!this.comment())return null;if(!this.ignoreComment)return this.finishToken(e,ts.Comment)}}}comment(){if(this.stream.advanceIfChars([Rs,ys])){let e=!1,t=!1;return this.stream.advanceWhileChar((n=>t&&n===Rs?(e=!0,!1):(t=n===ys,!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 Ds: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 i=0;for(;i<6&&(n>=hs&&n<=ds||n>=rs&&n<=ss||n>=as&&n<=ls);)this.stream.advance(1),n=this.stream.peekChar(),i++;if(i>0){try{const t=parseInt(this.stream.substring(this.stream.pos()-i),16);t&&e.push(String.fromCharCode(t))}catch(e){}return n===As||n===zs?this.stream.advance(1):this._newline([]),!0}if(n!==Is&&n!==Ds&&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!==Ds&&n!==Ns&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)}_string(e){if(this.stream.peekChar()===Ms||this.stream.peekChar()===Ts){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)),ts.String):ts.BadString}return null}_unquotedChar(e){const t=this.stream.peekChar();return 0!==t&&t!==Fs&&t!==Ms&&t!==Ts&&t!==ws&&t!==Ss&&t!==As&&t!==zs&&t!==Ns&&t!==Ds&&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===zs||e===Ns||e===Ds||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>=rs&&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>=rs&&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>=rs&&e<=ss||e>=as&&e<=ls,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar((e=>e===Bs));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 eo(e,t){if(e.length0?e.lastIndexOf(t)===n:0===n&&e===t}function no(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}function io(e,t){let n="";for(;t>0;)1&~t||(n+=e),e+=e,t>>>=1;return n}function ro(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 so(e,t){let n=ro(e,t);const i=[];for(;n;)i.unshift(n),n=n.parent;return i}(Xs=Js||(Js={}))[Xs.Undefined=0]="Undefined",Xs[Xs.Identifier=1]="Identifier",Xs[Xs.Stylesheet=2]="Stylesheet",Xs[Xs.Ruleset=3]="Ruleset",Xs[Xs.Selector=4]="Selector",Xs[Xs.SimpleSelector=5]="SimpleSelector",Xs[Xs.SelectorInterpolation=6]="SelectorInterpolation",Xs[Xs.SelectorCombinator=7]="SelectorCombinator",Xs[Xs.SelectorCombinatorParent=8]="SelectorCombinatorParent",Xs[Xs.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",Xs[Xs.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",Xs[Xs.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",Xs[Xs.Page=12]="Page",Xs[Xs.PageBoxMarginBox=13]="PageBoxMarginBox",Xs[Xs.ClassSelector=14]="ClassSelector",Xs[Xs.IdentifierSelector=15]="IdentifierSelector",Xs[Xs.ElementNameSelector=16]="ElementNameSelector",Xs[Xs.PseudoSelector=17]="PseudoSelector",Xs[Xs.AttributeSelector=18]="AttributeSelector",Xs[Xs.Declaration=19]="Declaration",Xs[Xs.Declarations=20]="Declarations",Xs[Xs.Property=21]="Property",Xs[Xs.Expression=22]="Expression",Xs[Xs.BinaryExpression=23]="BinaryExpression",Xs[Xs.Term=24]="Term",Xs[Xs.Operator=25]="Operator",Xs[Xs.Value=26]="Value",Xs[Xs.StringLiteral=27]="StringLiteral",Xs[Xs.URILiteral=28]="URILiteral",Xs[Xs.EscapedValue=29]="EscapedValue",Xs[Xs.Function=30]="Function",Xs[Xs.NumericValue=31]="NumericValue",Xs[Xs.HexColorValue=32]="HexColorValue",Xs[Xs.RatioValue=33]="RatioValue",Xs[Xs.MixinDeclaration=34]="MixinDeclaration",Xs[Xs.MixinReference=35]="MixinReference",Xs[Xs.VariableName=36]="VariableName",Xs[Xs.VariableDeclaration=37]="VariableDeclaration",Xs[Xs.Prio=38]="Prio",Xs[Xs.Interpolation=39]="Interpolation",Xs[Xs.NestedProperties=40]="NestedProperties",Xs[Xs.ExtendsReference=41]="ExtendsReference",Xs[Xs.SelectorPlaceholder=42]="SelectorPlaceholder",Xs[Xs.Debug=43]="Debug",Xs[Xs.If=44]="If",Xs[Xs.Else=45]="Else",Xs[Xs.For=46]="For",Xs[Xs.Each=47]="Each",Xs[Xs.While=48]="While",Xs[Xs.MixinContentReference=49]="MixinContentReference",Xs[Xs.MixinContentDeclaration=50]="MixinContentDeclaration",Xs[Xs.Media=51]="Media",Xs[Xs.Keyframe=52]="Keyframe",Xs[Xs.FontFace=53]="FontFace",Xs[Xs.Import=54]="Import",Xs[Xs.Namespace=55]="Namespace",Xs[Xs.Invocation=56]="Invocation",Xs[Xs.FunctionDeclaration=57]="FunctionDeclaration",Xs[Xs.ReturnStatement=58]="ReturnStatement",Xs[Xs.MediaQuery=59]="MediaQuery",Xs[Xs.MediaCondition=60]="MediaCondition",Xs[Xs.MediaFeature=61]="MediaFeature",Xs[Xs.FunctionParameter=62]="FunctionParameter",Xs[Xs.FunctionArgument=63]="FunctionArgument",Xs[Xs.KeyframeSelector=64]="KeyframeSelector",Xs[Xs.ViewPort=65]="ViewPort",Xs[Xs.Document=66]="Document",Xs[Xs.AtApplyRule=67]="AtApplyRule",Xs[Xs.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",Xs[Xs.CustomPropertySet=69]="CustomPropertySet",Xs[Xs.ListEntry=70]="ListEntry",Xs[Xs.Supports=71]="Supports",Xs[Xs.SupportsCondition=72]="SupportsCondition",Xs[Xs.NamespacePrefix=73]="NamespacePrefix",Xs[Xs.GridLine=74]="GridLine",Xs[Xs.Plugin=75]="Plugin",Xs[Xs.UnknownAtRule=76]="UnknownAtRule",Xs[Xs.Use=77]="Use",Xs[Xs.ModuleConfiguration=78]="ModuleConfiguration",Xs[Xs.Forward=79]="Forward",Xs[Xs.ForwardVisibility=80]="ForwardVisibility",Xs[Xs.Module=81]="Module",Xs[Xs.UnicodeRange=82]="UnicodeRange",Xs[Xs.Layer=83]="Layer",Xs[Xs.LayerNameList=84]="LayerNameList",Xs[Xs.LayerName=85]="LayerName",Xs[Xs.PropertyAtRule=86]="PropertyAtRule",Xs[Xs.Container=87]="Container",(Qs=Ys||(Ys={}))[Qs.Mixin=0]="Mixin",Qs[Qs.Rule=1]="Rule",Qs[Qs.Variable=2]="Variable",Qs[Qs.Function=3]="Function",Qs[Qs.Keyframe=4]="Keyframe",Qs[Qs.Unknown=5]="Unknown",Qs[Qs.Module=6]="Module",Qs[Qs.Forward=7]="Forward",Qs[Qs.ForwardVisibility=8]="ForwardVisibility",Qs[Qs.Property=9]="Property";var oo,ao,lo=class{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||Js.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 co;)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}},co=class extends lo{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}},ho=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}},po=class extends lo{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return Js.Identifier}containsInterpolation(){return this.hasChildren()}},mo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Stylesheet}},uo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Declarations}},fo=class extends lo{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}},go=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Ruleset}getSelectors(){return this.selectors||(this.selectors=new co(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(Js.Declarations)}},bo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Selector}},vo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.SimpleSelector}},yo=class extends lo{constructor(e,t){super(e,t)}},wo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.CustomPropertySet}},So=class e extends yo{constructor(e,t){super(e,t),this.property=null}get type(){return Js.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const t=this.property?this.property.getName():"unknown";if(this.parent instanceof uo&&this.parent.getParent()instanceof Lo){const n=this.parent.getParent().getParent();if(n instanceof e)return n.getFullPropertyName()+t}return t}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}},xo=class extends So{constructor(e,t){super(e,t)}get type(){return Js.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}},Co=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e){const t=/[_\+]+$/.exec(e);return t&&t[0].length?e.substr(0,e.length-t[0].length):e}(this.getText())}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},_o=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Invocation}getArguments(){return this.arguments||(this.arguments=new co(this)),this.arguments}},ko=class extends _o{constructor(e,t){super(e,t)}get type(){return Js.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}},Eo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.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}},Fo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.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}},Ro=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}},No=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.For}setVariable(e){return this.setNode("variable",e,0)}},Io=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Each}getVariables(){return this.variables||(this.variables=new co(this)),this.variables}},Do=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.While}},To=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Else}},Mo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.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 co(this)),this.parameters}},Ao=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.ViewPort}},zo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.FontFace}},Lo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.NestedProperties}},Oo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.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():""}},Po=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.KeyframeSelector}},Wo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Import}setMedialist(e){return!!e&&(e.attachTo(this),!0)}},Vo=class extends lo{get type(){return Js.Use}getParameters(){return this.parameters||(this.parameters=new co(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Uo=class extends lo{get type(){return Js.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}},$o=class extends lo{get type(){return Js.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new co(this)),this.members}getParameters(){return this.parameters||(this.parameters=new co(this)),this.parameters}},qo=class extends lo{get type(){return Js.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}},Ko=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Namespace}},Bo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Media}},jo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Supports}},Ho=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}},Go=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.PropertyAtRule}setName(e){return!!e&&(e.attachTo(this),this.name=e,!0)}getName(){return this.name}},Jo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Document}},Xo=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Container}},Yo=class extends lo{constructor(e,t){super(e,t)}},Qo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.MediaQuery}},Zo=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.MediaCondition}},ea=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.MediaFeature}},ta=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.SupportsCondition}},na=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.Page}},ia=class extends fo{constructor(e,t){super(e,t)}get type(){return Js.PageBoxMarginBox}},ra=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Expression}},sa=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.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}},oa=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}},aa=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.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}},la=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.HexColorValue}},ca=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.RatioValue}},ha=".".charCodeAt(0),da="0".charCodeAt(0),pa="9".charCodeAt(0),ma=class extends lo{constructor(e,t){super(e,t)}get type(){return Js.NumericValue}getValue(){const e=this.getText();let t,n=0;for(let i=0,r=e.length;i0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),r=t.args??{}}return s=i,o=r,0===Object.keys(o).length?s:s.replace(Ia,((e,t)=>o[t]??e));var s,o}var Ia=/{([^}]+)}/g;var Da,Ta,Ma,Aa,za,La,Oa,Pa,Wa,Va,Ua,$a,qa,Ka,Ba,ja,Ha,Ga,Ja,Xa,Ya,Qa,Za,el,tl,nl,il,rl,sl,ol,al,ll,cl,hl,dl,pl,ml,ul,fl,gl,bl,vl,yl,wl,Sl,xl,Cl,_l,kl,El,Fl,Rl,Nl,Il,Dl,Tl,Ml,Al,zl,Ll,Ol,Pl,Wl,Vl,Ul,$l,ql,Kl,Bl,jl,Hl,Gl,Jl,Xl,Yl,Ql,Zl,ec,tc,nc,ic,rc,sc,oc,ac,lc,cc,hc,dc,pc,mc,uc,fc,gc,bc,vc,yc,wc,Sc,xc,Cc,_c,kc,Ec,Fc,Rc,Nc,Ic,Dc,Tc,Mc,Ac,zc,Lc,Oc,Pc,Wc,Vc,Uc,$c,qc,Kc,Bc,jc,Hc,Gc,Jc,Xc,Yc,Qc,Zc,eh,th,nh=class{constructor(e,t){this.id=e,this.message=t}},ih={NumberExpected:new nh("css-numberexpected",Na("number expected")),ConditionExpected:new nh("css-conditionexpected",Na("condition expected")),RuleOrSelectorExpected:new nh("css-ruleorselectorexpected",Na("at-rule or selector expected")),DotExpected:new nh("css-dotexpected",Na("dot expected")),ColonExpected:new nh("css-colonexpected",Na("colon expected")),SemiColonExpected:new nh("css-semicolonexpected",Na("semi-colon expected")),TermExpected:new nh("css-termexpected",Na("term expected")),ExpressionExpected:new nh("css-expressionexpected",Na("expression expected")),OperatorExpected:new nh("css-operatorexpected",Na("operator expected")),IdentifierExpected:new nh("css-identifierexpected",Na("identifier expected")),PercentageExpected:new nh("css-percentageexpected",Na("percentage expected")),URIOrStringExpected:new nh("css-uriorstringexpected",Na("uri or string expected")),URIExpected:new nh("css-uriexpected",Na("URI expected")),VariableNameExpected:new nh("css-varnameexpected",Na("variable name expected")),VariableValueExpected:new nh("css-varvalueexpected",Na("variable value expected")),PropertyValueExpected:new nh("css-propertyvalueexpected",Na("property value expected")),LeftCurlyExpected:new nh("css-lcurlyexpected",Na("{ expected")),RightCurlyExpected:new nh("css-rcurlyexpected",Na("} expected")),LeftSquareBracketExpected:new nh("css-rbracketexpected",Na("[ expected")),RightSquareBracketExpected:new nh("css-lbracketexpected",Na("] expected")),LeftParenthesisExpected:new nh("css-lparentexpected",Na("( expected")),RightParenthesisExpected:new nh("css-rparentexpected",Na(") expected")),CommaExpected:new nh("css-commaexpected",Na("comma expected")),PageDirectiveOrDeclarationExpected:new nh("css-pagedirordeclexpected",Na("page directive or declaraton expected")),UnknownAtRule:new nh("css-unknownatrule",Na("at-rule unknown")),UnknownKeyword:new nh("css-unknownkeyword",Na("unknown keyword")),SelectorExpected:new nh("css-selectorexpected",Na("selector expected")),StringLiteralExpected:new nh("css-stringliteralexpected",Na("string literal expected")),WhitespaceExpected:new nh("css-whitespaceexpected",Na("whitespace expected")),MediaQueryExpected:new nh("css-mediaqueryexpected",Na("media query expected")),IdentifierOrWildcardExpected:new nh("css-idorwildcardexpected",Na("identifier or wildcard expected")),WildcardExpected:new nh("css-wildcardexpected",Na("wildcard expected")),IdentifierOrVariableExpected:new nh("css-idorvarexpected",Na("identifier or variable expected"))};(Da||(Da={})).is=function(e){return"string"==typeof e},(Ta||(Ta={})).is=function(e){return"string"==typeof e},(Aa=Ma||(Ma={})).MIN_VALUE=-2147483648,Aa.MAX_VALUE=2147483647,Aa.is=function(e){return"number"==typeof e&&Aa.MIN_VALUE<=e&&e<=Aa.MAX_VALUE},(La=za||(za={})).MIN_VALUE=0,La.MAX_VALUE=2147483647,La.is=function(e){return"number"==typeof e&&La.MIN_VALUE<=e&&e<=La.MAX_VALUE},(Pa=Oa||(Oa={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=za.MAX_VALUE),t===Number.MAX_VALUE&&(t=za.MAX_VALUE),{line:e,character:t}},Pa.is=function(e){let t=e;return rh.objectLiteral(t)&&rh.uinteger(t.line)&&rh.uinteger(t.character)},(Va=Wa||(Wa={})).create=function(e,t,n,i){if(rh.uinteger(e)&&rh.uinteger(t)&&rh.uinteger(n)&&rh.uinteger(i))return{start:Oa.create(e,t),end:Oa.create(n,i)};if(Oa.is(e)&&Oa.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},Va.is=function(e){let t=e;return rh.objectLiteral(t)&&Oa.is(t.start)&&Oa.is(t.end)},($a=Ua||(Ua={})).create=function(e,t){return{uri:e,range:t}},$a.is=function(e){let t=e;return rh.objectLiteral(t)&&Wa.is(t.range)&&(rh.string(t.uri)||rh.undefined(t.uri))},(Ka=qa||(qa={})).create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},Ka.is=function(e){let t=e;return rh.objectLiteral(t)&&Wa.is(t.targetRange)&&rh.string(t.targetUri)&&Wa.is(t.targetSelectionRange)&&(Wa.is(t.originSelectionRange)||rh.undefined(t.originSelectionRange))},(ja=Ba||(Ba={})).create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},ja.is=function(e){const t=e;return rh.objectLiteral(t)&&rh.numberRange(t.red,0,1)&&rh.numberRange(t.green,0,1)&&rh.numberRange(t.blue,0,1)&&rh.numberRange(t.alpha,0,1)},(Ga=Ha||(Ha={})).create=function(e,t){return{range:e,color:t}},Ga.is=function(e){const t=e;return rh.objectLiteral(t)&&Wa.is(t.range)&&Ba.is(t.color)},(Xa=Ja||(Ja={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},Xa.is=function(e){const t=e;return rh.objectLiteral(t)&&rh.string(t.label)&&(rh.undefined(t.textEdit)||pl.is(t))&&(rh.undefined(t.additionalTextEdits)||rh.typedArray(t.additionalTextEdits,pl.is))},(Qa=Ya||(Ya={})).Comment="comment",Qa.Imports="imports",Qa.Region="region",(el=Za||(Za={})).create=function(e,t,n,i,r,s){const o={startLine:e,endLine:t};return rh.defined(n)&&(o.startCharacter=n),rh.defined(i)&&(o.endCharacter=i),rh.defined(r)&&(o.kind=r),rh.defined(s)&&(o.collapsedText=s),o},el.is=function(e){const t=e;return rh.objectLiteral(t)&&rh.uinteger(t.startLine)&&rh.uinteger(t.startLine)&&(rh.undefined(t.startCharacter)||rh.uinteger(t.startCharacter))&&(rh.undefined(t.endCharacter)||rh.uinteger(t.endCharacter))&&(rh.undefined(t.kind)||rh.string(t.kind))},(nl=tl||(tl={})).create=function(e,t){return{location:e,message:t}},nl.is=function(e){let t=e;return rh.defined(t)&&Ua.is(t.location)&&rh.string(t.message)},(rl=il||(il={})).Error=1,rl.Warning=2,rl.Information=3,rl.Hint=4,(ol=sl||(sl={})).Unnecessary=1,ol.Deprecated=2,(al||(al={})).is=function(e){const t=e;return rh.objectLiteral(t)&&rh.string(t.href)},(cl=ll||(ll={})).create=function(e,t,n,i,r,s){let o={range:e,message:t};return rh.defined(n)&&(o.severity=n),rh.defined(i)&&(o.code=i),rh.defined(r)&&(o.source=r),rh.defined(s)&&(o.relatedInformation=s),o},cl.is=function(e){var t;let n=e;return rh.defined(n)&&Wa.is(n.range)&&rh.string(n.message)&&(rh.number(n.severity)||rh.undefined(n.severity))&&(rh.integer(n.code)||rh.string(n.code)||rh.undefined(n.code))&&(rh.undefined(n.codeDescription)||rh.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(rh.string(n.source)||rh.undefined(n.source))&&(rh.undefined(n.relatedInformation)||rh.typedArray(n.relatedInformation,tl.is))},(dl=hl||(hl={})).create=function(e,t,...n){let i={title:e,command:t};return rh.defined(n)&&n.length>0&&(i.arguments=n),i},dl.is=function(e){let t=e;return rh.defined(t)&&rh.string(t.title)&&rh.string(t.command)},(ml=pl||(pl={})).replace=function(e,t){return{range:e,newText:t}},ml.insert=function(e,t){return{range:{start:e,end:e},newText:t}},ml.del=function(e){return{range:e,newText:""}},ml.is=function(e){const t=e;return rh.objectLiteral(t)&&rh.string(t.newText)&&Wa.is(t.range)},(fl=ul||(ul={})).create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},fl.is=function(e){const t=e;return rh.objectLiteral(t)&&rh.string(t.label)&&(rh.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(rh.string(t.description)||void 0===t.description)},(gl||(gl={})).is=function(e){const t=e;return rh.string(t)},(vl=bl||(bl={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},vl.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},vl.del=function(e,t){return{range:e,newText:"",annotationId:t}},vl.is=function(e){const t=e;return pl.is(t)&&(ul.is(t.annotationId)||gl.is(t.annotationId))},(wl=yl||(yl={})).create=function(e,t){return{textDocument:e,edits:t}},wl.is=function(e){let t=e;return rh.defined(t)&&Tl.is(t.textDocument)&&Array.isArray(t.edits)},(xl=Sl||(Sl={})).create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},xl.is=function(e){let t=e;return t&&"create"===t.kind&&rh.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||rh.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||rh.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||gl.is(t.annotationId))},(_l=Cl||(Cl={})).create=function(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},_l.is=function(e){let t=e;return t&&"rename"===t.kind&&rh.string(t.oldUri)&&rh.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||rh.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||rh.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||gl.is(t.annotationId))},(El=kl||(kl={})).create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},El.is=function(e){let t=e;return t&&"delete"===t.kind&&rh.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||rh.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||rh.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||gl.is(t.annotationId))},(Fl||(Fl={})).is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>rh.string(e.kind)?Sl.is(e)||Cl.is(e)||kl.is(e):yl.is(e))))},(Nl=Rl||(Rl={})).create=function(e){return{uri:e}},Nl.is=function(e){let t=e;return rh.defined(t)&&rh.string(t.uri)},(Dl=Il||(Il={})).create=function(e,t){return{uri:e,version:t}},Dl.is=function(e){let t=e;return rh.defined(t)&&rh.string(t.uri)&&rh.integer(t.version)},(Ml=Tl||(Tl={})).create=function(e,t){return{uri:e,version:t}},Ml.is=function(e){let t=e;return rh.defined(t)&&rh.string(t.uri)&&(null===t.version||rh.integer(t.version))},(zl=Al||(Al={})).create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},zl.is=function(e){let t=e;return rh.defined(t)&&rh.string(t.uri)&&rh.string(t.languageId)&&rh.integer(t.version)&&rh.string(t.text)},(Ol=Ll||(Ll={})).PlainText="plaintext",Ol.Markdown="markdown",Ol.is=function(e){const t=e;return t===Ol.PlainText||t===Ol.Markdown},(Pl||(Pl={})).is=function(e){const t=e;return rh.objectLiteral(e)&&Ll.is(t.kind)&&rh.string(t.value)},(Vl=Wl||(Wl={})).Text=1,Vl.Method=2,Vl.Function=3,Vl.Constructor=4,Vl.Field=5,Vl.Variable=6,Vl.Class=7,Vl.Interface=8,Vl.Module=9,Vl.Property=10,Vl.Unit=11,Vl.Value=12,Vl.Enum=13,Vl.Keyword=14,Vl.Snippet=15,Vl.Color=16,Vl.File=17,Vl.Reference=18,Vl.Folder=19,Vl.EnumMember=20,Vl.Constant=21,Vl.Struct=22,Vl.Event=23,Vl.Operator=24,Vl.TypeParameter=25,($l=Ul||(Ul={})).PlainText=1,$l.Snippet=2,(ql||(ql={})).Deprecated=1,(Bl=Kl||(Kl={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},Bl.is=function(e){const t=e;return t&&rh.string(t.newText)&&Wa.is(t.insert)&&Wa.is(t.replace)},(Hl=jl||(jl={})).asIs=1,Hl.adjustIndentation=2,(Gl||(Gl={})).is=function(e){const t=e;return t&&(rh.string(t.detail)||void 0===t.detail)&&(rh.string(t.description)||void 0===t.description)},(Jl||(Jl={})).create=function(e){return{label:e}},(Xl||(Xl={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(Ql=Yl||(Yl={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Ql.is=function(e){const t=e;return rh.string(t)||rh.objectLiteral(t)&&rh.string(t.language)&&rh.string(t.value)},(Zl||(Zl={})).is=function(e){let t=e;return!!t&&rh.objectLiteral(t)&&(Pl.is(t.contents)||Yl.is(t.contents)||rh.typedArray(t.contents,Yl.is))&&(void 0===e.range||Wa.is(e.range))},(ec||(ec={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(tc||(tc={})).create=function(e,t,...n){let i={label:e};return rh.defined(t)&&(i.documentation=t),rh.defined(n)?i.parameters=n:i.parameters=[],i},(ic=nc||(nc={})).Text=1,ic.Read=2,ic.Write=3,(rc||(rc={})).create=function(e,t){let n={range:e};return rh.number(t)&&(n.kind=t),n},(oc=sc||(sc={})).File=1,oc.Module=2,oc.Namespace=3,oc.Package=4,oc.Class=5,oc.Method=6,oc.Property=7,oc.Field=8,oc.Constructor=9,oc.Enum=10,oc.Interface=11,oc.Function=12,oc.Variable=13,oc.Constant=14,oc.String=15,oc.Number=16,oc.Boolean=17,oc.Array=18,oc.Object=19,oc.Key=20,oc.Null=21,oc.EnumMember=22,oc.Struct=23,oc.Event=24,oc.Operator=25,oc.TypeParameter=26,(ac||(ac={})).Deprecated=1,(lc||(lc={})).create=function(e,t,n,i,r){let s={name:e,kind:t,location:{uri:i,range:n}};return r&&(s.containerName=r),s},(cc||(cc={})).create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}},(dc=hc||(hc={})).create=function(e,t,n,i,r,s){let o={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==s&&(o.children=s),o},dc.is=function(e){let t=e;return t&&rh.string(t.name)&&rh.number(t.kind)&&Wa.is(t.range)&&Wa.is(t.selectionRange)&&(void 0===t.detail||rh.string(t.detail))&&(void 0===t.deprecated||rh.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(mc=pc||(pc={})).Empty="",mc.QuickFix="quickfix",mc.Refactor="refactor",mc.RefactorExtract="refactor.extract",mc.RefactorInline="refactor.inline",mc.RefactorRewrite="refactor.rewrite",mc.Source="source",mc.SourceOrganizeImports="source.organizeImports",mc.SourceFixAll="source.fixAll",(fc=uc||(uc={})).Invoked=1,fc.Automatic=2,(bc=gc||(gc={})).create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},bc.is=function(e){let t=e;return rh.defined(t)&&rh.typedArray(t.diagnostics,ll.is)&&(void 0===t.only||rh.typedArray(t.only,rh.string))&&(void 0===t.triggerKind||t.triggerKind===uc.Invoked||t.triggerKind===uc.Automatic)},(yc=vc||(vc={})).create=function(e,t,n){let i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):hl.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},yc.is=function(e){let t=e;return t&&rh.string(t.title)&&(void 0===t.diagnostics||rh.typedArray(t.diagnostics,ll.is))&&(void 0===t.kind||rh.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||hl.is(t.command))&&(void 0===t.isPreferred||rh.boolean(t.isPreferred))&&(void 0===t.edit||Fl.is(t.edit))},(Sc=wc||(wc={})).create=function(e,t){let n={range:e};return rh.defined(t)&&(n.data=t),n},Sc.is=function(e){let t=e;return rh.defined(t)&&Wa.is(t.range)&&(rh.undefined(t.command)||hl.is(t.command))},(Cc=xc||(xc={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},Cc.is=function(e){let t=e;return rh.defined(t)&&rh.uinteger(t.tabSize)&&rh.boolean(t.insertSpaces)},(kc=_c||(_c={})).create=function(e,t,n){return{range:e,target:t,data:n}},kc.is=function(e){let t=e;return rh.defined(t)&&Wa.is(t.range)&&(rh.undefined(t.target)||rh.string(t.target))},(Fc=Ec||(Ec={})).create=function(e,t){return{range:e,parent:t}},Fc.is=function(e){let t=e;return rh.objectLiteral(t)&&Wa.is(t.range)&&(void 0===t.parent||Fc.is(t.parent))},(Nc=Rc||(Rc={})).namespace="namespace",Nc.type="type",Nc.class="class",Nc.enum="enum",Nc.interface="interface",Nc.struct="struct",Nc.typeParameter="typeParameter",Nc.parameter="parameter",Nc.variable="variable",Nc.property="property",Nc.enumMember="enumMember",Nc.event="event",Nc.function="function",Nc.method="method",Nc.macro="macro",Nc.keyword="keyword",Nc.modifier="modifier",Nc.comment="comment",Nc.string="string",Nc.number="number",Nc.regexp="regexp",Nc.operator="operator",Nc.decorator="decorator",(Dc=Ic||(Ic={})).declaration="declaration",Dc.definition="definition",Dc.readonly="readonly",Dc.static="static",Dc.deprecated="deprecated",Dc.abstract="abstract",Dc.async="async",Dc.modification="modification",Dc.documentation="documentation",Dc.defaultLibrary="defaultLibrary",(Tc||(Tc={})).is=function(e){const t=e;return rh.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(Ac=Mc||(Mc={})).create=function(e,t){return{range:e,text:t}},Ac.is=function(e){const t=e;return null!=t&&Wa.is(t.range)&&rh.string(t.text)},(Lc=zc||(zc={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Lc.is=function(e){const t=e;return null!=t&&Wa.is(t.range)&&rh.boolean(t.caseSensitiveLookup)&&(rh.string(t.variableName)||void 0===t.variableName)},(Pc=Oc||(Oc={})).create=function(e,t){return{range:e,expression:t}},Pc.is=function(e){const t=e;return null!=t&&Wa.is(t.range)&&(rh.string(t.expression)||void 0===t.expression)},(Vc=Wc||(Wc={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},Vc.is=function(e){const t=e;return rh.defined(t)&&Wa.is(e.stoppedLocation)},($c=Uc||(Uc={})).Type=1,$c.Parameter=2,$c.is=function(e){return 1===e||2===e},(Kc=qc||(qc={})).create=function(e){return{value:e}},Kc.is=function(e){const t=e;return rh.objectLiteral(t)&&(void 0===t.tooltip||rh.string(t.tooltip)||Pl.is(t.tooltip))&&(void 0===t.location||Ua.is(t.location))&&(void 0===t.command||hl.is(t.command))},(jc=Bc||(Bc={})).create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},jc.is=function(e){const t=e;return rh.objectLiteral(t)&&Oa.is(t.position)&&(rh.string(t.label)||rh.typedArray(t.label,qc.is))&&(void 0===t.kind||Uc.is(t.kind))&&void 0===t.textEdits||rh.typedArray(t.textEdits,pl.is)&&(void 0===t.tooltip||rh.string(t.tooltip)||Pl.is(t.tooltip))&&(void 0===t.paddingLeft||rh.boolean(t.paddingLeft))&&(void 0===t.paddingRight||rh.boolean(t.paddingRight))},(Hc||(Hc={})).createSnippet=function(e){return{kind:"snippet",value:e}},(Gc||(Gc={})).create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}},(Jc||(Jc={})).create=function(e){return{items:e}},(Yc=Xc||(Xc={})).Invoked=0,Yc.Automatic=1,(Qc||(Qc={})).create=function(e,t){return{range:e,text:t}},(Zc||(Zc={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(eh||(eh={})).is=function(e){const t=e;return rh.objectLiteral(t)&&Ta.is(t.uri)&&rh.string(t.name)},function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,r=e.slice(0,i),s=e.slice(i);t(r,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=i.length;for(let t=r.length-1;t>=0;t--){let n=r[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,o)+n.newText+i.substring(a,i.length),s=o}return i}}(th||(th={}));var rh,sh=class{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,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 i=0;i0&&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,i=t.length;if(0===i)return Oa.create(0,e);for(;ne?i=r:n=r+1}let r=n-1;return Oa.create(r,e-t[r])}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],i=e.line+1e?i=r:n=r+1}let r=n-1;return{line:r,character:e-t[r]}}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],i=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function fh(e){const t=uh(e.range);return t!==e.range?{newText:e.newText,range:t}:e}(ah=oh||(oh={})).create=function(e,t,n,i){return new dh(e,t,n,i)},ah.update=function(e,t,n){if(e instanceof dh)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},ah.applyEdits=function(e,t){let n=e.getText(),i=ph(t.map(fh),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=0;const s=[];for(const t of i){let i=e.offsetAt(t.range.start);if(ir&&s.push(n.substring(r,i)),t.newText.length&&s.push(t.newText),r=e.offsetAt(t.range.end)}return s.push(n.substr(r)),s.join("")},(lh||(lh={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ll.Markdown,Ll.PlainText]}},hover:{contentFormat:[Ll.Markdown,Ll.PlainText]}}},(hh=ch||(ch={}))[hh.Unknown=0]="Unknown",hh[hh.File=1]="File",hh[hh.Directory=2]="Directory",hh[hh.SymbolicLink=64]="SymbolicLink";var gh={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function bh(e){switch(e){case"experimental":return"⚠️ Property is experimental. Be cautious when using it.️\n\n";case"nonstandard":return"🚨️ Property is nonstandard. Avoid using it.\n\n";case"obsolete":return"🚨️️️ Property is obsolete. Avoid using it.\n\n";default:return""}}function vh(e,t,n){let i;if(i=t?{kind:"markdown",value:Sh(e,n)}:{kind:"plaintext",value:wh(e,n)},""!==i.value)return i}function yh(e){return(e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(//g,">")}function wh(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+=bh(e.status)),n+=e.description;const t=xh(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 Sh(e,t){if(!e.description||""===e.description)return"";let n="";if(!1!==t?.documentation){e.status&&(n+=bh(e.status)),"string"==typeof e.description?n+=yh(e.description):n+=e.description.kind===Ll.Markdown?e.description.value:yh(e.description.value);const t=xh(e.browsers);t&&(n+="\n\n("+yh(t)+")"),"syntax"in e&&e.syntax&&(n+=`\n\nSyntax: ${yh(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 xh(e=[]){return 0===e.length?null:e.map((e=>{let t="";const n=e.match(/([A-Z]+)(\d+)?/),i=n[1],r=n[2];return i in gh&&(t+=gh[i]),r&&(t+=" "+r),t})).join(", ")}var Ch=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,_h=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("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:Na("Mix two colors together in a polar color space.")}],kh=/^(rgb|rgba|hsl|hsla|hwb)$/i,Eh={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"},Fh=new RegExp(`^(${Object.keys(Eh).join("|")})$`,"i"),Rh={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."},Nh=new RegExp(`^(${Object.keys(Rh).join("|")})$`,"i");function Ih(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 Dh(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 Th(e){return Ch.test(e)||Fh.test(e)||Nh.test(e)}var Mh=48,Ah=57,zh=65,Lh=97,Oh=102;function Ph(e){return e=Lh&&e<=Oh?e-Lh+10:0)}function Wh(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*Ph(e.charCodeAt(1))/255,green:17*Ph(e.charCodeAt(2))/255,blue:17*Ph(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Ph(e.charCodeAt(1))/255,green:17*Ph(e.charCodeAt(2))/255,blue:17*Ph(e.charCodeAt(3))/255,alpha:17*Ph(e.charCodeAt(4))/255};case 7:return{red:(16*Ph(e.charCodeAt(1))+Ph(e.charCodeAt(2)))/255,green:(16*Ph(e.charCodeAt(3))+Ph(e.charCodeAt(4)))/255,blue:(16*Ph(e.charCodeAt(5))+Ph(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Ph(e.charCodeAt(1))+Ph(e.charCodeAt(2)))/255,green:(16*Ph(e.charCodeAt(3))+Ph(e.charCodeAt(4)))/255,blue:(16*Ph(e.charCodeAt(5))+Ph(e.charCodeAt(6)))/255,alpha:(16*Ph(e.charCodeAt(7))+Ph(e.charCodeAt(8)))/255}}return null}function Vh(e,t,n,i=1){if(0===t)return{red:n,green:n,blue:n,alpha:i};{const r=(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:r(o,s,2+(e/=60)),green:r(o,s,e),blue:r(o,s,e-2),alpha:i}}}function Uh(e){const t=e.red,n=e.green,i=e.blue,r=e.alpha,s=Math.max(t,n,i),o=Math.min(t,n,i);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-i)/h+(ne[t]))}function rd(e){return void 0!==e}var sd=class{constructor(e=new Zs){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:ts.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return ts.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return ts.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return ts.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();return e()||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(ts.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(Js.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===ts.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new lo(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,n,i){if(!(e instanceof co)&&(t&&this.markError(e,t,n,i),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,i){this.token!==this.lastErrorToken&&(e.addIssue(new Fa(e,t,oo.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||i)&&this.resync(n,i)}parseStylesheet(e){const t=e.version,n=e.getText();return this.internalParse(n,this._parseStylesheet,((i,r)=>{if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return n.substr(i,r)}))}internalParse(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();const i=t.bind(this)();return i&&(i.textProvider=n||((t,n)=>e.substr(t,n))),i}_parseStylesheet(){const e=this.create(mo);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let n=!1;do{n=!1;const i=this._parseStylesheetStatement();for(i&&(e.addChild(i),n=!0,t=!1,this.peek(ts.EOF)||!this._needsSemicolonAfter(i)||this.accept(ts.SemiColon)||this.markError(e,ih.SemiColonExpected));this.accept(ts.SemiColon)||this.accept(ts.CDO)||this.accept(ts.CDC);)n=!0,t=!1}while(n);if(this.peek(ts.EOF))break;t||(this.peek(ts.AtKeyword)?this.markError(e,ih.UnknownAtRule):this.markError(e,ih.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(ts.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(ts.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(ts.Comma)&&this._parseSelector(e););if(this.accept(ts.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){const t=this.create(go),n=t.getSelectors();if(!n.addChild(this._parseSelector(e)))return null;for(;this.accept(ts.Comma);)if(!n.addChild(this._parseSelector(e)))return this.finish(t,ih.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(ts.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(ts.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case Js.Keyframe:case Js.ViewPort:case Js.Media:case Js.Ruleset:case Js.Namespace:case Js.If:case Js.For:case Js.Each:case Js.While:case Js.MixinDeclaration:case Js.FunctionDeclaration:case Js.MixinContentDeclaration:return!1;case Js.ExtendsReference:case Js.MixinContentReference:case Js.ReturnStatement:case Js.MediaQuery:case Js.Debug:case Js.Import:case Js.AtApplyRule:case Js.CustomPropertyDeclaration:return!0;case Js.VariableDeclaration:return e.needsSemicolon;case Js.MixinReference:return!e.getContent();case Js.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const t=this.create(uo);if(!this.accept(ts.CurlyL))return null;let n=e();for(;t.addChild(n)&&!this.peek(ts.CurlyR);){if(this._needsSemicolonAfter(n)&&!this.accept(ts.SemiColon))return this.finish(t,ih.SemiColonExpected,[ts.SemiColon,ts.CurlyR]);for(n&&this.prevToken&&this.prevToken.type===ts.SemiColon&&(n.semicolonPosition=this.prevToken.offset);this.accept(ts.SemiColon););n=e()}return this.accept(ts.CurlyR)?this.finish(t):this.finish(t,ih.RightCurlyExpected,[ts.CurlyR,ts.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,ih.LeftCurlyExpected,[ts.CurlyR,ts.SemiColon])}_parseSelector(e){const t=this.create(bo);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(So);return n.setProperty(this._parseProperty())?this.accept(ts.Colon)?(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseExpr())?(n.addChild(this._parsePrio()),this.peek(ts.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):this.finish(n,ih.PropertyValueExpected)):this.finish(n,ih.ColonExpected,[ts.Colon],e||[ts.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(ts.Ident,/^--/))return null;const t=this.create(xo);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(ts.Colon))return this.finish(t,ih.ColonExpected,[ts.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);const n=this.mark();if(this.peek(ts.CurlyL)){const e=this.create(wo),i=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(e.setDeclarations(i)&&!i.isErroneous(!0)&&(e.addChild(this._parsePrio()),this.peek(ts.SemiColon)))return this.finish(e),t.setPropertySet(e),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(n)}const i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],ts.SemiColon,ts.EOF))?(t.setValue(i),this.peek(ts.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(n),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),rd(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,ih.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[ts.CurlyR]){const t=this.create(lo),n=()=>-1!==e.indexOf(this.token.type);let i=0,r=0,s=0;e:for(;;){switch(this.token.type){case ts.SemiColon:case ts.Exclamation:if(0===i&&0===r&&0===s)break e;break;case ts.CurlyL:i++;break;case ts.CurlyR:if(i--,i<0){if(n()&&0===r&&0===s)break e;return this.finish(t,ih.LeftCurlyExpected)}break;case ts.ParenthesisL:r++;break;case ts.ParenthesisR:if(r--,r<0){if(n()&&0===s&&0===i)break e;return this.finish(t,ih.LeftParenthesisExpected)}break;case ts.BracketL:s++;break;case ts.BracketR:if(s--,s<0)return this.finish(t,ih.LeftSquareBracketExpected);break;case ts.BadString:break e;case ts.EOF:let e=ih.RightCurlyExpected;return s>0?e=ih.RightSquareBracketExpected:r>0&&(e=ih.RightParenthesisExpected),this.finish(t,e)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){const t=this.mark();return this._parseProperty()&&this.accept(ts.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){const e=this.create(Co),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(ts.Charset))return null;const e=this.create(lo);return this.consumeToken(),this.accept(ts.String)?this.accept(ts.SemiColon)?this.finish(e):this.finish(e,ih.SemiColonExpected):this.finish(e,ih.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(Wo);return this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?this._completeParseImport(e):this.finish(e,ih.URIOrStringExpected)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(ts.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,ih.IdentifierExpected,[ts.SemiColon]);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[ts.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(ts.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(ts.ParenthesisR))?this.finish(e,ih.RightParenthesisExpected,[ts.ParenthesisR],[]):(this.peek(ts.SemiColon)||this.peek(ts.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(Ko);return this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this.accept(ts.SemiColon)?this.finish(e):this.finish(e,ih.SemiColonExpected):this.finish(e,ih.URIExpected,[ts.SemiColon])}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(zo);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(Ao);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(ts.AtKeyword,this.keyframeRegex))return null;const e=this.create(Oo),t=this.create(lo);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,ih.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,ih.IdentifierExpected,[ts.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([Ys.Keyframe])}_parseKeyframeSelector(){const e=this.create(Po);let t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(ts.Percentage)&&(t=!0),!t)return null;for(;this.accept(ts.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(ts.Percentage)&&(t=!0),!t)return this.finish(e,ih.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(Po),t=this.mark();let n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(ts.Percentage)&&(n=!0),!n)return null;for(;this.accept(ts.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(ts.Percentage)&&(n=!0),!n)return this.restoreAtMark(t),null;return this.peek(ts.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(Go);return this.consumeToken(),this.peekRegExp(ts.Ident,/^--/)&&e.setName(this._parseIdent([Ys.Property]))?this._parseBody(e,this._parseDeclaration.bind(this)):this.finish(e,ih.IdentifierExpected)}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const t=this.create(Ho);this.consumeToken();const n=this._parseLayerNameList();return n&&t.setNames(n),n&&1!==n.getChildren().length||!this.peek(ts.CurlyL)?this.accept(ts.SemiColon)?this.finish(t):this.finish(t,ih.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(Js.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(ts.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,ih.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(Js.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,ih.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const t=this.create(jo);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(ta);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(ts.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(ta);if(this.accept(ts.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration([ts.ParenthesisR]))||this._parseSupportsCondition()?this.accept(ts.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,ih.RightParenthesisExpected,[ts.ParenthesisR],[]):this.finish(e,ih.ConditionExpected);if(this.peek(ts.Ident)){const t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(ts.ParenthesisL)){let t=1;for(;this.token.type!==ts.EOF&&0!==t;)this.token.type===ts.ParenthesisL?t++:this.token.type===ts.ParenthesisR&&t--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,ih.LeftParenthesisExpected,[],[ts.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(Bo);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,ih.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(Yo);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,ih.MediaQueryExpected);for(;this.accept(ts.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,ih.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(Qo),t=this.mark();if(this.acceptIdent("not"),this.peek(ts.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(ca);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,ih.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(Zo);this.acceptIdent("not");let t=!0;for(;t;){if(!this.accept(ts.ParenthesisL))return this.finish(e,ih.LeftParenthesisExpected,[],[ts.CurlyL]);if(this.peek(ts.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[],[ts.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[ts.ParenthesisR],t=this.create(ea);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(ts.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,ih.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,ih.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,ih.TermExpected,[],e)}}else{if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,ih.IdentifierExpected,[],e);if(!this._parseMediaFeatureRangeOperator())return this.finish(t,ih.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,ih.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,ih.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(lo);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(na);if(this.consumeToken(),e.addChild(this._parsePageSelector()))for(;this.accept(ts.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,ih.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(ts.AtKeyword))return null;const e=this.create(ia);return this.acceptOneKeyword(nd)||this.markError(e,ih.UnknownAtRule,[],[ts.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(ts.Ident)&&!this.peek(ts.Colon))return null;const e=this.create(lo);return e.addChild(this._parseIdent()),this.accept(ts.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,ih.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(Jo);return this.consumeToken(),this.resync([],[ts.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(Xo);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(lo);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(lo);if(this.accept(ts.ParenthesisL)){if(this.peekIdent("not")||this.peek(ts.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[],[ts.CurlyL])}else{if(!this.acceptIdent("style"))return this.finish(e,ih.LeftParenthesisExpected,[],[ts.CurlyL]);if(this.hasWhitespace()||!this.accept(ts.ParenthesisL))return this.finish(e,ih.LeftParenthesisExpected,[],[ts.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[],[ts.CurlyL])}return this.finish(e)}_parseStyleQuery(){const e=this.create(lo);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(ts.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([ts.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(lo);return this.accept(ts.ParenthesisL)?(e.addChild(this._parseStyleQuery()),this.accept(ts.ParenthesisR)?this.finish(e):this.finish(e,ih.RightParenthesisExpected,[],[ts.CurlyL])):this.finish(e,ih.LeftParenthesisExpected,[],[ts.CurlyL])}_parseUnknownAtRule(){if(!this.peek(ts.AtKeyword))return null;const e=this.create(xa);e.addChild(this._parseUnknownAtRuleName());let t=0,n=0,i=0,r=0;e:for(;;){switch(this.token.type){case ts.SemiColon:if(0===n&&0===i&&0===r)break e;break;case ts.EOF:return n>0?this.finish(e,ih.RightCurlyExpected):r>0?this.finish(e,ih.RightSquareBracketExpected):i>0?this.finish(e,ih.RightParenthesisExpected):this.finish(e);case ts.CurlyL:t++,n++;break;case ts.CurlyR:if(n--,t>0&&0===n){if(this.consumeToken(),r>0)return this.finish(e,ih.RightSquareBracketExpected);if(i>0)return this.finish(e,ih.RightParenthesisExpected);break e}if(n<0){if(0===i&&0===r)break e;return this.finish(e,ih.LeftCurlyExpected)}break;case ts.ParenthesisL:i++;break;case ts.ParenthesisR:if(i--,i<0)return this.finish(e,ih.LeftParenthesisExpected);break;case ts.BracketL:r++;break;case ts.BracketR:if(r--,r<0)return this.finish(e,ih.LeftSquareBracketExpected)}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(lo);return this.accept(ts.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(ts.Dashmatch)||this.peek(ts.Includes)||this.peek(ts.SubstringOperator)||this.peek(ts.PrefixOperator)||this.peek(ts.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(Js.Operator);return this.consumeToken(),this.finish(e)}return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(lo);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(lo);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=Js.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=Js.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){const e=this.create(lo);return this.consumeToken(),e.type=Js.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){const e=this.create(lo);return this.consumeToken(),e.type=Js.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){const e=this.create(lo);this.consumeToken();const t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=Js.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){const e=this.create(vo);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(Js.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(ts.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(Js.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,ih.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(Js.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,ih.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),t=this.createNode(Js.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(Js.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(ts.BracketL))return null;const e=this.create(aa);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(ts.BracketR)?this.finish(e):this.finish(e,ih.RightSquareBracketExpected)):this.finish(e,ih.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(ts.ParenthesisL)){const t=()=>{const e=this.create(lo);if(!e.addChild(this._parseSelector(!0)))return null;for(;this.accept(ts.Comma)&&e.addChild(this._parseSelector(!0)););return this.peek(ts.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,ih.SelectorExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(ts.Colon))return null;const e=this.mark(),t=this.createNode(Js.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(ts.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,ih.IdentifierExpected):this.finish(t))}_tryParsePrio(){const e=this.mark();return this._parsePrio()||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(ts.Exclamation))return null;const e=this.createNode(Js.Prio);return this.accept(ts.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const t=this.create(ra);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(ts.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(ho);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(ts.BracketL))return null;const e=this.createNode(Js.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(ts.BracketR)?this.finish(e):this.finish(e,ih.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let n=this.create(sa);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,ih.TermExpected);n=this.finish(n);const i=this._parseOperator();return i&&(n=this._parseBinaryExpr(n,i)),this.finish(n)}_parseTerm(){let e=this.create(oa);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(ts.ParenthesisL))return null;const e=this.create(lo);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(ts.ParenthesisR)?this.finish(e):this.finish(e,ih.RightParenthesisExpected)}_parseNumeric(){if(this.peek(ts.Num)||this.peek(ts.Percentage)||this.peek(ts.Resolution)||this.peek(ts.Length)||this.peek(ts.EMS)||this.peek(ts.EXS)||this.peek(ts.Angle)||this.peek(ts.Time)||this.peek(ts.Dimension)||this.peek(ts.ContainerQueryLength)||this.peek(ts.Freq)){const e=this.create(ma);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(ts.String)&&!this.peek(ts.BadString))return null;const e=this.createNode(Js.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(ts.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),t=this.createNode(Js.URILiteral);return this.accept(ts.Ident),this.hasWhitespace()||!this.peek(ts.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(ts.ParenthesisR)?this.finish(t):this.finish(t,ih.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(lo);return this.accept(ts.String)||this.accept(ts.BadString)||this.acceptUnquotedString()?this.finish(e):null}_parseIdent(e){if(!this.peek(ts.Ident))return null;const t=this.create(po);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(ts.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){const e=this.mark(),t=this.create(ko);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(ts.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,ih.ExpressionExpected);return this.accept(ts.ParenthesisR)?this.finish(t):this.finish(t,ih.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(ts.Ident))return null;const e=this.create(po);if(e.referenceTypes=[Ys.Function],this.acceptIdent("progid")){if(this.accept(ts.Colon))for(;this.accept(ts.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(Fo);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(ts.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(la);return this.consumeToken(),this.finish(e)}return null}};function od(e,t){return-1!==e.indexOf(t)}function ad(...e){const t=[];for(const n of e)for(const e of n)od(t,e)||t.push(e);return t}var ld,cd=class{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,i=function(e){let t=0,i=e.length;if(0===i)return 0;for(;tn?i=r:t=r+1}return t}(this.children);if(0===i)return this;const r=this.children[i-1];return r.offset<=e&&r.offset+r.length>=e+t?r.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let n=0;n{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,i="",r=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",r=0):r=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),s=a,o=0;continue}}else if(2===i.length||1===i.length){i="",r=0,s=a,o=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(s+1,a):i=e.slice(s+1,a),r=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return i}var i={resolve:function(){for(var e,i="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,r=47===o.charCodeAt(0))}return i=n(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&r&&(e+="/"),i?"/"+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=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;rc){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(r+d)?h=d:0===d&&(h=0));break}var p=e.charCodeAt(r+d);if(p!==n.charCodeAt(a+d))break;47===p&&(h=d)}var m="";for(d=r+h+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===m.length?m+="..":m+="/..");return m.length>0?m+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),i=47===n,r=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){r=o;break}}else s=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,r=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(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){r=i+1;break}}else-1===l&&(o=!1,l=i+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=l))}return r===s?s=l:-1===s&&(s=e.length),e.slice(r,s)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){r=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(r,s)},extname:function(e){t(e);for(var n=-1,i=0,r=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===r&&(s=!1,r=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){i=a+1;break}}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},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 n=(t=e).dir||t.root,i=t.base||(t.name||"")+(t.ext||""),n?n===t.root?n+i:n+"/"+i:i;var t,n,i},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,r=e.charCodeAt(0),s=47===r;s?(n.root="/",i=1):i=0;for(var o=-1,a=0,l=-1,c=!0,h=e.length-1,d=0;h>=i;--h)if(47!==(r=e.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===r?-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};i.posix=i,e.exports=i}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},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 i={};(()=>{let e;if(n.r(i),n.d(i,{URI:()=>h,Utils:()=>_}),"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+.-]*$/,r=/^\//,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(!r.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,i,r,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=i||a,this.fragment=r||a,o(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,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===i?i=this.path:null===i&&(i=a),void 0===r?r=this.query:null===r&&(r=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new p(t,n,i,r,s)}static parse(e,t=!1){const n=c.exec(e);return n?new p(n[2]||a,w(n[4]||a),w(n[5]||a),w(n[7]||a),w(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,!1)),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 m={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 u(e,t,n){let i,r=-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!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=m[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i: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)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const n=t?f:u;let i="",{scheme:r,authority:s,path:o,query:a,fragment:c}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=l,i+=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?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=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)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),c&&(i+="#",i+=t?c:u(c,!1,!1)),i}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}const y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(y)?e.replace(y,(e=>v(e))):e}var S=n(470);const x=S.posix||S,C="/";var _,k;(k=_||(_={})).joinPath=function(e,...t){return e.with({path:x.join(e.path,...t)})},k.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==C&&(n=C+n,i=!0);let r=x.resolve(n,...t);return i&&r[0]===C&&!e.authority&&(r=r.substring(1)),e.with({path:r})},k.dirname=function(e){if(0===e.path.length||e.path===C)return e;let t=x.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},k.basename=function(e){return x.basename(e.path)},k.extname=function(e){return x.extname(e.path)}})(),ld=i})();var{URI:ud,Utils:fd}=ld;function gd(e){return fd.dirname(ud.parse(e)).toString(!0)}function bd(e,...t){return fd.joinPath(ud.parse(e),...t).toString(!0)}var vd=class{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 i of this.literalCompletions){const r=i.uriValue,s=wd(r);if("."===s||".."===s)n.isIncomplete=!0;else{const s=await this.providePathSuggestions(r,i.position,i.range,e,t);for(let e of s)n.items.push(e)}}for(const i of this.importCompletions){const r=i.pathValue,s=wd(r);if("."===s||".."===s)n.isIncomplete=!0;else{let s=await this.providePathSuggestions(r,i.position,i.range,e,t);"scss"===e.languageId&&s.forEach((e=>{eo(e.label,"_")&&to(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,i,r){const s=wd(e),o=eo(e,"'")||eo(e,'"'),a=o?s.slice(0,t.character-(n.start.character+1)):s.slice(0,t.character-n.start.character),l=i.uri,c=function(e,t,n){let i;const r=e.lastIndexOf("/");if(-1===r)i=n;else{const e=t.slice(r+1),s=Cd(n.end,-e.length),o=e.indexOf(" ");let a;a=-1!==o?Cd(s,o):n.end,i=Wa.create(s,a)}return i}(a,s,o?function(e){const t=Cd(e.start,1),n=Cd(e.end,-1);return Wa.create(t,n)}(n):n),h=a.substring(0,a.lastIndexOf("/")+1);let d=r.resolveReference(h||".",l);if(d)try{const e=[],t=await this.readDirectory(d);for(const[n,i]of t)n.charCodeAt(0)===yd||i!==ch.Directory&&bd(d,n)===l||e.push(Sd(n,i===ch.Directory,c));return e}catch(e){}return[]}},yd=".".charCodeAt(0);function wd(e){return eo(e,"'")||eo(e,'"')?e.slice(1,-1):e}function Sd(e,t,n){return t?{label:xd(e+="/"),kind:Wl.Folder,textEdit:pl.replace(n,xd(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}:{label:xd(e),kind:Wl.File,textEdit:pl.replace(n,xd(e))}}function xd(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function Cd(e,t){return Oa.create(e.line,e.character+t)}var _d,kd,Ed=Ul.Snippet,Fd={title:"Suggest",command:"editor.action.triggerSuggest"};(kd=_d||(_d={})).Enums=" ",kd.Normal="d",kd.VendorPrefixed="x",kd.Term="y",kd.Variable="z";var Rd=class{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 md(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,i,r=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,r);const s=new vd(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[s].concat(o);const a=this.doComplete(e,t,n,r);try{const t=await s.computeCompletions(e,i);return{isIncomplete:a.isIncomplete||t.isIncomplete,itemDefaults:a.itemDefaults,items:t.items.concat(a.items)}}finally{this.completionParticipants=o}}doComplete(e,t,n,i){this.offset=e.offsetAt(t),this.position=t,this.currentWord=function(e,t){let n=t-1;const i=e.getText();for(;n>=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(i.charAt(n));)n--;return i.substring(n+1,t)}(e,this.offset),this.defaultReplaceRange=Wa.create(Oa.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=i;try{const e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=so(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(n instanceof Co)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof ra)n.parent instanceof fa?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof vo){const t=n.findAParent(Js.ExtendsReference,Js.Ruleset);if(t)if(t.type===Js.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{const n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof Fo)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof uo)this.getCompletionsForDeclarations(n,e);else if(n instanceof ua)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof go)this.getCompletionsForRuleSet(n,e);else if(n instanceof fa)this.getCompletionsForInterpolation(n,e);else if(n instanceof Mo)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof wa)this.getCompletionsForMixinReference(n,e);else if(n instanceof ko)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof jo)this.getCompletionsForSupports(n,e);else if(n instanceof ta)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof ba)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===Js.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(null===n.parent)this.getCompletionForTopLevel(e);else{if(n.type!==Js.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===Js.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,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach((r=>{let s,o,a=!1;e?(s=this.getCompletionRange(e.getProperty()),o=r.name,rd(e.colonPosition)||(o+=": ",a=!0)):(s=this.getCompletionRange(null),o=r.name+": ",a=!0),!e&&i&&(o+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(s.end)&&(o+="$0;");const l={label:r.name,documentation:vh(r,this.doesSupportMarkdown()),tags:Nd(r)?[ql.Deprecated]:[],textEdit:pl.replace(s,o),insertTextFormat:Ul.Snippet,kind:Wl.Property};r.restrictions||(a=!1),n&&a&&(l.command=Fd);const c=(255-("number"==typeof r.relevance?Math.min(Math.max(r.relevance,0),99):50)).toString(16),h=eo(r.name,"-")?_d.VendorPrefixed:_d.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(),i=this.cssDataManager.getProperty(n);let r=e.getValue()||null;for(;r&&r.hasChildren();)r=r.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach((e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(r)})})),i){if(i.restrictions)for(const e of i.restrictions)switch(e){case"color":this.getColorProposals(i,r,t);break;case"position":this.getPositionProposals(i,r,t);break;case"repeat":this.getRepeatStyleProposals(i,r,t);break;case"line-style":this.getLineStyleProposals(i,r,t);break;case"line-width":this.getLineWidthProposals(i,r,t);break;case"geometry-box":this.getGeometryBoxProposals(i,r,t);break;case"box":this.getBoxProposals(i,r,t);break;case"image":this.getImageProposals(i,r,t);break;case"timing-function":this.getTimingFunctionProposals(i,r,t);break;case"shape":this.getBasicShapeProposals(i,r,t)}this.getValueEnumProposals(i,r,t),this.getCSSWideKeywordProposals(i,r,t),this.getUnitProposals(i,r,t)}else{const n=function(e,t){const n=t.getFullPropertyName(),i=new Id;function r(e){return(e instanceof po||e instanceof ma||e instanceof la)&&i.add(e.getText()),!0}return e.accept((function(e){if(e instanceof So&&e!==t&&function(e){const t=e.getFullPropertyName();return n===t}(e)){const t=e.getValue();t&&t.accept(r)}return!0})),i}(this.styleSheet,e);for(const e of n.getEntries())t.items.push({label:e,textEdit:pl.replace(this.getCompletionRange(r),e),kind:Wl.Value})}return this.getVariableProposals(r,t),this.getTermProposals(i,r,t),t}getValueEnumProposals(e,t,n){if(e.values)for(const i of e.values){let r,s=i.name;if(to(s,")")){const e=s.lastIndexOf("(");-1!==e&&(s=s.substring(0,e+1)+"$1"+s.substring(e+1),r=Ed)}let o=_d.Enums;eo(i.name,"-")&&(o+=_d.VendorPrefixed);const a={label:i.name,documentation:vh(i,this.doesSupportMarkdown()),tags:Nd(e)?[ql.Deprecated]:[],textEdit:pl.replace(this.getCompletionRange(t),s),sortText:o,kind:Wl.Value,insertTextFormat:r};n.items.push(a)}return n}getCSSWideKeywordProposals(e,t,n){for(const e in Gh)n.items.push({label:e,documentation:Gh[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});for(const e in Jh){const i=Dd(e);n.items.push({label:e,documentation:Jh[e],textEdit:pl.replace(this.getCompletionRange(t),i),kind:Wl.Function,insertTextFormat:Ed,command:eo(e,"var")?Fd: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,Ys.Variable);for(const i of n){const n=eo(i.name,"--")?`var(${i.name})`:i.name,r={label:i.name,documentation:i.value?no(i.value):i.value,textEdit:pl.replace(this.getCompletionRange(e),n),kind:Wl.Variable,sortText:_d.Variable};if("string"==typeof r.documentation&&Th(r.documentation)&&(r.kind=Wl.Color),i.node.type===Js.FunctionParameter){const e=i.node.getParent();e.type===Js.MixinDeclaration&&(r.detail=Na("argument from '{0}'",e.getName()))}t.items.push(r)}return t}getVariableProposalsForCSSVarFunction(e){const t=new Id;this.styleSheet.acceptVisitor(new Ad(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,Ys.Variable);for(const i of n){if(eo(i.name,"--")){const t={label:i.name,documentation:i.value?no(i.value):i.value,textEdit:pl.replace(this.getCompletionRange(null),i.name),kind:Wl.Variable};"string"==typeof t.documentation&&Th(t.documentation)&&(t.kind=Wl.Color),e.items.push(t)}t.remove(i.name)}for(const n of t.getEntries())if(eo(n,"--")){const t={label:n,textEdit:pl.replace(this.getCompletionRange(null),n),kind:Wl.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let i="0";if(this.currentWord.length>0){const e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(i=e[0],n.isIncomplete=i.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===Js.Term&&(t=t.getParent()),e.restrictions)for(const r of e.restrictions){const e=Zh[r];if(e)for(const r of e){const e=i+r;n.items.push({label:e,textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.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 Wa.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(const e in Eh)n.items.push({label:e,documentation:Eh[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Color});for(const e in Rh)n.items.push({label:e,documentation:Rh[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});const i=new Id;this.styleSheet.acceptVisitor(new Md(i,this.offset));for(const e of i.getEntries())n.items.push({label:e,textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Color});for(const e of _h)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:pl.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:Ed,kind:Wl.Function});return n}getPositionProposals(e,t,n){for(const e in $h)n.items.push({label:e,documentation:$h[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});return n}getRepeatStyleProposals(e,t,n){for(const e in qh)n.items.push({label:e,documentation:qh[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});return n}getLineStyleProposals(e,t,n){for(const e in Kh)n.items.push({label:e,documentation:Kh[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});return n}getLineWidthProposals(e,t,n){for(const e of Bh)n.items.push({label:e,textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});return n}getGeometryBoxProposals(e,t,n){for(const e in Hh)n.items.push({label:e,documentation:Hh[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});return n}getBoxProposals(e,t,n){for(const e in jh)n.items.push({label:e,documentation:jh[e],textEdit:pl.replace(this.getCompletionRange(t),e),kind:Wl.Value});return n}getImageProposals(e,t,n){for(const e in Xh){const i=Dd(e);n.items.push({label:e,documentation:Xh[e],textEdit:pl.replace(this.getCompletionRange(t),i),kind:Wl.Function,insertTextFormat:e!==i?Ed:void 0})}return n}getTimingFunctionProposals(e,t,n){for(const e in Yh){const i=Dd(e);n.items.push({label:e,documentation:Yh[e],textEdit:pl.replace(this.getCompletionRange(t),i),kind:Wl.Function,insertTextFormat:e!==i?Ed:void 0})}return n}getBasicShapeProposals(e,t,n){for(const e in Qh){const i=Dd(e);n.items.push({label:e,documentation:Qh[e],textEdit:pl.replace(this.getCompletionRange(t),i),kind:Wl.Function,insertTextFormat:e!==i?Ed:void 0})}return n}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof go?this.getCompletionsForRuleSet(t,e):t instanceof jo?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach((t=>{e.items.push({label:t.name,textEdit:pl.replace(this.getCompletionRange(null),t.name),documentation:vh(t,this.doesSupportMarkdown()),tags:Nd(t)?[ql.Deprecated]:[],kind:Wl.Keyword})})),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){const n=e.getDeclarations();return n&&n.endsWith("}")&&this.offset>=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){const i=this.findInNodePath(Js.PseudoSelector,Js.IdentifierSelector,Js.ClassSelector,Js.ElementNameSelector);if(!i&&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=Wa.create(Oa.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach((e=>{const t=Dd(e.name),r={label:e.name,textEdit:pl.replace(this.getCompletionRange(i),t),documentation:vh(e,this.doesSupportMarkdown()),tags:Nd(e)?[ql.Deprecated]:[],kind:Wl.Function,insertTextFormat:e.name!==t?Ed:void 0};eo(e.name,":-")&&(r.sortText=_d.VendorPrefixed),n.items.push(r)})),this.cssDataManager.getPseudoElements().forEach((e=>{const t=Dd(e.name),r={label:e.name,textEdit:pl.replace(this.getCompletionRange(i),t),documentation:vh(e,this.doesSupportMarkdown()),tags:Nd(e)?[ql.Deprecated]:[],kind:Wl.Function,insertTextFormat:e.name!==t?Ed:void 0};eo(e.name,"::-")&&(r.sortText=_d.VendorPrefixed),n.items.push(r)})),!t){for(const e of ed)n.items.push({label:e,textEdit:pl.replace(this.getCompletionRange(i),e),kind:Wl.Keyword});for(const e of td)n.items.push({label:e,textEdit:pl.replace(this.getCompletionRange(i),e),kind:Wl.Keyword})}const r={};r[this.currentWord]=!0;const s=this.textDocument.getText();if(this.styleSheet.accept((e=>{if(e.type===Js.SimpleSelector&&e.length>0){const t=s.substr(e.offset,e.length);return"."!==t.charAt(0)||r[t]||(r[t]=!0,n.items.push({label:t,textEdit:pl.replace(this.getCompletionRange(i),t),kind:Wl.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 yo){const e=n;if(!rd(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(rd(e.semicolonPosition)&&e.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const n=e.getParent();if(n instanceof Fo)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;const i=e.findParent(Js.Declaration);if(!i)return this.getTermProposals(void 0,null,t),t;const r=e.findChildAtOffset(this.offset,!0);return r?r instanceof ma||r instanceof po?this.getCompletionsForDeclarationValue(i,t):t:this.getCompletionsForDeclarationValue(i,t)}getCompletionsForFunctionArgument(e,t,n){const i=t.getIdentifier();return i&&i.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(i)})})),t}getTermProposals(e,t,n){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,Ys.Function);for(const e of i)e.node instanceof Mo&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;const i=t.getChildren().map((e=>e instanceof Eo?e.getName():e.getText())),r=e.name+"("+i.map(((e,t)=>"${"+(t+1)+":"+e+"}")).join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:pl.replace(this.getCompletionRange(n),r),insertTextFormat:Ed,kind:Wl.Function,sortText:_d.Term}}getCompletionsForSupportsCondition(e,t){const n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof So)return!rd(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof ta)return this.getCompletionsForSupportsCondition(n,t)}return rd(e.lParent)&&this.offset>e.lParent&&(!rd(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 ta?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,i,r;if(e.hasChildren()){const t=e.getChild(0);n=t.getText(),i=this.position,r=this.getCompletionRange(t)}else{n="",i=this.position;const t=this.textDocument.positionAt(e.offset+4);r=Wa.create(t,t)}return this.completionParticipants.forEach((e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:i,range:r})})),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,i.join(""))}};!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}(Td||(Td={}));var Wd=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function Vd(e,t){let n=new zd;for(const i of e.getChildren())switch(i.type){case Js.SelectorCombinator:if(t){const e=i.getText().split("&");if(1===e.length){n.addAttr("name",e[0]);break}n=t.cloneWithParent(),e[0]&&n.findRoot().prepend(e[0]);for(let i=1;i1){const e=t.cloneWithParent();n.addChild(e.findRoot()),n=e}n.append(e[i])}}break;case Js.SelectorPlaceholder:if(i.matches("@at-root"))return n;case Js.ElementNameSelector:const e=i.getText();n.addAttr("name","*"===e?"element":Ud(e));break;case Js.ClassSelector:n.addAttr("class",Ud(i.getText().substring(1)));break;case Js.IdentifierSelector:n.addAttr("id",Ud(i.getText().substring(1)));break;case Js.MixinDeclaration:n.addAttr("class",i.getName());break;case Js.PseudoSelector:n.addAttr(Ud(i.getText()),"");break;case Js.AttributeSelector:const r=i,s=r.getIdentifier();if(s){const e=r.getValue(),t=r.getOperator();let i;if(e&&t)switch(Ud(t.getText())){case"|=":i=`${Td.remove(Ud(e.getText()))}-…`;break;case"^=":i=`${Td.remove(Ud(e.getText()))}…`;break;case"$=":i=`…${Td.remove(Ud(e.getText()))}`;break;case"~=":i=` … ${Td.remove(Ud(e.getText()))} … `;break;case"*=":i=`…${Td.remove(Ud(e.getText()))}…`;break;default:i=Td.remove(Ud(e.getText()))}n.addAttr(Ud(s.getText()),i)}}return n}function Ud(e){const t=new Zs;t.setSource(e);const n=t.scanUnquotedString();return n?n.text:e}var $d=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){const n=function(e){if(e.matches("@at-root"))return null;const t=new Ld,n=[],i=e.getParent();if(i instanceof go){let e=i.getParent();for(;e&&!Kd(e);){if(e instanceof go){if(e.getSelectors().matches("@at-root"))break;n.push(e)}e=e.getParent()}}const r=new qd(t);for(let e=n.length-1;e>=0;e--){const t=n[e].getSelectors().getChild(0);t&&r.processSelector(t)}return r.processSelector(e),t}(e);if(n){const i=new Pd('"').print(n,t);return i.push(this.selectorToSpecificityMarkedString(e)),i}return[]}simpleSelectorToMarkedString(e){const t=Vd(e),n=new Pd('"').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 Wd;let i=new Wd;for(const t of e)for(const e of t.getChildren()){const t=n(e);t.id>i.id?i=t:t.idi.attr?i=t:t.attri.tag&&(i=t))}return t.id+=i.id,t.attr+=i.attr,t.tag+=i.tag,t},n=e=>{const i=new Wd;e:for(const r of e.getChildren()){switch(r.type){case Js.IdentifierSelector:i.id++;break;case Js.ClassSelector:case Js.AttributeSelector:i.attr++;break;case Js.ElementNameSelector:if(r.matches("*"))break;i.tag++;break;case Js.PseudoSelector:const e=r.getText(),n=r.getChildren();if(this.isPseudoElementIdentifier(e)){if(e.match(/^::slotted/i)&&n.length>0){i.tag++;let e=t(n);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}i.tag++;continue e}if(e.match(/^:where/i))continue e;if(e.match(/^:(?:not|has|is)/i)&&n.length>0){let e=t(n);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}if(e.match(/^:(?:host|host-context)/i)&&n.length>0){i.attr++;let e=t(n);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}if(e.match(/^:(?:nth-child|nth-last-child)/i)&&n.length>0){if(i.attr++,3===n.length&&23===n[1].type){let e=t(n[2].getChildren());i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag;continue e}const e=new sd,r=n[1].getText();e.scanner.setSource(r);const s=e.scanner.scan(),o=e.scanner.scan();if("n"===s.text||"-n"===s.text&&"of"===o.text){const n=[],s=r.slice(o.offset+2).split(",");for(const t of s){const i=e.internalParse(t,e._parseSelector);i&&n.push(i)}let a=t(n);i.id+=a.id,i.attr+=a.attr,i.tag+=a.tag;continue e}continue e}i.attr++;continue e}if(r.getChildren().length>0){const e=n(r);i.id+=e.id,i.attr+=e.attr,i.tag+=e.tag}}return i},i=n(e);return`[${Na("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}},qd=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Ld)&&e.getChildren().some((e=>e.hasChildren()&&e.getChild(0).type===Js.SelectorCombinator))){const e=this.element.findRoot();e.parent instanceof Ld&&(t=this.element,this.element=e.parent,this.element.removeChild(e),this.prev=null)}for(const n of e.getChildren()){if(n instanceof vo){if(this.prev instanceof vo){const e=new Od("…");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 Od("⋮"));const e=Vd(n,t),i=e.findRoot();this.element.addChild(i),this.element=e}(n instanceof vo||n.type===Js.SelectorCombinatorParent||n.type===Js.SelectorCombinatorShadowPiercingDescendant||n.type===Js.SelectorCombinatorSibling||n.type===Js.SelectorCombinatorAllSiblings)&&(this.prev=n)}}};function Kd(e){switch(e.type){case Js.MixinDeclaration:case Js.Stylesheet:return!0}return!1}var Bd=class{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new $d(t)}configure(e){this.defaultSettings=e}doHover(e,t,n,i=this.defaultSettings){function r(t){return Wa.create(e.positionAt(t.offset),e.positionAt(t.end))}const s=so(n,e.offsetAt(t));let o,a=null;for(let e=0;e"string"==typeof e?e:e.value)):e.value}doesSupportMarkdown(){if(!rd(this.supportsMarkdown)){if(!rd(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}},jd=/^\w+:\/\//,Hd=/^data:/,Gd=class{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,n){const i=new md(n),r=ro(n,e.offsetAt(t));if(!r)return null;const s=i.findSymbolFromNode(r);return s?{uri:e.uri,range:Jd(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 i=ro(n,e.offsetAt(t));if(i&&i.type!==Js.Stylesheet&&i.type!==Js.Declarations)return i.type===Js.Identifier&&i.parent&&i.parent.type===Js.ClassSelector&&(i=i.parent),i}findDocumentHighlights(e,t,n){const i=[],r=this.getHighlightNode(e,t,n);if(!r)return i;const s=new md(n),o=s.findSymbolFromNode(r),a=r.getText();return n.accept((t=>{if(o){if(s.matchesSymbol(t,o))return i.push({kind:Yd(t),range:Jd(t,e)}),!1}else r&&r.type===t.type&&t.matches(a)&&i.push({kind:Yd(t),range:Jd(t,e)});return!0})),i}isRawStringDocumentLinkNode(e){return e.type===Js.Import}findDocumentLinks(e,t,n){const i=this.findUnresolvedLinks(e,t),r=[];for(let t of i){const i=t.link,s=i.target;if(!s||Hd.test(s));else if(jd.test(s))r.push(i);else{const t=n.resolveReference(s,e.uri);t&&(i.target=t),r.push(i)}}return r}async findDocumentLinks2(e,t,n){const i=this.findUnresolvedLinks(e,t),r=[];for(let t of i){const i=t.link,s=i.target;if(!s||Hd.test(s));else if(jd.test(s))r.push(i);else{const o=await this.resolveReference(s,e.uri,n,t.isRawLink);void 0!==o&&(i.target=o,r.push(i))}}return r}findUnresolvedLinks(e,t){const n=[],i=t=>{let i=t.getText();const r=Jd(t,e);if(r.start.line===r.end.line&&r.start.character===r.end.character)return;(eo(i,"'")||eo(i,'"'))&&(i=i.slice(1,-1));const s=!!t.parent&&this.isRawStringDocumentLinkNode(t.parent);n.push({link:{target:i,range:r},isRawLink:s})};return t.accept((e=>{if(e.type===Js.URILiteral){const t=e.getChild(0);return t&&i(t),!1}if(e.parent&&this.isRawStringDocumentLinkNode(e.parent)){const t=e.getText();return(eo(t,"'")||eo(t,'"'))&&i(e),!1}return!0})),n}findSymbolInformations(e,t){const n=[];return this.collectDocumentSymbols(e,t,((t,i,r)=>{const s=r instanceof lo?Jd(r,e):r,o={name:t||Na(""),kind:i,location:Ua.create(e.uri,s)};n.push(o)})),n}findDocumentSymbols(e,t){const n=[],i=[];return this.collectDocumentSymbols(e,t,((t,r,s,o,a)=>{const l=s instanceof lo?Jd(s,e):s;let c=o instanceof lo?Jd(o,e):o;c&&Xd(l,c)||(c=Wa.create(l.start,l.start));const h={name:t||Na(""),kind:r,range:l,selectionRange:c};let d=i.pop();for(;d&&!Xd(d[1],l);)d=i.pop();if(d){const e=d[0];e.children||(e.children=[]),e.children.push(h),i.push(d)}else n.push(h);a&&i.push([h,Jd(a,e)])})),n}collectDocumentSymbols(e,t,n){t.accept((t=>{if(t instanceof go){for(const i of t.getSelectors().getChildren())if(i instanceof bo){const r=Wa.create(e.positionAt(i.offset),e.positionAt(t.end));n(i.getText(),sc.Class,r,i,t.getDeclarations())}}else if(t instanceof ua)n(t.getName(),sc.Variable,t,t.getVariable(),void 0);else if(t instanceof Sa)n(t.getName(),sc.Method,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof Mo)n(t.getName(),sc.Function,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof Oo){const e=Na("@keyframes {0}",t.getName());n(e,sc.Class,t,t.getIdentifier(),t.getDeclarations())}else if(t instanceof zo){const e=Na("@font-face");n(e,sc.Class,t,void 0,t.getDeclarations())}else if(t instanceof Bo){const e=t.getChild(0);if(e instanceof Yo){const i="@media "+e.getText();n(i,sc.Module,t,e,t.getDeclarations())}}return!0}))}findDocumentColors(e,t){const n=[];return t.accept((t=>{const i=function(e,t){const n=function(e){if(e.type===Js.HexColorValue)return Wh(e.getText());if(e.type===Js.Function){const t=e,n=t.getName();let i=t.getArguments().getChildren();if(1===i.length){const e=i[0].getChildren();if(1===e.length&&e[0].type===Js.Expression&&(i=e[0].getChildren(),3===i.length)){const e=i[2];if(e instanceof sa){const t=e.getLeft(),n=e.getRight(),r=e.getOperator();t&&n&&r&&r.matches("/")&&(i=[i[0],i[1],t,n])}}}if(!n||i.length<3||i.length>4)return null;try{const e=4===i.length?Ih(i[3],1):1;if("rgb"===n||"rgba"===n)return{red:Ih(i[0],255),green:Ih(i[1],255),blue:Ih(i[2],255),alpha:e};if("hsl"===n||"hsla"===n){return Vh(Dh(i[0]),Ih(i[1],100),Ih(i[2],100),e)}if("hwb"===n){return function(e,t,n,i=1){if(t+n>=1){const e=t/(t+n);return{red:e,green:e,blue:e,alpha:i}}const r=Vh(e,1,.5,i);let s=r.red;s*=1-t-n,s+=t;let o=r.green;o*=1-t-n,o+=t;let a=r.blue;return a*=1-t-n,a+=t,{red:s,green:o,blue:a,alpha:i}}(Dh(i[0]),Ih(i[1],100),Ih(i[2],100),e)}}catch(e){return null}}else if(e.type===Js.Identifier){if(e.parent&&e.parent.type!==Js.Term)return null;const t=e.parent;if(t&&t.parent&&t.parent.type===Js.BinaryExpression){const e=t.parent;if(e.parent&&e.parent.type===Js.ListEntry&&e.parent.key===e)return null}const n=e.getText().toLowerCase();if("none"===n)return null;const i=Eh[n];if(i)return Wh(i)}return null}(e);return n?{color:n,range:Jd(e,t)}:null}(t,e);return i&&n.push(i),!0})),n}getColorPresentations(e,t,n,i){const r=[],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})`,r.push({label:l,textEdit:pl.replace(i,l)}),l=1===n.alpha?`#${Qd(s)}${Qd(o)}${Qd(a)}`:`#${Qd(s)}${Qd(o)}${Qd(a)}${Qd(Math.round(255*n.alpha))}`,r.push({label:l,textEdit:pl.replace(i,l)});const c=Uh(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})`,r.push({label:l,textEdit:pl.replace(i,l)});const h=function(e){const t=Uh(e),n=Math.min(e.red,e.green,e.blue),i=1-Math.max(e.red,e.green,e.blue);return{h:t.h,w:n,b:i,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})`,r.push({label:l,textEdit:pl.replace(i,l)}),r}prepareRename(e,t,n){const i=this.getHighlightNode(e,t,n);if(i)return Wa.create(e.positionAt(i.offset),e.positionAt(i.end))}doRename(e,t,n,i){const r=this.findDocumentHighlights(e,t,i).map((e=>pl.replace(e.range,n)));return{changes:{[e.uri]:r}}}async resolveModuleReference(e,t,n){if(eo(t,"file://")){const i=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(i&&"."!==i&&".."!==i){const r=n.resolveReference("/",t),s=gd(t),o=await this.resolvePathToModule(i,s,r);if(o)return bd(o,e.substring(i.length+1))}}}async mapReference(e,t){return e}async resolveReference(e,t,n,i=!1,r=this.defaultSettings){if("~"===e[0]&&"/"!==e[1]&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,n),i);const s=await this.mapReference(n.resolveReference(e,t),i);if(this.resolveModuleReferences){if(s&&await this.fileExists(s))return s;const r=await this.mapReference(await this.resolveModuleReference(e,t,n),i);if(r)return r}if(s&&!await this.fileExists(s)){const s=n.resolveReference("/",t);if(r&&s){if(e in r)return this.mapReference(bd(s,r[e]),i);const t=e.indexOf("/"),n=`${e.substring(0,t)}/`;if(n in r){let t=bd(s,r[n].slice(0,-1));return this.mapReference(t=bd(t,e.substring(n.length-1)),i)}}}return s}async resolvePathToModule(e,t,n){const i=bd(t,"node_modules",e,"package.json");return await this.fileExists(i)?gd(i):n&&t.startsWith(n)&&t.length!==n.length?this.resolvePathToModule(e,gd(t),n):void 0}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const t=await this.fileSystemProvider.stat(e);return t.type!==ch.Unknown||-1!==t.size}catch(e){return!1}}};function Jd(e,t){return Wa.create(t.positionAt(e.offset),t.positionAt(e.end))}function Xd(e,t){const n=t.start.line,i=t.end.line,r=e.start.line,s=e.end.line;return!(ns||i>s||n===r&&t.start.charactere.end.character)}function Yd(e){if(e.type===Js.Selector)return nc.Write;if(e instanceof po&&e.parent&&e.parent instanceof Co&&e.isCustomProperty)return nc.Write;if(e.parent)switch(e.parent.type){case Js.FunctionDeclaration:case Js.MixinDeclaration:case Js.Keyframe:case Js.VariableDeclaration:case Js.FunctionParameter:return nc.Write}return nc.Read}function Qd(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}var Zd=oo.Warning,ep=oo.Error,tp=oo.Ignore,np=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},ip={AllVendorPrefixes:new np("compatibleVendorPrefixes",Na("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),tp),IncludeStandardPropertyWhenUsingVendorPrefix:new np("vendorPrefix",Na("When using a vendor-specific prefix also include the standard property"),Zd),DuplicateDeclarations:new np("duplicateProperties",Na("Do not use duplicate style definitions"),tp),EmptyRuleSet:new np("emptyRules",Na("Do not use empty rulesets"),Zd),ImportStatemement:new np("importStatement",Na("Import statements do not load in parallel"),tp),BewareOfBoxModelSize:new np("boxModel",Na("Do not use width or height when using padding or border"),tp),UniversalSelector:new np("universalSelector",Na("The universal selector (*) is known to be slow"),tp),ZeroWithUnit:new np("zeroUnits",Na("No unit for zero needed"),tp),RequiredPropertiesForFontFace:new np("fontFaceProperties",Na("@font-face rule must define 'src' and 'font-family' properties"),Zd),HexColorLength:new np("hexColorLength",Na("Hex colors must consist of three, four, six or eight hex numbers"),ep),ArgsInColorFunction:new np("argumentsInColorFunction",Na("Invalid number of parameters"),ep),UnknownProperty:new np("unknownProperties",Na("Unknown property."),Zd),UnknownAtRules:new np("unknownAtRules",Na("Unknown at-rule."),Zd),IEStarHack:new np("ieHack",Na("IE hacks are only necessary when supporting IE7 and older"),tp),UnknownVendorSpecificProperty:new np("unknownVendorSpecificProperties",Na("Unknown vendor specific property."),tp),PropertyIgnoredDueToDisplay:new np("propertyIgnoredDueToDisplay",Na("Property is ignored due to the display."),Zd),AvoidImportant:new np("important",Na("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),tp),AvoidFloat:new np("float",Na("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),tp),AvoidIdSelector:new np("idSelector",Na("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),tp)},rp={ValidProperties:new class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}("validProperties",Na("A list of properties that are not validated against the `unknownProperties` rule."),[])},sp=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const t=function(e){switch(e){case"ignore":return oo.Ignore;case"warning":return oo.Warning;case"error":return oo.Error}return null}(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}},op=class{constructor(e){this.cssDataManager=e}doCodeActions(e,t,n,i){return this.doCodeActions2(e,t,n,i).map((t=>{const n=t.edit&&t.edit.documentChanges&&t.edit.documentChanges[0];return hl.create(t.title,"_css.applyCodeAction",e.uri,e.version,n&&n.edits)}))}doCodeActions2(e,t,n,i){const r=[];if(n.diagnostics)for(const t of n.diagnostics)this.appendFixesForMarker(e,i,t,r);return r}getFixesForUnknownProperty(e,t,n,i){const r=t.getName(),s=[];this.cssDataManager.getProperties().forEach((e=>{const t=function(e,t,n=4){let i=Math.abs(e.length-t.length);if(i>n)return 0;let r,s,o=[],a=[];for(r=0;r=r.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 t of s){const r=t.property,s=Na("Rename to '{0}'",r),a=pl.replace(n.range,r),l=Il.create(e.uri,e.version),c={documentChanges:[yl.create(l,[a])]},h=vc.create(s,c,pc.QuickFix);if(h.diagnostics=[n],i.push(h),--o<=0)return}}appendFixesForMarker(e,t,n,i){if(n.code!==ip.UnknownProperty.id)return;const r=e.offsetAt(n.range.start),s=e.offsetAt(n.range.end),o=so(t,r);for(let t=o.length-1;t>=0;t--){const a=o[t];if(a instanceof So){const t=a.getProperty();if(t&&t.offset===r&&t.end===s)return void this.getFixesForUnknownProperty(e,t,n,i)}}}},ap=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function lp(e,t,n,i){const r=e[t];r.value=n,n&&(od(r.properties,i)||r.properties.push(i))}function cp(e,t,n,i){"top"===t||"right"===t||"bottom"===t||"left"===t?lp(e,t,n,i):function(e,t,n){lp(e,"top",t,n),lp(e,"right",t,n),lp(e,"bottom",t,n),lp(e,"left",t,n)}(e,n,i)}function hp(e,t,n){switch(t.length){case 1:cp(e,void 0,t[0],n);break;case 2:cp(e,"top",t[0],n),cp(e,"bottom",t[0],n),cp(e,"right",t[1],n),cp(e,"left",t[1],n);break;case 3:cp(e,"top",t[0],n),cp(e,"right",t[1],n),cp(e,"left",t[1],n),cp(e,"bottom",t[2],n);break;case 4:cp(e,"top",t[0],n),cp(e,"right",t[1],n),cp(e,"bottom",t[2],n),cp(e,"left",t[3],n)}}function dp(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function pp(e,t=!0){return!(t&&dp(e,["initial","unset"])||0===parseFloat(e.getText()))}function mp(e,t=!0){return e.map((e=>pp(e,t)))}function up(e,t=!0){return!(dp(e,["none","hidden"])||t&&dp(e,["initial","unset"]))}function fp(e,t=!0){return e.map((e=>up(e,t)))}function gp(e){const t=e.getChildren();if(1===t.length){const e=t[0];return pp(e)&&up(e)}for(const e of t){const t=e;if(!pp(t,!1)||!up(t,!1))return!1}return!0}var bp=class{constructor(){this.data={}}add(e,t,n){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(t),n&&i.nodes.push(n)}},vp=class e{static entries(t,n,i,r,s){const o=new e(n,i,r);return t.acceptVisitor(o),o.completeValidations(),o.getEntries(s)}constructor(e,t,n){this.cssDataManager=n,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new bp,this.validProperties={};const i=t.getSetting(rp.ValidProperties);Array.isArray(i)&&i.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 i of e)i.fullPropertyName===t&&n.push(i);return n}fetchWithValue(e,t,n){const i=[];for(const r of e)if(r.fullPropertyName===t){const e=r.node.getValue();e&&this.findValueInExpression(e,n)&&i.push(r)}return i}findValueInExpression(e,t){let n=!1;return e.accept((e=>(e.type===Js.Identifier&&e.matches(t)&&(n=!0),!n))),n}getEntries(e=oo.Warning|oo.Error){return this.warnings.filter((t=>!!(t.getLevel()&e)))}addEntry(e,t,n){const i=new Fa(e,t,this.settings.getRule(t),n);this.warnings.push(i)}getMissingNames(e,t){const n=e.slice(0);for(let e=0;e0){const e=this.fetch(i,"float");for(let t=0;t0){const e=this.fetch(i,"vertical-align");for(let t=0;t1)for(let n=0;ne.startsWith(r)))&&a.delete(t)}}const l=[];for(let t=0,n=e.prefixes.length;t!(e instanceof sa&&(i+=1,1)))),i!==n&&this.addEntry(e,ip.ArgsInColorFunction)),!0}};vp.prefixes=["-ms-","-moz-","-o-","-webkit-"];var yp=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,n=this.settings){if(n&&!1===n.validate)return[];const i=[];i.push.apply(i,Ra.entries(t)),i.push.apply(i,vp.entries(t,e,new sp(n&&n.lint),this.cssDataManager));const r=[];for(const e in ip)r.push(ip[e].id);return i.filter((e=>e.getLevel()!==oo.Ignore)).map((function(t){const n=Wa.create(e.positionAt(t.getOffset()),e.positionAt(t.getOffset()+t.getLength())),i=e.languageId;return{code:t.getRule().id,source:i,message:t.getMessage(),severity:t.getLevel()===oo.Warning?il.Warning:il.Error,range:n}}))}},wp="/".charCodeAt(0),Sp="\n".charCodeAt(0),xp="\r".charCodeAt(0),Cp="\f".charCodeAt(0),_p="$".charCodeAt(0),kp="#".charCodeAt(0),Ep="{".charCodeAt(0),Fp="=".charCodeAt(0),Rp="!".charCodeAt(0),Np="<".charCodeAt(0),Ip=">".charCodeAt(0),Dp=".".charCodeAt(0),Tp=("@".charCodeAt(0),ts.CustomToken),Mp=Tp++,Ap=Tp++,zp=(Tp++,Tp++),Lp=Tp++,Op=Tp++,Pp=Tp++,Wp=Tp++,Vp=(Tp++,class extends Zs{scanNext(e){if(this.stream.advanceIfChar(_p)){const t=["$"];if(this.ident(t))return this.finishToken(e,Mp,t.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([kp,Ep])?this.finishToken(e,Ap):this.stream.advanceIfChars([Fp,Fp])?this.finishToken(e,zp):this.stream.advanceIfChars([Rp,Fp])?this.finishToken(e,Lp):this.stream.advanceIfChar(Np)?this.stream.advanceIfChar(Fp)?this.finishToken(e,Pp):this.finishToken(e,ts.Delim):this.stream.advanceIfChar(Ip)?this.stream.advanceIfChar(Fp)?this.finishToken(e,Op):this.finishToken(e,ts.Delim):this.stream.advanceIfChars([Dp,Dp,Dp])?this.finishToken(e,Wp):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([wp,wp]))&&(this.stream.advanceWhileChar((e=>{switch(e){case Sp:case xp:case Cp:return!1;default:return!0}})),!0)}}),Up=class{constructor(e,t){this.id=e,this.message=t}},$p={FromExpected:new Up("scss-fromexpected",Na("'from' expected")),ThroughOrToExpected:new Up("scss-throughexpected",Na("'through' or 'to' expected")),InExpected:new Up("scss-fromexpected",Na("'in' expected"))},qp=class extends sd{constructor(){super(new Vp)}_parseStylesheetStatement(e=!1){return this.peek(ts.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(Wo);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,ih.URIOrStringExpected);for(;this.accept(ts.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,ih.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Mp))return null;const t=this.create(ua);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(ts.Colon))return this.finish(t,ih.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,ih.VariableValueExpected,[],e);for(;this.peek(ts.Exclamation);)if(t.addChild(this._tryParsePrio()));else{if(this.consumeToken(),!this.peekRegExp(ts.Ident,/^(default|global)$/))return this.finish(t,ih.UnknownKeyword);this.consumeToken()}return this.peek(ts.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Pp)||this.accept(Op)||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(Mp))return null;const e=this.create(ga);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),t=this.create(Ea);return t.setIdentifier(this._parseIdent([Ys.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,ih.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(ts.Ident)&&!this.peek(Ap)&&!this.peekDelim("-"))return null;const t=this.create(po);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(ts.Ident,/^--/);let n=!1;const i=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()};for(;(this.accept(ts.Ident)||t.addChild(i())||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(Ap)){const e=this.create(fa);return this.consumeToken(),e.addChild(this._parseExpr())||this._parseNestingSelector()?this.accept(ts.CurlyR)?this.finish(e):this.finish(e,ih.RightCurlyExpected):this.accept(ts.CurlyR)?this.finish(e):this.finish(e,ih.ExpressionExpected)}return null}_parseOperator(){if(this.peek(zp)||this.peek(Lp)||this.peek(Op)||this.peek(Pp)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(Js.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(lo);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(ts.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(So);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(ts.Colon))return this.finish(n,ih.ColonExpected,[ts.Colon],e||[ts.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);let i=!1;if(n.setValue(this._parseExpr())&&(i=!0,n.addChild(this._parsePrio())),this.peek(ts.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!i)return this.finish(n,ih.PropertyValueExpected);return this.peek(ts.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseNestedProperties(){const e=this.create(Lo);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(ba);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,ih.SelectorExpected);for(;this.accept(ts.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(ts.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,ih.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(Js.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(ts.Num)||this.accept(ts.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(Js.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){const e=this.createNode(Js.SelectorPlaceholder);if(this.consumeToken(),this.accept(ts.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,ih.IdentifierExpected);if(!this.accept(ts.Colon))return this.finish(e,ih.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,ih.IdentifierExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[ts.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(ts.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(Js.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(ts.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(Ro);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,ih.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else"))if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(ts.CurlyL)){const n=this.create(To);this._parseBody(n,e),t.setElseClause(n)}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const t=this.create(No);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,ih.ExpressionExpected,[ts.CurlyR]):this.finish(t,$p.ThroughOrToExpected,[ts.CurlyR]):this.finish(t,ih.ExpressionExpected,[ts.CurlyR]):this.finish(t,$p.FromExpected,[ts.CurlyR]):this.finish(t,ih.VariableNameExpected,[ts.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const t=this.create(Io);this.consumeToken();const n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,ih.VariableNameExpected,[ts.CurlyR]);for(;this.accept(ts.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,ih.VariableNameExpected,[ts.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,ih.ExpressionExpected,[ts.CurlyR]):this.finish(t,$p.InExpected,[ts.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const t=this.create(Do);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,ih.ExpressionExpected,[ts.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(Mo);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([Ys.Function])))return this.finish(e,ih.IdentifierExpected,[ts.CurlyR]);if(!this.accept(ts.ParenthesisL))return this.finish(e,ih.LeftParenthesisExpected,[ts.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,ih.VariableNameExpected);return this.accept(ts.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,ih.RightParenthesisExpected,[ts.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(Js.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,ih.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(Sa);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([Ys.Mixin])))return this.finish(e,ih.IdentifierExpected,[ts.CurlyR]);if(this.accept(ts.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,ih.VariableNameExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[ts.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(Eo);return e.setIdentifier(this._parseVariable())?(this.accept(Wp),this.accept(ts.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,ih.VariableValueExpected,[],[ts.Comma,ts.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(va);if(this.consumeToken(),this.accept(ts.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,ih.ExpressionExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(wa);this.consumeToken();const t=this._parseIdent([Ys.Mixin]);if(!e.setIdentifier(t))return this.finish(e,ih.IdentifierExpected,[ts.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const n=this._parseIdent([Ys.Mixin]);if(!n)return this.finish(e,ih.IdentifierExpected,[ts.CurlyR]);const i=this.create(Ea);t.referenceTypes=[Ys.Module],i.setIdentifier(t),e.setIdentifier(n),e.addChild(i)}if(this.accept(ts.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,ih.ExpressionExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(ts.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(ya);if(this.acceptIdent("using")){if(!this.accept(ts.ParenthesisL))return this.finish(e,ih.LeftParenthesisExpected,[ts.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,ih.VariableNameExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[ts.CurlyL])}return this.peek(ts.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(Fo),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(ts.Colon))e.setIdentifier(n);else{if(this.accept(Wp))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(Wp),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(ts.ParenthesisR)){this.restoreAtMark(e);const t=this.create(lo);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}_parseOperation(){if(!this.peek(ts.ParenthesisL))return null;const e=this.create(lo);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(ts.Comma);return this.accept(ts.ParenthesisR)?this.finish(e):this.finish(e,ih.RightParenthesisExpected)}_parseListElement(){const e=this.create(Ca),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(ts.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,ih.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(Vo);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,ih.StringLiteralExpected);if(!this.peek(ts.SemiColon)&&!this.peek(ts.EOF)){if(!this.peekRegExp(ts.Ident,/as|with/))return this.finish(e,ih.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([Ys.Module]))&&!this.acceptDelim("*"))return this.finish(e,ih.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(ts.ParenthesisL))return this.finish(e,ih.LeftParenthesisExpected,[ts.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,ih.VariableNameExpected);for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,ih.VariableNameExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected)}}return this.accept(ts.SemiColon)||this.accept(ts.EOF)?this.finish(e):this.finish(e,ih.SemiColonExpected)}_parseModuleConfigDeclaration(){const e=this.create(Uo);return e.setIdentifier(this._parseVariable())?this.accept(ts.Colon)&&e.setValue(this._parseExpr(!0))?!this.accept(ts.Exclamation)||!this.hasWhitespace()&&this.acceptIdent("default")?this.finish(e):this.finish(e,ih.UnknownKeyword):this.finish(e,ih.VariableValueExpected,[],[ts.Comma,ts.ParenthesisR]):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create($o);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,ih.StringLiteralExpected);if(this.acceptIdent("as")){const t=this._parseIdent([Ys.Forward]);if(!e.setIdentifier(t))return this.finish(e,ih.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,ih.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(ts.ParenthesisL))return this.finish(e,ih.LeftParenthesisExpected,[ts.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,ih.VariableNameExpected);for(;this.accept(ts.Comma)&&!this.peek(ts.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,ih.VariableNameExpected);if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,ih.IdentifierOrVariableExpected);return this.accept(ts.SemiColon)||this.accept(ts.EOF)?this.finish(e):this.finish(e,ih.SemiColonExpected)}_parseForwardVisibility(){const e=this.create(qo);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(ts.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}},Kp=Na("Sass documentation"),Bp=class e extends Rd{constructor(t,n){super("$",t,n),jp(e.scssModuleLoaders),jp(e.scssModuleBuiltIns)}isImportPathParent(e){return e===Js.Forward||e===Js.Use||super.isImportPathParent(e)}getCompletionForImportPath(t,n){const i=t.getParent().type;if(i===Js.Forward||i===Js.Use)for(let i of e.scssModuleBuiltIns){const e={label:i.label,documentation:i.documentation,textEdit:pl.replace(this.getCompletionRange(t),`'${i.label}'`),kind:Wl.Module};n.items.push(e)}return super.getCompletionForImportPath(t,n)}createReplaceFunction(){let t=1;return(n,i)=>"\\"+i+": ${"+t+++":"+(e.variableDefaults[i]||"")+"}"}createFunctionProposals(e,t,n,i){for(const r of e){const e=r.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),s={label:r.func.substr(0,r.func.indexOf("(")),detail:r.func,documentation:r.desc,textEdit:pl.replace(this.getCompletionRange(t),e),insertTextFormat:Ul.Snippet,kind:Wl.Function};n&&(s.sortText="z"),i.items.push(s)}return i}getCompletionsForSelector(t,n,i){return this.createFunctionProposals(e.selectorFuncs,null,!0,i),super.getCompletionsForSelector(t,n,i)}getTermProposals(t,n,i){let r=e.builtInFuncs;return t&&(r=r.filter((e=>!e.type||!t.restrictions||-1!==t.restrictions.indexOf(e.type)))),this.createFunctionProposals(r,n,!0,i),super.getTermProposals(t,n,i)}getColorProposals(t,n,i){return this.createFunctionProposals(e.colorProposals,n,!1,i),super.getColorProposals(t,n,i)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,n){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,Ys.Rule);for(const e of i){const i={label:e.name,textEdit:pl.replace(this.getCompletionRange(t),e.name),kind:Wl.Function};n.items.push(i)}return n}getCompletionForAtDirectives(t){return t.items.push(...e.scssAtDirectives),t}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(t){return t.items.push(...e.scssModuleLoaders),t}};function jp(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}}))}Bp.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"},Bp.colorProposals=[{func:"red($color)",desc:Na("Gets the red component of a color.")},{func:"green($color)",desc:Na("Gets the green component of a color.")},{func:"blue($color)",desc:Na("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:Na("Mixes two colors together.")},{func:"hue($color)",desc:Na("Gets the hue component of a color.")},{func:"saturation($color)",desc:Na("Gets the saturation component of a color.")},{func:"lightness($color)",desc:Na("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:Na("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:Na("Makes a color lighter.")},{func:"darken($color, $amount)",desc:Na("Makes a color darker.")},{func:"saturate($color, $amount)",desc:Na("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:Na("Makes a color less saturated.")},{func:"grayscale($color)",desc:Na("Converts a color to grayscale.")},{func:"complement($color)",desc:Na("Returns the complement of a color.")},{func:"invert($color)",desc:Na("Returns the inverse of a color.")},{func:"alpha($color)",desc:Na("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:Na("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:Na("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:Na("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:Na("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:Na("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Na("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:Na("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Na("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:Na("Converts a color into the format understood by IE filters.")}],Bp.selectorFuncs=[{func:"selector-nest($selectors…)",desc:Na("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:Na("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:Na("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:Na("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:Na("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:Na("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:Na("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:Na("Parses a selector into the format returned by &.")}],Bp.builtInFuncs=[{func:"unquote($string)",desc:Na("Removes quotes from a string.")},{func:"quote($string)",desc:Na("Adds quotes to a string.")},{func:"str-length($string)",desc:Na("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:Na("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:Na("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:Na("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:Na("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:Na("Converts a string to lower case.")},{func:"percentage($number)",desc:Na("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:Na("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:Na("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:Na("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:Na("Returns the absolute value of a number.")},{func:"min($numbers)",desc:Na("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:Na("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:Na("Returns a random number.")},{func:"length($list)",desc:Na("Returns the length of a list.")},{func:"nth($list, $n)",desc:Na("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:Na("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:Na("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:Na("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:Na("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:Na("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:Na("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:Na("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:Na("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:Na("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:Na("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:Na("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:Na("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:Na("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:Na("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:Na("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:Na("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:Na("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:Na("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:Na("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:Na("Returns the type of a value.")},{func:"unit($number)",desc:Na("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:Na("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:Na("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:Na("Dynamically calls a Sass function.")}],Bp.scssAtDirectives=[{label:"@extend",documentation:Na("Inherits the styles of another selector."),kind:Wl.Keyword},{label:"@at-root",documentation:Na("Causes one or more rules to be emitted at the root of the document."),kind:Wl.Keyword},{label:"@debug",documentation:Na("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:Wl.Keyword},{label:"@warn",documentation:Na("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:Wl.Keyword},{label:"@error",documentation:Na("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:Wl.Keyword},{label:"@if",documentation:Na("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:"@if ${1:expr} {\n\t$0\n}",insertTextFormat:Ul.Snippet,kind:Wl.Keyword},{label:"@for",documentation:Na("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:Ul.Snippet,kind:Wl.Keyword},{label:"@each",documentation:Na("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:Ul.Snippet,kind:Wl.Keyword},{label:"@while",documentation:Na("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:Ul.Snippet,kind:Wl.Keyword},{label:"@mixin",documentation:Na("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:"@mixin ${1:name} {\n\t$0\n}",insertTextFormat:Ul.Snippet,kind:Wl.Keyword},{label:"@include",documentation:Na("Includes the styles defined by another mixin into the current rule."),kind:Wl.Keyword},{label:"@function",documentation:Na("Defines complex operations that can be re-used throughout stylesheets."),kind:Wl.Keyword}],Bp.scssModuleLoaders=[{label:"@use",documentation:Na("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:Kp,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Ul.Snippet,kind:Wl.Keyword},{label:"@forward",documentation:Na("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:Kp,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Ul.Snippet,kind:Wl.Keyword}],Bp.scssModuleBuiltIns=[{label:"sass:math",documentation:Na("Provides functions that operate on numbers."),references:[{name:Kp,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:Na("Makes it easy to combine, search, or split apart strings."),references:[{name:Kp,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:Na("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:Kp,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:Na("Lets you access and modify values in lists."),references:[{name:Kp,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:Na("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:Kp,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:Na("Provides access to Sass’s powerful selector engine."),references:[{name:Kp,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:Na("Exposes the details of Sass’s inner workings."),references:[{name:Kp,url:"https://sass-lang.com/documentation/modules/meta"}]}];var Hp,Gp,Jp="/".charCodeAt(0),Xp="\n".charCodeAt(0),Yp="\r".charCodeAt(0),Qp="\f".charCodeAt(0),Zp="`".charCodeAt(0),em=".".charCodeAt(0),tm=ts.CustomToken,nm=tm++,im=class extends Zs{scanNext(e){const t=this.escapedJavaScript();return null!==t?this.finishToken(e,t):this.stream.advanceIfChars([em,em,em])?this.finishToken(e,nm):super.scanNext(e)}comment(){return!!super.comment()||!(this.inURL||!this.stream.advanceIfChars([Jp,Jp]))&&(this.stream.advanceWhileChar((e=>{switch(e){case Xp:case Yp:case Qp:return!1;default:return!0}})),!0)}escapedJavaScript(){return this.stream.peekChar()===Zp?(this.stream.advance(1),this.stream.advanceWhileChar((e=>e!==Zp)),this.stream.advanceIfChar(Zp)?ts.EscapedJavaScript:ts.BadEscapedJavaScript):null}},rm=class extends sd{constructor(){super(new im)}_parseStylesheetStatement(e=!1){return this.peek(ts.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(Wo);if(this.consumeToken(),this.accept(ts.ParenthesisL)){if(!this.accept(ts.Ident))return this.finish(e,ih.IdentifierExpected,[ts.SemiColon]);do{if(!this.accept(ts.Comma))break}while(this.accept(ts.Ident));if(!this.accept(ts.ParenthesisR))return this.finish(e,ih.RightParenthesisExpected,[ts.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(ts.SemiColon)||this.peek(ts.EOF)||e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e)):this.finish(e,ih.URIOrStringExpected,[ts.SemiColon])}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(Js.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(ts.SemiColon)?this.finish(e):this.finish(e,ih.SemiColonExpected):this.finish(e,ih.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const e=this.create(Qo);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(ua),n=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(ts.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,ih.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(ts.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(ts.ParenthesisL))return this.restoreAtMark(e),null;{let t=this.create(Sa);if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(ts.Comma)||this.accept(ts.SemiColon))&&!this.peek(ts.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,ih.IdentifierExpected,[],[ts.ParenthesisR]);if(!this.accept(ts.ParenthesisR))return this.restoreAtMark(e),null}}if(!this.peek(ts.CurlyL))return null;const t=this.create(fo);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(ts.BracketL)&&(t=!0),e.addChild(this._parseLookupValue());)t=!1;return!t}_parseLookupValue(){const e=this.create(lo),t=this.mark();return this.accept(ts.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(ts.BracketR)||this.accept(ts.BracketR))?e:(this.restoreAtMark(t),null)}_parseVariable(e=!1,t=!1){const n=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(ts.AtKeyword))return null;const i=this.create(ga),r=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(r),null;return!this.accept(ts.AtKeyword)&&!this.accept(ts.Ident)||!t&&this.peek(ts.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(r),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(ts.EscapedJavaScript)||this.peek(ts.BadEscapedJavaScript)){const e=this.createNode(Js.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(Js.EscapedValue);return this.consumeToken(),this.accept(ts.String)||this.accept(ts.EscapedJavaScript)?this.finish(e):this.finish(e,ih.TermExpected)}return null}_parseOperator(){return this._parseGuardOperator()||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(Js.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){const e=this.createNode(Js.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){const e=this.createNode(Js.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(ts.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([Ys.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const t=this.create(bo);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(ts.CurlyL))break;this.restoreAtMark(e),t.addChild(this._parseCombinator())}return n?this.finish(t):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(Js.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(ts.Num)||this.accept(ts.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(Js.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(),i=this.create(po);i.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let r=!1;return r=e?i.isCustomProperty?i.addChild(this._parseIdent()):i.addChild(this._parseRegexp(t)):i.isCustomProperty?this._acceptInterpolatedIdent(i):this._acceptInterpolatedIdent(i,t),r?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(i)):(this.restoreAtMark(n),null)}peekInterpolatedIdent(){return this.peek(ts.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,t){let n=!1;const i=()=>{const e=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()},r=t?()=>this.acceptRegexp(t):()=>this.accept(ts.Ident);for(;(r()||e.addChild(this._parseInterpolation()||this.try(i)))&&(n=!0,!this.hasWhitespace()););return n}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const t=this.createNode(Js.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(ts.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(ts.CurlyR)?this.finish(t):this.finish(t,ih.RightCurlyExpected):this.finish(t,ih.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),t=this.create(Sa);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(ts.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(ts.Comma)||this.accept(ts.SemiColon))&&!this.peek(ts.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,ih.IdentifierExpected,[],[ts.ParenthesisR]);return this.accept(ts.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(ts.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(po),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(ts.Hash))return null;e=this.create(po),this.consumeToken()}return e.referenceTypes=[Ys.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(ts.Colon))return null;const e=this.mark(),t=this.create(ba);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(ba);return this.consumeToken(),!this.hasWhitespace()&&this.accept(ts.Colon)&&this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),null)}_completeExtends(e){if(!this.accept(ts.ParenthesisL))return this.finish(e,ih.LeftParenthesisExpected);const t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,ih.SelectorExpected);for(;this.accept(ts.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,ih.SelectorExpected);return this.accept(ts.ParenthesisR)?this.finish(e):this.finish(e,ih.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(ts.AtKeyword))return null;const e=this.mark(),t=this.create(wa);return!t.addChild(this._parseVariable(!0))||!this.hasWhitespace()&&this.accept(ts.ParenthesisL)?this.accept(ts.ParenthesisR)?this.finish(t):this.finish(t,ih.RightParenthesisExpected):(this.restoreAtMark(e),null)}_tryParseMixinReference(e=!0){const t=this.mark(),n=this.create(wa);let i=this._parseMixinDeclarationIdentifier();for(;i;){this.acceptDelim(">");const e=this._parseMixinDeclarationIdentifier();if(!e)break;n.getNamespaces().addChild(i),i=e}if(!n.setIdentifier(i))return this.restoreAtMark(t),null;let r=!1;if(this.accept(ts.ParenthesisL)){if(r=!0,n.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(ts.Comma)||this.accept(ts.SemiColon))&&!this.peek(ts.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,ih.ExpressionExpected);if(!this.accept(ts.ParenthesisR))return this.finish(n,ih.RightParenthesisExpected);i.referenceTypes=[Ys.Mixin]}else i.referenceTypes=[Ys.Mixin,Ys.Rule];return this.peek(ts.BracketL)?e||this._addLookupChildren(n):n.addChild(this._parsePrio()),r||this.peek(ts.SemiColon)||this.peek(ts.CurlyR)||this.peek(ts.EOF)?this.finish(n):(this.restoreAtMark(t),null)}_parseMixinArgument(){const e=this.create(Fo),t=this.mark(),n=this._parseVariable();return n&&(this.accept(ts.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(Eo);if(this.peekKeyword("@rest")){const t=this.create(lo);return this.consumeToken(),this.accept(nm)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,ih.DotExpected,[],[ts.Comma,ts.ParenthesisR])}if(this.peek(nm)){const t=this.create(lo);return this.consumeToken(),e.setIdentifier(this.finish(t)),this.finish(e)}let t=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(ts.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(_a);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,ih.ConditionExpected);for(;this.acceptIdent("and")||this.accept(ts.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,ih.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(ka);return e.isNegated=this.acceptIdent("not"),this.accept(ts.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(ts.ParenthesisR)?this.finish(e):this.finish(e,ih.RightParenthesisExpected)):e.isNegated?this.finish(e,ih.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),t=this.create(ko);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(ts.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(ts.Comma)||this.accept(ts.SemiColon))&&!this.peek(ts.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,ih.ExpressionExpected);return this.accept(ts.ParenthesisR)?this.finish(t):this.finish(t,ih.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(po);return e.referenceTypes=[Ys.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(ts.ParenthesisR)){this.restoreAtMark(e);const t=this.create(lo);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}},sm=class e extends Rd{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,n,i){for(const r of e){const e={label:r.name,detail:r.example,documentation:r.description,textEdit:pl.replace(this.getCompletionRange(t),r.name+"($0)"),insertTextFormat:Ul.Snippet,kind:Wl.Function};n&&(e.sortText="z"),i.items.push(e)}return i}getTermProposals(t,n,i){let r=e.builtInProposals;return t&&(r=r.filter((e=>!e.type||!t.restrictions||-1!==t.restrictions.indexOf(e.type)))),this.createFunctionProposals(r,n,!0,i),super.getTermProposals(t,n,i)}getColorProposals(t,n,i){return this.createFunctionProposals(e.colorProposals,n,!1,i),super.getColorProposals(t,n,i)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}};function om(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 i(e,i){const r=t(e),s=n(e);return r!==s?{startLine:r,endLine:s,kind:i}:null}const r=[],s=[],o=function(){switch(e.languageId){case"scss":return new Vp;case"less":return new im;default:return new Zs}}();o.ignoreComment=!1,o.setSource(e.getText());let a=o.scan(),l=null;for(;a.type!==ts.EOF;){switch(a.type){case ts.CurlyL:case Ap:s.push({line:t(a),type:"brace",isStart:!0});break;case ts.CurlyR:if(0!==s.length){const e=am(s,"brace");if(!e)break;let t=n(a);"brace"===e.type&&(l&&n(l)!==t&&t--,e.line!==t&&r.push({startLine:e.line,endLine:t,kind:void 0}))}break;case ts.Comment:{const o=e=>"#region"===e?{line:t(a),type:"comment",isStart:!0}:{line:n(a),type:"comment",isStart:!1},l=(t=>{const n=t.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(n)return o(n[1]);if("scss"===e.languageId||"less"===e.languageId){const e=t.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(e)return o(e[1])}return null})(a);if(l)if(l.isStart)s.push(l);else{const e=am(s,"comment");if(!e)break;"comment"===e.type&&e.line!==l.line&&r.push({startLine:e.line,endLine:l.line,kind:"region"})}else{const e=i(a,"comment");e&&r.push(e)}break}}l=a,a=o.scan()}return r}(e);return function(e,t){const n=t&&t.rangeLimit||Number.MAX_VALUE,i=e.sort(((e,t)=>{let n=e.startLine-t.startLine;return 0===n&&(n=e.endLine-t.endLine),n})),r=[];let s=-1;return i.forEach((e=>{e.startLine=0;n--)if(e[n].type===t&&e[n].isStart)return e.splice(n,1)[0];return null}sm.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:Na("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:Na('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:Na("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:Na("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:Na("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:Na("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:Na("URL encodes a string")},{name:"e",example:"e(@string);",description:Na("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:Na("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:Na("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:Na("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:Na("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:Na("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:Na("absolute value of a number"),example:"abs(number);"},{name:"acos",description:Na("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:Na("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:Na("rounds up to an integer")},{name:"cos",description:Na("cosine function"),example:"cos(number);"},{name:"floor",description:Na("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:Na("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:Na("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:Na("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:Na("sine function"),example:"sin(number);"},{name:"tan",description:Na("tangent function"),example:"tan(number);"},{name:"atan",description:Na("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:Na("returns pi"),example:"pi();"},{name:"pow",description:Na("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:Na("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:Na("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:Na("returns the lowest of one or more values"),example:"max(@x, @y);"}],sm.colorProposals=[{name:"argb",example:"argb(@color);",description:Na("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:Na("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:Na("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:Na("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:Na("creates a color")},{name:"hue",example:"hue(@color);",description:Na("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:Na("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:Na("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:Na("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:Na("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:Na("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:Na("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:Na("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:Na("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:Na("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:Na("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:Na("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:Na("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:Na("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:Na("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:Na("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:Na("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:Na("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:Na("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:Na("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:Na("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:Na("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);"}],Hp=[,,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 i(e,i){this.__indent_cache=new n(e,i),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)+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)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},i.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},i.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},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.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)},i.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},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(e,n){for(var i=this.__lines.length-2;i>=0;){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(e)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=i},,,,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,r={};for(n in e=i(e))n!==t&&(r[n]=e[n]);if(t&&e[t])for(n in e[t])r[n]=e[t][n];return r}function i(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],i=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},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],i=t||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},t.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(n,10);return isNaN(i)&&(i=t),i},t.prototype._get_selection=function(e,t,n){var i=this._get_selection_list(e,t,n);if(1!==i.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 i[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 i=this._get_array(e,n);if(!this._is_valid_selection(i,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 i},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=i,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 i=n(16).Beautifier,r=n(17).Options;e.exports=function(e,t){return new i(e,t).beautify()},e.exports.defaultOptions=function(){return new r}},function(e,t,n){var i=n(17).Options,r=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 m(e,t){this._source_text=e||"",this._options=new i(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"]}m.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},m.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--},m.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 r(this._options,n),this._input=new s(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i,m,u=0,f=!1,g=!1,b=!1,v=!1,y=!1,w=this._ch,S=!1;i=""!==this._input.read(h),m=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var x=this._input.read(d),C=o.get_directives(x);C&&"start"===C.ignore&&(x+=o.readIgnored(this._input)),this.print_string(x),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(i),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===u&&-1!==_.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(i),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{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===u&&-1!==k.indexOf(":")?(g=!0,this.indent()):k in this.NESTED_AT_RULE?(this._nestedLevel+=1,k in this.CONDITIONAL_GROUP_RULE&&(b=!0)):0!==u||g||(v=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),v=!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)):("("===m?this._output.space_before_token=!1:","!==m&&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(),"{"===m&&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!==u)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(i),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='"'===m||"'"===m;this.preserveSingleSpace(N||i),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&S&&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=m},function(e,t,n){var i=n(6).Options;function r(e){i.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 r=0;r0&&fm(i,l-1);)l--;0===l||um(i,l-1)?a=l:l=0;){const n=e.charCodeAt(t);if(n===dm)return!0;if(n===pm)return!1;t--}return!1}(i,a),r=c===i.length,i=i.substring(a,c),0!==a){const i=e.offsetAt(Oa.create(t.start.line,0));s=function(e,t,n){let i=t,r=0;const s=n.tabSize||4;for(;i0){const e=n.insertSpaces?io(" ",a*s):io("\t",s);c=c.split("\n").join("\n"+e),0===t.start.character&&(c=e+c)}return[{range:t,newText:c}]}function hm(e){return e.replace(/^\s+/,"")}var dm="{".charCodeAt(0),pm="}".charCodeAt(0);function mm(e,t,n){if(e&&e.hasOwnProperty(t)){const n=e[t];if(null!==n)return n}return n}function um(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function fm(e,t){return-1!==" \t".indexOf(e.charAt(t))}var gm={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:"