UNPKG

code-server

Version:

Run VS Code on a remote server.

65 lines • 662 kB
"use strict";var sY=Object.create;var fg=Object.defineProperty;var aY=Object.getOwnPropertyDescriptor;var cY=Object.getOwnPropertyNames;var uY=Object.getPrototypeOf,lY=Object.prototype.hasOwnProperty;var ce=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var V=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},Zc=(t,e)=>{for(var n in e)fg(t,n,{get:e[n],enumerable:!0})},QR=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of cY(e))!lY.call(t,i)&&i!==n&&fg(t,i,{get:()=>e[i],enumerable:!(r=aY(e,i))||r.enumerable});return t};var Nl=(t,e,n)=>(n=t!=null?sY(uY(t)):{},QR(e||!t||!t.__esModule?fg(n,"default",{value:t,enumerable:!0}):n,t)),Ns=t=>QR(fg({},"__esModule",{value:!0}),t);var Pl=V(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.boolean=fY;Ps.string=ZR;Ps.number=dY;Ps.error=pY;Ps.func=hY;Ps.array=eO;Ps.stringArray=gY;function fY(t){return t===!0||t===!1}function ZR(t){return typeof t=="string"||t instanceof String}function dY(t){return typeof t=="number"||t instanceof Number}function pY(t){return t instanceof Error}function hY(t){return typeof t=="function"}function eO(t){return Array.isArray(t)}function gY(t){return eO(t)&&t.every(e=>ZR(e))}});var OS=V(qe=>{"use strict";var _Y=qe&&qe.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),mY=qe&&qe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vY=qe&&qe.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&_Y(n,e,r[i]);return mY(n,e),n}})();Object.defineProperty(qe,"__esModule",{value:!0});qe.Message=qe.NotificationType9=qe.NotificationType8=qe.NotificationType7=qe.NotificationType6=qe.NotificationType5=qe.NotificationType4=qe.NotificationType3=qe.NotificationType2=qe.NotificationType1=qe.NotificationType0=qe.NotificationType=qe.RequestType9=qe.RequestType8=qe.RequestType7=qe.RequestType6=qe.RequestType5=qe.RequestType4=qe.RequestType3=qe.RequestType2=qe.RequestType1=qe.RequestType=qe.RequestType0=qe.AbstractMessageSignature=qe.ParameterStructures=qe.ResponseError=qe.ErrorCodes=void 0;var eu=vY(Pl()),sS;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(sS||(qe.ErrorCodes=sS={}));var aS=class t extends Error{code;data;constructor(e,n,r){super(n),this.code=eu.number(e)?e:sS.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,t.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};qe.ResponseError=aS;var Ma=class t{kind;static auto=new t("auto");static byPosition=new t("byPosition");static byName=new t("byName");constructor(e){this.kind=e}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};qe.ParameterStructures=Ma;var Bt=class{method;numberOfParams;constructor(e,n){this.method=e,this.numberOfParams=n}get parameterStructures(){return Ma.auto}};qe.AbstractMessageSignature=Bt;var cS=class extends Bt{_;constructor(e){super(e,0)}};qe.RequestType0=cS;var uS=class extends Bt{_parameterStructures;_;constructor(e,n=Ma.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};qe.RequestType=uS;var lS=class extends Bt{_parameterStructures;_;constructor(e,n=Ma.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};qe.RequestType1=lS;var fS=class extends Bt{_;constructor(e){super(e,2)}};qe.RequestType2=fS;var dS=class extends Bt{_;constructor(e){super(e,3)}};qe.RequestType3=dS;var pS=class extends Bt{_;constructor(e){super(e,4)}};qe.RequestType4=pS;var hS=class extends Bt{_;constructor(e){super(e,5)}};qe.RequestType5=hS;var gS=class extends Bt{_;constructor(e){super(e,6)}};qe.RequestType6=gS;var _S=class extends Bt{_;constructor(e){super(e,7)}};qe.RequestType7=_S;var mS=class extends Bt{_;constructor(e){super(e,8)}};qe.RequestType8=mS;var vS=class extends Bt{_;constructor(e){super(e,9)}};qe.RequestType9=vS;var yS=class extends Bt{_parameterStructures;_;constructor(e,n=Ma.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};qe.NotificationType=yS;var SS=class extends Bt{_;constructor(e){super(e,0)}};qe.NotificationType0=SS;var DS=class extends Bt{_parameterStructures;_;constructor(e,n=Ma.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};qe.NotificationType1=DS;var ES=class extends Bt{_;constructor(e){super(e,2)}};qe.NotificationType2=ES;var bS=class extends Bt{_;constructor(e){super(e,3)}};qe.NotificationType3=bS;var CS=class extends Bt{_;constructor(e){super(e,4)}};qe.NotificationType4=CS;var TS=class extends Bt{_;constructor(e){super(e,5)}};qe.NotificationType5=TS;var wS=class extends Bt{_;constructor(e){super(e,6)}};qe.NotificationType6=wS;var NS=class extends Bt{_;constructor(e){super(e,7)}};qe.NotificationType7=NS;var PS=class extends Bt{_;constructor(e){super(e,8)}};qe.NotificationType8=PS;var RS=class extends Bt{_;constructor(e){super(e,9)}};qe.NotificationType9=RS;var tO;(function(t){function e(i){let o=i;return o&&eu.string(o.method)&&(eu.string(o.id)||eu.number(o.id))}t.isRequest=e;function n(i){let o=i;return o&&eu.string(o.method)&&i.id===void 0}t.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(eu.string(o.id)||eu.number(o.id)||o.id===null)}t.isResponse=r})(tO||(qe.Message=tO={}))});var IS=V(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.LRUCache=La.LinkedMap=La.Touch=void 0;var wr;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(wr||(La.Touch=wr={}));var dg=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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}before(e){let n=this._map.get(e);return n?n.previous?.value:void 0}after(e){let n=this._map.get(e);return n?n.next?.value:void 0}has(e){return this._map.has(e)}get(e,n=wr.None){let r=this._map.get(e);if(r)return n!==wr.None&&this.touch(r,n),r.value}set(e,n,r=wr.None){let i=this._map.get(e);if(i)i.value=n,r!==wr.None&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case wr.None:this.addItemLast(i);break;case wr.First:this.addItemFirst(i);break;case wr.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");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{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==wr.First&&n!==wr.Last)){if(n===wr.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===wr.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}};La.LinkedMap=dg;var xS=class extends dg{_limit;_ratio;constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=wr.AsNew){return super.get(e,n)}peek(e){return super.get(e,wr.None)}set(e,n){return super.set(e,n,wr.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};La.LRUCache=xS});var rO=V(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});pg.Disposable=void 0;var nO;(function(t){function e(n){return{dispose:n}}t.create=e})(nO||(pg.Disposable=nO={}))});var Fa=V(LS=>{"use strict";Object.defineProperty(LS,"__esModule",{value:!0});var AS;function MS(){if(AS===void 0)throw new Error("No runtime abstraction layer installed");return AS}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");AS=n}t.install=e})(MS||(MS={}));LS.default=MS});var Rl=V(ja=>{"use strict";var yY=ja&&ja.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ja,"__esModule",{value:!0});ja.Emitter=ja.Event=void 0;var SY=yY(Fa()),iO;(function(t){let e={dispose(){}};t.None=function(){return e}})(iO||(ja.Event=iO={}));var FS=class{_callbacks;_contexts;add(e,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],e))}catch(a){(0,SY.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},jS=class t{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){return this._event||(this._event=(e,n,r)=>{this._callbacks||(this._callbacks=new FS),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,n),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};ja.Emitter=jS});var _g=V(Gr=>{"use strict";var DY=Gr&&Gr.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),EY=Gr&&Gr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bY=Gr&&Gr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&DY(n,e,r[i]);return EY(n,e),n}})(),CY=Gr&&Gr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.CancellationTokenSource=Gr.CancellationToken=void 0;var TY=CY(Fa()),wY=bY(Pl()),qS=Rl(),hg;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:qS.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:qS.Event.None});function e(n){let r=n;return r&&(r===t.None||r===t.Cancelled||wY.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.is=e})(hg||(Gr.CancellationToken=hg={}));var NY=Object.freeze(function(t,e){let n=(0,TY.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}}),gg=class{_isCancelled=!1;_emitter;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?NY:(this._emitter||(this._emitter=new qS.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},US=class{_token;get token(){return this._token||(this._token=new gg),this._token}cancel(){this._token?this._token.cancel():this._token=hg.Cancelled}dispose(){this._token?this._token instanceof gg&&this._token.dispose():this._token=hg.None}};Gr.CancellationTokenSource=US});var oO=V(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.SharedArrayReceiverStrategy=Ol.SharedArraySenderStrategy=void 0;var PY=_g(),Ad;(function(t){t.Continue=0,t.Cancelled=1})(Ad||(Ad={}));var YS=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Ad.Continue,this.buffers.set(e.id,n),e.$cancellationData=n}async sendCancellation(e,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Ad.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Ol.SharedArraySenderStrategy=YS;var kS=class{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Ad.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},HS=class{token;constructor(e){this.token=new kS(e)}cancel(){}dispose(){}},$S=class{kind="request";createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new PY.CancellationTokenSource:new HS(n)}};Ol.SharedArrayReceiverStrategy=$S});var GS=V(xl=>{"use strict";var RY=xl&&xl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xl,"__esModule",{value:!0});xl.Semaphore=void 0;var OY=RY(Fa()),BS=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,OY.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}};xl.Semaphore=BS});var aO=V(Nr=>{"use strict";var xY=Nr&&Nr.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),IY=Nr&&Nr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),AY=Nr&&Nr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&xY(n,e,r[i]);return IY(n,e),n}})(),MY=Nr&&Nr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ReadableStreamMessageReader=Nr.AbstractMessageReader=Nr.MessageReader=void 0;var zS=MY(Fa()),Il=AY(Pl()),WS=Rl(),LY=GS(),sO;(function(t){function e(n){let r=n;return r&&Il.func(r.listen)&&Il.func(r.dispose)&&Il.func(r.onError)&&Il.func(r.onClose)&&Il.func(r.onPartialMessage)}t.is=e})(sO||(Nr.MessageReader=sO={}));var mg=class{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new WS.Emitter,this.closeEmitter=new WS.Emitter,this.partialMessageEmitter=new WS.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Il.string(e.message)?e.message:"unknown"}`)}};Nr.AbstractMessageReader=mg;var KS;(function(t){function e(n){let r,i,o,s=new Map,a,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let u of n.contentDecoders)s.set(u.name,u);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let u of n.contentTypeDecoders)c.set(u.name,u)}return a===void 0&&(a=(0,zS.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}t.fromOptions=e})(KS||(KS={}));var VS=class extends mg{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,n){super(),this.readable=e,this.options=KS.fromOptions(n),this.buffer=(0,zS.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new LY.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
${JSON.stringify(Object.fromEntries(r))}`));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=o}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,zS.default)().timer.setTimeout((e,n)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Nr.ReadableStreamMessageReader=VS});var dO=V(Pr=>{"use strict";var FY=Pr&&Pr.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),jY=Pr&&Pr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),qY=Pr&&Pr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&FY(n,e,r[i]);return jY(n,e),n}})(),UY=Pr&&Pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.WriteableStreamMessageWriter=Pr.AbstractMessageWriter=Pr.MessageWriter=void 0;var cO=UY(Fa()),Md=qY(Pl()),YY=GS(),uO=Rl(),kY="Content-Length: ",lO=`\r
`,fO;(function(t){function e(n){let r=n;return r&&Md.func(r.dispose)&&Md.func(r.onClose)&&Md.func(r.onError)&&Md.func(r.write)}t.is=e})(fO||(Pr.MessageWriter=fO={}));var vg=class{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new uO.Emitter,this.closeEmitter=new uO.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,n,r){this.errorEmitter.fire([this.asError(e),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${Md.string(e.message)?e.message:"unknown"}`)}};Pr.AbstractMessageWriter=vg;var XS;(function(t){function e(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,cO.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,cO.default)().applicationJson.encoder}}t.fromOptions=e})(XS||(XS={}));var JS=class extends vg{writable;options;errorCount;writeSemaphore;constructor(e,n){super(),this.writable=e,this.options=XS.fromOptions(n),this.errorCount=0,this.writeSemaphore=new YY.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(kY,r.byteLength.toString(),lO),i.push(lO),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){this.writable.end()}};Pr.WriteableStreamMessageWriter=JS});var pO=V(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});yg.AbstractMessageBuffer=void 0;var HY=13,$Y=10,BY=`\r
`,QS=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let n=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let u=this._chunks[r];for(i=0;i<u.length;){switch(u[i]){case HY:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case $Y:switch(n){case 1:n=2;break;case 3:n=4,i++;break e;default:n=0}break;default:n=0}i++}o+=u.byteLength,r++}if(n!==4)return;let s=this._read(o+i),a=new Map,c=this.toString(s,"ascii").split(BY);if(c.length<2)return a;for(let u=0;u<c.length-2;u++){let l=c[u],d=l.indexOf(":");if(d===-1)throw new Error(`Message header must separate key and value using ':'
${l}`);let f=l.substr(0,d),g=l.substr(d+1).trim();a.set(e?f.toLowerCase():f,g)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let n=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);n.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return n}};yg.AbstractMessageBuffer=QS});var mO=V(Be=>{"use strict";var GY=Be&&Be.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),WY=Be&&Be.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zY=Be&&Be.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&GY(n,e,r[i]);return WY(n,e),n}})(),KY=Be&&Be.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Be,"__esModule",{value:!0});Be.ConnectionOptions=Be.MessageStrategy=Be.CancellationStrategy=Be.CancellationSenderStrategy=Be.CancellationReceiverStrategy=Be.RequestCancellationReceiverStrategy=Be.IdCancellationReceiverStrategy=Be.ConnectionStrategy=Be.ConnectionError=Be.ConnectionErrors=Be.LogTraceNotification=Be.SetTraceNotification=Be.TraceFormat=Be.TraceValues=Be.TraceValue=Be.Trace=Be.NullLogger=Be.ProgressType=Be.ProgressToken=void 0;Be.createMessageConnection=VY;var hO=KY(Fa()),sn=zY(Pl()),nt=OS(),gO=IS(),Ld=Rl(),ZS=_g(),qd;(function(t){t.type=new nt.NotificationType("$/cancelRequest")})(qd||(qd={}));var eD;(function(t){function e(n){return typeof n=="string"||typeof n=="number"}t.is=e})(eD||(Be.ProgressToken=eD={}));var Fd;(function(t){t.type=new nt.NotificationType("$/progress")})(Fd||(Fd={}));var tD=class{__;_pr;constructor(){}};Be.ProgressType=tD;var nD;(function(t){function e(n){return sn.func(n)}t.is=e})(nD||(nD={}));Be.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var Rt;(function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"})(Rt||(Be.Trace=Rt={}));var rD;(function(t){t.Off="off",t.Messages="messages",t.Compact="compact",t.Verbose="verbose"})(rD||(Be.TraceValue=rD={}));Be.TraceValues=rD;(function(t){function e(r){if(!sn.string(r))return t.Off;switch(r=r.toLowerCase(),r){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}t.fromString=e;function n(r){switch(r){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}t.toString=n})(Rt||(Be.Trace=Rt={}));var di;(function(t){t.Text="text",t.JSON="json"})(di||(Be.TraceFormat=di={}));(function(t){function e(n){return sn.string(n)?(n=n.toLowerCase(),n==="json"?t.JSON:t.Text):t.Text}t.fromString=e})(di||(Be.TraceFormat=di={}));var iD;(function(t){t.type=new nt.NotificationType("$/setTrace")})(iD||(Be.SetTraceNotification=iD={}));var Sg;(function(t){t.type=new nt.NotificationType("$/logTrace")})(Sg||(Be.LogTraceNotification=Sg={}));var jd;(function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"})(jd||(Be.ConnectionErrors=jd={}));var Al=class t extends Error{code;constructor(e,n){super(n),this.code=e,Object.setPrototypeOf(this,t.prototype)}};Be.ConnectionError=Al;var oD;(function(t){function e(n){let r=n;return r&&sn.func(r.cancelUndispatched)}t.is=e})(oD||(Be.ConnectionStrategy=oD={}));var Dg;(function(t){function e(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&sn.func(r.createCancellationTokenSource)&&(r.dispose===void 0||sn.func(r.dispose))}t.is=e})(Dg||(Be.IdCancellationReceiverStrategy=Dg={}));var sD;(function(t){function e(n){let r=n;return r&&r.kind==="request"&&sn.func(r.createCancellationTokenSource)&&(r.dispose===void 0||sn.func(r.dispose))}t.is=e})(sD||(Be.RequestCancellationReceiverStrategy=sD={}));var Eg;(function(t){t.Message=Object.freeze({createCancellationTokenSource(n){return new ZS.CancellationTokenSource}});function e(n){return Dg.is(n)||sD.is(n)}t.is=e})(Eg||(Be.CancellationReceiverStrategy=Eg={}));var bg;(function(t){t.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(qd.type,{id:r})},cleanup(n){}});function e(n){let r=n;return r&&sn.func(r.sendCancellation)&&sn.func(r.cleanup)}t.is=e})(bg||(Be.CancellationSenderStrategy=bg={}));var Cg;(function(t){t.Message=Object.freeze({receiver:Eg.Message,sender:bg.Message});function e(n){let r=n;return r&&Eg.is(r.receiver)&&bg.is(r.sender)}t.is=e})(Cg||(Be.CancellationStrategy=Cg={}));var Tg;(function(t){function e(n){let r=n;return r&&sn.func(r.handleMessage)}t.is=e})(Tg||(Be.MessageStrategy=Tg={}));var _O;(function(t){function e(n){let r=n;return r&&(Cg.is(r.cancellationStrategy)||oD.is(r.connectionStrategy)||Tg.is(r.messageStrategy)||sn.number(r.maxParallelism))}t.is=e})(_O||(Be.ConnectionOptions=_O={}));var Xi;(function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"})(Xi||(Xi={}));function VY(t,e,n,r){let i=n!==void 0?n:Be.NullLogger,o=0,s=0,a=0,c="2.0",u=r?.maxParallelism??-1,l=0,d,f=new Map,g,h=new Map,_=new Map,S,b=new gO.LinkedMap,v=new Map,E=new Set,x=new Map,P=Rt.Off,T=di.Text,N,M=Xi.New,q=new Ld.Emitter,k=new Ld.Emitter,W=new Ld.Emitter,ne=new Ld.Emitter,he=new Ld.Emitter,R=r&&r.cancellationStrategy?r.cancellationStrategy:Cg.Message;function Y(O){}function Z(){return M===Xi.Listening}function oe(){return M===Xi.Closed}function U(){return M===Xi.Disposed}function re(){(M===Xi.New||M===Xi.Listening)&&(M=Xi.Closed,k.fire(void 0))}function L(O){q.fire([O,void 0,void 0])}function K(O){q.fire(O)}t.onClose(re),t.onError(L),e.onClose(re),e.onError(K);function z(O){if(O===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+O.toString()}function j(O){return O===null?"res-unknown-"+(++a).toString():"res-"+O.toString()}function _e(){return"not-"+(++s).toString()}function ye(O,D){nt.Message.isRequest(D)?O.set(z(D.id),D):nt.Message.isResponse(D)?u===-1?O.set(j(D.id),D):Lt(D):O.set(_e(),D)}function Fe(){S||b.size===0||u!==-1&&l>=u||(S=(0,hO.default)().timer.setImmediate(async()=>{if(S=void 0,b.size===0||u!==-1&&l>=u)return;let O=b.shift(),D;try{l++;let F=r?.messageStrategy;Tg.is(F)?D=F.handleMessage(O,Pe):D=Pe(O)}catch(F){i.error(`Processing message queue failed: ${F.toString()}`)}finally{D instanceof Promise?D.then(()=>{l--,Fe()}).catch(F=>{i.error(`Processing message queue failed: ${F.toString()}`)}):l--,Fe()}}))}async function Pe(O){return nt.Message.isRequest(O)?Dt(O):nt.Message.isNotification(O)?Cn(O):nt.Message.isResponse(O)?Lt(O):vt(O)}let lt=O=>{try{if(nt.Message.isNotification(O)&&O.method===qd.type.method){let D=O.params.id,F=z(D),$=b.get(F);if(nt.Message.isRequest($)){let ve=r?.connectionStrategy,Ce=ve&&ve.cancelUndispatched?ve.cancelUndispatched($,Y):void 0;if(Ce&&(Ce.error!==void 0||Ce.result!==void 0)){b.delete(F),x.delete(D),Ce.id=$.id,X(Ce,O.method,Date.now()),e.write(Ce).catch(()=>i.error("Sending response for canceled message failed."));return}}let ue=x.get(D);if(ue!==void 0){ue.cancel(),Re(O);return}else E.add(D)}ye(b,O)}finally{Fe()}};async function Dt(O){if(U())return Promise.resolve();function D(ge,y,C){let I={jsonrpc:c,id:O.id};return ge instanceof nt.ResponseError?I.error=ge.toJson():I.result=ge===void 0?null:ge,X(I,y,C),e.write(I)}function F(ge,y,C){let I={jsonrpc:c,id:O.id,error:ge.toJson()};return X(I,y,C),e.write(I)}me(O);let $=f.get(O.method),ue,ve;$&&(ue=$.type,ve=$.handler);let Ce=Date.now();if(ve||d){let ge=O.id??String(Date.now()),y=Dg.is(R.receiver)?R.receiver.createCancellationTokenSource(ge):R.receiver.createCancellationTokenSource(O);O.id!==null&&E.has(O.id)&&y.cancel(),O.id!==null&&x.set(ge,y);try{let C;if(ve)if(O.params===void 0){if(ue!==void 0&&ue.numberOfParams!==0)return F(new nt.ResponseError(nt.ErrorCodes.InvalidParams,`Request ${O.method} defines ${ue.numberOfParams} params but received none.`),O.method,Ce);C=ve(y.token)}else if(Array.isArray(O.params)){if(ue!==void 0&&ue.parameterStructures===nt.ParameterStructures.byName)return F(new nt.ResponseError(nt.ErrorCodes.InvalidParams,`Request ${O.method} defines parameters by name but received parameters by position`),O.method,Ce);C=ve(...O.params,y.token)}else{if(ue!==void 0&&ue.parameterStructures===nt.ParameterStructures.byPosition)return F(new nt.ResponseError(nt.ErrorCodes.InvalidParams,`Request ${O.method} defines parameters by position but received parameters by name`),O.method,Ce);C=ve(O.params,y.token)}else d&&(C=d(O.method,O.params,y.token));let I=await C;await D(I,O.method,Ce)}catch(C){C instanceof nt.ResponseError?await D(C,O.method,Ce):C&&sn.string(C.message)?await F(new nt.ResponseError(nt.ErrorCodes.InternalError,`Request ${O.method} failed with message: ${C.message}`),O.method,Ce):await F(new nt.ResponseError(nt.ErrorCodes.InternalError,`Request ${O.method} failed unexpectedly without providing any details.`),O.method,Ce)}finally{x.delete(ge)}}else await F(new nt.ResponseError(nt.ErrorCodes.MethodNotFound,`Unhandled method ${O.method}`),O.method,Ce)}function Lt(O){if(!U())if(O.id===null)O.error?i.error(`Received response message without id: Error is: 
${JSON.stringify(O.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let D=O.id,F=v.get(D);if(be(O,F),F!==void 0){v.delete(D);try{if(O.error){let $=O.error;F.reject(new nt.ResponseError($.code,$.message,$.data))}else if(O.result!==void 0)F.resolve(O.result);else throw new Error("Should never happen.")}catch($){$.message?i.error(`Response handler '${F.method}' failed with message: ${$.message}`):i.error(`Response handler '${F.method}' failed unexpectedly.`)}}}}async function Cn(O){if(U())return;let D,F;if(O.method===qd.type.method){let $=O.params.id;E.delete($),Re(O);return}else{let $=h.get(O.method);$&&(F=$.handler,D=$.type)}if(F||g)try{if(Re(O),F)if(O.params===void 0)D!==void 0&&D.numberOfParams!==0&&D.parameterStructures!==nt.ParameterStructures.byName&&i.error(`Notification ${O.method} defines ${D.numberOfParams} params but received none.`),await F();else if(Array.isArray(O.params)){let $=O.params;O.method===Fd.type.method&&$.length===2&&eD.is($[0])?await F({token:$[0],value:$[1]}):(D!==void 0&&(D.parameterStructures===nt.ParameterStructures.byName&&i.error(`Notification ${O.method} defines parameters by name but received parameters by position`),D.numberOfParams!==O.params.length&&i.error(`Notification ${O.method} defines ${D.numberOfParams} params but received ${$.length} arguments`)),await F(...$))}else D!==void 0&&D.parameterStructures===nt.ParameterStructures.byPosition&&i.error(`Notification ${O.method} defines parameters by position but received parameters by name`),await F(O.params);else g&&await g(O.method,O.params)}catch($){$.message?i.error(`Notification handler '${O.method}' failed with message: ${$.message}`):i.error(`Notification handler '${O.method}' failed unexpectedly.`)}else W.fire(O)}function vt(O){if(!O){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
${JSON.stringify(O,null,4)}`);let D=O;if(sn.string(D.id)||sn.number(D.id)){let F=D.id,$=v.get(F);$&&$.reject(new Error("The received response has neither a result nor an error property."))}}function Ze(O){if(O!=null)switch(P){case Rt.Verbose:return JSON.stringify(O,null,4);case Rt.Compact:return JSON.stringify(O);default:return}}function It(O){if(!(P===Rt.Off||!N))if(T===di.Text){let D;(P===Rt.Verbose||P===Rt.Compact)&&O.params&&(D=`Params: ${Ze(O.params)}`),N.log(`Sending request '${O.method} - (${O.id})'.`,D)}else Te("send-request",O)}function ht(O){if(!(P===Rt.Off||!N))if(T===di.Text){let D;(P===Rt.Verbose||P===Rt.Compact)&&(O.params?D=`Params: ${Ze(O.params)}`:D="No parameters provided."),N.log(`Sending notification '${O.method}'.`,D)}else Te("send-notification",O)}function X(O,D,F){if(!(P===Rt.Off||!N))if(T===di.Text){let $;(P===Rt.Verbose||P===Rt.Compact)&&(O.error&&O.error.data?$=`Error data: ${Ze(O.error.data)}`:O.result?$=`Result: ${Ze(O.result)}`:O.error===void 0&&($="No result returned.")),N.log(`Sending response '${D} - (${O.id})'. Processing request took ${Date.now()-F}ms`,$)}else Te("send-response",O)}function me(O){if(!(P===Rt.Off||!N))if(T===di.Text){let D;(P===Rt.Verbose||P===Rt.Compact)&&O.params&&(D=`Params: ${Ze(O.params)}`),N.log(`Received request '${O.method} - (${O.id})'.`,D)}else Te("receive-request",O)}function Re(O){if(!(P===Rt.Off||!N||O.method===Sg.type.method))if(T===di.Text){let D;(P===Rt.Verbose||P===Rt.Compact)&&(O.params?D=`Params: ${Ze(O.params)}`:D="No parameters provided."),N.log(`Received notification '${O.method}'.`,D)}else Te("receive-notification",O)}function be(O,D){if(!(P===Rt.Off||!N))if(T===di.Text){let F;if((P===Rt.Verbose||P===Rt.Compact)&&(O.error&&O.error.data?F=`Error data: ${Ze(O.error.data)}`:O.result?F=`Result: ${Ze(O.result)}`:O.error===void 0&&(F="No result returned.")),D){let $=O.error?` Request failed: ${O.error.message} (${O.error.code}).`:"";N.log(`Received response '${D.method} - (${O.id})' in ${Date.now()-D.timerStart}ms.${$}`,F)}else N.log(`Received response ${O.id} without active response promise.`,F)}else Te("receive-response",O)}function Te(O,D){if(!N||P===Rt.Off)return;let F={isLSPMessage:!0,type:O,message:D,timestamp:Date.now()};N.log(F)}function Je(){if(oe())throw new Al(jd.Closed,"Connection is closed.");if(U())throw new Al(jd.Disposed,"Connection is disposed.")}function ke(){if(Z())throw new Al(jd.AlreadyListening,"Connection is already listening")}function gt(){if(!Z())throw new Error("Call listen() first.")}function ct(O){return O===void 0?null:O}function wt(O){if(O!==null)return O}function rn(O){return O!=null&&!Array.isArray(O)&&typeof O=="object"}function Jt(O,D){switch(O){case nt.ParameterStructures.auto:return rn(D)?wt(D):[ct(D)];case nt.ParameterStructures.byName:if(!rn(D))throw new Error("Received parameters by name but param is not an object literal.");return wt(D);case nt.ParameterStructures.byPosition:return[ct(D)];default:throw new Error(`Unknown parameter structure ${O.toString()}`)}}function Tn(O,D){let F,$=O.numberOfParams;switch($){case 0:F=void 0;break;case 1:F=Jt(O.parameterStructures,D[0]);break;default:F=[];for(let ue=0;ue<D.length&&ue<$;ue++)F.push(ct(D[ue]));if(D.length<$)for(let ue=D.length;ue<$;ue++)F.push(null);break}return F}let Pt={sendNotification:(O,...D)=>{Je();let F,$;if(sn.string(O)){F=O;let ve=D[0],Ce=0,ge=nt.ParameterStructures.auto;nt.ParameterStructures.is(ve)&&(Ce=1,ge=ve);let y=D.length,C=y-Ce;switch(C){case 0:$=void 0;break;case 1:$=Jt(ge,D[Ce]);break;default:if(ge===nt.ParameterStructures.byName)throw new Error(`Received ${C} parameters for 'by Name' notification parameter structure.`);$=D.slice(Ce,y).map(I=>ct(I));break}}else{let ve=D;F=O.method,$=Tn(O,ve)}let ue={jsonrpc:c,method:F,params:$};return ht(ue),e.write(ue).catch(ve=>{throw i.error("Sending notification failed."),ve})},onNotification:(O,D)=>{Je();let F;return sn.func(O)?g=O:D&&(sn.string(O)?(F=O,h.set(O,{type:void 0,handler:D})):(F=O.method,h.set(O.method,{type:O,handler:D}))),{dispose:()=>{F!==void 0?h.get(F)?.handler===D&&h.delete(F):g===O&&(g=void 0)}}},onProgress:(O,D,F)=>{if(_.has(D))throw new Error(`Progress handler for token ${D} already registered`);return _.set(D,F),{dispose:()=>{_.get(D)===F&&_.delete(D)}}},sendProgress:(O,D,F)=>Pt.sendNotification(Fd.type,{token:D,value:F}),onUnhandledProgress:ne.event,sendRequest:(O,...D)=>{Je(),gt();function F(I,B){let Q=R.sender.sendCancellation(I,B);Q===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${B}`):Q.catch(()=>{i.log(`Sending cancellation messages for id ${B} failed.`)})}let $,ue,ve;if(sn.string(O)){$=O;let I=D[0],B=D[D.length-1],Q=0,ae=nt.ParameterStructures.auto;nt.ParameterStructures.is(I)&&(Q=1,ae=I);let de=D.length;ZS.CancellationToken.is(B)&&(de=de-1,ve=B);let Me=de-Q;switch(Me){case 0:ue=void 0;break;case 1:ue=Jt(ae,D[Q]);break;default:if(ae===nt.ParameterStructures.byName)throw new Error(`Received ${Me} parameters for 'by Name' request parameter structure.`);ue=D.slice(Q,de).map(tt=>ct(tt));break}}else{let I=D;$=O.method,ue=Tn(O,I);let B=O.numberOfParams;ve=ZS.CancellationToken.is(I[B])?I[B]:void 0}let Ce=o++,ge,y=!1;ve!==void 0&&(ve.isCancellationRequested?y=!0:ge=ve.onCancellationRequested(()=>{F(Pt,Ce)}));let C={jsonrpc:c,id:Ce,method:$,params:ue};return It(C),typeof R.sender.enableCancellation=="function"&&R.sender.enableCancellation(C),new Promise(async(I,B)=>{let Q=Me=>{I(Me),R.sender.cleanup(Ce),ge?.dispose()},ae=Me=>{B(Me),R.sender.cleanup(Ce),ge?.dispose()},de={method:$,timerStart:Date.now(),resolve:Q,reject:ae};try{v.set(Ce,de),await e.write(C),y&&F(Pt,Ce)}catch(Me){throw v.delete(Ce),de.reject(new nt.ResponseError(nt.ErrorCodes.MessageWriteError,Me.message?Me.message:"Unknown reason")),i.error("Sending request failed."),Me}})},onRequest:(O,D)=>{Je();let F=null;return nD.is(O)?(F=void 0,d=O):sn.string(O)?(F=null,D!==void 0&&(F=O,f.set(O,{handler:D,type:void 0}))):D!==void 0&&(F=O.method,f.set(O.method,{type:O,handler:D})),{dispose:()=>{F!==null&&(F!==void 0?f.get(F)?.handler===D&&f.delete(F):d===O&&(d=void 0))}}},hasPendingResponse:()=>v.size>0,trace:async(O,D,F)=>{let $=!1,ue=di.Text;F!==void 0&&(sn.boolean(F)?$=F:($=F.sendNotification||!1,ue=F.traceFormat||di.Text)),P=O,T=ue,P===Rt.Off?N=void 0:N=D,$&&!oe()&&!U()&&await Pt.sendNotification(iD.type,{value:Rt.toString(O)})},onError:q.event,onClose:k.event,onUnhandledNotification:W.event,onDispose:he.event,end:()=>{e.end()},dispose:()=>{if(U())return;M=Xi.Disposed,he.fire(void 0);let O=new nt.ResponseError(nt.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let D of v.values())D.reject(O);v=new Map,x=new Map,E=new Set,b=new gO.LinkedMap,sn.func(e.dispose)&&e.dispose(),sn.func(t.dispose)&&t.dispose()},listen:()=>{Je(),ke(),M=Xi.Listening,t.listen(lt)},inspect:()=>{(0,hO.default)().console.log("inspect")}};return Pt.onNotification(Sg.type,O=>{if(P===Rt.Off||!N)return;let D=P===Rt.Verbose||P===Rt.Compact;N.log(O.message,D?O.verbose:void 0)}),Pt.onNotification(Fd.type,async O=>{let D=_.get(O.token);D?await D(O.value):ne.fire(O)}),Pt}});var Rs=V(J=>{"use strict";var XY=J&&J.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(J,"__esModule",{value:!0});J.ProgressType=J.ProgressToken=J.createMessageConnection=J.NullLogger=J.ConnectionOptions=J.ConnectionStrategy=J.AbstractMessageBuffer=J.WriteableStreamMessageWriter=J.AbstractMessageWriter=J.MessageWriter=J.ReadableStreamMessageReader=J.AbstractMessageReader=J.MessageReader=J.SharedArrayReceiverStrategy=J.SharedArraySenderStrategy=J.CancellationToken=J.CancellationTokenSource=J.Emitter=J.Event=J.Disposable=J.LRUCache=J.Touch=J.LinkedMap=J.ParameterStructures=J.NotificationType9=J.NotificationType8=J.NotificationType7=J.NotificationType6=J.NotificationType5=J.NotificationType4=J.NotificationType3=J.NotificationType2=J.NotificationType1=J.NotificationType0=J.NotificationType=J.ErrorCodes=J.ResponseError=J.RequestType9=J.RequestType8=J.RequestType7=J.RequestType6=J.RequestType5=J.RequestType4=J.RequestType3=J.RequestType2=J.RequestType1=J.RequestType0=J.RequestType=J.Message=J.RAL=void 0;J.MessageStrategy=J.CancellationStrategy=J.CancellationSenderStrategy=J.RequestCancellationReceiverStrategy=J.IdCancellationReceiverStrategy=J.CancellationReceiverStrategy=J.ConnectionError=J.ConnectionErrors=J.LogTraceNotification=J.SetTraceNotification=J.TraceFormat=J.TraceValues=J.TraceValue=J.Trace=void 0;var Ht=OS();Object.defineProperty(J,"Message",{enumerable:!0,get:function(){return Ht.Message}});Object.defineProperty(J,"RequestType",{enumerable:!0,get:function(){return Ht.RequestType}});Object.defineProperty(J,"RequestType0",{enumerable:!0,get:function(){return Ht.RequestType0}});Object.defineProperty(J,"RequestType1",{enumerable:!0,get:function(){return Ht.RequestType1}});Object.defineProperty(J,"RequestType2",{enumerable:!0,get:function(){return Ht.RequestType2}});Object.defineProperty(J,"RequestType3",{enumerable:!0,get:function(){return Ht.RequestType3}});Object.defineProperty(J,"RequestType4",{enumerable:!0,get:function(){return Ht.RequestType4}});Object.defineProperty(J,"RequestType5",{enumerable:!0,get:function(){return Ht.RequestType5}});Object.defineProperty(J,"RequestType6",{enumerable:!0,get:function(){return Ht.RequestType6}});Object.defineProperty(J,"RequestType7",{enumerable:!0,get:function(){return Ht.RequestType7}});Object.defineProperty(J,"RequestType8",{enumerable:!0,get:function(){return Ht.RequestType8}});Object.defineProperty(J,"RequestType9",{enumerable:!0,get:function(){return Ht.RequestType9}});Object.defineProperty(J,"ResponseError",{enumerable:!0,get:function(){return Ht.ResponseError}});Object.defineProperty(J,"ErrorCodes",{enumerable:!0,get:function(){return Ht.ErrorCodes}});Object.defineProperty(J,"NotificationType",{enumerable:!0,get:function(){return Ht.NotificationType}});Object.defineProperty(J,"NotificationType0",{enumerable:!0,get:function(){return Ht.NotificationType0}});Object.defineProperty(J,"NotificationType1",{enumerable:!0,get:function(){return Ht.NotificationType1}});Object.defineProperty(J,"NotificationType2",{enumerable:!0,get:function(){return Ht.NotificationType2}});Object.defineProperty(J,"NotificationType3",{enumerable:!0,get:function(){return Ht.NotificationType3}});Object.defineProperty(J,"NotificationType4",{enumerable:!0,get:function(){return Ht.NotificationType4}});Object.defineProperty(J,"NotificationType5",{enumerable:!0,get:function(){return Ht.NotificationType5}});Object.defineProperty(J,"NotificationType6",{enumerable:!0,get:function(){return Ht.NotificationType6}});Object.defineProperty(J,"NotificationType7",{enumerable:!0,get:function(){return Ht.NotificationType7}});Object.defineProperty(J,"NotificationType8",{enumerable:!0,get:function(){return Ht.NotificationType8}});Object.defineProperty(J,"NotificationType9",{enumerable:!0,get:function(){return Ht.NotificationType9}});Object.defineProperty(J,"ParameterStructures",{enumerable:!0,get:function(){return Ht.ParameterStructures}});var aD=IS();Object.defineProperty(J,"LinkedMap",{enumerable:!0,get:function(){return aD.LinkedMap}});Object.defineProperty(J,"LRUCache",{enumerable:!0,get:function(){return aD.LRUCache}});Object.defineProperty(J,"Touch",{enumerable:!0,get:function(){return aD.Touch}});var JY=rO();Object.defineProperty(J,"Disposable",{enumerable:!0,get:function(){return JY.Disposable}});var vO=Rl();Object.defineProperty(J,"Event",{enumerable:!0,get:function(){return vO.Event}});Object.defineProperty(J,"Emitter",{enumerable:!0,get:function(){return vO.Emitter}});var yO=_g();Object.defineProperty(J,"CancellationTokenSource",{enumerable:!0,get:function(){return yO.CancellationTokenSource}});Object.defineProperty(J,"CancellationToken",{enumerable:!0,get:function(){return yO.CancellationToken}});var SO=oO();Object.defineProperty(J,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return SO.SharedArraySenderStrategy}});Object.defineProperty(J,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return SO.SharedArrayReceiverStrategy}});var cD=aO();Object.defineProperty(J,"MessageReader",{enumerable:!0,get:function(){return cD.MessageReader}});Object.defineProperty(J,"AbstractMessageReader",{enumerable:!0,get:function(){return cD.AbstractMessageReader}});Object.defineProperty(J,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return cD.ReadableStreamMessageReader}});var uD=dO();Object.defineProperty(J,"MessageWriter",{enumerable:!0,get:function(){return uD.MessageWriter}});Object.defineProperty(J,"AbstractMessageWriter",{enumerable:!0,get:function(){return uD.AbstractMessageWriter}});Object.defineProperty(J,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return uD.WriteableStreamMessageWriter}});var QY=pO();Object.defineProperty(J,"AbstractMessageBuffer",{enumerable:!0,get:function(){return QY.AbstractMessageBuffer}});var An=mO();Object.defineProperty(J,"ConnectionStrategy",{enumerable:!0,get:function(){return An.ConnectionStrategy}});Object.defineProperty(J,"ConnectionOptions",{enumerable:!0,get:function(){return An.ConnectionOptions}});Object.defineProperty(J,"NullLogger",{enumerable:!0,get:function(){return An.NullLogger}});Object.defineProperty(J,"createMessageConnection",{enumerable:!0,get:function(){return An.createMessageConnection}});Object.defineProperty(J,"ProgressToken",{enumerable:!0,get:function(){return An.ProgressToken}});Object.defineProperty(J,"ProgressType",{enumerable:!0,get:function(){return An.ProgressType}});Object.defineProperty(J,"Trace",{enumerable:!0,get:function(){return An.Trace}});Object.defineProperty(J,"TraceValue",{enumerable:!0,get:function(){return An.TraceValue}});Object.defineProperty(J,"TraceFormat",{enumerable:!0,get:function(){return An.TraceFormat}});Object.defineProperty(J,"SetTraceNotification",{enumerable:!0,get:function(){return An.SetTraceNotification}});Object.defineProperty(J,"LogTraceNotification",{enumerable:!0,get:function(){return An.LogTraceNotification}});Object.defineProperty(J,"ConnectionErrors",{enumerable:!0,get:function(){return An.ConnectionErrors}});Object.defineProperty(J,"ConnectionError",{enumerable:!0,get:function(){return An.ConnectionError}});Object.defineProperty(J,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return An.CancellationReceiverStrategy}});Object.defineProperty(J,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return An.IdCancellationReceiverStrategy}});Object.defineProperty(J,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return An.RequestCancellationReceiverStrategy}});Object.defineProperty(J,"CancellationSenderStrategy",{enumerable:!0,get:function(){return An.CancellationSenderStrategy}});Object.defineProperty(J,"CancellationStrategy",{enumerable:!0,get:function(){return An.CancellationStrategy}});Object.defineProperty(J,"MessageStrategy",{enumerable:!0,get:function(){return An.MessageStrategy}});Object.defineProperty(J,"TraceValues",{enumerable:!0,get:function(){return An.TraceValues}});var ZY=XY(Fa());J.RAL=ZY.default});var Fg={};Zc(Fg,{AnnotatedTextEdit:()=>Os,ApplyKind:()=>xD,ChangeAnnotation:()=>qa,ChangeAnnotationIdentifier:()=>rr,CodeAction:()=>zD,CodeActionContext:()=>WD,CodeActionKind:()=>GD,CodeActionTag:()=>Ig,CodeActionTriggerKind:()=>Gd,CodeDescription:()=>yD,CodeLens:()=>KD,Color:()=>Ng,ColorInformation:()=>pD,ColorPresentation:()=>hD,Command:()=>tu,CompletionItem:()=>AD,CompletionItemKind:()=>wD,CompletionItemLabelDetails:()=>ID,CompletionItemTag:()=>PD,CompletionList:()=>MD,CreateFile:()=>Ll,DeleteFile:()=>jl,Diagnostic:()=>kd,DiagnosticRelatedInformation:()=>Pg,DiagnosticSeverity:()=>mD,DiagnosticTag:()=>vD,DocumentHighlight:()=>UD,DocumentHighlightKind:()=>qD,DocumentLink:()=>XD,DocumentSymbol:()=>BD,DocumentUri:()=>lD,EOL:()=>ek,FoldingRange:()=>_D,FoldingRangeKind:()=>gD,FormattingOptions:()=>VD,Hover:()=>LD,InlayHint:()=>oE,InlayHintKind:()=>Ag,InlayHintLabelPart:()=>Mg,InlineCompletionContext:()=>lE,InlineCompletionItem:()=>sE,InlineCompletionList:()=>aE,InlineCompletionTriggerKind:()=>cE,InlineValueContext:()=>iE,InlineValueEvaluatableExpression:()=>rE,InlineValueText:()=>tE,InlineValueVariableLookup:()=>nE,InsertReplaceEdit:()=>RD,InsertTextFormat:()=>ND,InsertTextMode:()=>OD,LanguageKind:()=>CD,Location:()=>Yd,LocationLink:()=>dD,MarkedString:()=>Bd,MarkupContent:()=>nu,MarkupKind:()=>xg,OptionalVersionedTextDocumentIdentifier:()=>$d,ParameterInformation:()=>FD,Position:()=>Oi,Range:()=>an,RenameFile:()=>Fl,SelectedCompletionInfo:()=>uE,SelectionRange:()=>JD,SemanticTokenModifiers:()=>ZD,SemanticTokenTypes:()=>QD,SemanticTokens:()=>eE,SignatureInformation:()=>jD,SnippetTextEdit:()=>SD,StringValue:()=>Lg,SymbolInformation:()=>HD,SymbolKind:()=>YD,SymbolTag:()=>kD,TextDocument:()=>dE,TextDocumentEdit:()=>Hd,TextDocumentIdentifier:()=>ED,TextDocumentItem:()=>TD,TextEdit:()=>Co,URI:()=>wg,VersionedTextDocumentIdentifier:()=>bD,WorkspaceChange:()=>DD,WorkspaceEdit:()=>Rg,WorkspaceFolder:()=>fE,WorkspaceSymbol:()=>$D,integer:()=>fD,uinteger:()=>Ud});var lD,wg,fD,Ud,Oi,an,Yd,dD,Ng,pD,hD,gD,_D,Pg,mD,vD,yD,kd,tu,Co,qa,rr,Os,Hd,Ll,Fl,jl,Rg,Ml,SD,Og,DD,ED,bD,$d,CD,TD,xg,nu,wD,ND,PD,RD,OD,xD,ID,AD,MD,Bd,LD,FD,jD,qD,UD,YD,kD,HD,$D,BD,GD,Gd,WD,Ig,zD,KD,VD,XD,JD,QD,ZD,eE,tE,nE,rE,iE,Ag,Mg,oE,Lg,sE,aE,cE,uE,lE,fE,ek,dE,pE,H,jg=ce(()=>{"use strict";(function(t){function e(n){return typeof n=="string"}t.is=e})(lD||(lD={}));(function(t){function e(n){return typeof n=="string"}t.is=e})(wg||(wg={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(fD||(fD={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(Ud||(Ud={}));(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=Ud.MAX_VALUE),i===Number.MAX_VALUE&&(i=Ud.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&H.uinteger(i.line)&&H.uinteger(i.character)}t.is=n})(Oi||(Oi={}));(function(t){function e(r,i,o,s){if(H.uinteger(r)&&H.uinteger(i)&&H.uinteger(o)&&H.uinteger(s))return{start:Oi.create(r,i),end:Oi.create(o,s)};if(Oi.is(r)&&Oi.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&Oi.is(i.start)&&Oi.is(i.end)}t.is=n})(an||(an={}));(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&an.is(i.range)&&(H.string(i.uri)||H.undefined(i.uri))}t.is=n})(Yd||(Yd={}));(function(t){function e(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&an.is(i.targetRange)&&H.string(i.targetUri)&&an.is(i.targetSelectionRange)&&(an.is(i.originSelectionRange)||H.undefined(i.originSelectionRange))}t.is=n})(dD||(dD={}));(function(t){function e(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&H.numberRange(i.red,0,1)&&H.numberRange(i.green,0,1)&&H.numberRange(i.blue,0,1)&&H.numberRange(i.alpha,0,1)}t.is=n})(Ng||(Ng={}));(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&an.is(i.range)&&Ng.is(i.color)}t.is=n})(pD||(pD={}));(function(t){function e(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&H.string(i.label)&&(H.undefined(i.textEdit)||Co.is(i))&&(H.undefined(i.additionalTextEdits)||H.typedArray(i.additionalTextEdits,Co.is))}t.is=n})(hD||(hD={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(gD||(gD={}));(function(t){function e(r,i,o,s,a,c){let u={startLine:r,endLine:i};return H.defined(o)&&(u.startCharacter=o),H.defined(s)&&(u.endCharacter=s),H.defined(a)&&(u.kind=a),H.defined(c)&&(u.collapsedText=c),u}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&H.uinteger(i.startLine)&&H.uinteger(i.startLine)&&(H.undefined(i.startCharacter)||H.uinteger(i.startCharacter))&&(H.undefined(i.endCharacter)||H.uinteger(i.endCharacter))&&(H.undefined(i.kind)||H.string(i.kind))}t.is=n})(_D||(_D={}));(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return H.defined(i)&&Yd.is(i.location)&&H.string(i.message)}t.is=n})(Pg||(Pg={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(mD||(mD={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(vD||(vD={}));(function(t){function e(n){let r=n;return H.objectLiteral(r)&&H.string(r.href)}t.is=e})(yD||(yD={}));(function(t){function e(r,i,o,s,a,c){let u={range:r,message:i};return H.defined(o)&&(u.severity=o),H.defined(s)&&(u.code=s),H.defined(a)&&(u.source=a),H.defined(c)&&(u.relatedInformation=c),u}t.create=e;function n(r){var i;let o=r;return H.defined(o)&&an.is(o.range)&&(H.string(o.message)||nu.is(o.message))&&(H.number(o.severity)||H.undefined(o.severity))&&(H.integer(o.code)||H.string(o.code)||H.undefined(o.code))&&(H.undefined(o.codeDescription)||H.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(H.string(o.source)||H.undefined(o.source))&&(H.undefined(o.relatedInformation)||H.typedArray(o.relatedInformation,Pg.is))}t.is=n})(kd||(kd={}));(function(t){function e(r,i,...o){let s={title:r,command:i};return H.defined(o)&&o.length>0&&(s.arguments=o),s}t.create=e;function n(r){let i=r;return H.defined(i)&&H.string(i.title)&&(i.tooltip===void 0||H.string(i.tooltip))&&H.string(i.command)}t.is=n})(tu||(tu={}));(function(t){function e(o,s){return{range:o,newText:s}}t.replace=e;function n(o,s){return{range:{start:o,end:o},newText:s}}t.insert=n;function r(o){return{range:o,newText:""}}t.del=r;function i(o){let s=o;return H.objectLiteral(s)&&H.string(s.newText)&&an.is(s.range)}t.is=i})(Co||(Co={}));(function(t){function e(r,i,o){let s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&H.string(i.label)&&(H.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(H.string(i.description)||i.description===void 0)}t.is=n})(qa||(qa={}));(function(t){function e(n){let r=n;return H.string(r)}t.is=e})(rr||(rr={}));(function(t){function e(o,s,a){return{range:o,newText:s,annotationId:a}}t.replace=e;function n(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}t.insert=n;function r(o,s){return{range:o,newText:"",annotationId:s}}t.del=r;function i(o){let s=o;return Co.is(s)&&(qa.is(s.annotationId)||rr.is(s.annotationId))}t.is=i})(Os||(Os={}));(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return H.defined(i)&&$d.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(Hd||(Hd={}));(function(t){function e(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&H.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||H.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||H.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||rr.is(i.annotationId))}t.is=n})(Ll||(Ll={}));(function(t){function e(r,i,o,s){let a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&H.string(i.oldUri)&&H.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||H.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||H.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||rr.is(i.annotationId))}t.is=n})(Fl||(Fl={}));(function(t){function e(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&H.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||H.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||H.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||rr.is(i.annotationId))}t.is=n})(jl||(jl={}));(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>H.string(i.kind)?Ll.is(i)||Fl.is(i)||jl.is(i):Hd.is(i)))}t.is=e})(Rg||(Rg={}));Ml=class{constructor(e,n){this.edits=e,this.changeAnnotations=n}insert(e,n,r){let i,o;if(r===void 0?i=Co.insert(e,n):rr.is(r)?(o=r,i=Os.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Os.insert(e,n,o)),this.edits.push(i),o!==void 0)return o}replace(e,n,r){let i,o;if(r===void 0?i=Co.replace(e,n):rr.is(r)?(o=r,i=Os.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Os.replace(e,n,o)),this.edits.push(i),o!==void 0)return o}delete(e,n){let r,i;if(n===void 0?r=Co.del(e):rr.is(n)?(i=n,r=Os.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Os.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(t){function e(n){let r=n;return H.objectLiteral(r)&&an.is(r.range)&&Lg.isSnippet(r.snippet)&&(r.annotationId===void 0||qa.is(r.annotationId)||rr.is(r.annotationId))}t.is=e})(SD||(SD={}));Og=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,n){let r;if(rr.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},DD=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Og(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(n=>{if(Hd.is(n)){let r=new Ml(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(n=>{let r=new Ml(e.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if($d.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:e.uri,version:e.version},r=this._textEditChanges[n.uri];if(!r){let i=[],o={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(o),r=new Ml(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[e];if(!n){let r=[];this._workspaceEdit.changes[e]=r,n=new Ml(r),this._textEditChanges[e]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Og,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;qa.is(n)||rr.is(n)?i=n:r=n;let o,s;if(i===void 0?o=Ll.create(e,r):(s=rr.is(i)?i:this._changeAnnotations.manage(i),o=Ll.create(e,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}renameFile(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;qa.is(r)||rr.is(r)?o=r:i=r;let s,a;if(o===void 0?s=Fl.create(e,n,i):(a=rr.is(o)?o:this._changeAnnotations.manage(o),s=Fl.create(e,n,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;qa.is(n)||rr.is(n)?i=n:r=n;let o,s;if(i===void 0?o=jl.create(e,r):(s=rr.is(i)?i:this._changeAnnotations.manage(i),o=jl.create(e,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}};(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return H.defined(i)&&H.string(i.uri)}t.is=n})(ED||(ED={}));(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return H.defined(i)&&H.string(i.uri)&&H.integer(i.version)}t.is=n})(bD||(bD={}));(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return H.defined(i)&&H.string(i.uri)&&(i.version===null||H.integer(i.version))}t.is=n})($d||($d={}));(function(t){t.ABAP="abap",t.WindowsBat="bat",t.BibTeX="bibtex",t.Clojure="clojure",t.Coffeescript="coffeescript",t.C="c",t.CPP="cpp",t.CSharp="csharp",t.CSS="css",t.D="d",t.Delphi="pascal",t.Diff="diff",t.Dart="dart",t.Dockerfile="dockerfile",t.Elixir="elixir",t.Erlang="erlang",t.FSharp="fsharp",t.GitCommit="git-commit",t.GitRebase="git-rebase",t.Go="go",t.Groovy="groovy",t.Handlebars="handlebars",t.Haskell="haskell",t.HTML="html",t.Ini="ini",t.Java="java",t.JavaScript="javascript",t.JavaScriptReact="javascriptreact",t.JSON="json",t.LaTeX="latex",t.Less="less",t.Lua="lua",t.Makefile="makefile",t.Markdown="markdown",t.ObjectiveC="objective-c",t.ObjectiveCPP="objective-cpp",t.Pascal="pascal",t.Perl="perl",t.Perl6="perl6",t.PHP="php",t.Plaintext="plaintext",t.Powershell="powershell",t.Pug="jade",t.Python="python",t.R="r",t.Razor="razor",t.Ruby="ruby",t.Rust="rust",t.SCSS="scss",t.SASS="sass",t.Scala="scala",t.ShaderLab="shaderlab",t.ShellScript="shellscript",t.SQL="sql",t.Swift="swift",t.TypeScript="typescript",t.TypeScriptReact="typescriptreact",t.TeX="tex",t.VisualBasic="vb",t.XML="xml",t.XSL="xsl",t.YAML="yaml"})(CD||(CD={}));(function(t){function e(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}t.create=e;function n(r){let i=r;return H.defined(i)&&H.string(i.uri)&&H.string(i.languageId)&&H.integer(i.version)&&H.string(i.text)}t.is=n})(TD||(TD={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){let r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(xg||(xg={}));(function(t){function e(n){let r=n;return H.objectLiteral(n)&&xg.is(r.kind)&&H.string(r.value)}t.is=e})(nu||(nu={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(wD||(wD={}));(function(t){t.PlainText=1,t.Snippet=2})(ND||(ND={}));(function(t){t.Deprecated=1})(PD||(PD={}));(function(t){function e(r,i,o){return{newText:r,insert:i,replace:o}}t.create=e;function n(r){let i=r;return i&&H.string(i.newText)&&an.is(i.insert)&&an.is(i.replace)}t.is=n})(RD||(RD={}));(function(t){t.asIs=1,t.adjustIndentation=2})(OD||(OD={}));(function(t){t.Replace=1,t.Merge=2})(xD||(xD={}));(function(t){function e(n){let r=n;return r&&(H.string(r.detail)||r.detail===void 0)&&(H.string(r.description)||r.description===void 0)}t.is=e})(ID||(ID={}));(function(t){function e(n){return{label:n}}t.create=e})(AD||(AD={}));(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(MD||(MD={}));(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){let i=r;return H.string(i)||H.objectLiteral(i)&&H.string(i.language)&&H.string(i.value)}t.is=n})(Bd||(Bd={}));(function(t){function e(n){let r=n;return!!r&&H.objectLiteral(r)&&(nu.is(r.contents)||Bd.is(r.contents)||H.typedArray(r.contents,Bd.is))&&(n.range===void 0||an.is(n.range))}t.is=e})(LD||(LD={}));(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(FD||(FD={}));(function(t){function e(n,r,...i){let o={label:n};return H.defined(r)&&(o.documentation=r),H.defined(i)?o.parameters=i:o.parameters=[],o}t.create=e})(jD||(jD={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(qD||(qD={}));(function(t){function e(n,r){let i={range:n};return H.number(r)&&(i.kind=r),i}t.create=e})(UD||(UD={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(YD||(YD={}));(function(t){t.Deprecated=1})(kD||(kD={}));(function(t){function e(n,r,i,o,s){let a={name:n,kind:r,location:{uri:o,range:i}};return s&&(a.containerName=s),a}t.create=e})(HD||(HD={}));(function(t){function e(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}t.create=e})($D||($D={}));(function(t){function e(r,i,o,s,a,c){let u={name:r,detail:i,kind:o,range:s,selectionRange:a};return c!==void 0&&(u.children=c),u}t.create=e;function n(r){let i=r;return i&&H.string(i.name)&&H.number(i.kind)&&an.is(i.range)&&an.is(i.selectionRange)&&(i.detail===void 0||H.string(i.detail))&&(i.deprecated===void 0||H.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(BD||(BD={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorMove="refactor.move",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll",t.Notebook="notebook"})(GD||(GD={}));(function(t){t.Invoked=1,t.Automatic=2})(Gd||(Gd={}));(function(t){function e(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}t.create=e;function n(r){let i=r;return H.defined(i)&&H.typedArray(i.diagnostics,kd.is)&&(i.only===void 0||H.typedArray(i.only,H.string))&&(i.triggerKind===void 0||i.triggerKind===Gd.Invoked||i.triggerKind===Gd.Automatic)}t.is=n})(WD||(WD={}));(function(t){t.LLMGenerated=1;function e(n){return H.defined(n)&&n===t.LLMGenerated}t.is=e})(Ig||(Ig={}));(function(t){function e(r,i,o){let s={title:r},a=!0;return typeof i=="string"?(a=!1,s.kind=i):tu.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}t.create=e;function n(r){let i=r;return i&&H.string(i.title)&&(i.diagnostics===void 0||H.typedArray(i.diagnostics,kd.is))&&(i.kind===void 0||H.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||tu.is(i.command))&&(i.isPreferred===void 0||H.boolean(i.isPreferred))&&(i.edit===void 0||Rg.is(i.edit))&&(i.tags===void 0||H.typedArray(i.tags,Ig.is))}t.is=n})(zD||(zD={}));(function(t){function e(r,i){let o={range:r};return H.defined(i)&&(o.data=i),o}t.create=e;function n(r){let i=r;return H.defined(i)&&an.is(i.range)&&(H.undefined(i.command)||tu.is(i.command))}t.is=n})(KD||(KD={}));(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return H.defined(i)&&H.uinteger(i.tabSize)&&H.boolean(i.insertSpaces)}t.is=n})(VD||(VD={}));(function(t){function e(r,i,o){return{range:r,target:i,data:o}}t.create=e;function n(r){let i=r;return H.defined(i)&&an.is(i.range)&&(H.undefined(i.target)||H.string(i.target))}t.is=n})(XD||(XD={}));(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&an.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(JD||(JD={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator",t.label="label"})(QD||(QD={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(ZD||(ZD={}));(function(t){function e(n){let r=n;return H.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(eE||(eE={}));(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){let i=r;return i!=null&&an.is(i.range)&&H.string(i.text)}t.is=n})(tE||(tE={}));(function(t){function e(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}t.create=e;function n(r){let i=r;return i!=null&&an.is(i.range)&&H.boolean(i.caseSensitiveLookup)&&(H.string(i.variableName)||i.variableName===void 0)}t.is=n})(nE||(nE={}));(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){let i=r;return i!=null&&an.is(i.range)&&(H.string(i.expression)||i.expression===void 0)}t.is=n})(rE||(rE={}));(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){let i=r;return H.defined(i)&&an.is(r.stoppedLocation)}t.is=n})(iE||(iE={}));(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(Ag||(Ag={}));(function(t){function e(r){return{value:r}}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&(i.tooltip===void 0||H.string(i.tooltip)||nu.is(i.tooltip))&&(i.location===void 0||Yd.is(i.location))&&(i.command===void 0||tu.is(i.command))}t.is=n})(Mg||(Mg={}));(function(t){function e(r,i,o){let s={position:r,label:i};return o!==void 0&&(s.kind=o),s}t.create=e;function n(r){let i=r;return H.objectLiteral(i)&&Oi.is(i.position)&&(H.string(i.label)||H.typedArray(i.label,Mg.is))&&(i.kind===void 0||Ag.is(i.kind))&&i.textEdits===void 0||H.typedArray(i.textEdits,Co.is)&&(i.tooltip===void 0||H.string(i.tooltip)||nu.is(i.tooltip))&&(i.paddingLeft===void 0||H.boolean(i.paddingLeft))&&(i.paddingRight===void 0||H.boolean(i.paddingRight))}t.is=n})(oE||(oE={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e;function n(r){let i=r;return H.objectLiteral(i)&&i.kind==="snippet"&&H.string(i.value)}t.isSnippet=n})(Lg||(Lg={}));(function(t){function e(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}t.create=e})(sE||(sE={}));(function(t){function e(n){return{items:n}}t.create=e})(aE||(aE={}));(function(t){t.Invoked=1,t.Automatic=2})(cE||(cE={}));(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(uE||(uE={}));(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(lE||(lE={}));(function(t){function e(n){let r=n;return H.objectLiteral(r)&&wg.is(r.uri)&&H.string(r.name)}t.is=e})(fE||(fE={}));ek=[`
`,`\r
`,"\r"];(function(t){function e(o,s,a,c){return new pE(o,s,a,c)}t.create=e;function n(o){let s=o;return!!(H.defined(s)&&H.string(s.uri)&&(H.undefined(s.languageId)||H.string(s.languageId))&&H.uinteger(s.lineCount)&&H.func(s.getText)&&H.func(s.positionAt)&&H.func(s.offsetAt))}t.is=n;function r(o,s){let a=o.getText(),c=i(s,(l,d)=>{let f=l.range.start.line-d.range.start.line;return f===0?l.range.start.character-d.range.start.character:f}),u=a.length;for(let l=c.length-1;l>=0;l--){let d=c[l],f=o.offsetAt(d.range.start),g=o.offsetAt(d.range.end);if(g<=u)a=a.substring(0,f)+d.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");u=f}return a}t.applyEdits=r;function i(o,s){if(o.length<=1)return o;let a=o.length/2|0,c=o.slice(0,a),u=o.slice(a);i(c,s),i(u,s);let l=0,d=0,f=0;for(;l<c.length&&d<u.length;)s(c[l],u[d])<=0?o[f++]=c[l++]:o[f++]=u[d++];for(;l<c.length;)o[f++]=c[l++];for(;d<u.length;)o[f++]=u[d++];return o}})(dE||(dE={}));pE=class{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){this._content=e.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(e.push(i),r=!1);let o=n.charAt(i);r=o==="\r"||o===`
`,o==="\r"&&i+1<n.length&&n.charAt(i+1)===`
`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Oi.create(0,e);for(;r<i;){let s=Math.floor((r+i)/2);n[s]>e?i=s:r=s+1}let o=r-1;return Oi.create(o,e-n[o])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function n(g){return typeof g<"u"}t.defined=n;function r(g){return typeof g>"u"}t.undefined=r;function i(g){return g===!0||g===!1}t.boolean=i;function o(g){return e.call(g)==="[object String]"}t.string=o;function s(g){return e.call(g)==="[object Number]"}t.number=s;function a(g,h,_){return e.call(g)==="[object Number]"&&h<=g&&g<=_}t.numberRange=a;function c(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}t.integer=c;function u(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}t.uinteger=u;function l(g){return e.call(g)==="[object Function]"}t.func=l;function d(g){return g!==null&&typeof g=="object"}t.objectLiteral=d;function f(g,h){return Array.isArray(g)&&g.every(h)}t.typedArray=f})(H||(H={}))});var Gt=V(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.CM=Rr.ProtocolNotificationType=Rr.ProtocolNotificationType0=Rr.ProtocolRequestType=Rr.ProtocolRequestType0=Rr.RegistrationType=Rr.MessageDirection=void 0;var ql=Rs(),DO;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(DO||(Rr.MessageDirection=DO={}));var hE=class{____;method;constructor(e){this.method=e}};Rr.RegistrationType=hE;var gE=class extends ql.RequestType0{__;___;____;_pr;constructor(e){super(e)}};Rr.ProtocolRequestType0=gE;var _E=class extends ql.RequestType{__;___;____;_pr;constructor(e){super(e,ql.ParameterStructures.byName)}};Rr.ProtocolRequestType=_E;var mE=class extends ql.NotificationType0{___;____;constructor(e){super(e)}};Rr.ProtocolNotificationType0=mE;var vE=class extends ql.NotificationType{___;____;constructor(e){super(e,ql.ParameterStructures.byName)}};Rr.ProtocolNotificationType=vE;var EO;(function(t){function e(n,r){return{client:n,server:r}}t.create=e})(EO||(Rr.CM=EO={}))});var qg=V(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.boolean=tk;Ji.string=bO;Ji.number=nk;Ji.error=rk;Ji.func=ik;Ji.array=CO;Ji.stringArray=ok;Ji.typedArray=sk;Ji.objectLiteral=ak;function tk(t){return t===!0||t===!1}function bO(t){return typeof t=="string"||t instanceof String}function nk(t){return typeof t=="number"||t instanceof Number}function rk(t){return t instanceof Error}function ik(t){return typeof t=="function"}function CO(t){return Array.isArray(t)}function ok(t){return CO(t)&&t.every(e=>bO(e))}function sk(t,e){return Array.isArray(t)&&t.every(e)}function ak(t){return t!==null&&typeof t=="object"}});var wO=V(Ug=>{"use strict";Object.defineProperty(Ug,"__esModule",{value:!0});Ug.ImplementationRequest=void 0;var yE=Gt(),TO;(function(t){t.method="textDocument/implementation",t.messageDirection=yE.MessageDirection.clientToServer,t.type=new yE.ProtocolRequestType(t.method),t.capabilities=yE.CM.create("textDocument.implementation","implementationProvider")})(TO||(Ug.ImplementationRequest=TO={}))});var PO=V(Yg=>{"use strict";Object.defineProperty(Yg,"__esModule",{value:!0});Yg.TypeDefinitionRequest=void 0;var SE=Gt(),NO;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=SE.MessageDirection.clientToServer,t.type=new SE.ProtocolRequestType(t.method),t.capabilities=SE.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(NO||(Yg.TypeDefinitionRequest=NO={}))});var xO=V(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.DidChangeWorkspaceFoldersNotification=Yl.WorkspaceFoldersRequest=void 0;var Ul=Gt(),RO;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=Ul.MessageDirection.serverToClient,t.type=new Ul.ProtocolRequestType0(t.method),t.capabilities=Ul.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(RO||(Yl.WorkspaceFoldersRequest=RO={}));var OO;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=Ul.MessageDirection.clientToServer,t.type=new Ul.ProtocolNotificationType(t.method),t.capabilities=Ul.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(OO||(Yl.DidChangeWorkspaceFoldersNotification=OO={}))});var AO=V(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:!0});kg.ConfigurationRequest=void 0;var DE=Gt(),IO;(function(t){t.method="workspace/configuration",t.messageDirection=DE.MessageDirection.serverToClient,t.type=new DE.ProtocolRequestType(t.method),t.capabilities=DE.CM.create("workspace.configuration",void 0)})(IO||(kg.ConfigurationRequest=IO={}))});var FO=V(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.ColorPresentationRequest=Hl.DocumentColorRequest=void 0;var kl=Gt(),MO;(function(t){t.method="textDocument/documentColor",t.messageDirection=kl.MessageDirection.clientToServer,t.type=new kl.ProtocolRequestType(t.method),t.capabilities=kl.CM.create("textDocument.colorProvider","colorProvider")})(MO||(Hl.DocumentColorRequest=MO={}));var LO;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=kl.MessageDirection.clientToServer,t.type=new kl.ProtocolRequestType(t.method),t.capabilities=kl.CM.create("textDocument.colorProvider","colorProvider")})(LO||(Hl.ColorPresentationRequest=LO={}))});var UO=V(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.FoldingRangeRefreshRequest=Bl.FoldingRangeRequest=void 0;var $l=Gt(),jO;(function(t){t.method="textDocument/foldingRange",t.messageDirection=$l.MessageDirection.clientToServer,t.type=new $l.ProtocolRequestType(t.method),t.capabilities=$l.CM.create("textDocument.foldingRange","foldingRangeProvider")})(jO||(Bl.FoldingRangeRequest=jO={}));var qO;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=$l.MessageDirection.serverToClient,t.type=new $l.ProtocolRequestType0(t.method),t.capabilities=$l.CM.create("workspace.foldingRange.refreshSupport",void 0)})(qO||(Bl.FoldingRangeRefreshRequest=qO={}))});var kO=V(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.DeclarationRequest=void 0;var EE=Gt(),YO;(function(t){t.method="textDocument/declaration",t.messageDirection=EE.MessageDirection.clientToServer,t.type=new EE.ProtocolRequestType(t.method),t.capabilities=EE.CM.create("textDocument.declaration","declarationProvider")})(YO||(Hg.DeclarationRequest=YO={}))});var $O=V($g=>{"use strict";Object.defineProperty($g,"__esModule",{value:!0});$g.SelectionRangeRequest=void 0;var bE=Gt(),HO;(function(t){t.method="textDocument/selectionRange",t.messageDirection=bE.MessageDirection.clientToServer,t.type=new bE.ProtocolRequestType(t.method),t.capabilities=bE.CM.create("textDocument.selectionRange","selectionRangeProvider")})(HO||($g.SelectionRangeRequest=HO={}))});var zO=V(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.WorkDoneProgressCancelNotification=Ua.WorkDoneProgressCreateRequest=Ua.WorkDoneProgress=void 0;var ck=Rs(),Wd=Gt(),BO;(function(t){t.type=new ck.ProgressType;function e(n){return n===t.type}t.is=e})(BO||(Ua.WorkDoneProgress=BO={}));var GO;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=Wd.MessageDirection.serverToClient,t.type=new Wd.ProtocolRequestType(t.method),t.capabilities=Wd.CM.create("window.workDoneProgress",void 0)})(GO||(Ua.WorkDoneProgressCreateRequest=GO={}));var WO;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=Wd.MessageDirection.clientToServer,t.type=new Wd.ProtocolNotificationType(t.method)})(WO||(Ua.WorkDoneProgressCancelNotification=WO={}))});var JO=V(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.CallHierarchyOutgoingCallsRequest=Ya.CallHierarchyIncomingCallsRequest=Ya.CallHierarchyPrepareRequest=void 0;var xs=Gt(),KO;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=xs.MessageDirection.clientToServer,t.type=new xs.ProtocolRequestType(t.method),t.capabilities=xs.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(KO||(Ya.CallHierarchyPrepareRequest=KO={}));var VO;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=xs.MessageDirection.clientToServer,t.type=new xs.ProtocolRequestType(t.method),t.capabilities=xs.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(VO||(Ya.CallHierarchyIncomingCallsRequest=VO={}));var XO;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=xs.MessageDirection.clientToServer,t.type=new xs.ProtocolRequestType(t.method),t.capabilities=xs.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(XO||(Ya.CallHierarchyOutgoingCallsRequest=XO={}))});var r0=V(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.SemanticTokensRefreshRequest=Wr.SemanticTokensRangeRequest=Wr.SemanticTokensDeltaRequest=Wr.SemanticTokensRequest=Wr.SemanticTokensRegistrationType=Wr.TokenFormat=void 0;var pi=Gt(),QO;(function(t){t.Relative="relative"})(QO||(Wr.TokenFormat=QO={}));var zd;(function(t){t.method="textDocument/semanticTokens",t.type=new pi.RegistrationType(t.method)})(zd||(Wr.SemanticTokensRegistrationType=zd={}));var ZO;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=pi.MessageDirection.clientToServer,t.type=new pi.ProtocolRequestType(t.method),t.registrationMethod=zd.method,t.capabilities=pi.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(ZO||(Wr.SemanticTokensRequest=ZO={}));var e0;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=pi.MessageDirection.clientToServer,t.type=new pi.ProtocolRequestType(t.method),t.registrationMethod=zd.method,t.capabilities=pi.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(e0||(Wr.SemanticTokensDeltaRequest=e0={}));var t0;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=pi.MessageDirection.clientToServer,t.type=new pi.ProtocolRequestType(t.method),t.registrationMethod=zd.method,t.capabilities=pi.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(t0||(Wr.SemanticTokensRangeRequest=t0={}));var n0;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=pi.MessageDirection.serverToClient,t.type=new pi.ProtocolRequestType0(t.method),t.capabilities=pi.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(n0||(Wr.SemanticTokensRefreshRequest=n0={}))});var o0=V(Bg=>{"use strict";Object.defineProperty(Bg,"__esModule",{value:!0});Bg.ShowDocumentRequest=void 0;var CE=Gt(),i0;(function(t){t.method="window/showDocument",t.messageDirection=CE.MessageDirection.serverToClient,t.type=new CE.ProtocolRequestType(t.method),t.capabilities=CE.CM.create("window.showDocument.support",void 0)})(i0||(Bg.ShowDocumentRequest=i0={}))});var a0=V(Gg=>{"use strict";Object.defineProperty(Gg,"__esModule",{value:!0});Gg.LinkedEditingRangeRequest=void 0;var TE=Gt(),s0;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=TE.MessageDirection.clientToServer,t.type=new TE.ProtocolRequestType(t.method),t.capabilities=TE.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(s0||(Gg.LinkedEditingRangeRequest=s0={}))});var g0=V(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.WillDeleteFilesRequest=Or.DidDeleteFilesNotification=Or.DidRenameFilesNotification=Or.WillRenameFilesRequest=Or.DidCreateFilesNotification=Or.WillCreateFilesRequest=Or.FileOperationPatternKind=void 0;var ir=Gt(),c0;(function(t){t.file="file",t.folder="folder"})(c0||(Or.FileOperationPatternKind=c0={}));var u0;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=ir.MessageDirection.clientToServer,t.type=new ir.ProtocolRequestType(t.method),t.capabilities=ir.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(u0||(Or.WillCreateFilesRequest=u0={}));var l0;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=ir.MessageDirection.clientToServer,t.type=new ir.ProtocolNotificationType(t.method),t.capabilities=ir.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(l0||(Or.DidCreateFilesNotification=l0={}));var f0;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=ir.MessageDirection.clientToServer,t.type=new ir.ProtocolRequestType(t.method),t.capabilities=ir.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(f0||(Or.WillRenameFilesRequest=f0={}));var d0;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=ir.MessageDirection.clientToServer,t.type=new ir.ProtocolNotificationType(t.method),t.capabilities=ir.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(d0||(Or.DidRenameFilesNotification=d0={}));var p0;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=ir.MessageDirection.clientToServer,t.type=new ir.ProtocolNotificationType(t.method),t.capabilities=ir.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(p0||(Or.DidDeleteFilesNotification=p0={}));var h0;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=ir.MessageDirection.clientToServer,t.type=new ir.ProtocolRequestType(t.method),t.capabilities=ir.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(h0||(Or.WillDeleteFilesRequest=h0={}))});var y0=V(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.MonikerRequest=ka.MonikerKind=ka.UniquenessLevel=void 0;var wE=Gt(),_0;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(_0||(ka.UniquenessLevel=_0={}));var m0;(function(t){t.$import="import",t.$export="export",t.local="local"})(m0||(ka.MonikerKind=m0={}));var v0;(function(t){t.method="textDocument/moniker",t.messageDirection=wE.MessageDirection.clientToServer,t.type=new wE.ProtocolRequestType(t.method),t.capabilities=wE.CM.create("textDocument.moniker","monikerProvider")})(v0||(ka.MonikerRequest=v0={}))});var b0=V(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.TypeHierarchySubtypesRequest=Ha.TypeHierarchySupertypesRequest=Ha.TypeHierarchyPrepareRequest=void 0;var ru=Gt(),S0;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=ru.MessageDirection.clientToServer,t.type=new ru.ProtocolRequestType(t.method),t.capabilities=ru.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(S0||(Ha.TypeHierarchyPrepareRequest=S0={}));var D0;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=ru.MessageDirection.clientToServer,t.type=new ru.ProtocolRequestType(t.method)})(D0||(Ha.TypeHierarchySupertypesRequest=D0={}));var E0;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=ru.MessageDirection.clientToServer,t.type=new ru.ProtocolRequestType(t.method)})(E0||(Ha.TypeHierarchySubtypesRequest=E0={}))});var w0=V(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.InlineValueRefreshRequest=Wl.InlineValueRequest=void 0;var Gl=Gt(),C0;(function(t){t.method="textDocument/inlineValue",t.messageDirection=Gl.MessageDirection.clientToServer,t.type=new Gl.ProtocolRequestType(t.method),t.capabilities=Gl.CM.create("textDocument.inlineValue","inlineValueProvider")})(C0||(Wl.InlineValueRequest=C0={}));var T0;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=Gl.MessageDirection.serverToClient,t.type=new Gl.ProtocolRequestType0(t.method),t.capabilities=Gl.CM.create("workspace.inlineValue.refreshSupport",void 0)})(T0||(Wl.InlineValueRefreshRequest=T0={}))});var O0=V($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.InlayHintRefreshRequest=$a.InlayHintResolveRequest=$a.InlayHintRequest=void 0;var Is=Gt(),N0;(function(t){t.method="textDocument/inlayHint",t.messageDirection=Is.MessageDirection.clientToServer,t.type=new Is.ProtocolRequestType(t.method),t.capabilities=Is.CM.create("textDocument.inlayHint","inlayHintProvider")})(N0||($a.InlayHintRequest=N0={}));var P0;(function(t){t.method="inlayHint/resolve",t.messageDirection=Is.MessageDirection.clientToServer,t.type=new Is.ProtocolRequestType(t.method),t.capabilities=Is.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(P0||($a.InlayHintResolveRequest=P0={}));var R0;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=Is.MessageDirection.serverToClient,t.type=new Is.ProtocolRequestType0(t.method),t.capabilities=Is.CM.create("workspace.inlayHint.refreshSupport",void 0)})(R0||($a.InlayHintRefreshRequest=R0={}))});var j0=V(or=>{"use strict";var uk=or&&or.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),lk=or&&or.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),fk=or&&or.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&uk(n,e,r[i]);return lk(n,e),n}})();Object.defineProperty(or,"__esModule",{value:!0});or.DiagnosticRefreshRequest=or.WorkspaceDiagnosticRequest=or.DocumentDiagnosticRequest=or.DocumentDiagnosticReportKind=or.DiagnosticServerCancellationData=void 0;var F0=Rs(),dk=fk(qg()),As=Gt(),x0;(function(t){function e(n){let r=n;return r&&dk.boolean(r.retriggerRequest)}t.is=e})(x0||(or.DiagnosticServerCancellationData=x0={}));var I0;(function(t){t.Full="full",t.Unchanged="unchanged"})(I0||(or.DocumentDiagnosticReportKind=I0={}));var A0;(function(t){t.method="textDocument/diagnostic",t.messageDirection=As.MessageDirection.clientToServer,t.type=new As.ProtocolRequestType(t.method),t.partialResult=new F0.ProgressType,t.capabilities=As.CM.create("textDocument.diagnostic","diagnosticProvider")})(A0||(or.DocumentDiagnosticRequest=A0={}));var M0;(function(t){t.method="workspace/diagnostic",t.messageDirection=As.MessageDirection.clientToServer,t.type=new As.ProtocolRequestType(t.method),t.partialResult=new F0.ProgressType,t.capabilities=As.CM.create("workspace.diagnostics","diagnosticProvider.workspaceDiagnostics")})(M0||(or.WorkspaceDiagnosticRequest=M0={}));var L0;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=As.MessageDirection.serverToClient,t.type=new As.ProtocolRequestType0(t.method),t.capabilities=As.CM.create("workspace.diagnostics.refreshSupport",void 0)})(L0||(or.DiagnosticRefreshRequest=L0={}))});var B0=V(Ft=>{"use strict";var pk=Ft&&Ft.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),hk=Ft&&Ft.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),gk=Ft&&Ft.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&pk(n,e,r[i]);return hk(n,e),n}})();Object.defineProperty(Ft,"__esModule",{value:!0});Ft.DidCloseNotebookDocumentNotification=Ft.DidSaveNotebookDocumentNotification=Ft.DidChangeNotebookDocumentNotification=Ft.NotebookCellArrayChange=Ft.DidOpenNotebookDocumentNotification=Ft.NotebookDocumentSyncRegistrationType=Ft.NotebookDocument=Ft.NotebookCell=Ft.ExecutionSummary=Ft.NotebookCellKind=void 0;var Kd=(jg(),Ns(Fg)),Qi=gk(qg()),To=Gt(),NE;(function(t){t.Markup=1,t.Code=2;function e(n){return n===1||n===2}t.is=e})(NE||(Ft.NotebookCellKind=NE={}));var PE;(function(t){function e(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}t.create=e;function n(i){let o=i;return Qi.objectLiteral(o)&&Kd.uinteger.is(o.executionOrder)&&(o.success===void 0||Qi.boolean(o.success))}t.is=n;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}t.equals=r})(PE||(Ft.ExecutionSummary=PE={}));var Wg;(function(t){function e(o,s){return{kind:o,document:s}}t.create=e;function n(o){let s=o;return Qi.objectLiteral(s)&&NE.is(s.kind)&&Kd.DocumentUri.is(s.document)&&(s.metadata===void 0||Qi.objectLiteral(s.metadata))}t.is=n;function r(o,s){let a=new Set;return o.document!==s.document&&a.add("document"),o.kind!==s.kind&&a.add("kind"),o.executionSummary!==s.executionSummary&&a.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&a.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!PE.equals(o.executionSummary,s.executionSummary)&&a.add("executionSummary"),a}t.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let a=Array.isArray(o),c=Array.isArray(s);if(a!==c)return!1;if(a&&c){if(o.length!==s.length)return!1;for(let u=0;u<o.length;u++)if(!i(o[u],s[u]))return!1}if(Qi.objectLiteral(o)&&Qi.objectLiteral(s)){let u=Object.keys(o),l=Object.keys(s);if(u.length!==l.length||(u.sort(),l.sort(),!i(u,l)))return!1;for(let d=0;d<u.length;d++){let f=u[d];if(!i(o[f],s[f]))return!1}}return!0}})(Wg||(Ft.NotebookCell=Wg={}));var q0;(function(t){function e(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}t.create=e;function n(r){let i=r;return Qi.objectLiteral(i)&&Qi.string(i.uri)&&Kd.integer.is(i.version)&&Qi.typedArray(i.cells,Wg.is)}t.is=n})(q0||(Ft.NotebookDocument=q0={}));var zl;(function(t){t.method="notebookDocument/sync",t.messageDirection=To.MessageDirection.clientToServer,t.type=new To.RegistrationType(t.method)})(zl||(Ft.NotebookDocumentSyncRegistrationType=zl={}));var U0;(function(t){t.method="notebookDocument/didOpen",t.messageDirection=To.MessageDirection.clientToServer,t.type=new To.ProtocolNotificationType(t.method),t.registrationMethod=zl.method})(U0||(Ft.DidOpenNotebookDocumentNotification=U0={}));var Y0;(function(t){function e(r){let i=r;return Qi.objectLiteral(i)&&Kd.uinteger.is(i.start)&&Kd.uinteger.is(i.deleteCount)&&(i.cells===void 0||Qi.typedArray(i.cells,Wg.is))}t.is=e;function n(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}t.create=n})(Y0||(Ft.NotebookCellArrayChange=Y0={}));var k0;(function(t){t.method="notebookDocument/didChange",t.messageDirection=To.MessageDirection.clientToServer,t.type=new To.ProtocolNotificationType(t.method),t.registrationMethod=zl.method})(k0||(Ft.DidChangeNotebookDocumentNotification=k0={}));var H0;(function(t){t.method="notebookDocument/didSave",t.messageDirection=To.MessageDirection.clientToServer,t.type=new To.ProtocolNotificationType(t.method),t.registrationMethod=zl.method})(H0||(Ft.DidSaveNotebookDocumentNotification=H0={}));var $0;(function(t){t.method="notebookDocument/didClose",t.messageDirection=To.MessageDirection.clientToServer,t.type=new To.ProtocolNotificationType(t.method),t.registrationMethod=zl.method})($0||(Ft.DidCloseNotebookDocumentNotification=$0={}))});var W0=V(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});zg.InlineCompletionRequest=void 0;var RE=Gt(),G0;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=RE.MessageDirection.clientToServer,t.type=new RE.ProtocolRequestType(t.method),t.capabilities=RE.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(G0||(zg.InlineCompletionRequest=G0={}))});var V0=V(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.TextDocumentContentRefreshRequest=Kl.TextDocumentContentRequest=void 0;var Vd=Gt(),z0;(function(t){t.method="workspace/textDocumentContent",t.messageDirection=Vd.MessageDirection.clientToServer,t.type=new Vd.ProtocolRequestType(t.method),t.capabilities=Vd.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(z0||(Kl.TextDocumentContentRequest=z0={}));var K0;(function(t){t.method="workspace/textDocumentContent/refresh",t.messageDirection=Vd.MessageDirection.serverToClient,t.type=new Vd.ProtocolRequestType(t.method)})(K0||(Kl.TextDocumentContentRefreshRequest=K0={}))});var uI=V(w=>{"use strict";var _k=w&&w.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),mk=w&&w.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vk=w&&w.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&_k(n,e,r[i]);return mk(n,e),n}})();Object.defineProperty(w,"__esModule",{value:!0});w.CodeActionRequest=w.DocumentSymbolRequest=w.DocumentHighlightRequest=w.ReferencesRequest=w.DefinitionRequest=w.SignatureHelpRequest=w.SignatureHelpTriggerKind=w.HoverRequest=w.CompletionResolveRequest=w.CompletionRequest=w.CompletionTriggerKind=w.PublishDiagnosticsNotification=w.WatchKind=w.GlobPattern=w.RelativePattern=w.FileChangeType=w.DidChangeWatchedFilesNotification=w.WillSaveTextDocumentWaitUntilRequest=w.WillSaveTextDocumentNotification=w.TextDocumentSaveReason=w.DidSaveTextDocumentNotification=w.DidCloseTextDocumentNotification=w.DidChangeTextDocumentNotification=w.TextDocumentContentChangeEvent=w.DidOpenTextDocumentNotification=w.TextDocumentSyncKind=w.TelemetryEventNotification=w.LogMessageNotification=w.ShowMessageRequest=w.ShowMessageNotification=w.MessageType=w.DidChangeConfigurationNotification=w.ExitNotification=w.ShutdownRequest=w.InitializedNotification=w.InitializeErrorCodes=w.InitializeRequest=w.WorkDoneProgressOptions=w.TextDocumentRegistrationOptions=w.StaticRegistrationOptions=w.PositionEncodingKind=w.RegularExpressionEngineKind=w.FailureHandlingKind=w.ResourceOperationKind=w.UnregistrationRequest=w.RegistrationRequest=w.DocumentSelector=w.NotebookCellTextDocumentFilter=w.NotebookDocumentFilter=w.TextDocumentFilter=void 0;w.UniquenessLevel=w.WillDeleteFilesRequest=w.DidDeleteFilesNotification=w.WillRenameFilesRequest=w.DidRenameFilesNotification=w.WillCreateFilesRequest=w.DidCreateFilesNotification=w.FileOperationPatternKind=w.LinkedEditingRangeRequest=w.ShowDocumentRequest=w.SemanticTokensRegistrationType=w.SemanticTokensRefreshRequest=w.SemanticTokensRangeRequest=w.SemanticTokensDeltaRequest=w.SemanticTokensRequest=w.TokenFormat=w.CallHierarchyPrepareRequest=w.CallHierarchyOutgoingCallsRequest=w.CallHierarchyIncomingCallsRequest=w.WorkDoneProgressCancelNotification=w.WorkDoneProgressCreateRequest=w.WorkDoneProgress=w.SelectionRangeRequest=w.DeclarationRequest=w.FoldingRangeRefreshRequest=w.FoldingRangeRequest=w.ColorPresentationRequest=w.DocumentColorRequest=w.ConfigurationRequest=w.DidChangeWorkspaceFoldersNotification=w.WorkspaceFoldersRequest=w.TypeDefinitionRequest=w.ImplementationRequest=w.ApplyWorkspaceEditRequest=w.ExecuteCommandRequest=w.PrepareRenameRequest=w.RenameRequest=w.PrepareSupportDefaultBehavior=w.DocumentOnTypeFormattingRequest=w.DocumentRangesFormattingRequest=w.DocumentRangeFormattingRequest=w.DocumentFormattingRequest=w.DocumentLinkResolveRequest=w.DocumentLinkRequest=w.CodeLensRefreshRequest=w.CodeLensResolveRequest=w.CodeLensRequest=w.WorkspaceSymbolResolveRequest=w.WorkspaceSymbolRequest=w.CodeActionResolveRequest=void 0;w.TextDocumentContentRefreshRequest=w.TextDocumentContentRequest=w.InlineCompletionRequest=w.DidCloseNotebookDocumentNotification=w.DidSaveNotebookDocumentNotification=w.DidChangeNotebookDocumentNotification=w.NotebookCellArrayChange=w.DidOpenNotebookDocumentNotification=w.NotebookDocumentSyncRegistrationType=w.NotebookDocument=w.NotebookCell=w.ExecutionSummary=w.NotebookCellKind=w.DiagnosticRefreshRequest=w.WorkspaceDiagnosticRequest=w.DocumentDiagnosticRequest=w.DocumentDiagnosticReportKind=w.DiagnosticServerCancellationData=w.InlayHintRefreshRequest=w.InlayHintResolveRequest=w.InlayHintRequest=w.InlineValueRefreshRequest=w.InlineValueRequest=w.TypeHierarchySupertypesRequest=w.TypeHierarchySubtypesRequest=w.TypeHierarchyPrepareRequest=w.MonikerRequest=w.MonikerKind=void 0;var te=Gt(),X0=(jg(),Ns(Fg)),sr=vk(qg()),yk=wO();Object.defineProperty(w,"ImplementationRequest",{enumerable:!0,get:function(){return yk.ImplementationRequest}});var Sk=PO();Object.defineProperty(w,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Sk.TypeDefinitionRequest}});var iI=xO();Object.defineProperty(w,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return iI.WorkspaceFoldersRequest}});Object.defineProperty(w,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return iI.DidChangeWorkspaceFoldersNotification}});var Dk=AO();Object.defineProperty(w,"ConfigurationRequest",{enumerable:!0,get:function(){return Dk.ConfigurationRequest}});var oI=FO();Object.defineProperty(w,"DocumentColorRequest",{enumerable:!0,get:function(){return oI.DocumentColorRequest}});Object.defineProperty(w,"ColorPresentationRequest",{enumerable:!0,get:function(){return oI.ColorPresentationRequest}});var sI=UO();Object.defineProperty(w,"FoldingRangeRequest",{enumerable:!0,get:function(){return sI.FoldingRangeRequest}});Object.defineProperty(w,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return sI.FoldingRangeRefreshRequest}});var Ek=kO();Object.defineProperty(w,"DeclarationRequest",{enumerable:!0,get:function(){return Ek.DeclarationRequest}});var bk=$O();Object.defineProperty(w,"SelectionRangeRequest",{enumerable:!0,get:function(){return bk.SelectionRangeRequest}});var FE=zO();Object.defineProperty(w,"WorkDoneProgress",{enumerable:!0,get:function(){return FE.WorkDoneProgress}});Object.defineProperty(w,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return FE.WorkDoneProgressCreateRequest}});Object.defineProperty(w,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return FE.WorkDoneProgressCancelNotification}});var jE=JO();Object.defineProperty(w,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return jE.CallHierarchyIncomingCallsRequest}});Object.defineProperty(w,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return jE.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(w,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return jE.CallHierarchyPrepareRequest}});var Vl=r0();Object.defineProperty(w,"TokenFormat",{enumerable:!0,get:function(){return Vl.TokenFormat}});Object.defineProperty(w,"SemanticTokensRequest",{enumerable:!0,get:function(){return Vl.SemanticTokensRequest}});Object.defineProperty(w,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Vl.SemanticTokensDeltaRequest}});Object.defineProperty(w,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Vl.SemanticTokensRangeRequest}});Object.defineProperty(w,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Vl.SemanticTokensRefreshRequest}});Object.defineProperty(w,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Vl.SemanticTokensRegistrationType}});var Ck=o0();Object.defineProperty(w,"ShowDocumentRequest",{enumerable:!0,get:function(){return Ck.ShowDocumentRequest}});var Tk=a0();Object.defineProperty(w,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return Tk.LinkedEditingRangeRequest}});var iu=g0();Object.defineProperty(w,"FileOperationPatternKind",{enumerable:!0,get:function(){return iu.FileOperationPatternKind}});Object.defineProperty(w,"DidCreateFilesNotification",{enumerable:!0,get:function(){return iu.DidCreateFilesNotification}});Object.defineProperty(w,"WillCreateFilesRequest",{enumerable:!0,get:function(){return iu.WillCreateFilesRequest}});Object.defineProperty(w,"DidRenameFilesNotification",{enumerable:!0,get:function(){return iu.DidRenameFilesNotification}});Object.defineProperty(w,"WillRenameFilesRequest",{enumerable:!0,get:function(){return iu.WillRenameFilesRequest}});Object.defineProperty(w,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return iu.DidDeleteFilesNotification}});Object.defineProperty(w,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return iu.WillDeleteFilesRequest}});var qE=y0();Object.defineProperty(w,"UniquenessLevel",{enumerable:!0,get:function(){return qE.UniquenessLevel}});Object.defineProperty(w,"MonikerKind",{enumerable:!0,get:function(){return qE.MonikerKind}});Object.defineProperty(w,"MonikerRequest",{enumerable:!0,get:function(){return qE.MonikerRequest}});var UE=b0();Object.defineProperty(w,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return UE.TypeHierarchyPrepareRequest}});Object.defineProperty(w,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return UE.TypeHierarchySubtypesRequest}});Object.defineProperty(w,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return UE.TypeHierarchySupertypesRequest}});var aI=w0();Object.defineProperty(w,"InlineValueRequest",{enumerable:!0,get:function(){return aI.InlineValueRequest}});Object.defineProperty(w,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return aI.InlineValueRefreshRequest}});var YE=O0();Object.defineProperty(w,"InlayHintRequest",{enumerable:!0,get:function(){return YE.InlayHintRequest}});Object.defineProperty(w,"InlayHintResolveRequest",{enumerable:!0,get:function(){return YE.InlayHintResolveRequest}});Object.defineProperty(w,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return YE.InlayHintRefreshRequest}});var Xd=j0();Object.defineProperty(w,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Xd.DiagnosticServerCancellationData}});Object.defineProperty(w,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Xd.DocumentDiagnosticReportKind}});Object.defineProperty(w,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Xd.DocumentDiagnosticRequest}});Object.defineProperty(w,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Xd.WorkspaceDiagnosticRequest}});Object.defineProperty(w,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Xd.DiagnosticRefreshRequest}});var wo=B0();Object.defineProperty(w,"NotebookCellKind",{enumerable:!0,get:function(){return wo.NotebookCellKind}});Object.defineProperty(w,"ExecutionSummary",{enumerable:!0,get:function(){return wo.ExecutionSummary}});Object.defineProperty(w,"NotebookCell",{enumerable:!0,get:function(){return wo.NotebookCell}});Object.defineProperty(w,"NotebookDocument",{enumerable:!0,get:function(){return wo.NotebookDocument}});Object.defineProperty(w,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return wo.NotebookDocumentSyncRegistrationType}});Object.defineProperty(w,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return wo.DidOpenNotebookDocumentNotification}});Object.defineProperty(w,"NotebookCellArrayChange",{enumerable:!0,get:function(){return wo.NotebookCellArrayChange}});Object.defineProperty(w,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return wo.DidChangeNotebookDocumentNotification}});Object.defineProperty(w,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return wo.DidSaveNotebookDocumentNotification}});Object.defineProperty(w,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return wo.DidCloseNotebookDocumentNotification}});var wk=W0();Object.defineProperty(w,"InlineCompletionRequest",{enumerable:!0,get:function(){return wk.InlineCompletionRequest}});var cI=V0();Object.defineProperty(w,"TextDocumentContentRequest",{enumerable:!0,get:function(){return cI.TextDocumentContentRequest}});Object.defineProperty(w,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return cI.TextDocumentContentRefreshRequest}});var OE;(function(t){function e(n){let r=n;return sr.string(r)||sr.string(r.language)||sr.string(r.scheme)||LE.is(r.pattern)}t.is=e})(OE||(w.TextDocumentFilter=OE={}));var xE;(function(t){function e(n){let r=n;return sr.objectLiteral(r)&&(sr.string(r.notebookType)||sr.string(r.scheme)||sr.string(r.pattern))}t.is=e})(xE||(w.NotebookDocumentFilter=xE={}));var IE;(function(t){function e(n){let r=n;return sr.objectLiteral(r)&&(sr.string(r.notebook)||xE.is(r.notebook))&&(r.language===void 0||sr.string(r.language))}t.is=e})(IE||(w.NotebookCellTextDocumentFilter=IE={}));var AE;(function(t){function e(n){if(!Array.isArray(n))return!1;for(let r of n)if(!sr.string(r)&&!OE.is(r)&&!IE.is(r))return!1;return!0}t.is=e})(AE||(w.DocumentSelector=AE={}));var J0;(function(t){t.method="client/registerCapability",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolRequestType(t.method)})(J0||(w.RegistrationRequest=J0={}));var Q0;(function(t){t.method="client/unregisterCapability",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolRequestType(t.method)})(Q0||(w.UnregistrationRequest=Q0={}));var Z0;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(Z0||(w.ResourceOperationKind=Z0={}));var ex;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(ex||(w.FailureHandlingKind=ex={}));var tx;(function(t){t.ES2020="ES2020"})(tx||(w.RegularExpressionEngineKind=tx={}));var nx;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(nx||(w.PositionEncodingKind=nx={}));var rx;(function(t){function e(n){let r=n;return r&&sr.string(r.id)&&r.id.length>0}t.hasId=e})(rx||(w.StaticRegistrationOptions=rx={}));var ix;(function(t){function e(n){let r=n;return r&&(r.documentSelector===null||AE.is(r.documentSelector))}t.is=e})(ix||(w.TextDocumentRegistrationOptions=ix={}));var ox;(function(t){function e(r){let i=r;return sr.objectLiteral(i)&&(i.workDoneProgress===void 0||sr.boolean(i.workDoneProgress))}t.is=e;function n(r){let i=r;return i&&sr.boolean(i.workDoneProgress)}t.hasWorkDoneProgress=n})(ox||(w.WorkDoneProgressOptions=ox={}));var sx;(function(t){t.method="initialize",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method)})(sx||(w.InitializeRequest=sx={}));var ax;(function(t){t.unknownProtocolVersion=1})(ax||(w.InitializeErrorCodes=ax={}));var cx;(function(t){t.method="initialized",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method)})(cx||(w.InitializedNotification=cx={}));var ux;(function(t){t.method="shutdown",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType0(t.method)})(ux||(w.ShutdownRequest=ux={}));var lx;(function(t){t.method="exit",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType0(t.method)})(lx||(w.ExitNotification=lx={}));var fx;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("workspace.didChangeConfiguration",void 0)})(fx||(w.DidChangeConfigurationNotification=fx={}));var dx;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(dx||(w.MessageType=dx={}));var px;(function(t){t.method="window/showMessage",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("window.showMessage",void 0)})(px||(w.ShowMessageNotification=px={}));var hx;(function(t){t.method="window/showMessageRequest",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("window.showMessage",void 0)})(hx||(w.ShowMessageRequest=hx={}));var gx;(function(t){t.method="window/logMessage",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolNotificationType(t.method)})(gx||(w.LogMessageNotification=gx={}));var _x;(function(t){t.method="telemetry/event",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolNotificationType(t.method)})(_x||(w.TelemetryEventNotification=_x={}));var mx;(function(t){t.None=0,t.Full=1,t.Incremental=2})(mx||(w.TextDocumentSyncKind=mx={}));var vx;(function(t){t.method="textDocument/didOpen",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(vx||(w.DidOpenTextDocumentNotification=vx={}));var yx;(function(t){function e(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}t.isIncremental=e;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}t.isFull=n})(yx||(w.TextDocumentContentChangeEvent=yx={}));var Sx;(function(t){t.method="textDocument/didChange",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("textDocument.synchronization","textDocumentSync")})(Sx||(w.DidChangeTextDocumentNotification=Sx={}));var Dx;(function(t){t.method="textDocument/didClose",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Dx||(w.DidCloseTextDocumentNotification=Dx={}));var Ex;(function(t){t.method="textDocument/didSave",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Ex||(w.DidSaveTextDocumentNotification=Ex={}));var bx;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(bx||(w.TextDocumentSaveReason=bx={}));var Cx;(function(t){t.method="textDocument/willSave",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Cx||(w.WillSaveTextDocumentNotification=Cx={}));var Tx;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(Tx||(w.WillSaveTextDocumentWaitUntilRequest=Tx={}));var wx;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("workspace.didChangeWatchedFiles",void 0)})(wx||(w.DidChangeWatchedFilesNotification=wx={}));var Nx;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(Nx||(w.FileChangeType=Nx={}));var ME;(function(t){function e(n){let r=n;return sr.objectLiteral(r)&&(X0.URI.is(r.baseUri)||X0.WorkspaceFolder.is(r.baseUri))&&sr.string(r.pattern)}t.is=e})(ME||(w.RelativePattern=ME={}));var LE;(function(t){function e(n){let r=n;return sr.string(r)||ME.is(r)}t.is=e})(LE||(w.GlobPattern=LE={}));var Px;(function(t){t.Create=1,t.Change=2,t.Delete=4})(Px||(w.WatchKind=Px={}));var Rx;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolNotificationType(t.method),t.capabilities=te.CM.create("textDocument.publishDiagnostics",void 0)})(Rx||(w.PublishDiagnosticsNotification=Rx={}));var Ox;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(Ox||(w.CompletionTriggerKind=Ox={}));var xx;(function(t){t.method="textDocument/completion",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.completion","completionProvider")})(xx||(w.CompletionRequest=xx={}));var Ix;(function(t){t.method="completionItem/resolve",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Ix||(w.CompletionResolveRequest=Ix={}));var Ax;(function(t){t.method="textDocument/hover",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.hover","hoverProvider")})(Ax||(w.HoverRequest=Ax={}));var Mx;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(Mx||(w.SignatureHelpTriggerKind=Mx={}));var Lx;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Lx||(w.SignatureHelpRequest=Lx={}));var Fx;(function(t){t.method="textDocument/definition",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.definition","definitionProvider")})(Fx||(w.DefinitionRequest=Fx={}));var jx;(function(t){t.method="textDocument/references",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.references","referencesProvider")})(jx||(w.ReferencesRequest=jx={}));var qx;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(qx||(w.DocumentHighlightRequest=qx={}));var Ux;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Ux||(w.DocumentSymbolRequest=Ux={}));var Yx;(function(t){t.method="textDocument/codeAction",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.codeAction","codeActionProvider")})(Yx||(w.CodeActionRequest=Yx={}));var kx;(function(t){t.method="codeAction/resolve",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(kx||(w.CodeActionResolveRequest=kx={}));var Hx;(function(t){t.method="workspace/symbol",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("workspace.symbol","workspaceSymbolProvider")})(Hx||(w.WorkspaceSymbolRequest=Hx={}));var $x;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})($x||(w.WorkspaceSymbolResolveRequest=$x={}));var Bx;(function(t){t.method="textDocument/codeLens",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.codeLens","codeLensProvider")})(Bx||(w.CodeLensRequest=Bx={}));var Gx;(function(t){t.method="codeLens/resolve",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Gx||(w.CodeLensResolveRequest=Gx={}));var Wx;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolRequestType0(t.method),t.capabilities=te.CM.create("workspace.codeLens",void 0)})(Wx||(w.CodeLensRefreshRequest=Wx={}));var zx;(function(t){t.method="textDocument/documentLink",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.documentLink","documentLinkProvider")})(zx||(w.DocumentLinkRequest=zx={}));var Kx;(function(t){t.method="documentLink/resolve",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Kx||(w.DocumentLinkResolveRequest=Kx={}));var Vx;(function(t){t.method="textDocument/formatting",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.formatting","documentFormattingProvider")})(Vx||(w.DocumentFormattingRequest=Vx={}));var Xx;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Xx||(w.DocumentRangeFormattingRequest=Xx={}));var Jx;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(Jx||(w.DocumentRangesFormattingRequest=Jx={}));var Qx;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(Qx||(w.DocumentOnTypeFormattingRequest=Qx={}));var Zx;(function(t){t.Identifier=1})(Zx||(w.PrepareSupportDefaultBehavior=Zx={}));var eI;(function(t){t.method="textDocument/rename",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.rename","renameProvider")})(eI||(w.RenameRequest=eI={}));var tI;(function(t){t.method="textDocument/prepareRename",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(tI||(w.PrepareRenameRequest=tI={}));var nI;(function(t){t.method="workspace/executeCommand",t.messageDirection=te.MessageDirection.clientToServer,t.type=new te.ProtocolRequestType(t.method),t.capabilities=te.CM.create("workspace.executeCommand","executeCommandProvider")})(nI||(w.ExecuteCommandRequest=nI={}));var rI;(function(t){t.method="workspace/applyEdit",t.messageDirection=te.MessageDirection.serverToClient,t.type=new te.ProtocolRequestType("workspace/applyEdit"),t.capabilities=te.CM.create("workspace.applyEdit",void 0)})(rI||(w.ApplyWorkspaceEditRequest=rI={}))});var fI=V(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});kE.createProtocolConnection=Nk;var lI=Rs();function Nk(t,e,n,r){return lI.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,lI.createMessageConnection)(t,e,n,r)}});var et=V(zr=>{"use strict";var Pk=zr&&zr.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Kg=zr&&zr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Pk(e,t,n)};Object.defineProperty(zr,"__esModule",{value:!0});zr.LSPErrorCodes=zr.createProtocolConnection=void 0;Kg(Rs(),zr);Kg((jg(),Ns(Fg)),zr);Kg(Gt(),zr);Kg(uI(),zr);var Rk=fI();Object.defineProperty(zr,"createProtocolConnection",{enumerable:!0,get:function(){return Rk.createProtocolConnection}});var dI;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(dI||(zr.LSPErrorCodes=dI={}))});var Ii=V(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.boolean=Ok;xi.string=pI;xi.number=xk;xi.error=Ik;xi.func=hI;xi.array=gI;xi.stringArray=Ak;xi.typedArray=Mk;xi.thenable=_I;xi.asPromise=Lk;function Ok(t){return t===!0||t===!1}function pI(t){return typeof t=="string"||t instanceof String}function xk(t){return typeof t=="number"||t instanceof Number}function Ik(t){return t instanceof Error}function hI(t){return typeof t=="function"}function gI(t){return Array.isArray(t)}function Ak(t){return gI(t)&&t.every(e=>pI(e))}function Mk(t,e){return Array.isArray(t)&&t.every(e)}function _I(t){return t&&hI(t.then)}function Lk(t){return t instanceof Promise?t:_I(t)?new Promise((e,n)=>{t.then(r=>e(r),r=>n(r))}):Promise.resolve(t)}});var Wt=V(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.empty=void 0;Ba.v4=mI;Ba.isUUID=vI;Ba.parse=jk;Ba.generateUuid=qk;var Jd=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},HE=class t extends Jd{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};Ba.empty=new Jd("00000000-0000-0000-0000-000000000000");function mI(){return new HE}var Fk=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function vI(t){return Fk.test(t)}function jk(t){if(!vI(t))throw new Error("invalid uuid");return new Jd(t)}function qk(){return mI().asHex()}});var yt=V(cn=>{"use strict";var Uk=cn&&cn.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Yk=cn&&cn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),EI=cn&&cn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&Uk(n,e,r[i]);return Yk(n,e),n}})();Object.defineProperty(cn,"__esModule",{value:!0});cn.WorkspaceFeature=cn.TextDocumentLanguageFeature=cn.TextDocumentEventFeature=cn.DynamicDocumentFeature=cn.DynamicFeature=cn.StaticFeature=cn.LSPCancellationError=void 0;cn.ensure=kk;var Ga=require("vscode"),$E=et(),qr=EI(Ii()),yI=EI(Wt()),BE=class extends Ga.CancellationError{data;constructor(e){super(),this.data=e}};cn.LSPCancellationError=BE;function kk(t,e){return t[e]===void 0&&(t[e]={}),t[e]}var SI;(function(t){function e(n){let r=n;return r!=null&&qr.func(r.fillClientCapabilities)&&qr.func(r.initialize)&&qr.func(r.getState)&&qr.func(r.clear)&&(r.fillInitializeParams===void 0||qr.func(r.fillInitializeParams))}t.is=e})(SI||(cn.StaticFeature=SI={}));var DI;(function(t){function e(n){let r=n;return r!=null&&qr.func(r.fillClientCapabilities)&&qr.func(r.initialize)&&qr.func(r.getState)&&qr.func(r.clear)&&(r.fillInitializeParams===void 0||qr.func(r.fillInitializeParams))&&qr.func(r.register)&&qr.func(r.unregister)&&r.registrationType!==void 0}t.is=e})(DI||(cn.DynamicFeature=DI={}));var Qd=class{_client;constructor(e){this._client=e}getState(){let e=this.getDocumentSelectors(),n=0;for(let i of e){n++;for(let o of Ga.workspace.textDocuments)if(Ga.languages.match(i,o)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}let r=n>0;return{kind:"document",id:this.registrationType.method,registrations:r,matches:!1}}};cn.DynamicDocumentFeature=Qd;var GE=class extends Qd{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onNotificationSent;static textDocumentFilter(e,n){for(let r of e)if(Ga.languages.match(r,n)>0)return!0;return!1}constructor(e,n,r,i,o,s,a){super(e),this._event=n,this._type=r,this._middleware=i,this._createParams=o,this._textDocument=s,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new Ga.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(n=>{this.callback(n).catch(r=>{this._client.error(`Sending document notification ${this._type.method} failed.`,r)})})),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){let n=async r=>{let i=this._createParams(r);await this._client.sendNotification(this._type,i),this.notificationSent(this.getTextDocument(r),this._type,i)};if(this.matches(e)){let r=this._middleware();return r?r(e,i=>n(i)):n(e)}}matches(e){return this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))?!1:!this._selectorFilter||this._selectorFilter(this._selectors.values(),e)}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,n,r){this._onNotificationSent.fire({textDocument:e,type:n,params:r})}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._onNotificationSent=new Ga.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let n of this._selectors.values())if(Ga.languages.match(n,e)>0)return{send:r=>this.callback(r)}}};cn.TextDocumentEventFeature=GE;var WE=class extends Qd{_registrationType;_registrations;constructor(e,n){super(e),this._registrationType=n,this._registrations=new Map}*getDocumentSelectors(){for(let e of this._registrations.values()){let n=e.data.registerOptions.documentSelector;n!==null&&(yield this._client.protocol2CodeConverter.asDocumentSelector(n))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let n=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:n[0],data:e,provider:n[1]})}unregister(e){let n=this._registrations.get(e);n!==void 0&&(this._registrations.delete(e),n.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,n){if(n){if($E.TextDocumentRegistrationOptions.is(n)){let r=$E.StaticRegistrationOptions.hasId(n)?n.id:yI.generateUuid(),i=n.documentSelector??e;if(i)return[r,Object.assign({},n,{documentSelector:i})]}else if(qr.boolean(n)&&n===!0||$E.WorkDoneProgressOptions.is(n)){if(!e)return[void 0,void 0];let r=qr.boolean(n)&&n===!0?{documentSelector:e}:Object.assign({},n,{documentSelector:e});return[yI.generateUuid(),r]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,n){if(!(!e||!n))return qr.boolean(n)&&n===!0?{documentSelector:e}:Object.assign({},n,{documentSelector:e})}getProvider(e){for(let n of this._registrations.values()){let r=n.data.registerOptions.documentSelector;if(r!==null&&Ga.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(r),e)>0)return n.provider}}getAllProviders(){let e=[];for(let n of this._registrations.values())e.push(n.provider);return e}};cn.TextDocumentLanguageFeature=WE;var zE=class{_client;_registrationType;_registrations;constructor(e,n){this._client=e,this._registrationType=n,this._registrations=new Map}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){let n=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:n[0],provider:n[1]})}unregister(e){let n=this._registrations.get(e);n!==void 0&&(this._registrations.delete(e),n.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let n of this._registrations.values())e.push(n.provider);return e}};cn.WorkspaceFeature=zE});var CI=V(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.range=ou.balanced=void 0;var Hk=(t,e,n)=>{let r=t instanceof RegExp?bI(t,n):t,i=e instanceof RegExp?bI(e,n):e,o=r!==null&&i!=null&&(0,ou.range)(r,i,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+r.length,o[1]),post:n.slice(o[1]+i.length)}};ou.balanced=Hk;var bI=(t,e)=>{let n=e.match(t);return n?n[0]:null},$k=(t,e,n)=>{let r,i,o,s,a,c=n.indexOf(t),u=n.indexOf(e,c+1),l=c;if(c>=0&&u>0){if(t===e)return[c,u];for(r=[],o=n.length;l>=0&&!a;){if(l===c)r.push(l),c=n.indexOf(t,l+1);else if(r.length===1){let d=r.pop();d!==void 0&&(a=[d,u])}else i=r.pop(),i!==void 0&&i<o&&(o=i,s=u),u=n.indexOf(e,l+1);l=c<u&&c>=0?c:u}r.length&&s!==void 0&&(a=[o,s])}return a};ou.range=$k});var xI=V(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.EXPANSION_MAX=void 0;Xl.expand=nH;var TI=CI(),wI="\0SLASH"+Math.random()+"\0",NI="\0OPEN"+Math.random()+"\0",VE="\0CLOSE"+Math.random()+"\0",PI="\0COMMA"+Math.random()+"\0",RI="\0PERIOD"+Math.random()+"\0",Bk=new RegExp(wI,"g"),Gk=new RegExp(NI,"g"),Wk=new RegExp(VE,"g"),zk=new RegExp(PI,"g"),Kk=new RegExp(RI,"g"),Vk=/\\\\/g,Xk=/\\{/g,Jk=/\\}/g,Qk=/\\,/g,Zk=/\\\./g;Xl.EXPANSION_MAX=1e5;function KE(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function eH(t){return t.replace(Vk,wI).replace(Xk,NI).replace(Jk,VE).replace(Qk,PI).replace(Zk,RI)}function tH(t){return t.replace(Bk,"\\").replace(Gk,"{").replace(Wk,"}").replace(zk,",").replace(Kk,".")}function OI(t){if(!t)return[""];let e=[],n=(0,TI.balanced)("{","}",t);if(!n)return t.split(",");let{pre:r,body:i,post:o}=n,s=r.split(",");s[s.length-1]+="{"+i+"}";let a=OI(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function nH(t,e={}){if(!t)return[];let{max:n=Xl.EXPANSION_MAX}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),Zd(eH(t),n,!0).map(tH)}function rH(t){return"{"+t+"}"}function iH(t){return/^-?0\d/.test(t)}function oH(t,e){return t<=e}function sH(t,e){return t>=e}function Zd(t,e,n){let r=[];for(;;){let i=(0,TI.balanced)("{","}",t);if(!i)return[t];let o=i.pre;if(/\$$/.test(i.pre)){let g=i.post.length?Zd(i.post,e,!1):[""];for(let h=0;h<g.length&&h<e;h++){let _=o+"{"+i.body+"}"+g[h];r.push(_)}return r}let s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),c=s||a,u=i.body.indexOf(",")>=0;if(!c&&!u){if(i.post.match(/,(?!,).*\}/)){t=i.pre+"{"+i.body+VE+i.post,n=!0;continue}return[t]}let l=i.post.length?Zd(i.post,e,!1):[""],d;if(c)d=i.body.split(/\.\./);else if(d=OI(i.body),d.length===1&&d[0]!==void 0&&(d=Zd(d[0],e,!1).map(rH),d.length===1))return l.map(g=>i.pre+d[0]+g);let f;if(c&&d[0]!==void 0&&d[1]!==void 0){let g=KE(d[0]),h=KE(d[1]),_=Math.max(d[0].length,d[1].length),S=d.length===3&&d[2]!==void 0?Math.max(Math.abs(KE(d[2])),1):1,b=oH;h<g&&(S*=-1,b=sH);let E=d.some(iH);f=[];for(let x=g;b(x,h)&&f.length<e;x+=S){let P;if(a)P=String.fromCharCode(x),P==="\\"&&(P="");else if(P=String(x),E){let T=_-P.length;if(T>0){let N=new Array(T+1).join("0");x<0?P="-"+N+P.slice(1):P=N+P}}f.push(P)}}else{f=[];for(let g=0;g<d.length;g++)f.push.apply(f,Zd(d[g],e,!1))}for(let g=0;g<f.length;g++)for(let h=0;h<l.length&&r.length<e;h++){let _=o+f[g]+l[h];(!n||c||_)&&r.push(_)}return r}}});var II=V(Vg=>{"use strict";Object.defineProperty(Vg,"__esModule",{value:!0});Vg.assertValidPattern=void 0;var aH=1024*64,cH=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>aH)throw new TypeError("pattern is too long")};Vg.assertValidPattern=cH});var MI=V(Xg=>{"use strict";Object.defineProperty(Xg,"__esModule",{value:!0});Xg.parseClass=void 0;var uH={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ep=t=>t.replace(/[[\]\\-]/g,"\\$&"),lH=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),AI=t=>t.join(""),fH=(t,e)=>{let n=e;if(t.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],o=n+1,s=!1,a=!1,c=!1,u=!1,l=n,d="";e:for(;o<t.length;){let _=t.charAt(o);if((_==="!"||_==="^")&&o===n+1){u=!0,o++;continue}if(_==="]"&&s&&!c){l=o+1;break}if(s=!0,_==="\\"&&!c){c=!0,o++;continue}if(_==="["&&!c){for(let[S,[b,v,E]]of Object.entries(uH))if(t.startsWith(S,o)){if(d)return["$.",!1,t.length-n,!0];o+=S.length,E?i.push(b):r.push(b),a=a||v;continue e}}if(c=!1,d){_>d?r.push(ep(d)+"-"+ep(_)):_===d&&r.push(ep(_)),d="",o++;continue}if(t.startsWith("-]",o+1)){r.push(ep(_+"-")),o+=2;continue}if(t.startsWith("-",o+1)){d=_,o+=2;continue}r.push(ep(_)),o++}if(l<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,t.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let _=r[0].length===2?r[0].slice(-1):r[0];return[lH(_),!1,l-n,!1]}let f="["+(u?"^":"")+AI(r)+"]",g="["+(u?"":"^")+AI(i)+"]";return[r.length&&i.length?"("+f+"|"+g+")":r.length?f:g,a,l-n,!0]};Xg.parseClass=fH});var Qg=V(Jg=>{"use strict";Object.defineProperty(Jg,"__esModule",{value:!0});Jg.unescape=void 0;var dH=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=>n?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");Jg.unescape=dH});var QE=V(n_=>{"use strict";var Kr;Object.defineProperty(n_,"__esModule",{value:!0});n_.AST=void 0;var pH=MI(),Zg=Qg(),hH=new Set(["!","?","+","*","@"]),XE=t=>hH.has(t),LI=t=>XE(t.type),gH=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),_H=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),mH=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),FI=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),vH="(?!(?:^|/)\\.\\.?(?:$|/))",e_="(?!\\.)",yH=new Set(["[","."]),SH=new Set(["..","."]),DH=new Set("().*{}+?[]^$\\!"),EH=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),JE="[^/]",jI=JE+"*?",qI=JE+"+?",bH=0,t_=class{type;#n;#r;#i=!1;#e=[];#t;#a;#u;#c=!1;#o;#s;#l=!1;id=++bH;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,n,r={}){this.type=e,e&&(this.#r=!0),this.#t=n,this.#n=this.#t?this.#t.#n:this,this.#o=this.#n===this?r:this.#n.#o,this.#u=this.#n===this?[]:this.#n.#u,e==="!"&&!this.#n.#c&&this.#u.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#s!==void 0?this.#s:this.type?this.#s=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#s=this.#e.map(e=>String(e)).join("")}#m(){if(this!==this.#n)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let n=e,r=n.#t;for(;r;){for(let i=n.#a+1;!r.type&&i<r.#e.length;i++)for(let o of e.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(r.#e[i])}n=r,r=n.#t}}return this}push(...e){for(let n of e)if(n!==""){if(typeof n!="string"&&!(n instanceof Kr&&n.#t===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let e=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#c&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let e=this.#t;for(let n=0;n<this.#a;n++){let r=e.#e[n];if(!(r instanceof Kr&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let e=this.#t?this.#t.#e.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let n=new Kr(this.type,e);for(let r of this.#e)n.copyIn(r);return n}static#f(e,n,r,i,o){let s=i.maxExtglobRecursion??2,a=!1,c=!1,u=-1,l=!1;if(n.type===null){let _=r,S="";for(;_<e.length;){let b=e.charAt(_++);if(a||b==="\\"){a=!a,S+=b;continue}if(c){_===u+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(_===u+2&&l)&&(c=!1),S+=b;continue}else if(b==="["){c=!0,u=_,l=!1,S+=b;continue}if(!i.noext&&XE(b)&&e.charAt(_)==="("&&o<=s){n.push(S),S="";let E=new Kr(b,n);_=Kr.#f(e,E,_,i,o+1),n.push(E);continue}S+=b}return n.push(S),_}let d=r+1,f=new Kr(null,n),g=[],h="";for(;d<e.length;){let _=e.charAt(d++);if(a||_==="\\"){a=!a,h+=_;continue}if(c){d===u+1?(_==="^"||_==="!")&&(l=!0):_==="]"&&!(d===u+2&&l)&&(c=!1),h+=_;continue}else if(_==="["){c=!0,u=d,l=!1,h+=_;continue}if(!i.noext&&XE(_)&&e.charAt(d)==="("&&(o<=s||n&&n.#d(_))){let b=n&&n.#d(_)?0:1;f.push(h),h="";let v=new Kr(_,f);f.push(v),d=Kr.#f(e,v,d,i,o+b);continue}if(_==="|"){f.push(h),h="",g.push(f),f=new Kr(null,n);continue}if(_===")")return h===""&&n.#e.length===0&&(n.#l=!0),f.push(h),h="",n.push(...g,f),d;h+=_}return n.type=null,n.#r=void 0,n.#e=[e.substring(r-1)],d}#v(e){return this.#h(e,_H)}#h(e,n=gH){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#d(r.type,n)}#d(e,n=mH){return!!n.get(this.type)?.includes(e)}#y(e,n){let r=e.#e[0],i=new Kr(null,r,this.options);i.#e.push(""),r.push(i),this.#g(e,n)}#g(e,n){let r=e.#e[0];this.#e.splice(n,1,...r.#e);for(let i of r.#e)typeof i=="object"&&(i.#t=this);this.#s=void 0}#S(e){return!!FI.get(this.type)?.has(e)}#D(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#S(n.type)}#E(e){let n=FI.get(this.type),r=e.#e[0],i=n?.get(r.type);if(!i)return!1;this.#e=r.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=i,this.#s=void 0,this.#l=!1}static fromGlob(e,n={}){let r=new Kr(null,void 0,n);return Kr.#f(e,r,0,n,0),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let e=this.toString(),[n,r,i,o]=this.toRegExpSource();if(!(i||this.#r||this.#o.nocase&&!this.#o.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let a=(this.#o.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${n}$`,a),{_src:n,_glob:e})}get options(){return this.#o}toRegExpSource(e){let n=e??!!this.#o.dot;if(this.#n===this&&(this.#p(),this.#m()),!LI(this)){let c=this.isStart()&&this.isEnd()&&!this.#e.some(g=>typeof g!="string"),u=this.#e.map(g=>{let[h,_,S,b]=typeof g=="string"?Kr.#b(g,this.#r,c):g.toRegExpSource(e);return this.#r=this.#r||S,this.#i=this.#i||b,h}).join(""),l="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&SH.has(this.#e[0]))){let h=yH,_=n&&h.has(u.charAt(0))||u.startsWith("\\.")&&h.has(u.charAt(2))||u.startsWith("\\.\\.")&&h.has(u.charAt(4)),S=!n&&!e&&h.has(u.charAt(0));l=_?vH:S?e_:""}let d="";return this.isEnd()&&this.#n.#c&&this.#t?.type==="!"&&(d="(?:$|\\/)"),[l+u+d,(0,Zg.unescape)(u),this.#r=!!this.#r,this.#i]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#_(n);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString(),u=this;return u.#e=[c],u.type=null,u.#r=void 0,[c,(0,Zg.unescape)(this.toString()),!1,!1]}let s=!r||e||n||!e_?"":this.#_(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!n?e_:"")+qI;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!e?e_:"")+jI+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=i+o+c}return[a,(0,Zg.unescape)(o),this.#r=!!this.#r,this.#i]}#p(){if(LI(this)){let e=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let i=this.#e[r];typeof i=="object"&&(i.#p(),this.#h(i)?(n=!1,this.#g(i,r)):this.#v(i)?(n=!1,this.#y(i,r)):this.#D(i)&&(n=!1,this.#E(i)))}}while(!n&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#p();this.#s=void 0}#_(e){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,o,s]=n.toRegExpSource(e);return this.#i=this.#i||s,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#b(e,n,r=!1){let i=!1,o="",s=!1,a=!1;for(let c=0;c<e.length;c++){let u=e.charAt(c);if(i){i=!1,o+=(DH.has(u)?"\\":"")+u;continue}if(u==="*"){if(a)continue;a=!0,o+=r&&/^[*]+$/.test(e)?qI:jI,n=!0;continue}else a=!1;if(u==="\\"){c===e.length-1?o+="\\\\":i=!0;continue}if(u==="["){let[l,d,f,g]=(0,pH.parseClass)(e,c);if(f){o+=l,s=s||d,c+=f-1,n=n||g;continue}}if(u==="?"){o+=JE,n=!0;continue}o+=EH(u)}return[o,(0,Zg.unescape)(e),!!n,s]}};n_.AST=t_;Kr=t_});var ZE=V(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});r_.escape=void 0;var CH=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=>n?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");r_.escape=CH});var eb=V(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.unescape=Le.escape=Le.AST=Le.Minimatch=Le.match=Le.makeRe=Le.braceExpand=Le.defaults=Le.filter=Le.GLOBSTAR=Le.sep=Le.minimatch=void 0;var TH=xI(),i_=II(),kI=QE(),wH=ZE(),NH=Qg(),PH=(t,e,n={})=>((0,i_.assertValidPattern)(e),!n.nocomment&&e.charAt(0)==="#"?!1:new su(e,n).match(t));Le.minimatch=PH;var RH=/^\*+([^+@!?*[(]*)$/,OH=t=>e=>!e.startsWith(".")&&e.endsWith(t),xH=t=>e=>e.endsWith(t),IH=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),AH=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),MH=/^\*+\.\*+$/,LH=t=>!t.startsWith(".")&&t.includes("."),FH=t=>t!=="."&&t!==".."&&t.includes("."),jH=/^\.\*+$/,qH=t=>t!=="."&&t!==".."&&t.startsWith("."),UH=/^\*+$/,YH=t=>t.length!==0&&!t.startsWith("."),kH=t=>t.length!==0&&t!=="."&&t!=="..",HH=/^\?+([^+@!?*[(]*)?$/,$H=([t,e=""])=>{let n=HI([t]);return e?(e=e.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(e)):n},BH=([t,e=""])=>{let n=$I([t]);return e?(e=e.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(e)):n},GH=([t,e=""])=>{let n=$I([t]);return e?r=>n(r)&&r.endsWith(e):n},WH=([t,e=""])=>{let n=HI([t]);return e?r=>n(r)&&r.endsWith(e):n},HI=([t])=>{let e=t.length;return n=>n.length===e&&!n.startsWith(".")},$I=([t])=>{let e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},BI=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",UI={win32:{sep:"\\"},posix:{sep:"/"}};Le.sep=BI==="win32"?UI.win32.sep:UI.posix.sep;Le.minimatch.sep=Le.sep;Le.GLOBSTAR=Symbol("globstar **");Le.minimatch.GLOBSTAR=Le.GLOBSTAR;var zH="[^/]",KH=zH+"*?",VH="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",XH="(?:(?!(?:\\/|^)\\.).)*?",JH=(t,e={})=>n=>(0,Le.minimatch)(n,t,e);Le.filter=JH;Le.minimatch.filter=Le.filter;var Ai=(t,e={})=>Object.assign({},t,e),QH=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Le.minimatch;let e=Le.minimatch;return Object.assign((r,i,o={})=>e(r,i,Ai(t,o)),{Minimatch:class extends e.Minimatch{constructor(i,o={}){super(i,Ai(t,o))}static defaults(i){return e.defaults(Ai(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,o,s={}){super(i,o,Ai(t,s))}static fromGlob(i,o={}){return e.AST.fromGlob(i,Ai(t,o))}},unescape:(r,i={})=>e.unescape(r,Ai(t,i)),escape:(r,i={})=>e.escape(r,Ai(t,i)),filter:(r,i={})=>e.filter(r,Ai(t,i)),defaults:r=>e.defaults(Ai(t,r)),makeRe:(r,i={})=>e.makeRe(r,Ai(t,i)),braceExpand:(r,i={})=>e.braceExpand(r,Ai(t,i)),match:(r,i,o={})=>e.match(r,i,Ai(t,o)),sep:e.sep,GLOBSTAR:Le.GLOBSTAR})};Le.defaults=QH;Le.minimatch.defaults=Le.defaults;var ZH=(t,e={})=>((0,i_.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,TH.expand)(t,{max:e.braceExpandMax}));Le.braceExpand=ZH;Le.minimatch.braceExpand=Le.braceExpand;var e$=(t,e={})=>new su(t,e).makeRe();Le.makeRe=e$;Le.minimatch.makeRe=Le.makeRe;var t$=(t,e,n={})=>{let r=new su(e,n);return t=t.filter(i=>r.match(i)),r.options.nonull&&!t.length&&t.push(e),t};Le.match=t$;Le.minimatch.match=Le.match;var YI=/[?*]|[+@!]\(.*?\)|\[|\]/,n$=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),su=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,n={}){(0,i_.assertValidPattern)(e),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=e,this.platform=n.platform||BI,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let n of e)if(typeof n!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,n=this.options;if(!n.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=o[0]===""&&o[1]===""&&(o[2]==="?"||!YI.test(o[2]))&&!YI.test(o[3]),u=/^[a-z]:/i.test(o[0]);if(c)return[...o.slice(0,4),...o.slice(4).map(l=>this.parse(l))];if(u)return[o[0],...o.slice(1).map(l=>this.parse(l))]}return o.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r of e)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(e){return e.map(n=>(n=n.reduce((r,i)=>{let o=r[r.length-1];return i==="**"&&o==="**"?r:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let o=e[i];i===1&&o===""&&e[0]===""||(o==="."||o==="")&&(n=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(n=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let i=e[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,e.splice(r-1,2),r-=2)}}while(n);return e.length===0?[""]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let r of e){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s>i&&r.splice(i+1,s-i);let a=r[i+1],c=r[i+2],u=r[i+3];if(a!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(i,1);let l=r.slice(0);l[i]="**",e.push(l),i--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let a=r[s];s===1&&a===""&&r[0]===""||(a==="."||a==="")&&(n=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){let s=r[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let c=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...c),r.length===0&&r.push(""),o-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n<e.length-1;n++)for(let r=n+1;r<e.length;r++){let i=this.partsMatch(e[n],e[r],!this.preserveMultipleSlashes);if(i){e[n]=[],e[r]=i;break}}return e.filter(n=>n.length)}partsMatch(e,n,r=!1){let i=0,o=0,s=[],a="";for(;i<e.length&&o<n.length;)if(e[i]===n[o])s.push(a==="b"?n[o]:e[i]),i++,o++;else if(r&&e[i]==="**"&&n[o]===e[i+1])s.push(e[i]),i++;else if(r&&n[o]==="**"&&e[i]===n[o+1])s.push(n[o]),o++;else if(e[i]==="*"&&n[o]&&(this.options.dot||!n[o].startsWith("."))&&n[o]!=="**"){if(a==="b")return!1;a="a",s.push(e[i]),i++,o++}else if(n[o]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(a==="a")return!1;a="b",s.push(n[o]),i++,o++}else return!1;return e.length===n.length&&s}parseNegate(){if(this.nonegate)return;let e=this.pattern,n=!1,r=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=e.slice(r)),this.negate=n}matchOne(e,n,r=!1){let i=0,o=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),c=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),l=!u&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),d=c?3:a?0:void 0,f=l?3:u?0:void 0;if(typeof d=="number"&&typeof f=="number"){let[g,h]=[e[d],n[f]];g.toLowerCase()===h.toLowerCase()&&(n[f]=g,o=f,i=d)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(e=this.levelTwoFileOptimize(e)),n.includes(Le.GLOBSTAR)?this.#n(e,n,r,i,o):this.#i(e,n,r,i,o)}#n(e,n,r,i,o){let s=n.indexOf(Le.GLOBSTAR,o),a=n.lastIndexOf(Le.GLOBSTAR),[c,u,l]=r?[n.slice(o,s),n.slice(s+1),[]]:[n.slice(o,s),n.slice(s+1,a),n.slice(a+1)];if(c.length){let v=e.slice(i,i+c.length);if(!this.#i(v,c,r,0,0))return!1;i+=c.length,o+=c.length}let d=0;if(l.length){if(l.length+i>e.length)return!1;let v=e.length-l.length;if(this.#i(e,l,r,v,0))d=l.length;else{if(e[e.length-1]!==""||i+l.length===e.length||(v--,!this.#i(e,l,r,v,0)))return!1;d=l.length+1}}if(!u.length){let v=!!d;for(let E=i;E<e.length-d;E++){let x=String(e[E]);if(v=!0,x==="."||x===".."||!this.options.dot&&x.startsWith("."))return!1}return r||v}let f=[[[],0]],g=f[0],h=0,_=[0];for(let v of u)v===Le.GLOBSTAR?(_.push(h),g=[[],0],f.push(g)):(g[0].push(v),h++);let S=f.length-1,b=e.length-d;for(let v of f)v[1]=b-(_[S--]+v[0].length);return!!this.#r(e,f,i,0,r,0,!!d)}#r(e,n,r,i,o,s,a){let c=n[i];if(!c){for(let d=r;d<e.length;d++){a=!0;let f=e[d];if(f==="."||f===".."||!this.options.dot&&f.startsWith("."))return!1}return a}let[u,l]=c;for(;r<=l;){if(this.#i(e.slice(0,r+u.length),u,o,r,0)&&s<this.maxGlobstarRecursion){let g=this.#r(e,n,r+u.length,i+1,o,s+1,a);if(g!==!1)return g}let f=e[r];if(f==="."||f===".."||!this.options.dot&&f.startsWith("."))return!1;r++}return o||null}#i(e,n,r,i,o){let s,a,c,u;for(s=i,a=o,u=e.length,c=n.length;s<u&&a<c;s++,a++){this.debug("matchOne loop");let l=n[a],d=e[s];if(this.debug(n,l,d),l===!1||l===Le.GLOBSTAR)return!1;let f;if(typeof l=="string"?(f=d===l,this.debug("string match",l,d,f)):(f=l.test(d),this.debug("pattern match",l,d,f)),!f)return!1}if(s===u&&a===c)return!0;if(s===u)return r;if(a===c)return s===u-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return(0,Le.braceExpand)(this.pattern,this.options)}parse(e){(0,i_.assertValidPattern)(e);let n=this.options;if(e==="**")return Le.GLOBSTAR;if(e==="")return"";let r,i=null;(r=e.match(UH))?i=n.dot?kH:YH:(r=e.match(RH))?i=(n.nocase?n.dot?AH:IH:n.dot?xH:OH)(r[1]):(r=e.match(HH))?i=(n.nocase?n.dot?BH:$H:n.dot?GH:WH)(r):(r=e.match(MH))?i=n.dot?FH:LH:(r=e.match(jH))&&(i=qH);let o=kI.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?KH:n.dot?VH:XH,i=new Set(n.nocase?["i"]:[]),o=e.map(c=>{let u=c.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))i.add(f);return typeof d=="string"?n$(d):d===Le.GLOBSTAR?Le.GLOBSTAR:d._src});u.forEach((d,f)=>{let g=u[f+1],h=u[f-1];d!==Le.GLOBSTAR||h===Le.GLOBSTAR||(h===void 0?g!==void 0&&g!==Le.GLOBSTAR?u[f+1]="(?:\\/|"+r+"\\/)?"+g:u[f]=r:g===void 0?u[f-1]=h+"(?:\\/|\\/"+r+")?":g!==Le.GLOBSTAR&&(u[f-1]=h+"(?:\\/|\\/"+r+"\\/)"+g,u[f+1]=Le.GLOBSTAR))});let l=u.filter(d=>d!==Le.GLOBSTAR);if(this.partial&&l.length>=1){let d=[];for(let f=1;f<=l.length;f++)d.push(l.slice(0,f).join("/"));return"(?:"+d.join("|")+")"}return l.join("/")}).join("|"),[s,a]=e.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,n=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&n)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let s=i[i.length-1];if(!s)for(let a=i.length-2;!s&&a>=0;a--)s=i[a];for(let a of o){let c=i;if(r.matchBase&&a.length===1&&(c=[s]),this.matchOne(c,a,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return Le.minimatch.defaults(e).Minimatch}};Le.Minimatch=su;var r$=QE();Object.defineProperty(Le,"AST",{enumerable:!0,get:function(){return r$.AST}});var i$=ZE();Object.defineProperty(Le,"escape",{enumerable:!0,get:function(){return i$.escape}});var o$=Qg();Object.defineProperty(Le,"unescape",{enumerable:!0,get:function(){return o$.unescape}});Le.minimatch.AST=kI.AST;Le.minimatch.Minimatch=su;Le.minimatch.escape=wH.escape;Le.minimatch.unescape=NH.unescape});var tb=V(Ms=>{"use strict";var s$=Ms&&Ms.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),a$=Ms&&Ms.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),c$=Ms&&Ms.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&s$(n,e,r[i]);return a$(n,e),n}})();Object.defineProperty(Ms,"__esModule",{value:!0});Ms.matchGlobPattern=f$;var u$=c$(eb()),l$=require("vscode");function f$(t,e){let n;if(typeof t=="string")n=t.replace(/\\/g,"/");else try{let i=l$.Uri.parse(typeof t.baseUri=="string"?t.baseUri:t.baseUri.uri);n=i.with({path:i.path+"/"+t.pattern}).fsPath.replace(/\\/g,"/")}catch{return!1}let r=new u$.Minimatch(n,{noext:!0});return r.makeRe()?r.match(e.fsPath):!1}});var cb=V(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.DiagnosticFeature=Wa.DiagnosticPullMode=Wa.vsdiag=void 0;var Qt=require("vscode"),zt=et(),d$=Wt(),p$=tb(),nb=yt();function o_(t,e){return t[e]===void 0&&(t[e]={}),t[e]}var Mi;(function(t){let e;(function(n){n.full="full",n.unChanged="unChanged"})(e=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={}))})(Mi||(Wa.vsdiag=Mi={}));var tp;(function(t){t.onType="onType",t.onSave="onSave",t.onFocus="onFocus"})(tp||(Wa.DiagnosticPullMode=tp={}));var ar;(function(t){t.active="open",t.reschedule="reschedule",t.outDated="drop"})(ar||(ar={}));var Mn;(function(t){t[t.document=1]="document",t[t.workspace=2]="workspace"})(Mn||(Mn={}));var Ls;(function(t){function e(n){return n instanceof Qt.Uri?n.toString():n.uri.toString()}t.asKey=e})(Ls||(Ls={}));var rb=class{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,n,r){let i=e===Mn.document?this.documentPullStates:this.workspacePullStates,[o,s,a]=n instanceof Qt.Uri?[n.toString(),n,r]:[n.uri.toString(),n.uri,n.version],c=i.get(o);return c===void 0&&(c={document:s,pulledVersion:a,resultId:void 0},i.set(o,c)),c}update(e,n,r,i){let o=e===Mn.document?this.documentPullStates:this.workspacePullStates,[s,a,c,u]=n instanceof Qt.Uri?[n.toString(),n,r,i]:[n.uri.toString(),n.uri,n.version,r],l=o.get(s);l===void 0?(l={document:a,pulledVersion:c,resultId:u},o.set(s,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,n){let r=Ls.asKey(n);(e===Mn.document?this.documentPullStates:this.workspacePullStates).delete(r)}tracks(e,n){let r=Ls.asKey(n);return(e===Mn.document?this.documentPullStates:this.workspacePullStates).has(r)}tracksSameVersion(e,n){let r=n.uri.toString(),o=(e===Mn.document?this.documentPullStates:this.workspacePullStates).get(r);return o!==void 0&&o.pulledVersion===n.version}getResultId(e,n){let r=Ls.asKey(n);return(e===Mn.document?this.documentPullStates:this.workspacePullStates).get(r)?.resultId}getAllResultIds(){let e=[];for(let[n,r]of this.workspacePullStates)this.documentPullStates.has(n)&&(r=this.documentPullStates.get(n)),r.resultId!==void 0&&e.push({uri:n,value:r.resultId});return e}},ib=class{isDisposed;client;visibleDocuments;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,n,r){this.client=e,this.visibleDocuments=n,this.options=r,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new Qt.EventEmitter,this.provider=this.createProvider(),this.diagnostics=Qt.languages.createDiagnosticCollection(r.identifier),this.openRequests=new Map,this.documentStates=new rb,this.workspaceErrorCounter=0}knows(e,n){let r=n instanceof Qt.Uri?n:n.uri;return this.documentStates.tracks(e,n)||this.openRequests.has(r.toString())}knowsSameVersion(e,n){let r=this.openRequests.get(n.uri.toString());return r===void 0?this.documentStates.tracksSameVersion(e,n):r.state===ar.reschedule?!0:r.state===ar.outDated?!1:r.version===n.version}forget(e,n){this.documentStates.unTrack(e,n)}pull(e,n){if(this.isDisposed)return;let r=e instanceof Qt.Uri?e:e.uri;this.pullAsync(e).then(()=>{n&&n()},i=>{this.client.error(`Document pull failed for text document ${r.toString()}`,i,!1)})}async pullAsync(e,n){if(this.isDisposed)return;let r=e instanceof Qt.Uri,i=r?e:e.uri,o=i.toString();n=r?n:e.version;let s=this.openRequests.get(o),a=r?this.documentStates.track(Mn.document,e,n):this.documentStates.track(Mn.document,e);if(s===void 0){let c=new Qt.CancellationTokenSource;this.openRequests.set(o,{state:ar.active,document:e,version:n,tokenSource:c});let u,l;try{u=await this.provider.provideDiagnostics(e,a.resultId,c.token)??{kind:Mi.DocumentDiagnosticReportKind.full,items:[]}}catch(d){if(d instanceof nb.LSPCancellationError&&zt.DiagnosticServerCancellationData.is(d.data)&&d.data.retriggerRequest===!1&&(l={state:ar.outDated,document:e}),l===void 0&&d instanceof Qt.CancellationError)l={state:ar.reschedule,document:e};else throw d}if(l=l??this.openRequests.get(o),l===void 0){this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${o}`),this.diagnostics.delete(i);return}if(this.openRequests.delete(o),!this.visibleDocuments.isVisible(e)){this.documentStates.unTrack(Mn.document,e);return}if(l.state===ar.outDated)return;u!==void 0&&(u.kind===Mi.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,u.items),a.pulledVersion=n,a.resultId=u.resultId),l.state===ar.reschedule&&this.pull(e)}else s.state===ar.active?(s.tokenSource.cancel(),this.openRequests.set(o,{state:ar.reschedule,document:s.document})):s.state===ar.outDated&&this.openRequests.set(o,{state:ar.reschedule,document:s.document})}forgetDocument(e){if(this.isDisposed)return;let n=e instanceof Qt.Uri?e:e.uri,r=n.toString(),i=this.openRequests.get(r);this.options.workspaceDiagnostics&&n.scheme!=="untitled"?(i!==void 0?this.openRequests.set(r,{state:ar.reschedule,document:e}):this.pull(e,()=>{this.forget(Mn.document,e)}),this.forget(Mn.workspace,e)):(i!==void 0&&(i.state===ar.active&&i.tokenSource.cancel(),this.openRequests.set(r,{state:ar.outDated,document:e})),this.diagnostics.delete(n),this.forget(Mn.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then(()=>{this.workspaceTimeout=(0,zt.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3)},e=>{!(e instanceof nb.LSPCancellationError)&&!zt.DiagnosticServerCancellationData.is(e.data)&&(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,zt.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3))})}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;this.workspaceCancellation!==void 0&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new Qt.CancellationTokenSource;let e=this.documentStates.getAllResultIds().map(n=>({uri:this.client.protocol2CodeConverter.asUri(n.uri),value:n.value}));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,n=>{if(!(!n||this.isDisposed))for(let r of n.items)r.kind===Mi.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(Mn.document,r.uri)||this.diagnostics.set(r.uri,r.items)),this.documentStates.update(Mn.workspace,r.uri,r.version??void 0,r.resultId)})}createProvider(){let e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(n,r,i)=>{let o=(a,c,u)=>{let l={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(a instanceof Qt.Uri?a:a.uri)},previousResultId:c};return this.isDisposed===!0||!this.client.isRunning()?{kind:Mi.DocumentDiagnosticReportKind.full,items:[]}:this.client.sendRequest(zt.DocumentDiagnosticRequest.type,l,u).then(async d=>d==null||this.isDisposed||u.isCancellationRequested?{kind:Mi.DocumentDiagnosticReportKind.full,items:[]}:d.kind===zt.DocumentDiagnosticReportKind.Full?{kind:Mi.DocumentDiagnosticReportKind.full,resultId:d.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(d.items,u)}:{kind:Mi.DocumentDiagnosticReportKind.unChanged,resultId:d.resultId},d=>this.client.handleFailedRequest(zt.DocumentDiagnosticRequest.type,u,d,{kind:Mi.DocumentDiagnosticReportKind.full,items:[]},!0,!0))},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(n,r,i,o):o(n,r,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(n,r,i)=>{let o=async u=>u.kind===zt.DocumentDiagnosticReportKind.Full?{kind:Mi.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(u.uri),resultId:u.resultId,version:u.version,items:await this.client.protocol2CodeConverter.asDiagnostics(u.items,r)}:{kind:Mi.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(u.uri),resultId:u.resultId,version:u.version},s=u=>{let l=[];for(let d of u)l.push({uri:this.client.code2ProtocolConverter.asUri(d.uri),value:d.value});return l},a=(u,l,d)=>{let f=(0,d$.generateUuid)(),g=this.client.onProgress(zt.WorkspaceDiagnosticRequest.partialResult,f,async _=>{if(_==null){d(null);return}let S={items:[]};for(let b of _.items)try{S.items.push(await o(b))}catch(v){this.client.error("Converting workspace diagnostics failed.",v)}d(S)}),h={identifier:this.options.identifier,previousResultIds:s(u),partialResultToken:f};return this.isDisposed===!0||!this.client.isRunning()?{items:[]}:this.client.sendRequest(zt.WorkspaceDiagnosticRequest.type,h,l).then(async _=>{if(l.isCancellationRequested)return{items:[]};let S={items:[]};for(let b of _.items)S.items.push(await o(b));return g.dispose(),d(S),{items:[]}},_=>(g.dispose(),this.client.handleFailedRequest(zt.DocumentDiagnosticRequest.type,l,_,{items:[]})))},c=this.client.middleware;return c.provideWorkspaceDiagnostics?c.provideWorkspaceDiagnostics(n,r,i,a):a(n,r,i)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(let[e,n]of this.openRequests)n.state===ar.active&&n.tokenSource.cancel(),this.openRequests.set(e,{state:ar.outDated,document:n.document});this.diagnostics.dispose()}},ob=class{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,n){this.client=e,this.diagnosticRequestor=n,this.documents=new zt.LinkedMap,this.isDisposed=!1}add(e){if(this.isDisposed===!0)return;let n=Ls.asKey(e);this.documents.has(n)||(this.documents.set(n,e,zt.Touch.Last),this.lastDocumentToPull=e)}remove(e){let n=Ls.asKey(e);if(this.documents.delete(n),this.documents.size===0){this.stop();return}else if(n===this.lastDocumentToPullKey()){let r=this.documents.before(n);r===void 0?this.stop():this.lastDocumentToPull=r}}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){if(this.isDisposed!==!0){if(this.documents.size===0){this.stop();return}this.lastDocumentToPull!==void 0&&this.timeoutHandle===void 0&&(this.timeoutHandle=(0,zt.RAL)().timer.setTimeout(()=>{let e=this.documents.first;if(e===void 0)return;let n=Ls.asKey(e);this.diagnosticRequestor.pullAsync(e).catch(r=>{this.client.error(`Document pull failed for text document ${n}`,r,!1)}).finally(()=>{this.timeoutHandle=void 0,this.documents.set(n,e,zt.Touch.Last),n!==this.lastDocumentToPullKey()&&this.runLoop()})},500))}}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return this.lastDocumentToPull!==void 0?Ls.asKey(this.lastDocumentToPull):void 0}},sb=class{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,n,r){let i=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),o=e.protocol2CodeConverter.asDocumentSelector(r.documentSelector),s=[],a=(v,E)=>!(typeof v=="string"||v.language!==void 0&&v.language!=="*"||v.scheme!==void 0&&v.scheme!=="*"&&v.scheme!==E.scheme||v.pattern!==void 0&&!(0,p$.matchGlobPattern)(v.pattern,E)),c=v=>{let E=r.documentSelector;if(i.match!==void 0)return i.match(E,v);for(let x of E)if(zt.TextDocumentFilter.is(x)&&a(x,v))return!0;return!1},u=v=>v instanceof Qt.Uri?c(v):Qt.languages.match(o,v)>0&&n.isVisible(v),l=v=>Qt.languages.match(o,v.document)>0&&n.isVisible(v.notebook.uri),d=v=>v instanceof Qt.Uri?this.activeTextDocument?.uri.toString()===v.toString():this.activeTextDocument===v;this.diagnosticRequestor=new ib(e,n,r),this.backgroundScheduler=new ob(e,this.diagnosticRequestor);let f=v=>{!u(v)||!r.interFileDependencies||d(v)||i.onChange===!1||this.backgroundScheduler.add(v)},g=(v,E)=>(i.filter===void 0||!i.filter(v,E))&&this.diagnosticRequestor.knows(Mn.document,v);this.activeTextDocument=Qt.window.activeTextEditor?.document,s.push(Qt.window.onDidChangeActiveTextEditor(v=>{let E=this.activeTextDocument;this.activeTextDocument=v?.document,E!==void 0&&f(E),this.activeTextDocument!==void 0&&(this.backgroundScheduler.remove(this.activeTextDocument),i.onFocus===!0&&u(this.activeTextDocument)&&g(this.activeTextDocument,tp.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))}));let h=e.getFeature(zt.DidOpenTextDocumentNotification.method);s.push(h.onNotificationSent(v=>{let E=v.textDocument;this.diagnosticRequestor.knowsSameVersion(Mn.document,E)||u(E)&&this.diagnosticRequestor.pull(E,()=>{f(E)})}));let _=e.getFeature(zt.NotebookDocumentSyncRegistrationType.method);s.push(_.onOpenNotificationSent(v=>{for(let E of v.getCells())l(E)&&this.diagnosticRequestor.pull(E.document,()=>{f(E.document)})})),s.push(n.onOpen(v=>{for(let E of v){if(this.diagnosticRequestor.knows(Mn.document,E))continue;let x=E.toString(),P;for(let T of Qt.workspace.textDocuments)if(x===T.uri.toString()){P=T;break}P!==void 0&&u(P)&&this.diagnosticRequestor.pull(P,()=>{f(P)})}}));let S=new Set;for(let v of Qt.workspace.textDocuments)u(v)&&(this.diagnosticRequestor.pull(v,()=>{f(v)}),S.add(v.uri.toString()));for(let v of Qt.workspace.notebookDocuments)for(let E of v.getCells())l(E)&&(this.diagnosticRequestor.pull(E.document,()=>{f(E.document)}),S.add(E.document.uri.toString()));if(i.onTabs===!0)for(let v of n.getResources())!S.has(v.toString())&&u(v)&&this.diagnosticRequestor.pull(v,()=>{f(v)});if(i.onChange===!0){let v=e.getFeature(zt.DidChangeTextDocumentNotification.method);s.push(v.onNotificationSent(async E=>{let x=E.textDocument;g(x,tp.onType)&&this.diagnosticRequestor.pull(x,()=>{this.backgroundScheduler.trigger()})})),s.push(_.onChangeNotificationSent(async E=>{let P=(E.cells?.textContent||[]).map(M=>E.notebook.getCells().find(q=>q.document.uri.toString()===M.document.uri.toString()));for(let M of P)M&&l(M)&&this.diagnosticRequestor.pull(M.document,()=>{this.backgroundScheduler.trigger()});let T=E.cells?.structure?.didClose||[];for(let M of T)this.diagnosticRequestor.forgetDocument(M.document);let N=E.cells?.structure?.didOpen||[];for(let M of N)l(M)&&this.diagnosticRequestor.pull(M.document,()=>{this.backgroundScheduler.trigger()})}))}if(i.onSave===!0){let v=e.getFeature(zt.DidSaveTextDocumentNotification.method);s.push(v.onNotificationSent(E=>{let x=E.textDocument;g(x,tp.onSave)&&this.diagnosticRequestor.pull(E.textDocument)})),s.push(_.onSaveNotificationSent(E=>{for(let x of E.getCells())l(x)&&this.diagnosticRequestor.pull(x.document)}))}let b=e.getFeature(zt.DidCloseTextDocumentNotification.method);s.push(b.onNotificationSent(v=>{this.cleanUpDocument(v.textDocument)})),s.push(_.onCloseNotificationSent(v=>{for(let E of v.getCells())this.cleanUpDocument(E.document)})),s.push(n.onClose(v=>{for(let E of v)this.cleanUpDocument(E)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(let v of Qt.workspace.textDocuments)u(v)&&this.diagnosticRequestor.pull(v)}),r.workspaceDiagnostics===!0&&r.identifier!=="da348dc5-c30a-4515-9d98-31ff3be38d14"&&this.diagnosticRequestor.pullWorkspace(),this.disposable=Qt.Disposable.from(...s,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(Mn.document,e)&&this.diagnosticRequestor.forgetDocument(e)}},ab=class extends nb.TextDocumentLanguageFeature{constructor(e){super(e,zt.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let n=o_(o_(e,"textDocument"),"diagnostic");n.relatedInformation=!0,n.tagSupport={valueSet:[zt.DiagnosticTag.Unnecessary,zt.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0,n.dynamicRegistration=!0,n.relatedDocumentSupport=!1,n.markupMessageSupport=!1,o_(o_(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,n){this._client.onRequest(zt.DiagnosticRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeDiagnosticsEmitter.fire()});let[i,o]=this.getRegistration(n,e.diagnosticProvider);!i||!o||this.register({id:i,registerOptions:o})}clear(){super.clear()}refresh(){for(let e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){let n=new sb(this._client,this._client.visibleDocuments,e);return[n.disposable,n]}};Wa.DiagnosticFeature=ab});var s_=V(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.Semaphore=Zi.Delayer=void 0;Zi.setTestMode=h$;Zi.clearTestMode=g$;Zi.map=_$;Zi.mapAsync=m$;Zi.forEach=v$;var rp=et(),ub=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,n=this.defaultDelay){return this.task=e,n>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(r=>{this.onSuccess=r}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let r=this.task();return this.task=void 0,r})),(n>=0||this.timeout===void 0)&&(this.timeout=(0,rp.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},n>=0?n:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};Zi.Delayer=ub;var lb=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,rp.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}};Zi.Semaphore=lb;var fb=!1;function h$(){fb=!0}function g$(){fb=!1}var GI=15,np=class{yieldAfter;startTime;counter;total;counterInterval;constructor(e=GI){this.yieldAfter=fb===!0?Math.max(e,2):Math.max(e,GI),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,n=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||n<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}};async function _$(t,e,n,r){if(t.length===0)return[];let i=new Array(t.length),o=new np(r?.yieldAfter);function s(c){o.start();for(let u=c;u<t.length;u++)if(i[u]=e(t[u]),o.shouldYield())return r?.yieldCallback&&r.yieldCallback(),u+1;return-1}let a=s(0);for(;a!==-1&&!(n!==void 0&&n.isCancellationRequested);)a=await new Promise(c=>{(0,rp.RAL)().timer.setImmediate(()=>{n!==void 0&&n.isCancellationRequested?c(-1):c(s(a))})});return i}async function m$(t,e,n,r){if(t.length===0)return[];let i=new Array(t.length),o=new np(r?.yieldAfter);async function s(c){o.start();for(let u=c;u<t.length;u++)if(i[u]=await e(t[u],n),o.shouldYield())return r?.yieldCallback&&r.yieldCallback(),u+1;return-1}let a=await s(0);for(;a!==-1&&!(n!==void 0&&n.isCancellationRequested);)a=await new Promise(c=>{(0,rp.RAL)().timer.setImmediate(()=>{n!==void 0&&n.isCancellationRequested?c(-1):c(s(a))})});return i}async function v$(t,e,n,r){if(t.length===0)return;let i=new np(r?.yieldAfter);function o(a){i.start();for(let c=a;c<t.length;c++)if(e(t[c]),i.shouldYield())return r?.yieldCallback&&r.yieldCallback(),c+1;return-1}let s=o(0);for(;s!==-1&&!(n!==void 0&&n.isCancellationRequested);)s=await new Promise(a=>{(0,rp.RAL)().timer.setImmediate(()=>{n!==void 0&&n.isCancellationRequested?a(-1):a(o(s))})})}});var pb=V(Fs=>{"use strict";var y$=Fs&&Fs.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),S$=Fs&&Fs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),D$=Fs&&Fs.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&y$(n,e,r[i]);return S$(n,e),n}})();Object.defineProperty(Fs,"__esModule",{value:!0});var E$=D$(require("vscode")),db=class extends E$.CompletionItem{data;fromEdit;documentationFormat;originalItemKind;deprecated;insertTextMode;constructor(e){super(e)}};Fs.default=db});var gb=V(js=>{"use strict";var b$=js&&js.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),C$=js&&js.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),T$=js&&js.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&b$(n,e,r[i]);return C$(n,e),n}})();Object.defineProperty(js,"__esModule",{value:!0});var w$=T$(require("vscode")),hb=class extends w$.CodeLens{data;constructor(e){super(e)}};js.default=hb});var mb=V(qs=>{"use strict";var N$=qs&&qs.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),P$=qs&&qs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),R$=qs&&qs.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&N$(n,e,r[i]);return P$(n,e),n}})();Object.defineProperty(qs,"__esModule",{value:!0});var O$=R$(require("vscode")),_b=class extends O$.DocumentLink{data;constructor(e,n){super(e,n)}};qs.default=_b});var yb=V(Us=>{"use strict";var x$=Us&&Us.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),I$=Us&&Us.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),A$=Us&&Us.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&x$(n,e,r[i]);return I$(n,e),n}})();Object.defineProperty(Us,"__esModule",{value:!0});var M$=A$(require("vscode")),vb=class extends M$.CodeAction{data;constructor(e,n){super(e),this.data=n}};Us.default=vb});var Eb=V(Li=>{"use strict";var L$=Li&&Li.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),F$=Li&&Li.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zI=Li&&Li.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&L$(n,e,r[i]);return F$(n,e),n}})();Object.defineProperty(Li,"__esModule",{value:!0});Li.ProtocolDiagnostic=Li.DiagnosticCode=void 0;var j$=zI(require("vscode")),Sb=zI(Ii()),WI;(function(t){function e(n){let r=n;return r!=null&&(Sb.number(r.value)||Sb.string(r.value))&&Sb.string(r.target)}t.is=e})(WI||(Li.DiagnosticCode=WI={}));var Db=class extends j$.Diagnostic{data;hasDiagnosticCode;constructor(e,n,r,i){super(e,n,r),this.data=i,this.hasDiagnosticCode=!1}};Li.ProtocolDiagnostic=Db});var Cb=V(Ys=>{"use strict";var q$=Ys&&Ys.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),U$=Ys&&Ys.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Y$=Ys&&Ys.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&q$(n,e,r[i]);return U$(n,e),n}})();Object.defineProperty(Ys,"__esModule",{value:!0});var k$=Y$(require("vscode")),bb=class extends k$.CallHierarchyItem{data;constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,s),a!==void 0&&(this.data=a)}};Ys.default=bb});var wb=V(ks=>{"use strict";var H$=ks&&ks.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),$$=ks&&ks.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),B$=ks&&ks.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&H$(n,e,r[i]);return $$(n,e),n}})();Object.defineProperty(ks,"__esModule",{value:!0});var G$=B$(require("vscode")),Tb=class extends G$.TypeHierarchyItem{data;constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,s),a!==void 0&&(this.data=a)}};ks.default=Tb});var Pb=V(Hs=>{"use strict";var W$=Hs&&Hs.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),z$=Hs&&Hs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),K$=Hs&&Hs.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&W$(n,e,r[i]);return z$(n,e),n}})();Object.defineProperty(Hs,"__esModule",{value:!0});var a_=K$(require("vscode")),Nb=class extends a_.SymbolInformation{data;hasRange;constructor(e,n,r,i,o){let s=!(i instanceof a_.Uri);super(e,n,r,s?i:new a_.Location(i,new a_.Range(0,0,0,0))),this.hasRange=s,o!==void 0&&(this.data=o)}};Hs.default=Nb});var Ob=V($s=>{"use strict";var V$=$s&&$s.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),X$=$s&&$s.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),J$=$s&&$s.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&V$(n,e,r[i]);return X$(n,e),n}})();Object.defineProperty($s,"__esModule",{value:!0});var Q$=J$(require("vscode")),Rb=class extends Q$.InlayHint{data;constructor(e,n,r){super(e,n,r)}};$s.default=Rb});var JI=V(eo=>{"use strict";var Z$=eo&&eo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),eB=eo&&eo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),c_=eo&&eo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&Z$(n,e,r[i]);return eB(n,e),n}})(),za=eo&&eo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(eo,"__esModule",{value:!0});eo.createConverter=cB;var _n=c_(require("vscode")),Qe=c_(et()),au=c_(Ii()),KI=c_(s_()),tB=za(pb()),nB=za(gb()),rB=za(mb()),VI=za(yb()),XI=Eb(),iB=za(Cb()),oB=za(wb()),sB=za(Pb()),aB=za(Ob()),xb;(function(t){function e(n){let r=n;return r&&!!r.inserting&&!!r.replacing}t.is=e})(xb||(xb={}));function cB(t){let n=t||(m=>m.toString());function r(m){return n(m)}function i(m){return{uri:n(m.uri)}}function o(m){return{uri:n(m.uri),languageId:m.languageId,version:m.version,text:m.getText()}}function s(m){return{uri:n(m.uri),version:m.version}}function a(m){return{textDocument:o(m)}}function c(m){let G=m;return!!G.document&&!!G.contentChanges}function u(m){let G=m;return!!G.uri&&!!G.version}function l(m,G,Se){if(u(m))return{textDocument:{uri:n(m.uri),version:m.version},contentChanges:[{text:m.getText()}]};if(c(m)){let pt=G,_t=Se;return{textDocument:{uri:n(pt),version:_t},contentChanges:m.contentChanges.map(hr=>{let Br=hr.range;return{range:{start:{line:Br.start.line,character:Br.start.character},end:{line:Br.end.line,character:Br.end.character}},rangeLength:hr.rangeLength,text:hr.text}})}}else throw Error("Unsupported text document change parameter")}function d(m){return{textDocument:i(m)}}function f(m,G=!1){let Se={textDocument:i(m)};return G&&(Se.text=m.getText()),Se}function g(m){switch(m){case _n.TextDocumentSaveReason.Manual:return Qe.TextDocumentSaveReason.Manual;case _n.TextDocumentSaveReason.AfterDelay:return Qe.TextDocumentSaveReason.AfterDelay;case _n.TextDocumentSaveReason.FocusOut:return Qe.TextDocumentSaveReason.FocusOut}return Qe.TextDocumentSaveReason.Manual}function h(m){return{textDocument:i(m.document),reason:g(m.reason)}}function _(m){return{files:m.files.map(G=>({uri:n(G)}))}}function S(m){return{files:m.files.map(G=>({oldUri:n(G.oldUri),newUri:n(G.newUri)}))}}function b(m){return{files:m.files.map(G=>({uri:n(G)}))}}function v(m){return{files:m.files.map(G=>({uri:n(G)}))}}function E(m){return{files:m.files.map(G=>({oldUri:n(G.oldUri),newUri:n(G.newUri)}))}}function x(m){return{files:m.files.map(G=>({uri:n(G)}))}}function P(m,G){return{textDocument:i(m),position:Y(G)}}function T(m){switch(m){case _n.CompletionTriggerKind.TriggerCharacter:return Qe.CompletionTriggerKind.TriggerCharacter;case _n.CompletionTriggerKind.TriggerForIncompleteCompletions:return Qe.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return Qe.CompletionTriggerKind.Invoked}}function N(m,G,Se){return{textDocument:i(m),position:Y(G),context:{triggerKind:T(Se.triggerKind),triggerCharacter:Se.triggerCharacter}}}function M(m){switch(m){case _n.SignatureHelpTriggerKind.Invoke:return Qe.SignatureHelpTriggerKind.Invoked;case _n.SignatureHelpTriggerKind.TriggerCharacter:return Qe.SignatureHelpTriggerKind.TriggerCharacter;case _n.SignatureHelpTriggerKind.ContentChange:return Qe.SignatureHelpTriggerKind.ContentChange}}function q(m){return{label:m.label}}function k(m){return m.map(q)}function W(m){return{label:m.label,parameters:k(m.parameters)}}function ne(m){return m.map(W)}function he(m){return m===void 0?m:{signatures:ne(m.signatures),activeSignature:m.activeSignature,activeParameter:m.activeParameter}}function R(m,G,Se){return{textDocument:i(m),position:Y(G),context:{isRetrigger:Se.isRetrigger,triggerCharacter:Se.triggerCharacter,triggerKind:M(Se.triggerKind),activeSignatureHelp:he(Se.activeSignatureHelp)}}}function Y(m){return{line:m.line,character:m.character}}function Z(m){return m==null?m:{line:m.line>Qe.uinteger.MAX_VALUE?Qe.uinteger.MAX_VALUE:m.line,character:m.character>Qe.uinteger.MAX_VALUE?Qe.uinteger.MAX_VALUE:m.character}}function oe(m,G){return KI.map(m,Z,G)}function U(m){return m.map(Z)}function re(m){return m==null?m:{start:Z(m.start),end:Z(m.end)}}function L(m){return m.map(re)}function K(m){return m==null?m:Qe.Location.create(r(m.uri),re(m.range))}function z(m){switch(m){case _n.DiagnosticSeverity.Error:return Qe.DiagnosticSeverity.Error;case _n.DiagnosticSeverity.Warning:return Qe.DiagnosticSeverity.Warning;case _n.DiagnosticSeverity.Information:return Qe.DiagnosticSeverity.Information;case _n.DiagnosticSeverity.Hint:return Qe.DiagnosticSeverity.Hint}}function j(m){if(!m)return;let G=[];for(let Se of m){let pt=_e(Se);pt!==void 0&&G.push(pt)}return G.length>0?G:void 0}function _e(m){switch(m){case _n.DiagnosticTag.Unnecessary:return Qe.DiagnosticTag.Unnecessary;case _n.DiagnosticTag.Deprecated:return Qe.DiagnosticTag.Deprecated;default:return}}function ye(m){return{message:m.message,location:K(m.location)}}function Fe(m){return m.map(ye)}function Pe(m){if(m!=null)return au.number(m)||au.string(m)?m:{value:m.value,target:r(m.target)}}function lt(m){let G=Qe.Diagnostic.create(re(m.range),m.message),Se=m instanceof XI.ProtocolDiagnostic?m:void 0;Se!==void 0&&Se.data!==void 0&&(G.data=Se.data);let pt=Pe(m.code);return XI.DiagnosticCode.is(pt)?Se!==void 0&&Se.hasDiagnosticCode?G.code=pt:(G.code=pt.value,G.codeDescription={href:pt.target}):G.code=pt,au.number(m.severity)&&(G.severity=z(m.severity)),Array.isArray(m.tags)&&(G.tags=j(m.tags)),m.relatedInformation&&(G.relatedInformation=Fe(m.relatedInformation)),m.source&&(G.source=m.source),G}function Dt(m,G){return m==null?m:KI.map(m,lt,G)}function Lt(m){return m==null?m:m.map(lt)}function Cn(m,G){switch(m){case"$string":return G;case Qe.MarkupKind.PlainText:return{kind:m,value:G};case Qe.MarkupKind.Markdown:return{kind:m,value:G.value};default:return`Unsupported Markup content received. Kind is: ${m}`}}function vt(m){if(m===_n.CompletionItemTag.Deprecated)return Qe.CompletionItemTag.Deprecated}function Ze(m){if(m===void 0)return m;let G=[];for(let Se of m){let pt=vt(Se);pt!==void 0&&G.push(pt)}return G}function It(m,G){return G!==void 0?G:m+1}function ht(m,G=!1){let Se,pt;au.string(m.label)?Se=m.label:(Se=m.label.label,G&&(m.label.detail!==void 0||m.label.description!==void 0)&&(pt={detail:m.label.detail,description:m.label.description}));let _t={label:Se};pt!==void 0&&(_t.labelDetails=pt);let Wn=m instanceof tB.default?m:void 0;m.detail&&(_t.detail=m.detail),m.documentation&&(!Wn||Wn.documentationFormat==="$string"?_t.documentation=m.documentation:_t.documentation=Cn(Wn.documentationFormat,m.documentation)),m.filterText&&(_t.filterText=m.filterText),X(_t,m),au.number(m.kind)&&(_t.kind=It(m.kind,Wn&&Wn.originalItemKind)),m.sortText&&(_t.sortText=m.sortText),m.additionalTextEdits&&(_t.additionalTextEdits=be(m.additionalTextEdits)),m.commitCharacters&&(_t.commitCharacters=m.commitCharacters.slice()),m.command&&(_t.command=ve(m.command)),(m.preselect===!0||m.preselect===!1)&&(_t.preselect=m.preselect);let hr=Ze(m.tags);if(Wn){if(Wn.data!==void 0&&(_t.data=Wn.data),Wn.deprecated===!0||Wn.deprecated===!1){if(Wn.deprecated===!0&&hr!==void 0&&hr.length>0){let Br=hr.indexOf(_n.CompletionItemTag.Deprecated);Br!==-1&&hr.splice(Br,1)}_t.deprecated=Wn.deprecated}Wn.insertTextMode!==void 0&&(_t.insertTextMode=Wn.insertTextMode)}return hr!==void 0&&hr.length>0&&(_t.tags=hr),_t.insertTextMode===void 0&&m.keepWhitespace===!0&&(_t.insertTextMode=Qe.InsertTextMode.adjustIndentation),_t}function X(m,G){let Se=Qe.InsertTextFormat.PlainText,pt,_t;G.textEdit?(pt=G.textEdit.newText,_t=G.textEdit.range):G.insertText instanceof _n.SnippetString?(Se=Qe.InsertTextFormat.Snippet,pt=G.insertText.value):pt=G.insertText,G.range&&(_t=G.range),m.insertTextFormat=Se,G.fromEdit&&pt!==void 0&&_t!==void 0?m.textEdit=me(pt,_t):m.insertText=pt}function me(m,G){return xb.is(G)?Qe.InsertReplaceEdit.create(m,re(G.inserting),re(G.replacing)):{newText:m,range:re(G)}}function Re(m){return{range:re(m.range),newText:m.newText}}function be(m){return m==null?m:m.map(Re)}function Te(m){return m<=_n.SymbolKind.TypeParameter?m+1:Qe.SymbolKind.Property}function Je(m){return m}function ke(m){return m.map(Je)}function gt(m,G,Se){return{textDocument:i(m),position:Y(G),context:{includeDeclaration:Se.includeDeclaration}}}async function ct(m,G){let Se=Qe.CodeAction.create(m.title);if(m instanceof VI.default&&m.data!==void 0&&(Se.data=m.data),m.kind!==void 0&&(Se.kind=Pt(m.kind)),m.diagnostics!==void 0&&(Se.diagnostics=await Dt(m.diagnostics,G)),m.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return m.command!==void 0&&(Se.command=ve(m.command)),m.isPreferred!==void 0&&(Se.isPreferred=m.isPreferred),m.disabled!==void 0&&(Se.disabled={reason:m.disabled.reason}),m.isAI&&(Se.tags??=[],Se.tags.push(Qe.CodeActionTag.LLMGenerated)),Se}function wt(m){let G=Qe.CodeAction.create(m.title);if(m instanceof VI.default&&m.data!==void 0&&(G.data=m.data),m.kind!==void 0&&(G.kind=Pt(m.kind)),m.diagnostics!==void 0&&(G.diagnostics=Lt(m.diagnostics)),m.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return m.command!==void 0&&(G.command=ve(m.command)),m.isPreferred!==void 0&&(G.isPreferred=m.isPreferred),m.disabled!==void 0&&(G.disabled={reason:m.disabled.reason}),m.isAI&&(G.tags??=[],G.tags.push(Qe.CodeActionTag.LLMGenerated)),G}async function rn(m,G){if(m==null)return m;let Se;return m.only&&au.string(m.only.value)&&(Se=[m.only.value]),Qe.CodeActionContext.create(await Dt(m.diagnostics,G),Se,Tn(m.triggerKind))}function Jt(m){if(m==null)return m;let G;return m.only&&au.string(m.only.value)&&(G=[m.only.value]),Qe.CodeActionContext.create(Lt(m.diagnostics),G,Tn(m.triggerKind))}function Tn(m){switch(m){case _n.CodeActionTriggerKind.Invoke:return Qe.CodeActionTriggerKind.Invoked;case _n.CodeActionTriggerKind.Automatic:return Qe.CodeActionTriggerKind.Automatic;default:return}}function Pt(m){if(m!=null)return m.value}function O(m){return Qe.InlineValueContext.create(m.frameId,re(m.stoppedLocation))}function D(m,G,Se){return{textDocument:i(m),position:Z(G),context:F(Se)}}function F(m){return{triggerKind:$(m.triggerKind),selectedCompletionInfo:ue(m.selectedCompletionInfo)}}function $(m){switch(m){case _n.InlineCompletionTriggerKind.Invoke:return Qe.InlineCompletionTriggerKind.Invoked;case _n.InlineCompletionTriggerKind.Automatic:return Qe.InlineCompletionTriggerKind.Automatic}}function ue(m){if(m!=null)return{range:re(m.range),text:m.text}}function ve(m){let G=Qe.Command.create(m.title,m.command);return m.tooltip&&(G.tooltip=m.tooltip),m.arguments&&(G.arguments=m.arguments),G}function Ce(m){let G=Qe.CodeLens.create(re(m.range));return m.command&&(G.command=ve(m.command)),m instanceof nB.default&&m.data&&(G.data=m.data),G}function ge(m,G){let Se={tabSize:m.tabSize,insertSpaces:m.insertSpaces};return G.trimTrailingWhitespace&&(Se.trimTrailingWhitespace=!0),G.trimFinalNewlines&&(Se.trimFinalNewlines=!0),G.insertFinalNewline&&(Se.insertFinalNewline=!0),Se}function y(m){return{textDocument:i(m)}}function C(m){return{textDocument:i(m)}}function I(m){let G=Qe.DocumentLink.create(re(m.range));m.target&&(G.target=r(m.target)),m.tooltip!==void 0&&(G.tooltip=m.tooltip);let Se=m instanceof rB.default?m:void 0;return Se&&Se.data&&(G.data=Se.data),G}function B(m){return{textDocument:i(m)}}function Q(m){let G={name:m.name,kind:Te(m.kind),uri:r(m.uri),range:re(m.range),selectionRange:re(m.selectionRange)};return m.detail!==void 0&&m.detail.length>0&&(G.detail=m.detail),m.tags!==void 0&&(G.tags=ke(m.tags)),m instanceof iB.default&&m.data!==void 0&&(G.data=m.data),G}function ae(m){let G={name:m.name,kind:Te(m.kind),uri:r(m.uri),range:re(m.range),selectionRange:re(m.selectionRange)};return m.detail!==void 0&&m.detail.length>0&&(G.detail=m.detail),m.tags!==void 0&&(G.tags=ke(m.tags)),m instanceof oB.default&&m.data!==void 0&&(G.data=m.data),G}function de(m){let G=m instanceof sB.default?{name:m.name,kind:Te(m.kind),location:m.hasRange?K(m.location):{uri:n(m.location.uri)},data:m.data}:{name:m.name,kind:Te(m.kind),location:K(m.location)};return m.tags!==void 0&&(G.tags=ke(m.tags)),m.containerName!==""&&(G.containerName=m.containerName),G}function Me(m){let G=typeof m.label=="string"?m.label:m.label.map(tt),Se=Qe.InlayHint.create(Z(m.position),G);return m.kind!==void 0&&(Se.kind=m.kind),m.textEdits!==void 0&&(Se.textEdits=be(m.textEdits)),m.tooltip!==void 0&&(Se.tooltip=Ue(m.tooltip)),m.paddingLeft!==void 0&&(Se.paddingLeft=m.paddingLeft),m.paddingRight!==void 0&&(Se.paddingRight=m.paddingRight),m instanceof aB.default&&m.data!==void 0&&(Se.data=m.data),Se}function tt(m){let G=Qe.InlayHintLabelPart.create(m.value);return m.location!==void 0&&(G.location=K(m.location)),m.command!==void 0&&(G.command=ve(m.command)),m.tooltip!==void 0&&(G.tooltip=Ue(m.tooltip)),G}function Ue(m){return typeof m=="string"?m:{kind:Qe.MarkupKind.Markdown,value:m.value}}return{asUri:r,asTextDocumentIdentifier:i,asTextDocumentItem:o,asVersionedTextDocumentIdentifier:s,asOpenTextDocumentParams:a,asChangeTextDocumentParams:l,asCloseTextDocumentParams:d,asSaveTextDocumentParams:f,asWillSaveTextDocumentParams:h,asDidCreateFilesParams:_,asDidRenameFilesParams:S,asDidDeleteFilesParams:b,asWillCreateFilesParams:v,asWillRenameFilesParams:E,asWillDeleteFilesParams:x,asTextDocumentPositionParams:P,asCompletionParams:N,asSignatureHelpParams:R,asWorkerPosition:Y,asRange:re,asRanges:L,asPosition:Z,asPositions:oe,asPositionsSync:U,asLocation:K,asDiagnosticSeverity:z,asDiagnosticTag:_e,asDiagnostic:lt,asDiagnostics:Dt,asDiagnosticsSync:Lt,asCompletionItem:ht,asTextEdit:Re,asSymbolKind:Te,asSymbolTag:Je,asSymbolTags:ke,asReferenceParams:gt,asCodeAction:ct,asCodeActionSync:wt,asCodeActionContext:rn,asCodeActionContextSync:Jt,asInlineValueContext:O,asCommand:ve,asCodeLens:Ce,asFormattingOptions:ge,asDocumentSymbolParams:y,asCodeLensParams:C,asDocumentLink:I,asDocumentLinkParams:B,asCallHierarchyItem:Q,asTypeHierarchyItem:ae,asInlayHint:Me,asWorkspaceSymbol:de,asInlineCompletionParams:D,asInlineCompletionContext:F}}});var eA=V(to=>{"use strict";var uB=to&&to.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),lB=to&&to.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),l_=to&&to.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&uB(n,e,r[i]);return lB(n,e),n}})(),Ka=to&&to.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(to,"__esModule",{value:!0});to.createConverter=yB;var De=l_(require("vscode")),$e=l_(et()),hi=l_(Ii()),Ct=l_(s_()),fB=Ka(pb()),dB=Ka(gb()),pB=Ka(mb()),hB=Ka(yb()),QI=Eb(),gB=Ka(Cb()),_B=Ka(wb()),mB=Ka(Pb()),vB=Ka(Ob()),ZI=et(),u_;(function(t){function e(n){let r=n;return r&&hi.string(r.language)&&hi.string(r.value)}t.is=e})(u_||(u_={}));function yB(t,e,n,r){let o=t||(p=>De.Uri.parse(p));function s(p){return o(p)}function a(p){let A=[];for(let ee of p)if(typeof ee=="string")A.push(ee);else if(ZI.NotebookCellTextDocumentFilter.is(ee))if(typeof ee.notebook=="string")A.push({notebookType:ee.notebook,language:ee.language});else{let we=ee.notebook.notebookType??"*";A.push({notebookType:we,scheme:ee.notebook.scheme,pattern:rS(ee.notebook.pattern),language:ee.language})}else ZI.TextDocumentFilter.is(ee)&&A.push({language:ee.language,scheme:ee.scheme,pattern:rS(ee.pattern)});return A}async function c(p,A){return Ct.map(p,l,A)}function u(p){let A=new Array(p.length);for(let ee=0;ee<p.length;ee++)A[ee]=l(p[ee]);return A}function l(p){let A=typeof p.message=="string"?p.message:p.message.kind==="plaintext"?p.message.value:"Received a markup diagnostic message but the client does not support it.",ee=new QI.ProtocolDiagnostic(_(p.range),A,b(p.severity),p.data);if(p.code!==void 0){if(typeof p.code=="string"||typeof p.code=="number")$e.CodeDescription.is(p.codeDescription)?ee.code={value:p.code,target:s(p.codeDescription.href)}:ee.code=p.code;else if(QI.DiagnosticCode.is(p.code)){ee.hasDiagnosticCode=!0;let we=p.code;ee.code={value:we.value,target:s(we.target)}}}return p.source&&(ee.source=p.source),p.relatedInformation&&(ee.relatedInformation=d(p.relatedInformation)),Array.isArray(p.tags)&&(ee.tags=f(p.tags)),ee}function d(p){let A=new Array(p.length);for(let ee=0;ee<p.length;ee++){let we=p[ee];A[ee]=new De.DiagnosticRelatedInformation(ye(we.location),we.message)}return A}function f(p){if(!p)return;let A=[];for(let ee of p){let we=g(ee);we!==void 0&&A.push(we)}return A.length>0?A:void 0}function g(p){switch(p){case $e.DiagnosticTag.Unnecessary:return De.DiagnosticTag.Unnecessary;case $e.DiagnosticTag.Deprecated:return De.DiagnosticTag.Deprecated;default:return}}function h(p){return p?new De.Position(p.line,p.character):void 0}function _(p){return p?new De.Range(p.start.line,p.start.character,p.end.line,p.end.character):void 0}async function S(p,A){return Ct.map(p,ee=>new De.Range(ee.start.line,ee.start.character,ee.end.line,ee.end.character),A)}function b(p){if(p==null)return De.DiagnosticSeverity.Error;switch(p){case $e.DiagnosticSeverity.Error:return De.DiagnosticSeverity.Error;case $e.DiagnosticSeverity.Warning:return De.DiagnosticSeverity.Warning;case $e.DiagnosticSeverity.Information:return De.DiagnosticSeverity.Information;case $e.DiagnosticSeverity.Hint:return De.DiagnosticSeverity.Hint}return De.DiagnosticSeverity.Error}function v(p){if(hi.string(p))return x(p);if(u_.is(p))return x().appendCodeblock(p.value,p.language);if(Array.isArray(p)){let A=[];for(let ee of p){let we=x();u_.is(ee)?we.appendCodeblock(ee.value,ee.language):we.appendMarkdown(ee),A.push(we)}return A}else return x(p)}function E(p){if(hi.string(p))return p;switch(p.kind){case $e.MarkupKind.Markdown:return x(p.value);case $e.MarkupKind.PlainText:return p.value;default:return`Unsupported Markup content received. Kind is: ${p.kind}`}}function x(p){let A;if(p===void 0||typeof p=="string")A=new De.MarkdownString(p);else switch(p.kind){case $e.MarkupKind.Markdown:A=new De.MarkdownString(p.value);break;case $e.MarkupKind.PlainText:A=new De.MarkdownString,A.appendText(p.value);break;default:A=new De.MarkdownString,A.appendText(`Unsupported Markup content received. Kind is: ${p.kind}`);break}return A.isTrusted=e,A.supportHtml=n,A.supportThemeIcons=r,A}function P(p){if(p)return new De.Hover(v(p.contents),_(p.range))}async function T(p,A,ee){if(!p)return;if(Array.isArray(p))return Ct.map(p,ws=>W(ws,A),ee);let we=p,{defaultRange:on,commitCharacters:wn}=N(we,A),Yt=await Ct.map(we.items,ws=>W(ws,wn,we.applyKind?.commitCharacters,on,we.itemDefaults?.insertTextMode,we.itemDefaults?.insertTextFormat,we.itemDefaults?.data,we.applyKind?.data),ee);return new De.CompletionList(Yt,we.isIncomplete)}function N(p,A){let ee=p.itemDefaults?.editRange,we=p.itemDefaults?.commitCharacters??A;return $e.Range.is(ee)?{defaultRange:_(ee),commitCharacters:we}:ee!==void 0?{defaultRange:{inserting:_(ee.insert),replacing:_(ee.replace)},commitCharacters:we}:{defaultRange:void 0,commitCharacters:we}}function M(p){return $e.CompletionItemKind.Text<=p&&p<=$e.CompletionItemKind.TypeParameter?[p-1,void 0]:[De.CompletionItemKind.Text,p]}function q(p){if(p===$e.CompletionItemTag.Deprecated)return De.CompletionItemTag.Deprecated}function k(p){if(p==null)return[];let A=[];for(let ee of p){let we=q(ee);we!==void 0&&A.push(we)}return A}function W(p,A,ee,we,on,wn,Yt,ws){let Aa=k(p.tags),Ri=R(p),In=new fB.default(Ri);p.detail&&(In.detail=p.detail),p.documentation&&(In.documentation=E(p.documentation),In.documentationFormat=hi.string(p.documentation)?"$string":p.documentation.kind),p.filterText&&(In.filterText=p.filterText);let lg=Y(p,we,wn);if(lg&&(In.insertText=lg.text,In.range=lg.range,In.fromEdit=lg.fromEdit),hi.number(p.kind)){let[oY,JR]=M(p.kind);In.kind=oY,JR&&(In.originalItemKind=JR)}p.sortText&&(In.sortText=p.sortText),p.additionalTextEdits&&(In.additionalTextEdits=re(p.additionalTextEdits));let VR=ne(p,A,ee);VR&&(In.commitCharacters=VR.slice()),p.command&&(In.command=ke(p.command)),(p.deprecated===!0||p.deprecated===!1)&&(In.deprecated=p.deprecated,p.deprecated===!0&&Aa.push(De.CompletionItemTag.Deprecated)),(p.preselect===!0||p.preselect===!1)&&(In.preselect=p.preselect);let XR=he(p,Yt,ws);XR!==void 0&&(In.data=XR),Aa.length>0&&(In.tags=Aa);let oS=p.insertTextMode??on;return oS!==void 0&&(In.insertTextMode=oS,oS===$e.InsertTextMode.asIs&&(In.keepWhitespace=!0)),In}function ne(p,A,ee){if(ee===$e.ApplyKind.Merge){if(!A&&!p.commitCharacters)return;let we=new Set;if(A)for(let on of A)we.add(on);if(hi.stringArray(p.commitCharacters))for(let on of p.commitCharacters)we.add(on);return Array.from(we)}return p.commitCharacters!==void 0?hi.stringArray(p.commitCharacters)?p.commitCharacters:void 0:A}function he(p,A,ee){if(ee===$e.ApplyKind.Merge){let we={...A};return p.data&&Object.entries(p.data).forEach(([on,wn])=>{wn!=null&&(we[on]=wn)}),we}return p.data??A}function R(p){return $e.CompletionItemLabelDetails.is(p.labelDetails)?{label:p.label,detail:p.labelDetails.detail,description:p.labelDetails.description}:p.label}function Y(p,A,ee){let we=p.insertTextFormat??ee;if(p.textEdit!==void 0||A!==void 0){let[on,wn]=p.textEdit!==void 0?Z(p.textEdit):[A,p.textEditText??p.label];return we===$e.InsertTextFormat.Snippet?{text:new De.SnippetString(wn),range:on,fromEdit:!0}:{text:wn,range:on,fromEdit:!0}}else return p.insertText?we===$e.InsertTextFormat.Snippet?{text:new De.SnippetString(p.insertText),fromEdit:!1}:{text:p.insertText,fromEdit:!1}:void 0}function Z(p){return $e.InsertReplaceEdit.is(p)?[{inserting:_(p.insert),replacing:_(p.replace)},p.newText]:[_(p.range),p.newText]}function oe(p){if(p)return new De.TextEdit(_(p.range),p.newText)}async function U(p,A){if(p)return Ct.map(p,oe,A)}function re(p){if(!p)return;let A=new Array(p.length);for(let ee=0;ee<p.length;ee++)A[ee]=oe(p[ee]);return A}async function L(p,A){if(!p)return;let ee=new De.SignatureHelp;return hi.number(p.activeSignature)?ee.activeSignature=p.activeSignature:ee.activeSignature=0,hi.number(p.activeParameter)?ee.activeParameter=p.activeParameter:p.activeParameter===null?ee.activeParameter=-1:ee.activeParameter=0,p.signatures&&(ee.signatures=await K(p.signatures,A)),ee}async function K(p,A){return Ct.mapAsync(p,z,A)}async function z(p,A){let ee=new De.SignatureInformation(p.label);return p.documentation!==void 0&&(ee.documentation=E(p.documentation)),p.parameters!==void 0&&(ee.parameters=await j(p.parameters,A)),p.activeParameter!==void 0&&(ee.activeParameter=p.activeParameter??-1),ee}function j(p,A){return Ct.map(p,_e,A)}function _e(p){let A=new De.ParameterInformation(p.label);return p.documentation&&(A.documentation=E(p.documentation)),A}function ye(p){return p?new De.Location(o(p.uri),_(p.range)):void 0}async function Fe(p,A){if(p)return Dt(p,A)}async function Pe(p,A){if(p)return Dt(p,A)}function lt(p){if(!p)return;let A={targetUri:o(p.targetUri),targetRange:_(p.targetRange),originSelectionRange:_(p.originSelectionRange),targetSelectionRange:_(p.targetSelectionRange)};if(!A.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return A}async function Dt(p,A){if(p)if(hi.array(p)){if(p.length===0)return[];if($e.LocationLink.is(p[0])){let ee=p;return Ct.map(ee,lt,A)}else{let ee=p;return Ct.map(ee,ye,A)}}else return $e.LocationLink.is(p)?[lt(p)]:ye(p)}async function Lt(p,A){if(p)return Ct.map(p,ye,A)}async function Cn(p,A){if(p)return Ct.map(p,vt,A)}function vt(p){let A=new De.DocumentHighlight(_(p.range));return hi.number(p.kind)&&(A.kind=Ze(p.kind)),A}function Ze(p){switch(p){case $e.DocumentHighlightKind.Text:return De.DocumentHighlightKind.Text;case $e.DocumentHighlightKind.Read:return De.DocumentHighlightKind.Read;case $e.DocumentHighlightKind.Write:return De.DocumentHighlightKind.Write}return De.DocumentHighlightKind.Text}async function It(p,A){if(p)return Ct.map(p,Re,A)}function ht(p){return p<=$e.SymbolKind.TypeParameter?p-1:De.SymbolKind.Property}function X(p){if(p===$e.SymbolTag.Deprecated)return De.SymbolTag.Deprecated}function me(p){if(p==null)return;let A=[];for(let ee of p){let we=X(ee);we!==void 0&&A.push(we)}return A.length===0?void 0:A}function Re(p){let A=p.data,ee=p.location,we=ee.range===void 0||A!==void 0?new mB.default(p.name,ht(p.kind),p.containerName??"",ee.range===void 0?o(ee.uri):new De.Location(o(p.location.uri),_(ee.range)),A):new De.SymbolInformation(p.name,ht(p.kind),p.containerName??"",new De.Location(o(p.location.uri),_(ee.range)));return Je(we,p),we}async function be(p,A){if(p!=null)return Ct.map(p,Te,A)}function Te(p){let A=new De.DocumentSymbol(p.name,p.detail||"",ht(p.kind),_(p.range),_(p.selectionRange));if(Je(A,p),p.children!==void 0&&p.children.length>0){let ee=[];for(let we of p.children)ee.push(Te(we));A.children=ee}return A}function Je(p,A){p.tags=me(A.tags),A.deprecated&&(p.tags?p.tags.includes(De.SymbolTag.Deprecated)||(p.tags=p.tags.concat(De.SymbolTag.Deprecated)):p.tags=[De.SymbolTag.Deprecated])}function ke(p){let A={title:p.title,command:p.command};return p.tooltip&&(A.tooltip=p.tooltip),p.arguments&&(A.arguments=p.arguments),A}async function gt(p,A){if(p)return Ct.map(p,ke,A)}let ct=new Map;ct.set($e.CodeActionKind.Empty,De.CodeActionKind.Empty),ct.set($e.CodeActionKind.QuickFix,De.CodeActionKind.QuickFix),ct.set($e.CodeActionKind.Refactor,De.CodeActionKind.Refactor),ct.set($e.CodeActionKind.RefactorExtract,De.CodeActionKind.RefactorExtract),ct.set($e.CodeActionKind.RefactorInline,De.CodeActionKind.RefactorInline),ct.set($e.CodeActionKind.RefactorRewrite,De.CodeActionKind.RefactorRewrite),ct.set($e.CodeActionKind.Source,De.CodeActionKind.Source),ct.set($e.CodeActionKind.SourceOrganizeImports,De.CodeActionKind.SourceOrganizeImports);function wt(p){if(p==null)return;let A=ct.get(p);if(A)return A;let ee=p.split(".");A=De.CodeActionKind.Empty;for(let we of ee)A=A.append(we);return A}function rn(p){if(p!=null)return p.map(A=>wt(A))}function Jt(p){if(p!=null)return p.map(A=>({kind:wt(A.kind),command:ke(A.command)}))}async function Tn(p,A){if(p==null)return;let ee=new hB.default(p.title,p.data);return p.kind!==void 0&&(ee.kind=wt(p.kind)),p.diagnostics!==void 0&&(ee.diagnostics=u(p.diagnostics)),p.edit!==void 0&&(ee.edit=await F(p.edit,A)),p.command!==void 0&&(ee.command=ke(p.command)),p.isPreferred!==void 0&&(ee.isPreferred=p.isPreferred),p.disabled!==void 0&&(ee.disabled={reason:p.disabled.reason}),p.tags?.includes($e.CodeActionTag.LLMGenerated)&&(ee.isAI=!0),ee}function Pt(p,A){return Ct.mapAsync(p,async ee=>$e.Command.is(ee)?ke(ee):Tn(ee,A),A)}function O(p){if(!p)return;let A=new dB.default(_(p.range));return p.command&&(A.command=ke(p.command)),p.data!==void 0&&p.data!==null&&(A.data=p.data),A}async function D(p,A){if(p)return Ct.map(p,O,A)}async function F(p,A){if(!p)return;let ee=new Map;if(p.changeAnnotations!==void 0){let wn=p.changeAnnotations;await Ct.forEach(Object.keys(wn),Yt=>{let ws=$(wn[Yt]);ee.set(Yt,ws)},A)}let we=wn=>{if(wn!==void 0)return ee.get(wn)},on=new De.WorkspaceEdit;if(p.documentChanges){let wn=p.documentChanges;await Ct.forEach(wn,Yt=>{if($e.CreateFile.is(Yt))on.createFile(o(Yt.uri),Yt.options,we(Yt.annotationId));else if($e.RenameFile.is(Yt))on.renameFile(o(Yt.oldUri),o(Yt.newUri),Yt.options,we(Yt.annotationId));else if($e.DeleteFile.is(Yt))on.deleteFile(o(Yt.uri),Yt.options,we(Yt.annotationId));else if($e.TextDocumentEdit.is(Yt)){let ws=o(Yt.textDocument.uri),Aa=[];for(let Ri of Yt.edits)$e.AnnotatedTextEdit.is(Ri)?Aa.push([new De.TextEdit(_(Ri.range),Ri.newText),we(Ri.annotationId)]):$e.SnippetTextEdit.is(Ri)?Aa.push([new De.SnippetTextEdit(_(Ri.range),new De.SnippetString(Ri.snippet.value)),we(Ri.annotationId)]):Aa.push([new De.TextEdit(_(Ri.range),Ri.newText),void 0]);on.set(ws,Aa)}else throw new Error(`Unknown workspace edit change received:
${JSON.stringify(Yt,void 0,4)}`)},A)}else if(p.changes){let wn=p.changes;await Ct.forEach(Object.keys(wn),Yt=>{on.set(o(Yt),re(wn[Yt]))},A)}return on}function $(p){if(p!==void 0)return{label:p.label,needsConfirmation:!!p.needsConfirmation,description:p.description}}function ue(p){let A=_(p.range),ee=p.target?s(p.target):void 0,we=new pB.default(A,ee);return p.tooltip!==void 0&&(we.tooltip=p.tooltip),p.data!==void 0&&p.data!==null&&(we.data=p.data),we}async function ve(p,A){if(p)return Ct.map(p,ue,A)}function Ce(p){return new De.Color(p.red,p.green,p.blue,p.alpha)}function ge(p){return new De.ColorInformation(_(p.range),Ce(p.color))}async function y(p,A){if(p)return Ct.map(p,ge,A)}function C(p){let A=new De.ColorPresentation(p.label);return A.additionalTextEdits=re(p.additionalTextEdits),p.textEdit&&(A.textEdit=oe(p.textEdit)),A}async function I(p,A){if(p)return Ct.map(p,C,A)}function B(p){if(p)switch(p){case $e.FoldingRangeKind.Comment:return De.FoldingRangeKind.Comment;case $e.FoldingRangeKind.Imports:return De.FoldingRangeKind.Imports;case $e.FoldingRangeKind.Region:return De.FoldingRangeKind.Region}}function Q(p){return new De.FoldingRange(p.startLine,p.endLine,B(p.kind))}async function ae(p,A){if(p)return Ct.map(p,Q,A)}function de(p){return new De.SelectionRange(_(p.range),p.parent?de(p.parent):void 0)}async function Me(p,A){return Array.isArray(p)?Ct.map(p,de,A):[]}function tt(p){return $e.InlineValueText.is(p)?new De.InlineValueText(_(p.range),p.text):$e.InlineValueVariableLookup.is(p)?new De.InlineValueVariableLookup(_(p.range),p.variableName,p.caseSensitiveLookup):new De.InlineValueEvaluatableExpression(_(p.range),p.expression)}async function Ue(p,A){return Array.isArray(p)?Ct.map(p,tt,A):[]}async function m(p,A){let ee=typeof p.label=="string"?p.label:await Ct.map(p.label,G,A),we=new vB.default(h(p.position),ee);return p.kind!==void 0&&(we.kind=p.kind),p.textEdits!==void 0&&(we.textEdits=await U(p.textEdits,A)),p.tooltip!==void 0&&(we.tooltip=Se(p.tooltip)),p.paddingLeft!==void 0&&(we.paddingLeft=p.paddingLeft),p.paddingRight!==void 0&&(we.paddingRight=p.paddingRight),p.data!==void 0&&(we.data=p.data),we}function G(p){let A=new De.InlayHintLabelPart(p.value);return p.location!==void 0&&(A.location=ye(p.location)),p.tooltip!==void 0&&(A.tooltip=Se(p.tooltip)),p.command!==void 0&&(A.command=ke(p.command)),A}function Se(p){return typeof p=="string"?p:x(p)}async function pt(p,A){if(Array.isArray(p))return Ct.mapAsync(p,m,A)}function _t(p){if(p===null)return;let A=new gB.default(ht(p.kind),p.name,p.detail||"",s(p.uri),_(p.range),_(p.selectionRange),p.data);return p.tags!==void 0&&(A.tags=me(p.tags)),A}async function Wn(p,A){if(p!==null)return Ct.map(p,_t,A)}async function hr(p,A){return new De.CallHierarchyIncomingCall(_t(p.from),await S(p.fromRanges,A))}async function Br(p,A){if(p!==null)return Ct.mapAsync(p,hr,A)}async function Jc(p,A){return new De.CallHierarchyOutgoingCall(_t(p.to),await S(p.fromRanges,A))}async function Qc(p,A){if(p!==null)return Ct.mapAsync(p,Jc,A)}async function nS(p,A){if(p!=null)return new De.SemanticTokens(new Uint32Array(p.data),p.resultId)}function wl(p){return new De.SemanticTokensEdit(p.start,p.deleteCount,p.data!==void 0?new Uint32Array(p.data):void 0)}async function Id(p,A){if(p!=null)return new De.SemanticTokensEdits(p.edits.map(wl),p.resultId)}function zn(p){return p}async function Ts(p,A){if(p!=null)return new De.LinkedEditingRanges(await S(p.ranges,A),nY(p.wordPattern))}function nY(p){if(p!=null)return new RegExp(p)}function KR(p){if(p===null)return;let A=new _B.default(ht(p.kind),p.name,p.detail||"",s(p.uri),_(p.range),_(p.selectionRange),p.data);return p.tags!==void 0&&(A.tags=me(p.tags)),A}async function rY(p,A){if(p!==null)return Ct.map(p,KR,A)}function rS(p){if(hi.string(p))return p;if($e.RelativePattern.is(p)){if($e.URI.is(p.baseUri))return new De.RelativePattern(s(p.baseUri),p.pattern);if($e.WorkspaceFolder.is(p.baseUri)){let A=De.workspace.getWorkspaceFolder(s(p.baseUri.uri));return A!==void 0?new De.RelativePattern(A,p.pattern):void 0}}}async function iY(p,A){if(!p)return;if(Array.isArray(p))return Ct.map(p,on=>iS(on),A);let ee=p,we=await Ct.map(ee.items,on=>iS(on),A);return new De.InlineCompletionList(we)}function iS(p){let A;typeof p.insertText=="string"?A=p.insertText:A=new De.SnippetString(p.insertText.value);let ee;p.command&&(ee=ke(p.command));let we=new De.InlineCompletionItem(A,_(p.range),ee);return p.filterText&&(we.filterText=p.filterText),we}return{asUri:s,asDocumentSelector:a,asDiagnostics:c,asDiagnostic:l,asRange:_,asRanges:S,asPosition:h,asDiagnosticSeverity:b,asDiagnosticTag:g,asHover:P,asCompletionResult:T,asCompletionItem:W,asTextEdit:oe,asTextEdits:U,asSignatureHelp:L,asSignatureInformations:K,asSignatureInformation:z,asParameterInformations:j,asParameterInformation:_e,asDeclarationResult:Fe,asDefinitionResult:Pe,asLocation:ye,asReferences:Lt,asDocumentHighlights:Cn,asDocumentHighlight:vt,asDocumentHighlightKind:Ze,asSymbolKind:ht,asSymbolTag:X,asSymbolTags:me,asSymbolInformations:It,asSymbolInformation:Re,asDocumentSymbols:be,asDocumentSymbol:Te,asCommand:ke,asCommands:gt,asCodeAction:Tn,asCodeActionKind:wt,asCodeActionKinds:rn,asCodeActionDocumentations:Jt,asCodeActionResult:Pt,asCodeLens:O,asCodeLenses:D,asWorkspaceEdit:F,asDocumentLink:ue,asDocumentLinks:ve,asFoldingRangeKind:B,asFoldingRange:Q,asFoldingRanges:ae,asColor:Ce,asColorInformation:ge,asColorInformations:y,asColorPresentation:C,asColorPresentations:I,asSelectionRange:de,asSelectionRanges:Me,asInlineValue:tt,asInlineValues:Ue,asInlayHint:m,asInlayHints:pt,asSemanticTokensLegend:zn,asSemanticTokens:nS,asSemanticTokensEdit:wl,asSemanticTokensEdits:Id,asCallHierarchyItem:_t,asCallHierarchyItems:Wn,asCallHierarchyIncomingCall:hr,asCallHierarchyIncomingCalls:Br,asCallHierarchyOutgoingCall:Jc,asCallHierarchyOutgoingCalls:Qc,asLinkedEditingRanges:Ts,asTypeHierarchyItem:KR,asTypeHierarchyItems:rY,asGlobPattern:rS,asInlineCompletionResult:iY,asInlineCompletionItem:iS}}});var Ab=V(No=>{"use strict";var SB=No&&No.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),DB=No&&No.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),EB=No&&No.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&SB(n,e,r[i]);return DB(n,e),n}})();Object.defineProperty(No,"__esModule",{value:!0});No.ProgressPart=void 0;var tA=require("vscode"),nA=et(),rA=EB(Ii()),Ib=class{_client;_token;_infinite;_reported;_lspProgressDisposable;_progress;_cancellationToken;_tokenDisposable;_resolve;_reject;constructor(e,n,r){this._client=e,this._token=n,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(nA.WorkDoneProgress.type,this._token,i=>{switch(i.kind){case"begin":this.begin(i);break;case"report":this.report(i);break;case"end":this.done(),r&&r(this);break}})}begin(e){this._infinite=e.percentage===void 0,this._lspProgressDisposable!==void 0&&tA.window.withProgress({location:tA.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(n,r)=>{if(this._lspProgressDisposable!==void 0)return this._progress=n,this._cancellationToken=r,this._tokenDisposable=this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(nA.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((i,o)=>{this._resolve=i,this._reject=o})})}report(e){if(this._infinite&&rA.string(e.message))this._progress!==void 0&&this._progress.report({message:e.message});else if(rA.number(e.percentage)){let n=Math.max(0,Math.min(e.percentage,100)),r=Math.max(0,n-this._reported);this._reported+=r,this._progress!==void 0&&this._progress.report({message:e.message,increment:r})}}cancel(){this.cleanup(),this._reject!==void 0&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),this._resolve!==void 0&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){this._lspProgressDisposable!==void 0&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),this._tokenDisposable!==void 0&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}};No.ProgressPart=Ib});var sA=V(Po=>{"use strict";var bB=Po&&Po.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),CB=Po&&Po.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),h_=Po&&Po.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&bB(n,e,r[i]);return CB(n,e),n}})();Object.defineProperty(Po,"__esModule",{value:!0});Po.NotebookDocumentSyncFeature=void 0;var Zt=h_(require("vscode")),Bs=h_(et()),TB=h_(Wt()),iA=h_(Ii()),wB=tb();function oA(t,e){return t[e]===void 0&&(t[e]={}),t[e]}var Jl;(function(t){let e;(function(n){function r(f,g){return{version:f.version,uri:g.asUri(f.uri)}}n.asVersionedNotebookDocumentIdentifier=r;function i(f,g,h){let _=Bs.NotebookDocument.create(h.asUri(f.uri),f.notebookType,f.version,o(g,h));return Object.keys(f.metadata).length>0&&(_.metadata=s(f.metadata)),_}n.asNotebookDocument=i;function o(f,g){return f.map(h=>a(h,g))}n.asNotebookCells=o;function s(f){return u(new Set,f)}n.asMetadata=s;function a(f,g){let h=Bs.NotebookCell.create(c(f.kind),g.asUri(f.document.uri));return Object.keys(f.metadata).length>0&&(h.metadata=s(f.metadata)),f.executionSummary!==void 0&&iA.number(f.executionSummary.executionOrder)&&iA.boolean(f.executionSummary.success)&&(h.executionSummary={executionOrder:f.executionSummary.executionOrder,success:f.executionSummary.success}),h}n.asNotebookCell=a;function c(f){switch(f){case Zt.NotebookCellKind.Markup:return Bs.NotebookCellKind.Markup;case Zt.NotebookCellKind.Code:return Bs.NotebookCellKind.Code}}function u(f,g){if(f.has(g))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(g)){let h=[];for(let _ of g)if(_!==null&&typeof _=="object"||Array.isArray(_))h.push(u(f,_));else{if(_ instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");h.push(_)}return h}else{let h=Object.keys(g),_=Object.create(null);for(let S of h){let b=g[S];if(b!==null&&typeof b=="object"||Array.isArray(b))_[S]=u(f,b);else{if(b instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");_[S]=b}}return _}}function l(f,g){let h=g.asChangeTextDocumentParams(f,f.document.uri,f.document.version);return{document:h.textDocument,changes:h.contentChanges}}n.asTextContentChange=l;function d(f,g){let h=Object.create(null);if(f.metadata&&(h.metadata=t.c2p.asMetadata(f.metadata)),f.cells!==void 0){let _=Object.create(null),S=f.cells;S.structure&&(_.structure={array:{start:S.structure.array.start,deleteCount:S.structure.array.deleteCount,cells:S.structure.array.cells!==void 0?S.structure.array.cells.map(b=>t.c2p.asNotebookCell(b,g)):void 0},didOpen:S.structure.didOpen!==void 0?S.structure.didOpen.map(b=>g.asOpenTextDocumentParams(b.document).textDocument):void 0,didClose:S.structure.didClose!==void 0?S.structure.didClose.map(b=>g.asCloseTextDocumentParams(b.document).textDocument):void 0}),S.data!==void 0&&(_.data=S.data.map(b=>t.c2p.asNotebookCell(b,g))),S.textContent!==void 0&&(_.textContent=S.textContent.map(b=>t.c2p.asTextContentChange(b,g))),Object.keys(_).length>0&&(h.cells=_)}return h}n.asNotebookDocumentChangeEvent=d})(e=t.c2p||(t.c2p={}))})(Jl||(Jl={}));var Mb;(function(t){function e(a,c,u){let l=a.length,d=c.length,f=0;for(;f<d&&f<l&&n(a[f],c[f],u);)f++;if(f<d&&f<l){let g=l-1,h=d-1;for(;g>=0&&h>=0&&n(a[g],c[h],u);)g--,h--;let _=g+1-f,S=f===h+1?void 0:c.slice(f,h+1);return S!==void 0?{start:f,deleteCount:_,cells:S}:{start:f,deleteCount:_}}else return f<d?{start:f,deleteCount:0,cells:c.slice(f)}:f<l?{start:f,deleteCount:l-f}:void 0}t.computeDiff=e;function n(a,c,u=!0){return a.kind!==c.kind||a.document.uri.toString()!==c.document.uri.toString()||a.document.languageId!==c.document.languageId||!r(a.executionSummary,c.executionSummary)?!1:!u||u&&o(a.metadata,c.metadata)}function r(a,c){return a===c?!0:a===void 0||c===void 0?!1:a.executionOrder===c.executionOrder&&a.success===c.success&&i(a.timing,c.timing)}function i(a,c){return a===c?!0:a===void 0||c===void 0?!1:a.startTime===c.startTime&&a.endTime===c.endTime}function o(a,c){if(a===c)return!0;if(a==null||c===null||c===void 0||typeof a!=typeof c||typeof a!="object")return!1;let u=Array.isArray(a),l=Array.isArray(c);if(u!==l)return!1;if(u&&l){if(a.length!==c.length)return!1;for(let d=0;d<a.length;d++)if(!o(a[d],c[d]))return!1}if(s(a)&&s(c)){let d=Object.keys(a),f=Object.keys(c);if(d.length!==f.length||(d.sort(),f.sort(),!o(d,f)))return!1;for(let g=0;g<d.length;g++){let h=d[g];if(!o(a[h],c[h]))return!1}return!0}return!1}function s(a){return a!==null&&typeof a=="object"}t.isObjectLiteral=s})(Mb||(Mb={}));var f_;(function(t){function e(n,r){if(typeof n=="string")return n==="*"||r.notebookType===n;if(n.notebookType!==void 0&&n.notebookType!=="*"&&r.notebookType!==n.notebookType)return!1;let i=r.uri;return!(n.scheme!==void 0&&n.scheme!=="*"&&i.scheme!==n.scheme||n.pattern!==void 0&&!(0,wB.matchGlobPattern)(n.pattern,i))}t.matchNotebook=e})(f_||(f_={}));var d_;(function(t){function e(r){let i=r.notebookSelector,o=[];for(let s of i){let a=(typeof s.notebook=="string"?s.notebook:s.notebook?.notebookType)??"*",c=typeof s.notebook=="string"?void 0:s.notebook?.scheme,u=typeof s.notebook=="string"?void 0:s.notebook?.pattern;if(s.cells!==void 0)for(let l of s.cells)o.push(n(a,c,u,l.language));else o.push(n(a,c,u,void 0))}return o}t.asDocumentSelector=e;function n(r,i,o,s){return i===void 0&&o===void 0?{notebook:r,language:s}:{notebook:{notebookType:r,scheme:i,pattern:o},language:s}}})(d_||(d_={}));var p_;(function(t){function e(n){return{cells:n,uris:new Set(n.map(r=>r.document.uri.toString()))}}t.create=e})(p_||(p_={}));var Ql=class{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,n,r,i,o,s){this.client=e,this.options=n,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(d_.asDocumentSelector(n)),this.onChangeNotificationSent=r,this.onOpenNotificationSent=i,this.onCloseNotificationSent=o,this.onSaveNotificationSent=s,Zt.workspace.onDidOpenNotebookDocument(a=>{this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a)},void 0,this.disposables);for(let a of Zt.workspace.notebookDocuments)this.notebookDidOpen.add(a.uri.toString()),this.didOpen(a);Zt.workspace.onDidChangeNotebookDocument(a=>this.didChangeNotebookDocument(a),void 0,this.disposables),this.options.save===!0&&Zt.workspace.onDidSaveNotebookDocument(a=>this.didSave(a),void 0,this.disposables),Zt.workspace.onDidCloseNotebookDocument(a=>{this.didClose(a),this.notebookDidOpen.delete(a.uri.toString())},void 0,this.disposables)}getState(){for(let e of Zt.workspace.notebookDocuments)if(this.getMatchingCellsConsideringSyncInfo(e)!==void 0)return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){if(Zt.languages.match(this.selector,e)>0)return!0;let n=e.uri.toString();for(let r of this.notebookSyncInfo.values())if(r.uris.has(n))return!0;return!1}didOpenNotebookCellTextDocument(e,n){if(Zt.languages.match(this.selector,n.document)===0||!this.notebookDidOpen.has(e.uri.toString()))return;let r=this.getSyncInfo(e),i=this.cellMatches(e,n);if(r!==void 0){let o=r.uris.has(n.document.uri.toString());if(i&&o||!i&&!o)return;if(i){let s=this.mergeCells(e,r,[n]);if(s!==void 0){let a=this.asNotebookDocumentChangeEvent(e,void 0,r,s);a!==void 0&&this.doSendChange(a,s).catch(()=>{})}}}else i&&this.doSendOpen(e,[n]).catch(()=>{})}didChangeNotebookCellTextDocument(e,n,r){if(Zt.languages.match(this.selector,r.document)===0)return;let i=this.getSyncInfo(e);i===void 0||!i.uris.has(n.document.uri.toString())||this.doSendChange({notebook:e,cells:{textContent:[r]}},i.cells).catch(()=>{})}didCloseNotebookCellTextDocument(e,n){let r=this.getSyncInfo(e);if(r===void 0)return;let i=n.document.uri,o=r.cells.findIndex(s=>s.document.uri.toString()===i.toString());if(o!==-1)if(o===0&&r.cells.length===1)this.doSendClose(e,r.cells).catch(()=>{});else{let s=r.cells.slice(),a=s.splice(o,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:o,deleteCount:1},didClose:a}}},s).catch(()=>{})}}dispose(){for(let e of this.disposables)e.dispose()}didOpen(e,n,r=this.getSyncInfo(e)){if(r!==void 0)if(n===void 0&&(n=r.cells.slice()),n!==void 0){let i=this.asNotebookDocumentChangeEvent(e,void 0,r,n);i!==void 0&&this.doSendChange(i,n).catch(()=>{})}else this.doSendClose(e,[]).catch(()=>{});else{if(n=this.getMatchingCells(e),n===void 0)return;this.doSendOpen(e,n).catch(()=>{})}}didChangeNotebookDocument(e){let n=e.notebook,r=this.getSyncInfo(n);if(r===void 0){if(e.contentChanges.length===0)return;let i=this.getMatchingCells(n);if(i===void 0)return;this.didOpen(n,i,r)}else{let i=this.getMatchingCellsFromEvent(n,r,e);if(i===void 0){this.didClose(n,r);return}let o=this.asNotebookDocumentChangeEvent(e.notebook,e,r,i);o!==void 0&&this.doSendChange(o,i).catch(()=>{})}}didSave(e){this.getSyncInfo(e)!==void 0&&this.doSendSave(e).catch(()=>{})}didClose(e,n=this.getSyncInfo(e)){if(n===void 0)return;let r=e.getCells().filter(i=>n.uris.has(i.document.uri.toString()));this.doSendClose(e,r).catch(()=>{})}async sendDidOpenNotebookDocument(e){if(this.getSyncInfo(e)!==void 0)throw new Error(`Notebook document ${e.uri.toString()} is already open`);let r=this.getMatchingCells(e);if(r!==void 0)return this.doSendOpen(e,r)}async doSendOpen(e,n){let r=async(o,s)=>{let a=s.map(c=>this.client.code2ProtocolConverter.asTextDocumentItem(c.document));try{await this.client.sendNotification(Bs.DidOpenNotebookDocumentNotification.type,{notebookDocument:Jl.c2p.asNotebookDocument(o,s,this.client.code2ProtocolConverter),cellTextDocuments:a}),this.onOpenNotificationSent.fire(o)}catch(c){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",c),c}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),p_.create(n)),i?.didOpen!==void 0?i.didOpen(e,n,r):r(e,n)}async sendDidChangeNotebookDocument(e){let n=this.getMatchingCellsFromSyncInfo(e.notebook);if(n===void 0)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,n)}async doSendChange(e,n){let r=async o=>{try{await this.client.sendNotification(Bs.DidChangeNotebookDocumentNotification.type,{notebookDocument:Jl.c2p.asVersionedNotebookDocumentIdentifier(o.notebook,this.client.code2ProtocolConverter),change:Jl.c2p.asNotebookDocumentChangeEvent(o,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(o)}catch(s){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",s),s}},i=this.client.middleware?.notebooks;return e.cells?.structure!==void 0&&this.notebookSyncInfo.set(e.notebook.uri.toString(),p_.create(n)),i?.didChange!==void 0?i?.didChange(e,r):r(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){let n=async i=>{try{await this.client.sendNotification(Bs.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(i.uri)}}),this.onSaveNotificationSent.fire(i)}catch(o){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",o),o}},r=this.client.middleware?.notebooks;return r?.didSave!==void 0?r.didSave(e,n):n(e)}async sendDidCloseNotebookDocument(e){let n=this.getMatchingCellsFromSyncInfo(e);if(n===void 0)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,n)}async doSendClose(e,n){let r=async(o,s)=>{try{await this.client.sendNotification(Bs.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(o.uri)},cellTextDocuments:s.map(a=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(a.document))}),this.onCloseNotificationSent.fire(o)}catch(a){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",a),a}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),i?.didClose!==void 0?i.didClose(e,n,r):r(e,n)}getSynchronizedCells(e){return this.getSyncInfo(e)?.cells}asNotebookDocumentChangeEvent(e,n,r,i){if(n!==void 0&&n.notebook!==e)throw new Error("Notebook must be identical");let o={notebook:e};n?.metadata!==void 0&&(o.metadata=Jl.c2p.asMetadata(n.metadata));let s;if(n?.cellChanges!==void 0&&n.cellChanges.length>0){let a=[];s=new Set(i.map(c=>c.document.uri.toString()));for(let c of n.cellChanges)s.has(c.cell.document.uri.toString())&&(c.executionSummary!==void 0||c.metadata!==void 0)&&a.push(c.cell);a.length>0&&(o.cells=o.cells??{},o.cells.data=a)}if((n?.contentChanges!==void 0&&n.contentChanges.length>0||n===void 0)&&r!==void 0&&i!==void 0){let a=r.cells,c=i,u=Mb.computeDiff(a,c,!1),l,d;if(u!==void 0){l=u.cells===void 0?new Map:new Map(u.cells.map(h=>[h.document.uri.toString(),h])),d=u.deleteCount===0?new Map:new Map(a.slice(u.start,u.start+u.deleteCount).map(h=>[h.document.uri.toString(),h]));for(let h of Array.from(d.keys()))l.has(h)&&(d.delete(h),l.delete(h));o.cells=o.cells??{};let f=[],g=[];if(l.size>0||d.size>0){for(let h of l.values())f.push(h);for(let h of d.values())g.push(h)}o.cells.structure={array:u,didOpen:f,didClose:g}}}return Object.keys(o).length>1?o:void 0}getMatchingCells(e,n=e.getCells()){if(this.options.notebookSelector!==void 0){for(let r of this.options.notebookSelector)if(r.notebook===void 0||f_.matchNotebook(r.notebook,e)){let i=this.filterCells(e,n,r.cells);return i.length===0?void 0:i}}}getMatchingCellsFromEvent(e,n,r){if(this.options.notebookSelector===void 0)return;let i;for(let c of this.options.notebookSelector)if(c.notebook===void 0||f_.matchNotebook(c.notebook,e)){i=c;break}if(i===void 0)return;if((r.cellChanges===void 0||r.cellChanges.length===0)&&(r.contentChanges===void 0||r.contentChanges.length===0))return n.cells;let o;if(r.cellChanges!==void 0&&r.cellChanges.length>0){let c=r.cellChanges.map(l=>l.cell),u=this.filterCells(e,c,i.cells);if(u.length!==c.length){o=new Set(n.uris);for(let l of c)o.delete(l.document.uri.toString());for(let l of u)o.add(l.document.uri.toString())}}if(r.contentChanges!==void 0&&r.contentChanges.length>0){o===void 0&&(o=new Set(n.uris));for(let c of r.contentChanges){for(let l of c.removedCells)o.delete(l.document.uri.toString());let u=this.filterCells(e,new Array(...c.addedCells),i.cells);for(let l of u)o.add(l.document.uri.toString())}}if(o===void 0)return n.cells;let s=[],a=e.getCells();for(let c of a)o.has(c.document.uri.toString())&&s.push(c);return s}getMatchingCellsFromSyncInfo(e){let n=this.getSyncInfo(e);return n!==void 0?n.cells:void 0}getMatchingCellsConsideringSyncInfo(e){let n=this.getSyncInfo(e);return n!==void 0?n.cells:this.getMatchingCells(e)}mergeCells(e,n,r){let i=[],o=new Set(n.uris);for(let s of r)o.add(s.document.uri.toString());for(let s of e.getCells())o.has(s.document.uri.toString())&&i.push(s);return i}cellMatches(e,n){let r=this.getMatchingCells(e,[n]);return r!==void 0&&r[0]===n}filterCells(e,n,r){let i=r!==void 0?n.filter(o=>{let s=o.document.languageId;return r.some((a=>a.language==="*"||s===a.language))}):n;return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells=="function"?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}},Lb=class t{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=Bs.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new Zt.EventEmitter,this._onOpenNotificationSent=new Zt.EventEmitter,this._onCloseNotificationSent=new Zt.EventEmitter,this._onSaveNotificationSent=new Zt.EventEmitter,Zt.workspace.onDidOpenTextDocument(n=>{if(n.uri.scheme!==t.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(n);if(!(r===void 0||i===void 0))for(let o of this.registrations.values())o instanceof Ql&&o.didOpenNotebookCellTextDocument(r,i)}),Zt.workspace.onDidChangeTextDocument(n=>{if(n.contentChanges.length===0)return;let r=n.document;if(r.uri.scheme!==t.CellScheme)return;let[i,o]=this.findNotebookDocumentAndCell(r);if(!(i===void 0||o===void 0))for(let s of this.registrations.values())s instanceof Ql&&s.didChangeNotebookCellTextDocument(i,o,n)}),Zt.workspace.onDidCloseTextDocument(n=>{if(n.uri.scheme!==t.CellScheme)return;let[r,i]=this.findNotebookDocumentAndCell(n);if(!(r===void 0||i===void 0))for(let o of this.registrations.values())o instanceof Ql&&o.didCloseNotebookCellTextDocument(r,i)})}getState(){if(this.registrations.size===0)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(let e of this.registrations.values()){let n=e.getState();if(n.kind==="document"&&n.registrations===!0&&n.matches===!0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){let n=oA(oA(e,"notebookDocument"),"synchronization");n.dynamicRegistration=!0,n.executionSummarySupport=!0}preInitialize(e){let n=e.notebookDocumentSync;n!==void 0&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(d_.asDocumentSelector(n)))}initialize(e){let n=e.notebookDocumentSync;if(n===void 0)return;let r=n.id??TB.generateUuid();this.register({id:r,registerOptions:n})}register(e){let n=new Ql(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,n)}unregister(e){let n=this.registrations.get(e);n!==void 0&&(this.registrations.delete(e),n.dispose())}clear(){for(let e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new Zt.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new Zt.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new Zt.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new Zt.EventEmitter}handles(e){if(e.uri.scheme!==t.CellScheme)return!1;if(this.dedicatedChannel!==void 0&&Zt.languages.match(this.dedicatedChannel,e)>0)return!0;for(let n of this.registrations.values())if(n.handles(e))return!0;return!1}getProvider(e){for(let n of this.registrations.values())if(n.handles(e.document))return n}findNotebookDocumentAndCell(e){let n=e.uri.toString();for(let r of Zt.workspace.notebookDocuments)for(let i of r.getCells())if(i.document.uri.toString()===n)return[r,i];return[void 0,void 0]}};Po.NotebookDocumentSyncFeature=Lb});var uA=V(gi=>{"use strict";var NB=gi&&gi.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),PB=gi&&gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cA=gi&&gi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&NB(n,e,r[i]);return PB(n,e),n}})();Object.defineProperty(gi,"__esModule",{value:!0});gi.SyncConfigurationFeature=gi.ConfigurationFeature=void 0;gi.toJSONObject=cu;var Zl=require("vscode"),ip=et(),RB=cA(Ii()),OB=cA(Wt()),aA=yt(),Fb=class{_client;constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(ip.ConfigurationRequest.type,(n,r)=>{let i=s=>{let a=[];for(let c of s.items){let u=c.scopeUri!==void 0&&c.scopeUri!==null?this._client.protocol2CodeConverter.asUri(c.scopeUri):void 0;a.push(this.getConfiguration(u,c.section!==null?c.section:void 0))}return a},o=e.middleware.workspace;return o&&o.configuration?o.configuration(n,r,i):i(n,r)})}getConfiguration(e,n){let r=null;if(n){let i=n.lastIndexOf(".");if(i===-1)r=cu(Zl.workspace.getConfiguration(void 0,e).get(n));else{let o=Zl.workspace.getConfiguration(n.substr(0,i),e);o&&(r=cu(o.get(n.substr(i+1))))}}else{let i=Zl.workspace.getConfiguration(void 0,e);r={};for(let o of Object.keys(i))i.has(o)&&(r[o]=cu(i.get(o)))}return r===void 0&&(r=null),r}clear(){}};gi.ConfigurationFeature=Fb;function cu(t){if(t){if(Array.isArray(t))return t.map(cu);if(typeof t=="object"){let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=cu(t[n]));return e}}return t}var jb=class{_client;isCleared;_listeners;constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return ip.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,aA.ensure)((0,aA.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;e!==void 0&&this.register({id:OB.generateUuid(),registerOptions:{section:e}})}register(e){let n=Zl.workspace.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,n),e.registerOptions.section!==void 0&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let n=this._listeners.get(e);n&&(this._listeners.delete(e),n.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,n){if(this.isCleared)return;let r;if(RB.string(e)?r=[e]:r=e,r!==void 0&&n!==void 0&&!r.some(a=>n.affectsConfiguration(a)))return;let i=async s=>s===void 0?this._client.sendNotification(ip.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(ip.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(s)}),o=this._client.middleware.workspace?.didChangeConfiguration;(o?o(r,i):i(r)).catch(s=>{this._client.error(`Sending notification ${ip.DidChangeConfigurationNotification.type.method} failed`,s)})}extractSettingsInformation(e){function n(o,s){let a=o;for(let c=0;c<s.length-1;c++){let u=a[s[c]];u||(u=Object.create(null),a[s[c]]=u),a=u}return a}let r=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){let s=e[o],a=s.indexOf("."),c=null;if(a>=0?c=Zl.workspace.getConfiguration(s.substr(0,a),r).get(s.substr(a+1)):c=Zl.workspace.getConfiguration(void 0,r).get(s),c){let u=e[o].split(".");n(i,u)[u[u.length-1]]=cu(c)}}return i}};gi.SyncConfigurationFeature=jb});var pA={};Zc(pA,{TextDocument:()=>qb});function Ub(t,e){if(t.length<=1)return t;let n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Ub(r,e),Ub(i,e);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;)e(r[o],i[s])<=0?t[a++]=r[o++]:t[a++]=i[s++];for(;o<r.length;)t[a++]=r[o++];for(;s<i.length;)t[a++]=i[s++];return t}function lA(t,e,n=0){let r=e?[n]:[];for(let i=0;i<t.length;i++){let o=t.charCodeAt(i);fA(o)&&(o===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function fA(t){return t===13||t===10}function dA(t){let e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function xB(t){let e=dA(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var g_,qb,hA=ce(()=>{"use strict";g_=class t{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(t.isIncremental(r)){let i=dA(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let a=Math.max(i.start.line,0),c=Math.max(i.end.line,0),u=this._lineOffsets,l=lA(r.text,!1,o);if(c-a===l.length)for(let f=0,g=l.length;f<g;f++)u[f+a+1]=l[f];else l.length<1e4?u.splice(a+1,c-a,...l):this._lineOffsets=u=u.slice(0,a+1).concat(l,u.slice(c+1));let d=r.text.length-(s-o);if(d!==0)for(let f=a+1+l.length,g=u.length;f<g;f++)u[f]=u[f]+d}else if(t.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=lA(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>e?i=s:r=s+1}let o=r-1;return e=this.ensureBeforeEOL(e,n[o]),{line:o,character:e-n[o]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line];if(e.character<=0)return r;let i=e.line+1<n.length?n[e.line+1]:this._content.length,o=Math.min(r+e.character,i);return this.ensureBeforeEOL(o,r)}getLineRange(e){let n=this.getLineOffsets();if(e>=n.length){let s=n.length-1;return{start:{line:s,character:0},end:{line:s,character:this._content.length-n[s]}}}else if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let r=n[e],i=e+1<n.length?n[e+1]:this._content.length,o=this.ensureBeforeEOL(i,r);return{start:{line:e,character:0},end:{line:e,character:o-r}}}getEOLCharacters(e){let n=this.getLineOffsets();if(e>=n.length)return"";if(e<0)return"";let r=e+1<n.length?n[e+1]:this._content.length,i=this.ensureBeforeEOL(r,n[e]);return this._content.substring(i,r)}ensureBeforeEOL(e,n){for(;e>n&&fA(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(t){function e(i,o,s,a){return new g_(i,o,s,a)}t.create=e;function n(i,o,s){if(i instanceof g_)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,o){let s=i.getText(),a=Ub(o.map(xB),(l,d)=>{let f=l.range.start.line-d.range.start.line;return f===0?l.range.start.character-d.range.start.character:f}),c=0,u=[];for(let l of a){let d=i.offsetAt(l.range.start);if(d<c)throw new Error("Overlapping edit");d>c&&u.push(s.substring(c,d)),l.newText.length&&u.push(l.newText),c=i.offsetAt(l.range.end)}return u.push(s.substr(c)),u.join("")}t.applyEdits=r})(qb||(qb={}))});var gA=V(Fn=>{"use strict";var IB=Fn&&Fn.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),AB=Fn&&Fn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),MB=Fn&&Fn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&IB(n,e,r[i]);return AB(n,e),n}})();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.DidSaveTextDocumentFeature=Fn.WillSaveWaitUntilFeature=Fn.WillSaveFeature=Fn.DidChangeTextDocumentFeature=Fn.DidCloseTextDocumentFeature=Fn.DidOpenTextDocumentFeature=void 0;var Ln=require("vscode"),kt=et(),un=yt(),ef=MB(Wt()),LB=(hA(),Ns(pA)),Yb=class extends un.TextDocumentEventFeature{_syncedDocuments;_pendingOpenNotifications;_delayOpen;_pendingOpenListeners;constructor(e,n){super(e,Ln.workspace.onDidOpenTextDocument,kt.DidOpenTextDocumentNotification.type,()=>e.middleware.didOpen,r=>e.code2ProtocolConverter.asOpenTextDocumentParams(r),r=>r,un.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=n,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){if(this._delayOpen){if(!this.matches(e))return;if(this._client.visibleDocuments.isVisible(e))return super.callback(e);{let r=new Wb(e);this._pendingOpenNotifications.set(r.uri.toString(),r)}}else return super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,un.ensure)((0,un.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,n){let r=e.resolvedTextDocumentSync;n&&r&&r.openClose&&this.register({id:ef.generateUuid(),registerOptions:{documentSelector:n}})}get registrationType(){return kt.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let n=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(Ln.workspace.textDocuments.forEach(r=>{let i=r.uri.toString();if(!this._syncedDocuments.has(i)&&Ln.languages.match(n,r)>0&&!this._client.hasDedicatedTextSynchronizationFeature(r))if(this._client.visibleDocuments.isVisible(r)){let s=this._client.middleware,a=c=>this._client.sendNotification(this._type,this._createParams(c));(s.didOpen?s.didOpen(r,a):a(r)).catch(c=>{this._client.error(`Sending document notification ${this._type.method} failed`,c)}),this._syncedDocuments.set(i,r)}else this._pendingOpenNotifications.set(i,r)}),this._delayOpen&&this._pendingOpenListeners===void 0){this._pendingOpenListeners=[];let r=this._client.visibleDocuments;this._pendingOpenListeners.push(r.onClose(i=>{for(let o of i)this._pendingOpenNotifications.delete(o.toString())})),this._pendingOpenListeners.push(r.onOpen(i=>{for(let o of i){let s=this._pendingOpenNotifications.get(o.toString());s!==void 0&&(super.callback(s).catch((a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})),this._pendingOpenNotifications.delete(o.toString()))}})),this._pendingOpenListeners.push(Ln.workspace.onDidCloseTextDocument(i=>{this._pendingOpenNotifications.delete(i.uri.toString())}))}}async sendPendingOpenNotifications(e){let n=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();let r=!1;for(let i of n){if(e!==void 0&&i.uri.toString()===e){r=!0;continue}await super.callback(i)}return r}getTextDocument(e){return e}notificationSent(e,n,r){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,n,r)}clear(){if(this._pendingOpenNotifications.clear(),this._pendingOpenListeners!==void 0){for(let e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}};Fn.DidOpenTextDocumentFeature=Yb;var kb=class extends un.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,n,r){super(e,Ln.workspace.onDidCloseTextDocument,kt.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,i=>e.code2ProtocolConverter.asCloseTextDocumentParams(i),i=>i,un.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=n,this._pendingTextDocumentChanges=r}get registrationType(){return kt.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,un.ensure)((0,un.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,n){let r=e.resolvedTextDocumentSync;n&&r&&r.openClose&&this.register({id:ef.generateUuid(),registerOptions:{documentSelector:n}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,n,r){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,n,r)}unregister(e){let n=this._selectors.get(e);if(n===void 0)return;super.unregister(e);let r=this._selectors.values();this._syncedDocuments.forEach(i=>{if(Ln.languages.match(n,i)>0&&!this._selectorFilter(r,i)&&!this._client.hasDedicatedTextSynchronizationFeature(i)){let o=this._client.middleware,s=a=>this._client.sendNotification(this._type,this._createParams(a));this._syncedDocuments.delete(i.uri.toString()),(o.didClose?o.didClose(i,s):s(i)).catch(a=>{this._client.error(`Sending document notification ${this._type.method} failed`,a)})}})}};Fn.DidCloseTextDocumentFeature=kb;var Hb=class extends un.DynamicDocumentFeature{_listener;_changeData;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,n){super(e),this._changeData=new Map,this._onNotificationSent=new Ln.EventEmitter,this._onPendingChangeAdded=new Ln.EventEmitter,this._pendingTextDocumentChanges=n,this._syncKind=kt.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return kt.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,un.ensure)((0,un.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,n){let r=e.resolvedTextDocumentSync;n&&r&&r.change!==void 0&&r.change!==kt.TextDocumentSyncKind.None&&this.register({id:ef.generateUuid(),registerOptions:Object.assign({},{documentSelector:n},{syncKind:r.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ln.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(let e of this._changeData.values())yield e.documentSelector}async callback(e){if(e.contentChanges.length===0)return;let n=e.document.uri,r=e.document.version,i=[];for(let o of this._changeData.values())if(Ln.languages.match(o.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let s=this._client.middleware;if(o.syncKind===kt.TextDocumentSyncKind.Incremental){let a=async c=>{let u=this._client.code2ProtocolConverter.asChangeTextDocumentParams(c,n,r);await this._client.sendNotification(kt.DidChangeTextDocumentNotification.type,u),this.notificationSent(c.document,kt.DidChangeTextDocumentNotification.type,u)};i.push(s.didChange?s.didChange(e,c=>a(c)):a(e))}else if(o.syncKind===kt.TextDocumentSyncKind.Full){let a=async c=>{let u=c.document.uri.toString();this._pendingTextDocumentChanges.set(u,c.document),this._onPendingChangeAdded.fire()};i.push(s.didChange?s.didChange(e,c=>a(c)):a(e))}}return Promise.all(i).then(void 0,o=>{throw this._client.error(`Sending document notification ${kt.DidChangeTextDocumentNotification.type.method} failed`,o),o})}notificationSent(e,n,r){this._onNotificationSent.fire({textDocument:e,type:n,params:r})}unregister(e){if(this._changeData.delete(e),this._changeData.size===0)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=kt.TextDocumentSyncKind.None;else{this._syncKind=kt.TextDocumentSyncKind.None;for(let n of this._changeData.values())if(this.updateSyncKind(n.syncKind),this._syncKind===kt.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=kt.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(this._pendingTextDocumentChanges.size===0)return[];let n;if(e.size===0)n=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{n=[];for(let r of this._pendingTextDocumentChanges)e.has(r[0])||(n.push(r[1]),this._pendingTextDocumentChanges.delete(r[0]))}return n}getProvider(e){for(let n of this._changeData.values())if(Ln.languages.match(n.documentSelector,e)>0)return{send:r=>this.callback(r)}}updateSyncKind(e){if(this._syncKind!==kt.TextDocumentSyncKind.Full)switch(e){case kt.TextDocumentSyncKind.Full:this._syncKind=e;break;case kt.TextDocumentSyncKind.Incremental:this._syncKind===kt.TextDocumentSyncKind.None&&(this._syncKind=kt.TextDocumentSyncKind.Incremental);break}}};Fn.DidChangeTextDocumentFeature=Hb;var $b=class extends un.TextDocumentEventFeature{constructor(e){super(e,Ln.workspace.onWillSaveTextDocument,kt.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,n=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(n),n=>n.document,(n,r)=>un.TextDocumentEventFeature.textDocumentFilter(n,r.document))}get registrationType(){return kt.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let n=(0,un.ensure)((0,un.ensure)(e,"textDocument"),"synchronization");n.willSave=!0}initialize(e,n){let r=e.resolvedTextDocumentSync;n&&r&&r.willSave&&this.register({id:ef.generateUuid(),registerOptions:{documentSelector:n}})}getTextDocument(e){return e.document}};Fn.WillSaveFeature=$b;var Bb=class extends un.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return kt.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let n=(0,un.ensure)((0,un.ensure)(e,"textDocument"),"synchronization");n.willSaveWaitUntil=!0}initialize(e,n){let r=e.resolvedTextDocumentSync;n&&r&&r.willSaveWaitUntil&&this.register({id:ef.generateUuid(),registerOptions:{documentSelector:n}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Ln.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(un.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let n=this._client.middleware,r=i=>this._client.sendRequest(kt.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(i)).then(async o=>{let s=await this._client.protocol2CodeConverter.asTextEdits(o);return s===void 0?[]:s});e.waitUntil(n.willSaveWaitUntil?n.willSaveWaitUntil(e,r):r(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}};Fn.WillSaveWaitUntilFeature=Bb;var Gb=class extends un.TextDocumentEventFeature{_includeText;constructor(e){super(e,Ln.workspace.onDidSaveTextDocument,kt.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,n=>e.code2ProtocolConverter.asSaveTextDocumentParams(n,this._includeText),n=>n,un.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return kt.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,un.ensure)((0,un.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,n){let r=e.resolvedTextDocumentSync;if(n&&r&&r.save){let i=typeof r.save=="boolean"?{includeText:!1}:{includeText:!!r.save.includeText};this.register({id:ef.generateUuid(),registerOptions:Object.assign({},{documentSelector:n},i)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}};Fn.DidSaveTextDocumentFeature=Gb;var FB="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function jB(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let n of FB)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}var qB=jB(),Wb=class t{_extTextDocument;_capturedTextDocument;_content;_uri;_fileName;_languageId;_version;_eol;_isUntitled;_encoding;_isDirty;_isClosed;constructor(e){this._extTextDocument=e,this._content=e.getText(),this._uri=e.uri,this._fileName=e.fileName,this._languageId=e.languageId,this._version=e.version,this._eol=e.eol,this._isUntitled=e.isUntitled,this._encoding=e.encoding,this._isDirty=e.isDirty,this._isClosed=e.isClosed,this._capturedTextDocument=LB.TextDocument.create(this._uri.toString(),this._languageId,this._version,this._content)}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}get eol(){return this._eol}get isUntitled(){return this._isUntitled}get encoding(){return this._encoding}get fileName(){return this._fileName}get isDirty(){return this._isDirty}get isClosed(){return this._isClosed}save(){return this.version===this._extTextDocument.version?this._extTextDocument.save():Promise.resolve(!1)}get lineCount(){return this._capturedTextDocument.lineCount}offsetAt(e){return this._capturedTextDocument.offsetAt(e)}positionAt(e){let n=this._capturedTextDocument.positionAt(e);return new Ln.Position(n.line,n.character)}getText(e){return this._capturedTextDocument.getText(e)}lineAt(e){let n=typeof e=="number"?e:this.validatePosition(e).line;if(n<0||n>=this.lineCount)throw new RangeError(`Illegal value for line: ${n}`);let r=this._capturedTextDocument.getLineRange(n),i=this._capturedTextDocument.getText(r),o=i.search(/\S/),s=new Ln.Range(r.start.line,r.start.character,r.end.line,r.end.character),a=n+1<this.lineCount?new Ln.Range(s.start.line,s.start.character,n+1,0):s;return{lineNumber:n,text:i,range:s,rangeIncludingLineBreak:a,firstNonWhitespaceCharacterIndex:o===-1?i.length:o,isEmptyOrWhitespace:o===-1}}getWordRangeAtPosition(e,n){let r=this.validatePosition(e).line,i=this.lineAt(r).text,o=t.getWordRegExp(n),s;for(o.lastIndex=0;(s=o.exec(i))!==null;)if(s.index<=e.character&&o.lastIndex>=e.character)return new Ln.Range(r,s.index,r,o.lastIndex)}validateRange(e){let n=this.validatePosition(e.start),r=this.validatePosition(e.end);return n===e.start&&r===e.end?e:new Ln.Range(n.line,n.character,r.line,r.character)}validatePosition(e){let n=Math.min(Math.max(e.line,0),this.lineCount-1),r=this._capturedTextDocument.getLineRange(n),i=Math.min(Math.max(e.character,0),r.end.character);return n===e.line&&i===e.character?e:new Ln.Position(n,i)}static getWordRegExp(e){let n=e??qB;if(n.flags.includes("g"))return n;let r=`${n.flags}g`;return new RegExp(n.source,r)}}});var _A=V(Ro=>{"use strict";var UB=Ro&&Ro.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),YB=Ro&&Ro.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kB=Ro&&Ro.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&UB(n,e,r[i]);return YB(n,e),n}})();Object.defineProperty(Ro,"__esModule",{value:!0});Ro.CompletionItemFeature=void 0;var HB=require("vscode"),mt=et(),zb=yt(),$B=kB(Wt()),BB=[mt.CompletionItemKind.Text,mt.CompletionItemKind.Method,mt.CompletionItemKind.Function,mt.CompletionItemKind.Constructor,mt.CompletionItemKind.Field,mt.CompletionItemKind.Variable,mt.CompletionItemKind.Class,mt.CompletionItemKind.Interface,mt.CompletionItemKind.Module,mt.CompletionItemKind.Property,mt.CompletionItemKind.Unit,mt.CompletionItemKind.Value,mt.CompletionItemKind.Enum,mt.CompletionItemKind.Keyword,mt.CompletionItemKind.Snippet,mt.CompletionItemKind.Color,mt.CompletionItemKind.File,mt.CompletionItemKind.Reference,mt.CompletionItemKind.Folder,mt.CompletionItemKind.EnumMember,mt.CompletionItemKind.Constant,mt.CompletionItemKind.Struct,mt.CompletionItemKind.Event,mt.CompletionItemKind.Operator,mt.CompletionItemKind.TypeParameter],Kb=class extends zb.TextDocumentLanguageFeature{labelDetailsSupport;constructor(e){super(e,mt.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let n=(0,zb.ensure)((0,zb.ensure)(e,"textDocument"),"completion");n.dynamicRegistration=!0,n.contextSupport=!0,n.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[mt.MarkupKind.Markdown,mt.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[mt.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[mt.InsertTextMode.asIs,mt.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},n.insertTextMode=mt.InsertTextMode.adjustIndentation,n.completionItemKind={valueSet:BB},n.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"],applyKindSupport:!0}}initialize(e,n){let r=this.getRegistrationOptions(n,e.completionProvider);r&&this.register({id:$B.generateUuid(),registerOptions:r})}registerLanguageProvider(e,n){this.labelDetailsSupport.set(n,!!e.completionItem?.labelDetailsSupport);let r=e.triggerCharacters??[],i=e.allCommitCharacters,o=e.documentSelector,s={provideCompletionItems:(a,c,u,l)=>{let d=this._client,f=this._client.middleware,g=(h,_,S,b)=>d.sendRequest(mt.CompletionRequest.type,d.code2ProtocolConverter.asCompletionParams(h,_,S),b).then(v=>b.isCancellationRequested?null:d.protocol2CodeConverter.asCompletionResult(v,i,b),v=>d.handleFailedRequest(mt.CompletionRequest.type,b,v,null));return f.provideCompletionItem?f.provideCompletionItem(a,c,l,u,g):g(a,c,l,u)},resolveCompletionItem:e.resolveProvider?(a,c)=>{let u=this._client,l=this._client.middleware,d=(f,g)=>u.sendRequest(mt.CompletionResolveRequest.type,u.code2ProtocolConverter.asCompletionItem(f,!!this.labelDetailsSupport.get(n)),g).then(h=>g.isCancellationRequested?null:u.protocol2CodeConverter.asCompletionItem(h),h=>u.handleFailedRequest(mt.CompletionResolveRequest.type,g,h,f));return l.resolveCompletionItem?l.resolveCompletionItem(a,c,d):d(a,c)}:void 0};return[HB.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(o),s,...r),s]}};Ro.CompletionItemFeature=Kb});var mA=V(Oo=>{"use strict";var GB=Oo&&Oo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),WB=Oo&&Oo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zB=Oo&&Oo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&GB(n,e,r[i]);return WB(n,e),n}})();Object.defineProperty(Oo,"__esModule",{value:!0});Oo.HoverFeature=void 0;var KB=require("vscode"),op=et(),Vb=yt(),VB=zB(Wt()),Xb=class extends Vb.TextDocumentLanguageFeature{constructor(e){super(e,op.HoverRequest.type)}fillClientCapabilities(e){let n=(0,Vb.ensure)((0,Vb.ensure)(e,"textDocument"),"hover");n.dynamicRegistration=!0,n.contentFormat=[op.MarkupKind.Markdown,op.MarkupKind.PlainText]}initialize(e,n){let r=this.getRegistrationOptions(n,e.hoverProvider);r&&this.register({id:VB.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideHover:(i,o,s)=>{let a=this._client,c=(l,d,f)=>a.sendRequest(op.HoverRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(l,d),f).then(g=>f.isCancellationRequested?null:a.protocol2CodeConverter.asHover(g),g=>a.handleFailedRequest(op.HoverRequest.type,f,g,null)),u=a.middleware;return u.provideHover?u.provideHover(i,o,s,c):c(i,o,s)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return KB.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};Oo.HoverFeature=Xb});var vA=V(xo=>{"use strict";var XB=xo&&xo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),JB=xo&&xo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),QB=xo&&xo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&XB(n,e,r[i]);return JB(n,e),n}})();Object.defineProperty(xo,"__esModule",{value:!0});xo.DefinitionFeature=void 0;var ZB=require("vscode"),Jb=et(),Qb=yt(),eG=QB(Wt()),Zb=class extends Qb.TextDocumentLanguageFeature{constructor(e){super(e,Jb.DefinitionRequest.type)}fillClientCapabilities(e){let n=(0,Qb.ensure)((0,Qb.ensure)(e,"textDocument"),"definition");n.dynamicRegistration=!0,n.linkSupport=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.definitionProvider);r&&this.register({id:eG.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideDefinition:(i,o,s)=>{let a=this._client,c=(l,d,f)=>a.sendRequest(Jb.DefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(l,d),f).then(g=>f.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,f),g=>a.handleFailedRequest(Jb.DefinitionRequest.type,f,g,null)),u=a.middleware;return u.provideDefinition?u.provideDefinition(i,o,s,c):c(i,o,s)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return ZB.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};xo.DefinitionFeature=Zb});var SA=V(Io=>{"use strict";var tG=Io&&Io.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),nG=Io&&Io.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rG=Io&&Io.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&tG(n,e,r[i]);return nG(n,e),n}})();Object.defineProperty(Io,"__esModule",{value:!0});Io.SignatureHelpFeature=void 0;var yA=require("vscode"),sp=et(),eC=yt(),iG=rG(Wt()),tC=class extends eC.TextDocumentLanguageFeature{constructor(e){super(e,sp.SignatureHelpRequest.type)}fillClientCapabilities(e){let n=(0,eC.ensure)((0,eC.ensure)(e,"textDocument"),"signatureHelp");n.dynamicRegistration=!0,n.signatureInformation={documentationFormat:[sp.MarkupKind.Markdown,sp.MarkupKind.PlainText]},n.signatureInformation.parameterInformation={labelOffsetSupport:!0},n.signatureInformation.activeParameterSupport=!0,n.signatureInformation.noActiveParameterSupport=!0,n.contextSupport=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.signatureHelpProvider);r&&this.register({id:iG.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n={provideSignatureHelp:(r,i,o,s)=>{let a=this._client,c=(l,d,f,g)=>a.sendRequest(sp.SignatureHelpRequest.type,a.code2ProtocolConverter.asSignatureHelpParams(l,d,f),g).then(h=>g.isCancellationRequested?null:a.protocol2CodeConverter.asSignatureHelp(h,g),h=>a.handleFailedRequest(sp.SignatureHelpRequest.type,g,h,null)),u=a.middleware;return u.provideSignatureHelp?u.provideSignatureHelp(r,i,s,o,c):c(r,i,s,o)}};return[this.registerProvider(e,n),n]}registerProvider(e,n){let r=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(e.retriggerCharacters===void 0){let i=e.triggerCharacters||[];return yA.languages.registerSignatureHelpProvider(r,n,...i)}else{let i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return yA.languages.registerSignatureHelpProvider(r,n,i)}}};Io.SignatureHelpFeature=tC});var DA=V(Ao=>{"use strict";var oG=Ao&&Ao.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),sG=Ao&&Ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aG=Ao&&Ao.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&oG(n,e,r[i]);return sG(n,e),n}})();Object.defineProperty(Ao,"__esModule",{value:!0});Ao.DocumentHighlightFeature=void 0;var cG=require("vscode"),nC=et(),rC=yt(),uG=aG(Wt()),iC=class extends rC.TextDocumentLanguageFeature{constructor(e){super(e,nC.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,rC.ensure)((0,rC.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.documentHighlightProvider);r&&this.register({id:uG.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideDocumentHighlights:(i,o,s)=>{let a=this._client,c=(l,d,f)=>a.sendRequest(nC.DocumentHighlightRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(l,d),f).then(g=>f.isCancellationRequested?null:a.protocol2CodeConverter.asDocumentHighlights(g,f),g=>a.handleFailedRequest(nC.DocumentHighlightRequest.type,f,g,null)),u=a.middleware;return u.provideDocumentHighlights?u.provideDocumentHighlights(i,o,s,c):c(i,o,s)}};return[cG.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r),r]}};Ao.DocumentHighlightFeature=iC});var aC=V(xr=>{"use strict";var lG=xr&&xr.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),fG=xr&&xr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),dG=xr&&xr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&lG(n,e,r[i]);return fG(n,e),n}})();Object.defineProperty(xr,"__esModule",{value:!0});xr.DocumentSymbolFeature=xr.SupportedSymbolTags=xr.SupportedSymbolKinds=void 0;var pG=require("vscode"),Ot=et(),oC=yt(),hG=dG(Wt());xr.SupportedSymbolKinds=[Ot.SymbolKind.File,Ot.SymbolKind.Module,Ot.SymbolKind.Namespace,Ot.SymbolKind.Package,Ot.SymbolKind.Class,Ot.SymbolKind.Method,Ot.SymbolKind.Property,Ot.SymbolKind.Field,Ot.SymbolKind.Constructor,Ot.SymbolKind.Enum,Ot.SymbolKind.Interface,Ot.SymbolKind.Function,Ot.SymbolKind.Variable,Ot.SymbolKind.Constant,Ot.SymbolKind.String,Ot.SymbolKind.Number,Ot.SymbolKind.Boolean,Ot.SymbolKind.Array,Ot.SymbolKind.Object,Ot.SymbolKind.Key,Ot.SymbolKind.Null,Ot.SymbolKind.EnumMember,Ot.SymbolKind.Struct,Ot.SymbolKind.Event,Ot.SymbolKind.Operator,Ot.SymbolKind.TypeParameter];xr.SupportedSymbolTags=[Ot.SymbolTag.Deprecated];var sC=class extends oC.TextDocumentLanguageFeature{constructor(e){super(e,Ot.DocumentSymbolRequest.type)}fillClientCapabilities(e){let n=(0,oC.ensure)((0,oC.ensure)(e,"textDocument"),"documentSymbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:xr.SupportedSymbolKinds},n.hierarchicalDocumentSymbolSupport=!0,n.tagSupport={valueSet:xr.SupportedSymbolTags},n.labelSupport=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.documentSymbolProvider);r&&this.register({id:hG.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideDocumentSymbols:(o,s)=>{let a=this._client,c=async(l,d)=>{try{let f=await a.sendRequest(Ot.DocumentSymbolRequest.type,a.code2ProtocolConverter.asDocumentSymbolParams(l),d);if(d.isCancellationRequested||f===void 0||f===null)return null;if(f.length===0)return[];{let g=f[0];return Ot.DocumentSymbol.is(g)?await a.protocol2CodeConverter.asDocumentSymbols(f,d):await a.protocol2CodeConverter.asSymbolInformations(f,d)}}catch(f){return a.handleFailedRequest(Ot.DocumentSymbolRequest.type,d,f,null)}},u=a.middleware;return u.provideDocumentSymbols?u.provideDocumentSymbols(o,s,c):c(o,s)}},i=e.label!==void 0?{label:e.label}:void 0;return[pG.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r,i),r]}};xr.DocumentSymbolFeature=sC});var bA=V(Mo=>{"use strict";var gG=Mo&&Mo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),_G=Mo&&Mo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mG=Mo&&Mo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&gG(n,e,r[i]);return _G(n,e),n}})();Object.defineProperty(Mo,"__esModule",{value:!0});Mo.WorkspaceSymbolFeature=void 0;var vG=require("vscode"),ap=et(),cC=yt(),EA=aC(),yG=mG(Wt()),uC=class extends cC.WorkspaceFeature{constructor(e){super(e,ap.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let n=(0,cC.ensure)((0,cC.ensure)(e,"workspace"),"symbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:EA.SupportedSymbolKinds},n.tagSupport={valueSet:EA.SupportedSymbolTags},n.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:yG.generateUuid(),registerOptions:e.workspaceSymbolProvider===!0?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){let n={provideWorkspaceSymbols:(r,i)=>{let o=this._client,s=(c,u)=>o.sendRequest(ap.WorkspaceSymbolRequest.type,{query:c},u).then(l=>u.isCancellationRequested?null:o.protocol2CodeConverter.asSymbolInformations(l,u),l=>o.handleFailedRequest(ap.WorkspaceSymbolRequest.type,u,l,null)),a=o.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(r,i,s):s(r,i)},resolveWorkspaceSymbol:e.resolveProvider===!0?(r,i)=>{let o=this._client,s=(c,u)=>o.sendRequest(ap.WorkspaceSymbolResolveRequest.type,o.code2ProtocolConverter.asWorkspaceSymbol(c),u).then(l=>u.isCancellationRequested?null:o.protocol2CodeConverter.asSymbolInformation(l),l=>o.handleFailedRequest(ap.WorkspaceSymbolResolveRequest.type,u,l,null)),a=o.middleware;return a.resolveWorkspaceSymbol?a.resolveWorkspaceSymbol(r,i,s):s(r,i)}:void 0};return[vG.languages.registerWorkspaceSymbolProvider(n),n]}};Mo.WorkspaceSymbolFeature=uC});var CA=V(Lo=>{"use strict";var SG=Lo&&Lo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),DG=Lo&&Lo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),EG=Lo&&Lo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&SG(n,e,r[i]);return DG(n,e),n}})();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.ReferencesFeature=void 0;var bG=require("vscode"),lC=et(),fC=yt(),CG=EG(Wt()),dC=class extends fC.TextDocumentLanguageFeature{constructor(e){super(e,lC.ReferencesRequest.type)}fillClientCapabilities(e){(0,fC.ensure)((0,fC.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.referencesProvider);r&&this.register({id:CG.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideReferences:(i,o,s,a)=>{let c=this._client,u=(d,f,g,h)=>c.sendRequest(lC.ReferencesRequest.type,c.code2ProtocolConverter.asReferenceParams(d,f,g),h).then(_=>h.isCancellationRequested?null:c.protocol2CodeConverter.asReferences(_,h),_=>c.handleFailedRequest(lC.ReferencesRequest.type,h,_,null)),l=c.middleware;return l.provideReferences?l.provideReferences(i,o,s,a,u):u(i,o,s,a)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return bG.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};Lo.ReferencesFeature=dC});var TA=V(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});__.TypeDefinitionFeature=void 0;var TG=require("vscode"),pC=et(),cp=yt(),hC=class extends cp.TextDocumentLanguageFeature{constructor(e){super(e,pC.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,cp.ensure)((0,cp.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let n=(0,cp.ensure)((0,cp.ensure)(e,"textDocument"),"typeDefinition");n.dynamicRegistration=!0,n.linkSupport=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.typeDefinitionProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r={provideTypeDefinition:(i,o,s)=>{let a=this._client,c=(l,d,f)=>a.sendRequest(pC.TypeDefinitionRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(l,d),f).then(g=>f.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,f),g=>a.handleFailedRequest(pC.TypeDefinitionRequest.type,f,g,null)),u=a.middleware;return u.provideTypeDefinition?u.provideTypeDefinition(i,o,s,c):c(i,o,s)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return TG.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};__.TypeDefinitionFeature=hC});var wA=V(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.ImplementationFeature=void 0;var wG=require("vscode"),gC=et(),_C=yt(),mC=class extends _C.TextDocumentLanguageFeature{constructor(e){super(e,gC.ImplementationRequest.type)}fillClientCapabilities(e){let n=(0,_C.ensure)((0,_C.ensure)(e,"textDocument"),"implementation");n.dynamicRegistration=!0,n.linkSupport=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.implementationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r={provideImplementation:(i,o,s)=>{let a=this._client,c=(l,d,f)=>a.sendRequest(gC.ImplementationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(l,d),f).then(g=>f.isCancellationRequested?null:a.protocol2CodeConverter.asDefinitionResult(g,f),g=>a.handleFailedRequest(gC.ImplementationRequest.type,f,g,null)),u=a.middleware;return u.provideImplementation?u.provideImplementation(i,o,s,c):c(i,o,s)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return wG.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};m_.ImplementationFeature=mC});var NA=V(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});v_.ColorProviderFeature=void 0;var NG=require("vscode"),up=et(),vC=yt(),yC=class extends vC.TextDocumentLanguageFeature{constructor(e){super(e,up.DocumentColorRequest.type)}fillClientCapabilities(e){(0,vC.ensure)((0,vC.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.colorProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r={provideColorPresentations:(i,o,s)=>{let a=this._client,c=(l,d,f)=>{let g={color:l,textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(d.document),range:a.code2ProtocolConverter.asRange(d.range)};return a.sendRequest(up.ColorPresentationRequest.type,g,f).then(h=>f.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(h,f),h=>a.handleFailedRequest(up.ColorPresentationRequest.type,f,h,null))},u=a.middleware;return u.provideColorPresentations?u.provideColorPresentations(i,o,s,c):c(i,o,s)},provideDocumentColors:(i,o)=>{let s=this._client,a=(u,l)=>{let d={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(u)};return s.sendRequest(up.DocumentColorRequest.type,d,l).then(f=>l.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(f,l),f=>s.handleFailedRequest(up.DocumentColorRequest.type,l,f,null))},c=s.middleware;return c.provideDocumentColors?c.provideDocumentColors(i,o,a):a(i,o)}};return[NG.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r),r]}};v_.ColorProviderFeature=yC});var PA=V(Fo=>{"use strict";var PG=Fo&&Fo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),RG=Fo&&Fo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),OG=Fo&&Fo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&PG(n,e,r[i]);return RG(n,e),n}})();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.CodeActionFeature=void 0;var xG=require("vscode"),Ir=et(),IG=OG(Wt()),SC=yt(),DC=class extends SC.TextDocumentLanguageFeature{constructor(e){super(e,Ir.CodeActionRequest.type)}fillClientCapabilities(e){let n=(0,SC.ensure)((0,SC.ensure)(e,"textDocument"),"codeAction");n.dynamicRegistration=!0,n.isPreferredSupport=!0,n.disabledSupport=!0,n.dataSupport=!0,n.resolveSupport={properties:["edit","command"]},n.codeActionLiteralSupport={codeActionKind:{valueSet:[Ir.CodeActionKind.Empty,Ir.CodeActionKind.QuickFix,Ir.CodeActionKind.Refactor,Ir.CodeActionKind.RefactorExtract,Ir.CodeActionKind.RefactorInline,Ir.CodeActionKind.RefactorMove,Ir.CodeActionKind.RefactorRewrite,Ir.CodeActionKind.Source,Ir.CodeActionKind.SourceOrganizeImports,Ir.CodeActionKind.Notebook]}},n.honorsChangeAnnotations=!0,n.documentationSupport=!0,n.tagSupport={valueSet:[Ir.CodeActionTag.LLMGenerated]}}initialize(e,n){let r=this.getRegistrationOptions(n,e.codeActionProvider);r&&this.register({id:IG.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideCodeActions:(i,o,s,a)=>{let c=this._client,u=async(d,f,g,h)=>{let _={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(d),range:c.code2ProtocolConverter.asRange(f),context:c.code2ProtocolConverter.asCodeActionContextSync(g)};return c.sendRequest(Ir.CodeActionRequest.type,_,h).then(S=>h.isCancellationRequested||S===null||S===void 0?null:c.protocol2CodeConverter.asCodeActionResult(S,h),S=>c.handleFailedRequest(Ir.CodeActionRequest.type,h,S,null))},l=c.middleware;return l.provideCodeActions?l.provideCodeActions(i,o,s,a,u):u(i,o,s,a)},resolveCodeAction:e.resolveProvider?(i,o)=>{let s=this._client,a=this._client.middleware,c=async(u,l)=>s.sendRequest(Ir.CodeActionResolveRequest.type,s.code2ProtocolConverter.asCodeActionSync(u),l).then(d=>l.isCancellationRequested?u:s.protocol2CodeConverter.asCodeAction(d,l),d=>s.handleFailedRequest(Ir.CodeActionResolveRequest.type,l,d,u));return a.resolveCodeAction?a.resolveCodeAction(i,o,c):c(i,o)}:void 0};return[xG.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r,this.getMetadata(e)),r]}getMetadata(e){if(!(e.codeActionKinds===void 0&&e.documentation===void 0))return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}};Fo.CodeActionFeature=DC});var OA=V(jo=>{"use strict";var AG=jo&&jo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),MG=jo&&jo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),LG=jo&&jo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&AG(n,e,r[i]);return MG(n,e),n}})();Object.defineProperty(jo,"__esModule",{value:!0});jo.CodeLensFeature=void 0;var RA=require("vscode"),tf=et(),FG=LG(Wt()),lp=yt(),EC=class extends lp.TextDocumentLanguageFeature{constructor(e){super(e,tf.CodeLensRequest.type)}fillClientCapabilities(e){let n=(0,lp.ensure)((0,lp.ensure)(e,"textDocument"),"codeLens");n.dynamicRegistration=!0,n.resolveSupport={properties:["command"]},(0,lp.ensure)((0,lp.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,n){this._client.onRequest(tf.CodeLensRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeCodeLensEmitter.fire()});let i=this.getRegistrationOptions(n,e.codeLensProvider);i&&this.register({id:FG.generateUuid(),registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r=new RA.EventEmitter,i={onDidChangeCodeLenses:r.event,provideCodeLenses:(o,s)=>{let a=this._client,c=(l,d)=>a.sendRequest(tf.CodeLensRequest.type,a.code2ProtocolConverter.asCodeLensParams(l),d).then(f=>d.isCancellationRequested?null:a.protocol2CodeConverter.asCodeLenses(f,d),f=>a.handleFailedRequest(tf.CodeLensRequest.type,d,f,null)),u=a.middleware;return u.provideCodeLenses?u.provideCodeLenses(o,s,c):c(o,s)},resolveCodeLens:e.resolveProvider?(o,s)=>{let a=this._client,c=(l,d)=>a.sendRequest(tf.CodeLensResolveRequest.type,a.code2ProtocolConverter.asCodeLens(l),d).then(f=>d.isCancellationRequested?l:a.protocol2CodeConverter.asCodeLens(f),f=>a.handleFailedRequest(tf.CodeLensResolveRequest.type,d,f,l)),u=a.middleware;return u.resolveCodeLens?u.resolveCodeLens(o,s,c):c(o,s)}:void 0};return[RA.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),i),{provider:i,onDidChangeCodeLensEmitter:r}]}};jo.CodeLensFeature=EC});var xA=V(Vr=>{"use strict";var jG=Vr&&Vr.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),qG=Vr&&Vr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),UG=Vr&&Vr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&jG(n,e,r[i]);return qG(n,e),n}})();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DocumentOnTypeFormattingFeature=Vr.DocumentRangeFormattingFeature=Vr.DocumentFormattingFeature=void 0;var y_=require("vscode"),no=et(),wC=UG(Wt()),Gs=yt(),nf;(function(t){function e(n){let r=y_.workspace.getConfiguration("files",n);return{trimTrailingWhitespace:r.get("trimTrailingWhitespace"),trimFinalNewlines:r.get("trimFinalNewlines"),insertFinalNewline:r.get("insertFinalNewline")}}t.fromConfiguration=e})(nf||(nf={}));var bC=class extends Gs.TextDocumentLanguageFeature{constructor(e){super(e,no.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,Gs.ensure)((0,Gs.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.documentFormattingProvider);r&&this.register({id:wC.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideDocumentFormattingEdits:(i,o,s)=>{let a=this._client,c=(l,d,f)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(l),options:a.code2ProtocolConverter.asFormattingOptions(d,nf.fromConfiguration(l))};return a.sendRequest(no.DocumentFormattingRequest.type,g,f).then(h=>f.isCancellationRequested?null:a.protocol2CodeConverter.asTextEdits(h,f),h=>a.handleFailedRequest(no.DocumentFormattingRequest.type,f,h,null))},u=a.middleware;return u.provideDocumentFormattingEdits?u.provideDocumentFormattingEdits(i,o,s,c):c(i,o,s)}};return[y_.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r),r]}};Vr.DocumentFormattingFeature=bC;var CC=class extends Gs.TextDocumentLanguageFeature{constructor(e){super(e,no.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){let n=(0,Gs.ensure)((0,Gs.ensure)(e,"textDocument"),"rangeFormatting");n.dynamicRegistration=!0,n.rangesSupport=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.documentRangeFormattingProvider);r&&this.register({id:wC.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideDocumentRangeFormattingEdits:(i,o,s,a)=>{let c=this._client,u=(d,f,g,h)=>{let _={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(d),range:c.code2ProtocolConverter.asRange(f),options:c.code2ProtocolConverter.asFormattingOptions(g,nf.fromConfiguration(d))};return c.sendRequest(no.DocumentRangeFormattingRequest.type,_,h).then(S=>h.isCancellationRequested?null:c.protocol2CodeConverter.asTextEdits(S,h),S=>c.handleFailedRequest(no.DocumentRangeFormattingRequest.type,h,S,null))},l=c.middleware;return l.provideDocumentRangeFormattingEdits?l.provideDocumentRangeFormattingEdits(i,o,s,a,u):u(i,o,s,a)}};return e.rangesSupport&&(r.provideDocumentRangesFormattingEdits=(i,o,s,a)=>{let c=this._client,u=(d,f,g,h)=>{let _={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(d),ranges:c.code2ProtocolConverter.asRanges(f),options:c.code2ProtocolConverter.asFormattingOptions(g,nf.fromConfiguration(d))};return c.sendRequest(no.DocumentRangesFormattingRequest.type,_,h).then(S=>h.isCancellationRequested?null:c.protocol2CodeConverter.asTextEdits(S,h),S=>c.handleFailedRequest(no.DocumentRangesFormattingRequest.type,h,S,null))},l=c.middleware;return l.provideDocumentRangesFormattingEdits?l.provideDocumentRangesFormattingEdits(i,o,s,a,u):u(i,o,s,a)}),[y_.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r),r]}};Vr.DocumentRangeFormattingFeature=CC;var TC=class extends Gs.TextDocumentLanguageFeature{constructor(e){super(e,no.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,Gs.ensure)((0,Gs.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.documentOnTypeFormattingProvider);r&&this.register({id:wC.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideOnTypeFormattingEdits:(o,s,a,c,u)=>{let l=this._client,d=(g,h,_,S,b)=>{let v={textDocument:l.code2ProtocolConverter.asTextDocumentIdentifier(g),position:l.code2ProtocolConverter.asPosition(h),ch:_,options:l.code2ProtocolConverter.asFormattingOptions(S,nf.fromConfiguration(g))};return l.sendRequest(no.DocumentOnTypeFormattingRequest.type,v,b).then(E=>b.isCancellationRequested?null:l.protocol2CodeConverter.asTextEdits(E,b),E=>l.handleFailedRequest(no.DocumentOnTypeFormattingRequest.type,b,E,null))},f=l.middleware;return f.provideOnTypeFormattingEdits?f.provideOnTypeFormattingEdits(o,s,a,c,u,d):d(o,s,a,c,u)}},i=e.moreTriggerCharacter||[];return[y_.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r,e.firstTriggerCharacter,...i),r]}};Vr.DocumentOnTypeFormattingFeature=TC});var MA=V(qo=>{"use strict";var YG=qo&&qo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),kG=qo&&qo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),AA=qo&&qo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&YG(n,e,r[i]);return kG(n,e),n}})();Object.defineProperty(qo,"__esModule",{value:!0});qo.RenameFeature=void 0;var HG=require("vscode"),uu=et(),$G=AA(Wt()),IA=AA(Ii()),NC=yt(),PC=class extends NC.TextDocumentLanguageFeature{constructor(e){super(e,uu.RenameRequest.type)}fillClientCapabilities(e){let n=(0,NC.ensure)((0,NC.ensure)(e,"textDocument"),"rename");n.dynamicRegistration=!0,n.prepareSupport=!0,n.prepareSupportDefaultBehavior=uu.PrepareSupportDefaultBehavior.Identifier,n.honorsChangeAnnotations=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.renameProvider);r&&(IA.boolean(e.renameProvider)&&(r.prepareProvider=!1),this.register({id:$G.generateUuid(),registerOptions:r}))}registerLanguageProvider(e){let n=e.documentSelector,r={provideRenameEdits:(i,o,s,a)=>{let c=this._client,u=async(d,f,g,h)=>{let _={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(d),position:c.code2ProtocolConverter.asPosition(f),newName:g},S=null;try{S=await c.sendRequest(uu.RenameRequest.type,_,h)}catch(v){return c.handleFailedRequest(uu.RenameRequest.type,h,v,null,!1)}if(h.isCancellationRequested||S===null)return null;let b=await c.protocol2CodeConverter.asWorkspaceEdit(S,h);if(h.isCancellationRequested)return null;if(!c.validateWorkspaceEdit(S))throw new Error("The rename edit returned from the server is not valid anymore and cannot be applied.");return b},l=c.middleware;return l.provideRenameEdits?l.provideRenameEdits(i,o,s,a,u):u(i,o,s,a)},prepareRename:e.prepareProvider?(i,o,s)=>{let a=this._client,c=(l,d,f)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(l),position:a.code2ProtocolConverter.asPosition(d)};return a.sendRequest(uu.PrepareRenameRequest.type,g,f).then(h=>f.isCancellationRequested?null:uu.Range.is(h)?a.protocol2CodeConverter.asRange(h):this.isDefaultBehavior(h)?h.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):h&&uu.Range.is(h.range)?{range:a.protocol2CodeConverter.asRange(h.range),placeholder:h.placeholder}:Promise.reject(new Error("The element can't be renamed.")),h=>{throw typeof h.message=="string"?new Error(h.message):new Error("The element can't be renamed.")})},u=a.middleware;return u.prepareRename?u.prepareRename(i,o,s,c):c(i,o,s)}:void 0};return[this.registerProvider(n,r),r]}registerProvider(e,n){return HG.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}isDefaultBehavior(e){let n=e;return n&&IA.boolean(n.defaultBehavior)}};qo.RenameFeature=PC});var LA=V(Uo=>{"use strict";var BG=Uo&&Uo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),GG=Uo&&Uo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),WG=Uo&&Uo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&BG(n,e,r[i]);return GG(n,e),n}})();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.DocumentLinkFeature=void 0;var zG=require("vscode"),fp=et(),RC=yt(),KG=WG(Wt()),OC=class extends RC.TextDocumentLanguageFeature{constructor(e){super(e,fp.DocumentLinkRequest.type)}fillClientCapabilities(e){let n=(0,RC.ensure)((0,RC.ensure)(e,"textDocument"),"documentLink");n.dynamicRegistration=!0,n.tooltipSupport=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.documentLinkProvider);r&&this.register({id:KG.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideDocumentLinks:(i,o)=>{let s=this._client,a=(u,l)=>s.sendRequest(fp.DocumentLinkRequest.type,s.code2ProtocolConverter.asDocumentLinkParams(u),l).then(d=>l.isCancellationRequested?null:s.protocol2CodeConverter.asDocumentLinks(d,l),d=>s.handleFailedRequest(fp.DocumentLinkRequest.type,l,d,null)),c=s.middleware;return c.provideDocumentLinks?c.provideDocumentLinks(i,o,a):a(i,o)},resolveDocumentLink:e.resolveProvider?(i,o)=>{let s=this._client,a=(u,l)=>s.sendRequest(fp.DocumentLinkResolveRequest.type,s.code2ProtocolConverter.asDocumentLink(u),l).then(d=>l.isCancellationRequested?u:s.protocol2CodeConverter.asDocumentLink(d),d=>s.handleFailedRequest(fp.DocumentLinkResolveRequest.type,l,d,u)),c=s.middleware;return c.resolveDocumentLink?c.resolveDocumentLink(i,o,a):a(i,o)}:void 0};return[zG.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r),r]}};Uo.DocumentLinkFeature=OC});var jA=V(Yo=>{"use strict";var VG=Yo&&Yo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),XG=Yo&&Yo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),JG=Yo&&Yo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&VG(n,e,r[i]);return XG(n,e),n}})();Object.defineProperty(Yo,"__esModule",{value:!0});Yo.ExecuteCommandFeature=void 0;var QG=require("vscode"),xC=et(),ZG=JG(Wt()),FA=yt(),IC=class{_client;_commands;constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return xC.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,FA.ensure)((0,FA.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:ZG.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let n=this._client,r=n.middleware,i=(o,s)=>{let a={command:o,arguments:s};return n.sendRequest(xC.ExecuteCommandRequest.type,a).then(void 0,c=>n.handleFailedRequest(xC.ExecuteCommandRequest.type,void 0,c,void 0))};if(e.registerOptions.commands){let o=[];for(let s of e.registerOptions.commands)o.push(QG.commands.registerCommand(s,(...a)=>r.executeCommand?r.executeCommand(s,a,i):i(s,a)));this._commands.set(e.id,o)}}unregister(e){let n=this._commands.get(e);n&&(this._commands.delete(e),n.forEach(r=>r.dispose()))}clear(){this._commands.forEach(e=>{e.forEach(n=>n.dispose())}),this._commands.clear()}};Yo.ExecuteCommandFeature=IC});var UA=V(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});S_.FoldingRangeFeature=void 0;var qA=require("vscode"),lu=et(),dp=yt(),AC=class extends dp.TextDocumentLanguageFeature{constructor(e){super(e,lu.FoldingRangeRequest.type)}fillClientCapabilities(e){let n=(0,dp.ensure)((0,dp.ensure)(e,"textDocument"),"foldingRange");n.dynamicRegistration=!0,n.rangeLimit=5e3,n.lineFoldingOnly=!0,n.foldingRangeKind={valueSet:[lu.FoldingRangeKind.Comment,lu.FoldingRangeKind.Imports,lu.FoldingRangeKind.Region]},n.foldingRange={collapsedText:!1},(0,dp.ensure)((0,dp.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,n){this._client.onRequest(lu.FoldingRangeRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeFoldingRange.fire()});let[r,i]=this.getRegistration(n,e.foldingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r=new qA.EventEmitter,i={onDidChangeFoldingRanges:r.event,provideFoldingRanges:(o,s,a)=>{let c=this._client,u=(d,f,g)=>{let h={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(d)};return c.sendRequest(lu.FoldingRangeRequest.type,h,g).then(_=>g.isCancellationRequested?null:c.protocol2CodeConverter.asFoldingRanges(_,g),_=>c.handleFailedRequest(lu.FoldingRangeRequest.type,g,_,null))},l=c.middleware;return l.provideFoldingRanges?l.provideFoldingRanges(o,s,a,u):u(o,s,a)}};return[qA.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),i),{provider:i,onDidChangeFoldingRange:r}]}};S_.FoldingRangeFeature=AC});var YA=V(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});D_.DeclarationFeature=void 0;var e2=require("vscode"),MC=et(),LC=yt(),FC=class extends LC.TextDocumentLanguageFeature{constructor(e){super(e,MC.DeclarationRequest.type)}fillClientCapabilities(e){let n=(0,LC.ensure)((0,LC.ensure)(e,"textDocument"),"declaration");n.dynamicRegistration=!0,n.linkSupport=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.declarationProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r={provideDeclaration:(i,o,s)=>{let a=this._client,c=(l,d,f)=>a.sendRequest(MC.DeclarationRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(l,d),f).then(g=>f.isCancellationRequested?null:a.protocol2CodeConverter.asDeclarationResult(g,f),g=>a.handleFailedRequest(MC.DeclarationRequest.type,f,g,null)),u=a.middleware;return u.provideDeclaration?u.provideDeclaration(i,o,s,c):c(i,o,s)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return e2.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};D_.DeclarationFeature=FC});var kA=V(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});E_.SelectionRangeFeature=void 0;var t2=require("vscode"),jC=et(),qC=yt(),UC=class extends qC.TextDocumentLanguageFeature{constructor(e){super(e,jC.SelectionRangeRequest.type)}fillClientCapabilities(e){let n=(0,qC.ensure)((0,qC.ensure)(e,"textDocument"),"selectionRange");n.dynamicRegistration=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.selectionRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r={provideSelectionRanges:(i,o,s)=>{let a=this._client,c=async(l,d,f)=>{let g={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(l),positions:a.code2ProtocolConverter.asPositionsSync(d,f)};return a.sendRequest(jC.SelectionRangeRequest.type,g,f).then(h=>f.isCancellationRequested?null:a.protocol2CodeConverter.asSelectionRanges(h,f),h=>a.handleFailedRequest(jC.SelectionRangeRequest.type,f,h,null))},u=a.middleware;return u.provideSelectionRanges?u.provideSelectionRanges(i,o,s,c):c(i,o,s)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return t2.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};E_.SelectionRangeFeature=UC});var HA=V(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.CallHierarchyFeature=void 0;var n2=require("vscode"),fu=et(),YC=yt(),kC=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,n,r){let i=this.client,o=this.middleware,s=(a,c,u)=>{let l=i.code2ProtocolConverter.asTextDocumentPositionParams(a,c);return i.sendRequest(fu.CallHierarchyPrepareRequest.type,l,u).then(d=>u.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(d,u),d=>i.handleFailedRequest(fu.CallHierarchyPrepareRequest.type,u,d,null))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,n,r,s):s(e,n,r)}provideCallHierarchyIncomingCalls(e,n){let r=this.client,i=this.middleware,o=(s,a)=>{let c={item:r.code2ProtocolConverter.asCallHierarchyItem(s)};return r.sendRequest(fu.CallHierarchyIncomingCallsRequest.type,c,a).then(u=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyIncomingCalls(u,a),u=>r.handleFailedRequest(fu.CallHierarchyIncomingCallsRequest.type,a,u,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,n,o):o(e,n)}provideCallHierarchyOutgoingCalls(e,n){let r=this.client,i=this.middleware,o=(s,a)=>{let c={item:r.code2ProtocolConverter.asCallHierarchyItem(s)};return r.sendRequest(fu.CallHierarchyOutgoingCallsRequest.type,c,a).then(u=>a.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyOutgoingCalls(u,a),u=>r.handleFailedRequest(fu.CallHierarchyOutgoingCallsRequest.type,a,u,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,n,o):o(e,n)}},HC=class extends YC.TextDocumentLanguageFeature{constructor(e){super(e,fu.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let n=e,r=(0,YC.ensure)((0,YC.ensure)(n,"textDocument"),"callHierarchy");r.dynamicRegistration=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.callHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=this._client,r=new kC(n);return[n2.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};b_.CallHierarchyFeature=HC});var BA=V(ko=>{"use strict";var r2=ko&&ko.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),i2=ko&&ko.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$A=ko&&ko.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&r2(n,e,r[i]);return i2(n,e),n}})();Object.defineProperty(ko,"__esModule",{value:!0});ko.SemanticTokensFeature=void 0;var C_=$A(require("vscode")),rt=et(),pp=yt(),o2=$A(Ii()),$C=class extends pp.TextDocumentLanguageFeature{constructor(e){super(e,rt.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){let n=(0,pp.ensure)((0,pp.ensure)(e,"textDocument"),"semanticTokens");n.dynamicRegistration=!0,n.tokenTypes=[rt.SemanticTokenTypes.namespace,rt.SemanticTokenTypes.type,rt.SemanticTokenTypes.class,rt.SemanticTokenTypes.enum,rt.SemanticTokenTypes.interface,rt.SemanticTokenTypes.struct,rt.SemanticTokenTypes.typeParameter,rt.SemanticTokenTypes.parameter,rt.SemanticTokenTypes.variable,rt.SemanticTokenTypes.property,rt.SemanticTokenTypes.enumMember,rt.SemanticTokenTypes.event,rt.SemanticTokenTypes.function,rt.SemanticTokenTypes.method,rt.SemanticTokenTypes.macro,rt.SemanticTokenTypes.keyword,rt.SemanticTokenTypes.comment,rt.SemanticTokenTypes.string,rt.SemanticTokenTypes.number,rt.SemanticTokenTypes.regexp,rt.SemanticTokenTypes.operator,rt.SemanticTokenTypes.decorator,rt.SemanticTokenTypes.label],n.tokenModifiers=[rt.SemanticTokenModifiers.declaration,rt.SemanticTokenModifiers.definition,rt.SemanticTokenModifiers.readonly,rt.SemanticTokenModifiers.static,rt.SemanticTokenModifiers.deprecated,rt.SemanticTokenModifiers.abstract,rt.SemanticTokenModifiers.async,rt.SemanticTokenModifiers.modification,rt.SemanticTokenModifiers.documentation,rt.SemanticTokenModifiers.defaultLibrary],n.formats=[rt.TokenFormat.Relative],n.requests={range:!0,full:{delta:!0}},n.multilineTokenSupport=!1,n.overlappingTokenSupport=!1,n.serverCancelSupport=!0,n.augmentsSyntaxTokens=!0,(0,pp.ensure)((0,pp.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,n){this._client.onRequest(rt.SemanticTokensRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeSemanticTokensEmitter.fire()});let[i,o]=this.getRegistration(n,e.semanticTokensProvider);!i||!o||this.register({id:i,registerOptions:o})}registerLanguageProvider(e){let n=e.documentSelector,r=o2.boolean(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,o=new C_.EventEmitter,s=r?{onDidChangeSemanticTokens:o.event,provideDocumentSemanticTokens:(g,h)=>{let _=this._client,S=_.middleware,b=(v,E)=>{let x={textDocument:_.code2ProtocolConverter.asTextDocumentIdentifier(v)};return _.sendRequest(rt.SemanticTokensRequest.type,x,E).then(P=>E.isCancellationRequested?null:_.protocol2CodeConverter.asSemanticTokens(P,E),P=>_.handleFailedRequest(rt.SemanticTokensRequest.type,E,P,null))};return S.provideDocumentSemanticTokens?S.provideDocumentSemanticTokens(g,h,b):b(g,h)},provideDocumentSemanticTokensEdits:i?(g,h,_)=>{let S=this._client,b=S.middleware,v=(E,x,P)=>{let T={textDocument:S.code2ProtocolConverter.asTextDocumentIdentifier(E),previousResultId:x};return S.sendRequest(rt.SemanticTokensDeltaRequest.type,T,P).then(async N=>P.isCancellationRequested?null:rt.SemanticTokens.is(N)?await S.protocol2CodeConverter.asSemanticTokens(N,P):await S.protocol2CodeConverter.asSemanticTokensEdits(N,P),N=>S.handleFailedRequest(rt.SemanticTokensDeltaRequest.type,P,N,null))};return b.provideDocumentSemanticTokensEdits?b.provideDocumentSemanticTokensEdits(g,h,_,v):v(g,h,_)}:void 0}:void 0,c=e.range===!0?{onDidChangeSemanticTokens:o.event,provideDocumentRangeSemanticTokens:(g,h,_)=>{let S=this._client,b=S.middleware,v=(E,x,P)=>{let T={textDocument:S.code2ProtocolConverter.asTextDocumentIdentifier(E),range:S.code2ProtocolConverter.asRange(x)};return S.sendRequest(rt.SemanticTokensRangeRequest.type,T,P).then(N=>P.isCancellationRequested?null:S.protocol2CodeConverter.asSemanticTokens(N,P),N=>S.handleFailedRequest(rt.SemanticTokensRangeRequest.type,P,N,null))};return b.provideDocumentRangeSemanticTokens?b.provideDocumentRangeSemanticTokens(g,h,_,v):v(g,h,_)}}:void 0,u=[],l=this._client,d=l.protocol2CodeConverter.asSemanticTokensLegend(e.legend),f=l.protocol2CodeConverter.asDocumentSelector(n);return s!==void 0&&u.push(C_.languages.registerDocumentSemanticTokensProvider(f,s,d)),c!==void 0&&u.push(C_.languages.registerDocumentRangeSemanticTokensProvider(f,c,d)),[new C_.Disposable(()=>u.forEach(g=>g.dispose())),{range:c,full:s,onDidChangeSemanticTokensEmitter:o}]}};ko.SemanticTokensFeature=$C});var WA=V(Ho=>{"use strict";var s2=Ho&&Ho.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),a2=Ho&&Ho.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),GA=Ho&&Ho.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&s2(n,e,r[i]);return a2(n,e),n}})();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.LinkedEditingFeature=void 0;var c2=GA(require("vscode")),BC=GA(et()),GC=yt(),WC=class extends GC.TextDocumentLanguageFeature{constructor(e){super(e,BC.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){let n=(0,GC.ensure)((0,GC.ensure)(e,"textDocument"),"linkedEditingRange");n.dynamicRegistration=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.linkedEditingRangeProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r={provideLinkedEditingRanges:(i,o,s)=>{let a=this._client,c=(l,d,f)=>a.sendRequest(BC.LinkedEditingRangeRequest.type,a.code2ProtocolConverter.asTextDocumentPositionParams(l,d),f).then(g=>f.isCancellationRequested?null:a.protocol2CodeConverter.asLinkedEditingRanges(g,f),g=>a.handleFailedRequest(BC.LinkedEditingRangeRequest.type,f,g,null)),u=a.middleware;return u.provideLinkedEditingRange?u.provideLinkedEditingRange(i,o,s,c):c(i,o,s)}};return[this.registerProvider(n,r),r]}registerProvider(e,n){return c2.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};Ho.LinkedEditingFeature=WC});var zA=V(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});T_.TypeHierarchyFeature=void 0;var u2=require("vscode"),du=et(),zC=yt(),KC=class{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,n,r){let i=this.client,o=this.middleware,s=(a,c,u)=>{let l=i.code2ProtocolConverter.asTextDocumentPositionParams(a,c);return i.sendRequest(du.TypeHierarchyPrepareRequest.type,l,u).then(d=>u.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(d,u),d=>i.handleFailedRequest(du.TypeHierarchyPrepareRequest.type,u,d,null))};return o.prepareTypeHierarchy?o.prepareTypeHierarchy(e,n,r,s):s(e,n,r)}provideTypeHierarchySupertypes(e,n){let r=this.client,i=this.middleware,o=(s,a)=>{let c={item:r.code2ProtocolConverter.asTypeHierarchyItem(s)};return r.sendRequest(du.TypeHierarchySupertypesRequest.type,c,a).then(u=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(u,a),u=>r.handleFailedRequest(du.TypeHierarchySupertypesRequest.type,a,u,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,n,o):o(e,n)}provideTypeHierarchySubtypes(e,n){let r=this.client,i=this.middleware,o=(s,a)=>{let c={item:r.code2ProtocolConverter.asTypeHierarchyItem(s)};return r.sendRequest(du.TypeHierarchySubtypesRequest.type,c,a).then(u=>a.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(u,a),u=>r.handleFailedRequest(du.TypeHierarchySubtypesRequest.type,a,u,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,n,o):o(e,n)}},VC=class extends zC.TextDocumentLanguageFeature{constructor(e){super(e,du.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){let n=(0,zC.ensure)((0,zC.ensure)(e,"textDocument"),"typeHierarchy");n.dynamicRegistration=!0}initialize(e,n){let[r,i]=this.getRegistration(n,e.typeHierarchyProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=this._client,r=new KC(n);return[u2.languages.registerTypeHierarchyProvider(n.protocol2CodeConverter.asDocumentSelector(e.documentSelector),r),r]}};T_.TypeHierarchyFeature=VC});var VA=V(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.InlineValueFeature=void 0;var KA=require("vscode"),w_=et(),hp=yt(),XC=class extends hp.TextDocumentLanguageFeature{constructor(e){super(e,w_.InlineValueRequest.type)}fillClientCapabilities(e){(0,hp.ensure)((0,hp.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,hp.ensure)((0,hp.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,n){this._client.onRequest(w_.InlineValueRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeInlineValues.fire()});let[r,i]=this.getRegistration(n,e.inlineValueProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r=new KA.EventEmitter,i={onDidChangeInlineValues:r.event,provideInlineValues:(o,s,a,c)=>{let u=this._client,l=(f,g,h,_)=>{let S={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(f),range:u.code2ProtocolConverter.asRange(g),context:u.code2ProtocolConverter.asInlineValueContext(h)};return u.sendRequest(w_.InlineValueRequest.type,S,_).then(b=>_.isCancellationRequested?null:u.protocol2CodeConverter.asInlineValues(b,_),b=>u.handleFailedRequest(w_.InlineValueRequest.type,_,b,null))},d=u.middleware;return d.provideInlineValues?d.provideInlineValues(o,s,a,c,l):l(o,s,a,c)}};return[this.registerProvider(n,i),{provider:i,onDidChangeInlineValues:r}]}registerProvider(e,n){return KA.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};N_.InlineValueFeature=XC});var JA=V(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.InlayHintsFeature=void 0;var XA=require("vscode"),rf=et(),gp=yt(),JC=class extends gp.TextDocumentLanguageFeature{constructor(e){super(e,rf.InlayHintRequest.type)}fillClientCapabilities(e){let n=(0,gp.ensure)((0,gp.ensure)(e,"textDocument"),"inlayHint");n.dynamicRegistration=!0,n.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,gp.ensure)((0,gp.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,n){this._client.onRequest(rf.InlayHintRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeInlayHints.fire()});let[r,i]=this.getRegistration(n,e.inlayHintProvider);!r||!i||this.register({id:r,registerOptions:i})}registerLanguageProvider(e){let n=e.documentSelector,r=new XA.EventEmitter,i={onDidChangeInlayHints:r.event,provideInlayHints:(o,s,a)=>{let c=this._client,u=async(d,f,g)=>{let h={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(d),range:c.code2ProtocolConverter.asRange(f)};try{let _=await c.sendRequest(rf.InlayHintRequest.type,h,g);return g.isCancellationRequested?null:c.protocol2CodeConverter.asInlayHints(_,g)}catch(_){return c.handleFailedRequest(rf.InlayHintRequest.type,g,_,null)}},l=c.middleware;return l.provideInlayHints?l.provideInlayHints(o,s,a,u):u(o,s,a)}};return i.resolveInlayHint=e.resolveProvider===!0?(o,s)=>{let a=this._client,c=async(l,d)=>{try{let f=await a.sendRequest(rf.InlayHintResolveRequest.type,a.code2ProtocolConverter.asInlayHint(l),d);if(d.isCancellationRequested)return null;let g=a.protocol2CodeConverter.asInlayHint(f,d);return d.isCancellationRequested?null:g}catch(f){return a.handleFailedRequest(rf.InlayHintResolveRequest.type,d,f,null)}},u=a.middleware;return u.resolveInlayHint?u.resolveInlayHint(o,s,c):c(o,s)}:void 0,[this.registerProvider(n,i),{provider:i,onDidChangeInlayHints:r}]}registerProvider(e,n){return XA.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),n)}};P_.InlayHintsFeature=JC});var QA=V(ro=>{"use strict";var l2=ro&&ro.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),f2=ro&&ro.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),d2=ro&&ro.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&l2(n,e,r[i]);return f2(n,e),n}})();Object.defineProperty(ro,"__esModule",{value:!0});ro.WorkspaceFoldersFeature=void 0;ro.arrayDiff=ZC;var p2=d2(Wt()),R_=require("vscode"),_p=et();function QC(t,e){if(t!=null)return t[e]}function ZC(t,e){return t.filter(n=>e.indexOf(n)<0)}var eT=class{_client;_listeners;_initialFolders;constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return _p.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let n=R_.workspace.workspaceFolders;this.initializeWithFolders(n),n===void 0?e.workspaceFolders=null:e.workspaceFolders=n.map(r=>this.asProtocol(r))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let n=this._client;n.onRequest(_p.WorkspaceFoldersRequest.type,o=>{let s=()=>{let c=R_.workspace.workspaceFolders;return c===void 0?null:c.map(l=>this.asProtocol(l))},a=n.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(o,s):s(o)});let r=QC(QC(QC(e,"workspace"),"workspaceFolders"),"changeNotifications"),i;typeof r=="string"?i=r:r===!0&&(i=p2.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let n;if(this._initialFolders&&e){let r=ZC(this._initialFolders,e),i=ZC(e,this._initialFolders);(i.length>0||r.length>0)&&(n=this.doSendEvent(i,r))}else this._initialFolders?n=this.doSendEvent([],this._initialFolders):e&&(n=this.doSendEvent(e,[]));n!==void 0&&n.catch(r=>{this._client.error(`Sending notification ${_p.DidChangeWorkspaceFoldersNotification.type.method} failed`,r)})}doSendEvent(e,n){let r={event:{added:e.map(i=>this.asProtocol(i)),removed:n.map(i=>this.asProtocol(i))}};return this._client.sendNotification(_p.DidChangeWorkspaceFoldersNotification.type,r)}register(e){let n=e.id,r=this._client,i=R_.workspace.onDidChangeWorkspaceFolders(o=>{let s=u=>this.doSendEvent(u.added,u.removed),a=r.middleware.workspace;(a&&a.didChangeWorkspaceFolders?a.didChangeWorkspaceFolders(o,s):s(o)).catch(u=>{this._client.error(`Sending notification ${_p.DidChangeWorkspaceFoldersNotification.type.method} failed`,u)})});this._listeners.set(n,i),this.sendInitialEvent(R_.workspace.workspaceFolders)}unregister(e){let n=this._listeners.get(e);n!==void 0&&(this._listeners.delete(e),n.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return e===void 0?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}};ro.WorkspaceFoldersFeature=eT});var tM=V(jn=>{"use strict";var h2=jn&&jn.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),g2=jn&&jn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),I_=jn&&jn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&h2(n,e,r[i]);return g2(n,e),n}})();Object.defineProperty(jn,"__esModule",{value:!0});jn.WillDeleteFilesFeature=jn.WillRenameFilesFeature=jn.WillCreateFilesFeature=jn.DidDeleteFilesFeature=jn.DidRenameFilesFeature=jn.DidCreateFilesFeature=void 0;var Fi=I_(require("vscode")),_2=I_(eb()),Ws=I_(et()),m2=I_(Wt());function ZA(t,e){return t[e]===void 0&&(t[e]={}),t[e]}function v2(t,e){return t[e]}function eM(t,e,n){t[e]=n}var mp=class t{_client;_event;_registrationType;_clientCapability;_serverCapability;_listener;_filters;constructor(e,n,r,i,o){this._client=e,this._event=n,this._registrationType=r,this._clientCapability=i,this._serverCapability=o,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){let n=ZA(ZA(e,"workspace"),"fileOperations");eM(n,"dynamicRegistration",!0),eM(n,this._clientCapability,!0)}initialize(e){let n=e.workspace?.fileOperations,r=n!==void 0?v2(n,this._serverCapability):void 0;if(r?.filters!==void 0)try{this.register({id:m2.generateUuid(),registerOptions:{filters:r.filters}})}catch(i){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${i}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let n=e.registerOptions.filters.map(r=>{let i=new _2.Minimatch(r.pattern.glob,t.asMinimatchOptions(r.pattern.options));if(!i.makeRe())throw new Error(`Invalid pattern ${r.pattern.glob}!`);return{scheme:r.scheme,matcher:i,kind:r.pattern.matches}});this._filters.set(e.id,n)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return t.getFileType(e)}async filter(e,n){let r=await Promise.all(e.files.map(async o=>{let s=n(o),a=s.fsPath.replace(/\\/g,"/");for(let c of this._filters.values())for(let u of c)if(!(u.scheme!==void 0&&u.scheme!==s.scheme)){if(u.matcher.match(a)){if(u.kind===void 0)return!0;let l=await this.getFileType(s);if(l===void 0)return this._client.info(`Unable to determine file type for ${s.toString()}. Treating as a match.`),!0;if(l===Fi.FileType.File&&u.kind===Ws.FileOperationPatternKind.file||l===Fi.FileType.Directory&&u.kind===Ws.FileOperationPatternKind.folder)return!0}else if(u.kind===Ws.FileOperationPatternKind.folder&&await t.getFileType(s)===Fi.FileType.Directory&&u.matcher.match(`${a}/`))return!0}return!1})),i=e.files.filter((o,s)=>r[s]);return{...e,files:i}}static async getFileType(e){try{return(await Fi.workspace.fs.stat(e)).type}catch{return}}static asMinimatchOptions(e){let n={dot:!0};return e?.ignoreCase===!0&&(n.nocase=!0),n}},O_=class extends mp{_notificationType;_accessUri;_createParams;constructor(e,n,r,i,o,s,a){super(e,n,r,i,o),this._notificationType=r,this._accessUri=s,this._createParams=a}async send(e){let n=await this.filter(e,this._accessUri);if(n.files.length){let r=async i=>this._client.sendNotification(this._notificationType,this._createParams(i));return this.doSend(n,r)}}},x_=class extends O_{_willListener;_fsPathFileTypes=new Map;async getFileType(e){let n=e.fsPath;if(this._fsPathFileTypes.has(n))return this._fsPathFileTypes.get(n);let r=await mp.getFileType(e);return r&&this._fsPathFileTypes.set(n,r),r}async cacheFileTypes(e,n){await this.filter(e,n)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),this.filterSize()===0&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}},tT=class extends O_{constructor(e){super(e,Fi.workspace.onDidCreateFiles,Ws.DidCreateFilesNotification.type,"didCreate","didCreate",n=>n,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,n){let r=this._client.middleware.workspace;return r?.didCreateFiles?r.didCreateFiles(e,n):n(e)}};jn.DidCreateFilesFeature=tT;var nT=class extends x_{constructor(e){super(e,Fi.workspace.onDidRenameFiles,Ws.DidRenameFilesNotification.type,"didRename","didRename",n=>n.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=Fi.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,n=>n.oldUri))}doSend(e,n){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didRenameFiles?r.didRenameFiles(e,n):n(e)}};jn.DidRenameFilesFeature=nT;var rT=class extends x_{constructor(e){super(e,Fi.workspace.onDidDeleteFiles,Ws.DidDeleteFilesNotification.type,"didDelete","didDelete",n=>n,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=Fi.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,n=>n))}doSend(e,n){this.clearFileTypeCache();let r=this._client.middleware.workspace;return r?.didDeleteFiles?r.didDeleteFiles(e,n):n(e)}};jn.DidDeleteFilesFeature=rT;var vp=class extends mp{_requestType;_accessUri;_createParams;constructor(e,n,r,i,o,s,a){super(e,n,r,i,o),this._requestType=r,this._accessUri=s,this._createParams=a}async send(e){let n=this.waitUntil(e);e.waitUntil(n)}async waitUntil(e){let n=await this.filter(e,this._accessUri);if(n.files.length){let r=i=>this._client.sendRequest(this._requestType,this._createParams(i),i.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(n,r)}else return}},iT=class extends vp{constructor(e){super(e,Fi.workspace.onWillCreateFiles,Ws.WillCreateFilesRequest.type,"willCreate","willCreate",n=>n,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,n){let r=this._client.middleware.workspace;return r?.willCreateFiles?r.willCreateFiles(e,n):n(e)}};jn.WillCreateFilesFeature=iT;var oT=class extends vp{constructor(e){super(e,Fi.workspace.onWillRenameFiles,Ws.WillRenameFilesRequest.type,"willRename","willRename",n=>n.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,n){let r=this._client.middleware.workspace;return r?.willRenameFiles?r.willRenameFiles(e,n):n(e)}};jn.WillRenameFilesFeature=oT;var sT=class extends vp{constructor(e){super(e,Fi.workspace.onWillDeleteFiles,Ws.WillDeleteFilesRequest.type,"willDelete","willDelete",n=>n,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,n){let r=this._client.middleware.workspace;return r?.willDeleteFiles?r.willDeleteFiles(e,n):n(e)}};jn.WillDeleteFilesFeature=sT});var nM=V($o=>{"use strict";var y2=$o&&$o.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),S2=$o&&$o.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),D2=$o&&$o.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&y2(n,e,r[i]);return S2(n,e),n}})();Object.defineProperty($o,"__esModule",{value:!0});$o.InlineCompletionItemFeature=void 0;var E2=require("vscode"),aT=et(),cT=yt(),b2=D2(Wt()),uT=class extends cT.TextDocumentLanguageFeature{constructor(e){super(e,aT.InlineCompletionRequest.type)}fillClientCapabilities(e){let n=(0,cT.ensure)((0,cT.ensure)(e,"textDocument"),"inlineCompletion");n.dynamicRegistration=!0}initialize(e,n){let r=this.getRegistrationOptions(n,e.inlineCompletionProvider);r&&this.register({id:b2.generateUuid(),registerOptions:r})}registerLanguageProvider(e){let n=e.documentSelector,r={provideInlineCompletionItems:(i,o,s,a)=>{let c=this._client,u=this._client.middleware,l=(d,f,g,h)=>c.sendRequest(aT.InlineCompletionRequest.type,c.code2ProtocolConverter.asInlineCompletionParams(d,f,g),h).then(_=>h.isCancellationRequested?null:c.protocol2CodeConverter.asInlineCompletionResult(_,h),_=>c.handleFailedRequest(aT.InlineCompletionRequest.type,h,_,null));return u.provideInlineCompletionItems?u.provideInlineCompletionItems(i,o,s,a,l):l(i,o,s,a)}};return[E2.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(n),r),r]}};$o.InlineCompletionItemFeature=uT});var oM=V(Bo=>{"use strict";var C2=Bo&&Bo.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),T2=Bo&&Bo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),iM=Bo&&Bo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&C2(n,e,r[i]);return T2(n,e),n}})();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.TextDocumentContentFeature=void 0;var lT=iM(require("vscode")),of=et(),rM=yt(),w2=iM(Wt()),fT=class{_client;_registrations=new Map;constructor(e){this._client=e}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:of.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return of.TextDocumentContentRequest.type}getProviders(){let e=[];for(let n of this._registrations.values())e.push(...n.providers);return e}fillClientCapabilities(e){let n=(0,rM.ensure)((0,rM.ensure)(e,"workspace"),"textDocumentContent");n.dynamicRegistration=!0}initialize(e){let n=this._client;if(n.onRequest(of.TextDocumentContentRefreshRequest.type,async o=>{let s=n.protocol2CodeConverter.asUri(o.uri);for(let a of this._registrations.values())for(let c of a.providers)c.scheme===s.scheme&&c.onDidChangeEmitter.fire(s)}),!e?.workspace?.textDocumentContent)return;let r=e.workspace.textDocumentContent,i=of.StaticRegistrationOptions.hasId(r)?r.id:w2.generateUuid();this.register({id:i,registerOptions:r})}register(e){let n=[],r=[];for(let i of e.registerOptions.schemes){let[o,s]=this.registerTextDocumentContentProvider(i);n.push(s),r.push(o)}this._registrations.set(e.id,{disposable:lT.Disposable.from(...r),providers:n})}registerTextDocumentContentProvider(e){let n=new lT.EventEmitter,r={onDidChange:n.event,provideTextDocumentContent:(i,o)=>{let s=this._client,a=(u,l)=>{let d={uri:s.code2ProtocolConverter.asUri(u)};return s.sendRequest(of.TextDocumentContentRequest.type,d,l).then(f=>l.isCancellationRequested?null:f.text,f=>s.handleFailedRequest(of.TextDocumentContentRequest.type,l,f,null))},c=s.middleware;return c.provideTextDocumentContent?c.provideTextDocumentContent(i,o,a):a(i,o)}};return[lT.workspace.registerTextDocumentContentProvider(e,r),{scheme:e,onDidChangeEmitter:n,provider:r}]}unregister(e){let n=this._registrations.get(e);n!==void 0&&(this._registrations.delete(e),n.disposable.dispose())}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}};Bo.TextDocumentContentFeature=fT});var sM=V(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.FileSystemWatcherFeature=void 0;var N2=require("vscode"),pu=et(),A_=yt(),dT=class{_client;_notifyFileEvent;_watchers;constructor(e,n){this._client=e,this._notifyFileEvent=n,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return pu.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,A_.ensure)((0,A_.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,A_.ensure)((0,A_.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,n){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let n=[];for(let r of e.registerOptions.watchers){let i=this._client.protocol2CodeConverter.asGlobPattern(r.globPattern);if(i===void 0)continue;let o=!0,s=!0,a=!0;r.kind!==void 0&&r.kind!==null&&(o=(r.kind&pu.WatchKind.Create)!==0,s=(r.kind&pu.WatchKind.Change)!==0,a=(r.kind&pu.WatchKind.Delete)!==0);let c=N2.workspace.createFileSystemWatcher(i,!o,!s,!a);this.hookListeners(c,o,s,a,n),n.push(c)}this._watchers.set(e.id,n)}registerRaw(e,n){let r=[];for(let i of n)this.hookListeners(i,!0,!0,!0,r);this._watchers.set(e,r)}hookListeners(e,n,r,i,o){n&&e.onDidCreate(s=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(s),type:pu.FileChangeType.Created}),null,o),r&&e.onDidChange(s=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(s),type:pu.FileChangeType.Changed}),null,o),i&&e.onDidDelete(s=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(s),type:pu.FileChangeType.Deleted}),null,o)}unregister(e){let n=this._watchers.get(e);if(n){this._watchers.delete(e);for(let r of n)r.dispose()}}clear(){this._watchers.forEach(e=>{for(let n of e)n.dispose()}),this._watchers.clear()}};M_.FileSystemWatcherFeature=dT});var cM=V(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.ProgressFeature=void 0;var aM=et(),P2=Ab();function R2(t,e){return t[e]===void 0&&(t[e]=Object.create(null)),t[e]}var pT=class{_client;activeParts;constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:aM.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){R2(e,"window").workDoneProgress=!0}initialize(){let e=this._client,n=i=>{this.activeParts.delete(i)},r=i=>{this.activeParts.add(new P2.ProgressPart(this._client,i.token,n))};e.onRequest(aM.WorkDoneProgressCreateRequest.type,r)}clear(){for(let e of this.activeParts)e.done();this.activeParts.clear()}};L_.ProgressFeature=pT});var ET=V(jt=>{"use strict";var O2=jt&&jt.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),x2=jt&&jt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),q_=jt&&jt.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&O2(n,e,r[i]);return x2(n,e),n}})();Object.defineProperty(jt,"__esModule",{value:!0});jt.ProposedFeatures=jt.LanguageClient=jt.BaseLanguageClient=jt.ShutdownMode=jt.MessageTransports=jt.SuspendMode=jt.State=jt.CloseAction=jt.ErrorAction=jt.RevealOutputChannelOn=void 0;var Ke=require("vscode"),le=et(),I2=q_(JI()),A2=q_(eA()),io=q_(Ii()),F_=s_(),uM=q_(Wt()),M2=Ab(),_i=yt(),L2=cb(),gT=sA(),lM=uA(),sf=gA(),F2=_A(),j2=mA(),q2=vA(),U2=SA(),Y2=DA(),k2=aC(),H2=bA(),$2=CA(),B2=TA(),G2=wA(),W2=NA(),z2=PA(),K2=OA(),hT=xA(),V2=MA(),X2=LA(),J2=jA(),Q2=UA(),Z2=YA(),eW=kA(),tW=HA(),nW=BA(),rW=WA(),iW=zA(),oW=VA(),sW=JA(),aW=QA(),af=tM(),cW=nM(),uW=oM(),lW=sM(),fW=cM(),hu;(function(t){t[t.Debug=0]="Debug",t[t.Info=1]="Info",t[t.Warn=2]="Warn",t[t.Error=3]="Error",t[t.Never=4]="Never"})(hu||(jt.RevealOutputChannelOn=hu={}));var yp;(function(t){t[t.Continue=1]="Continue",t[t.Shutdown=2]="Shutdown"})(yp||(jt.ErrorAction=yp={}));var Xa;(function(t){t[t.DoNotRestart=1]="DoNotRestart",t[t.Restart=2]="Restart"})(Xa||(jt.CloseAction=Xa={}));var cf;(function(t){t[t.Stopped=1]="Stopped",t[t.Starting=3]="Starting",t[t.StartFailed=4]="StartFailed",t[t.Running=2]="Running"})(cf||(jt.State=cf={}));var fM;(function(t){t.off="off",t.on="on"})(fM||(jt.SuspendMode=fM={}));var _T;(function(t){function e(n){return n==null?!1:typeof n=="boolean"||typeof n=="object"&&n!==null&&io.stringArray(n.enabledCommands)?n:!1}t.sanitizeIsTrusted=e})(_T||(_T={}));var mT=class{client;maxRestartCount;restarts;constructor(e,n){this.client=e,this.maxRestartCount=n,this.restarts=[]}error(e,n,r){return r&&r<=3?{action:yp.Continue}:{action:yp.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:Xa.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=180*1e3?{action:Xa.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:Xa.Restart})}},ft;(function(t){t.Initial="initial",t.Starting="starting",t.StartFailed="startFailed",t.Running="running",t.Stopping="stopping",t.Stopped="stopped"})(ft||(ft={}));var dM;(function(t){function e(n){return n&&le.MessageReader.is(n.reader)&&le.MessageWriter.is(n.writer)}t.is=e})(dM||(jt.MessageTransports=dM={}));var Va;(function(t){t.Restart="restart",t.Stop="stop"})(Va||(jt.ShutdownMode=Va={}));var vT=class t{open;_onOpen;_onClose;disposables;constructor(){this.disposables=[],this.open=new Set,this._onOpen=new Ke.EventEmitter,this._onClose=new Ke.EventEmitter,t.fillVisibleResources(this.open);let e=()=>{let n=this.open,r=new Set;t.fillVisibleResources(r);let i=new Set,o=new Set(r);for(let s of n.values())r.has(s)?o.delete(s):i.add(s);if(this.open=r,i.size>0){let s=new Set;for(let a of i)s.add(Ke.Uri.parse(a));this._onClose.fire(s)}if(o.size>0){let s=new Set;for(let a of o)s.add(Ke.Uri.parse(a));this._onOpen.fire(s)}};this.disposables.push(Ke.window.tabGroups.onDidChangeTabs(n=>{n.closed.length===0&&n.opened.length===0||e()})),this.disposables.push(Ke.window.onDidChangeVisibleTextEditors(n=>{e()}))}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposables.forEach(e=>e.dispose())}isActive(e){return e instanceof Ke.Uri?Ke.window.activeTextEditor?.document.uri===e:Ke.window.activeTextEditor?.document===e}isVisible(e){let n=e instanceof Ke.Uri?e:e.uri;return n.scheme===gT.NotebookDocumentSyncFeature.CellScheme?Ke.workspace.notebookDocuments.some(r=>this.open.has(r.uri.toString())?r.getCells().find(o=>o.document.uri.toString()===n.toString())!==void 0:!1):this.open.has(n.toString())}getResources(){let e=new Set;return t.fillVisibleResources(new Set,e),e}static fillVisibleResources(e,n){let r=e??new Set;for(let i of Ke.window.tabGroups.all)for(let o of i.tabs){let s=o.input,a;s instanceof Ke.TabInputText?a=s.uri:s instanceof Ke.TabInputTextDiff?a=s.modified:(s instanceof Ke.TabInputCustom||s instanceof Ke.TabInputNotebook)&&(a=s.uri),a!==void 0&&!r.has(a.toString())&&(r.add(a.toString()),n!==void 0&&n.add(a))}for(let i of Ke.window.visibleTextEditors){let o=i.document.uri;r.has(o.toString())||(r.add(o.toString()),n!==void 0&&n.add(o))}}},j_=class t{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_traceLogLevel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=le.TraceFormat.Text;_tracer;_c2p;_p2c;_visibleDocuments;constructor(e,n,r){this._id=e,this._name=n,r=r||{};let i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};r.markdown!==void 0&&(i.isTrusted=_T.sanitizeIsTrusted(r.markdown.isTrusted),i.supportHtml=r.markdown.supportHtml===!0,i.supportThemeIcons=r.markdown.supportThemeIcons===!0),this._clientOptions={documentSelector:r.documentSelector??[],synchronize:r.synchronize??{},diagnosticCollectionName:r.diagnosticCollectionName,outputChannelName:r.outputChannelName??this._name,revealOutputChannelOn:r.revealOutputChannelOn??hu.Error,stdioEncoding:r.stdioEncoding??"utf8",initializationOptions:r.initializationOptions,initializationFailedHandler:r.initializationFailedHandler,progressOnInitialization:!!r.progressOnInitialization,errorHandler:r.errorHandler??this.createDefaultErrorHandler(r.connectionOptions?.maxRestartCount),middleware:r.middleware??{},uriConverters:r.uriConverters,workspaceFolder:r.workspaceFolder,connectionOptions:r.connectionOptions,markdown:i,diagnosticPullOptions:r.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:r.notebookDocumentOptions??{},textSynchronization:this.createTextSynchronizationOptions(r.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=ft.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,r.outputChannel?(this._outputChannel=r.outputChannel,this._disposeOutputChannel=!1,this._traceLogLevel=this._outputChannel.logLevel):(this._outputChannel=void 0,this._disposeOutputChannel=!0,this._traceLogLevel=Ke.LogLevel.Info),this._traceOutputChannel=r.traceOutputChannel,this._traceOutputChannel!==void 0&&(this._traceLogLevel=this._traceOutputChannel.logLevel),this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new F_.Semaphore(1),this._pendingChangeDelayer=new F_.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new F_.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new le.Emitter,this._stateChangeEmitter=new le.Emitter,this._trace=le.Trace.Off,this._tracer={log:(o,s)=>{io.string(o)?this.trace(o,s):this.traceObject(o)}},this._c2p=I2.createConverter(r.uriConverters?r.uriConverters.code2Protocol:void 0),this._p2c=A2.createConverter(r.uriConverters?r.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e?typeof e.delayOpenNotifications=="boolean"?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}:{delayOpenNotifications:!1}}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get visibleDocuments(){return this._visibleDocuments===void 0&&(this._visibleDocuments=new vT),this._visibleDocuments}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=Ke.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name,{log:!0}),this._traceOutputChannel===void 0&&(this._traceLogLevel=this._outputChannel.logLevel)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let n=this.getPublicState();this._state=e;let r=this.getPublicState();r!==n&&this._stateChangeEmitter.fire({oldState:n,newState:r})}getPublicState(){switch(this.$state){case ft.Starting:return cf.Starting;case ft.Running:return cf.Running;case ft.StartFailed:return cf.StartFailed;default:return cf.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...n){if(this.$state===ft.StartFailed||this.$state===ft.Stopping||this.$state===ft.Stopped)return Promise.reject(new le.ResponseError(le.ErrorCodes.ConnectionInactive,"Client is not running"));let r=await this.$start();await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===le.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(r);let i,o;if(n.length===1?le.CancellationToken.is(n[0])?o=n[0]:i=n[0]:n.length===2&&(i=n[0],o=n[1]),o!==void 0&&o.isCancellationRequested)return Promise.reject(new le.ResponseError(le.LSPErrorCodes.RequestCancelled,"Request got cancelled"));let s=this._clientOptions.middleware?.sendRequest;return s!==void 0?s(e,i,o,(a,c,u)=>{let l=[];return c!==void 0&&l.push(c),u!==void 0&&l.push(u),r.sendRequest(a,...l)}):r.sendRequest(e,...n)}onRequest(e,n){let r=typeof e=="string"?e:e.method;this._requestHandlers.set(r,n);let i=this.activeConnection(),o;return i!==void 0?(this._requestDisposables.set(r,i.onRequest(e,n)),o={dispose:()=>{let s=this._requestDisposables.get(r);s!==void 0&&(s.dispose(),this._requestDisposables.delete(r))}}):(this._pendingRequestHandlers.set(r,n),o={dispose:()=>{this._pendingRequestHandlers.delete(r);let s=this._requestDisposables.get(r);s!==void 0&&(s.dispose(),this._requestDisposables.delete(r))}}),{dispose:()=>{this._requestHandlers.delete(r),o.dispose()}}}async sendNotification(e,n){if(this.$state===ft.StartFailed||this.$state===ft.Stopping||this.$state===ft.Stopped)return Promise.reject(new le.ResponseError(le.ErrorCodes.ConnectionInactive,"Client is not running"));let r=this._didChangeTextDocumentFeature.syncKind===le.TextDocumentSyncKind.Full,i;r&&typeof e!="string"&&e.method===le.DidOpenTextDocumentNotification.method&&(i=n?.textDocument.uri,this._inFlightOpenNotifications.add(i));let o;typeof e!="string"&&e.method===le.DidCloseTextDocumentNotification.method&&(o=n.textDocument.uri);let s=await this.$start();if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(o))return;r&&await this.sendPendingFullTextDocumentChanges(s),i!==void 0&&this._inFlightOpenNotifications.delete(i);let c=this._clientOptions.middleware?.sendNotification;return c?c(e,s.sendNotification.bind(s),n):s.sendNotification(e,n)}onNotification(e,n){let r=typeof e=="string"?e:e.method;this._notificationHandlers.set(r,n);let i=this.activeConnection(),o;return i!==void 0?(this._notificationDisposables.set(r,i.onNotification(e,n)),o={dispose:()=>{let s=this._notificationDisposables.get(r);s!==void 0&&(s.dispose(),this._notificationDisposables.delete(r))}}):(this._pendingNotificationHandlers.set(r,n),o={dispose:()=>{this._pendingNotificationHandlers.delete(r);let s=this._notificationDisposables.get(r);s!==void 0&&(s.dispose(),this._notificationDisposables.delete(r))}}),{dispose:()=>{this._notificationHandlers.delete(r),o.dispose()}}}async sendProgress(e,n,r){if(this.$state===ft.StartFailed||this.$state===ft.Stopping||this.$state===ft.Stopped)return Promise.reject(new le.ResponseError(le.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,n,r)}catch(i){throw this.error(`Sending progress for token ${n} failed.`,i),i}}onProgress(e,n,r){this._progressHandlers.set(n,{type:e,handler:r});let i=this.activeConnection(),o,s=this._clientOptions.middleware?.handleWorkDoneProgress,a=le.WorkDoneProgress.is(e)&&s!==void 0?c=>{s(n,c,()=>r(c))}:r;return i!==void 0?(this._progressDisposables.set(n,i.onProgress(e,n,a)),o={dispose:()=>{let c=this._progressDisposables.get(n);c!==void 0&&(c.dispose(),this._progressDisposables.delete(n))}}):(this._pendingProgressHandlers.set(n,{type:e,handler:r}),o={dispose:()=>{this._pendingProgressHandlers.delete(n);let c=this._progressDisposables.get(n);c!==void 0&&(c.dispose(),this._progressDisposables.delete(n))}}),{dispose:()=>{this._progressHandlers.delete(n),o.dispose()}}}createDefaultErrorHandler(e){if(e!==void 0&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new mT(this,e??4)}async setTrace(e){this._trace=e;let n=this.activeConnection();n!==void 0&&await n.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof le.ResponseError){let n=e;return`  Message: ${n.message}
  Code: ${n.code} ${n.data?`
`+n.data.toString():""}`}return e instanceof Error?io.string(e.stack)?e.stack:e.message:io.string(e)?e:e.toString()}shouldLogToOutputChannel(){return this.$state!==ft.Stopped?!0:this._outputChannel!==void 0}error(e,n,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.error(this.getLogMessage(e,n)),(r==="force"||r&&this._clientOptions.revealOutputChannelOn<=hu.Error)&&this.showNotificationMessage(le.MessageType.Error,e,n)}warn(e,n,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.warn(this.getLogMessage(e,n)),r&&this._clientOptions.revealOutputChannelOn<=hu.Warn&&this.showNotificationMessage(le.MessageType.Warning,e,n)}info(e,n,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.info(this.getLogMessage(e,n)),r&&this._clientOptions.revealOutputChannelOn<=hu.Info&&this.showNotificationMessage(le.MessageType.Info,e,n)}debug(e,n,r=!0){this.shouldLogToOutputChannel()&&this.outputChannel.debug(this.getLogMessage(e,n)),r&&this._clientOptions.revealOutputChannelOn<=hu.Debug&&this.showNotificationMessage(le.MessageType.Debug,e,n)}trace(e,n){this.traceOutputChannel.trace(this.getLogMessage(e,n))}traceObject(e){this.traceOutputChannel.trace(JSON.stringify(e))}showNotificationMessage(e,n,r){n=n??"A request has failed. See the output for more information.",r&&(n+=`
`+this.data2String(r)),(e===le.MessageType.Error?Ke.window.showErrorMessage:e===le.MessageType.Warning?Ke.window.showWarningMessage:Ke.window.showInformationMessage)(n,"Go to output").then(o=>{o!==void 0&&this.outputChannel.show(!0)})}getLogMessage(e,n){return n!=null?`${e}
${this.data2String(n)}`:e}needsStart(){return this.$state===ft.Initial||this.$state===ft.Stopping||this.$state===ft.Stopped}needsStop(){return this.$state===ft.Starting||this.$state===ft.Running}activeConnection(){return this.$state===ft.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===ft.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===ft.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,n,r]=this.createOnStartPromise();this._onStart=e,this._diagnostics===void 0&&(this._diagnostics=Ke.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName??this._id));for(let[i,o]of this._notificationHandlers)this._pendingNotificationHandlers.has(i)||this._pendingNotificationHandlers.set(i,o);for(let[i,o]of this._requestHandlers)this._pendingRequestHandlers.has(i)||this._pendingRequestHandlers.set(i,o);for(let[i,o]of this._progressHandlers)this._pendingProgressHandlers.has(i)||this._pendingProgressHandlers.set(i,o);this.$state=ft.Starting;try{let i=await this.createConnection();i.onNotification(le.LogMessageNotification.type,o=>{switch(o.type){case le.MessageType.Error:this.error(o.message,void 0,!1);break;case le.MessageType.Warning:this.warn(o.message,void 0,!1);break;case le.MessageType.Info:this.info(o.message,void 0,!1);break;case le.MessageType.Debug:this.debug(o.message,void 0,!1);break;default:this.outputChannel.appendLine(o.message)}}),i.onNotification(le.ShowMessageNotification.type,o=>{switch(o.type){case le.MessageType.Error:Ke.window.showErrorMessage(o.message);break;case le.MessageType.Warning:Ke.window.showWarningMessage(o.message);break;case le.MessageType.Info:Ke.window.showInformationMessage(o.message);break;default:Ke.window.showInformationMessage(o.message)}}),i.onRequest(le.ShowMessageRequest.type,o=>{let s;switch(o.type){case le.MessageType.Error:s=Ke.window.showErrorMessage;break;case le.MessageType.Warning:s=Ke.window.showWarningMessage;break;case le.MessageType.Info:s=Ke.window.showInformationMessage;break;default:s=Ke.window.showInformationMessage}let a=o.actions||[];return s(o.message,...a)}),i.onNotification(le.TelemetryEventNotification.type,o=>{this._telemetryEmitter.fire(o)}),i.onRequest(le.ShowDocumentRequest.type,async(o,s)=>{let a=async u=>{let l=this.protocol2CodeConverter.asUri(u.uri);try{if(u.external===!0)return{success:await Ke.env.openExternal(l)};{let d={};return u.selection!==void 0&&(d.selection=this.protocol2CodeConverter.asRange(u.selection)),u.takeFocus===void 0||u.takeFocus===!1?d.preserveFocus=!0:u.takeFocus===!0&&(d.preserveFocus=!1),await Ke.window.showTextDocument(l,d),{success:!0}}}catch{return{success:!1}}},c=this._clientOptions.middleware.window?.showDocument;return c!==void 0?c(o,s,a):a(o)}),i.listen(),await this.initialize(i),n()}catch(i){this.$state=ft.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,i,"force"),r(i)}return this._onStart}createOnStartPromise(){let e,n;return[new Promise((i,o)=>{e=i,n=o}),e,n]}async initialize(e){this.refreshTrace(e,!1);let n=this._clientOptions.initializationOptions,[r,i]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],o={processId:null,clientInfo:{name:Ke.env.appName,version:Ke.version},locale:this.getLocale(),rootPath:r||null,rootUri:r?this._c2p.asUri(Ke.Uri.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:io.func(n)?n():n,trace:le.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(o),this._clientOptions.progressOnInitialization){let s=uM.generateUuid(),a=new M2.ProgressPart(e,s);o.workDoneToken=s;try{let c=await this.doInitialize(e,o);return a.done(),c}catch(c){throw a.cancel(),c}}else return this.doInitialize(e,o)}async doInitialize(e,n){try{let r=await e.initialize(n);if(r.capabilities.positionEncoding!==void 0&&r.capabilities.positionEncoding!==le.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${r.capabilities.positionEncoding}) received from server ${this.name}`);this._initializeResult=r,this.$state=ft.Running;let i;io.number(r.capabilities.textDocumentSync)?r.capabilities.textDocumentSync===le.TextDocumentSyncKind.None?i={openClose:!1,change:le.TextDocumentSyncKind.None,save:void 0}:i={openClose:!0,change:r.capabilities.textDocumentSync,save:{includeText:!1}}:r.capabilities.textDocumentSync!==void 0&&r.capabilities.textDocumentSync!==null&&(i=r.capabilities.textDocumentSync),this._capabilities=Object.assign({},r.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(le.PublishDiagnosticsNotification.type,o=>this.handleDiagnostics(o)),e.onRequest(le.RegistrationRequest.type,o=>this.handleRegistrationRequest(o)),e.onRequest("client/registerFeature",o=>this.handleRegistrationRequest(o)),e.onRequest(le.UnregistrationRequest.type,o=>this.handleUnregistrationRequest(o)),e.onRequest("client/unregisterFeature",o=>this.handleUnregistrationRequest(o)),e.onRequest(le.ApplyWorkspaceEditRequest.type,o=>this.handleApplyWorkspaceEdit(o));for(let[o,s]of this._pendingNotificationHandlers)this._notificationDisposables.set(o,e.onNotification(o,s));this._pendingNotificationHandlers.clear();for(let[o,s]of this._pendingRequestHandlers)this._requestDisposables.set(o,e.onRequest(o,s));this._pendingRequestHandlers.clear();for(let[o,s]of this._pendingProgressHandlers)this._progressDisposables.set(o,e.onProgress(s.type,o,s.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(le.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookLogLevelChanged(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),r}catch(r){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(r)?this.initialize(e):this.stop():r instanceof le.ResponseError&&r.data&&r.data.retry?Ke.window.showErrorMessage(r.message,{title:"Retry",id:"retry"}).then(i=>{i&&i.id==="retry"?this.initialize(e):this.stop()}):(r&&r.message&&Ke.window.showErrorMessage(r.message),this.error("Server initialization failed.",r),this.stop()),r}}_clientGetRootPath(){let e=Ke.workspace.workspaceFolders;if(!e||e.length===0)return;let n=e[0];if(n.uri.scheme==="file")return n.uri.fsPath}stop(e=2e3){return this.shutdown(Va.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,n=2e3){if(this.$state===ft.Stopped||this.$state===ft.Initial)return;if(this.$state===ft.Stopping){if(this._onStop!==void 0)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}let r=this.activeConnection();if(r===void 0||this.$state!==ft.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=ft.Stopping,this.cleanUp(e);let i=new Promise(s=>{(0,le.RAL)().timer.setTimeout(s,n)}),o=(async s=>(await s.shutdown(),await s.exit(),s))(r);return this._onStop=Promise.race([i,o]).then(s=>{if(s!==void 0)s.end(),s.dispose();else throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out")},s=>{throw this.error("Stopping server failed",s,!1),s}).finally(()=>{this.$state=ft.Stopped,e===Va.Stop&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()})}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();let n=this._listeners.splice(0,this._listeners.length);for(let r of n)r.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(let r of Array.from(this._features.entries()).map(i=>i[1]).reverse())r.clear();(e===Va.Stop||e===Va.Restart)&&this._diagnostics!==void 0&&(this._diagnostics.dispose(),this._diagnostics=void 0),this._idleInterval!==void 0&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){this._outputChannel!==void 0&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){let n=this;async function r(o){return n._fileEvents.push(o),n._fileEventDelayer.trigger(async()=>{let s=n._fileEvents;n._fileEvents=[];try{await n.sendNotification(le.DidChangeWatchedFilesNotification.type,{changes:s})}catch(a){throw n._fileEvents.push(...s),a}})}let i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,r):r(e)).catch(o=>{n.error("Notifying file events failed.",o)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{let n=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(n.length===0)return;for(let r of n){let i=this.code2ProtocolConverter.asChangeTextDocumentParams(r);await e.sendNotification(le.DidChangeTextDocumentNotification.type,i),this._didChangeTextDocumentFeature.notificationSent(r,le.DidChangeTextDocumentNotification.type,i)}}catch(n){throw this.error("Sending pending changes failed",n,!1),n}})}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger(async()=>{let e=this.activeConnection();if(e===void 0){this.triggerPendingChangeDelivery();return}await this.sendPendingFullTextDocumentChanges(e)}).catch(e=>this.error("Delivering pending changes failed",e,!1))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};handleDiagnostics(e){if(!this._diagnostics)return;let n=e.uri;this._diagnosticQueueState.state==="busy"&&this._diagnosticQueueState.document===n&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,le.RAL)().timer.setImmediate(()=>{this.workDiagnosticQueue()})}workDiagnosticQueue(){if(this._diagnosticQueueState.state==="busy")return;let e=this._diagnosticQueue.entries().next();if(e.done===!0)return;let[n,r]=e.value;this._diagnosticQueue.delete(n);let i=new Ke.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:n,tokenSource:i},this._p2c.asDiagnostics(r,i.token).then(o=>{if(!i.token.isCancellationRequested){let s=this._p2c.asUri(n),a=this.clientOptions.middleware;a.handleDiagnostics?a.handleDiagnostics(s,o,(c,u)=>this.setDiagnostics(c,u)):this.setDiagnostics(s,o)}}).catch(o=>{this.error("Processing diagnostic queue failed.",o)}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,n){this._diagnostics&&this._diagnostics.set(e,n)}getLocale(){return Ke.env.language}async $start(){if(this.$state===ft.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();let e=this.activeConnection();if(e===void 0)throw new Error("Starting server failed");return e}async createConnection(){let e=(i,o,s)=>{this.handleConnectionError(i,o,s).catch(a=>this.error("Handling connection error failed",a))},n=()=>{this.handleConnectionClosed().catch(i=>this.error("Handling connection close failed",i))},r=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=dW(r.reader,r.writer,e,n,this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===ft.Stopped)return;try{this._connection!==void 0&&this._connection.dispose()}catch{}let e={action:Xa.DoNotRestart};if(this.$state!==ft.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch{}this._connection=void 0,e.action===Xa.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,e.handled===!0?!1:"force"),this.cleanUp(Va.Stop),this.$state===ft.Starting?this.$state=ft.StartFailed:this.$state=ft.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Xa.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(Va.Restart),this.$state=ft.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch(n=>this.error("Restarting server failed",n,"force")))}async handleConnectionError(e,n,r){let i=await this._clientOptions.errorHandler.error(e,n,r);i.action===yp.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring.
${e.message}
Shutting down server.`,void 0,i.handled===!0?!1:"force"),this.stop().catch(o=>{this.error("Stopping server failed",o,!1)})):this.error(i.message??`Client ${this._name}: connection to server is erroring.
${e.message}`,void 0,i.handled===!0?!1:"force")}hookConfigurationChanged(e){this._listeners.push(Ke.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)}))}hookLogLevelChanged(e){this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel(n=>{this._traceLogLevel=n,this.refreshTrace(e,!0)}))}refreshTrace(e,n=!1){let r=Ke.workspace.getConfiguration(this._id),i=this._traceLogLevel!==Ke.LogLevel.Trace?le.Trace.Off:le.Trace.Messages,o=le.TraceFormat.Text;if(r&&i!==le.Trace.Off){let s=r.get("trace.server","messages");typeof s=="string"?(i=le.Trace.fromString(s),i===le.Trace.Off&&(i=le.Trace.Messages)):(i=le.Trace.fromString(r.get("trace.server.verbosity","messages")),i===le.Trace.Off&&(i=le.Trace.Messages),o=le.TraceFormat.fromString(r.get("trace.server.format","text")))}this._trace=i,this._traceFormat=o,e.trace(this._trace,this._tracer,{sendNotification:n,traceFormat:this._traceFormat}).catch(s=>{this.error("Updating trace failed with error",s,!1)})}hookFileEvents(e){let n=this._clientOptions.synchronize.fileEvents;if(!n)return;let r;io.array(n)?r=n:r=[n],r&&this._dynamicFeatures.get(le.DidChangeWatchedFilesNotification.type.method).registerRaw(uM.generateUuid(),r)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(let n of e)this.registerFeature(n)}registerFeature(e){if(this._features.push(e),_i.DynamicFeature.is(e)){let n=e.registrationType;this._dynamicFeatures.set(n.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){let n=this.getFeature(le.NotebookDocumentSyncRegistrationType.method);return n===void 0||!(n instanceof gT.NotebookDocumentSyncFeature)?!1:n.handles(e)}registerBuiltinFeatures(){let e=new Map;this.registerFeature(new lM.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new sf.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new sf.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded(()=>{this.triggerPendingChangeDelivery()}),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new sf.WillSaveFeature(this)),this.registerFeature(new sf.WillSaveWaitUntilFeature(this)),this.registerFeature(new sf.DidSaveTextDocumentFeature(this)),this.registerFeature(new sf.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new lW.FileSystemWatcherFeature(this,n=>this.notifyFileEvent(n))),this.registerFeature(new F2.CompletionItemFeature(this)),this.registerFeature(new j2.HoverFeature(this)),this.registerFeature(new U2.SignatureHelpFeature(this)),this.registerFeature(new q2.DefinitionFeature(this)),this.registerFeature(new $2.ReferencesFeature(this)),this.registerFeature(new Y2.DocumentHighlightFeature(this)),this.registerFeature(new k2.DocumentSymbolFeature(this)),this.registerFeature(new H2.WorkspaceSymbolFeature(this)),this.registerFeature(new z2.CodeActionFeature(this)),this.registerFeature(new K2.CodeLensFeature(this)),this.registerFeature(new hT.DocumentFormattingFeature(this)),this.registerFeature(new hT.DocumentRangeFormattingFeature(this)),this.registerFeature(new hT.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new V2.RenameFeature(this)),this.registerFeature(new X2.DocumentLinkFeature(this)),this.registerFeature(new J2.ExecuteCommandFeature(this)),this.registerFeature(new lM.SyncConfigurationFeature(this)),this.registerFeature(new B2.TypeDefinitionFeature(this)),this.registerFeature(new G2.ImplementationFeature(this)),this.registerFeature(new W2.ColorProviderFeature(this)),this.clientOptions.workspaceFolder===void 0&&this.registerFeature(new aW.WorkspaceFoldersFeature(this)),this.registerFeature(new Q2.FoldingRangeFeature(this)),this.registerFeature(new Z2.DeclarationFeature(this)),this.registerFeature(new eW.SelectionRangeFeature(this)),this.registerFeature(new fW.ProgressFeature(this)),this.registerFeature(new tW.CallHierarchyFeature(this)),this.registerFeature(new nW.SemanticTokensFeature(this)),this.registerFeature(new rW.LinkedEditingFeature(this)),this.registerFeature(new af.DidCreateFilesFeature(this)),this.registerFeature(new af.DidRenameFilesFeature(this)),this.registerFeature(new af.DidDeleteFilesFeature(this)),this.registerFeature(new af.WillCreateFilesFeature(this)),this.registerFeature(new af.WillRenameFilesFeature(this)),this.registerFeature(new af.WillDeleteFilesFeature(this)),this.registerFeature(new iW.TypeHierarchyFeature(this)),this.registerFeature(new oW.InlineValueFeature(this)),this.registerFeature(new sW.InlayHintsFeature(this)),this.registerFeature(new L2.DiagnosticFeature(this)),this.registerFeature(new gT.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(DT.createAll(this))}fillInitializeParams(e){for(let n of this._features)io.func(n.fillInitializeParams)&&n.fillInitializeParams(e)}computeClientCapabilities(){let e={};(0,_i.ensure)(e,"workspace").applyEdit=!0;let n=(0,_i.ensure)((0,_i.ensure)(e,"workspace"),"workspaceEdit");n.documentChanges=!0,n.resourceOperations=[le.ResourceOperationKind.Create,le.ResourceOperationKind.Rename,le.ResourceOperationKind.Delete],n.failureHandling=le.FailureHandlingKind.TextOnlyTransactional,n.normalizesLineEndings=!0,n.changeAnnotationSupport={groupsOnLabel:!0},n.metadataSupport=!0,n.snippetEditSupport=!0;let r=(0,_i.ensure)((0,_i.ensure)(e,"textDocument"),"publishDiagnostics");r.relatedInformation=!0,r.versionSupport=!1,r.tagSupport={valueSet:[le.DiagnosticTag.Unnecessary,le.DiagnosticTag.Deprecated]},r.codeDescriptionSupport=!0,r.dataSupport=!0;let i=(0,_i.ensure)((0,_i.ensure)(e,"textDocument"),"filters");i.relativePatternSupport=!0;let o=(0,_i.ensure)(e,"window"),s=(0,_i.ensure)(o,"showMessage");s.messageActionItem={additionalPropertiesSupport:!0};let a=(0,_i.ensure)(o,"showDocument");a.support=!0;let c=(0,_i.ensure)(e,"general");c.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(t.RequestsToCancelOnContentModified)},c.regularExpressions={engine:"ECMAScript",version:"ES2020"},c.markdown={parser:"marked",version:"1.1.0"},c.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(c.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let u of this._features)u.fillClientCapabilities(e);return e}initializeFeatures(e){let n=this._clientOptions.documentSelector;for(let r of this._features)io.func(r.preInitialize)&&r.preInitialize(this._capabilities,n);for(let r of this._features)r.initialize(this._capabilities,n)}async handleRegistrationRequest(e){let n=this.clientOptions.middleware?.handleRegisterCapability;return n?n(e,r=>this.doRegisterCapability(r)):this.doRegisterCapability(e)}async doRegisterCapability(e){if(!this.isRunning()){for(let n of e.registrations)this._ignoredRegistrations.add(n.id);return}for(let n of e.registrations){let r=this._dynamicFeatures.get(n.method);if(r===void 0)return Promise.reject(new Error(`No feature implementation for ${n.method} found. Registration failed.`));let i=n.registerOptions??{};i.documentSelector=i.documentSelector??this._clientOptions.documentSelector;let o={id:n.id,registerOptions:i};try{r.register(o)}catch(s){return Promise.reject(s)}}}async handleUnregistrationRequest(e){let n=this.clientOptions.middleware?.handleUnregisterCapability;return n?n(e,r=>this.doUnregisterCapability(r)):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(let n of e.unregisterations){if(this._ignoredRegistrations.has(n.id))continue;let r=this._dynamicFeatures.get(n.method);if(!r)return Promise.reject(new Error(`No feature implementation for ${n.method} found. Unregistration failed.`));r.unregister(n.id)}}async handleApplyWorkspaceEdit(e){let n=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(n){let r=await n(e,i=>this.doHandleApplyWorkspaceEdit(i));return r instanceof le.ResponseError?Promise.reject(r):r}else return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new F_.Semaphore(1);async doHandleApplyWorkspaceEdit(e){let n=e.edit,r=await this.workspaceEditLock.lock(()=>this._p2c.asWorkspaceEdit(n));return this.validateWorkspaceEdit(n)?io.asPromise(Ke.workspace.applyEdit(r,{isRefactoring:e.metadata?.isRefactoring}).then(o=>({applied:o}))):Promise.resolve({applied:!1})}validateWorkspaceEdit(e){let n=new Map;if(Ke.workspace.textDocuments.forEach(r=>n.set(r.uri.toString(),r)),e.documentChanges){for(let r of e.documentChanges)if(le.TextDocumentEdit.is(r)&&r.textDocument.version!==null&&r.textDocument.version>=0){let i=this._p2c.asUri(r.textDocument.uri).toString(),o=n.get(i);if(o&&o.version!==r.textDocument.version)return!1}}return!0}static RequestsToCancelOnContentModified=new Set([le.SemanticTokensRequest.method,le.SemanticTokensRangeRequest.method,le.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([le.CompletionResolveRequest.method,le.CodeLensResolveRequest.method,le.CodeActionResolveRequest.method,le.InlayHintResolveRequest.method,le.DocumentLinkResolveRequest.method,le.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,n,r,i,o=!0,s=!1){if(r instanceof le.ResponseError){if(r.code===le.ErrorCodes.PendingResponseRejected||r.code===le.ErrorCodes.ConnectionInactive)return i;if(r.code===le.LSPErrorCodes.RequestCancelled||r.code===le.LSPErrorCodes.ServerCancelled){if(n!==void 0&&n.isCancellationRequested&&!s)return i;throw r.data!==void 0?new _i.LSPCancellationError(r.data):new Ke.CancellationError}else if(r.code===le.LSPErrorCodes.ContentModified){if(t.RequestsToCancelOnContentModified.has(e.method)||t.CancellableResolveCalls.has(e.method))throw new Ke.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,r,o),r}};jt.BaseLanguageClient=j_;var yT=class extends j_{serverOptions;constructor(e,n,r,i){super(e,n,i),this.serverOptions=r}async createMessageTransports(e){return this.serverOptions()}};jt.LanguageClient=yT;var ST=class{error(e){(0,le.RAL)().console.error(e)}warn(e){(0,le.RAL)().console.warn(e)}info(e){(0,le.RAL)().console.info(e)}log(e){(0,le.RAL)().console.log(e)}};function dW(t,e,n,r,i){let o=new ST,s=(0,le.createProtocolConnection)(t,e,o,i);return s.onError(c=>{n(c[0],c[1],c[2])}),s.onClose(r),{listen:()=>s.listen(),sendRequest:s.sendRequest,onRequest:s.onRequest,hasPendingResponse:s.hasPendingResponse,sendNotification:s.sendNotification,onNotification:s.onNotification,onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(c,u,l)=>{let d={sendNotification:!1,traceFormat:le.TraceFormat.Text};return l===void 0?s.trace(c,u,d):(io.boolean(l),s.trace(c,u,l))},initialize:c=>s.sendRequest(le.InitializeRequest.type,c),shutdown:()=>s.sendRequest(le.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(le.ExitNotification.type),end:()=>s.end(),dispose:()=>s.dispose()}}var DT;(function(t){function e(n){return[new cW.InlineCompletionItemFeature(n),new uW.TextDocumentContentFeature(n)]}t.createAll=e})(DT||(jt.ProposedFeatures=DT={}))});var CT=V(mi=>{"use strict";var pW=mi&&mi.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),bT=mi&&mi.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&pW(e,t,n)};Object.defineProperty(mi,"__esModule",{value:!0});mi.DiagnosticPullMode=mi.vsdiag=void 0;bT(et(),mi);bT(yt(),mi);var pM=cb();Object.defineProperty(mi,"vsdiag",{enumerable:!0,get:function(){return pM.vsdiag}});Object.defineProperty(mi,"DiagnosticPullMode",{enumerable:!0,get:function(){return pM.DiagnosticPullMode}});bT(ET(),mi)});var qM=V(zs=>{"use strict";var MW=zs&&zs.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),LW=zs&&zs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),FW=zs&&zs.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&MW(n,e,r[i]);return LW(n,e),n}})();Object.defineProperty(zs,"__esModule",{value:!0});zs.terminate=YW;var jM=FW(require("child_process")),jW=process.platform==="win32",qW=process.platform==="darwin",UW=process.platform==="linux";function YW(t,e){if(jW)try{let n={stdio:["pipe","pipe","ignore"]};return e&&(n.cwd=e),jM.execFileSync("taskkill",["/T","/F","/PID",t.pid.toString()],n),!0}catch{return!1}else if(UW||qW)try{let n=t.pid.toString();if(!/^\d+$/.test(n))return!1;let r=`
terminateTree() {
	for cpid in $(pgrep -P "$1"); do
		terminateTree "$cpid"
	done
	kill -9 "$1" > /dev/null 2>&1
}

terminateTree "${n}"
`;return!jM.spawnSync("/bin/sh",[],{input:r,stdio:["pipe","inherit","inherit"]}).error}catch{return!1}else return t.kill("SIGKILL"),!0}});var kM=V(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});var UM=require("util"),Ks=Rs(),PT=class t extends Ks.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return t.emptyBuffer}fromString(e,n){return Buffer.from(e,n)}toString(e,n){return e instanceof Buffer?e.toString(n):new UM.TextDecoder(n).decode(e)}asNative(e,n){return n===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,n):Buffer.from(e,0,n)}allocNative(e){return Buffer.allocUnsafe(e)}},RT=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),Ks.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),Ks.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),Ks.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),Ks.Disposable.create(()=>this.stream.off("data",e))}},OT=class{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),Ks.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),Ks.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),Ks.Disposable.create(()=>this.stream.off("end",e))}write(e,n){return new Promise((r,i)=>{let o=s=>{s==null?r():i(s)};typeof e=="string"?this.stream.write(e,n,o):this.stream.write(e,o)})}end(){this.stream.end()}},YM=Object.freeze({messageBuffer:Object.freeze({create:t=>new PT(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),e.charset))}catch(n){return Promise.reject(n)}}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(e.charset))):Promise.resolve(JSON.parse(new UM.TextDecoder(e.charset).decode(t)))}catch(n){return Promise.reject(n)}}})}),stream:Object.freeze({asReadableStream:t=>new RT(t),asWritableStream:t=>new OT(t)}),console,timer:Object.freeze({setTimeout(t,e,...n){let r=setTimeout(t,e,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(t,...e){let n=setImmediate(t,...e);return{dispose:()=>clearImmediate(n)}},setInterval(t,e,...n){let r=setInterval(t,e,...n);return{dispose:()=>clearInterval(r)}}})});function xT(){return YM}(function(t){function e(){Ks.RAL.install(YM)}t.install=e})(xT||(xT={}));IT.default=xT});var qT=V(St=>{"use strict";var $M=St&&St.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),kW=St&&St.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jT=St&&St.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&$M(n,e,r[i]);return kW(n,e),n}})(),HW=St&&St.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$M(e,t,n)},$W=St&&St.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(St,"__esModule",{value:!0});St.StreamMessageWriter=St.StreamMessageReader=St.SocketMessageWriter=St.SocketMessageReader=St.PortMessageWriter=St.PortMessageReader=St.IPCMessageWriter=St.IPCMessageReader=void 0;St.generateRandomPipeName=VW;St.createClientPipeTransport=XW;St.createServerPipeTransport=JW;St.createClientSocketTransport=QW;St.createServerSocketTransport=ZW;St.createMessageConnection=nz;var Ep=$W(kM());Ep.default.install();var BW=jT(require("path")),GW=jT(require("os")),WW=jT(require("fs")),HM=require("crypto"),B_=require("net"),vi=Rs();HW(Rs(),St);var AT=class extends vi.AbstractMessageReader{process;constructor(e){super(),this.process=e;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),vi.Disposable.create(()=>this.process.off("message",e))}};St.IPCMessageReader=AT;var MT=class extends vi.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;let n=this.process;n.on("error",r=>this.fireError(r)),n.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,e)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){}};St.IPCMessageWriter=MT;var LT=class extends vi.AbstractMessageReader{onData;constructor(e){super(),this.onData=new vi.Emitter,e.on("close",()=>this.fireClose),e.on("error",n=>this.fireError(n)),e.on("message",n=>{this.onData.fire(n)})}listen(e){return this.onData.event(e)}};St.PortMessageReader=LT;var FT=class extends vi.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",n=>this.fireError(n))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){}};St.PortMessageWriter=FT;var gu=class extends vi.ReadableStreamMessageReader{constructor(e,n="utf-8"){super((0,Ep.default)().stream.asReadableStream(e),n)}};St.SocketMessageReader=gu;var _u=class extends vi.WriteableStreamMessageWriter{socket;constructor(e,n){super((0,Ep.default)().stream.asWritableStream(e),n),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};St.SocketMessageWriter=_u;var H_=class extends vi.ReadableStreamMessageReader{constructor(e,n){super((0,Ep.default)().stream.asReadableStream(e),n)}};St.StreamMessageReader=H_;var $_=class extends vi.WriteableStreamMessageWriter{constructor(e,n){super((0,Ep.default)().stream.asWritableStream(e),n)}};St.StreamMessageWriter=$_;var zW=process.env.XDG_RUNTIME_DIR,KW=new Map([["linux",107],["darwin",103]]);function VW(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${(0,HM.randomBytes)(16).toString("hex")}-sock`;let t=32,e=10,n=WW.realpathSync(zW??GW.tmpdir()),r=KW.get(process.platform);if(r!==void 0&&(t=Math.min(r-n.length-e,t)),t<16)throw new Error(`Unable to generate a random pipe name with ${t} characters.`);let i=(0,HM.randomBytes)(Math.floor(t/2)).toString("hex");return BW.join(n,`lsp-${i}.sock`)}function XW(t,e="utf-8"){let n,r=new Promise((i,o)=>{n=i});return new Promise((i,o)=>{let s=(0,B_.createServer)(a=>{s.close(),n([new gu(a,e),new _u(a,e)])});s.on("error",o),s.listen(t,()=>{s.removeListener("error",o),i({onConnected:()=>r})})})}function JW(t,e="utf-8"){let n=(0,B_.createConnection)(t);return[new gu(n,e),new _u(n,e)]}function QW(t,e="utf-8"){let n,r=new Promise((i,o)=>{n=i});return new Promise((i,o)=>{let s=(0,B_.createServer)(a=>{s.close(),n([new gu(a,e),new _u(a,e)])});s.on("error",o),s.listen(t,"127.0.0.1",()=>{s.removeListener("error",o),i({onConnected:()=>r})})})}function ZW(t,e="utf-8"){let n=(0,B_.createConnection)(t,"127.0.0.1");return[new gu(n,e),new _u(n,e)]}function ez(t){let e=t;return e.read!==void 0&&e.addListener!==void 0}function tz(t){let e=t;return e.write!==void 0&&e.addListener!==void 0}function nz(t,e,n,r){n||(n=vi.NullLogger);let i=ez(t)?new H_(t):t,o=tz(e)?new $_(e):e;return vi.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,vi.createMessageConnection)(i,o,n,r)}});var UT=V(Vs=>{"use strict";var rz=Vs&&Vs.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),BM=Vs&&Vs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&rz(e,t,n)};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.createProtocolConnection=oz;var iz=qT();BM(qT(),Vs);BM(et(),Vs);function oz(t,e,n,r){return(0,iz.createMessageConnection)(t,e,n,r)}});var bp=V((Y5,GM)=>{"use strict";var sz=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};GM.exports=sz});var G_=V((k5,WM)=>{"use strict";var az="2.0.0",cz=Number.MAX_SAFE_INTEGER||9007199254740991,uz=16,lz=250,fz=["major","premajor","minor","preminor","patch","prepatch","prerelease"];WM.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:uz,MAX_SAFE_BUILD_LENGTH:lz,MAX_SAFE_INTEGER:cz,RELEASE_TYPES:fz,SEMVER_SPEC_VERSION:az,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var W_=V((Go,zM)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:YT,MAX_SAFE_BUILD_LENGTH:dz,MAX_LENGTH:pz}=G_(),hz=bp();Go=zM.exports={};var gz=Go.re=[],_z=Go.safeRe=[],Oe=Go.src=[],mz=Go.safeSrc=[],xe=Go.t={},vz=0,kT="[a-zA-Z0-9-]",yz=[["\\s",1],["\\d",pz],[kT,dz]],Sz=t=>{for(let[e,n]of yz)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},it=(t,e,n)=>{let r=Sz(e),i=vz++;hz(t,i,e),xe[t]=i,Oe[i]=e,mz[i]=r,gz[i]=new RegExp(e,n?"g":void 0),_z[i]=new RegExp(r,n?"g":void 0)};it("NUMERICIDENTIFIER","0|[1-9]\\d*");it("NUMERICIDENTIFIERLOOSE","\\d+");it("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${kT}*`);it("MAINVERSION",`(${Oe[xe.NUMERICIDENTIFIER]})\\.(${Oe[xe.NUMERICIDENTIFIER]})\\.(${Oe[xe.NUMERICIDENTIFIER]})`);it("MAINVERSIONLOOSE",`(${Oe[xe.NUMERICIDENTIFIERLOOSE]})\\.(${Oe[xe.NUMERICIDENTIFIERLOOSE]})\\.(${Oe[xe.NUMERICIDENTIFIERLOOSE]})`);it("PRERELEASEIDENTIFIER",`(?:${Oe[xe.NONNUMERICIDENTIFIER]}|${Oe[xe.NUMERICIDENTIFIER]})`);it("PRERELEASEIDENTIFIERLOOSE",`(?:${Oe[xe.NONNUMERICIDENTIFIER]}|${Oe[xe.NUMERICIDENTIFIERLOOSE]})`);it("PRERELEASE",`(?:-(${Oe[xe.PRERELEASEIDENTIFIER]}(?:\\.${Oe[xe.PRERELEASEIDENTIFIER]})*))`);it("PRERELEASELOOSE",`(?:-?(${Oe[xe.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Oe[xe.PRERELEASEIDENTIFIERLOOSE]})*))`);it("BUILDIDENTIFIER",`${kT}+`);it("BUILD",`(?:\\+(${Oe[xe.BUILDIDENTIFIER]}(?:\\.${Oe[xe.BUILDIDENTIFIER]})*))`);it("FULLPLAIN",`v?${Oe[xe.MAINVERSION]}${Oe[xe.PRERELEASE]}?${Oe[xe.BUILD]}?`);it("FULL",`^${Oe[xe.FULLPLAIN]}$`);it("LOOSEPLAIN",`[v=\\s]*${Oe[xe.MAINVERSIONLOOSE]}${Oe[xe.PRERELEASELOOSE]}?${Oe[xe.BUILD]}?`);it("LOOSE",`^${Oe[xe.LOOSEPLAIN]}$`);it("GTLT","((?:<|>)?=?)");it("XRANGEIDENTIFIERLOOSE",`${Oe[xe.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);it("XRANGEIDENTIFIER",`${Oe[xe.NUMERICIDENTIFIER]}|x|X|\\*`);it("XRANGEPLAIN",`[v=\\s]*(${Oe[xe.XRANGEIDENTIFIER]})(?:\\.(${Oe[xe.XRANGEIDENTIFIER]})(?:\\.(${Oe[xe.XRANGEIDENTIFIER]})(?:${Oe[xe.PRERELEASE]})?${Oe[xe.BUILD]}?)?)?`);it("XRANGEPLAINLOOSE",`[v=\\s]*(${Oe[xe.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Oe[xe.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Oe[xe.XRANGEIDENTIFIERLOOSE]})(?:${Oe[xe.PRERELEASELOOSE]})?${Oe[xe.BUILD]}?)?)?`);it("XRANGE",`^${Oe[xe.GTLT]}\\s*${Oe[xe.XRANGEPLAIN]}$`);it("XRANGELOOSE",`^${Oe[xe.GTLT]}\\s*${Oe[xe.XRANGEPLAINLOOSE]}$`);it("COERCEPLAIN",`(^|[^\\d])(\\d{1,${YT}})(?:\\.(\\d{1,${YT}}))?(?:\\.(\\d{1,${YT}}))?`);it("COERCE",`${Oe[xe.COERCEPLAIN]}(?:$|[^\\d])`);it("COERCEFULL",Oe[xe.COERCEPLAIN]+`(?:${Oe[xe.PRERELEASE]})?(?:${Oe[xe.BUILD]})?(?:$|[^\\d])`);it("COERCERTL",Oe[xe.COERCE],!0);it("COERCERTLFULL",Oe[xe.COERCEFULL],!0);it("LONETILDE","(?:~>?)");it("TILDETRIM",`(\\s*)${Oe[xe.LONETILDE]}\\s+`,!0);Go.tildeTrimReplace="$1~";it("TILDE",`^${Oe[xe.LONETILDE]}${Oe[xe.XRANGEPLAIN]}$`);it("TILDELOOSE",`^${Oe[xe.LONETILDE]}${Oe[xe.XRANGEPLAINLOOSE]}$`);it("LONECARET","(?:\\^)");it("CARETTRIM",`(\\s*)${Oe[xe.LONECARET]}\\s+`,!0);Go.caretTrimReplace="$1^";it("CARET",`^${Oe[xe.LONECARET]}${Oe[xe.XRANGEPLAIN]}$`);it("CARETLOOSE",`^${Oe[xe.LONECARET]}${Oe[xe.XRANGEPLAINLOOSE]}$`);it("COMPARATORLOOSE",`^${Oe[xe.GTLT]}\\s*(${Oe[xe.LOOSEPLAIN]})$|^$`);it("COMPARATOR",`^${Oe[xe.GTLT]}\\s*(${Oe[xe.FULLPLAIN]})$|^$`);it("COMPARATORTRIM",`(\\s*)${Oe[xe.GTLT]}\\s*(${Oe[xe.LOOSEPLAIN]}|${Oe[xe.XRANGEPLAIN]})`,!0);Go.comparatorTrimReplace="$1$2$3";it("HYPHENRANGE",`^\\s*(${Oe[xe.XRANGEPLAIN]})\\s+-\\s+(${Oe[xe.XRANGEPLAIN]})\\s*$`);it("HYPHENRANGELOOSE",`^\\s*(${Oe[xe.XRANGEPLAINLOOSE]})\\s+-\\s+(${Oe[xe.XRANGEPLAINLOOSE]})\\s*$`);it("STAR","(<|>)?=?\\s*\\*");it("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");it("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var z_=V((H5,KM)=>{"use strict";var Dz=Object.freeze({loose:!0}),Ez=Object.freeze({}),bz=t=>t?typeof t!="object"?Dz:t:Ez;KM.exports=bz});var QM=V(($5,JM)=>{"use strict";var VM=/^[0-9]+$/,XM=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let n=VM.test(t),r=VM.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1},Cz=(t,e)=>XM(e,t);JM.exports={compareIdentifiers:XM,rcompareIdentifiers:Cz}});var Cp=V((B5,eL)=>{"use strict";var K_=bp(),{MAX_LENGTH:ZM,MAX_SAFE_INTEGER:V_}=G_(),{safeRe:X_,t:J_}=W_(),Tz=z_(),{compareIdentifiers:HT}=QM(),wz=(t,e)=>{let n=e.split(".");if(n.length>t.length)return!1;for(let r=0;r<n.length;r++)if(HT(t[r],n[r])!==0)return!1;return!0},$T=class t{constructor(e,n){if(n=Tz(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>ZM)throw new TypeError(`version is longer than ${ZM} characters`);K_("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=e.trim().match(n.loose?X_[J_.LOOSE]:X_[J_.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>V_||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V_||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V_||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<V_)return o}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(K_("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=e.prerelease[n];if(K_("prerelease compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return HT(r,i)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let r=this.build[n],i=e.build[n];if(K_("build compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return HT(r,i)}while(++n)}inc(e,n,r){if(e.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let i=`-${n}`.match(this.options.loose?X_[J_.PRERELEASELOOSE]:X_[J_.PRERELEASE]);if(!i||i[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let o=[n,i];if(r===!1&&(o=[n]),wz(this.prerelease,n)){let s=this.prerelease[n.split(".").length];isNaN(s)&&(this.prerelease=o)}else this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};eL.exports=$T});var rL=V((G5,nL)=>{"use strict";var tL=Cp(),Nz=(t,e,n=!1)=>{if(t instanceof tL)return t;try{return new tL(t,e)}catch(r){if(!n)return null;throw r}};nL.exports=Nz});var oL=V((W5,iL)=>{"use strict";var BT=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}};iL.exports=BT});var mu=V((z5,aL)=>{"use strict";var sL=Cp(),Pz=(t,e,n)=>new sL(t,n).compare(new sL(e,n));aL.exports=Pz});var uL=V((K5,cL)=>{"use strict";var Rz=mu(),Oz=(t,e,n)=>Rz(t,e,n)===0;cL.exports=Oz});var fL=V((V5,lL)=>{"use strict";var xz=mu(),Iz=(t,e,n)=>xz(t,e,n)!==0;lL.exports=Iz});var pL=V((X5,dL)=>{"use strict";var Az=mu(),Mz=(t,e,n)=>Az(t,e,n)>0;dL.exports=Mz});var gL=V((J5,hL)=>{"use strict";var Lz=mu(),Fz=(t,e,n)=>Lz(t,e,n)>=0;hL.exports=Fz});var mL=V((Q5,_L)=>{"use strict";var jz=mu(),qz=(t,e,n)=>jz(t,e,n)<0;_L.exports=qz});var yL=V((Z5,vL)=>{"use strict";var Uz=mu(),Yz=(t,e,n)=>Uz(t,e,n)<=0;vL.exports=Yz});var DL=V((e9,SL)=>{"use strict";var kz=uL(),Hz=fL(),$z=pL(),Bz=gL(),Gz=mL(),Wz=yL(),zz=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return kz(t,n,r);case"!=":return Hz(t,n,r);case">":return $z(t,n,r);case">=":return Bz(t,n,r);case"<":return Gz(t,n,r);case"<=":return Wz(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};SL.exports=zz});var PL=V((t9,NL)=>{"use strict";var Tp=Symbol("SemVer ANY"),zT=class t{static get ANY(){return Tp}constructor(e,n){if(n=EL(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),WT("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Tp?this.value="":this.value=this.operator+this.semver.version,WT("comp",this)}parse(e){let n=this.options.loose?bL[CL.COMPARATORLOOSE]:bL[CL.COMPARATOR],r=e.match(n);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new TL(r[2],this.options.loose):this.semver=Tp}toString(){return this.value}test(e){if(WT("Comparator.test",e,this.options.loose),this.semver===Tp||e===Tp)return!0;if(typeof e=="string")try{e=new TL(e,this.options)}catch{return!1}return GT(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new wL(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new wL(this.value,n).test(e.semver):(n=EL(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||GT(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||GT(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};NL.exports=zT;var EL=z_(),{safeRe:bL,t:CL}=W_(),GT=DL(),WT=bp(),TL=Cp(),wL=KT()});var KT=V((n9,IL)=>{"use strict";var Kz=/\s+/g,VT=class t{constructor(e,n){if(n=Xz(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof XT)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(Kz," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!OL(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&oK(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let n=this.set[e];for(let r=0;r<n.length;r++)r>0&&(this.formatted+=" "),this.formatted+=n[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(iK,"");let r=((this.options.includePrerelease&&nK)|(this.options.loose&&rK))+":"+e,i=RL.get(r);if(i)return i;let o=this.options.loose,s=o?Ur[gr.HYPHENRANGELOOSE]:Ur[gr.HYPHENRANGE];e=e.replace(s,_K(this.options.includePrerelease)),Vt("hyphen replace",e),e=e.replace(Ur[gr.COMPARATORTRIM],Zz),Vt("comparator trim",e),e=e.replace(Ur[gr.TILDETRIM],eK),Vt("tilde trim",e),e=e.replace(Ur[gr.CARETTRIM],tK),Vt("caret trim",e);let a=e.split(" ").map(d=>sK(d,this.options)).join(" ").split(/\s+/).map(d=>gK(d,this.options));o&&(a=a.filter(d=>(Vt("loose invalid filter",d,this.options),!!d.match(Ur[gr.COMPARATORLOOSE])))),Vt("range list",a);let c=new Map,u=a.map(d=>new XT(d,this.options));for(let d of u){if(OL(d))return[d];c.set(d.value,d)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return RL.set(r,l),l}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(r=>xL(r,n)&&e.set.some(i=>xL(i,n)&&r.every(o=>i.every(s=>o.intersects(s,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Jz(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(mK(this.set[n],e,this.options))return!0;return!1}};IL.exports=VT;var Vz=oL(),RL=new Vz,Xz=z_(),XT=PL(),Vt=bp(),Jz=Cp(),{safeRe:Ur,src:Qz,t:gr,comparatorTrimReplace:Zz,tildeTrimReplace:eK,caretTrimReplace:tK}=W_(),{FLAG_INCLUDE_PRERELEASE:nK,FLAG_LOOSE:rK}=G_(),iK=new RegExp(Qz[gr.BUILD],"g"),OL=t=>t.value==="<0.0.0-0",oK=t=>t.value==="",xL=(t,e)=>{let n=!0,r=t.slice(),i=r.pop();for(;n&&r.length;)n=r.every(o=>i.intersects(o,e)),i=r.pop();return n},sK=(t,e)=>(t=t.replace(Ur[gr.BUILD],""),Vt("comp",t,e),t=lK(t,e),Vt("caret",t),t=cK(t,e),Vt("tildes",t),t=dK(t,e),Vt("xrange",t),t=hK(t,e),Vt("stars",t),t),Kn=t=>!t||t.toLowerCase()==="x"||t==="*",aK=(t,e,n)=>Kn(t)&&!Kn(e)||Kn(e)&&n&&!Kn(n),cK=(t,e)=>t.trim().split(/\s+/).map(n=>uK(n,e)).join(" "),uK=(t,e)=>{let n=e.loose?Ur[gr.TILDELOOSE]:Ur[gr.TILDE],r=e.includePrerelease?"-0":"";return t.replace(n,(i,o,s,a,c)=>{Vt("tilde",t,i,o,s,a,c);let u;return Kn(o)?u="":Kn(s)?u=`>=${o}.0.0${r} <${+o+1}.0.0-0`:Kn(a)?u=`>=${o}.${s}.0${r} <${o}.${+s+1}.0-0`:c?(Vt("replaceTilde pr",c),u=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`):u=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`,Vt("tilde return",u),u})},lK=(t,e)=>t.trim().split(/\s+/).map(n=>fK(n,e)).join(" "),fK=(t,e)=>{Vt("caret",t,e);let n=e.loose?Ur[gr.CARETLOOSE]:Ur[gr.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(i,o,s,a,c)=>{Vt("caret",t,i,o,s,a,c);let u;return Kn(o)?u="":Kn(s)?u=`>=${o}.0.0${r} <${+o+1}.0.0-0`:Kn(a)?o==="0"?u=`>=${o}.${s}.0${r} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.0${r} <${+o+1}.0.0-0`:c?(Vt("replaceCaret pr",c),o==="0"?s==="0"?u=`>=${o}.${s}.${a}-${c} <${o}.${s}.${+a+1}-0`:u=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${a}-${c} <${+o+1}.0.0-0`):(Vt("no pr"),o==="0"?s==="0"?u=`>=${o}.${s}.${a} <${o}.${s}.${+a+1}-0`:u=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),Vt("caret return",u),u})},dK=(t,e)=>(Vt("replaceXRanges",t,e),t.split(/\s+/).map(n=>pK(n,e)).join(" ")),pK=(t,e)=>{t=t.trim();let n=e.loose?Ur[gr.XRANGELOOSE]:Ur[gr.XRANGE];return t.replace(n,(r,i,o,s,a,c)=>{if(Vt("xRange",t,r,i,o,s,a,c),aK(o,s,a))return t;let u=Kn(o),l=u||Kn(s),d=l||Kn(a),f=d;return i==="="&&f&&(i=""),c=e.includePrerelease?"-0":"",u?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&f?(l&&(s=0),a=0,i===">"?(i=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",l?o=+o+1:s=+s+1),i==="<"&&(c="-0"),r=`${i+o}.${s}.${a}${c}`):l?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),Vt("xRange return",r),r})},hK=(t,e)=>(Vt("replaceStars",t,e),t.trim().replace(Ur[gr.STAR],"")),gK=(t,e)=>(Vt("replaceGTE0",t,e),t.trim().replace(Ur[e.includePrerelease?gr.GTE0PRE:gr.GTE0],"")),_K=t=>(e,n,r,i,o,s,a,c,u,l,d,f)=>(Kn(r)?n="":Kn(i)?n=`>=${r}.0.0${t?"-0":""}`:Kn(o)?n=`>=${r}.${i}.0${t?"-0":""}`:s?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Kn(u)?c="":Kn(l)?c=`<${+u+1}.0.0-0`:Kn(d)?c=`<${u}.${+l+1}.0-0`:f?c=`<=${u}.${l}.${d}-${f}`:t?c=`<${u}.${l}.${+d+1}-0`:c=`<=${c}`,`${n} ${c}`.trim()),mK=(t,e,n)=>{for(let r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let r=0;r<t.length;r++)if(Vt(t[r].semver),t[r].semver!==XT.ANY&&t[r].semver.prerelease.length>0){let i=t[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var ML=V((r9,AL)=>{"use strict";var vK=KT(),yK=(t,e,n)=>{try{e=new vK(e,n)}catch{return!1}return e.test(t)};AL.exports=yK});var YL=V(cr=>{"use strict";var qL=cr&&cr.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),SK=cr&&cr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wp=cr&&cr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&qL(n,e,r[i]);return SK(n,e),n}})(),UL=cr&&cr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&qL(e,t,n)};Object.defineProperty(cr,"__esModule",{value:!0});cr.SettingMonitor=cr.LanguageClient=cr.TransportKind=void 0;var Xs=wp(require("child_process")),JT=wp(require("fs")),QT=wp(require("path")),LL=wp(require("readline")),Za=require("vscode"),ff=wp(Ii()),FL=ET(),DK=qM(),ln=UT(),EK=rL(),bK=ML();UL(UT(),cr);UL(CT(),cr);var jL="^1.91.0",fn;(function(t){t[t.stdio=0]="stdio",t[t.ipc=1]="ipc",t[t.pipe=2]="pipe",t[t.socket=3]="socket"})(fn||(cr.TransportKind=fn={}));var Qa;(function(t){function e(n){let r=n;return r&&r.kind===fn.socket&&ff.number(r.port)}t.isSocket=e})(Qa||(Qa={}));var ZT;(function(t){function e(n){return ff.string(n.command)}t.is=e})(ZT||(ZT={}));var ew;(function(t){function e(n){return ff.string(n.module)}t.is=e})(ew||(ew={}));var tw;(function(t){function e(n){let r=n;return r&&r.writer!==void 0&&r.reader!==void 0}t.is=e})(tw||(tw={}));var nw;(function(t){function e(n){let r=n;return r&&r.process!==void 0&&typeof r.detached=="boolean"}t.is=e})(nw||(nw={}));var rw=class extends FL.BaseLanguageClient{_serverOptions;_forceDebug;_serverProcess;_isDetached;_isInDebugMode;constructor(e,n,r,i,o){let s,a,c,u,l;ff.string(n)?(s=e,a=n,c=r,u=i,l=!!o):(s=e.toLowerCase(),a=e,c=n,u=r,l=i),l===void 0&&(l=!1),super(s,a,u),this._serverOptions=c,this._forceDebug=l,this._isInDebugMode=l;try{this.checkVersion()}catch(d){throw ff.string(d.message)&&this.outputChannel.appendLine(d.message),d}}checkVersion(){let e=EK(Za.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${Za.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!bK(e,jL))throw new Error(`The language client requires VS Code version ${jL} but received version ${Za.version}`)}get isInDebugMode(){return this._isInDebugMode}get serverProcess(){return this._serverProcess}async restart(){await this.stop(),this.isInDebugMode?(await new Promise(e=>setTimeout(e,1e3)),await this.start()):await this.start()}shutdown(e,n=2e3){return super.shutdown(e,n).finally(()=>{if(this._serverProcess){let r=this._serverProcess;this._serverProcess=void 0,(this._isDetached===void 0||!this._isDetached)&&this.checkProcessDied(r),this._isDetached=void 0}})}checkProcessDied(e){!e||e.pid===void 0||setTimeout(()=>{try{e.pid!==void 0&&(process.kill(e.pid,0),(0,DK.terminate)(e))}catch{}},2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),e.processId===null&&(e.processId=process.pid)}createMessageTransports(e){function n(f,g){if(!f&&!g)return;let h=Object.create(null);return Object.keys(process.env).forEach(_=>h[_]=process.env[_]),g&&(h.ELECTRON_RUN_AS_NODE="1",h.ELECTRON_NO_ASAR="1"),f&&Object.keys(f).forEach(_=>h[_]=f[_]),h}let r=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function o(){let f=process.execArgv;return f?f.some(g=>r.some(h=>g.startsWith(h))||i.some(h=>g===h)):!1}function s(f){if(f.stdin===null||f.stdout===null||f.stderr===null)throw new Error("Process created without stdio streams")}function a(f,g){LL.createInterface({input:f,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",h=>g.info(h))}function c(f,g){LL.createInterface({input:f,crlfDelay:1/0,terminal:!1,historySize:0}).on("line",h=>g.error(h))}let u=this._serverOptions;if(ff.func(u))return u().then(f=>{if(FL.MessageTransports.is(f))return this._isDetached=!!f.detached,f;if(tw.is(f))return this._isDetached=!!f.detached,{reader:new ln.StreamMessageReader(f.reader),writer:new ln.StreamMessageWriter(f.writer)};{let g;return nw.is(f)?(g=f.process,this._isDetached=f.detached):(g=f,this._isDetached=!1),c(g.stderr,this.outputChannel),{reader:new ln.StreamMessageReader(g.stdout),writer:new ln.StreamMessageWriter(g.stdin)}}});let l,d=u;return d.run||d.debug?this._forceDebug||o()?(l=d.debug,this._isInDebugMode=!0):(l=d.run,this._isInDebugMode=!1):l=u,this._getServerWorkingDir(l.options).then(f=>{if(ew.is(l)&&l.module){let g=l,h=g.transport||fn.stdio;if(g.runtime){let _=[],S=g.options??Object.create(null);S.execArgv&&S.execArgv.forEach(x=>_.push(x)),_.push(g.module),g.args&&g.args.forEach(x=>_.push(x));let b=Object.create(null);b.cwd=f,b.env=n(S.env,!1);let v=this._getRuntimePath(g.runtime,f),E;if(h===fn.ipc?(b.stdio=[null,null,null,"ipc"],_.push("--node-ipc")):h===fn.stdio?_.push("--stdio"):h===fn.pipe?(E=(0,ln.generateRandomPipeName)(),_.push(`--pipe=${E}`)):Qa.isSocket(h)&&_.push(`--socket=${h.port}`),_.push(`--clientProcessId=${process.pid.toString()}`),h===fn.ipc||h===fn.stdio){let x=Xs.spawn(v,_,b);return!x||!x.pid?lf(x,`Launching server using runtime ${v} failed.`):(this._serverProcess=x,c(x.stderr,this.outputChannel),h===fn.ipc?(a(x.stdout,this.outputChannel),Promise.resolve({reader:new ln.IPCMessageReader(x),writer:new ln.IPCMessageWriter(x)})):Promise.resolve({reader:new ln.StreamMessageReader(x.stdout),writer:new ln.StreamMessageWriter(x.stdin)}))}else{if(h===fn.pipe)return(0,ln.createClientPipeTransport)(E).then(x=>{let P=Xs.spawn(v,_,b);return!P||!P.pid?lf(P,`Launching server using runtime ${v} failed.`):(this._serverProcess=P,c(P.stderr,this.outputChannel),a(P.stdout,this.outputChannel),x.onConnected().then(T=>({reader:T[0],writer:T[1]})))});if(Qa.isSocket(h))return(0,ln.createClientSocketTransport)(h.port).then(x=>{let P=Xs.spawn(v,_,b);return!P||!P.pid?lf(P,`Launching server using runtime ${v} failed.`):(this._serverProcess=P,c(P.stderr,this.outputChannel),a(P.stdout,this.outputChannel),x.onConnected().then(T=>({reader:T[0],writer:T[1]})))})}}else{let _;return new Promise((S,b)=>{let v=(g.args&&g.args.slice())??[];h===fn.ipc?v.push("--node-ipc"):h===fn.stdio?v.push("--stdio"):h===fn.pipe?(_=(0,ln.generateRandomPipeName)(),v.push(`--pipe=${_}`)):Qa.isSocket(h)&&v.push(`--socket=${h.port}`),v.push(`--clientProcessId=${process.pid.toString()}`);let E=g.options?{...g.options}:Object.create(null);if(E.env=n(E.env,!0),E.execArgv=E.execArgv||[],E.cwd=f,E.silent=!0,h===fn.ipc||h===fn.stdio){let x=Xs.fork(g.module,v||[],E);s(x),this._serverProcess=x,c(x.stderr,this.outputChannel),h===fn.ipc?(a(x.stdout,this.outputChannel),S({reader:new ln.IPCMessageReader(this._serverProcess),writer:new ln.IPCMessageWriter(this._serverProcess)})):S({reader:new ln.StreamMessageReader(x.stdout),writer:new ln.StreamMessageWriter(x.stdin)})}else h===fn.pipe?(0,ln.createClientPipeTransport)(_).then(x=>{let P=Xs.fork(g.module,v||[],E);s(P),this._serverProcess=P,c(P.stderr,this.outputChannel),a(P.stdout,this.outputChannel),x.onConnected().then(T=>{S({reader:T[0],writer:T[1]})},b)},b):Qa.isSocket(h)&&(0,ln.createClientSocketTransport)(h.port).then(x=>{let P=Xs.fork(g.module,v||[],E);s(P),this._serverProcess=P,c(P.stderr,this.outputChannel),a(P.stdout,this.outputChannel),x.onConnected().then(T=>{S({reader:T[0],writer:T[1]})},b)},b)})}}else if(ZT.is(l)&&l.command){let g=l,h=l.args!==void 0?l.args.slice(0):[],_,S=l.transport;if(S===fn.stdio)h.push("--stdio");else if(S===fn.pipe)_=(0,ln.generateRandomPipeName)(),h.push(`--pipe=${_}`);else if(Qa.isSocket(S))h.push(`--socket=${S.port}`);else if(S===fn.ipc)throw new Error("Transport kind ipc is not support for command executable");let b=Object.assign({},g.options);if(b.cwd=b.cwd||f,S===void 0||S===fn.stdio){let v=Xs.spawn(g.command,h,b);return!v||!v.pid?lf(v,`Launching server using command ${g.command} failed.`):(c(v.stderr,this.outputChannel),this._serverProcess=v,this._isDetached=!!b.detached,Promise.resolve({reader:new ln.StreamMessageReader(v.stdout),writer:new ln.StreamMessageWriter(v.stdin)}))}else{if(S===fn.pipe)return(0,ln.createClientPipeTransport)(_).then(v=>{let E=Xs.spawn(g.command,h,b);return!E||!E.pid?lf(E,`Launching server using command ${g.command} failed.`):(this._serverProcess=E,this._isDetached=!!b.detached,c(E.stderr,this.outputChannel),a(E.stdout,this.outputChannel),v.onConnected().then(x=>({reader:x[0],writer:x[1]})))});if(Qa.isSocket(S))return(0,ln.createClientSocketTransport)(S.port).then(v=>{let E=Xs.spawn(g.command,h,b);return!E||!E.pid?lf(E,`Launching server using command ${g.command} failed.`):(this._serverProcess=E,this._isDetached=!!b.detached,c(E.stderr,this.outputChannel),a(E.stdout,this.outputChannel),v.onConnected().then(x=>({reader:x[0],writer:x[1]})))})}}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(u,null,4)))}).finally(()=>{this._serverProcess!==void 0&&this._serverProcess.on("exit",(f,g)=>{f===0?this.info("Server process exited successfully",void 0,!1):f!==null&&this.error(`Server process exited with code ${f}.`,void 0,!1),g!==null&&this.error(`Server process exited with signal ${g}.`,void 0,!1)})})}_getRuntimePath(e,n){if(QT.isAbsolute(e))return e;let r=this._mainGetRootPath();if(r!==void 0){let i=QT.join(r,e);if(JT.existsSync(i))return i}if(n!==void 0){let i=QT.join(n,e);if(JT.existsSync(i))return i}return e}_mainGetRootPath(){let e=Za.workspace.workspaceFolders;if(!e||e.length===0)return;let n=e[0];if(n.uri.scheme==="file")return n.uri.fsPath}_getServerWorkingDir(e){let n=e&&e.cwd;return n||(n=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),n?new Promise(r=>{JT.lstat(n,(i,o)=>{r(!i&&o.isDirectory()?n:void 0)})}):Promise.resolve(void 0)}};cr.LanguageClient=rw;var iw=class{_client;_setting;_listeners;constructor(e,n){this._client=e,this._setting=n,this._listeners=[]}start(){return Za.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new Za.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),n=e>=0?this._setting.substr(0,e):this._setting,r=e>=0?this._setting.substr(e+1):void 0,i=r?Za.workspace.getConfiguration(n).get(r,!1):Za.workspace.getConfiguration(n);i&&this._client.needsStart()?this._client.start().catch(o=>this._client.error("Start failed after configuration change",o,"force")):!i&&this._client.needsStop()&&this._client.stop().catch(o=>this._client.error("Stop failed after configuration change",o,"force"))}};cr.SettingMonitor=iw;function lf(t,e){return t===null?Promise.reject(e):new Promise((n,r)=>{t.on("error",i=>{r(`${e} ${i}`)}),setImmediate(()=>r(e))})}});var HL=V(kL=>{"use strict";(()=>{var t={747:(o,s,a)=>{"use strict";var c,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,g={};((T,N)=>{for(var M in N)u(T,M,{get:N[M],enumerable:!0})})(g,{config:()=>b,t:()=>v}),o.exports=(c=g,((T,N,M,q)=>{if(N&&typeof N=="object"||typeof N=="function")for(let k of d(N))f.call(T,k)||k===void 0||u(T,k,{get:()=>N[k],enumerable:!(q=l(N,k))||q.enumerable});return T})(u({},"__esModule",{value:!0}),c));var h,_=a(896),S=a(943);function b(T){if("contents"in T)h=typeof T.contents=="string"?JSON.parse(T.contents):T.contents;else if("fsPath"in T){let M=(N=T.fsPath,(0,_.readFileSync)(N,"utf8")),q=JSON.parse(M);h=P(q)?q.contents.bundle:q}else{var N;if(T.uri){let M=T.uri;return typeof T.uri=="string"&&(M=new URL(T.uri)),new Promise(((q,k)=>{(async function(W){if(W.protocol==="file:")return await(0,S.readFile)(W,"utf8");if(W.protocol==="http:"||W.protocol==="https:"){let ne=await fetch(W.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!ne.ok){let he=`Unexpected ${ne.status} response while trying to read ${W}`;try{he+=`: ${await ne.text()}`}catch{}throw new Error(he)}return await ne.text()}throw new Error("Unsupported protocol")})(M).then((W=>{try{let ne=JSON.parse(W);h=P(ne)?ne.contents.bundle:ne,q()}catch(ne){k(ne)}})).catch((W=>{k(W)}))}))}}}function v(...T){let N=T[0],M,q,k;if(typeof N=="string")M=N,q=N,T.splice(0,1),k=T&&typeof T[0]=="object"?T[0]:T;else{if(N instanceof Array){let ne=T.slice(1);if(N.length!==ne.length+1)throw new Error("expected a string as the first argument to l10n.t");let he=N[0];for(let R=1;R<N.length;R++)he+=`{${R-1}}`+N[R];return v(he,...ne)}q=N.message,M=q,N.comment&&N.comment.length>0&&(M+=`/${Array.isArray(N.comment)?N.comment.join(""):N.comment}`),k=N.args??{}}let W=h?.[M];return W?typeof W=="string"?x(W,k):W.comment?x(W.message,k):x(q,k):x(q,k)}var E=/{([^}]+)}/g;function x(T,N){return Object.keys(N).length===0?T:T.replace(E,((M,q)=>N[q]??M))}function P(T){return!(typeof T?.contents?.bundle!="object"||typeof T?.version!="string")}},544:function(o,s,a){"use strict";var c=this&&this.__createBinding||(Object.create?function(h,_,S,b){b===void 0&&(b=S);var v=Object.getOwnPropertyDescriptor(_,S);v&&!("get"in v?!_.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return _[S]}}),Object.defineProperty(h,b,v)}:function(h,_,S,b){b===void 0&&(b=S),h[b]=_[S]}),u=this&&this.__setModuleDefault||(Object.create?function(h,_){Object.defineProperty(h,"default",{enumerable:!0,value:_})}:function(h,_){h.default=_}),l=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var _={};if(h!=null)for(var S in h)S!=="default"&&Object.prototype.hasOwnProperty.call(h,S)&&c(_,h,S);return u(_,h),_};Object.defineProperty(s,"__esModule",{value:!0}),s.req=s.json=s.toBuffer=void 0;let d=l(a(611)),f=l(a(692));async function g(h){let _=0,S=[];for await(let b of h)_+=b.length,S.push(b);return Buffer.concat(S,_)}s.toBuffer=g,s.json=async function(h){let _=(await g(h)).toString("utf8");try{return JSON.parse(_)}catch(S){let b=S;throw b.message+=` (input: ${_})`,b}},s.req=function(h,_={}){let S=((typeof h=="string"?h:h.href).startsWith("https:")?f:d).request(h,_),b=new Promise(((v,E)=>{S.once("response",v).once("error",E).end()}));return S.then=b.then.bind(b),S}},917:function(o,s,a){"use strict";var c=this&&this.__createBinding||(Object.create?function(b,v,E,x){x===void 0&&(x=E);var P=Object.getOwnPropertyDescriptor(v,E);P&&!("get"in P?!v.__esModule:P.writable||P.configurable)||(P={enumerable:!0,get:function(){return v[E]}}),Object.defineProperty(b,x,P)}:function(b,v,E,x){x===void 0&&(x=E),b[x]=v[E]}),u=this&&this.__setModuleDefault||(Object.create?function(b,v){Object.defineProperty(b,"default",{enumerable:!0,value:v})}:function(b,v){b.default=v}),l=this&&this.__importStar||function(b){if(b&&b.__esModule)return b;var v={};if(b!=null)for(var E in b)E!=="default"&&Object.prototype.hasOwnProperty.call(b,E)&&c(v,b,E);return u(v,b),v},d=this&&this.__exportStar||function(b,v){for(var E in b)E==="default"||Object.prototype.hasOwnProperty.call(v,E)||c(v,b,E)};Object.defineProperty(s,"__esModule",{value:!0}),s.Agent=void 0;let f=l(a(278)),g=l(a(611)),h=a(692);d(a(544),s);let _=Symbol("AgentBaseInternalState");class S extends g.Agent{constructor(v){super(v),this[_]={}}isSecureEndpoint(v){if(v){if(typeof v.secureEndpoint=="boolean")return v.secureEndpoint;if(typeof v.protocol=="string")return v.protocol==="https:"}let{stack:E}=new Error;return typeof E=="string"&&E.split(`
`).some((x=>x.indexOf("(https.js:")!==-1||x.indexOf("node:https:")!==-1))}incrementSockets(v){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[v]||(this.sockets[v]=[]);let E=new f.Socket({writable:!1});return this.sockets[v].push(E),this.totalSocketCount++,E}decrementSockets(v,E){if(!this.sockets[v]||E===null)return;let x=this.sockets[v],P=x.indexOf(E);P!==-1&&(x.splice(P,1),this.totalSocketCount--,x.length===0&&delete this.sockets[v])}getName(v){return(typeof v.secureEndpoint=="boolean"?v.secureEndpoint:this.isSecureEndpoint(v))?h.Agent.prototype.getName.call(this,v):super.getName(v)}createSocket(v,E,x){let P={...E,secureEndpoint:this.isSecureEndpoint(E)},T=this.getName(P),N=this.incrementSockets(T);Promise.resolve().then((()=>this.connect(v,P))).then((M=>{if(this.decrementSockets(T,N),M instanceof g.Agent)return M.addRequest(v,P);this[_].currentSocket=M,super.createSocket(v,E,x)}),(M=>{this.decrementSockets(T,N),x(M)}))}createConnection(){let v=this[_].currentSocket;if(this[_].currentSocket=void 0,!v)throw new Error("No socket was returned in the `connect()` function");return v}get defaultPort(){return this[_].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(v){this[_]&&(this[_].defaultPort=v)}get protocol(){return this[_].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(v){this[_]&&(this[_].protocol=v)}}s.Agent=S},645:function(o,s,a){"use strict";var c=this&&this.__createBinding||(Object.create?function(P,T,N,M){M===void 0&&(M=N);var q=Object.getOwnPropertyDescriptor(T,N);q&&!("get"in q?!T.__esModule:q.writable||q.configurable)||(q={enumerable:!0,get:function(){return T[N]}}),Object.defineProperty(P,M,q)}:function(P,T,N,M){M===void 0&&(M=N),P[M]=T[N]}),u=this&&this.__setModuleDefault||(Object.create?function(P,T){Object.defineProperty(P,"default",{enumerable:!0,value:T})}:function(P,T){P.default=T}),l=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var T={};if(P!=null)for(var N in P)N!=="default"&&Object.prototype.hasOwnProperty.call(P,N)&&c(T,P,N);return u(T,P),T},d=this&&this.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(s,"__esModule",{value:!0}),s.HttpProxyAgent=void 0;let f=l(a(278)),g=l(a(756)),h=d(a(150)),_=a(434),S=a(917),b=a(16),v=(0,h.default)("http-proxy-agent");class E extends S.Agent{constructor(T,N){super(N),this.proxy=typeof T=="string"?new b.URL(T):T,this.proxyHeaders=N?.headers??{},v("Creating new HttpProxyAgent instance: %o",this.proxy.href);let M=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),q=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...N?x(N,"headers"):null,host:M,port:q}}addRequest(T,N){T._header=null,this.setRequestProps(T,N),super.addRequest(T,N)}setRequestProps(T,N){let{proxy:M}=this,q=`${N.secureEndpoint?"https:":"http:"}//${T.getHeader("host")||"localhost"}`,k=new b.URL(T.path,q);N.port!==80&&(k.port=String(N.port)),T.path=String(k);let W=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(M.username||M.password){let ne=`${decodeURIComponent(M.username)}:${decodeURIComponent(M.password)}`;W["Proxy-Authorization"]=`Basic ${Buffer.from(ne).toString("base64")}`}W["Proxy-Connection"]||(W["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let ne of Object.keys(W)){let he=W[ne];he&&T.setHeader(ne,he)}}async connect(T,N){let M,q,k;return T._header=null,T.path.includes("://")||this.setRequestProps(T,N),v("Regenerating stored HTTP header string for request"),T._implicitHeader(),T.outputData&&T.outputData.length>0&&(v("Patching connection write() output buffer with updated header"),M=T.outputData[0].data,q=M.indexOf(`\r
\r
`)+4,T.outputData[0].data=T._header+M.substring(q),v("Output buffer: %o",T.outputData[0].data)),this.proxy.protocol==="https:"?(v("Creating `tls.Socket`: %o",this.connectOpts),k=g.connect(this.connectOpts)):(v("Creating `net.Socket`: %o",this.connectOpts),k=f.connect(this.connectOpts)),await(0,_.once)(k,"connect"),k}}function x(P,...T){let N={},M;for(M in P)T.includes(M)||(N[M]=P[M]);return N}E.protocols=["http","https"],s.HttpProxyAgent=E},288:function(o,s,a){"use strict";var c=this&&this.__createBinding||(Object.create?function(N,M,q,k){k===void 0&&(k=q);var W=Object.getOwnPropertyDescriptor(M,q);W&&!("get"in W?!M.__esModule:W.writable||W.configurable)||(W={enumerable:!0,get:function(){return M[q]}}),Object.defineProperty(N,k,W)}:function(N,M,q,k){k===void 0&&(k=q),N[k]=M[q]}),u=this&&this.__setModuleDefault||(Object.create?function(N,M){Object.defineProperty(N,"default",{enumerable:!0,value:M})}:function(N,M){N.default=M}),l=this&&this.__importStar||function(N){if(N&&N.__esModule)return N;var M={};if(N!=null)for(var q in N)q!=="default"&&Object.prototype.hasOwnProperty.call(N,q)&&c(M,N,q);return u(M,N),M},d=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(s,"__esModule",{value:!0}),s.HttpsProxyAgent=void 0;let f=l(a(278)),g=l(a(756)),h=d(a(613)),_=d(a(150)),S=a(917),b=a(16),v=a(868),E=(0,_.default)("https-proxy-agent");class x extends S.Agent{constructor(M,q){super(q),this.options={path:void 0},this.proxy=typeof M=="string"?new b.URL(M):M,this.proxyHeaders=q?.headers??{},E("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let k=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),W=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...q?T(q,"headers"):null,host:k,port:W}}async connect(M,q){let{proxy:k}=this;if(!q.host)throw new TypeError('No "host" provided');let W;if(k.protocol==="https:"){E("Creating `tls.Socket`: %o",this.connectOpts);let re=this.connectOpts.servername||this.connectOpts.host;W=g.connect({...this.connectOpts,servername:re})}else E("Creating `net.Socket`: %o",this.connectOpts),W=f.connect(this.connectOpts);let ne=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},he=f.isIPv6(q.host)?`[${q.host}]`:q.host,R=`CONNECT ${he}:${q.port} HTTP/1.1\r
`;if(k.username||k.password){let re=`${decodeURIComponent(k.username)}:${decodeURIComponent(k.password)}`;ne["Proxy-Authorization"]=`Basic ${Buffer.from(re).toString("base64")}`}ne.Host=`${he}:${q.port}`,ne["Proxy-Connection"]||(ne["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let re of Object.keys(ne))R+=`${re}: ${ne[re]}\r
`;let Y=(0,v.parseProxyResponse)(W);W.write(`${R}\r
`);let{connect:Z,buffered:oe}=await Y;if(M.emit("proxyConnect",Z),this.emit("proxyConnect",Z,M),Z.statusCode===200){if(M.once("socket",P),q.secureEndpoint){E("Upgrading socket connection to TLS");let re=q.servername||q.host;return g.connect({...T(q,"host","path","port"),socket:W,servername:re})}return W}W.destroy();let U=new f.Socket({writable:!1});return U.readable=!0,M.once("socket",(re=>{E("Replaying proxy buffer for failed request"),(0,h.default)(re.listenerCount("data")>0),re.push(oe),re.push(null)})),U}}function P(N){N.resume()}function T(N,...M){let q={},k;for(k in N)M.includes(k)||(q[k]=N[k]);return q}x.protocols=["http","https"],s.HttpsProxyAgent=x},868:function(o,s,a){"use strict";var c=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(s,"__esModule",{value:!0}),s.parseProxyResponse=void 0;let u=(0,c(a(150)).default)("https-proxy-agent:parse-proxy-response");s.parseProxyResponse=function(l){return new Promise(((d,f)=>{let g=0,h=[];function _(){let E=l.read();E?(function(x){h.push(x),g+=x.length;let P=Buffer.concat(h,g),T=P.indexOf(`\r
\r
`);if(T===-1)return u("have not received end of HTTP headers yet..."),void _();let N=P.slice(0,T).toString("ascii").split(`\r
`),M=N.shift();if(!M)return l.destroy(),f(new Error("No header received from proxy CONNECT response"));let q=M.split(" "),k=+q[1],W=q.slice(2).join(" "),ne={};for(let he of N){if(!he)continue;let R=he.indexOf(":");if(R===-1)return l.destroy(),f(new Error(`Invalid header from proxy CONNECT response: "${he}"`));let Y=he.slice(0,R).toLowerCase(),Z=he.slice(R+1).trimStart(),oe=ne[Y];typeof oe=="string"?ne[Y]=[oe,Z]:Array.isArray(oe)?oe.push(Z):ne[Y]=Z}u("got proxy server response: %o %o",M,ne),S(),d({connect:{statusCode:k,statusText:W,headers:ne},buffered:P})})(E):l.once("readable",_)}function S(){l.removeListener("end",b),l.removeListener("error",v),l.removeListener("readable",_)}function b(){S(),u("onend"),f(new Error("Proxy connection ended before receiving CONNECT response"))}function v(E){S(),u("onerror %o",E),f(E)}l.on("error",v),l.on("end",b),_()}))}},580:function(o,s,a){"use strict";var c,u=this&&this.__extends||(c=function(T,N){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,q){M.__proto__=q}||function(M,q){for(var k in q)Object.prototype.hasOwnProperty.call(q,k)&&(M[k]=q[k])},c(T,N)},function(T,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function M(){this.constructor=T}c(T,N),T.prototype=N===null?Object.create(N):(M.prototype=N.prototype,new M)}),l=this&&this.__assign||function(){return l=Object.assign||function(T){for(var N,M=1,q=arguments.length;M<q;M++)for(var k in N=arguments[M])Object.prototype.hasOwnProperty.call(N,k)&&(T[k]=N[k]);return T},l.apply(this,arguments)};Object.defineProperty(s,"__esModule",{value:!0}),s.xhr=s.configure=void 0,s.getErrorStatusDescription=function(T){if(!(T<400))switch(T){case 400:return h.t("Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return h.t("Unauthorized. The server is refusing to respond.");case 403:return h.t("Forbidden. The server is refusing to respond.");case 404:return h.t("Not Found. The requested location could not be found.");case 405:return h.t("Method not allowed. A request was made using a request method not supported by that location.");case 406:return h.t("Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return h.t("Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return h.t("Request Timeout. The server timed out waiting for the request.");case 409:return h.t("Conflict. The request could not be completed because of a conflict in the request.");case 410:return h.t("Gone. The requested page is no longer available.");case 411:return h.t('Length Required. The "Content-Length" is not defined.');case 412:return h.t("Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return h.t("Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return h.t("Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return h.t("Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return h.t("Internal Server Error.");case 501:return h.t("Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 502:return h.t("Bad Gateway. The upstream server did not respond.");case 503:return h.t("Service Unavailable. The server is currently unavailable (overloaded or down).");default:return h.t("HTTP status code {0}",T)}};var d=a(611),f=a(692),g=a(16),h=a(747),_=a(106),S=a(645),b=a(288),v=void 0,E=!0;function x(T){var N;return new Promise((function(M,q){var k=(0,g.parse)(T.url),W={hostname:k.hostname,agent:!!T.agent&&T.agent,port:k.port?parseInt(k.port):k.protocol==="https:"?443:80,path:k.path,method:T.type||"GET",headers:T.headers,rejectUnauthorized:typeof T.strictSSL!="boolean"||T.strictSSL};T.user&&T.password&&(W.auth=T.user+":"+T.password);var ne=function(he){if(he.statusCode>=300&&he.statusCode<400&&T.followRedirects&&T.followRedirects>0&&he.headers.location){var R=he.headers.location;R.startsWith("/")&&(R=(0,g.format)({protocol:k.protocol,hostname:k.hostname,port:k.port,pathname:R})),M(x((function(Y){for(var Z=[],oe=1;oe<arguments.length;oe++)Z[oe-1]=arguments[oe];return Z.forEach((function(U){return Object.keys(U).forEach((function(re){return Y[re]=U[re]}))})),Y})({},T,{url:R,followRedirects:T.followRedirects-1})))}else M({req:N,res:he})};(N=k.protocol==="https:"?f.request(W,ne):d.request(W,ne)).on("error",q),T.timeout&&N.setTimeout(T.timeout),T.data&&N.write(T.data),N.end(),T.token&&(T.token.isCancellationRequested&&N.destroy(new P),T.token.onCancellationRequested((function(){N.destroy(new P)})))}))}s.configure=function(T,N){v=T,E=N},s.xhr=function(T){return typeof(T=l({},T)).strictSSL!="boolean"&&(T.strictSSL=E),T.agent||(T.agent=(function(N,M){var q;M===void 0&&(M={});var k=(0,g.parse)(N),W=M.proxyUrl||(function(ne){return ne.protocol==="http:"?process.env.HTTP_PROXY||process.env.http_proxy||null:ne.protocol==="https:"&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null})(k);return W&&/^https?:/.test(W)?k.protocol==="http:"?new S.HttpProxyAgent(W):new b.HttpsProxyAgent(W,{rejectUnauthorized:(q=M.strictSSL)===null||q===void 0||q}):null})(T.url,{proxyUrl:v,strictSSL:E})),typeof T.followRedirects!="number"&&(T.followRedirects=5),x(T).then((function(N){return new Promise((function(M,q){var k,W,ne=N.res,he=ne,R=!1,Y=ne.headers&&ne.headers["content-encoding"];if(Y&&(k=T.type,W=N.res.statusCode,!(k==="HEAD"||W>=100&&W<200||W===204||W===304))){var Z={flush:_.constants.Z_SYNC_FLUSH,finishFlush:_.constants.Z_SYNC_FLUSH};if(Y==="gzip"){var oe=_.createGunzip(Z);ne.pipe(oe),he=oe}else if(Y==="deflate"){var U=_.createInflate(Z);ne.pipe(U),he=U}}var re=[];he.on("data",(function(L){return re.push(L)})),he.on("end",(function(){if(!R){if(R=!0,T.followRedirects>0&&(ne.statusCode>=300&&ne.statusCode<=303||ne.statusCode===307)){var L=ne.headers.location;if(L.startsWith("/")){var K=(0,g.parse)(T.url);L=(0,g.format)({protocol:K.protocol,hostname:K.hostname,port:K.port,pathname:L})}if(L){var z={type:T.type,url:L,user:T.user,password:T.password,headers:T.headers,timeout:T.timeout,followRedirects:T.followRedirects-1,data:T.data,token:T.token};return void(0,s.xhr)(z).then(M,q)}}var j=Buffer.concat(re),_e={responseText:j.toString(),body:j,status:ne.statusCode,headers:ne.headers||{}};ne.statusCode>=200&&ne.statusCode<300||ne.statusCode===1223?M(_e):q(_e)}})),he.on("error",(function(L){var K;K=P.is(L)?L:{responseText:h.t("Unable to access {0}. Error: {1}",T.url,L.message),body:Buffer.concat(re),status:500,headers:{}},R=!0,q(K)})),T.token&&(T.token.isCancellationRequested&&he.destroy(new P),T.token.onCancellationRequested((function(){he.destroy(new P)})))}))}),(function(N){var M;return M=P.is(N)?N:{responseText:T.agent?h.t("Unable to connect to {0} through a proxy. Error: {1}",T.url,N.message):h.t("Unable to connect to {0}. Error: {1}",T.url,N.message),body:Buffer.concat([]),status:404,headers:{}},Promise.reject(M)}))};var P=(function(T){function N(){var M=T.call(this,"The user aborted a request")||this;return M.name="AbortError",Object.setPrototypeOf(M,N.prototype),M}return u(N,T),N.is=function(M){return M instanceof N},N})(Error)},150:(o,s)=>{function a(){}Object.defineProperty(s,"__esModule",{value:!0}),s.default=function(c){return a}},613:o=>{"use strict";o.exports=require("assert")},434:o=>{"use strict";o.exports=require("events")},896:o=>{"use strict";o.exports=require("fs")},943:o=>{"use strict";o.exports=require("fs/promises")},611:o=>{"use strict";o.exports=require("http")},692:o=>{"use strict";o.exports=require("https")},278:o=>{"use strict";o.exports=require("net")},756:o=>{"use strict";o.exports=require("tls")},16:o=>{"use strict";o.exports=require("url")},106:o=>{"use strict";o.exports=require("zlib")}},e={},n=(function o(s){var a=e[s];if(a!==void 0)return a.exports;var c=e[s]={exports:{}};return t[s].call(c.exports,c,c.exports,o),c.exports})(580),r=kL;for(var i in n)r[i]=n[i];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})()});var df,Js,Wo,oo,pf,Np,ow=ce(()=>{"use strict";df="function",Js="object",Wo="undefined",oo="prototype",pf=Object,Np=pf[oo]});function vn(t,e){return t||e}function qt(t,e){return t?.[e]}function Ve(t,e){try{return{v:t.apply(this,e)}}catch(n){return{e:n}}}function jK(t,e,n){var r=Ve(t,n);return r.e?e:r.v}function om(t){return function(e){return typeof e===t}}function ZL(t){var e="[object "+t+"]";return function(n){return!!(n&&sm(n)===e)}}function sm(t){return Ap[Ip].call(t)}function bw(t,e){return typeof t===e}function ot(t){return typeof t===vu||t===vu}function qK(t){return t===_r}function fe(t){return t===dn||ot(t)}function so(t){return t===dn||t===_r}function eF(t){return!!t||t!==_r}function UK(t){return!sw&&(sw=["string","number","boolean",vu,"symbol","bigint"]),t!==xp&&sw.indexOf(t)!==-1}function pn(t){return!t&&fe(t)?!1:!!t&&typeof t===xp}function Yr(t){return!!(t&&t.then&&Ye(t.then))}function Cw(t){return!t||!ao(t)}function ao(t){return!(!t||jK(function(){return!(t&&0+t)},!t))}function Tw(){}function YK(){return[]}function kK(){return!1}function Ae(t,e){var n=Sw,r=Ap[Ip][Pn](t);r===HK&&(t={stack:Nn(t.stack),message:Nn(t.message),name:Nn(t.name)});try{n=JSON.stringify(t,dn,e?typeof e=="number"?e:4:_r),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):dn)||Nn(t)}catch(i){n=" - "+Ae(i,e)}return r+": "+n}function yn(t){throw new Error(t)}function Ar(t){throw new TypeError(t)}function cm(t){so(t)&&Ar("Cannot convert undefined or null to object")}function tF(t){Xe(t)||Ar("'"+Ae(t)+"' is not a string")}function Vn(t,e){return!!t&&Ap.hasOwnProperty[Pn](t,e)}function BK(t,e){return cm(t),Vn(t,e)||!!$K(t,e)}function GK(t){return t===Rp||t===Op||t===mr}function je(t,e,n){if(t&&(pn(t)||Ye(t))){for(var r in t)if(ji(t,r)&&e[Pn](so(n)?t:n,r,t[r])===-1)break}}function se(t,e,n){if(t)for(var r=t[Su]>>>0,i=0;i<r&&!(i in t&&e[Pn](so(n)?t:n,t[i],i,t)===-1);i++);}function _f(t,e,n){var r=e?e[t]:dn;return function(i){var o=(i?i[t]:dn)||r;if(o||n){var s=arguments;return(o||n).apply(i,o?zo[Pn](s,1):s)}Ar('"'+Nn(t)+'" not defined for '+Ae(i))}}function WK(t,e,n){var r=e?e[t]:dn;return function(i){var o=r;if(o||n){var s=arguments;return(o||n).apply(i,o?zo[Pn](s,1):s)}Ar('"'+Nn(t)+'" not defined for '+Ae(i))}}function zK(t){return function(e){return e[t]}}function KK(t,e){var n,r=ur.getOwnPropertyDescriptor;return!so(t)&&r&&(n=Ve(r,[t,e]).v||dn),!n&&!so(t)&&(n=Ve(function(){for(var i in t)if(i==e)return{enumerable:Vn(t,i)}}).v),n&&n.enumerable||!1}function nF(t){var e={};if(e[Q_.c]=!0,e[Q_.e]=!0,t.l){e.get=function(){return t.l.v};var n=XK(t.l,"v");n&&n.set&&(e.set=function(r){t.l.v=r})}return je(t,function(r,i){e[Q_[r]]=qK(i)?e[Q_[r]]:i}),e}function Nw(t,e,n,r,i,o){var s={e:o,c:i};return n&&(s.g=n),r&&(s.s=r),Xr(t,e,nF(s))}function Et(t,e,n){return Xr(t,e,nF(n))}function rF(t,e,n,r,i){var o={};return je(t,function(s,a){nm(o,s,e?a:s),nm(o,a,n?a:s)}),r?r(o):o}function nm(t,e,n,r){Xr(t,e,{value:n,enumerable:!0,writable:!1})}function oF(t){return t}function QK(t){return cm(t),t[Rp]||dn}function sF(t,e){if((Ie(t)||pn(t)||Ye(t))&&!JK(t)){for(var n=0;n<e.length;n++)if(e[n]===t)return t;e.push(t),je(t,function(r,i){sF(i,e)}),qi(t)}return t}function Vo(t){return iF?sF(t,[]):t}function aF(t){return rF(t,1,0,qi)}function ZK(t){return rF(t,0,0,qi)}function eV(t){var e={};return je(t,function(n,r){nm(e,n,r[1]),nm(e,r[0],r[1])}),qi(e)}function cF(t){return eV(t)}function lF(){var t;return typeof globalThis!==vu&&(t=globalThis),!t&&typeof self!==vu&&(t=self),!t&&typeof window!==vu&&(t=window),!t&&typeof global!==vu&&(t=global),t}function um(){if(!aw){var t=Ve(lF).v||{};aw=t[GL]=t[GL]||{}}return aw}function nV(t,e,n){return cm(t),n<0?Sw:(e=e||0,e<0&&(e=tV(e+t[Su],0)),ot(n)?WL(t,e):WL(t,e,e+n))}function bu(t,e){return Xn(t,0,e)}function rV(t,e){return t&&(Ve(function(){t[$L]=!0,t[BL]=e}),Ve(Et,[t,$L,{v:!0,w:!1,e:!1}]),Ve(Et,[t,BL,{v:e,w:!1,e:!1}])),t}function iV(t,e){var n=null;function r(){}if(so(t))n={};else{var i=typeof t;i!==xp&&i!==im&&Ar("Prototype must be an Object or function: "+Ae(t)),r[mr]=t,Ve(function(){r[Rp]=t}),n=new r}return e&&Ve(ww,[n,e]),n}function hn(){return(Date.now||oV)()}function oV(){return new Date().getTime()}function yu(t,e,n){return t.apply(e,n)}function ec(){Un=um()}function Rw(t,e){var n={};return!Un&&ec(),n.b=Un.lzy,Xr(n,"v",{configurable:!0,get:function(){var r=yu(t,null,e);return Un.lzy||Xr(n,"v",{value:r}),n.b=Un.lzy,r}}),n}function lV(){if(!cw){var t=um();cw=t.gblSym=t.gblSym||{k:{},s:{}}}return cw}function Ow(t){var e="_"+uV+++"_"+aV.v,n=Dw+"("+t+")";function r(o,s){Et(i,o,{v:s,e:!1,w:!1})}var i=co(null);return r("description",Nn(t)),r(Ip,function(){return n+cV+e}),r("valueOf",function(){return i}),r("v",n),r("_uid",e),rV(i,"symbol")}function fV(t){var e=lV();if(!ji(e.k,t)){var n=Ow(t),r=yr(e.s).length;n[zL]=function(){return r+"_"+n[Ip]()},e.k[t]=n,e.s[n[zL]()]=Nn(t)}return e.k[t]}function dV(t){!Z_&&(Z_={});var e,n=uF[t];return n&&(e=Z_[n]=Z_[n]||Ow(Dw+"."+n)),e}function Jr(t){return Xr({toJSON:function(){return t}},"v",{value:t})}function Mp(t,e){var n;return function(){return!Un&&ec(),(!n||Un.lzy)&&(n=Jr(Ve(t,e).v)),n.v}}function kr(t){return!Un&&ec(),(!Pp||t===!1||Un.lzy)&&(Pp=Jr(Ve(lF).v||dn)),Pp.v}function He(t,e){var n;if(!Pp||e===!1?n=kr(e):n=Pp.v,n&&n[t])return n[t];if(t===fF)try{return window}catch{}return dn}function Cu(){return!!Sn()}function vf(){return!!Yn()}function Lp(){return!!Jn()}function xw(){return!!lm()}function fm(){return hf=Jr(Ve(He,[Dw]).v),hf}function pV(t){var e=(Un.lzy?0:hf)||fm();return e.v?e.v[t]:_r}function pF(){return!!hV()}function hV(){return!Un&&ec(),((Un.lzy?0:hf)||fm()).v}function Fp(t,e){var n=uF[t];!Un&&ec();var r=(Un.lzy?0:hf)||fm();return r.v?r.v[n||t]:e?_r:dV(t)}function yf(t,e){!Un&&ec();var n=(Un.lzy?0:hf)||fm();return n.v?n.v(t):e?dn:Ow(t)}function dm(t){return!Un&&ec(),uw=(Un.lzy?0:uw)||Jr(Ve(pV,["for"]).v),(uw.v||fV)(t)}function rm(t){return!!t&&Ye(t.next)}function Iw(t){return!so(t)&&Ye(t[Fp(3)])}function pm(t,e,n){if(t&&(rm(t)||(!em&&(em=Jr(Fp(3))),t=t[em.v]?t[em.v]():dn),rm(t))){var r=_r,i=_r;try{for(var o=0;!(i=t.next()).done&&e[Pn](so(n)?t:n,i.value,o,t)!==-1;)o++}catch(s){r={e:s},t.throw&&(i=dn,t.throw(r))}finally{try{i&&!i.done&&t.return&&t.return(i)}finally{if(r)throw r.e}}}}function uo(t,e){return!ot(e)&&t&&(Ie(e)?yu(t.push,t,e):rm(e)||Iw(e)?pm(e,function(n){t.push(n)}):t.push(e)),t}function Sf(t,e,n){return((t?t.slice:dn)||zo).apply(t,zo[Pn](arguments,1))}function gV(t,e,n){return bt(t,e,n)!==-1}function _V(t,e){var n;return!lw&&(lw=Jr((n={},n[Rp]=[],n instanceof Array))),lw.v?t[Rp]=e:je(e,function(r,i){return t[r]=i}),t}function mV(t,e,n){Ve(Et,[e,tm,{v:t,c:!0,e:!1}]),e=hF(e,n);function r(){this[Op]=e,Ve(Et,[this,tm,{v:t,c:!0,e:!1}])}return e[mr]=n===dn?co(n):(r[mr]=n[mr],new r),e}function KL(t,e){e&&(t[tm]=e)}function Mw(t,e,n,r){var i=n||Error,o=i[mr][tm],s=Error.captureStackTrace;return mV(t,function(){var a=this,c=arguments;try{Ve(KL,[i,t]);var u=yu(i,a,r?r(c):zo[Pn](c))||a;if(u!==a){var l=yw(a);l!==yw(u)&&hF(u,l)}return s&&s(u,a[Op]),e&&e(u,c),u}finally{Ve(KL,[i,o])}},i)}function yV(t){return function(n){return cm(n),n=Nn(n),n&&(n=vV(n,t,Sw)),n}}function EV(t,e,n){if(t!==dn&&t!==_r){for(var r in t)if(ji(t,r)&&e[Pn](so(n)?t:n,r,t[r])===-1)return;se(DV(t),function(i){if(VK(t,i)&&e[Pn](so(n)?t:n,i,t[i])===-1)return-1})}}function bV(t,e,n){EV(t,function(r,i){if(!GK(r))return e[Pn](so(n)?t:n,r,i)},n)}function Sr(t){if(!t||typeof t!==xp)return!1;pw||(pw=vf()?Yn():!0);var e=!1;if(t!==pw){dw||(fw=Function[mr][Ip],dw=fw[Pn](ur));try{var n=yw(t);e=!n,e||(Vn(n,Op)&&(n=n[Op]),e=!!(n&&typeof n===im&&fw[Pn](n)===dw))}catch{}}return e}function CV(t,e){e&&t.push(e)}function mn(t,e){e&&e[mr]}function TV(){var t=[Ap,Qs,gf,wK,PK,OK,IK,MK,FK];return Ve(He,["Map"]).v,Ve(He,["Set"]).v,Ve(He,["WeakMap"]).v,Ve(He,["WeakSet"]).v,Ve(He,["Promise"]).v,Ve(He,["Symbol"]).v,Ve(He,["ArrayBuffer"]).v,Ve(He,["SharedArrayBuffer"]).v,Ve(He,["DataView"]).v,Ve(He,["Int8Array"]).v,Ve(He,["Uint8Array"]).v,Ve(He,["Uint8ClampedArray"]).v,Ve(He,["Int16Array"]).v,Ve(He,["Uint16Array"]).v,Ve(He,["Int32Array"]).v,Ve(He,["Uint32Array"]).v,Ve(He,["Float32Array"]).v,Ve(He,["Float64Array"]).v,Ve(He,["BigInt64Array"]).v,Ve(He,["BigUint64Array"]).v,Ve(He,["WeakRef"]).v,Ve(He,["FinalizationRegistry"]).v,t}function wV(t){return hw||(hw=Jr(TV())),bt(hw.v,t)>=0}function NV(t){return t.value&&mF(t),!0}function PV(t,e,n,r){var i;return se(t,function(o){if(o.k===e)return i=o,-1}),i||(i={k:e,v:e},t.push(i),r(i)),i.v}function Lw(t,e,n,r){var i=n.handler,o=n.path?r?n.path.concat(r):n.path:[],s={handler:n.handler,src:n.src,path:o},a=typeof e,c=!1,u=e===dn;u||(e&&a===xp?c=Sr(e):u=UK(a));var l={type:a,isPrim:u,isPlain:c,value:e,result:e,path:o,origin:n.src,copy:function(d,f){return Lw(t,d,f?s:n,f)},copyTo:function(d,f){return _F(t,d,f,s)}};return l.isPrim?i&&i[Pn](n,l)?l.result:e:PV(t,e,o,function(d){Et(l,"result",{g:function(){return d.v},s:function(h){d.v=h}});for(var f=0,g=i;!(g||(f<VL.length?VL[f++]:NV))[Pn](n,l);)g=dn})}function _F(t,e,n,r){return wV(n)||bV(n,function(i,o){e[i]=Lw(t,o,r,i)}),e}function RV(t,e,n){var r={handler:n,src:e,path:[]};return _F([],t,e,r)}function OV(t,e){var n={handler:e,src:t};return Lw([],t,n)}function xV(t){var e=t.value;if(Ie(e)){var n=t.result=[];return n.length=e.length,t.copyTo(n,e),!0}return!1}function IV(t){var e=t.value;return am(e)?(t.result=new Date(e.getTime()),!0):!1}function AV(t){return t.type===im}function mF(t){var e=t.value;if(e&&t.isPlain){var n=t.result={};return t.copyTo(n,e),!0}return!1}function MV(t,e){return se(e,function(n){RV(t,n)}),t}function Fw(t,e,n,r,i,o,s){return MV(OV(t)||{},zo[Pn](arguments))}function tc(){return!Un&&ec(),(!gw||Un.lzy)&&(gw=Jr(Ve(He,["performance"]).v)),gw.v}function qp(){var t=tc();return t&&t.now?t.now():hn()}function LV(t,e,n){tF(t);var r=Xe(e)?e:Nn(e),i=!ot(n)&&n<t[Su]?n:t[Su];return Xn(t,i-r[Su],i)===r}function FV(t,e,n){tF(t);var r=Xe(e)?e:Nn(e),i=n>0?n:0;return Xn(t,i,i+r[Su])===r}function qV(t,e,n){var r=!0,i=t?e(dn):dn,o;function s(){return r=!1,i&&i[mw]&&i[mw](),o}function a(){i&&n(i),i=dn}function c(){return i=e(i),r||s(),o}function u(l){!l&&i&&a(),l&&!i&&c()}return o={cancel:a,refresh:c},o[vw]=function(){return i&&i[vw]?i[vw]():r},o[_w]=function(){return r=!0,i&&i[_w]&&i[_w](),o},o[mw]=s,o=Xr(o,jV,{get:function(){return!!i},set:u}),{h:o,dn:function(){i=dn}}}function kV(t){var e=Ye(t)?t:UV;if(!e){var n=um().tmOut||[];Ie(n)&&n.length>0&&Ye(n[0])&&(e=n[0])}return e||setTimeout}function HV(t){var e=Ye(t)?t:YV;if(!e){var n=um().tmOut||[];Ie(n)&&n.length>1&&Ye(n[1])&&(e=n[1])}return e||clearTimeout}function jw(t,e,n){var r=Ie(e),i=r?e.length:0,o=kV(i>0?e[0]:r?_r:e),s=HV(i>1?e[1]:_r),a=n[0];n[0]=function(){c.dn(),yu(a,_r,zo[Pn](arguments))};var c=qV(t,function(u){if(u){if(u.refresh)return u.refresh(),u;yu(s,_r,[u])}return yu(o,_r,n)},function(u){yu(s,_r,[u])});return c.h}function yi(t,e){return jw(!0,_r,zo[Pn](arguments))}function vF(t,e,n){return jw(!0,t,zo[Pn](arguments,1))}function yF(t,e){return jw(!1,_r,zo[Pn](arguments))}var _r,dn,Sw,im,xp,mr,Rp,vu,Op,Dw,Su,tm,Pn,Ip,Ew,CK,ur,Ap,XL,Qs,JL,QL,gf,zo,TK,wK,NK,PK,RK,OK,xK,IK,AK,MK,LK,FK,$L,BL,sw,Xe,Ye,Ie,am,vr,Ko,Du,Nn,HK,$K,ji,Eu,VK,XK,Q_,Xr,ww,JK,iF,mf,yr,qi,Pw,yw,uF,GL,aw,tV,WL,Xn,Xo,co,Un,sV,aV,zL,cV,cw,uV,Z_,fF,Pp,Sn,Yn,Jn,lm,dF,hf,uw,em,bt,Zs,Aw,Df,jp,lw,hF,vV,SV,Nt,gF,DV,fw,dw,pw,hw,VL,gw,Qr,Tu,Ef,_w,mw,vw,jV,UV,YV,Ge=ce(()=>{"use strict";_r=void 0,dn=null,Sw="",im="function",xp="object",mr="prototype",Rp="__proto__",vu="undefined",Op="constructor",Dw="Symbol",Su="length",tm="name",Pn="call",Ip="toString",Ew="getOwnPropertyDescriptor",CK="getOwnPropertySymbols",ur=vn(Object),Ap=qt(ur,mr),XL=vn(String),Qs=qt(XL,mr),JL=vn(Math),QL=vn(Array),gf=qt(QL,mr),zo=qt(gf,"slice"),TK=vn(Number),wK=qt(TK,mr),NK=vn(Function),PK=qt(NK,mr),RK=vn(Date),OK=qt(RK,mr),xK=vn(RegExp),IK=qt(xK,mr),AK=vn(Boolean),MK=qt(AK,mr),LK=vn(Error),FK=qt(LK,mr),$L="_polyfill",BL="__nw21$polytype__";Xe=om("string"),Ye=om(im);Ie=qt(QL,"isArray"),am=ZL("Date"),vr=om("number"),Ko=om("boolean"),Du=ZL("Error");Nn=vn(XL),HK="[object Error]";$K=vn(qt(ur,Ew),Tw),ji=vn(qt(ur,"hasOwn"),BK);Eu=_f;VK=WK("propertyIsEnumerable",Ap,KK),XK=vn(qt(ur,Ew),Tw),Q_={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};Xr=qt(ur,"defineProperty"),ww=qt(ur,"defineProperties");JK=vn(qt(ur,"isFrozen"),kK),iF=qt(ur,"freeze");mf=qt(ur,"assign"),yr=qt(ur,"keys");qi=vn(iF,oF),Pw=vn(qt(ur,"seal"),oF),yw=vn(qt(ur,"getPrototypeOf"),QK);uF=ZK({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),GL="__tsUtils$gblCfg";tV=qt(JL,"max"),WL=Eu("slice",Qs),Xn=Eu("substring",Qs),Xo=_f("substr",Qs,nV);co=vn(qt(ur,"create"),iV);sV=qt(JL,"random"),aV=Rw(function(){for(var t=hn().toString(36).slice(2);t.length<16;)t+=sV().toString(36).slice(2);return t=t.substring(0,16),t}),zL="_urid",cV="$nw21sym",uV=0;fF="window";Sn=Mp(He,["document"]);Yn=Mp(He,[fF]);Jn=Mp(He,["navigator"]);lm=Mp(He,["history"]),dF=Mp(function(){return!!Ve(function(){return process&&(process.versions||{}).node}).v});bt=Eu("indexOf",gf),Zs=Eu("map",gf);Aw=_f("includes",gf,gV),Df=zK(Su),jp=Eu("reduce",gf),hF=vn(qt(ur,"setPrototypeOf"),_V);vV=Eu("replace",Qs);SV=yV(/^\s+|(?=\s)\s+$/g),Nt=_f("trim",Qs,SV),gF=vn(qt(ur,Ew),Tw),DV=vn(qt(ur,CK),YK);VL=[xV,mF,AV,IV];Qr=Eu("indexOf",Qs),Tu=_f("endsWith",Qs,LV);Ef=_f("startsWith",Qs,FV);_w="ref",mw="unref",vw="hasRef",jV="enabled"});function Zr(t,e){typeof e!==df&&e!==null&&Ar("Class extends value "+String(e)+" is not a constructor or null"),qw(t,e);function n(){this.constructor=t}t[oo]=e===null?co(e):(n[oo]=e[oo],new n)}function hm(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}var l9,f9,SF,BV,Ui,qw,DF=ce(()=>{"use strict";Ge();ow();l9=(kr()||{}).Symbol,f9=(kr()||{}).Reflect,SF="hasOwnProperty",BV=function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Np[SF].call(e,i)&&(t[i]=e[i])}return t},Ui=mf||BV,qw=function(t,e){return qw=pf.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r[SF](i)&&(n[i]=r[i])},qw(t,e)}});var EF=ce(()=>{"use strict"});var ei=ce(()=>{"use strict";ow();DF();EF();Ge()});function vm(t){return t&&(t===Ww[ea]||t===Array[ea])}function zw(t){return vm(t)||t===Function[ea]}function wu(t){var e;if(t){if(Yp)return Yp(t);var n=t[Gw]||t[ea]||(t[ym]?t[ym][ea]:null);e=t[_m]||n,Vn(t,_m)||(delete t[Uw],e=t[_m]=t[Uw]||t[_m],t[Uw]=n)}return e}function Em(t,e){var n=[];if(TF)n=TF(t);else for(var r in t)typeof r=="string"&&Vn(t,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)e(n[i])}function Kw(t,e,n){return e!==ym&&typeof t[e]===Sm&&(n||Vn(t,e))&&e!==Gw&&e!==ea}function bm(t){Ar("DynamicProto: "+t)}function WV(t){var e=co(null);return Em(t,function(n){!e[n]&&Kw(t,n,!1)&&(e[n]=t[n])}),e}function Vw(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function zV(t,e,n,r){function i(c,u,l){var d=u[l];if(d[kw]&&r){var f=c[Dm]||{};f[Up]!==!1&&(d=(f[u[bf]]||{})[l]||d)}return function(){return d.apply(c,arguments)}}var o=co(null);Em(n,function(c){o[c]=i(e,n,c)});for(var s=wu(t),a=[];s&&!zw(s)&&!Vw(a,s);)Em(s,function(c){!o[c]&&Kw(s,c,!Yp)&&(o[c]=i(e,s,c))}),a.push(s),s=wu(s);return o}function KV(t,e,n,r){var i=null;if(t&&Vn(n,bf)){var o=t[Dm]||co(null);if(i=(o[n[bf]]||co(null))[e],i||bm("Missing ["+e+"] "+Sm),!i[Hw]&&o[Up]!==!1){for(var s=!Vn(t,e),a=wu(t),c=[];s&&a&&!zw(a)&&!Vw(c,a);){var u=a[e];if(u){s=u===r;break}c.push(a),a=wu(a)}try{s&&(t[e]=i),i[Hw]=1}catch{o[Up]=!1}}}return i}function VV(t,e,n){var r=e[t];return r===n&&(r=wu(e)[t]),typeof r!==Sm&&bm("["+t+"] is not a "+Sm),r}function XV(t,e,n,r,i){function o(c,u){var l=function(){var d=KV(this,u,c,l)||VV(u,c,l);return d.apply(this,arguments)};return l[kw]=1,l}if(!vm(t)){var s=n[Dm]=n[Dm]||co(null);if(!vm(s)){var a=s[e]=s[e]||co(null);s[Up]!==!1&&(s[Up]=!!i),vm(a)||Em(n,function(c){Kw(n,c,!1)&&n[c]!==r[c]&&(a[c]=n[c],delete n[c],(!Vn(t,c)||t[c]&&!t[c][kw])&&(t[c]=o(t,c)))})}}}function JV(t,e){if(Yp){for(var n=[],r=wu(e);r&&!zw(r)&&!Vw(n,r);){if(r===t)return!0;n.push(r),r=wu(r)}return!1}return!0}function Yw(t,e){return Vn(t,ea)?t.name||e||bF:((t||{})[ym]||{}).name||e||bF}function dt(t,e,n,r){Vn(t,ea)||bm("theClass is an invalid class definition.");var i=t[ea];JV(i,e)||bm("["+Yw(t)+"] not in hierarchy of ["+Yw(e)+"]");var o=null;Vn(i,bf)?o=i[bf]:(o=GV+Yw(t,"_")+"$"+Bw.n,Bw.n++,i[bf]=o);var s=dt[NF],a=!!s[mm];a&&r&&r[mm]!==void 0&&(a=!!r[mm]);var c=WV(e),u=zV(i,e,c,a);n(e,u);var l=!!Yp&&!!s[$w];l&&r&&(l=!!r[$w]),XV(i,o,e,c,l!==!1)}var gm,ym,ea,Sm,Dm,kw,bf,GV,Hw,Up,NF,bF,Gw,_m,CF,Uw,mm,$w,Ww,Yp,TF,wF,Bw,lr=ce(()=>{"use strict";Ge();ym="constructor",ea="prototype",Sm="function",Dm="_dynInstFuncs",kw="_isDynProxy",bf="_dynClass",GV="_dynCls$",Hw="_dynInstChk",Up=Hw,NF="_dfOpts",bF="_unknown_",Gw="__proto__",_m="_dyn"+Gw,CF="__dynProto$Gbl",Uw="_dynInstProto",mm="useBaseInst",$w="setInstFuncs",Ww=Object,Yp=Ww.getPrototypeOf,TF=Ww.getOwnPropertyNames,wF=kr(),Bw=wF[CF]||(wF[CF]={o:(gm={},gm[$w]=!0,gm[mm]=!0,gm),n:1e3});dt[NF]=Bw.o});var Xw,PF=ce(()=>{"use strict";Xw=100});var Dn,Jw,kp=ce(()=>{"use strict";Ge();Dn=aF,Jw=cF});var lo,QV,RF=ce(()=>{"use strict";kp();lo=Dn({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}),QV=Dn({Unknown:0,NonRetryableStatus:1,CleanStorage:2,MaxInStorageTimeExceeded:3})});var Si,Qw=ce(()=>{"use strict";kp();Si=Dn({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2})});var ti,nc,Ne,Nu,Pu,Cf,ta,fo,po,Ut,rc,st,Jo,Cm,na,ra,Qo,Tf,wf,ni,Zw,Tm,Ru,Hp,ic,fr,Nf,oc,Qn,wm,eN,sc,tN,ri,$p,Ou,Nm,Zo,Di,Pf,es,ho,ii,ac,xu,Ei,cc,Pm,Bp,Yi,Rm,go,nN,oi,Gp,Iu,rN,iN,Wp,uc,Au,_o,Om,oN,Rf,sN,xm,Mu,aN,Of,xf,lc,Im,At=ce(()=>{"use strict";ti="toLowerCase",nc="blkVal",Ne="length",Nu="rdOnly",Pu="notify",Cf="warnToConsole",ta="throwInternal",fo="setDf",po="watch",Ut="logger",rc="apply",st="push",Jo="splice",Cm="hdlr",na="cancel",ra="initialize",Qo="identifier",Tf="removeNotificationListener",wf="addNotificationListener",ni="isInitialized",Zw="instrumentationKey",Tm="INACTIVE",Ru="value",Hp="getNotifyMgr",ic="getPlugin",fr="name",Nf="iKey",oc="time",Qn="processNext",wm="getProcessTelContext",eN="pollInternalLogs",sc="enabled",tN="stopPollingInternalLogs",ri="unload",$p="onComplete",Ou="version",Nm="loggingLevelConsole",Zo="createNew",Di="teardown",Pf="messageId",es="message",ho="isAsync",ii="diagLog",ac="_doTeardown",xu="update",Ei="getNext",cc="setNextPlugin",Pm="protocol",Bp="userAgent",Yi="split",Rm="nodeType",go="replace",nN="logInternalMessage",oi="type",Gp="handler",Iu="status",rN="getResponseHeader",iN="getAllResponseHeaders",Wp="isChildEvt",uc="data",Au="getCtx",_o="setCtx",Om="complete",oN="itemsReceived",Rf="urlString",sN="sendPOST",xm="headers",Mu="timeout",aN="setRequestHeader",Of="traceId",xf="spanId",lc="traceFlags",Im="getAttribute"});function OF(t,e){cN||(cN=Mw("AggregationError",function(r,i){i[Ne]>1&&(r.errors=i[1])}));var n=t||"One or more errors occurred.";throw se(e,function(r,i){n+=`
`.concat(i," > ").concat(Ae(r))}),new cN(n,e||[])}var cN,xF=ce(()=>{"use strict";Ge();At()});function bi(t,e){return LF(t,function(n){return e?e({status:"fulfilled",rejected:!1,value:n}):n},function(n){return e?e({status:_N,rejected:!0,reason:n}):n})}function LF(t,e,n,r){var i=t;try{if(Yr(t))(e||n)&&(i=t.then(e,n));else try{e&&(i=e(t))}catch(o){if(n)i=n(o);else throw o}}finally{r&&ZV(i,r)}return i}function ZV(t,e){var n=t;return e&&(Yr(t)?t.finally?n=t.finally(e):n=t.then(function(r){return e(),r},function(r){throw e(),r}):e()),n}function e3(t,e,n,r){uN=uN||{toString:function(){return"[[PromiseState]]"}},lN=lN||{toString:function(){return"[[PromiseResult]]"}},fN=fN||{toString:function(){return"[[PromiseIsHandled]]"}};var i={};i[uN]={get:e},i[lN]={get:n},i[fN]={get:r},ww(t,i)}function t3(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}function n3(t,e,n,r){var i=Sn();!Am&&(Am=Jr(!!Ve(t3,[i]).v));var o=Am.v?i.createEvent("Event"):r?new Event(e):{};if(n&&n(o),Am.v&&o.initEvent(e,!1,!0),o&&t[AF])t[AF](o);else{var s=t["on"+e];if(s)s(o);else{var a=He("console");a&&(a.error||a.log)(e,Ae(o))}}}function MF(t){return Ye(t)?t.toString():Ae(t)}function qF(t,e,n){var r=Sf(arguments,3),i=0,o=!1,s,a=[],c=i3++,u=zp.length>0?zp[zp.length-1]:void 0,l=!1,d=null,f;function g(P,T){try{zp.push(c),l=!0,d&&d.cancel(),d=null;var N=t(function(M,q){a.push(function(){try{var k=i===2?P:T,W=ot(k)?s:Ye(k)?k(s):k;Yr(W)?W.then(M,q):k?M(W):i===3?q(W):M(W)}catch(ne){q(ne)}}),o&&b()},r);return N}finally{zp.pop()}}function h(P){return g(void 0,P)}function _(P){var T=P,N=P;return Ye(P)&&(T=function(M){return P&&P(),M},N=function(M){throw P&&P(),M}),g(T,N)}function S(){return FF[i]}function b(){if(a.length>0){var P=a.slice();a=[],l=!0,d&&d.cancel(),d=null,e(P)}}function v(P,T){return function(N){if(i===T){if(P===2&&Yr(N)){i=1,N.then(v(2,1),v(3,1));return}i=P,o=!0,s=N,b(),!l&&P===3&&!d&&(d=yi(E,o3))}}}function E(){if(!l)if(l=!0,dF())process.emit(jF,s,f);else{var P=Yn()||kr();!dN&&(dN=Jr(Ve(He,[Mm+"RejectionEvent"]).v)),n3(P,r3,function(T){return Et(T,"promise",{g:function(){return f}}),T.reason=s,T},!!dN.v)}}f={then:g,catch:h,finally:_},Xr(f,"state",{get:S}),IF&&e3(f,S,function(){return sm(s)},function(){return l}),pF()&&(f[Fp(11)]="IPromise");function x(){return"IPromise"+(IF?"["+c+(ot(u)?"":":"+u)+"]":"")+" "+S()+(o?" - "+MF(s):"")}return f.toString=x,(function(){Ye(n)||Ar(Mm+": executor is not a function - "+MF(n));var T=v(3,0);try{n.call(f,v(2,0),T)}catch(N){T(N)}})(),f}function s3(t){return function(e){var n=Sf(arguments,1);return t(function(r,i){try{var o=[],s=1;pm(e,function(a,c){a&&(s++,LF(a,function(u){o[c]=u,--s===0&&r(o)},i))}),s--,s===0&&r(o)}catch(a){i(a)}},n)}}function a3(t){return Jr(function(e){var n=Sf(arguments,1);return t(function(r,i){var o=[],s=1;function a(c,u){s++,bi(c,function(l){l.rejected?o[u]={status:_N,reason:l.reason}:o[u]={status:"fulfilled",value:l.value},--s===0&&r(o)})}try{Ie(e)?se(e,a):Iw(e)?pm(e,a):Ar("Input is not an iterable"),s--,s===0&&r(o)}catch(c){i(c)}},n)})}function UF(t){se(t,function(e){try{e()}catch{}})}function c3(t){var e=vr(t)?t:0;return function(n){yi(function(){UF(n)},e)}}function YF(t,e){return qF(YF,c3(e),t,e)}function u3(t,e){!pN&&(pN=Jr(Ve(He,[Mm]).v||null));var n=pN.v;if(!n)return YF(t);Ye(t)||Ar(Mm+": executor is not a function - "+Ae(t));var r=0;function i(){return FF[r]}var o=new n(function(s,a){function c(l){r=2,s(l)}function u(l){r=3,a(l)}t(c,u)});return Xr(o,"state",{get:i}),o}function Kp(t){return qF(Kp,UF,t)}function kF(t,e){return!hN&&(hN=a3(Kp)),hN.v(t,e)}function ki(t,e){return!gN&&(gN=Jr(u3)),gN.v.call(this,t,e)}var Mm,_N,uN,lN,fN,IF,FF,AF,Am,jF,r3,zp,i3,o3,dN,pN,hN,gN,HF,K9,Lu=ce(()=>{"use strict";Ge();Mm="Promise",_N="rejected";IF=!1;FF=["pending","resolving","resolved",_N],AF="dispatchEvent";jF="unhandledRejection",r3=jF.toLowerCase(),zp=[],i3=0,o3=10;HF=s3(ki),K9=Fp(11)});var Ci,We,fc,gn,Lm,Vp,ia,Fu,si,ju,If,dc,Af,ts,Fm,jm,qm,Mf,Um,Ym,$F,kn=ce(()=>{"use strict";Ci=void 0,We="",fc="channels",gn="core",Lm="createPerfMgr",Vp="disabled",ia="extensionConfig",Fu="extensions",si="processTelemetry",ju="priority",If="eventsSent",dc="eventsDiscarded",Af="eventsSendRequest",ts="perfEvent",Fm="offlineEventsStored",jm="offlineBatchSent",qm="offlineBatchDrop",Mf="getPerfMgr",Um="domain",Ym="path",$F="Not dynamic - "});function Hi(t){return!fe(t)}function qu(t){var e=t;return e&&Xe(e)&&(e=e[go](f3,function(n,r){return r.toUpperCase()}),e=e[go](d3,"_"),e=e[go](p3,function(n,r){return"_"+r})),e}function Rn(t,e){return t&&e?Qr(t,e)!==-1:!1}function Ti(t){return t&&t.toISOString()||""}function $t(t){return Du(t)?t[fr]:We}function $i(t,e,n,r,i){var o=n;return t&&(o=t[e],o!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,t[e]=o)),o}function Xp(t,e,n){var r;return t?(r=t[e],!r&&fe(r)&&(r=ot(n)?{}:n,t[e]=r)):r=ot(n)?{}:n,r}function GF(t,e){var n=null,r=null;return Ye(t)?n=t:r=t,function(){var i=arguments;if(n&&(r=n()),r)return r[e][rc](r,i)}}function mN(t,e,n){if(t&&e&&pn(t)&&pn(e)){var r=function(o){if(Xe(o)){var s=e[o];Ye(s)?(!n||n(o,!0,e,t))&&(t[o]=GF(e,o)):(!n||n(o,!1,e,t))&&(ji(t,o)&&delete t[o],Et(t,o,{g:function(){return e[o]},s:function(a){e[o]=a}}))}};for(var i in e)r(i)}return t}function oa(t,e,n,r,i){t&&e&&n&&(i!==!1||ot(t[e]))&&(t[e]=GF(n,r))}function wi(t,e,n,r){return t&&e&&pn(t)&&Ie(n)&&se(n,function(i){Xe(i)&&oa(t,i,e,i,r)}),t}function vN(t){return(function(){function e(){var n=this;t&&je(t,function(r,i){n[r]=i})}return e})()}function ai(t){return t&&mf&&(t=pf(mf({},t))),t}function km(t,e,n,r,i,o){var s=arguments,a=s[0]||{},c=s[Ne],u=!1,l=1;for(c>0&&Ko(a)&&(u=a,a=s[l]||{},l++),pn(a)||(a={});l<c;l++){var d=s[l],f=Ie(d),g=pn(d);for(var h in d){var _=f&&h in d||g&&ji(d,h);if(_){var S=d[h],b=void 0;if(u&&S&&((b=Ie(S))||Sr(S))){var v=a[h];b?Ie(v)||(v=[]):Sr(v)||(v={}),S=km(u,v,S)}S!==void 0&&(a[h]=S)}}}return a}function mo(t){try{return t.responseText}catch{}return null}function Uu(t,e){return t?"XDomainRequest,Response:"+mo(t)||"":e}function sa(t,e){return t?"XMLHttpRequest,Status:"+t[Iu]+",Response:"+mo(t)||t.response||"":e}function aa(t,e){return e&&(vr(e)?t=[e].concat(t):Ie(e)&&(t=e.concat(t))),t}function yN(t,e,n,r,i,o){r===void 0&&(r=!1),i===void 0&&(i=!1);function s(c,u,l){try{c[u]=l}catch{}}var a=new XMLHttpRequest;return r&&s(a,h3,r),n&&s(a,BF,n),a.open(t,e,!i),n&&s(a,BF,n),!i&&o&&s(a,g3,o),a}function Hm(t){var e={};if(Xe(t)){var n=Nt(t)[Yi](/[\r\n]+/);se(n,function(r){if(r){var i=r.indexOf(": ");if(i!==-1){var o=Nt(r.substring(0,i))[ti](),s=Nt(r.substring(i+1));e[o]=s}else e[Nt(r)]=1}})}return e}function Lf(t,e,n){if(!t[n]&&e&&e[rN]){var r=e[rN](n);r&&(t[n]=Nt(r))}return t}function ca(t,e){var n={};return t[iN]?n=Hm(t[iN]()):e&&(n=Lf(n,t,v3),n=Lf(n,t,_3),n=Lf(n,t,m3)),n}var l3,f3,d3,p3,tJ,h3,BF,g3,_3,m3,v3,ns=ce(()=>{"use strict";ei();Ge();At();kn();l3="getPrototypeOf",f3=/-([a-z])/g,d3=/([^\w\d_$])/g,p3=/^(\d+[\w\d_$])/,tJ=Object[l3];h3="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",BF="withCredentials",g3="timeout";_3="kill-duration",m3="kill-duration-seconds",v3="time-delta-millis"});function VF(t,e){var n=!1;if(t){try{if(n=e in t,!n){var r=t[oo];r&&(n=e in r)}}catch{}if(!n)try{var i=new t;n=!ot(i[e])}catch{}}return n}function TN(t){KF=t}function Yu(t){if(t&&KF){var e=He("__mockLocation");if(e)return e}return typeof location===Js&&location?location:He(S3)}function Jp(){return typeof console!==Wo?console:He(D3)}function rs(){return!!(typeof JSON===Js&&JSON||He(WF)!==null)}function Dr(){return rs()?JSON||He(WF):null}function Qp(){return He(E3)}function Zp(){return He(b3)}function pc(){var t=Jn();return t&&t.product?t.product===C3:!1}function hc(){var t=Jn();if(t&&(t[Bp]!==DN||SN===null)){DN=t[Bp];var e=(DN||We)[ti]();SN=Rn(e,bN)||Rn(e,CN)}return SN}function eh(t){if(t===void 0&&(t=null),!t){var e=Jn()||{};t=e?(e.userAgent||We)[ti]():We}var n=(t||We)[ti]();if(Rn(n,bN)){var r=Sn()||{};return Math.max(parseInt(n[Yi](bN)[1]),r[y3]||0)}else if(Rn(n,CN)){var i=parseInt(n[Yi](CN)[1]);if(i)return i+4}return null}function ci(t){return(EN===null||t===!1)&&(EN=Lp()&&!!Jn().sendBeacon),EN}function ua(t){var e=!1;try{e=!!He("fetch");var n=He("Request");e&&t&&n&&(e=VF(n,"keepalive"))}catch{}return e}function th(){return Ff===null&&(Ff=typeof XDomainRequest!==Wo,Ff&&jf()&&(Ff=Ff&&!VF(He(zF),"withCredentials"))),Ff}function jf(){var t=!1;try{var e=He(zF);t=!!e}catch{}return t}function XF(t,e){if(t)for(var n=0;n<t[Ne];n++){var r=t[n];if(r[fr]&&r[fr]===e)return r}return{}}function wN(t){var e=Sn();return e&&t?XF(e.querySelectorAll("meta"),t).content:null}function NN(t){var e,n=tc();if(n){var r=n.getEntriesByType("navigation")||[];e=XF((r[Ne]>0?r[0]:{}).serverTiming,t).description}return e}var y3,S3,D3,WF,E3,b3,C3,bN,CN,zF,SN,DN,KF,Ff,EN,gc=ce(()=>{"use strict";ei();Ge();At();ns();kn();y3="documentMode",S3="location",D3="console",WF="JSON",E3="crypto",b3="msCrypto",C3="ReactNative",bN="msie",CN="trident/",zF="XMLHttpRequest",SN=null,DN=null,KF=!1,Ff=null,EN=null});function T3(t){t<0&&(t>>>=0),nh=QF+t&_c,rh=ZF-t&_c,e1=!0}function w3(){try{var t=hn()&2147483647;T3((Math.random()*JF^t)+t)}catch{}}function ih(t){return t>0?Math.floor(la()/_c*(t+1))>>>0:0}function la(t){var e=0,n=Qp()||Zp();return n&&n.getRandomValues&&(e=n.getRandomValues(new Uint32Array(1))[0]&_c),e===0&&hc()&&(e1||w3(),e=t1()&_c),e===0&&(e=Math.floor(JF*Math.random()|0)),t||(e>>>=0),e}function t1(t){rh=36969*(rh&65535)+(rh>>16)&_c,nh=18e3*(nh&65535)+(nh>>16)&_c;var e=(rh<<16)+(nh&65535)>>>0&_c|0;return t||(e>>>=0),e}function oh(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=la()>>>0,r=0,i=We;i[Ne]<t;)r++,i+=e.charAt(n&63),n>>>=6,r===5&&(n=(la()<<2&4294967295|n&3)>>>0,r=0);return i}var JF,_c,QF,ZF,e1,nh,rh,$m=ce(()=>{"use strict";Ge();At();gc();kn();JF=4294967296,_c=4294967295,QF=123456789,ZF=987654321,e1=!1,nh=QF,rh=ZF});function r1(t){return t[Rm]===1||t[Rm]===9||!+t[Rm]}function R3(t,e){var n=e[t.id];if(!n){n={};try{r1(e)&&Et(e,t.id,{e:!1,v:n})}catch{}}return n}function Er(t,e){return e===void 0&&(e=!1),qu(t+P3+++(e?"."+n1:We)+N3)}function Bm(t){var e={id:Er("_aiData-"+(t||We)+"."+n1),accept:function(n){return r1(n)},get:function(n,r,i,o){var s=n[e.id];return s?s[qu(r)]:(o&&(s=R3(e,n),s[qu(r)]=i),i)},kill:function(n,r){if(n&&n[r])try{delete n[r]}catch{}}};return e}var n1,N3,P3,qf=ce(()=>{"use strict";Ge();At();ns();kn();$m();n1="3.3.4",N3="."+oh(6),P3=0});function Gm(t){return t&&pn(t)&&(t.isVal||t.fb||ji(t,"v")||ji(t,"mrg")||ji(t,"ref")||t.set)}function i1(t,e,n){var r,i=n.dfVal||eF;if(e&&n.fb){var o=n.fb;Ie(o)||(o=[o]);for(var s=0;s<o[Ne];s++){var a=o[s],c=e[a];if(i(c)?r=c:t&&(c=t.cfg[a],i(c)&&(r=c),t.set(t.cfg,Nn(a),c)),i(r))break}}return!i(r)&&i(n.v)&&(r=n.v),r}function PN(t,e,n){var r=n;if(n&&Gm(n)&&(r=i1(t,e,n)),r){Gm(r)&&(r=PN(t,e,r));var i;Ie(r)?(i=[],i[Ne]=r[Ne]):Sr(r)&&(i={}),i&&(je(r,function(o,s){s&&Gm(s)&&(s=PN(t,e,s)),i[o]=s}),r=i)}return r}function sh(t,e,n,r){var i,o,s,a=r,c,u,l,d;Gm(a)?(i=a.isVal,o=a.set,l=a[Nu],d=a[nc],c=a.mrg,u=a.ref,!u&&ot(u)&&(u=!!c),s=i1(t,e,a)):s=r,d&&t[nc](e,n);var f,g=!0,h=e[n];(h||!fe(h))&&(f=h,g=!1,i&&f!==s&&!i(f)&&(f=s,g=!0),o&&(f=o(f,s,e),g=f===s)),g?s?f=PN(t,e,s):f=s:(Sr(f)||Ie(s))&&c&&s&&(Sr(s)||Ie(s))&&je(s,function(_,S){sh(t,f,_,S)}),t.set(e,n,f),u&&t.ref(e,n),l&&t[Nu](e,n)}var RN=ce(()=>{"use strict";Ge();At()});function ON(t){if(t){var e;if(Ie(t)?(e=[],e[Ne]=t[Ne]):Sr(t)&&(e={}),e)return je(t,function(n,r){e[n]=ON(r)}),e}return t}function ah(t){if(t){var e=t[is]||t;if(e.cfg&&(e.cfg===t||e.cfg[is]===e))return e}return null}function ch(t){if(t&&(Sr(t)||Ie(t)))try{t[o1]=!0}catch{}return t}function xN(t){if(t)try{t[s1]=!0}catch{}return t}function Wm(t,e,n){var r=!1;return n&&!t[e.blkVal]&&(r=n[s1],!r&&!n[o1]&&(r=Sr(n)||Ie(n))),r}function zm(t){Ar("InvalidAccess:"+t)}var is,o1,s1,Km=ce(()=>{"use strict";Ge();At();is=dm("[[ai_dynCfg_1]]"),o1=dm("[[ai_blkDynCfg_1]]"),s1=dm("[[ai_frcDynCfg_1]]")});function x3(t,e,n){Ie(e)&&se(O3,function(r){var i=e[r];e[r]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=i[rc](this,o);return uh(t,e,n,"Patching"),a}})}function Vm(t,e){var n=gF(t,e);return n&&n.get}function I3(t,e,n,r){var i={n,h:[],trk:function(u){u&&u.fn&&(bt(i.h,u)===-1&&i.h[st](u),t.trk(u,i))},clr:function(u){var l=bt(i.h,u);l!==-1&&i.h[Jo](l,1)}},o=!0,s=!1;function a(){o&&(s=s||Wm(a,t,r),r&&!r[is]&&s&&(r=uh(t,r,n,"Converting")),o=!1);var u=t.act;return u&&i.trk(u),r}a[t.prop]={chng:function(){t.add(i)}};function c(u){if(r!==u){a[t.ro]&&!t.upd&&zm("["+n+"] is read-only:"+Ae(e)),o&&(s=s||Wm(a,t,r),o=!1);var l=s&&a[t.rf];if(s)if(l){je(r,function(f){r[f]=u?u[f]:Ci});try{je(u,function(f,g){lh(t,r,f,g)}),u=r}catch(f){Uf((t.hdlr||{})[Ut],n,"Assigning",f),s=!1}}else r&&r[is]&&je(r,function(f){var g=Vm(r,f);if(g){var h=g[t.prop];h&&h.chng()}});if(u!==r){var d=u&&Wm(a,t,u);!l&&d&&(u=uh(t,u,n,"Converting")),r=u,s=d}t.add(i)}}Et(e,i.n,{g:a,s:c})}function lh(t,e,n,r){if(e){var i=Vm(e,n),o=i&&!!i[t.prop];o?e[n]=r:I3(t,e,n,r)}return e}function Xm(t,e,n,r){if(e){var i=Vm(e,n),o=i&&!!i[t.prop],s=r&&r[0],a=r&&r[1],c=r&&r[2];if(!o){if(c)try{ch(e)}catch(u){Uf((t.hdlr||{})[Ut],n,"Blocking",u)}try{lh(t,e,n,e[n]),i=Vm(e,n)}catch(u){Uf((t.hdlr||{})[Ut],n,"State",u)}}s&&(i[t.rf]=s),a&&(i[t.ro]=a),c&&(i[t.blkVal]=!0)}return e}function uh(t,e,n,r){try{je(e,function(i,o){lh(t,e,i,o)}),e[is]||(Xr(e,is,{get:function(){return t[Cm]}}),x3(t,e,n))}catch(i){Uf((t.hdlr||{})[Ut],n,r,i)}return e}var O3,Uf,a1=ce(()=>{"use strict";Ge();kn();At();Km();O3=["push","pop","shift","unshift","splice"],Uf=function(t,e,n,r){t&&t[ta](3,108,"".concat(n," [").concat(e,"] failed - ")+Ae(r))}});function c1(t){var e,n=yf(fh+"get"+t.uid+dh),r=yf(fh+"ro"+t.uid+dh),i=yf(fh+"rf"+t.uid+dh),o=yf(fh+"blkVal"+t.uid+dh),s=yf(fh+"dtl"+t.uid+dh),a=null,c=null,u;function l(h,_){var S=u.act;try{u.act=h,h&&h[s]&&(se(h[s],function(v){v.clr(h)}),h[s]=[]),_({cfg:t.cfg,set:t.set.bind(t),setDf:t[fo].bind(t),ref:t.ref.bind(t),rdOnly:t[Nu].bind(t)})}catch(v){var b=t[Ut];throw b&&b[ta](1,107,Ae(v)),v}finally{u.act=S||null}}function d(){if(a){var h=a;a=null,c&&c[na](),c=null;var _=[];if(se(h,function(S){if(S&&(S[s]&&(se(S[s],function(b){b.clr(S)}),S[s]=null),S.fn))try{l(S,S.fn)}catch(b){_[st](b)}}),a)try{d()}catch(S){_[st](S)}_[Ne]>0&&OF("Watcher error(s): ",_)}}function f(h){if(h&&h.h[Ne]>0){a||(a=[]),c||(c=yi(function(){c=null,d()},0));for(var _=0;_<h.h[Ne];_++){var S=h.h[_];S&&bt(a,S)===-1&&a[st](S)}}}function g(h,_){if(h){var S=h[s]=h[s]||[];bt(S,_)===-1&&S[st](_)}}return u=(e={prop:n,ro:r,rf:i},e[nc]=o,e[Cm]=t,e.add=f,e[Pu]=d,e.use=l,e.trk=g,e),u}var fh,dh,u1=ce(()=>{"use strict";Ge();xF();At();fh="[[ai_",dh="]]"});function A3(t,e){var n={fn:e,rm:function(){n.fn=null,t=null,e=null}};return Et(n,"toJSON",{v:function(){return"WatcherHandler"+(n.fn?"":"[X]")}}),t.use(n,e),n}function M3(t,e,n){var r,i=ah(e);if(i)return i;var o=Er("dyncfg",!0),s=e&&n!==!1?e:ON(e),a;function c(){a[Pu]()}function u(b,v,E){try{b=lh(a,b,v,E)}catch(x){Uf(t,v,"Setting value",x)}return b[v]}function l(b){return A3(a,b)}function d(b,v){a.use(null,function(E){var x=a.upd;try{ot(v)||(a.upd=v),b(E)}finally{a.upd=x}})}function f(b,v){var E;return Xm(a,b,v,(E={},E[0]=!0,E))[v]}function g(b,v){var E;return Xm(a,b,v,(E={},E[1]=!0,E))[v]}function h(b,v){var E;return Xm(a,b,v,(E={},E[2]=!0,E))[v]}function _(b,v){return v&&je(v,function(E,x){sh(S,b,E,x)}),b}var S=(r={uid:null,cfg:s},r[Ut]=t,r[Pu]=c,r.set=u,r[fo]=_,r[po]=l,r.ref=f,r[Nu]=g,r[nc]=h,r._block=d,r);return Et(S,"uid",{c:!1,e:!1,w:!1,v:o}),a=c1(S),uh(a,s,"config","Creating"),S}function L3(t,e){t?(t[Cf](e),t[ta](2,108,e)):zm(e)}function en(t,e,n,r){var i=M3(n,t||{},r);return e&&i[fo](i.cfg,e),i}function Hn(t,e,n){var r=t[is]||t;return r.cfg&&(r.cfg===t||r.cfg[is]===r)?r[po](e):(L3(n,$F+Ae(t)),en(t,null,n)[po](e))}var mc=ce(()=>{"use strict";Ge();qf();kn();At();RN();a1();u1();Km()});function fa(t,e){if(t&&t[ri])return t[ri](e)}function Jm(t,e,n){var r;return n||(r=ki(function(i){n=i})),t&&Df(t)>0?bi(fa(t[0],e),function(){Jm(Sf(t,1),e,n)}):n(),r}var IN=ce(()=>{"use strict";Lu();Ge();At()});var l1,AN,MN=ce(()=>{"use strict";l1=500,AN="Microsoft_ApplicationInsights_BypassAjaxInstrumentation"});function F3(t,e,n){return!t&&fe(t)?e:Ko(t)?t:Nn(t)[ti]()==="true"}function LN(t){return{mrg:!0,v:t}}function Yf(t,e,n){return{fb:n,isVal:t,v:e}}function Bi(t,e){return{fb:e,set:F3,v:!!t}}var FN=ce(()=>{"use strict";Ge();At()});function j3(t,e){return function(){var n=arguments,r=qN(e);if(r){var i=r.listener;i&&i[t]&&i[t][rc](i,n)}}}function q3(){var t=He("Microsoft");return t&&(Zm=t.ApplicationInsights),Zm}function qN(t){var e=Zm;return!e&&t.disableDbgExt!==!0&&(e=Zm||q3()),e?e.ChromeDbgExt:null}function f1(t){if(!Qm){Qm={};for(var e=0;e<jN[Ne];e++)Qm[jN[e]]=j3(jN[e],t)}return Qm}var jN,Zm,Qm,UN=ce(()=>{"use strict";Ge();At();kn();jN=[If,dc,Af,ts],Zm=null});function d1(t){return t?'"'+t[go](/\"/g,We)+'"':We}function YN(t,e){var n=Jp();if(n){var r="log";n[t]&&(r=t),Ye(n[r])&&n[r](e)}}function vo(t,e){return(t||{})[Ut]||new vc(e)}function kN(t){return t||new vc}function pe(t,e,n,r,i,o){o===void 0&&(o=!1),kN(t)[ta](e,n,r,i,o)}function Hr(t,e){kN(t)[Cf](e)}function HN(t,e,n){kN(t)[nN](e,n)}var kf,p1,U3,Y3,k3,H3,$3,ku,vc,yo=ce(()=>{"use strict";lr();Ge();mc();At();UN();gc();kn();p1="warnToConsole",U3="AI (Internal): ",Y3="AI: ",k3="AITR_",H3={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},$3=(kf={},kf[0]=null,kf[1]="errorToConsole",kf[2]=p1,kf[3]="debugToConsole",kf);ku=(function(){function t(e,n,r,i){r===void 0&&(r=!1);var o=this;o[Pf]=e,o[es]=(r?Y3:U3)+e;var s=We;rs()&&(s=Dr().stringify(i));var a=(n?" message:"+d1(n):We)+(i?" props:"+d1(s):We);o[es]+=a}return t.dataType="MessageData",t})();vc=(function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={},i,o,s,a,c;dt(t,this,function(u){c=d(e||{}),u.consoleLoggingLevel=function(){return i},u[ta]=function(h,_,S,b,v){v===void 0&&(v=!1);var E=new ku(_,S,v,b);if(a)throw Ae(E);var x=$3[h]||p1;if(ot(E[es]))g("throw"+(h===1?"Critical":"Warning"),E);else{if(v){var P=+E[Pf];!r[P]&&i>=h&&(u[x](E[es]),r[P]=!0)}else i>=h&&u[x](E[es]);l(h,E)}},u.debugToConsole=function(h){YN("debug",h),g("warning",h)},u[Cf]=function(h){YN("warn",h),g("warning",h)},u.errorToConsole=function(h){YN("error",h),g("error",h)},u.resetInternalMessageCount=function(){n=0,r={}},u[nN]=l,u[ri]=function(h){c&&c.rm(),c=null};function l(h,_){if(!f()){var S=!0,b=k3+_[Pf];if(r[b]?S=!1:r[b]=!0,S&&(h<=o&&(u.queue[st](_),n++,g(h===1?"error":"warn",_)),n===s)){var v="Internal events throttle limit per PageView reached for this app.",E=new ku(23,v,!1);u.queue[st](E),h===1?u.errorToConsole(v):u[Cf](v)}}}function d(h){return Hn(en(h,H3,u).cfg,function(_){var S=_.cfg;i=S[Nm],o=S.loggingLevelTelemetry,s=S.maxMessageLimit,a=S.enableDebug})}function f(){return n>=s}function g(h,_){var S=qN(e||{});S&&S[ii]&&S[ii](h,_)}})}return t.__ieDyn=1,t})()});function KN(){!os&&(os=Rw(function(){return Sn()}))}function G3(t,e){var n=da[yc]||nv[yc];return n||(n=da[yc]=da(t,e),nv[yc]=n),n}function tv(t){return t?t.isEnabled():!0}function b1(t,e){return e&&t&&Ie(t.ignoreCookies)?bt(t.ignoreCookies,e)!==-1:!1}function W3(t,e){return e&&t&&Ie(t.blockedCookies)&&bt(t.blockedCookies,e)!==-1?!0:b1(t,e)}function y1(t,e){var n=e[sc];if(fe(n)){var r=void 0;ot(t[_1])||(r=!t[_1]),ot(t[WN])||(r=!t[WN]),n=r}return n}function VN(t,e){var n;if(t)n=t.getCookieMgr();else if(e){var r=e.cookieCfg;r&&r[yc]?n=r[yc]:n=da(e)}return n||(n=G3(e,(t||{})[Ut])),n}function da(t,e){var n,r,i,o,s,a,c,u,l;t=en(t||nv,null,e).cfg,s=Hn(t,function(f){f[fo](f.cfg,B3),r=f.ref(f.cfg,"cookieCfg"),i=r[Ym]||"/",o=r[Um],a=y1(t,r)!==!1,c=r.getCookie||z3,u=r.setCookie||E1,l=r.delCookie||E1},e);var d=(n={isEnabled:function(){var f=y1(t,r)!==!1&&a&&Hf(e),g=nv[yc];return f&&g&&d!==g&&(f=tv(g)),f},setEnabled:function(f){a=f!==!1,r[sc]=f},set:function(f,g,h,_,S){var b=!1;if(tv(d)&&!W3(r,f)){var v={},E=Nt(g||We),x=Qr(E,";");if(x!==-1&&(E=Nt(bu(g,x)),v=C1(Xn(g,x+1))),$i(v,Um,_||o,ao,ot),!fe(h)){var P=hc();if(ot(v[BN])){var T=hn(),N=T+h*1e3;if(N>0){var M=new Date;M.setTime(N),$i(v,BN,S1(M,P?h1:g1)||S1(M,P?h1:g1)||We,ao)}}P||$i(v,"max-age",We+h,null,ot)}var q=Yu();q&&q[Pm]==="https:"&&($i(v,"secure",null,null,ot),GN===null&&(GN=!rv((Jn()||{})[Bp])),GN&&$i(v,"SameSite","None",null,ot)),$i(v,Ym,S||i,null,ot),u(f,D1(E,v)),b=!0}return b},get:function(f){var g=We;return tv(d)&&!b1(r,f)&&(g=c(f)),g},del:function(f,g){var h=!1;return tv(d)&&(h=d.purge(f,g)),h},purge:function(f,g){var h,_=!1;if(Hf(e)){var S=(h={},h[Ym]=g||"/",h[BN]="Thu, 01 Jan 1970 00:00:01 GMT",h);hc()||(S["max-age"]="0"),l(f,D1(We,S)),_=!0}return _}},n[ri]=function(f){s&&s.rm(),s=null},n);return d[yc]=d,d}function Hf(t){if(ev===null){ev=!1,!os&&KN();try{var e=os.v||{};ev=e[zN]!==void 0}catch(n){pe(t,2,68,"Cannot access document.cookie - "+$t(n),{exception:Ae(n)})}}return ev}function C1(t){var e={};if(t&&t[Ne]){var n=Nt(t)[Yi](";");se(n,function(r){if(r=Nt(r||We),r){var i=Qr(r,"=");i===-1?e[r]=null:e[Nt(bu(r,i))]=Nt(Xn(r,i+1))}})}return e}function S1(t,e){return Ye(t[e])?t[e]():null}function D1(t,e){var n=t||We;return je(e,function(r,i){n+="; "+r+(fe(i)?We:"="+i)}),n}function z3(t){var e=We;if(!os&&KN(),os.v){var n=os.v[zN]||We;m1!==n&&(v1=C1(n),m1=n),e=Nt(v1[t]||We)}return e}function E1(t,e){!os&&KN(),os.v&&(os.v[zN]=t+"="+e)}function rv(t){return Xe(t)?!!(Rn(t,"CPU iPhone OS 12")||Rn(t,"iPad; CPU OS 12")||Rn(t,"Macintosh; Intel Mac OS X 10_14")&&Rn(t,"Version/")&&Rn(t,"Safari")||Rn(t,"Macintosh; Intel Mac OS X 10_14")&&Tu(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Rn(t,"Chrome/5")||Rn(t,"Chrome/6")||Rn(t,"UnrealEngine")&&!Rn(t,"Chrome")||Rn(t,"UCBrowser/12")||Rn(t,"UCBrowser/11")):!1}var $N,Hu,h1,g1,zN,BN,_1,WN,yc,ev,GN,m1,os,v1,nv,B3,XN=ce(()=>{"use strict";Ge();FN();mc();At();yo();gc();ns();kn();h1="toGMTString",g1="toUTCString",zN="cookie",BN="expires",_1="isCookieUseDisabled",WN="disableCookiesUsage",yc="_ckMgr",ev=null,GN=null,m1=null,v1={},nv={},B3=($N={cookieCfg:LN((Hu={},Hu[Um]={fb:"cookieDomain",dfVal:Hi},Hu.path={fb:"cookiePath",dfVal:Hi},Hu.enabled=Ci,Hu.ignoreCookies=Ci,Hu.blockedCookies=Ci,Hu)),cookieDomain:Ci,cookiePath:Ci},$N[WN]=Ci,$N)});function V3(t){t.h=null;var e=t.cb;t.cb=[],se(e,function(n){Ve(n.fn,[n.arg])})}function Sc(t,e,n,r){se(t,function(i){i&&i[e]&&(n?(n.cb[st]({fn:r,arg:i}),n.h=n.h||yi(V3,0,n)):Ve(r,[i]))})}var K3,ph,JN=ce(()=>{"use strict";lr();Lu();Ge();mc();At();kn();K3={perfEvtsSendAll:!1};ph=(function(){function t(e){this.listeners=[];var n,r,i=[],o={h:null,cb:[]},s=en(e,K3);r=s[po](function(a){n=!!a.cfg.perfEvtsSendAll}),dt(t,this,function(a){Et(a,"listeners",{g:function(){return i}}),a[wf]=function(c){i[st](c)},a[Tf]=function(c){for(var u=bt(i,c);u>-1;)i[Jo](u,1),u=bt(i,c)},a[If]=function(c){Sc(i,If,o,function(u){u[If](c)})},a[dc]=function(c,u){Sc(i,dc,o,function(l){l[dc](c,u)})},a[Af]=function(c,u){Sc(i,Af,u?o:null,function(l){l[Af](c,u)})},a[ts]=function(c){c&&(n||!c[Wp]())&&Sc(i,ts,null,function(u){c[ho]?yi(function(){return u[ts](c)},0):u[ts](c)})},a[Fm]=function(c){c&&c[Ne]&&Sc(i,Fm,o,function(u){u[Fm](c)})},a[jm]=function(c){c&&c[uc]&&Sc(i,jm,o,function(u){u[jm](c)})},a[qm]=function(c,u){if(c>0){var l=u||0;Sc(i,qm,o,function(d){d[qm](c,l)})}},a[ri]=function(c){var u=function(){r&&r.rm(),r=null,i=[],o.h&&o.h[na](),o.h=null,o.cb=[]},l;if(Sc(i,"unload",null,function(d){var f=d[ri](c);f&&(l||(l=[]),l[st](f))}),l)return ki(function(d){return bi(HF(l),function(){u(),d()})});u()}})}return t.__ieDyn=1,t})()});function En(t,e,n,r,i){if(t){var o=t;if(o[Mf]&&(o=o[Mf]()),o){var s=void 0,a=o[Au](QN);try{if(s=o.create(e(),r,i),s){if(a&&s[_o]&&(s[_o]($u[ZN],a),a[Au]&&a[_o])){var c=a[Au]($u[hh]);c||(c=[],a[_o]($u[hh],c)),c[st](s)}return o[_o](QN,s),n(s)}}catch(u){s&&s[_o]&&s[_o]("exception",u)}finally{s&&o.fire(s),o[_o](QN,a)}}}return n()}function eP(){return X3}var $f,ZN,hh,X3,$u,gh,QN,iv=ce(()=>{"use strict";lr();Ge();At();kn();$f="ctx",ZN="ParentContextKey",hh="ChildrenContextKey",X3=null,$u=(function(){function t(e,n,r){var i=this;if(i.start=hn(),i[fr]=e,i[ho]=r,i[Wp]=function(){return!1},Ye(n)){var o;Et(i,"payload",{g:function(){return!o&&Ye(n)&&(o=n(),n=null),o}})}i[Au]=function(s){return s?s===t[ZN]||s===t[hh]?i[s]:(i[$f]||{})[s]:null},i[_o]=function(s,a){if(s)if(s===t[ZN])i[s]||(i[Wp]=function(){return!0}),i[s]=a;else if(s===t[hh])i[s]=a;else{var c=i[$f]=i[$f]||{};c[s]=a}},i[Om]=function(){var s=0,a=i[Au](t[hh]);if(Ie(a))for(var c=0;c<a[Ne];c++){var u=a[c];u&&(s+=u[oc])}i[oc]=hn()-i.start,i.exTime=i[oc]-s,i[Om]=function(){}}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t})(),gh=(function(){function t(e){this.ctx={},dt(t,this,function(n){n.create=function(r,i,o){return new $u(r,i,o)},n.fire=function(r){r&&(r[Om](),e&&Ye(e[ts])&&e[ts](r))},n[_o]=function(r,i){if(r){var o=n[$f]=n[$f]||{};o[r]=i}},n[Au]=function(r){return(n[$f]||{})[r]}})}return t.__ieDyn=1,t})(),QN="CoreUtils.doPerf"});function _h(){var t=Bu();return Xn(t,0,8)+"-"+Xn(t,8,12)+"-"+Xn(t,12,16)+"-"+Xn(t,16,20)+"-"+Xn(t,20)}function Bu(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=We,n,r=0;r<4;r++)n=la(),e+=t[n&15]+t[n>>4&15]+t[n>>8&15]+t[n>>12&15]+t[n>>16&15]+t[n>>20&15]+t[n>>24&15]+t[n>>28&15];var i=t[8+(la()&3)|0];return Xo(e,0,8)+Xo(e,9,4)+"4"+Xo(e,13,3)+i+Xo(e,16,3)+Xo(e,19,12)}var tP=ce(()=>{"use strict";Ge();kn();$m()});function pa(t,e,n){return t&&t[Ne]===e&&t!==n?!!t.match(/^[\da-f]*$/i):!1}function w1(t,e,n){return pa(t,e)?t:n}function N1(t){(isNaN(t)||t<0||t>255)&&(t=1);for(var e=t.toString(16);e[Ne]<2;)e="0"+e;return e}function mh(t,e,n,r){var i;return i={},i[Ou]=pa(r,2,rP)?r:nP,i[Of]=ss(t)?t:Bu(),i[xf]=as(e)?e:bu(Bu(),16),i.traceFlags=n>=0&&n<=255?n:1,i}function Gu(t,e){var n;if(!t||(Ie(t)&&(t=t[0]||""),!t||!Xe(t)||t[Ne]>8192))return null;if(t.indexOf(",")!==-1){var r=t[Yi](",");t=r[e>0&&r[Ne]>e?e:0]}var i=J3.exec(Nt(t));return!i||i[1]===rP||i[2]===ov||i[3]===sv?null:(n={version:(i[1]||We)[ti](),traceId:(i[2]||We)[ti](),spanId:(i[3]||We)[ti]()},n[lc]=parseInt(i[4],16),n)}function ss(t){return pa(t,32,ov)}function as(t){return pa(t,16,sv)}function Bf(t){return!(!t||!pa(t[Ou],2,rP)||!pa(t[Of],32,ov)||!pa(t[xf],16,sv)||!pa(N1(t[lc]),2))}function vh(t){return Bf(t)?(t[lc]&T1)===T1:!1}function yh(t){if(t){var e=N1(t[lc]);pa(e,2)||(e="01");var n=t[Ou]||nP;return n!=="00"&&n!=="ff"&&(n=nP),"".concat(n.toLowerCase(),"-").concat(w1(t.traceId,32,ov).toLowerCase(),"-").concat(w1(t.spanId,16,sv).toLowerCase(),"-").concat(e.toLowerCase())}return""}function Sh(t){var e="traceparent",n=Gu(wN(e),t);return n||(n=Gu(NN(e),t)),n}function iP(t){var e=t.getElementsByTagName("script"),n=[];return se(e,function(r){var i=r[Im]("src");if(i){var o=r[Im]("crossorigin"),s=r.hasAttribute("async")===!0,a=r.hasAttribute("defer")===!0,c=r[Im]("referrerpolicy"),u={url:i};o&&(u.crossOrigin=o),s&&(u.async=s),a&&(u.defer=a),c&&(u.referrerPolicy=c),n[st](u)}}),n}var J3,nP,rP,ov,sv,T1,oP=ce(()=>{"use strict";Ge();At();tP();gc();kn();J3=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,nP="00",rP="ff",ov="00000000000000000000000000000000",sv="0000000000000000",T1=1});function ha(t){return Q3.get(t,"state",{},!0)}function sP(t,e){for(var n=[],r=null,i=t[Ei](),o;i;){var s=i[ic]();if(s){r&&r[cc]&&s[si]&&r[cc](s),o=ha(s);var a=!!o[ni];s[ni]&&(a=s[ni]()),a||n[st](s),r=s,i=i[Ei]()}}se(n,function(c){var u=t[gn]();c[ra](t.getCfg(),u,e,t[Ei]()),o=ha(c),!c[gn]&&!o[gn]&&(o[gn]=u),o[ni]=!0,delete o[Di]})}function av(t){return t.sort(function(e,n){var r=0;if(n){var i=n[si];e[si]?r=i?e[ju]-n[ju]:1:i&&(r=-1)}else r=e?1:-1;return r})}function P1(t){var e={};return{getName:function(){return e[fr]},setName:function(n){t&&t.setName(n),e[fr]=n},getTraceId:function(){return e[Of]},setTraceId:function(n){t&&t.setTraceId(n),ss(n)&&(e[Of]=n)},getSpanId:function(){return e[xf]},setSpanId:function(n){t&&t.setSpanId(n),as(n)&&(e[xf]=n)},getTraceFlags:function(){return e[lc]},setTraceFlags:function(n){t&&t.setTraceFlags(n),e[lc]=n}}}var Q3,aP=ce(()=>{"use strict";Ge();At();qf();kn();oP();Q3=Bm("plugin")});function e4(t,e,n){for(;t;){if(t[ic]()===n)return t;t=t[Ei]()}return Dc([n],e.config||{},e)}function cP(t,e,n,r){var i=null,o=[];e||(e=en({},null,n[Ut])),r!==null&&(i=r?e4(t,n,r):t);var s={_next:c,ctx:{core:function(){return n},diagLog:function(){return vo(n,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:l,getConfig:d,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(g){i=g},iterate:f,onComplete:a}};function a(g,h){for(var _=[],S=2;S<arguments.length;S++)_[S-2]=arguments[S];g&&o[st]({func:g,self:ot(h)?s.ctx:h,args:_})}function c(){var g=i;if(i=g?g[Ei]():null,!g){var h=o;h&&h[Ne]>0&&(se(h,function(_){try{_.func.call(_.self,_.args)}catch(S){pe(n[Ut],2,73,"Unexpected Exception during onComplete - "+Ae(S))}}),o=[])}return g}function u(g,h){var _=null,S=e.cfg;if(S&&g){var b=S[ia];!b&&h&&(b={}),S[ia]=b,b=e.ref(S,ia),b&&(_=b[g],!_&&h&&(_={}),b[g]=_,_=e.ref(b,g))}return _}function l(g,h){var _=u(g,!0);return h&&je(h,function(S,b){if(fe(_[S])){var v=e.cfg[S];(v||!fe(v))&&(_[S]=v)}sh(e,_,S,b)}),e[fo](_,h)}function d(g,h,_){_===void 0&&(_=!1);var S,b=u(g,!1),v=e.cfg;return b&&(b[h]||!fe(b[h]))?S=b[h]:(v[h]||!fe(v[h]))&&(S=v[h]),S||!fe(S)?S:_}function f(g){for(var h;h=s._next();){var _=h[ic]();_&&g(_)}}return s}function $r(t,e,n,r){var i=en(e),o=cP(t,i,n,r),s=o.ctx;function a(u){var l=o._next();return l&&l[si](u,s),!l}function c(u,l){return u===void 0&&(u=null),Ie(u)&&(u=Dc(u,i.cfg,n,l)),$r(u||s[Ei](),i.cfg,n,l)}return s[Qn]=a,s[Zo]=c,s}function Gf(t,e,n){var r=en(e.config),i=cP(t,r,e,n),o=i.ctx;function s(c){var u=i._next();return u&&u[ri](o,c),!u}function a(c,u){return c===void 0&&(c=null),Ie(c)&&(c=Dc(c,r.cfg,e,u)),Gf(c||o[Ei](),e,u)}return o[Qn]=s,o[Zo]=a,o}function Dh(t,e,n){var r=en(e.config),i=cP(t,r,e,n),o=i.ctx;function s(c){return o.iterate(function(u){Ye(u[xu])&&u[xu](o,c)})}function a(c,u){return c===void 0&&(c=null),Ie(c)&&(c=Dc(c,r.cfg,e,u)),Dh(c||o[Ei](),e,u)}return o[Qn]=s,o[Zo]=a,o}function Dc(t,e,n,r){var i=null,o=!r;if(Ie(t)&&t[Ne]>0){var s=null;se(t,function(a){if(!o&&r===a&&(o=!0),o&&a&&Ye(a[si])){var c=t4(a,e,n);i||(i=c),s&&s._setNext(c),s=c}})}return r&&!i?Dc([r],e,n):i}function t4(t,e,n){var r=null,i=Ye(t[si]),o=Ye(t[cc]),s;t?s=t[Qo]+"-"+t[ju]+"-"+x1++:s="Unknown-0-"+x1++;var a={getPlugin:function(){return t},getNext:function(){return r},processTelemetry:l,unload:d,update:f,_id:s,_setNext:function(g){r=g}};function c(){var g;return t&&Ye(t[O1])&&(g=t[O1]()),g||(g=$r(a,e,n)),g}function u(g,h,_,S,b){var v=!1,E=t?t[Qo]:Z3,x=g[R1];return x||(x=g[R1]={}),g.setNext(r),t&&En(g[gn](),function(){return E+":"+_},function(){x[s]=!0;try{var P=r?r._id:We;P&&(x[P]=!1),v=h(g)}catch(N){var T=r?x[r._id]:!0;T&&(v=!0),(!r||!T)&&pe(g[ii](),1,73,"Plugin ["+E+"] failed during "+_+" - "+Ae(N)+", run flags: "+Ae(x))}},S,b),v}function l(g,h){h=h||c();function _(S){if(!t||!i)return!1;var b=ha(t);return b[Di]||b[Vp]?!1:(o&&t[cc](r),t[si](g,S),!0)}u(h,_,"processTelemetry",function(){return{item:g}},!g.sync)||h[Qn](g)}function d(g,h){function _(){var S=!1;if(t){var b=ha(t),v=t[gn]||b[gn];t&&(!v||v===g.core())&&!b[Di]&&(b[gn]=null,b[Di]=!0,b[ni]=!1,t[Di]&&t[Di](g,h)===!0&&(S=!0))}return S}u(g,_,"unload",function(){},h[ho])||g[Qn](h)}function f(g,h){function _(){var S=!1;if(t){var b=ha(t),v=t[gn]||b[gn];t&&(!v||v===g.core())&&!b[Di]&&t[xu]&&t[xu](g,h)===!0&&(S=!0)}return S}u(g,_,"update",function(){},!1)||g[Qn](h)}return qi(a)}var Z3,R1,O1,x1,uP,cv=ce(()=>{"use strict";Ge();RN();mc();At();yo();ns();kn();iv();aP();Z3="TelemetryPluginChain",R1="_hasRun",O1="_getTelCtx",x1=0;uP=(function(){function t(e,n,r,i){var o=this,s=$r(e,n,r,i);wi(o,s,yr(s))}return t})()});function Wu(){var t=[];function e(r){r&&t[st](r)}function n(r,i){se(t,function(o){try{o(r,i)}catch(s){pe(r[ii](),2,73,"Unexpected error calling unload handler - "+Ae(s))}}),t=[]}return{add:e,run:n}}var uv=ce(()=>{"use strict";Ge();At();yo()});function lP(t,e){Eh=t,bh=e}function Ch(){var t=[];function e(r){var i=t;t=[],se(i,function(o){try{(o.rm||o.remove).call(o)}catch(s){pe(r,2,73,"Unloading:"+Ae(s))}}),Eh&&i[Ne]>Eh&&(bh?bh("doUnload",i):pe(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}function n(r){r&&(uo(t,r),Eh&&t[Ne]>Eh&&(bh?bh("Add",t):pe(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return{run:e,add:n}}var Eh,bh,lv=ce(()=>{"use strict";Ge();At();yo()});var fP,Ec,n4,ga,dP=ce(()=>{"use strict";lr();Ge();mc();At();yo();ns();kn();cv();uv();lv();Ec="getPlugin",n4=(fP={},fP[ia]={isVal:Hi,v:{}},fP),ga=(function(){function t(){var e=this,n,r,i,o,s;u(),dt(t,e,function(l){l[ra]=function(d,f,g,h){c(d,f,h),n=!0},l[Di]=function(d,f){var g,h=l[gn];if(!h||d&&h!==d[gn]())return;var _,S=!1,b=d||Gf(null,h,i&&i[Ec]?i[Ec]():i),v=f||(g={reason:0},g[ho]=!1,g);function E(){S||(S=!0,o.run(b,f),s.run(b[ii]()),_===!0&&b[Qn](v),u())}return!l[ac]||l[ac](b,v,E)!==!0?E():_=!0,_},l[xu]=function(d,f){var g=l[gn];if(!g||d&&g!==d[gn]())return;var h,_=!1,S=d||Dh(null,g,i&&i[Ec]?i[Ec]():i),b=f||{reason:0};function v(){_||(_=!0,c(S.getCfg(),S.core(),S[Ei]()))}return!l._doUpdate||l._doUpdate(S,b,v)!==!0?v():h=!0,h},oa(l,"_addUnloadCb",function(){return o},"add"),oa(l,"_addHook",function(){return s},"add"),Et(l,"_unloadHooks",{g:function(){return s}})}),e[ii]=function(l){return a(l)[ii]()},e[ni]=function(){return n},e.setInitialized=function(l){n=l},e[cc]=function(l){i=l},e[Qn]=function(l,d){d?d[Qn](l):i&&Ye(i[si])&&i[si](l,null)},e._getTelCtx=a;function a(l){l===void 0&&(l=null);var d=l;if(!d){var f=r||$r(null,{},e[gn]);i&&i[Ec]?d=f[Zo](null,i[Ec]):d=f[Zo](null,i)}return d}function c(l,d,f){en(l,n4,vo(d)),!f&&d&&(f=d[wm]()[Ei]());var g=i;i&&i[Ec]&&(g=i[Ec]()),e[gn]=d,r=$r(f,l,d,g)}function u(){n=!1,e[gn]=null,r=null,i=null,s=Ch(),o=Wu()}}return t.__ieDyn=1,t})()});function r4(t,e,n){var r={id:e,fn:n};uo(t,r);var i={remove:function(){se(t,function(o,s){if(o.id===r.id)return t[Jo](s,1),-1})}};return i}function i4(t,e,n){for(var r=!1,i=t[Ne],o=0;o<i;++o){var s=t[o];if(s)try{if(s.fn[rc](null,[e])===!1){r=!0;break}}catch(a){pe(n,2,64,"Telemetry initializer failed: "+$t(a),{exception:Ae(a)},!0)}}return!r}var I1,A1=ce(()=>{"use strict";ei();lr();Ge();At();dP();yo();ns();kn();I1=(function(t){Zr(e,t);function e(){var n=t.call(this)||this;n.identifier="TelemetryInitializerPlugin",n.priority=199;var r,i;o(),dt(e,n,function(s,a){s.addTelemetryInitializer=function(c){return r4(i,r++,c)},s[si]=function(c,u){i4(i,c,u?u[ii]():s[ii]())&&s[Qn](c,u)},s[ac]=function(){o()}});function o(){r=0,i=[]}return n}return e.__ieDyn=1,e})(ga)});function u4(t,e){return new gh(e)}function l4(t,e,n){var r,i=[],o=[],s={};return se(n,function(a){(fe(a)||fe(a[ra]))&&yn(j1);var c=a[ju],u=a[Qo];a&&c&&(fe(s[c])?s[c]=u:Hr(t,"Two extensions have same priority #"+c+" - "+s[c]+", "+u)),!c||c<e?i[st](a):o[st](a)}),r={},r[gn]=i,r[fc]=o,r}function L1(t,e){var n=!1;return se(e,function(r){if(r===t)return n=!0,-1}),n}function hP(t,e,n,r){n&&je(n,function(i,o){r&&Sr(o)&&Sr(e[i])&&hP(t,e[i],o,r),r&&Sr(o)&&Sr(e[i])?hP(t,e[i],o,r):t.set(e,i,o)})}function F1(t,e){var n=null,r=-1;return se(t,function(i,o){if(i.w===e)return n=i,r=o,-1}),{i:r,l:n}}function f4(t,e){var n=F1(t,e).l;return n||(n={w:e,rm:function(){var r=F1(t,e);r.i!==-1&&t[Jo](r.i,1)}},t[st](n)),n}function d4(t,e,n){se(e,function(r){var i=Hn(t,r.w,n);delete r.w,r.rm=function(){i.rm()}})}function p4(t,e,n,r){return e.add(t[po](function(i){var o=i.cfg.disableDbgExt;o===!0&&r&&(n[Tf](r),r=null),n&&!r&&o!==!0&&(r=f1(i.cfg),n[wf](r))})),r}function h4(t){return Et({rm:function(){t.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(t)+">"}})}var bc,j1,o4,M1,s4,a4,c4,pP,_a,q1=ce(()=>{"use strict";ei();lr();Lu();Ge();mc();Qw();At();IN();MN();XN();qf();UN();yo();ns();kn();JN();iv();cv();aP();A1();uv();lv();j1="Plugins must provide initialize method",o4="_notificationManager",M1="SDK is still unloading...",s4="SDK is not initialized",a4=100,c4=5e4,pP=Vo((bc={cookieCfg:{}},bc[Fu]={rdOnly:!0,ref:!0,v:[]},bc[fc]={rdOnly:!0,ref:!0,v:[]},bc[ia]={ref:!0,v:{}},bc[Lm]=Ci,bc.loggingLevelConsole=0,bc.diagnosticLogInterval=Ci,bc));_a=(function(){function t(){var e,n,r,i,o,s,a,c,u,l,d,f,g,h,_,S,b,v,E,x,P,T,N,M,q,k,W,ne,he,R,Y,Z,oe;dt(t,this,function(U){j(),U._getDbgPlgTargets=function(){return[N,i]},U[ni]=function(){return n},U.activeStatus=function(){return k},U._setPendingStatus=function(){k=3},U[ra]=function(X,me,Re,be){g&&yn(M1),U[ni]()&&yn("Core cannot be initialized more than once"),e=en(X,pP,Re||U[Ut],!1),X=e.cfg,ht(e[po](function(ke){var gt=ke.cfg,ct=k===3;if(!ct){ne=gt.initInMemoMaxSize||a4;var wt=gt[Zw],rn=gt.endpointUrl;if(fe(wt)){P=null,k=Si[Tm];var Jt="Please provide instrumentation key";n?(pe(r,1,100,Jt),L()):yn(Jt);return}var Tn=[];if(Yr(wt)?(Tn[st](wt),P=null):P=wt,Yr(rn)?(Tn[st](rn),W=null):W=rn,Tn[Ne]){he=!1,k=3;var Pt=Hi(gt.initTimeOut)?gt.initTimeOut:c4,O=kF(Tn);R=yi(function(){R=null,he||re()},Pt),bi(O,function(F){try{if(he)return;if(!F.rejected){var $=F[Ru];if($&&$[Ne]){var ue=$[0];if(P=ue&&ue[Ru],$[Ne]>1){var ve=$[1];W=ve&&ve[Ru]}}P&&(X[Zw]=P,X.endpointUrl=W)}re()}catch{he||re()}})}else re();var D=ke.ref(ke.cfg,ia);je(D,function(F){ke.ref(D,F)})}})),o=be,E=p4(e,v,o&&U[Hp](),E),Cn(),U[Ut]=Re;var Te=X[Fu];if(l=[],l[st].apply(l,hm(hm([],me,!1),Te,!1)),d=X[fc],ye(null),(!f||f[Ne]===0)&&yn("No "+fc+" available"),d&&d[Ne]>1){var Je=U[ic]("TeeChannelController");(!Je||!Je.plugin)&&pe(r,1,28,"TeeChannel required")}d4(X,T,r),T=null,n=!0,k===Si.ACTIVE&&L()},U.getChannels=function(){var X=[];return f&&se(f,function(me){X[st](me)}),qi(X)},U.track=function(X){En(U[Mf](),function(){return"AppInsightsCore:track"},function(){X===null&&(It(X),yn("Invalid telemetry item")),!X[fr]&&fe(X[fr])&&(It(X),yn("telemetry name required")),X[Nf]=X[Nf]||P,X[oc]=X[oc]||Ti(new Date),X.ver=X.ver||"4.0",!g&&U[ni]()&&k===Si.ACTIVE?_e()[Qn](X):k!==Si[Tm]&&i[Ne]<=ne&&i[st](X)},function(){return{item:X}},!X.sync)},U[wm]=_e,U[Hp]=function(){return o||(o=new ph(e.cfg),U[o4]=o),o},U[wf]=function(X){U.getNotifyMgr()[wf](X)},U[Tf]=function(X){o&&o[Tf](X)},U.getCookieMgr=function(){return c||(c=da(e.cfg,U[Ut])),c},U.setCookieMgr=function(X){c!==X&&(fa(c,!1),c=X)},U[Mf]=function(){return s||a||eP()},U.setPerfMgr=function(X){s=X},U.eventCnt=function(){return i[Ne]},U.releaseQueue=function(){if(n&&i[Ne]>0){var X=i;i=[],k===2?se(X,function(me){me[Nf]=me[Nf]||P,_e()[Qn](me)}):pe(r,2,20,"core init status is not active")}},U[eN]=function(X){return _=X||null,oe=!1,Y&&Y[na](),K(!0)};function re(){he=!0,fe(P)?(k=Si[Tm],pe(r,1,112,"ikey can't be resolved from promises")):k=Si.ACTIVE,L()}function L(){n&&(U.releaseQueue(),U[eN]())}function K(X){if((!Y||!Y[sc])&&!oe){var me=X||r&&r.queue[Ne]>0;me&&(Z||(Z=!0,ht(e[po](function(Re){var be=Re.cfg.diagnosticLogInterval;(!be||!(be>0))&&(be=1e4);var Te=!1;Y&&(Te=Y[sc],Y[na]()),Y=yF(Dt,be),Y.unref(),Y[sc]=Te}))),Y[sc]=!0)}return Y}U[tN]=function(){oe=!0,Y&&Y[na](),Dt()},wi(U,function(){return h},["addTelemetryInitializer"]),U[ri]=function(X,me,Re){var be;X===void 0&&(X=!0),n||yn(s4),g&&yn(M1);var Te=(be={reason:50},be[ho]=X,be.flushComplete=!1,be),Je;X&&!me&&(Je=ki(function(ct){me=ct}));var ke=Gf(Pe(),U);ke[$p](function(){v.run(U[Ut]),Jm([c,o,r],X,function(){j(),me&&me(Te)})},U);function gt(ct){Te.flushComplete=ct,g=!0,b.run(ke,Te),U[tN](),ke[Qn](Te)}return Dt(),Lt(X,gt,6,Re)||gt(!1),Je},U[ic]=Fe,U.addPlugin=function(X,me,Re,be){if(!X){be&&be(!1),Ze(j1);return}var Te=Fe(X[Qo]);if(Te&&!me){be&&be(!1),Ze("Plugin ["+X[Qo]+"] is already loaded!");return}var Je={reason:16};function ke(wt){l[st](X),Je.added=[X],ye(Je),be&&be(!0)}if(Te){var gt=[Te.plugin],ct={reason:2,isAsync:!!Re};lt(gt,ct,function(wt){wt?(Je.removed=gt,Je.reason|=32,ke(!0)):be&&be(!1)})}else ke(!1)},U.updateCfg=function(X,me){me===void 0&&(me=!0);var Re;if(U[ni]()){Re={reason:1,cfg:e.cfg,oldCfg:Fw({},e.cfg),newConfig:Fw({},X),merge:me},X=Re.newConfig;var be=e.cfg;X[Fu]=be[Fu],X[fc]=be[fc]}e._block(function(Te){var Je=Te.cfg;hP(Te,Je,X,me),me||je(Je,function(ke){ji(X,ke)||Te.set(Je,ke,Ci)}),Te[fo](Je,pP)},!0),e[Pu](),Re&&vt(Re)},U.evtNamespace=function(){return S},U.flush=Lt,U.getTraceCtx=function(X){return x||(x=P1()),x},U.setTraceCtx=function(X){x=X||null},U.addUnloadHook=ht,oa(U,"addUnloadCb",function(){return b},"add"),U.onCfgChange=function(X){var me;return n?me=Hn(e.cfg,X,U[Ut]):me=f4(T,X),h4(me)},U.getWParam=function(){return Cu()||e.cfg.enableWParam?0:-1};function z(){var X={};M=[];var me=function(Re){Re&&se(Re,function(be){if(be[Qo]&&be[Ou]&&!X[be.identifier]){var Te=be[Qo]+"="+be[Ou];M[st](Te),X[be.identifier]=be}})};me(f),d&&se(d,function(Re){me(Re)}),me(l)}function j(){n=!1,e=en({},pP,U[Ut]),e.cfg[Nm]=1,Et(U,"config",{g:function(){return e.cfg},s:function(me){U.updateCfg(me,!1)}}),Et(U,"pluginVersionStringArr",{g:function(){return M||z(),M}}),Et(U,"pluginVersionString",{g:function(){return q||(M||z(),q=M.join(";")),q||We}}),Et(U,"logger",{g:function(){return r||(r=new vc(e.cfg),e[Ut]=r),r},s:function(me){e[Ut]=me,r!==me&&(fa(r,!1),r=me)}}),U[Ut]=new vc(e.cfg),N=[];var X=U.config[Fu]||[];X.splice(0,X[Ne]),uo(X,N),h=new I1,i=[],fa(o,!1),o=null,s=null,a=null,fa(c,!1),c=null,u=null,l=[],d=null,f=null,g=!1,_=null,S=Er("AIBaseCore",!0),b=Wu(),x=null,P=null,v=Ch(),T=[],q=null,M=null,oe=!1,Y=null,Z=!1,k=0,W=null,ne=null,he=!1,R=null}function _e(){var X=$r(Pe(),e.cfg,U);return X[$p](K),X}function ye(X){var me=l4(U[Ut],l1,l);u=null,q=null,M=null,f=(d||[])[0]||[],f=av(uo(f,me[fc]));var Re=uo(av(me[gn]),f);N=qi(Re);var be=U.config[Fu]||[];be.splice(0,be[Ne]),uo(be,N);var Te=_e();f&&f[Ne]>0&&sP(Te[Zo](f),Re),sP(Te,Re),X&&vt(X)}function Fe(X){var me=null,Re=null,be=[];return se(N,function(Te){if(Te[Qo]===X&&Te!==h)return Re=Te,-1;Te.getChannel&&be[st](Te)}),!Re&&be[Ne]>0&&se(be,function(Te){if(Re=Te.getChannel(X),!Re)return-1}),Re&&(me={plugin:Re,setEnabled:function(Te){ha(Re)[Vp]=!Te},isEnabled:function(){var Te=ha(Re);return!Te[Di]&&!Te[Vp]},remove:function(Te,Je){var ke;Te===void 0&&(Te=!0);var gt=[Re],ct=(ke={reason:1},ke[ho]=Te,ke);lt(gt,ct,function(wt){wt&&ye({reason:32,removed:gt}),Je&&Je(wt)})}}),me}function Pe(){if(!u){var X=(N||[]).slice();bt(X,h)===-1&&X[st](h),u=Dc(av(X),e.cfg,U)}return u}function lt(X,me,Re){if(X&&X[Ne]>0){var be=Dc(X,e.cfg,U),Te=Gf(be,U);Te[$p](function(){var Je=!1,ke=[];se(l,function(ct,wt){L1(ct,X)?Je=!0:ke[st](ct)}),l=ke,q=null,M=null;var gt=[];d&&(se(d,function(ct,wt){var rn=[];se(ct,function(Jt){L1(Jt,X)?Je=!0:rn[st](Jt)}),gt[st](rn)}),d=gt),Re&&Re(Je),K()}),Te[Qn](me)}else Re(!1)}function Dt(){if(r&&r.queue){var X=r.queue.slice(0);r.queue[Ne]=0,se(X,function(me){var Re,be=(Re={},Re[fr]=_||"InternalMessageId: "+me[Pf],Re[Nf]=P,Re[oc]=Ti(new Date),Re.baseType=ku.dataType,Re.baseData={message:me[es]},Re);U.track(be)})}}function Lt(X,me,Re,be){var Te=1,Je=!1,ke=null;be=be||5e3;function gt(){Te--,Je&&Te===0&&(ke&&ke[na](),ke=null,me&&me(Je),me=null)}if(f&&f[Ne]>0){var ct=_e()[Zo](f);ct.iterate(function(wt){if(wt.flush){Te++;var rn=!1;wt.flush(X,function(){rn=!0,gt()},Re)||rn||(X&&ke==null?ke=yi(function(){ke=null,gt()},be):gt())}})}return Je=!0,gt(),!0}function Cn(){var X;ht(e[po](function(me){var Re=me.cfg.enablePerfMgr;if(Re){var be=me.cfg[Lm];(X!==be||!X)&&(be||(be=u4),Xp(me.cfg,Lm,be),X=be,a=null),!s&&!a&&Ye(be)&&(a=be(U,U[Hp]()))}else a=null,X=null}))}function vt(X){var me=Dh(Pe(),U);me[$p](K),(!U._updateHook||U._updateHook(me,X)!==!0)&&me[Qn](X)}function Ze(X){var me=U[Ut];me?(pe(me,2,73,X),K()):yn(X)}function It(X){var me=U[Hp]();me&&me[dc]([X],2)}function ht(X){v.add(X)}})}return t.__ieDyn=1,t})()});function zu(t,e){try{if(t&&t!==""){var n=Dr().parse(t);if(n&&n[oN]&&n[oN]>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors[Ne])return n}}catch(r){pe(e,1,43,"Cannot parse the response. "+(r[fr]||Ae(r)),{response:t})}return null}var U1=ce(()=>{"use strict";Ge();At();yo();gc()});var cs,g4,Y1,gP,Ku,k1=ce(()=>{"use strict";lr();Lu();Ge();At();MN();yo();gc();ns();cs="",g4="NoResponseBody",Y1="&"+g4+"=true",gP="POST",Ku=(function(){function t(){var e=0,n,r,i,o,s,a,c,u,l,d,f,g,h,_;dt(t,this,function(S,b){var v=!0;he(),S[ra]=function(R,Y){i=Y,r&&pe(i,1,28,"Sender is already initialized"),S.SetConfig(R),r=!0},S._getDbgPlgTargets=function(){return[r,o,a,n]},S.SetConfig=function(R){try{if(s=R.senderOnCompleteCallBack||{},a=!!R.disableCredentials,c=R.fetchCredentials,o=!!R.isOneDs,n=!!R.enableSendPromise,l=!!R.disableXhr,d=!!R.disableBeacon,f=!!R.disableBeaconSync,_=R.timeWrapper,h=!!R.addNoResponse,g=!!R.disableFetchKeepAlive,u={sendPOST:k},o||(v=!1),a){var Y=Yu();Y&&Y.protocol&&Y.protocol[ti]()==="file:"&&(v=!1)}return!0}catch{}return!1},S.getSyncFetchPayload=function(){return e},S.getSenderInst=function(R,Y){return R&&R[Ne]?T(R,Y):null},S.getFallbackInst=function(){return u},S[ac]=function(R,Y){he()};function E(R,Y){N(Y,200,{},R)}function x(R,Y){pe(i,2,26,"Failed to send telemetry.",{message:R}),N(Y,400,{})}function P(R){x("No endpoint url is provided for the batch",R)}function T(R,Y){for(var Z,oe=0,U=null,re=0;U==null&&re<R[Ne];)oe=R[re],!l&&oe===1?th()?U=ne:jf()&&(U=k):oe===2&&ua(Y)&&(!Y||!g)?U=W:oe===3&&ci()&&(Y?!f:!d)&&(U=q),re++;return U?(Z={_transport:oe,_isSync:Y},Z[sN]=U,Z):null}function N(R,Y,Z,oe){try{R&&R(Y,Z,oe)}catch{}}function M(R,Y){var Z=Jn(),oe=R[Rf];if(!oe)return P(Y),!0;oe=R[Rf]+(h?Y1:cs);var U=R[uc],re=o?U:new Blob([U],{type:"text/plain;charset=UTF-8"}),L=Z.sendBeacon(oe,re);return L}function q(R,Y,Z){var oe=R[uc];try{if(oe)if(M(R,Y))E(cs,Y);else{var U=s&&s.beaconOnRetry;U&&Ye(U)?U(R,Y,M):(u&&u[sN](R,Y,!0),pe(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(re){o&&Hr(i,"Failed to send telemetry using sendBeacon API. Ex:"+Ae(re)),N(Y,o?0:400,{},cs)}}function k(R,Y,Z){var oe,U,re,L=R[xm]||{};!Z&&n&&(oe=ki(function(_e,ye){U=_e,re=ye})),o&&Z&&R.disableXhrSync&&(Z=!1);var K=R[Rf];if(!K){P(Y),U&&U(!1);return}var z=yN(gP,K,v,!0,Z,R[Mu]);o||z[aN]("Content-type","application/json"),se(yr(L),function(_e){z[aN](_e,L[_e])}),z.onreadystatechange=function(){o||(j(z),z.readyState===4&&U&&U(!0))},z.onload=function(){o&&j(z)};function j(_e){var ye=s&&s.xhrOnComplete,Fe=ye&&Ye(ye);if(Fe)ye(_e,Y,R);else{var Pe=mo(_e);N(Y,_e[Iu],ca(_e,o),Pe)}}return z.onerror=function(_e){N(Y,o?z[Iu]:400,ca(z,o),o?cs:sa(z)),re&&re(_e)},z.ontimeout=function(){N(Y,o?z[Iu]:500,ca(z,o),o?cs:sa(z)),U&&U(!1)},z.send(R[uc]),oe}function W(R,Y,Z){var oe,U=R[Rf],re=R[uc],L=o?re:new Blob([re],{type:"application/json"}),K,z,j,_e=new Headers,ye=re[Ne],Fe=!1,Pe=!1,lt=R[xm]||{},Dt=(oe={method:gP,body:L},oe[AN]=!0,oe);R.headers&&yr(R.headers)[Ne]>0&&(se(yr(lt),function(Ze){_e.append(Ze,lt[Ze])}),Dt[xm]=_e),c?Dt.credentials=c:v&&o&&(Dt.credentials="include"),Z&&(Dt.keepalive=!0,e+=ye,o?R._sendReason===2&&(Fe=!0,h&&(U+=Y1)):Fe=!0);var Lt=new Request(U,Dt);try{Lt[AN]=!0}catch{}if(!Z&&n&&(K=ki(function(Ze,It){z=Ze,j=It})),!U){P(Y),z&&z(!1);return}function Cn(Ze){N(Y,o?0:400,{},o?cs:Ze)}function vt(Ze,It,ht){var X=Ze[Iu],me=s.fetchOnComplete;me&&Ye(me)?me(Ze,Y,ht||cs,It):N(Y,X,{},ht||cs)}try{bi(fetch(o?U:Lt,o?Dt:null),function(Ze){if(Z&&(e-=ye,ye=0),!Pe)if(Pe=!0,Ze.rejected)Cn(Ze.reason&&Ze.reason[es]),j&&j(Ze.reason);else{var It=Ze[Ru];try{!o&&!It.ok?(Cn(It.statusText),z&&z(!1)):o&&!It.body?(vt(It,null,cs),z&&z(!0)):bi(It.text(),function(ht){vt(It,R,ht[Ru]),z&&z(!0)})}catch(ht){Cn(Ae(ht)),j&&j(ht)}}})}catch(Ze){Pe||(Cn(Ae(Ze)),j&&j(Ze))}return Fe&&!Pe&&(Pe=!0,N(Y,200,{}),z&&z(!0)),o&&!Pe&&R[Mu]>0&&_&&_.set(function(){Pe||(Pe=!0,N(Y,500,{}),z&&z(!0))},R[Mu]),K}function ne(R,Y,Z){var oe=Yn(),U=new XDomainRequest,re=R[uc];U.onload=function(){var _e=mo(U),ye=s&&s.xdrOnComplete;ye&&Ye(ye)?ye(U,Y,R):N(Y,200,{},_e)},U.onerror=function(){N(Y,400,{},o?cs:Uu(U))},U.ontimeout=function(){N(Y,500,{})},U.onprogress=function(){};var L=oe&&oe.location&&oe.location[Pm]||"",K=R[Rf];if(!K){P(Y);return}if(!o&&K.lastIndexOf(L,0)!==0){var z="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";pe(i,2,40,". "+z),x(z,Y);return}var j=o?K:K[go](/^(https?:)/,"");U.open(gP,j),R[Mu]&&(U[Mu]=R[Mu]),U.send(re),o&&Z?_&&_.set(function(){U.send(re)},0):U.send(re)}function he(){e=0,r=!1,n=!1,i=null,o=null,s=null,a=null,c=null,u=null,l=!1,d=!1,f=!1,g=!1,h=!1,_=null}})}return t.__ieDyn=1,t})()});function W1(t){return t&&t[go]?t[go](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,We):t}function pv(t,e){var n;if(e){var r=We;Ie(e)?(r=We,se(e,function(o){o=W1(o),o&&(o[0]!=="."&&(o="."+o),r+=o)})):r=W1(e),r&&(r[0]!=="."&&(r="."+r),t=(t||We)+r)}var i=y4.exec(t||We)||[];return n={},n[oi]=i[1],n.ns=(i[2]||We).replace(_4,".").replace(m4,We)[Yi](".").sort().join("."),n}function _P(t,e,n){var r=[],i=wh.get(t,fv,{},!1),o=pv(e,n);return je(i,function(s,a){se(a,function(c){var u;(!o[oi]||o[oi]===c.evtName[oi])&&(!o.ns||o.ns===o.ns)&&r[st]((u={},u[fr]=c.evtName[oi]+(c.evtName.ns?"."+c.evtName.ns:We),u.handler=c[Gp],u))})}),r}function ej(t,e,n){n===void 0&&(n=!0);var r=wh.get(t,fv,{},n),i=r[e];return i||(i=r[e]=[]),i}function tj(t,e,n,r){t&&e&&e[oi]&&(t[G1]?t[G1](e[oi],n,r):t[B1]&&t[B1](K1+e[oi],n))}function S4(t,e,n,r){var i=!1;return t&&e&&e[oi]&&n&&(t[$1]?(t[$1](e[oi],n,r),i=!0):t[H1]&&(t[H1](K1+e[oi],n),i=!0)),i}function z1(t,e,n,r){for(var i=e[Ne];i--;){var o=e[i];o&&(!n.ns||n.ns===o.evtName.ns)&&(!r||r(o))&&(tj(t,o.evtName,o[Gp],o.capture),e[Jo](i,1))}}function D4(t,e,n){if(e[oi])z1(t,ej(t,e[oi]),e,n);else{var r=wh.get(t,fv,{});je(r,function(i,o){z1(t,o,e,n)}),yr(r)[Ne]===0&&wh.kill(t,fv)}}function Ni(t,e){var n;return e?(Ie(e)?n=[t].concat(e):n=[t,e],n=pv("xx",n).ns[Yi](".")):n=t,n}function us(t,e,n,r,i){var o;i===void 0&&(i=!1);var s=!1;if(t)try{var a=pv(e,r);if(s=S4(t,a,n,i),s&&wh.accept(t)){var c=(o={guid:v4++,evtName:a},o[Gp]=n,o.capture=i,o);ej(t,a.type)[st](c)}}catch{}return s}function ma(t,e,n,r,i){if(i===void 0&&(i=!1),t)try{var o=pv(e,r),s=!1;D4(t,o,function(a){return o.ns&&!n||a[Gp]===n?(s=!0,!0):!1}),s||tj(t,o,n,i)}catch{}}function mP(t,e,n,r){return r===void 0&&(r=!1),us(t,e,n,null,r)}function vP(t,e,n,r){r===void 0&&(r=!1),ma(t,e,n,null,r)}function hv(t,e,n){var r=!1,i=Yn();i&&(r=us(i,t,e,n),r=us(i.body,t,e,n)||r);var o=Sn();return o&&(r=us(o,t,e,n)||r),r}function gv(t,e,n){var r=Yn();r&&(ma(r,t,e,n),ma(r.body,t,e,n));var i=Sn();i&&ma(i,t,e,n)}function Wf(t,e,n,r){var i=!1;return e&&t&&t[Ne]>0&&se(t,function(o){o&&(!n||bt(n,o)===-1)&&(i=hv(o,e,r)||i)}),i}function _v(t,e,n,r){var i=!1;return e&&t&&Ie(t)&&(i=Wf(t,e,n,r),!i&&n&&n[Ne]>0&&(i=Wf(t,e,null,r))),i}function Cc(t,e,n){t&&Ie(t)&&se(t,function(r){r&&gv(r,e,n)})}function Nh(t,e,n){return _v([J1,X1,dv],t,e,n)}function Ph(t,e){Cc([J1,X1,dv],t,e)}function zf(t,e,n){function r(s){var a=Sn();t&&a&&a.visibilityState==="hidden"&&t(s)}var i=Ni(Q1,n),o=Wf([dv],t,e,i);return(!e||bt(e,Th)===-1)&&(o=Wf([Th],r,e,i)||o),!o&&e&&(o=zf(t,null,n)),o}function Rh(t,e){var n=Ni(Q1,e);Cc([dv],t,n),Cc([Th],null,n)}function Kf(t,e,n){function r(s){var a=Sn();t&&a&&a.visibilityState==="visible"&&t(s)}var i=Ni(Z1,n),o=Wf([V1],t,e,i);return o=Wf([Th],r,e,i)||o,!o&&e&&(o=Kf(t,null,n)),o}function Oh(t,e){var n=Ni(Z1,e);Cc([V1],t,n),Cc([Th],null,n)}var K1,H1,$1,B1,G1,fv,Th,dv,V1,X1,J1,Q1,Z1,_4,m4,v4,wh,y4,nj=ce(()=>{"use strict";Ge();At();qf();kn();K1="on",H1="attachEvent",$1="addEventListener",B1="detachEvent",G1="removeEventListener",fv="events",Th="visibilitychange",dv="pagehide",V1="pageshow",X1="unload",J1="beforeunload",Q1=Er("aiEvtPageHide"),Z1=Er("aiEvtPageShow"),_4=/\.[\.]+/g,m4=/[\.]+$/,v4=1,wh=Bm("events"),y4=/^([^.]*)(?:\.(.+)|)/});var yP,rj=ce(()=>{"use strict";kp();yP=Dn({DISABLED:0,CRITICAL:1,WARNING:2,DEBUG:3})});var xt=ce(()=>{"use strict";PF();RF();Qw();q1();dP();$m();tP();IN();ns();U1();k1();Ge();kp();nj();gc();ei();JN();iv();yo();cv();rj();XN();qf();uv();lv();oP();mc();Km();FN()});var ls,ij,SP,mv,vv=ce(()=>{"use strict";ls="",ij="https://browser.events.data.microsoft.com/OneCollector/1.0/",SP="version",mv="properties"});var DP,EP,Vf,fs,bP,tn,Vu,va,yv,Sv,Dv,Ev,xh,bv=ce(()=>{"use strict";DP="initialize",EP="logger",Vf="indexOf",fs="timings",bP="pollInternalLogs",tn="value",Vu="kind",va="length",yv="processTelemetryStart",Sv="handleField",Dv="rmSanitizer",Ev="rmFieldSanitizer",xh="canHandle"});function dr(t){return!(t===ls||fe(t))}function Cv(t){if(t){var e=Qr(t,"-");if(e>-1)return bu(t,e)}return ls}function uj(){return CP===null&&(CP=!ot(Uint8Array)&&!w4()&&!pc()),CP}function Tv(t){return!!(t&&vr(t)&&t>=1&&t<=4)}function wv(t,e,n){if(!e&&!dr(e)||typeof t!="string")return null;var r=typeof e;if(r==="string"||r==="number"||r==="boolean"||Ie(e))e={value:e};else if(r==="object"&&!sj.call(e,"value"))e={value:n?JSON.stringify(e):e};else if(fe(e[tn])||e[tn]===ls||!Xe(e[tn])&&!vr(e[tn])&&!Ko(e[tn])&&!Ie(e[tn]))return null;if(Ie(e[tn])&&!wP(e[tn]))return null;if(!fe(e[Vu])){if(Ie(e[tn])||!Ih(e[Vu]))return null;e[tn]=e[tn].toString()}return e}function Jf(t,e,n){var r=-1;if(!ot(t))if(e>0&&(e===32?r=8192:e<=13&&(r=e<<5)),T4(n))r===-1&&(r=0),r|=n;else{var i=C4[ds(t)]||-1;r!==-1&&i!==-1?r|=i:i===6&&(r=i)}return r}function lj(t,e,n){n===void 0&&(n=!0);var r;return t&&(r=t.get(e),n&&r&&decodeURIComponent&&(r=decodeURIComponent(r))),r||ls}function fj(t){t===void 0&&(t="D");var e=_h();return t==="B"?e="{"+e+"}":t==="P"?e="("+e+")":t==="N"&&(e=e.replace(/-/g,ls)),e}function Xu(t,e,n,r,i){var o={},s=!1,a=0,c=arguments[va],u=arguments;for(Ko(u[0])&&(s=u[0],a++);a<c;a++){var t=u[a];je(t,function(d,f){s&&f&&pn(f)?Ie(f)?(o[d]=o[d]||[],se(f,function(g,h){g&&pn(g)?o[d][h]=Xu(!0,o[d][h],g):o[d][h]=g})):o[d]=Xu(!0,o[d],f):o[d]=f})}return o}function Ih(t){return t===0||t>0&&t<=13||t===32}function T4(t){return t>=0&&t<=9}function w4(){var t=Jn();if(!ot(t)&&t.userAgent){var e=t.userAgent.toLowerCase();if((e[Vf]("safari")>=0||e[Vf]("firefox")>=0)&&e[Vf]("chrome")<0)return!0}return!1}function wP(t){return t[va]>0}function Ah(t,e){var n=t;n[fs]=n[fs]||{},n[fs][yv]=n[fs][yv]||{},n[fs][yv][e]=ui()}function ds(t){var e=0;if(t!=null){var n=typeof t;n==="string"?e=1:n==="number"?e=2:n==="boolean"?e=3:n===Js&&(e=4,Ie(t)?(e=4096,t[va]>0&&(e|=ds(t[0]))):sj.call(t,"value")&&(e=8192|ds(t[tn])))}return e}function Nv(){return!!He("chrome")}function dj(t,e,n,r,i,o){r===void 0&&(r=!1),i===void 0&&(i=!1);function s(c,u,l){try{c[u]=l}catch{}}var a=new XMLHttpRequest;return r&&s(a,E4,r),n&&s(a,oj,n),a.open(t,e,!i),n&&s(a,oj,n),!i&&o&&s(a,b4,o),a}function Tc(t){return t>0}var ya,TP,Xf,sj,E4,oj,b4,C4,CP,aj,cj,ui,Pv=ce(()=>{"use strict";xt();ei();Ge();vv();bv();TP="4.3.4",Xf="1DS-Web-JS-"+TP,sj=Np.hasOwnProperty,E4="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",oj="withCredentials",b4="timeout",C4=(ya={},ya[0]=0,ya[2]=6,ya[1]=1,ya[3]=7,ya[4098]=6,ya[4097]=1,ya[4099]=7,ya),CP=null,aj=Cu(),cj=vf();ui=qp});function P4(t){return t&&(!t.getProperty||!t.setProperty)&&yn("Invalid property storage override passed."),!0}var N4,pj,hj=ce(()=>{"use strict";ei();lr();xt();Ge();vv();Pv();bv();N4=Vo({endpointUrl:ij,propertyStorageOverride:{isVal:P4}});pj=(function(t){Zr(e,t);function e(){var n=t.call(this)||this;return dt(e,n,function(r,i){r[DP]=function(o,s,a,c){En(r,function(){return"AppInsightsCore.initialize"},function(){try{i[DP](en(o,N4,a||r[EP],!1).cfg,s,a,c)}catch(d){var u=r[EP],l=Ae(d);l[Vf]("channels")!==-1&&(l+=`
 - Channels must be provided through config.channels only!`),pe(u,1,514,"SDK Initialization Failed - no telemetry will be sent: "+l)}},function(){return{config:o,extensions:s,logger:a,notificationManager:c}})},r.track=function(o){En(r,function(){return"AppInsightsCore.track"},function(){var s=o;if(s){s[fs]=s[fs]||{},s[fs].trackStart=ui(),Tv(s.latency)||(s.latency=1);var a=s.ext=s.ext||{};a.sdk=a.sdk||{},a.sdk.ver=Xf;var c=s.baseData=s.baseData||{};c[mv]=c[mv]||{};var u=c[mv];u[SP]=u[SP]||r.pluginVersionString||ls}i.track(s)},function(){return{item:o}},!o.sync)},r[bP]=function(o){return i[bP](o||"InternalLog")}}),n}return e.__ieDyn=1,e})(_a)});var gj,_j,mj,vj,yj,Sj=ce(()=>{"use strict";xt();gj=Dn({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,Pii_IPv6ScrubLastHextets:14,Pii_DropValue:15,CustomerContent_GenericContent:32}),_j=Dn({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),mj=Dn({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),vj=Dn({Normal:1,Critical:2}),yj=Dn({NONE:0,ERROR:1,WARNING:2,INFORMATION:3})});var Dj,Ej=ce(()=>{"use strict";xt();Ge();vv();Pv();bv();Dj=(function(){function t(e){var n=this,r={},i=[],o=[];e&&o.push(e);function s(l,d){var f,g=r[l];if(g&&(f=g[d]),!f&&f!==null){if(Xe(l)&&Xe(d))if(o[va]>0){for(var h=0;h<o[va];h++)if(o[h][Sv](l,d)){f={canHandle:!0,fieldHandler:o[h]};break}}else i[va]===0&&(f={canHandle:!0});if(!f&&f!==null){f=null;for(var h=0;h<i[va];h++)if(i[h][Sv](l,d)){f={canHandle:!0,handler:i[h],fieldHandler:null};break}}g||(g=r[l]={}),g[d]=f}return f}n.clearCache=function(){r={}},n.addSanitizer=function(l){l&&(Aw(i,l)||i.push(l),r={})},n.addFieldSanitizer=function(l){l&&(Aw(o,l)||o.push(l),r={})},n[Dv]=function(l){if(l){var d=bt(i,l);d!==-1&&(i.splice(d,1),r={}),se(i,function(f){f&&f[Dv]&&f[Dv](l)})}},n[Ev]=function(l){if(l){var d=bt(o,l);d!==-1&&(o.splice(d,1),r={}),se(i,function(f){f&&f[Ev]&&f[Ev](l)})}},n.isEmpty=function(){return Df(i)+Df(o)===0},n[Sv]=function(l,d){var f=s(l,d);return f?f[xh]:!1},n[tn]=function(l,d,f,g){var h=s(l,d);if(h&&h[xh]){if(!h||!h[xh])return null;if(h.handler)return h.handler[tn](l,d,f,g);if(!Xe(d)||fe(f)||f===ls)return null;var _=null,S=ds(f);if((S&8192)===8192){var b=S&-8193;if(_=f,!dr(_[tn])||b!==1&&b!==2&&b!==3&&(b&4096)!==4096)return null}else S===1||S===2||S===3||(S&4096)===4096?_=c(l,d,f):S===4&&(_=c(l,d,g?JSON.stringify(f):f));if(_)return a(h,l,d,S,_,g)}return null},n.property=function(l,d,f,g){var h=s(l,d);if(!h||!h[xh]||!Xe(d)||fe(f)||!dr(f[tn]))return null;var _=ds(f[tn]);return _===0?null:a(h,l,d,_,f,g)};function a(l,d,f,g,h,_){if(l.handler)return l.handler.property(d,f,h,_);if(!fe(h[Vu])){if((g&4096)===4096||!Ih(h[Vu]))return null;h[tn]=h[tn].toString()}return u(l.fieldHandler,d,f,g,h)}function c(l,d,f){return dr(f)?{value:f}:null}function u(l,d,f,g,h){if(h&&l){var _=l.getSanitizer(d,f,g,h[Vu],h.propertyType);if(_)if(g===4){var S={},b=h[tn];je(b,function(E,x){var P=d+"."+f;if(dr(x)){var T=c(P,E,x);T=u(l,P,E,ds(x),T),T&&(S[E]=T[tn])}}),h[tn]=S}else{var v={path:d,name:f,type:g,prop:h,sanitizer:n};h=_.call(n,v)}}return h}}return t.getFieldType=ds,t})()});var bj={};Zc(bj,{ActiveStatus:()=>Si,AppInsightsCore:()=>pj,BaseTelemetryPlugin:()=>ga,DiagnosticLogger:()=>vc,EventLatency:()=>_j,EventPersistence:()=>vj,EventPropertyType:()=>mj,EventsDiscardedReason:()=>lo,FullVersionString:()=>Xf,InternalAppInsightsCore:()=>_a,LoggingSeverity:()=>yP,MinChannelPriorty:()=>Xw,NotificationManager:()=>ph,PerfEvent:()=>$u,PerfManager:()=>gh,ProcessTelemetryContext:()=>uP,SenderPostManager:()=>Ku,TraceLevel:()=>yj,Undefined:()=>Wo,ValueKind:()=>gj,ValueSanitizer:()=>Dj,Version:()=>TP,_InternalLogMessage:()=>ku,__getRegisteredEvents:()=>_P,_appendHeader:()=>Lf,_getAllResponseHeaders:()=>ca,_logInternalMessage:()=>HN,_testHookMaxUnloadHooksCb:()=>lP,_throwInternal:()=>pe,_warnToConsole:()=>Hr,addEventHandler:()=>hv,addEventListeners:()=>_v,addPageHideEventListener:()=>zf,addPageShowEventListener:()=>Kf,addPageUnloadEventListener:()=>Nh,areCookiesSupported:()=>Hf,arrForEach:()=>se,arrIndexOf:()=>bt,arrMap:()=>Zs,arrReduce:()=>jp,attachEvent:()=>mP,blockDynamicConversion:()=>ch,convertAllHeadersToMap:()=>Hm,cookieAvailable:()=>Hf,createCookieMgr:()=>da,createDynamicConfig:()=>en,createEnumStyle:()=>Dn,createGuid:()=>fj,createProcessTelemetryContext:()=>$r,createTraceParent:()=>mh,createUniqueNamespace:()=>Er,createUnloadHandlerContainer:()=>Wu,dateNow:()=>hn,detachEvent:()=>vP,disallowsSameSiteNone:()=>rv,doPerf:()=>En,dumpObj:()=>Ae,eventOff:()=>ma,eventOn:()=>us,extend:()=>Xu,findW3cTraceParent:()=>Sh,forceDynamicConversion:()=>xN,formatErrorMessageXdr:()=>Uu,formatErrorMessageXhr:()=>sa,formatTraceParent:()=>yh,generateW3CId:()=>Bu,getCommonSchemaMetaData:()=>Jf,getConsole:()=>Jp,getCookieValue:()=>lj,getCrypto:()=>Qp,getDocument:()=>Sn,getDynamicConfigHandler:()=>ah,getExceptionName:()=>$t,getFieldValueType:()=>ds,getGlobal:()=>kr,getGlobalInst:()=>He,getHistory:()=>lm,getIEVersion:()=>eh,getISOString:()=>Ti,getJSON:()=>Dr,getLocation:()=>Yu,getMsCrypto:()=>Zp,getNavigator:()=>Jn,getPerformance:()=>tc,getResponseText:()=>mo,getSetValue:()=>Xp,getTenantId:()=>Cv,getTime:()=>ui,getWindow:()=>Yn,hasDocument:()=>Cu,hasHistory:()=>xw,hasJSON:()=>rs,hasNavigator:()=>Lp,hasOwnProperty:()=>Vn,hasWindow:()=>vf,isArray:()=>Ie,isArrayValid:()=>wP,isBeaconsSupported:()=>ci,isBoolean:()=>Ko,isChromium:()=>Nv,isDate:()=>am,isDocumentObjectAvailable:()=>aj,isError:()=>Du,isFetchSupported:()=>ua,isFunction:()=>Ye,isGreaterThanZero:()=>Tc,isIE:()=>hc,isLatency:()=>Tv,isNotTruthy:()=>Cw,isNullOrUndefined:()=>fe,isNumber:()=>vr,isObject:()=>pn,isReactNative:()=>pc,isSampledFlag:()=>vh,isString:()=>Xe,isTruthy:()=>ao,isTypeof:()=>bw,isUint8ArrayAvailable:()=>uj,isUndefined:()=>ot,isValidSpanId:()=>as,isValidTraceId:()=>ss,isValidTraceParent:()=>Bf,isValueAssigned:()=>dr,isValueKind:()=>Ih,isWindowObjectAvailable:()=>cj,isXhrSupported:()=>jf,mergeEvtNamespace:()=>Ni,newGuid:()=>_h,newId:()=>oh,normalizeJsName:()=>qu,objDefineAccessors:()=>Nw,objForEachKey:()=>je,objFreeze:()=>qi,objKeys:()=>yr,objSeal:()=>Pw,onConfigChange:()=>Hn,openXhr:()=>dj,optimizeObject:()=>ai,parseResponse:()=>zu,parseTraceParent:()=>Gu,perfNow:()=>qp,prependTransports:()=>aa,proxyAssign:()=>mN,proxyFunctionAs:()=>oa,proxyFunctions:()=>wi,random32:()=>la,randomValue:()=>ih,removeEventHandler:()=>gv,removeEventListeners:()=>Cc,removePageHideEventListener:()=>Rh,removePageShowEventListener:()=>Oh,removePageUnloadEventListener:()=>Ph,safeGetCookieMgr:()=>VN,safeGetLogger:()=>vo,sanitizeProperty:()=>wv,setEnableEnvMocks:()=>TN,setProcessTelemetryTimings:()=>Ah,setValue:()=>$i,strContains:()=>Rn,strEndsWith:()=>Tu,strFunction:()=>df,strObject:()=>Js,strPrototype:()=>oo,strStartsWith:()=>Ef,strTrim:()=>Nt,strUndefined:()=>Wo,throwError:()=>yn,toISOString:()=>Ti,useXDomainRequest:()=>th});var Ju=ce(()=>{"use strict";hj();Sj();Ej();xt();Pv()});var Qu,Rv,Ov,NP=ce(()=>{"use strict";Qu="REAL_TIME",Rv="NEAR_REAL_TIME",Ov="BEST_EFFORT"});var So,xv,Cj,PP,Tj,wj,RP,Iv,Mh,Qf,Nj,Pj,Rj,Av,OP,Mv,Lv,Fv,Lh,xP,IP,Oj,Zf,AP,jv,Fh=ce(()=>{"use strict";So="",xv="drop",Cj="send",PP="requeue",Tj="rspFail",wj="oth",RP="no-cache, no-store",Iv="application/x-json-stream",Mh="cache-control",Qf="content-type",Nj="kill-tokens",Pj="kill-duration",Rj="time-delta-millis",Av="client-version",OP="client-id",Mv="time-delta-to-apply-millis",Lv="upload-time",Fv="apikey",Lh="AuthMsaDeviceTicket",xP="WebAuthToken",IP="AuthXToken",Oj="NoResponseBody",Zf="msfpc",AP="trace",jv="user"});var jh,qv,Uv,Yv,qh,ut,ps,Pi,bn,hs,Zn,gs,Zu,kv,el,Hv,tl,$v,Bv,xj,MP,LP,Ij,Aj,Gv,FP,jP,Mj,Lj,qP,UP,YP,Fj,Wv,zv,Kv,Uh,kP,Do,ed,HP,Mr,li,Yh,kh,td,Vv,Hh,jj,nd,Xv,Jv,rd,$P,$h,Qv,Zv,id,qj,ey,ty,ny,Bh,Uj,Yj,BP,GP,kj,Hj,$j,ry,Gh,wc,nl,od=ce(()=>{"use strict";jh="allowRequestSending",qv="firstRequestSent",Uv="shouldAddClockSkewHeaders",Yv="getClockSkewHeaderValue",qh="setClockSkew",ut="length",ps="concat",Pi="iKey",bn="count",hs="events",Zn="push",gs="split",Zu="splice",kv="toLowerCase",el="hdrs",Hv="useHdrs",tl="initialize",$v="setTimeoutOverride",Bv="clearTimeoutOverride",xj="payloadPreprocessor",MP="overrideEndpointUrl",LP="avoidOptions",Ij="disableEventTimings",Aj="stringifyObjects",Gv="enableCompoundKey",FP="disableXhrSync",jP="disableFetchKeepAlive",Mj="addNoResponse",Lj="excludeCsMetaData",qP="useSendBeacon",UP="fetchCredentials",YP="alwaysUseXhrOverride",Fj="unloadTransports",Wv="serializeOfflineEvt",zv="getOfflineRequestDetails",Kv="createPayload",Uh="createOneDSPayload",kP="payloadBlob",Do="headers",ed="_thePayload",HP="urlString",Mr="batches",li="sendType",Yh="addHeader",kh="canSendRequest",td="sendQueuedRequests",Vv="isCompletelyIdle",Hh="setUnloading",jj="isTenantKilled",nd="resume",Xv="sendSynchronousBatch",Jv="_transport",rd="getWParam",$P="isBeacon",$h="timings",Qv="isTeardown",Zv="isSync",id="data",qj="timeout",ey="_sendReason",ty="setKillSwitchTenants",ny="_backOffTransmission",Bh="identifier",Uj="disableOptimizeObj",Yj="ignoreMc1Ms0CookieProcessing",BP="eventsLimitInMem",GP="autoFlushEventsLimit",kj="disableAutoBatchFlushLimit",Hj="overrideInstrumentationKey",$j="disableTelemetry",ry="baseData",Gh="sendAttempt",wc="latency",nl="sync"});function Gj(t){var e=(t.ext||{}).intweb;return e&&dr(e[Zf])?e[Zf]:null}function Bj(t){for(var e=null,n=0;e===null&&n<t[ut];n++)e=Gj(t[n]);return e}var Nc,iy=ce(()=>{"use strict";Ju();Fh();od();Nc=(function(){function t(e,n){var r=n?[][ps](n):[],i=this,o=Bj(r);i[Pi]=function(){return e},i.Msfpc=function(){return o||So},i[bn]=function(){return r[ut]},i[hs]=function(){return r},i.addEvent=function(s){return s?(r[Zn](s),o||(o=Gj(s)),!0):!1},i[gs]=function(s,a){var c;if(s<r[ut]){var u=r[ut]-s;fe(a)||(u=a<u?a:u),c=r[Zu](s,u),o=Bj(r)}return new t(e,c)}}return t.create=function(e,n){return new t(e,n)},t})()});var Wj,zj=ce(()=>{"use strict";lr();od();Wj=(function(){function t(){var e=!0,n=!0,r=!0,i="use-collector-delta",o=!1;dt(t,this,function(s){s[jh]=function(){return e},s[qv]=function(){r&&(r=!1,o||(e=!1))},s[Uv]=function(){return n},s[Yv]=function(){return i},s[qh]=function(a){o||(a?(i=a,n=!0,o=!0):n=!1,e=!0)}})}return t.__ieDyn=1,t})()});var R4,Kj,Vj=ce(()=>{"use strict";lr();Ju();od();R4=1e3,Kj=(function(){function t(){var e={};function n(r){var i=[];return r&&se(r,function(o){i[Zn](Nt(o))}),i}dt(t,this,function(r){r[ty]=function(i,o){if(i&&o)try{var s=n(i[gs](","));if(o==="this-request-only")return s;for(var a=parseInt(o,10)*R4,c=0;c<s[ut];++c)e[s[c]]=hn()+a}catch{return[]}return[]},r[jj]=function(i){var o=e,s=Nt(i);return o[s]!==void 0&&o[s]>hn()?!0:(delete o[s],!1)}})}return t.__ieDyn=1,t})()});function Jj(t){return!(t>=300&&t<500&&t!=429||t==501||t==505)}function oy(t){var e=0,n=Xj*O4,r=Xj*x4,i=Math.floor(Math.random()*(r-n))+n;return e=Math.pow(2,t)*i,Math.min(e,I4)}var O4,x4,Xj,I4,WP=ce(()=>{"use strict";O4=.8,x4=1.2,Xj=3e3,I4=6e5});function j4(t,e,n,r,i){if(i&&e){var o=t(i.value,i.kind,i.propertyType);if(o>-1){var s=e[Qj];s||(s=e[Qj]={f:{}});var a=s[sy];if(a||(a=s[sy]={}),n)for(var c=0;c<n.length;c++){var u=n[c];a[u]||(a[u]={f:{}});var l=a[u][sy];l||(l=a[u][sy]={}),a=l}a=a[r]={},Ie(i.value)?a.a={t:o}:a.t=o}}}var A4,M4,Zj,eq,L4,Qj,sy,F4,tq,nq=ce(()=>{"use strict";lr();Ju();iy();Fh();Ge();A4=20,M4=3984588,Zj=65e3,eq=2e6,L4=Math.min(eq,Zj),Qj="metadata",sy="f",F4=/\./,tq=(function(){function t(e,n,r,i,o,s){var a="data",c="baseData",u="ext",l=!!i,d=!0,f=n,g={},h=!!s,_=o||Jf;dt(t,this,function(S){S.createPayload=function(E,x,P,T,N,M){return{apiKeys:[],payloadBlob:So,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:E,isTeardown:x,isSync:P,isBeacon:T,sendType:M,sendReason:N}},S.appendPayload=function(E,x,P){var T=E&&x&&!E.overflow;return T&&En(e,function(){return"Serializer:appendPayload"},function(){for(var N=x.events(),M=E.payloadBlob,q=E.numEvents,k=!1,W=[],ne=[],he=E.isBeacon,R=he?Zj:M4,Y=he?L4:eq,Z=0,oe=0;Z<N.length;){var U=N[Z];if(U){if(q>=P){E.overflow=x.split(Z);break}var re=S.getEventBlob(U);if(re&&re.length<=Y){var L=re.length,K=M.length;if(K+L>R){E.overflow=x.split(Z);break}M&&(M+=`
`),M+=re,oe++,oe>A4&&(Xo(M,0,1),oe=0),k=!0,q++}else re?W.push(U):ne.push(U),N.splice(Z,1),Z--}Z++}if(W.length>0&&E.sizeExceed.push(Nc.create(x.iKey(),W)),ne.length>0&&E.failedEvts.push(Nc.create(x.iKey(),ne)),k){E.batches.push(x),E.payloadBlob=M,E.numEvents=q;var z=x.iKey();bt(E.apiKeys,z)===-1&&E.apiKeys.push(z)}},function(){return{payload:E,theBatch:{iKey:x.iKey(),evts:x.events()},max:P}}),T},S.getEventBlob=function(E){try{return En(e,function(){return"Serializer.getEventBlob"},function(){var x={};x.name=E.name,x.time=E.time,x.ver=E.ver,x.iKey="o:"+Cv(E.iKey);var P={},T;h||(T=function(k,W,ne){j4(_,P,k,W,ne)});var N=E[u];N&&(x[u]=P,je(N,function(k,W){var ne=P[k]={};v(W,ne,"ext."+k,!0,null,null,!0)}));var M=x[a]={};M.baseType=E.baseType;var q=M[c]={};return v(E.baseData,q,c,!1,[c],T,d),v(E.data,M,a,!1,[],T,d),JSON.stringify(x)},function(){return{item:E}})}catch{return null}};function b(E,x){var P=g[E];return P===void 0&&(E.length>=7&&(P=Ef(E,"ext.metadata")||Ef(E,"ext.web")),g[E]=P),P}function v(E,x,P,T,N,M,q){je(E,function(k,W){var ne=null;if(W||dr(W)){var he=P,R=k,Y=N,Z=x;if(l&&!T&&F4.test(k)){var oe=k.split("."),U=oe.length;if(U>1){Y&&(Y=Y.slice());for(var re=0;re<U-1;re++){var L=oe[re];Z=Z[L]=Z[L]||{},he+="."+L,Y&&Y.push(L)}R=oe[U-1]}}var K=T&&b(he,R);if(!K&&f&&f.handleField(he,R)?ne=f.value(he,R,W,r):ne=wv(R,W,r),ne){var z=ne.value;if(Z[R]=z,M&&M(Y,R,ne),q&&typeof z=="object"&&!Ie(z)){var j=Y;j&&(j=j.slice(),j.push(R)),v(W,z,he+"."+R,T,j,M,q)}}}})}})}return t.__ieDyn=1,t})()});function sd(t,e){return{set:function(n,r){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return vF([t,e],n,r,i)}}}var zP=ce(()=>{"use strict";Ge()});function il(t,e,n){VP[t]=e,n!==!1&&(XP[e]=t)}function ay(t,e){var n=!1;if(t&&e){var r=yr(t);if(r&&r[ut]>0)for(var i=e[kv](),o=0;o<r[ut];o++){var s=r[o];if(s&&Vn(e,s)&&s[kv]()===i){n=!0;break}}}return n}function ad(t,e,n,r){e&&n&&n[ut]>0&&(r&&VP[e]?(t[el][VP[e]]=n,t[Hv]=!0):t.url+="&"+e+"="+n)}function k4(t,e,n){for(var r=0;r<t[ut];r++)if(t[r].name===e){t[r].value=n;return}t[Zn]({name:e,value:n})}function H4(t,e){for(var n=0;n<t[ut];n++)if(t[n].name===e){t[Zu](n,1);return}}var rl,KP,q4,U4,Y4,VP,XP,rq,iq=ce(()=>{"use strict";lr();Ju();Ge();zj();iy();Fh();Vj();WP();nq();zP();od();KP="sendAttempt",q4="&"+Oj+"=true",U4="?cors=true&"+Qf[kv]()+"="+Iv,Y4=(rl={},rl[1]=PP,rl[100]=PP,rl[200]="sent",rl[8004]=xv,rl[8003]=xv,rl),VP={},XP={};il(Lh,Lh,!1);il(Av,Av);il(OP,"Client-Id");il(Fv,Fv);il(Mv,Mv);il(Lv,Lv);il(IP,IP);rq=(function(){function t(e,n,r,i){var o,s,a,c,u=!1,l,d,f,g,h,_,S,b,v,E,x,P,T,N,M,q,k,W,ne,he,R,Y,Z,oe,U,re,L,K;dt(t,this,function(z){Pe();var j=!0;z[tl]=function(D,F,$){oe||(h=F,P=F.getCookieMgr(),d=$,f=d.diagLog(),uo(he,Hn(D,function(ue){var ve,Ce=ue.cfg,ge=ue.cfg.extensionConfig[$.identifier];U=sd(ge[$v],ge[Bv]),dr(Ce.anonCookieName)?k4(S,"anoncknm",Ce.anonCookieName):H4(S,"anoncknm"),R=ge[xj],Y=ge.payloadListener;var y=ge.httpXHROverride,C=ge[MP]?ge[MP]:Ce.endpointUrl;o=C+U4,N=ot(ge[LP])?!0:!ge[LP],x=!ge[Ij];var I=ge.valueSanitizer,B=ge[Aj],Q=!!Ce[Gv];ot(ge[Gv])||(Q=!!ge[Gv]),M=ge.xhrTimeout,q=!!ge[FP],k=!!ge[jP],ne=ge[Mj]!==!1,re=!!ge[Lj],F.getPlugin("LocalStorage")&&(k=!0),u=!pc(),E=new tq(h,I,B,Q,Jf,re),fe(ge[qP])||(u=!!ge[qP]),ge[UP]&&(K=ge[UP]);var ae=ye();L?L.SetConfig(ae):(L=new Ku,L[tl](ae,f));var de=y,Me=ge[YP]?y:null,tt=ge[YP]?y:null,Ue=[3,2];if(!y){_=!1;var m=[];pc()?(m=[2,1],Ue=[2,1,3]):m=[1,2,3],m=aa(m,ge.transports),y=_e(m,!1),y||Hr(f,"No available transport to send events"),de=_e(m,!0)}Me||(Ue=aa(Ue,ge[Fj]),Me=_e(Ue,!0)),W=!_&&(u&&ci()||!k&&ua(!0)),g=(ve={},ve[0]=y,ve[1]=de||_e([1,2,3],!0),ve[2]=Me||de||_e([1],!0),ve[3]=tt||_e([2,3],!0)||de||_e([1],!0),ve)})),oe=!0)},z.addResponseHandler=function(D){return Z[Zn](D),{rm:function(){var F=Z.indexOf(D);F>=0&&Z[Zu](F,1)}}},z[Wv]=function(D){try{if(E)return E.getEventBlob(D)}catch{}return So},z[zv]=function(){try{var D=E&&E[Kv](0,!1,!1,!1,1,0);return be(D,N)}catch{}return null},z[Uh]=function(D,F){try{var $=[];se(D,function(y){F&&(y=ai(y));var C=Nc.create(y[Pi],[y]);$[Zn](C)});for(var ue=null;$[ut]>0&&E;){var ve=$.shift();ve&&ve[bn]()>0&&(ue=ue||E[Kv](0,!1,!1,!1,1,0),E.appendPayload(ue,ve,e))}var Ce=be(ue,N),ge={data:ue[kP],urlString:Ce.url,headers:Ce[el],timeout:M,disableXhrSync:q,disableFetchKeepAlive:k};return N&&(ay(ge[Do],Mh)||(ge[Do][Mh]=RP),ay(ge[Do],Qf)||(ge[Do][Qf]=Iv)),ge}catch{}return null};function _e(D,F){try{return L&&L.getSenderInst(D,F)}catch{}return null}z._getDbgPlgTargets=function(){return[g[0],s,E,g,ye(),o]};function ye(){try{var D={xdrOnComplete:Fe,fetchOnComplete:lt,xhrOnComplete:Dt,beaconOnRetry:Cn},F={enableSendPromise:!1,isOneDs:!0,disableCredentials:!j,fetchCredentials:K,disableXhr:!1,disableBeacon:!u,disableBeaconSync:!u,disableFetchKeepAlive:k,timeWrapper:U,addNoResponse:ne,senderOnCompleteCallBack:D};return F}catch{}return null}function Fe(D,F,$){var ue=mo(D);Lt(F,200,{},ue),Tn(ue)}function Pe(){var D;o=null,s=new Kj,a=!1,c=new Wj,u=!1,l=0,d=null,f=null,g=null,h=null,_=!0,S=[],b={},v=[],E=null,x=!1,P=null,T=!1,N=!1,M=D,q=D,k=D,W=D,ne=D,he=[],R=D,Y=D,Z=[],oe=!1,U=sd(),re=!1,L=null}function lt(D,F,$,ue){var ve=function(y,C,I){Lt(F,y,C,I),Tn(I)},Ce={},ge=D[Do];ge&&ge.forEach(function(y,C){Ce[C]=y}),ve(D.status,Ce,$||So)}function Dt(D,F,$){var ue=mo(D);Lt(F,D.status,ca(D,!0),ue),Tn(ue)}function Lt(D,F,$,ue){try{D(F,$,ue)}catch(ve){pe(f,2,518,Ae(ve))}}function Cn(D,F,$){var ue=D,ve=200,Ce=ue[ed],ge=D[HP]+(ne?q4:So);try{var y=Jn();if(Ce){var C=!!h.getPlugin("LocalStorage"),I=[],B=[];se(Ce[Mr],function(Q){if(I&&Q&&Q[bn]()>0)for(var ae=Q[hs](),de=0;de<ae[ut];de++)if(y.sendBeacon(ge,E.getEventBlob(ae[de])))B[Zn](Q[de]);else{I[Zn](Q[gs](de));break}else I[Zn](Q[gs](0))}),B[ut]>0&&(Ce.sentEvts=B),C||Pt(I,8003,Ce[li],!0)}else ve=0}catch(Q){Hr(f,"Failed to send telemetry using sendBeacon API. Ex:"+Ae(Q)),ve=0}finally{Lt(F,ve,{},So)}}function vt(D){return D===2||D===3}function Ze(D){return T&&vt(D)&&(D=2),D}z[Yh]=function(D,F){b[D]=F},z.removeHeader=function(D){delete b[D]},z[kh]=function(){return It()&&c[jh]()},z[td]=function(D,F){ot(D)&&(D=0),T&&(D=Ze(D),F=2),X(v,D,0)&&Re(ht(),0,!1,D,F||0)},z[Vv]=function(){return!a&&l===0&&v[ut]===0},z[Hh]=function(D){T=D},z.addBatch=function(D){if(D&&D[bn]()>0){if(s.isTenantKilled(D[Pi]()))return!1;v[Zn](D)}return!0},z.teardown=function(){v[ut]>0&&Re(ht(),0,!0,2,2),se(he,function(D){D&&D.rm&&D.rm()}),he=[]},z.pause=function(){a=!0},z[nd]=function(){a=!1,z[td](0,4)},z[Xv]=function(D,F,$){D&&D[bn]()>0&&(fe(F)&&(F=1),T&&(F=Ze(F),$=2),Re([D],0,!1,F,$||0))};function It(){return!a&&l<n}function ht(){var D=v;return v=[],D}function X(D,F,$){var ue=!1;return D&&D[ut]>0&&!a&&g[F]&&E&&(ue=F!==0||It()&&($>0||c[jh]())),ue}function me(D){var F={};return D&&se(D,function($,ue){F[ue]={iKey:$[Pi](),evts:$[hs]()}}),F}function Re(D,F,$,ue,ve){if(!(!D||D[ut]===0)){if(a){Pt(D,1,ue);return}ue=Ze(ue);try{var Ce=D,ge=ue!==0;En(h,function(){return"HttpManager:_sendBatches"},function(y){y&&(D=D.slice(0));for(var C=[],I=null,B=ui(),Q=g[ue]||(ge?g[1]:g[0]),ae=Q&&Q[Jv],de=W&&(T||vt(ue)||ae===3||Q._isSync&&ae===2);X(D,ue,F);){var Me=D.shift();Me&&Me[bn]()>0&&(s.isTenantKilled(Me[Pi]())?C[Zn](Me):(I=I||E[Kv](F,$,ge,de,ve,ue),E.appendPayload(I,Me,e)?I.overflow!==null&&(D=[I.overflow][ps](D),I.overflow=null,Je(I,B,ui(),ve),B=ui(),I=null):(Je(I,B,ui(),ve),B=ui(),D=[Me][ps](D),I=null)))}I&&Je(I,B,ui(),ve),D[ut]>0&&(v=D[ps](v)),Pt(C,8004,ue)},function(){return{batches:me(Ce),retryCount:F,isTeardown:$,isSynchronous:ge,sendReason:ve,useSendBeacon:vt(ue),sendType:ue}},!ge)}catch(y){pe(f,2,48,"Unexpected Exception sending batch: "+Ae(y))}}}function be(D,F){var $={url:o,hdrs:{},useHdrs:!1};F?($[el]=Xu($[el],b),$.useHdrs=yr($.hdrs)[ut]>0):je(b,function(y,C){XP[y]?ad($,XP[y],C,!1):($[el][y]=C,$[Hv]=!0)}),ad($,OP,"NO_AUTH",F),ad($,Av,Xf,F);var ue=So;se(D.apiKeys,function(y){ue[ut]>0&&(ue+=","),ue+=y}),ad($,Fv,ue,F),ad($,Lv,hn().toString(),F);var ve=Jt(D);if(dr(ve)&&($.url+="&ext.intweb.msfpc="+ve),c[Uv]()&&ad($,Mv,c[Yv](),F),h[rd]){var Ce=h[rd]();Ce>=0&&($.url+="&w="+Ce)}for(var ge=0;ge<S[ut];ge++)$.url+="&"+S[ge].name+"="+S[ge].value;return $}function Te(D,F,$){D[F]=D[F]||{},D[F][d.identifier]=$}function Je(D,F,$,ue){if(D&&D.payloadBlob&&D.payloadBlob[ut]>0){var ve=!!R,Ce=g[D.sendType];!vt(D[li])&&D[$P]&&D.sendReason===2&&(Ce=g[2]||g[3]||Ce);var ge=N;(D.isBeacon||Ce[Jv]===3)&&(ge=!1);var y=be(D,ge);ge=ge||y[Hv];var C=ui();En(h,function(){return"HttpManager:_doPayloadSend"},function(){for(var I=0;I<D.batches[ut];I++)for(var B=D[Mr][I],Q=B[hs](),ae=0;ae<Q[ut];ae++){var de=Q[ae];if(x){var Me=de[$h]=de[$h]||{};Te(Me,"sendEventStart",C),Te(Me,"serializationStart",F),Te(Me,"serializationCompleted",$)}de[KP]>0?de[KP]++:de[KP]=1}Pt(D[Mr],1e3+(ue||0),D[li],!0);var tt={data:D[kP],urlString:y.url,headers:y[el],_thePayload:D,_sendReason:ue,timeout:M,disableXhrSync:q,disableFetchKeepAlive:k};ge&&(ay(tt[Do],Mh)||(tt[Do][Mh]=RP),ay(tt[Do],Qf)||(tt[Do][Qf]=Iv));var Ue=null;Ce&&(Ue=function(m){c[qv]();var G=function(pt,_t){gt(pt,_t,D,ue)},Se=D[Qv]||D[Zv];try{Ce.sendPOST(m,G,Se),Y&&Y(tt,m,Se,D[$P])}catch(pt){Hr(f,"Unexpected exception sending payload. Ex:"+Ae(pt)),Lt(G,0,{})}}),En(h,function(){return"HttpManager:_doPayloadSend.sender"},function(){if(Ue)if(D[li]===0&&l++,ve&&!D.isBeacon&&Ce[Jv]!==3){var m={data:tt[id],urlString:tt[HP],headers:Xu({},tt[Do]),timeout:tt[qj],disableXhrSync:tt[FP],disableFetchKeepAlive:tt[jP]},G=!1;En(h,function(){return"HttpManager:_doPayloadSend.sendHook"},function(){try{R(m,function(Se){G=!0,!_&&!Se[ed]&&(Se[ed]=Se[ed]||tt[ed],Se[ey]=Se[ey]||tt[ey]),Ue(Se)},D.isSync||D[Qv])}catch{G||Ue(tt)}})}else Ue(tt)})},function(){return{thePayload:D,serializationStart:F,serializationCompleted:$,sendReason:ue}},D[Zv])}D.sizeExceed&&D.sizeExceed[ut]>0&&Pt(D.sizeExceed,8003,D[li]),D.failedEvts&&D.failedEvts[ut]>0&&Pt(D.failedEvts,8002,D[li])}function ke(D,F){x&&se(D,function($){var ue=$[$h]=$[$h]||{};Te(ue,"sendEventCompleted",F)})}function gt(D,F,$,ue){var ve=9e3,Ce=null,ge=!1,y=!1;try{var C=!0;if(typeof D!==Wo){if(F){c[qh](F[Rj]);var I=F[Pj]||F["kill-duration-seconds"];se(s[ty](F[Nj],I),function(Q){se($[Mr],function(ae){if(ae[Pi]()===Q){Ce=Ce||[];var de=ae[gs](0);$.numEvents-=de[bn](),Ce[Zn](de)}})})}if(D==200||D==204){ve=200;return}(!Jj(D)||$.numEvents<=0)&&(C=!1),ve=9e3+D%1e3}if(C){ve=100;var B=$.retryCnt;$[li]===0&&(B<r?(ge=!0,rn(function(){$[li]===0&&l--,Re($[Mr],B+1,$[Qv],T?2:$[li],5)},T,oy(B))):(y=!0,T&&(ve=8001)))}}finally{ge||(c[qh](),ct($,ve,ue,y)),Pt(Ce,8004,$[li])}}function ct(D,F,$,ue){try{ue&&d[ny]();var ve=D[Mr];F===200&&(ve=D.sentEvts||D[Mr],!ue&&!D[Zv]&&d._clearBackOff(),wt(ve)),Pt(ve,F,D[li],!0)}finally{D[li]===0&&(l--,$!==5&&z.sendQueuedRequests(D[li],$))}}function wt(D){if(x){var F=ui();se(D,function($){$&&$[bn]()>0&&ke($[hs](),F)})}}function rn(D,F,$){F?D():U.set(D,$)}function Jt(D){for(var F=0;F<D.batches[ut];F++){var $=D[Mr][F].Msfpc();if($)return encodeURIComponent($)}return So}function Tn(D){var F=Z;try{for(var $=0;$<F[ut];$++)try{F[$](D)}catch(ve){pe(f,1,519,"Response handler failed: "+ve)}if(D){var ue=JSON.parse(D);dr(ue.webResult)&&dr(ue.webResult[Zf])&&P.set("MSFPC",ue.webResult[Zf],365*86400)}}catch{}}function Pt(D,F,$,ue){if(D&&D[ut]>0&&i){var ve=i[O(F)];if(ve){var Ce=$!==0;En(h,function(){return"HttpManager:_sendBatchesNotification"},function(){rn(function(){try{ve.call(i,D,F,Ce,$)}catch(ge){pe(f,1,74,"send request notification failed: "+ge)}},ue||Ce,0)},function(){return{batches:me(D),reason:F,isSync:Ce,sendSync:ue,sendType:$}},!Ce)}}}function O(D){var F=Y4[D];return dr(F)||(F=wj,D>=9e3&&D<=9999?F=Tj:D>=8e3&&D<=8999?F=xv:D>=1e3&&D<=1999&&(F=Cj)),F}})}return t.__ieDyn=1,t})()});function K4(t){return t&&t.sendPOST}var $4,oq,B4,cq,uq,G4,sq,W4,JP,ol,aq,$n,z4,lq,fq=ce(()=>{"use strict";ei();lr();Ju();Lu();Ge();NP();iy();iq();Fh();WP();zP();od();$4=.25,oq=500,B4=20,cq=6,uq=2,G4=4,sq=2,W4=1,JP=1e4,ol="eventsDiscarded",aq="",$n=void 0,z4=Vo({eventsLimitInMem:{isVal:Tc,v:JP},immediateEventLimit:{isVal:Tc,v:500},autoFlushEventsLimit:{isVal:Tc,v:0},disableAutoBatchFlushLimit:!1,httpXHROverride:{isVal:K4,v:$n},overrideInstrumentationKey:$n,overrideEndpointUrl:$n,disableTelemetry:!1,ignoreMc1Ms0CookieProcessing:!1,setTimeoutOverride:$n,clearTimeoutOverride:$n,payloadPreprocessor:$n,payloadListener:$n,disableEventTimings:$n,valueSanitizer:$n,stringifyObjects:$n,enableCompoundKey:$n,disableOptimizeObj:!1,fetchCredentials:$n,transports:$n,unloadTransports:$n,useSendBeacon:$n,disableFetchKeepAlive:$n,avoidOptions:!1,xhrTimeout:$n,disableXhrSync:$n,alwaysUseXhrOverride:!1,maxEventRetryAttempts:{isVal:vr,v:cq},maxUnloadEventRetryAttempts:{isVal:vr,v:uq},addNoResponse:$n,excludeCsMetaData:$n});lq=(function(t){Zr(e,t);function e(){var n=t.call(this)||this;n.identifier="PostChannel",n.priority=1011,n.version="4.3.4";var r,i=!1,o=[],s,a=!1,c=0,u,l=0,d,f={},g=Qu,h,_,S,b,v,E,x,P,T,N,M,q,k,W,ne,he,R,Y,Z,oe,U,re;return dt(e,n,function(L,K){Ze(),L._getDbgPlgTargets=function(){return[v,r]},L[tl]=function(y,C,I){En(C,function(){return"PostChannel:initialize"},function(){K[tl](y,C,I),Z=C.getNotifyMgr();try{ne=Ni(Er(L[Bh]),C.evtNamespace&&C.evtNamespace()),L._addHook(Hn(y,function(B){var Q=B.cfg,ae=$r(null,Q,C);r=ae.getExtCfg(L[Bh],z4),he=sd(r[$v],r[Bv]),M=!r[Uj]&&Nv(),R=r[Yj],j(C),d=r[BP],u=r.immediateEventLimit,x=r[GP],k=r.maxEventRetryAttempts,W=r.maxUnloadEventRetryAttempts,Y=r[kj],Yr(Q.endpointUrl)?L.pause():a&&L[nd](),ge(),U=r[Hj],re=!!r[$j],oe&&z();var de=Q.disablePageUnloadEvents||[];oe=Nh(Fe,de,ne),oe=zf(Fe,de,ne)||oe,oe=Kf(Pe,Q.disablePageShowEvents,ne)||oe})),v[tl](y,L.core,L)}catch(B){throw L.setInitialized(!1),B}},function(){return{theConfig:y,core:C,extensions:I}})},L.processTelemetry=function(y,C){Ah(y,L[Bh]),C=C||L._getTelCtx(C);var I=y;!re&&!i&&(U&&(I[Pi]=U),Dt(I,!0),q?X(2,2):vt()),L.processNext(I,C)},L.getOfflineSupport=function(){try{var y=v&&v[zv]();if(v)return{getUrl:function(){return y?y.url:null},serialize:ye,batch:_e,shouldProcess:function(C){return!re},createPayload:function(C){return null},createOneDSPayload:function(C){if(v[Uh])return v[Uh](C,M)}}}catch{}return null},L._doTeardown=function(y,C){X(2,2),i=!0,v.teardown(),z(),Ze()};function z(){Ph(null,ne),Rh(null,ne),Oh(null,ne)}function j(y){var C=y[rd];y[rd]=function(){var I=0;return R&&(I=I|2),I|C.call(y)}}function _e(y){var C=aq;return y&&y[ut]&&se(y,function(I){C&&(C+=`
`),C+=I}),C}function ye(y){var C=aq;try{lt(y),C=v[Wv](y)}catch{}return C}function Fe(y){var C=y||Yn().event;C.type!=="beforeunload"&&(q=!0,v[Hh](q)),X(2,2)}function Pe(y){q=!1,v[Hh](q)}function lt(y){y.ext&&y.ext[AP]&&delete y.ext[AP],y.ext&&y.ext[jv]&&y.ext[jv].id&&delete y.ext[jv].id,M&&(y.ext=ai(y.ext),y[ry]&&(y[ry]=ai(y[ry])),y[id]&&(y[id]=ai(y[id])))}function Dt(y,C){if(y[Gh]||(y[Gh]=0),y[wc]||(y[wc]=1),lt(y),y[nl]){if(S||a)y[wc]=3,y[nl]=!1;else if(v){M&&(y=ai(y)),v[Xv](Nc.create(y[Pi],[y]),y[nl]===!0?1:y[nl],3);return}}var I=y[wc],B=l,Q=d;I===4&&(B=c,Q=u);var ae=!1;if(B<Q)ae=!Te(y,C);else{var de=1,Me=B4;I===4&&(de=4,Me=1),ae=!0,Je(y[Pi],y[wc],de,Me)&&(ae=!Te(y,C))}ae&&O(ol,[y],lo.QueueFull)}L.setEventQueueLimits=function(y,C){r[BP]=d=Tc(y)?y:JP,r[GP]=x=Tc(C)?C:0,ge();var I=l>y;if(!I&&P>0)for(var B=1;!I&&B<=3;B++){var Q=E[B];Q&&Q[Mr]&&se(Q[Mr],function(ae){ae&&ae[bn]()>=P&&(I=!0)})}be(!0,I)},L.pause=function(){ht(),a=!0,v&&v.pause()},L[nd]=function(){a=!1,v&&v[nd](),vt()},L._loadTransmitProfiles=function(y){rn(),je(y,function(C,I){var B=I[ut];if(B>=2){var Q=B>2?I[2]:0;if(I[Zu](0,B-2),I[1]<0&&(I[0]=-1),I[1]>0&&I[0]>0){var ae=I[0]/I[1];I[0]=Math.ceil(ae)*I[1]}Q>=0&&I[1]>=0&&Q>I[1]&&(Q=I[1]),I[Zn](Q),f[C]=I}})},L.flush=function(y,C,I){y===void 0&&(y=!0);var B;if(!a)if(I=I||1,y)C||(B=ki(function(ae){C=ae})),s==null?(ht(),gt(1,0,I),s=It(function(){s=null,ct(C,I)},0)):o[Zn](C);else{var Q=ht();Lt(1,1,I),C&&C(),Q&&vt()}return B},L.setMsaAuthTicket=function(y){v[Yh](Lh,y)},L.setAuthPluginHeader=function(y){v[Yh](xP,y)},L.removeAuthPluginHeader=function(){v.removeHeader(xP)},L.hasEvents=Cn,L._setTransmitProfile=function(y){g!==y&&f[y]!==void 0&&(ht(),g=y,vt())},wi(L,function(){return v},["addResponseHandler"]);function Lt(y,C,I){var B=gt(y,C,I);return v[td](C,I),B}function Cn(){return l>0}function vt(){if(T>=0&&gt(T,0,N)&&v[td](0,N),c>0&&!_&&!a){var y=f[g][2];y>=0&&(_=It(function(){_=null,Lt(4,0,1),vt()},y))}var C=f[g][1];!h&&!s&&C>=0&&!a&&(Cn()?h=It(function(){h=null,Lt(b===0?3:1,0,1),b++,b%=2,vt()},C):b=0)}L[ny]=function(){S<G4&&(S++,ht(),vt())},L._clearBackOff=function(){S&&(S=0,ht(),vt())};function Ze(){r=null,i=!1,o=[],s=null,a=!1,c=0,u=500,l=0,d=JP,f={},g=Qu,h=null,_=null,S=0,b=0,E={},x=0,oe=!1,P=0,T=-1,N=null,M=!0,q=!1,k=cq,W=uq,ne=null,U=null,re=!1,he=sd(),v=new rq(oq,sq,W4,{requeue:Tn,send:F,sent:$,drop:ue,rspFail:ve,oth:Ce}),Jt(),me(),ge()}function It(y,C){C===0&&S&&(C=1);var I=1e3;return S&&(I=oy(S-1)),he.set(y,C*I)}function ht(){return h!==null?(h.cancel(),h=null,b=0,!0):!1}function X(y,C){ht(),s&&(s.cancel(),s=null),a||Lt(1,y,C)}function me(){E[4]={batches:[],iKeyMap:{}},E[3]={batches:[],iKeyMap:{}},E[2]={batches:[],iKeyMap:{}},E[1]={batches:[],iKeyMap:{}}}function Re(y,C,I){var B=E[C];B||(C=1,B=E[C]);var Q=B.iKeyMap[y];return!Q&&I&&(Q=Nc.create(y),B.batches[Zn](Q),B.iKeyMap[y]=Q),Q}function be(y,C){v[kh]()&&!S&&(x>0&&l>x&&(C=!0),C&&s==null&&L.flush(y,function(){},20))}function Te(y,C){M&&(y=ai(y));var I=y[wc],B=Re(y[Pi],I,!0);return B.addEvent(y)?(I!==4?(l++,C&&y[Gh]===0&&be(!y.sync,P>0&&B[bn]()>=P)):c++,!0):!1}function Je(y,C,I,B){for(;I<=C;){var Q=Re(y,C,!0);if(Q&&Q[bn]()>0){var ae=Q[gs](0,B),de=ae[bn]();if(de>0)return I===4?c-=de:l-=de,D(ol,[ae],lo.QueueFull),!0}I++}return ke(),!1}function ke(){for(var y=0,C=0,I=function(Q){var ae=E[Q];ae&&ae[Mr]&&se(ae[Mr],function(de){Q===4?y+=de[bn]():C+=de[bn]()})},B=1;B<=4;B++)I(B);l=C,c=y}function gt(y,C,I){var B=!1,Q=C===0;return!Q||v[kh]()?En(L.core,function(){return"PostChannel._queueBatches"},function(){for(var ae=[],de=4;de>=y;){var Me=E[de];Me&&Me.batches&&Me.batches[ut]>0&&(se(Me[Mr],function(tt){v.addBatch(tt)?B=B||tt&&tt[bn]()>0:ae=ae[ps](tt[hs]()),de===4?c-=tt[bn]():l-=tt[bn]()}),Me[Mr]=[],Me.iKeyMap={}),de--}ae[ut]>0&&O(ol,ae,lo.KillSwitch),B&&T>=y&&(T=-1,N=0)},function(){return{latency:y,sendType:C,sendReason:I}},!Q):(T=T>=0?Math.min(T,y):y,N=Math.max(N,I)),B}function ct(y,C){Lt(1,0,C),ke(),wt(function(){y&&y(),o[ut]>0?s=It(function(){s=null,ct(o.shift(),C)},0):(s=null,vt())})}function wt(y){v[Vv]()?y():s=It(function(){s=null,wt(y)},$4)}function rn(){ht(),Jt(),g=Qu,vt()}function Jt(){f={},f[Qu]=[2,1,0],f[Rv]=[6,3,0],f[Ov]=[18,9,0]}function Tn(y,C){var I=[],B=k;q&&(B=W),se(y,function(Q){Q&&Q[bn]()>0&&se(Q[hs](),function(ae){ae&&(ae[nl]&&(ae[wc]=4,ae[nl]=!1),ae[Gh]<B?(Ah(ae,L[Bh]),Dt(ae,!1)):I[Zn](ae))})}),I[ut]>0&&O(ol,I,lo.NonRetryableStatus),q&&X(2,2)}function Pt(y,C){var I=Z||{},B=I[y];if(B)try{B.apply(I,C)}catch(Q){pe(L.diagLog(),1,74,y+" notification failed: "+Q)}}function O(y,C){for(var I=[],B=2;B<arguments.length;B++)I[B-2]=arguments[B];C&&C[ut]>0&&Pt(y,[C][ps](I))}function D(y,C){for(var I=[],B=2;B<arguments.length;B++)I[B-2]=arguments[B];C&&C[ut]>0&&se(C,function(Q){Q&&Q[bn]()>0&&Pt(y,[Q.events()][ps](I))})}function F(y,C,I){y&&y[ut]>0&&Pt("eventsSendRequest",[C>=1e3&&C<=1999?C-1e3:0,I!==!0])}function $(y,C){D("eventsSent",y,C),vt()}function ue(y,C){D(ol,y,C>=8e3&&C<=8999?C-8e3:lo.Unknown)}function ve(y){D(ol,y,lo.NonRetryableStatus),vt()}function Ce(y,C){D(ol,y,lo.Unknown),vt()}function ge(){Y?P=0:P=Math.max(oq*(sq+1),d/6)}}),n}return e.__ieDyn=1,e})(ga)});var dq={};Zc(dq,{BE_PROFILE:()=>Ov,NRT_PROFILE:()=>Rv,PostChannel:()=>lq,RT_PROFILE:()=>Qu});var pq=ce(()=>{"use strict";NP();fq()});var gq=V(_s=>{"use strict";var V4=_s&&_s.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),X4=_s&&_s.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hq=_s&&_s.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&V4(e,t,n);return X4(e,t),e};Object.defineProperty(_s,"__esModule",{value:!0});_s.oneDataSystemClientFactory=void 0;var J4=async(t,e,n)=>{let r=await Promise.resolve().then(()=>hq((Ju(),Ns(bj)))),i=await Promise.resolve().then(()=>hq((pq(),Ns(dq)))),o=new r.AppInsightsCore,s=new i.PostChannel,a={instrumentationKey:t,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[s]]};if(n){a.extensionConfig={};let l={alwaysUseXhrOverride:!0,httpXHROverride:n};a.extensionConfig[s.identifier]=l}let u=e.workspace.getConfiguration("telemetry").get("internalTesting");return o.initialize(a,[]),o.addTelemetryInitializer(l=>{l.ext=l.ext??{},l.ext.web=l.ext.web??{},l.ext.web.consentDetails='{"GPC_DataSharingOptIn":false}',u&&(l.ext.utc=l.ext.utc??{},l.ext.utc.flags=8462029)}),o},Q4=async(t,e,n)=>{let r=await J4(t,e,n);return{logEvent:(s,a)=>{try{r?.track({name:s,baseData:{name:s,properties:a?.properties,measurements:a?.measurements}})}catch(c){throw new Error(`Failed to log event to app insights!
`+c.message)}},flush:async()=>{try{return new Promise((a,c)=>{if(!r){a();return}r.flush(!0,u=>{if(!u){c("Failed to flush app 1DS!");return}})})}catch(s){throw new Error(`Failed to flush 1DS!
`+s.message)}},dispose:async()=>new Promise(a=>{if(!r){a();return}r.unload(!1,()=>{a(),r=void 0},1e3)})}};_s.oneDataSystemClientFactory=Q4});var _q,cd,ud,Wh,Pc,Eo,er,cy,Gi=ce(()=>{"use strict";_q="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",cd="sampleRate",ud="ProcessLegacy",Wh="http.method",Pc="https://dc.services.visualstudio.com",Eo="/v2/track",er="not_specified",cy="iKey"});var sl,QP=ce(()=>{"use strict";xt();sl=Jw({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]})});var Sa,ze,ms,Rc,Da,Ea,uy,Bn,bo,Oc,ly,fy,dy,ZP,py,hy,al,ld,eR,zh,cl,Wi,br,Lr,ul,vs,ll,gy,_y,tR,fl,xc,Kh,Vh,dl,fd,pl,nR,tr=ce(()=>{"use strict";Sa="split",ze="length",ms="toLowerCase",Rc="ingestionendpoint",Da="toString",Ea="push",uy="removeItem",Bn="name",bo="message",Oc="count",ly="preTriggerDate",fy="disabled",dy="interval",ZP="daysOfMonth",py="date",hy="getUTCDate",al="stringify",ld="pathname",eR="correlationHeaderExcludePatterns",zh="extensionConfig",cl="exceptions",Wi="parsedStack",br="properties",Lr="measurements",ul="sizeInBytes",vs="typeName",ll="severityLevel",gy="problemGroup",_y="isManual",tR="CreateFromInterface",fl="assembly",xc="fileName",Kh="hasFullStack",Vh="level",dl="method",fd="line",pl="duration",nR="receivedResponse"});function my(t,e,n){var r=e[ze],i=rR(t,e);if(i[ze]!==r){for(var o=0,s=i;n[s]!==void 0;)o++,s=Xn(i,0,147)+iR(o);i=s}return i}function rR(t,e){var n;return e&&(e=Nt(Nn(e)),e[ze]>150&&(n=Xn(e,0,150),pe(t,2,57,"name is too long.  It has been truncated to 150 characters.",{name:e},!0))),n||e}function Mt(t,e,n){n===void 0&&(n=1024);var r;return e&&(n=n||1024,e=Nt(Nn(e)),e[ze]>n&&(r=Xn(e,0,n),pe(t,2,61,"string value is too long. It has been truncated to "+n+" characters.",{value:e},!0))),r||e}function Ic(t,e){return Sy(t,e,2048,66)}function dd(t,e){var n;return e&&e[ze]>32768&&(n=Xn(e,0,32768),pe(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),n||e}function vy(t,e){var n;if(e){var r=""+e;r[ze]>32768&&(n=Xn(r,0,32768),pe(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return n||e}function Fr(t,e){if(e){var n={};je(e,function(r,i){if(pn(i)&&rs())try{i=Dr()[al](i)}catch(o){pe(t,2,49,"custom property is not valid",{exception:o},!0)}i=Mt(t,i,8192),r=my(t,r,n),n[r]=i}),e=n}return e}function jr(t,e){if(e){var n={};je(e,function(r,i){r=my(t,r,n),n[r]=i}),e=n}return e}function yy(t,e){return e&&Sy(t,e,128,69)[Da]()}function Sy(t,e,n,r){var i;return e&&(e=Nt(Nn(e)),e[ze]>n&&(i=Xn(e,0,n),pe(t,2,r,"input is too long, it has been truncated to "+n+" characters.",{data:e},!0))),i||e}function iR(t){var e="00"+t;return Xo(e,e[ze]-3)}var zi=ce(()=>{"use strict";xt();Ge();tr()});function hl(t){var e=vq,n=Z4,r=n[e];return mq.createElement?n[e]||(r=n[e]=mq.createElement("a")):r={host:oR(t,!0)},r.href=t,e++,e>=n[ze]&&(e=0),vq=e,r}function yq(t){var e,n=hl(t);return n&&(e=n.href),e}function Sq(t){var e,n=hl(t);return n&&(e=n[ld]),e}function Dq(t,e){return t?t.toUpperCase()+" "+e:e}function oR(t,e){var n=Xh(t,e)||"";if(n){var r=n.match(/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[ze]>3&&Xe(r[2])&&r[2][ze]>0)return r[2]+(r[3]||"")}return n}function Xh(t,e){var n=null;if(t){var r=t.match(/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[ze]>2&&Xe(r[2])&&r[2][ze]>0&&(n=r[2]||"",e&&r[ze]>2)){var i=(r[1]||"")[ms](),o=r[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),n+=o}}return n}var mq,vq,Z4,sR=ce(()=>{"use strict";xt();tr();mq=Sn()||{},vq=0,Z4=[null,null,null,null,null]});function Jh(t){return bt(e6,t[ms]())!==-1}function Eq(t){aR=t}function bq(){return aR}function Cq(t,e,n){if(!e||t&&t.disableCorrelationHeaders)return!1;if(t&&t[eR]){for(var r=0;r<t.correlationHeaderExcludePatterns[ze];r++)if(t[eR][r].test(e))return!1}var i=hl(e).host[ms]();if(i&&(Qr(i,":443")!==-1||Qr(i,":80")!==-1)&&(i=(Xh(e,!0)||"")[ms]()),(!t||!t.enableCorsCorrelation)&&i&&i!==n)return!1;var o=t&&t.correlationHeaderDomains;if(o){var s;if(se(o,function(u){var l=new RegExp(u.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||l.test(i)}),!s)return!1}var a=t&&t.correlationHeaderExcludedDomains;if(!a||a[ze]===0)return!0;for(var r=0;r<a[ze];r++){var c=new RegExp(a[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[ze]>0}function Tq(t){if(t){var e=cR(t,sl[1]);if(e&&e!==aR)return e}}function cR(t,e){if(t)for(var n=t[Sa](","),r=0;r<n[ze];++r){var i=n[r][Sa]("=");if(i[ze]===2&&i[0]===e)return i[1]}}function wq(t,e,n,r){var i,o=r,s=r;if(e&&e[ze]>0){var a=hl(e);if(i=a.host,!o)if(a[ld]!=null){var c=a.pathname[ze]===0?"/":a[ld];c.charAt(0)!=="/"&&(c="/"+c),s=a[ld],o=Mt(t,n?n+" "+c:c)}else o=Mt(t,e)}else i=r,o=r;return{target:i,name:o,data:s}}function Nq(){var t=tc();if(t&&t.now&&t.timing){var e=t.now()+t.timing.navigationStart;if(e>0)return e}return hn()}function Pq(t,e){var n=null;return t!==0&&e!==0&&!fe(t)&&!fe(e)&&(n=e-t),n}function Rq(t,e){var n=t||{};return{getName:function(){return n[Bn]},setName:function(r){e&&e.setName(r),n[Bn]=r},getTraceId:function(){return n.traceID},setTraceId:function(r){e&&e.setTraceId(r),ss(r)&&(n.traceID=r)},getSpanId:function(){return n.parentID},setSpanId:function(r){e&&e.setSpanId(r),as(r)&&(n.parentID=r)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(r){e&&e.setTraceFlags(r),n.traceFlags=r}}}var e6,aR,uR=ce(()=>{"use strict";xt();Ge();Gi();QP();zi();sR();tr();e6=[Pc+Eo,"https://breeze.aimon.applicationinsights.io"+Eo,"https://dc-int.services.visualstudio.com"+Eo],aR="cid-v1:"});var pd,Oq,xq,lR=ce(()=>{"use strict";xt();pd=Dn({LocalStorage:0,SessionStorage:1}),Oq=Dn({AI:0,AI_AND_W3C:1,W3C:2}),xq=Dn({Normal:1,Critical:2})});function fR(){return hd()?Dy(pd.LocalStorage):null}function Dy(t){try{if(fe(kr()))return null;var e=new Date()[Da](),n=He(t===pd.LocalStorage?"localStorage":"sessionStorage"),r=Iq+e;n.setItem(r,e);var i=n.getItem(r)!==e;if(n[uy](r),!i)return n}catch{}return null}function dR(){return gl()?Dy(pd.SessionStorage):null}function Aq(){Ac=!1,Mc=!1}function Ey(t){Iq=t||""}function Mq(){Ac=hd(!0),Mc=gl(!0)}function hd(t){return(t||Ac===void 0)&&(Ac=!!Dy(pd.LocalStorage)),Ac}function by(t,e){var n=fR();if(n!==null)try{return n.getItem(e)}catch(r){Ac=!1,pe(t,2,1,"Browser failed read of local storage. "+$t(r),{exception:Ae(r)})}return null}function Cy(t,e,n){var r=fR();if(r!==null)try{return r.setItem(e,n),!0}catch(i){Ac=!1,pe(t,2,3,"Browser failed write to local storage. "+$t(i),{exception:Ae(i)})}return!1}function Lq(t,e){var n=fR();if(n!==null)try{return n[uy](e),!0}catch(r){Ac=!1,pe(t,2,5,"Browser failed removal of local storage item. "+$t(r),{exception:Ae(r)})}return!1}function gl(t){return(t||Mc===void 0)&&(Mc=!!Dy(pd.SessionStorage)),Mc}function Fq(){var t=[];return gl()&&je(He("sessionStorage"),function(e){t[Ea](e)}),t}function Ty(t,e){var n=dR();if(n!==null)try{return n.getItem(e)}catch(r){Mc=!1,pe(t,2,2,"Browser failed read of session storage. "+$t(r),{exception:Ae(r)})}return null}function wy(t,e,n){var r=dR();if(r!==null)try{return r.setItem(e,n),!0}catch(i){Mc=!1,pe(t,2,4,"Browser failed write to session storage. "+$t(i),{exception:Ae(i)})}return!1}function Ny(t,e){var n=dR();if(n!==null)try{return n[uy](e),!0}catch(r){Mc=!1,pe(t,2,6,"Browser failed removal of session storage item. "+$t(r),{exception:Ae(r)})}return!1}var Ac,Mc,Iq,pR=ce(()=>{"use strict";xt();lR();tr();Ac=void 0,Mc=void 0,Iq=""});var t6,jq,qq=ce(()=>{"use strict";xt();Ge();pR();tr();t6="appInsightsThrottle",jq=(function(){function t(e,n){var r=this,i,o,s,a,c,u,l,d=!1,f=!1;h(),r._getDbgPlgTargets=function(){return[l]},r.getConfig=function(){return s},r.canThrottle=function(R){var Y=W(R),Z=_(R);return v(Z,i,Y)},r.isTriggered=function(R){return ne(R)},r.isReady=function(){return d},r.flush=function(R){try{var Y=he(R);if(Y&&Y[ze]>0){var Z=Y.slice(0);return l[R]=[],se(Z,function(oe){g(oe.msgID,oe[bo],oe.severity,!1)}),!0}}catch{}return!1},r.flushAll=function(){try{if(l){var R=!0;return je(l,function(Y){var Z=r.flush(parseInt(Y));R=R&&Z}),R}}catch{}return!1},r.onReadyState=function(R,Y){return Y===void 0&&(Y=!0),d=fe(R)?!0:R,d&&Y?r.flushAll():null},r.sendMessage=function(R,Y,Z){return g(R,Y,Z,!0)};function g(R,Y,Z,oe){if(d){var U=k(R);if(!U)return;var re=_(R),L=W(R),K=v(re,i,L),z=!1,j=0,_e=ne(R);try{K&&!_e?(j=Math.min(re.limit.maxSendNumber,L[Oc]+1),L[Oc]=0,z=!0,c[R]=!0,L[ly]=new Date):(c[R]=K,L[Oc]+=1);var ye=E(R);N(o,ye,L);for(var Fe=0;Fe<j;Fe++)q(R,o,Y,Z)}catch{}return{isThrottled:z,throttleNum:j}}else if(oe){var Pe=he(R);Pe[Ea]({msgID:R,message:Y,severity:Z})}return null}function h(){o=vo(e),c={},a={},l={},s={},S(109),u=Hi(n)?n:"",e.addUnloadHook(Hn(e.config,function(R){var Y=R.cfg;i=hd();var Z=Y.throttleMgrCfg||{};je(Z,function(oe,U){S(parseInt(oe),U)})}))}function _(R){return s[R]||s[109]}function S(R,Y){var Z,oe;try{var U=Y||{},re={};re[fy]=!!U[fy];var L=U[dy]||{};f=L?.daysOfMonth&&L?.daysOfMonth[ze]>0,re[dy]=b(L);var K={samplingRate:((Z=U.limit)===null||Z===void 0?void 0:Z.samplingRate)||100,maxSendNumber:((oe=U.limit)===null||oe===void 0?void 0:oe.maxSendNumber)||1};re.limit=K,s[R]=re}catch{}}function b(R){R=R||{};var Y=R?.monthInterval,Z=R?.dayInterval;return fe(Y)&&fe(Z)&&(R.monthInterval=3,f||(R[ZP]=[28],f=!0)),R={monthInterval:R?.monthInterval,dayInterval:R?.dayInterval,daysOfMonth:R?.daysOfMonth},R}function v(R,Y,Z){if(R&&!R[fy]&&Y&&Hi(Z)){var oe=T(),U=Z[py],re=R[dy],L=1;if(re?.monthInterval){var K=(oe.getUTCFullYear()-U.getUTCFullYear())*12+oe.getUTCMonth()-U.getUTCMonth();L=M(re.monthInterval,0,K)}var z=1;if(f)z=bt(re[ZP],oe[hy]());else if(re?.dayInterval){var j=Math.floor((oe.getTime()-U.getTime())/864e5);z=M(re.dayInterval,0,j)}return L>=0&&z>=0}return!1}function E(R,Y){var Z=Hi(Y)?Y:"";return R?t6+Z+"-"+R:null}function x(R){try{if(R){var Y=new Date;return R.getUTCFullYear()===Y.getUTCFullYear()&&R.getUTCMonth()===Y.getUTCMonth()&&R[hy]()===Y[hy]()}}catch{}return!1}function P(R,Y,Z){try{var oe={date:T(),count:0};if(R){var U=JSON.parse(R),re={date:T(U[py])||oe[py],count:U[Oc]||oe[Oc],preTriggerDate:U.preTriggerDate?T(U[ly]):void 0};return re}else return N(Y,Z,oe),oe}catch{}return null}function T(R){try{if(R){var Y=new Date(R);if(!isNaN(Y.getDate()))return Y}else return new Date}catch{}return null}function N(R,Y,Z){try{return Cy(R,Y,Nt(JSON[al](Z)))}catch{}return!1}function M(R,Y,Z){return R<=0?1:Z>=Y&&(Z-Y)%R==0?Math.floor((Z-Y)/R)+1:-1}function q(R,Y,Z,oe){pe(Y,oe||1,R,Z)}function k(R){try{var Y=_(R);return ih(1e6)<=Y.limit.samplingRate}catch{}return!1}function W(R){try{var Y=a[R];if(!Y){var Z=E(R,u);Y=P(by(o,Z),o,Z),a[R]=Y}return a[R]}catch{}return null}function ne(R){var Y=c[R];if(fe(Y)){Y=!1;var Z=W(R);Z&&(Y=x(Z[ly])),c[R]=Y}return c[R]}function he(R){return l=l||{},fe(l[R])&&(l[R]=[]),l[R]}}return t})()});function _l(t){if(!t)return{};var e=t[Sa](n6),n=jp(e,function(i,o){var s=o[Sa](r6);if(s[ze]===2){var a=s[0][ms](),c=s[1];i[a]=c}return i},{});if(yr(n)[ze]>0){if(n.endpointsuffix){var r=n.location?n.location+".":"";n[Rc]=n[Rc]||"https://"+r+"dc."+n.endpointsuffix}n[Rc]=n[Rc]||Pc,Tu(n[Rc],"/")&&(n[Rc]=n[Rc].slice(0,-1))}return n}var n6,r6,Uq,Yq=ce(()=>{"use strict";xt();Gi();tr();n6=";",r6="=";Uq={parse:_l}});var Py,kq=ce(()=>{"use strict";xt();Gi();tr();zi();Py=(function(){function t(e,n,r){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[Bn]=Mt(e,r)||er,o.data=n,o.time=Ti(new Date),o.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return t})()});var ys,Hq=ce(()=>{"use strict";Gi();tr();zi();ys=(function(){function t(e,n,r,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[Bn]=Mt(e,n)||er,o[br]=Fr(e,r),o[Lr]=jr(e,i)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})()});function mR(t,e){var n=t;return n&&!Xe(n)&&(JSON&&JSON[al]?(n=JSON[al](t),e&&(!n||n==="{}")&&(Ye(t[Da])?n=t[Da]():n=""+t)):n=""+t+" - (Missing JSON.stringify)"),n||""}function zq(t,e){var n=t;return t&&(n&&!Xe(n)&&(n=t[_R]||t[Wq]||n),n&&!Xe(n)&&(n=mR(n,!0)),t.filename&&(n=n+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&Qr(n||"",e)===-1&&(n=e+": "+n),n||""}function o6(t){try{if(pn(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}function s6(t){try{if(pn(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}function Bq(t){return t&&t.src&&Xe(t.src)&&t.obj&&Ie(t.obj)}function ml(t){var e=t||"";Xe(e)||(Xe(e[fi])?e=e[fi]:e=""+e);var n=e[Sa](`
`);return{src:e,obj:n}}function a6(t){for(var e=[],n=t[Sa](`
`),r=0;r<n[ze];r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),e[Ea](i)}return{src:t,obj:e}}function Kq(t){var e=null;if(t)try{if(t[fi])e=ml(t[fi]);else if(t[gd]&&t[gd][fi])e=ml(t[gd][fi]);else if(t.exception&&t.exception[fi])e=ml(t.exception[fi]);else if(Bq(t))e=t;else if(Bq(t[gR]))e=t[gR];else if(Yn()&&Yn().opera&&t[_R])e=a6(t[bo]);else if(t.reason&&t.reason[fi])e=ml(t.reason[fi]);else if(Xe(t))e=ml(t);else{var n=t[_R]||t[Wq]||"";Xe(t[$q])&&(n&&(n+=`
`),n+=" from "+t[$q]),n&&(e=ml(n))}}catch(r){e=ml(r)}return e||{src:"",obj:null}}function c6(t){var e="";return t&&(t.obj?se(t.obj,function(n){e+=n+`
`}):e=t.src||""),e}function u6(t){var e,n=t.obj;if(n&&n[ze]>0){e=[];var r=0,i=0;se(n,function(h){var _=h[Da]();if(vR.regex.test(_)){var S=new vR(_,r++);i+=S[ul],e[Ea](S)}});var o=32*1024;if(i>o)for(var s=0,a=e[ze]-1,c=0,u=s,l=a;s<a;){var d=e[s][ul],f=e[a][ul];if(c+=d+f,c>o){var g=l-u+1;e.splice(u,g);break}u=s,l=a,s++,a--}}return e}function Ry(t){var e="";if(t&&(e=t.typeName||t[Bn]||"",!e))try{var n=/function (.{1,200})\(/,r=n.exec(t.constructor[Da]());e=r&&r[ze]>1?r[1]:""}catch{}return e}function hR(t){if(t)try{if(!Xe(t)){var e=Ry(t),n=mR(t,!1);return(!n||n==="{}")&&(t[gd]&&(t=t[gd],e=Ry(t)),n=mR(t,!0)),Qr(n,e)!==0&&e!=="String"?e+":"+n:n}}catch{}return""+(t||"")}var i6,gd,fi,gR,$q,_R,Wq,Lc,Gq,vR,Vq=ce(()=>{"use strict";ei();xt();Ge();Gi();tr();zi();i6="<no_method>",gd="error",fi="stack",gR="stackDetails",$q="errorSrc",_R="message",Wq="description";Lc=(function(){function t(e,n,r,i,o,s){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,s6(n)?(a[cl]=n[cl]||[],a[br]=n[br],a[Lr]=n[Lr],n[ll]&&(a[ll]=n[ll]),n.id&&(a.id=n.id,n[br].id=n.id),n[gy]&&(a[gy]=n[gy]),fe(n[_y])||(a[_y]=n[_y])):(r||(r={}),s&&(r.id=s),a[cl]=[new Gq(e,n,r)],a[br]=Fr(e,r),a[Lr]=jr(e,i),o&&(a[ll]=o),s&&(a.id=s))}return t.CreateAutoException=function(e,n,r,i,o,s,a,c){var u,l=Ry(o||s||e);return u={},u[bo]=zq(e,l),u.url=n,u.lineNumber=r,u.columnNumber=i,u.error=hR(o||s||e),u.evt=hR(s||e),u[vs]=l,u.stackDetails=Kq(a||o||s),u.errorSrc=c,u},t.CreateFromInterface=function(e,n,r,i){var o=n[cl]&&Zs(n[cl],function(a){return Gq[tR](e,a)}),s=new t(e,Ui(Ui({},n),{exceptions:o}),r,i);return s},t.prototype.toInterface=function(){var e,n=this,r=n.exceptions,i=n.properties,o=n.measurements,s=n.severityLevel,a=n.problemGroup,c=n.id,u=n.isManual,l=r instanceof Array&&Zs(r,function(d){return d.toInterface()})||void 0;return e={ver:"4.0"},e[cl]=l,e.severityLevel=s,e.properties=i,e.measurements=o,e.problemGroup=a,e.id=c,e.isManual=u,e},t.CreateSimpleException=function(e,n,r,i,o,s){var a;return{exceptions:[(a={},a[Kh]=!0,a.message=e,a.stack=o,a.typeName=n,a)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=hR,t})(),Gq=(function(){function t(e,n,r){this.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2};var i=this;if(o6(n))i[vs]=n[vs],i[bo]=n[bo],i[fi]=n[fi],i[Wi]=n[Wi]||[],i[Kh]=n[Kh];else{var o=n,s=o&&o.evt;Du(o)||(o=o[gd]||s||o),i[vs]=Mt(e,Ry(o))||er,i[bo]=dd(e,zq(n||o,i[vs]))||er;var a=n[gR]||Kq(n);i[Wi]=u6(a),Ie(i[Wi])&&Zs(i[Wi],function(c){c[fl]=Mt(e,c[fl]),c[xc]=Mt(e,c[xc])}),i[fi]=vy(e,c6(a)),i.hasFullStack=Ie(i.parsedStack)&&i.parsedStack[ze]>0,r&&(r[vs]=r[vs]||i[vs])}}return t.prototype.toInterface=function(){var e,n=this,r=n[Wi]instanceof Array&&Zs(n[Wi],function(o){return o.toInterface()}),i=(e={id:n.id,outerId:n.outerId,typeName:n[vs],message:n[bo],hasFullStack:n[Kh],stack:n[fi]},e[Wi]=r||void 0,e);return i},t.CreateFromInterface=function(e,n){var r=n[Wi]instanceof Array&&Zs(n[Wi],function(o){return vR[tR](o)})||n[Wi],i=new t(e,Ui(Ui({},n),{parsedStack:r}));return i},t})(),vR=(function(){function t(e,n){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var r=this;if(r[ul]=0,typeof e=="string"){var i=e;r[Vh]=n,r[dl]=i6,r[fl]=Nt(i),r[xc]="",r[fd]=0;var o=i.match(t.regex);o&&o[ze]>=5&&(r[dl]=Nt(o[2])||r[dl],r[xc]=Nt(o[4]),r[fd]=parseInt(o[5])||0)}else r[Vh]=e[Vh],r[dl]=e[dl],r[fl]=e[fl],r[xc]=e[xc],r[fd]=e[fd],r[ul]=0;r.sizeInBytes+=r.method[ze],r.sizeInBytes+=r.fileName[ze],r.sizeInBytes+=r.assembly[ze],r[ul]+=t.baseSize,r.sizeInBytes+=r.level.toString()[ze],r.sizeInBytes+=r.line.toString()[ze]}return t.CreateFromInterface=function(e){return new t(e,null)},t.prototype.toInterface=function(){var e=this;return{level:e[Vh],method:e[dl],assembly:e[fl],fileName:e[xc],line:e[fd]}},t.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,t.baseSize=58,t})()});var Xq,Jq=ce(()=>{"use strict";Xq=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return t})()});var Ss,Qq=ce(()=>{"use strict";Gi();tr();Jq();zi();Ss=(function(){function t(e,n,r,i,o,s,a,c,u){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var d=new Xq;d[Oc]=i>0?i:void 0,d.max=isNaN(s)||s===null?void 0:s,d.min=isNaN(o)||o===null?void 0:o,d[Bn]=Mt(e,n)||er,d.value=r,d.stdDev=isNaN(a)||a===null?void 0:a,l.metrics=[d],l[br]=Fr(e,c),l[Lr]=jr(e,u)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})()});function Zq(t,e){return e===void 0&&(e=!1),t==null?e:t.toString()[ms]()==="true"}function _d(t){(isNaN(t)||t<0)&&(t=0),t=Math.round(t);var e=Qh+t%1e3,n=Qh+Math.floor(t/1e3)%60,r=Qh+Math.floor(t/(1e3*60))%60,i=Qh+Math.floor(t/(1e3*60*60))%24,o=Math.floor(t/(1e3*60*60*24));return e=e[ze]===1?"00"+e:e[ze]===2?"0"+e:e,n=n[ze]<2?"0"+n:n,r=r[ze]<2?"0"+r:r,i=i[ze]<2?"0"+i:i,(o>0?o+".":Qh)+i+":"+r+":"+n+"."+e}function eU(t,e){var n=null;return se(t,function(r){if(r.identifier===e)return n=r,-1}),n}function tU(t,e,n,r,i){return!i&&Xe(t)&&(t==="Script error."||t==="Script error")}var Qh,Oy=ce(()=>{"use strict";xt();tr();Qh=""});var Fc,nU=ce(()=>{"use strict";Gi();Oy();tr();zi();Fc=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var c=this;c.ver=2,c.id=yy(e,a),c.url=Ic(e,r),c[Bn]=Mt(e,n)||er,isNaN(i)||(c[pl]=_d(i)),c[br]=Fr(e,o),c[Lr]=jr(e,s)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})()});var jc,rU=ce(()=>{"use strict";Oy();uR();tr();zi();jc=(function(){function t(e,n,r,i,o,s,a,c,u,l,d,f){u===void 0&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var g=this;g.ver=2,g.id=n,g[pl]=_d(o),g.success=s,g.resultCode=a+"",g.type=Mt(e,u);var h=wq(e,r,c,i);g.data=Ic(e,i)||h.data,g.target=Mt(e,h.target),l&&(g.target="".concat(g.target," | ").concat(l)),g[Bn]=Mt(e,h[Bn]),g[br]=Fr(e,d),g[Lr]=jr(e,f)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})()});var qc,iU=ce(()=>{"use strict";Gi();tr();zi();qc=(function(){function t(e,n,r,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var s=this;s.ver=2,n=n||er,s[bo]=dd(e,n),s[br]=Fr(e,i),s[Lr]=jr(e,o),r&&(s[ll]=r)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})()});var Uc,oU=ce(()=>{"use strict";Gi();tr();zi();Uc=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var c=this;c.ver=2,c.url=Ic(e,r),c[Bn]=Mt(e,n)||er,c[br]=Fr(e,o),c[Lr]=jr(e,s),a&&(c.domProcessing=a.domProcessing,c[pl]=a[pl],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c[nR]=a[nR],c.sentRequest=a.sentRequest)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})()});var Ds,sU=ce(()=>{"use strict";Ds=(function(){function t(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n}return t})()});var xy,aU=ce(()=>{"use strict";xt();xy=Dn({Verbose:0,Information:1,Warning:2,Error:3,Critical:4})});var cU,uU=ce(()=>{"use strict";xt();tr();cU=(function(){function t(){}return t.getConfig=function(e,n,r,i){i===void 0&&(i=!1);var o;return r&&e[zh]&&e[zh][r]&&!fe(e[zh][r][n])?o=e[zh][r][n]:o=e[n],fe(o)?i:o},t})()});function kc(t){var e="ai."+t+".";return function(n){return e+n}}var Zh,nr,Iy,md,yR,Yc,vl,eg,vd,SR=ce(()=>{"use strict";ei();xt();Zh=kc("application"),nr=kc("device"),Iy=kc("location"),md=kc("operation"),yR=kc("session"),Yc=kc("user"),vl=kc("cloud"),eg=kc("internal"),vd=(function(t){Zr(e,t);function e(){return t.call(this)||this}return e})(vN({applicationVersion:Zh("ver"),applicationBuild:Zh("build"),applicationTypeId:Zh("typeId"),applicationId:Zh("applicationId"),applicationLayer:Zh("layer"),deviceId:nr("id"),deviceIp:nr("ip"),deviceLanguage:nr("language"),deviceLocale:nr("locale"),deviceModel:nr("model"),deviceFriendlyName:nr("friendlyName"),deviceNetwork:nr("network"),deviceNetworkName:nr("networkName"),deviceOEMName:nr("oemName"),deviceOS:nr("os"),deviceOSVersion:nr("osVersion"),deviceRoleInstance:nr("roleInstance"),deviceRoleName:nr("roleName"),deviceScreenResolution:nr("screenResolution"),deviceType:nr("type"),deviceMachineName:nr("machineName"),deviceVMName:nr("vmName"),deviceBrowser:nr("browser"),deviceBrowserVersion:nr("browserVersion"),locationIp:Iy("ip"),locationCountry:Iy("country"),locationProvince:Iy("province"),locationCity:Iy("city"),operationId:md("id"),operationName:md("name"),operationParentId:md("parentId"),operationRootId:md("rootId"),operationSyntheticSource:md("syntheticSource"),operationCorrelationVector:md("correlationVector"),sessionId:yR("id"),sessionIsFirst:yR("isFirst"),sessionIsNew:yR("isNew"),userAccountAcquisitionDate:Yc("accountAcquisitionDate"),userAccountId:Yc("accountId"),userAgent:Yc("userAgent"),userId:Yc("id"),userStoreRegion:Yc("storeRegion"),userAuthUserId:Yc("authUserId"),userAnonymousUserAcquisitionDate:Yc("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Yc("authUserAcquisitionDate"),cloudName:vl("name"),cloudRole:vl("role"),cloudRoleVer:vl("roleVer"),cloudRoleInstance:vl("roleInstance"),cloudEnvironment:vl("environment"),cloudLocation:vl("location"),cloudDeploymentUnit:vl("deploymentUnit"),internalNodeName:eg("nodeName"),internalSdkVersion:eg("sdkVersion"),internalAgentVersion:eg("agentVersion"),internalSnippet:eg("snippet"),internalSdkSrc:eg("sdkSrc")}))});function DR(t,e,n,r,i,o){var s;n=Mt(r,n)||er,(fe(t)||fe(e)||fe(n))&&yn("Input doesn't contain all required fields");var a="";t[cy]&&(a=t[cy],delete t[cy]);var c=(s={},s[Bn]=n,s.time=Ti(new Date),s.iKey=a,s.ext=o||{},s.tags=[],s.data={},s.baseType=e,s.baseData=t,s);return fe(i)||je(i,function(u,l){c.data[u]=l}),c}var lU,fU=ce(()=>{"use strict";xt();Gi();zi();tr();lU=(function(){function t(){}return t.create=DR,t})()});var dU,On,pU=ce(()=>{"use strict";SR();dU={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},On=new vd});function hU(t){var e=null;if(Ye(Event))e=new Event(t);else{var n=Sn();n&&n.createEvent&&(e=n.createEvent("Event"),e.initEvent(t,!0,!0))}return e}var gU=ce(()=>{"use strict";xt()});function _U(t,e){ma(t,null,null,e)}function Ay(t){var e=Sn(),n=Jn(),r=!1,i=[],o=1;n&&!fe(n.onLine)&&!n.onLine&&(o=2);var s=0,a=f(),c=Ni(Er("OfflineListener"),t);try{if(l(Yn())&&(r=!0),e){var u=e.body||e;u.ononline&&l(u)&&(r=!0)}}catch{r=!1}function l(E){var x=!1;return E&&(x=us(E,"online",_,c),x&&us(E,"offline",S,c)),x}function d(){return a}function f(){return!(s===2||o===2)}function g(){var E=f();a!==E&&(a=E,se(i,function(x){var P={isOnline:a,rState:o,uState:s};try{x(P)}catch{}}))}function h(E){s=E,g()}function _(){o=1,g()}function S(){o=2,g()}function b(){var E=Yn();if(E&&r){if(_U(E,c),e){var x=e.body||e;ot(x.ononline)||_U(x,c)}r=!1}}function v(E){return i[Ea](E),{rm:function(){var x=i.indexOf(E);if(x>-1)return i.splice(x,1)}}}return{isOnline:d,isListening:function(){return r},unload:b,addListener:v,setOnlineState:h}}var mU=ce(()=>{"use strict";xt();tr()});var vU={};Zc(vU,{AnalyticsPluginIdentifier:()=>f6,BreezeChannelIdentifier:()=>ER,ConfigurationManager:()=>cU,ConnectionStringParser:()=>Uq,ContextTagKeys:()=>vd,CtxTagKeys:()=>On,DEFAULT_BREEZE_ENDPOINT:()=>Pc,DEFAULT_BREEZE_PATH:()=>Eo,Data:()=>Ds,DisabledPropertyName:()=>_q,DistributedTracingModes:()=>Oq,Envelope:()=>Py,Event:()=>ys,EventPersistence:()=>xq,Exception:()=>Lc,Extensions:()=>dU,HttpMethod:()=>Wh,Metric:()=>Ss,PageView:()=>Fc,PageViewPerformance:()=>Uc,ProcessLegacy:()=>ud,PropertiesPluginIdentifier:()=>l6,RemoteDependencyData:()=>jc,RequestHeaders:()=>sl,SampleRate:()=>cd,SeverityLevel:()=>xy,TelemetryItemCreator:()=>lU,ThrottleMgr:()=>jq,Trace:()=>qc,correlationIdCanIncludeCorrelationHeader:()=>Cq,correlationIdGetCorrelationContext:()=>Tq,correlationIdGetCorrelationContextValue:()=>cR,correlationIdGetPrefix:()=>bq,correlationIdSetPrefix:()=>Eq,createDistributedTraceContextFromTrace:()=>Rq,createDomEvent:()=>hU,createOfflineListener:()=>Ay,createTelemetryItem:()=>DR,createTraceParent:()=>mh,dataSanitizeException:()=>vy,dataSanitizeId:()=>yy,dataSanitizeInput:()=>Sy,dataSanitizeKey:()=>rR,dataSanitizeKeyAndAddUniqueness:()=>my,dataSanitizeMeasurements:()=>jr,dataSanitizeMessage:()=>dd,dataSanitizeProperties:()=>Fr,dataSanitizeString:()=>Mt,dataSanitizeUrl:()=>Ic,dateTimeUtilsDuration:()=>Pq,dateTimeUtilsNow:()=>Nq,dsPadNumber:()=>iR,findAllScripts:()=>iP,findW3cTraceParent:()=>Sh,formatTraceParent:()=>yh,getExtensionByName:()=>eU,isBeaconApiSupported:()=>ci,isCrossOriginError:()=>tU,isInternalApplicationInsightsEndpoint:()=>Jh,isSampledFlag:()=>vh,isValidSpanId:()=>as,isValidTraceId:()=>ss,isValidTraceParent:()=>Bf,msToTimeSpan:()=>_d,parseConnectionString:()=>_l,parseTraceParent:()=>Gu,strNotSpecified:()=>er,stringToBoolOrDefault:()=>Zq,urlGetAbsoluteUrl:()=>yq,urlGetCompleteUrl:()=>Dq,urlGetPathName:()=>Sq,urlParseFullHost:()=>Xh,urlParseHost:()=>oR,urlParseUrl:()=>hl,utlCanUseLocalStorage:()=>hd,utlCanUseSessionStorage:()=>gl,utlDisableStorage:()=>Aq,utlEnableStorage:()=>Mq,utlGetLocalStorage:()=>by,utlGetSessionStorage:()=>Ty,utlGetSessionStorageKeys:()=>Fq,utlRemoveSessionStorage:()=>Ny,utlRemoveStorage:()=>Lq,utlSetLocalStorage:()=>Cy,utlSetSessionStorage:()=>wy,utlSetStoragePrefix:()=>Ey});var l6,ER,f6,ba=ce(()=>{"use strict";uR();qq();Yq();QP();Gi();kq();Hq();Vq();Qq();nU();rU();iU();oU();sU();aU();uU();SR();zi();fU();pU();lR();Oy();xt();gU();pR();sR();mU();l6="AppInsightsPropertiesPlugin",ER="AppInsightsChannelPlugin",f6="ApplicationInsightsAnalytics"});var CR=V(My=>{"use strict";Object.defineProperty(My,"__esModule",{value:!0});My.TelemetryUtil=void 0;var bR=class t{static applyReplacements(e,n){for(let r of Object.keys(e))for(let i of n)i.lookup.test(r)&&(i.replacementString!==void 0?e[r]=i.replacementString:delete e[r])}static shouldUseOneDataSystemSDK(e){return e.length===74&&e[32]==="-"&&e[41]==="-"&&e[46]==="-"&&e[51]==="-"&&e[56]==="-"&&e[69]==="-"}static getAdditionalCommonProperties(e){return{"common.os":e.platform,"common.nodeArch":e.architecture,"common.platformversion":(e.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),"common.telemetryclientversion":"0.9.8"}}static getInstance(){return t._instance||(t._instance=new t),t._instance}};My.TelemetryUtil=bR});var Hc,yU=ce(()=>{"use strict";Hc="duration"});var Gn,Ly,Cr,Es,yl,at,$c,Bc,Ki,Gc,Ca,yd,Ta,wa,Fy,Vi,Sd,tg,Wc,ng,Dd,Sl,rg,jy,Na,zc,Ed,bd,Tr,qy,Cd,Td,wd,Uy,TR,Yy,ky,wR,Hy,NR,Pa,PR,RR,OR,ig,xR,IR,AR,Nd,Kc,$y,og,By,Gy,Wy,zy,Pd,MR,Ky,SU,Vc=ce(()=>{"use strict";Gn="tags",Ly="deviceType",Cr="data",Es="name",yl="traceID",at="length",$c="stringify",Bc="measurements",Ki="dataType",Gc="envelopeType",Ca="toString",yd="_get",Ta="enqueue",wa="count",Fy="eventsLimitInMem",Vi="push",Sd="item",tg="emitLineDelimitedJson",Wc="clear",ng="createNew",Dd="markAsSent",Sl="clearSent",rg="bufferOverride",jy="BUFFER_KEY",Na="SENT_BUFFER_KEY",zc="concat",Ed="MAX_BUFFER_SIZE",bd="triggerSend",Tr="diagLog",qy="initialize",Cd="_sender",Td="endpointUrl",wd="instrumentationKey",Uy="customHeaders",TR="maxBatchSizeInBytes",Yy="onunloadDisableBeacon",ky="isBeaconApiDisabled",wR="alwaysUseXhrOverride",Hy="disableXhr",NR="enableSessionStorageBuffer",Pa="_buffer",PR="onunloadDisableFetch",RR="disableSendBeaconSplit",OR="enableSendPromise",ig="getSenderInst",xR="unloadTransports",IR="convertUndefined",AR="maxBatchInterval",Nd="serialize",Kc="_onError",$y="_onPartialSuccess",og="_onSuccess",By="itemsReceived",Gy="itemsAccepted",Wy="oriPayload",zy="baseType",Pd="sampleRate",MR="eventsSendRequest",Ky="getSamplingScore",SU="getHashCodeScore"});function xn(t,e,n){return $i(t,e,n,ao)}function d6(t,e,n){var r=n[Gn]=n[Gn]||{},i=e.ext=e.ext||{},o=e[Gn]=e[Gn]||[],s=i.user;s&&(xn(r,On.userAuthUserId,s.authId),xn(r,On.userId,s.id||s.localId));var a=i.app;a&&xn(r,On.sessionId,a.sesId);var c=i.device;c&&(xn(r,On.deviceId,c.id||c.localId),xn(r,On[Ly],c.deviceClass),xn(r,On.deviceIp,c.ip),xn(r,On.deviceModel,c.model),xn(r,On[Ly],c[Ly]));var u=e.ext.web;if(u){xn(r,On.deviceLanguage,u.browserLang),xn(r,On.deviceBrowserVersion,u.browserVer),xn(r,On.deviceBrowser,u.browser);var l=n[Cr]=n[Cr]||{},d=l[nn]=l[nn]||{},f=d[pr]=d[pr]||{};xn(f,"domain",u.domain),xn(f,"isManual",u.isManual?DU:null),xn(f,"screenRes",u.screenRes),xn(f,"userConsent",u.userConsent?DU:null)}var g=i.os;g&&(xn(r,On.deviceOS,g[Es]),xn(r,On.deviceOSVersion,g.osVer));var h=i.trace;h&&(xn(r,On.operationParentId,h.parentID),xn(r,On.operationName,Mt(t,h[Es])),xn(r,On.operationId,h[yl]));for(var _={},S=o[at]-1;S>=0;S--){var b=o[S];je(b,function(E,x){_[E]=x}),o.splice(S,1)}je(o,function(E,x){_[E]=x});var v=Ui(Ui({},r),_);v[On.internalSdkVersion]||(v[On.internalSdkVersion]=Mt(t,"javascript:".concat(p6.Version),64)),n[Gn]=ai(v)}function Xc(t,e,n){fe(t)||je(t,function(r,i){vr(i)?n[r]=i:Xe(i)?e[r]=i:rs()&&(e[r]=Dr()[$c](i))})}function Dl(t,e){fe(t)||je(t,function(n,r){t[n]=r||e})}function El(t,e,n,r){var i=new Py(t,r,e);xn(i,"sampleRate",n[cd]),(n[nn]||{}).startTime&&(i.time=Ti(n[nn].startTime)),i.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return i[Es]=i[Es].replace("{0}",o),d6(t,n,i),n[Gn]=n[Gn]||[],ai(i)}function bl(t,e){fe(e[nn])&&pe(t,1,46,"telemetryItem.baseData cannot be null.")}function EU(t,e,n){bl(t,e);var r=e[nn][Bc]||{},i=e[nn][pr]||{};Xc(e[Cr],i,r),fe(n)||Dl(i,n);var o=e[nn];if(fe(o))return Hr(t,"Invalid input for dependency data"),null;var s=o[pr]&&o[pr][Wh]?o[pr][Wh]:"GET",a=new jc(t,o.id,o.target,o[Es],o[Hc],o.success,o.responseCode,s,o.type,o.correlationContext,i,r),c=new Ds(jc[Ki],a);return El(t,jc[Gc],e,c)}function FR(t,e,n){bl(t,e);var r={},i={};e[LR]!==ys[Ki]&&(r.baseTypeSource=e[LR]),e[LR]===ys[Ki]?(r=e[nn][pr]||{},i=e[nn][Bc]||{}):e[nn]&&Xc(e[nn],r,i),Xc(e[Cr],r,i),fe(n)||Dl(r,n);var o=e[nn][Es],s=new ys(t,o,r,i),a=new Ds(ys[Ki],s);return El(t,ys[Gc],e,a)}function bU(t,e,n){bl(t,e);var r=e[nn][Bc]||{},i=e[nn][pr]||{};Xc(e[Cr],i,r),fe(n)||Dl(i,n);var o=e[nn],s=Lc.CreateFromInterface(t,o,i,r),a=new Ds(Lc[Ki],s);return El(t,Lc[Gc],e,a)}function CU(t,e,n){bl(t,e);var r=e[nn],i=r[pr]||{},o=r[Bc]||{};Xc(e[Cr],i,o),fe(n)||Dl(i,n);var s=new Ss(t,r[Es],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o),a=new Ds(Ss[Ki],s);return El(t,Ss[Gc],e,a)}function TU(t,e,n){bl(t,e);var r,i=e[nn];!fe(i)&&!fe(i[pr])&&!fe(i[pr][Hc])?(r=i[pr][Hc],delete i[pr][Hc]):!fe(e[Cr])&&!fe(e[Cr][Hc])&&(r=e[Cr][Hc],delete e[Cr][Hc]);var o=e[nn],s;((e.ext||{}).trace||{})[yl]&&(s=e.ext.trace[yl]);var a=o.id||s,c=o[Es],u=o.uri,l=o[pr]||{},d=o[Bc]||{};if(fe(o.refUri)||(l.refUri=o.refUri),fe(o.pageType)||(l.pageType=o.pageType),fe(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn[Ca]()),!fe(o[pr])){var f=o[pr];je(f,function(_,S){l[_]=S})}Xc(e[Cr],l,d),fe(n)||Dl(l,n);var g=new Fc(t,c,u,r,l,d,a),h=new Ds(Fc[Ki],g);return El(t,Fc[Gc],e,h)}function wU(t,e,n){bl(t,e);var r=e[nn],i=r[Es],o=r.uri||r.url,s=r[pr]||{},a=r[Bc]||{};Xc(e[Cr],s,a),fe(n)||Dl(s,n);var c=new Uc(t,i,o,void 0,s,a,r),u=new Ds(Uc[Ki],c);return El(t,Uc[Gc],e,u)}function NU(t,e,n){bl(t,e);var r=e[nn].message,i=e[nn].severityLevel,o=e[nn][pr]||{},s=e[nn][Bc]||{};Xc(e[Cr],o,s),fe(n)||Dl(o,n);var a=new qc(t,r,i,o,s),c=new Ds(qc[Ki],a);return El(t,qc[Gc],e,c)}var LR,nn,pr,DU,p6,PU=ce(()=>{"use strict";ei();ba();xt();yU();Vc();LR="baseType",nn="baseData",pr="properties",DU="true";p6={Version:"3.3.4"}});var RU,Vy,h6,jR,OU=ce(()=>{"use strict";ei();lr();ba();xt();Vc();RU=(function(){function t(e,n){var r=[],i=!1,o=n.maxRetryCnt;this[yd]=function(){return r},this._set=function(s){return r=s,r},dt(t,this,function(s){s[Ta]=function(a){if(s[wa]()>=n[Fy]){i||(pe(e,2,105,"Maximum in-memory buffer size reached: "+s[wa](),!0),i=!0);return}a.cnt=a.cnt||0,!(!fe(o)&&a.cnt>o)&&r[Vi](a)},s[wa]=function(){return r[at]},s.size=function(){for(var a=r[at],c=0;c<r[at];c++)a+=r[c].item[at];return n[tg]||(a+=2),a},s[Wc]=function(){r=[],i=!1},s.getItems=function(){return r.slice(0)},s.batchPayloads=function(a){if(a&&a[at]>0){var c=[];se(a,function(l){c[Vi](l[Sd])});var u=n[tg]?c.join(`
`):"["+c.join(",")+"]";return u}return null},s[ng]=function(a,c,u){var l=r.slice(0);a=a||e,c=c||{};var d=u?new jR(a,c):new Vy(a,c);return se(l,function(f){d[Ta](f)}),d}})}return t.__ieDyn=1,t})(),Vy=(function(t){Zr(e,t);function e(n,r){var i=t.call(this,n,r)||this;return dt(e,i,function(o,s){o[Dd]=function(a){s[Wc]()},o[Sl]=function(a){}}),i}return e.__ieDyn=1,e})(RU),h6=["AI_buffer","AI_sentBuffer"],jR=(function(t){Zr(e,t);function e(r,i){var o=t.call(this,r,i)||this,s=!1,a=i?.namePrefix,c=i[rg]||{getItem:Ty,setItem:wy},u=c.getItem,l=c.setItem,d=i.maxRetryCnt;return dt(e,o,function(f,g){var h=x(e[jy]),_=x(e[Na]),S=N(),b=_[zc](S),v=f._set(h[zc](b));v[at]>e[Ed]&&(v[at]=e[Ed]),T(e[Na],[]),T(e[jy],v),f[Ta]=function(q){if(f[wa]()>=e[Ed]){s||(pe(r,2,67,"Maximum buffer size reached: "+f[wa](),!0),s=!0);return}q.cnt=q.cnt||0,!(!fe(d)&&q.cnt>d)&&(g[Ta](q),T(e.BUFFER_KEY,f[yd]()))},f[Wc]=function(){g[Wc](),T(e.BUFFER_KEY,f[yd]()),T(e[Na],[]),s=!1},f[Dd]=function(q){T(e[jy],f._set(E(q,f[yd]())));var k=x(e[Na]);k instanceof Array&&q instanceof Array&&(k=k[zc](q),k[at]>e[Ed]&&(pe(r,1,67,"Sent buffer reached its maximum size: "+k[at],!0),k[at]=e[Ed]),T(e[Na],k))},f[Sl]=function(q){var k=x(e[Na]);k=E(q,k),T(e[Na],k)},f[ng]=function(q,k,W){W=!!W;var ne=f[yd]().slice(0),he=x(e[Na]).slice(0);q=q||r,k=k||{},f[Wc]();var R=W?new e(q,k):new Vy(q,k);return se(ne,function(Y){R[Ta](Y)}),W&&R[Dd](he),R};function E(q,k){var W=[],ne=[];return se(q,function(he){ne[Vi](he[Sd])}),se(k,function(he){!Ye(he)&&bt(ne,he[Sd])===-1&&W[Vi](he)}),W}function x(q){var k=q;return k=a?a+"_"+k:k,P(k)}function P(q){try{var k=u(r,q);if(k){var W=Dr().parse(k);if(Xe(W)&&(W=Dr().parse(W)),W&&Ie(W))return W}}catch(ne){pe(r,1,42," storage key: "+q+", "+$t(ne),{exception:Ae(ne)})}return[]}function T(q,k){var W=q;try{W=a?a+"_"+W:W;var ne=JSON[$c](k);l(r,W,ne)}catch(he){l(r,W,JSON[$c]([])),pe(r,2,41," storage key: "+W+", "+$t(he)+". Buffer cleared",{exception:Ae(he)})}}function N(){var q=[];try{return se(h6,function(k){var W=M(k);if(q=q[zc](W),a){var ne=a+"_"+k,he=M(ne);q=q[zc](he)}}),q}catch(k){pe(r,2,41,"Transfer events from previous buffers: "+$t(k)+". previous Buffer items can not be removed",{exception:Ae(k)})}return[]}function M(q){try{var k=P(q),W=[];return se(k,function(ne){var he={item:ne,cnt:0};W[Vi](he)}),Ny(r,q),W}catch{}return[]}}),o}var n;return n=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+n.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+n.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(RU)});var xU,IU=ce(()=>{"use strict";lr();xt();Vc();xU=(function(){function t(e){dt(t,this,function(n){n[Nd]=function(s){var a=r(s,"root");try{return Dr()[$c](a)}catch(c){pe(e,1,48,c&&Ye(c[Ca])?c[Ca]():"Error serializing object",null,!0)}};function r(s,a){var c="__aiCircularRefCheck",u={};if(!s)return pe(e,1,48,"cannot serialize object because it is null or undefined",{name:a},!0),u;if(s[c])return pe(e,2,50,"Circular reference detected while serializing object",{name:a},!0),u;if(!s.aiDataContract){if(a==="measurements")u=o(s,"number",a);else if(a==="properties")u=o(s,"string",a);else if(a==="tags")u=o(s,"string",a);else if(Ie(s))u=i(s,a);else{pe(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:a},!0);try{Dr()[$c](s),u=s}catch(l){pe(e,1,48,l&&Ye(l[Ca])?l[Ca]():"Error serializing object",null,!0)}}return u}return s[c]=!0,je(s.aiDataContract,function(l,d){var f=Ye(d)?d()&1:d&1,g=Ye(d)?d()&4:d&4,h=d&2,_=s[l]!==void 0,S=pn(s[l])&&s[l]!==null;if(f&&!_&&!h)pe(e,1,24,"Missing required field specification. The field is required but not present on source",{field:l,name:a});else if(!g){var b=void 0;S?h?b=i(s[l],l):b=r(s[l],l):b=s[l],b!==void 0&&(u[l]=b)}}),delete s[c],u}function i(s,a){var c;if(s)if(!Ie(s))pe(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r
`,{name:a},!0);else{c=[];for(var u=0;u<s[at];u++){var l=s[u],d=r(l,a+"["+u+"]");c[Vi](d)}}return c}function o(s,a,c){var u;return s&&(u={},je(s,function(l,d){if(a==="string")d===void 0?u[l]="undefined":d===null?u[l]="null":d[Ca]?u[l]=d[Ca]():u[l]="invalid field: toString() is not defined.";else if(a==="number")if(d===void 0)u[l]="undefined";else if(d===null)u[l]="null";else{var f=parseFloat(d);u[l]=f}else u[l]="invalid field: "+c+" is of unknown type.",pe(e,1,u[l],null,!0)})),u}})}return t.__ieDyn=1,t})()});var g6,AU,MU=ce(()=>{"use strict";Vc();g6=8,AU=(function(){function t(){}return t.prototype.getHashCodeScore=function(e){var n=this.getHashCode(e)/t.INT_MAX_VALUE;return n*100},t.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[at]<g6;)e=e[zc](e);for(var n=5381,r=0;r<e[at];++r)n=(n<<5)+n+e.charCodeAt(r),n=n&n;return Math.abs(n)},t.INT_MAX_VALUE=2147483647,t})()});var LU,FU=ce(()=>{"use strict";ba();Vc();MU();LU=(function(){function t(){var e=this,n=new AU,r=new vd;e[Ky]=function(i){var o=0;return i[Gn]&&i[Gn][r.userId]?o=n.getHashCodeScore(i[Gn][r.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=n[SU](i.ext.user.id):i[Gn]&&i[Gn][r.operationId]?o=n.getHashCodeScore(i[Gn][r.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[yl]?o=n.getHashCodeScore(i.ext.telemetryTrace[yl]):o=Math.random()*100,o}}return t})()});var jU,qU=ce(()=>{"use strict";ba();xt();Vc();FU();jU=(function(){function t(e,n){this.INT_MAX_VALUE=2147483647;var r=n||vo(null);(e>100||e<0)&&(r.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[Pd]=e,this.samplingScoreGenerator=new LU}return t.prototype.isSampledIn=function(e){var n=this[Pd],r=!1;return n==null||n>=100||e.baseType===Ss[Ki]?!0:(r=this.samplingScoreGenerator[Ky](e)<n,r)},t})()});function YU(t){try{return t.responseText}catch{}return null}function m6(t){return t&&t.sendPOST}function v6(t){return!isNaN(t)&&t>0&&t<=100}var Xt,Ra,bs,UU,_6,kU,y6,sg,HU=ce(()=>{"use strict";ei();lr();ba();xt();Ge();PU();OU();IU();qU();Vc();bs=void 0,UU="",_6=65e3;kU=Vo((Xt={endpointUrl:Yf(ao,Pc+Eo)},Xt[tg]=Bi(),Xt[AR]=15e3,Xt[TR]=102400,Xt.disableTelemetry=Bi(),Xt[NR]=Bi(!0),Xt.isRetryDisabled=Bi(),Xt[ky]=Bi(!0),Xt[RR]=Bi(!0),Xt[Hy]=Bi(),Xt[PR]=Bi(),Xt[Yy]=Bi(),Xt[wd]=bs,Xt.namePrefix=bs,Xt.samplingPercentage=Yf(v6,100),Xt[Uy]=bs,Xt[IR]=bs,Xt[Fy]=1e4,Xt[rg]=!1,Xt.httpXHROverride={isVal:m6,v:bs},Xt[wR]=Bi(),Xt.transports=bs,Xt.retryCodes=bs,Xt.maxRetryCnt={isVal:vr,v:10},Xt));y6=(Ra={},Ra[ys.dataType]=FR,Ra[qc.dataType]=NU,Ra[Fc.dataType]=TU,Ra[Uc.dataType]=wU,Ra[Lc.dataType]=bU,Ra[Ss.dataType]=CU,Ra[jc.dataType]=EU,Ra),sg=(function(t){Zr(e,t);function e(){var n=t.call(this)||this;n.priority=1001,n.identifier=ER;var r,i,o,s,a,c,u,l,d=0,f,g,h,_,S,b,v,E,x,P,T,N,M,q,k,W,ne,he,R,Y,Z,oe,U,re,L,K,z;return dt(e,n,function(j,_e){ge(),j.pause=function(){F(),s=!0},j.resume=function(){s&&(s=!1,i=null,ke(),D())},j.flush=function(y,C,I){if(y===void 0&&(y=!0),!s){F();try{return j[bd](y,null,I||1)}catch(B){pe(j[Tr](),1,22,"flush failed, telemetry will not be collected: "+$t(B),{exception:Ae(B)})}}},j.onunloadFlush=function(){if(!s)if(v||Y)try{return j[bd](!0,wt,2)}catch(y){pe(j[Tr](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+$t(y),{exception:Ae(y)})}else j.flush(!1)},j.addHeader=function(y,C){l[y]=C},j[qy]=function(y,C,I,B){j.isInitialized()&&pe(j[Tr](),1,28,"Sender is already initialized"),_e[qy](y,C,I,B);var Q=j.identifier;c=new xU(C.logger),r=0,i=null,o=0,j[Cd]=null,u=0;var ae=j[Tr]();h=Ni(Er("Sender"),C.evtNamespace&&C.evtNamespace()),g=Ay(h),j._addHook(Hn(y,function(de){var Me=de.cfg;Me.storagePrefix&&Ey(Me.storagePrefix);var tt=$r(null,Me,C),Ue=tt.getExtCfg(Q,kU),m=Ue[Td];if(_&&m===_){var G=Me[Td];G&&G!==m&&(Ue[Td]=G)}Yr(Ue[wd])&&(Ue[wd]=Me[wd]),Et(j,"_senderConfig",{g:function(){return Ue}}),S!==Ue[Td]&&(_=S=Ue[Td]),C.activeStatus()===Si.PENDING?j.pause():C.activeStatus()===Si.ACTIVE&&j.resume(),P&&P!==Ue[Uy]&&se(P,function(zn){delete l[zn.header]}),b=Ue[TR],v=(Ue[Yy]===!1||Ue[ky]===!1)&&ci(),E=Ue[Yy]===!1&&ci(),x=Ue[ky]===!1&&ci(),Y=Ue[wR],Z=!!Ue[Hy],z=Ue.retryCodes;var Se=Ue[rg],pt=!!Ue[NR]&&(!!Se||gl()),_t=Ue.namePrefix,Wn=pt!==W||pt&&he!==_t||pt&&ne!==Se;if(j[Pa]){if(Wn)try{j._buffer=j._buffer[ng](ae,Ue,pt)}catch(zn){pe(j[Tr](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+$t(zn),{exception:Ae(zn)})}ke()}else j[Pa]=pt?new jR(ae,Ue):new Vy(ae,Ue);he=_t,W=pt,ne=Se,oe=!Ue[PR]&&ua(!0),L=!!Ue[RR],j._sample=new jU(Ue.samplingPercentage,ae),N=Ue[wd],!Yr(N)&&!Ce(N,Me)&&pe(ae,1,100,"Invalid Instrumentation key "+N),P=Ue[Uy],Xe(_)&&!Jh(_)&&P&&P[at]>0?se(P,function(zn){n.addHeader(zn.header,zn.value)}):P=null,R=Ue[OR];var hr=Fe();K?K.SetConfig(hr):(K=new Ku,K[qy](hr,ae));var Br=Ue.httpXHROverride,Jc=null,Qc=null,nS=aa([3,1,2],Ue.transports);Jc=K&&K[ig](nS,!1);var wl=K&&K.getFallbackInst();U=function(zn,Ts){return be(wl,zn,Ts)},re=function(zn,Ts){return be(wl,zn,Ts,!1)},Jc=Y?Br:Jc||Br||wl,j[Cd]=function(zn,Ts){return be(Jc,zn,Ts)},oe&&(f=Tn);var Id=aa([3,1],Ue[xR]);oe||(Id=Id.filter(function(zn){return zn!==2})),Qc=K&&K[ig](Id,!0),Qc=Y?Br:Qc||Br,(Y||Ue[xR]||!f)&&Qc&&(f=function(zn,Ts){return be(Qc,zn,Ts)}),f||(f=U),T=Ue.disableTelemetry,M=Ue[IR]||bs,q=Ue.isRetryDisabled,k=Ue[AR]}))},j.processTelemetry=function(y,C){var I;C=j._getTelCtx(C);var B=C[Tr]();try{var Q=vt(y,B);if(!Q)return;var ae=Ze(y,B);if(!ae)return;var de=c[Nd](ae),Me=j[Pa];ke(de);var tt=(I={},I[Sd]=de,I.cnt=0,I);Me[Ta](tt),D()}catch(Ue){pe(B,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+$t(Ue),{exception:Ae(Ue)})}j.processNext(y,C)},j.isCompletelyIdle=function(){return!s&&d===0&&j._buffer[wa]()===0},j.getOfflineListener=function(){return g},j._xhrReadyStateChange=function(y,C,I){if(!Jt(C))return Pe(y,C,I)},j[bd]=function(y,C,I){y===void 0&&(y=!0);var B;if(!s)try{var Q=j[Pa];if(T)Q[Wc]();else{if(Q[wa]()>0){var ae=Q.getItems();ve(I||0,y),C?B=C.call(j,ae,y):B=j[Cd](ae,y)}o=+new Date}F()}catch(Me){var de=eh();(!de||de>9)&&pe(j[Tr](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+$t(Me),{exception:Ae(Me)})}return B},j.getOfflineSupport=function(){var y;return y={getUrl:function(){return _},createPayload:X},y[Nd]=It,y.batch=ht,y.shouldProcess=function(C){return!!vt(C)},y},j._doTeardown=function(y,C){j.onunloadFlush(),fa(g,!1),ge()},j[Kc]=function(y,C,I){if(!Jt(y))return lt(y,C,I)},j[$y]=function(y,C){if(!Jt(y))return Dt(y,C)},j[og]=function(y,C){if(!Jt(y))return Lt(y,C)},j._xdrOnLoad=function(y,C){if(!Jt(C))return ye(y,C)};function ye(y,C){var I=YU(y);if(y&&(I+""=="200"||I===""))r=0,j[og](C,0);else{var B=zu(I);B&&B[By]&&B[By]>B[Gy]&&!q?j[$y](C,B):j[Kc](C,Uu(y))}}function Fe(){var y;try{var C={xdrOnComplete:function(B,Q,ae){var de=Cn(ae);if(de)return ye(B,de)},fetchOnComplete:function(B,Q,ae,de){var Me=Cn(de);if(Me)return gt(B.status,Me,B.url,Me[at],B.statusText,ae||"")},xhrOnComplete:function(B,Q,ae){var de=Cn(ae);if(de)return Pe(B,de,de[at])},beaconOnRetry:function(B,Q,ae){return rn(B,Q,ae)}},I=(y={},y[OR]=R,y.isOneDs=!1,y.disableCredentials=!1,y[Hy]=Z,y.disableBeacon=!x,y.disableBeaconSync=!E,y.senderOnCompleteCallBack=C,y);return I}catch{}return null}function Pe(y,C,I){y.readyState===4&&gt(y.status,C,y.responseURL,I,sa(y),YU(y)||y.response)}function lt(y,C,I){pe(j[Tr](),2,26,"Failed to send telemetry.",{message:C}),j._buffer&&j._buffer[Sl](y)}function Dt(y,C){for(var I=[],B=[],Q=C.errors.reverse(),ae=0,de=Q;ae<de.length;ae++){var Me=de[ae],tt=y.splice(Me.index,1)[0];$(Me.statusCode)?B[Vi](tt):I[Vi](tt)}y[at]>0&&j[og](y,C[Gy]),I[at]>0&&j[Kc](I,sa(null,["partial success",C[Gy],"of",C.itemsReceived].join(" "))),B[at]>0&&(Pt(B),pe(j[Tr](),2,40,"Partial success. Delivered: "+y[at]+", Failed: "+I[at]+". Will retry to send "+B[at]+" our of "+C[By]+" items"))}function Lt(y,C){j._buffer&&j._buffer[Sl](y)}function Cn(y){try{if(y){var C=y,I=C[Wy];return I&&I[at]?I:null}}catch{}return null}function vt(y,C){if(T)return!1;if(!y)return C&&pe(C,1,7,"Cannot send empty telemetry"),!1;if(y.baseData&&!y[zy])return C&&pe(C,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(y[zy]||(y[zy]="EventData"),!j[Cd])return C&&pe(C,1,28,"Sender was not initialized"),!1;if(me(y))y[cd]=j._sample[Pd];else return C&&pe(C,2,33,"Telemetry item was sampled out and not sent",{SampleRate:j._sample[Pd]}),!1;return!0}function Ze(y,C){var I=y.iKey||N,B=e.constructEnvelope(y,I,C,M);if(!B){pe(C,1,47,"Unable to create an AppInsights envelope");return}var Q=!1;if(y[Gn]&&y[Gn][ud]&&(se(y[Gn][ud],function(ae){try{ae&&ae(B)===!1&&(Q=!0,Hr(C,"Telemetry processor check returns false"))}catch(de){pe(C,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+$t(de),{exception:Ae(de)},!0)}}),delete y[Gn][ud]),!Q)return B}function It(y){var C=UU,I=j[Tr]();try{var B=vt(y,I),Q=null;B&&(Q=Ze(y,I)),Q&&(C=c[Nd](Q))}catch{}return C}function ht(y){var C=UU;return y&&y[at]&&(C="["+y.join(",")+"]"),C}function X(y){var C,I=Je();return C={urlString:_},C[Cr]=y,C.headers=I,C}function me(y){return j._sample.isSampledIn(y)}function Re(y,C,I,B){C===200&&y?j._onSuccess(y,y[at]):B&&j[Kc](y,B)}function be(y,C,I,B){B===void 0&&(B=!0);var Q=function(Me,tt,Ue){return Re(C,Me,tt,Ue)},ae=Te(C),de=y&&y.sendPOST;return de&&ae?(B&&j._buffer[Dd](C),de(ae,Q,!I)):null}function Te(y){var C;if(Ie(y)&&y[at]>0){var I=j[Pa].batchPayloads(y),B=Je(),Q=(C={},C[Cr]=I,C.urlString=_,C.headers=B,C.disableXhrSync=Z,C.disableFetchKeepAlive=!oe,C[Wy]=y,C);return Q}return null}function Je(){try{var y=l||{};return Jh(_)&&(y[sl[6]]=sl[7]),y}catch{}return null}function ke(y){var C=y?y[at]:0;return j[Pa].size()+C>b?((!g||g.isOnline())&&j[bd](!0,null,10),!0):!1}function gt(y,C,I,B,Q,ae){var de=null;if(j._appId||(de=zu(ae),de&&de.appId&&(j._appId=de.appId)),(y<200||y>=300)&&y!==0){if((y===301||y===307||y===308)&&!ct(I)){j[Kc](C,Q);return}if(g&&!g.isOnline()){if(!q){var Me=10;Pt(C,Me),pe(j[Tr](),2,40,". Offline - Response Code: ".concat(y,". Offline status: ").concat(!g.isOnline(),". Will retry to send ").concat(C.length," items."))}return}!q&&$(y)?(Pt(C),pe(j[Tr](),2,40,". Response code "+y+". Will retry to send "+C[at]+" items.")):j[Kc](C,Q)}else ct(I),y===206?(de||(de=zu(ae)),de&&!q?j[$y](C,de):j[Kc](C,Q)):(r=0,j[og](C,B))}function ct(y){return u>=10?!1:!fe(y)&&y!==""&&y!==_?(_=y,++u,!0):!1}function wt(y,C){if(f)f(y,!1);else{var I=K&&K[ig]([3],!0);return be(I,y,C)}}function rn(y,C,I){var B=y,Q=B&&B[Wy];if(L)re&&re(Q,!0),pe(j[Tr](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var ae=[],de=0;de<Q[at];de++){var Me=Q[de],tt=[Me],Ue=Te(tt);I(Ue,C)?j._onSuccess(tt,tt[at]):ae[Vi](Me)}ae[at]>0&&(re&&re(ae,!0),pe(j[Tr](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function Jt(y){try{if(y&&y[at])return Xe(y[0])}catch{}return null}function Tn(y,C){var I=null;if(Ie(y)){for(var B=y[at],Q=0;Q<y[at];Q++)B+=y[Q].item[at];var ae=K.getSyncFetchPayload();ae+B<=_6?I=2:ci()?I=3:(I=1,pe(j[Tr](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var de=K&&K[ig]([I],!0);return be(de,y,C)}return null}function Pt(y,C){if(C===void 0&&(C=1),!(!y||y[at]===0)){var I=j[Pa];I[Sl](y),r++;for(var B=0,Q=y;B<Q.length;B++){var ae=Q[B];ae.cnt=ae.cnt||0,ae.cnt++,I[Ta](ae)}O(C),D()}}function O(y){var C=10,I;if(r<=1)I=C;else{var B=(Math.pow(2,r)-1)/2,Q=Math.floor(Math.random()*B*C)+1;Q=y*Q,I=Math.max(Math.min(Q,3600),C)}var ae=hn()+I*1e3;i=ae}function D(){if(!a&&!s){var y=i?Math.max(0,i-hn()):0,C=Math.max(k,y);a=yi(function(){a=null,j[bd](!0,null,1)},C)}}function F(){a&&a.cancel(),a=null,i=null}function $(y){return fe(z)?y===401||y===408||y===429||y===500||y===502||y===503||y===504:z[at]&&z.indexOf(y)>-1}function ue(){var y="getNotifyMgr";return j.core[y]?j.core[y]():j.core._notificationManager}function ve(y,C){var I=ue();if(I&&I[MR])try{I[MR](y,C)}catch(B){pe(j[Tr](),1,74,"send request notification failed: "+$t(B),{exception:Ae(B)})}}function Ce(y,C){var I=C.disableInstrumentationKeyValidation,B=fe(I)?!1:I;if(B)return!0;var Q="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",ae=new RegExp(Q);return ae.test(y)}function ge(){j[Cd]=null,j[Pa]=null,j._appId=null,j._sample=null,l={},g=null,r=0,i=null,o=null,s=!1,a=null,c=null,u=0,d=0,f=null,h=null,_=null,S=null,b=0,v=!1,P=null,T=!1,N=null,M=bs,q=!1,W=null,he=bs,Z=!1,oe=!1,L=!1,U=null,re=null,K=null,Et(j,"_senderConfig",{g:function(){return km({},kU)}})}}),n}return e.constructEnvelope=function(n,r,i,o){var s;r!==n.iKey&&!fe(r)?s=Ui(Ui({},n),{iKey:r}):s=n;var a=y6[s.baseType]||FR;return a(i,s,o)},e})(ga)});var qR=ce(()=>{"use strict";HU()});var Cl,ag,UR,Tl,YR,Rd,$U=ce(()=>{"use strict";Cl="instrumentationKey",ag="connectionString",UR="instrumentationkey",Tl="endpointUrl",YR="ingestionendpoint",Rd="userOverrideEndpointUrl"});var BU={};Zc(BU,{AppInsightsCore:()=>_a,ApplicationInsights:()=>E6,Sender:()=>sg,SeverityLevel:()=>xy,arrForEach:()=>se,isNullOrUndefined:()=>fe,proxyFunctions:()=>wi,throwError:()=>yn});function D6(t){return t&&t>0}var Od,kR,S6,E6,GU=ce(()=>{"use strict";lr();qR();ba();xt();Lu();Ge();$U();xt();ba();qR();kR=void 0,S6=(Od={diagnosticLogInterval:Yf(D6,1e4)},Od[ag]=kR,Od[Tl]=kR,Od[Cl]=kR,Od.extensionConfig={},Od);E6=(function(){function t(e){var n=new _a,r;(fe(e)||fe(e[Cl])&&fe(e[ag]))&&yn("Invalid input configuration"),dt(t,this,function(o){Et(o,"config",{g:function(){return r}}),s(),o.initialize=s,o.track=i,wi(o,n,["flush","pollInternalLogs","stopPollingInternalLogs","unload","getPlugin","addPlugin","evtNamespace","addUnloadCb","onCfgChange","getTraceCtx","updateCfg","addTelemetryInitializer"]);function s(){var a=en(e||{},S6);r=a.cfg,n.addUnloadHook(Hn(a,function(){var c=r[ag];if(Yr(c)){var u=Kp(function(g,h){bi(c,function(_){var S=_.value,b=r[Cl];if(!_.rejected&&S){r[ag]=S;var v=_l(S);b=v[UR]||b}g(b)})}),l=Kp(function(g,h){bi(c,function(_){var S=_.value,b=r[Tl];if(!_.rejected&&S){var v=_l(S),E=v[YR];b=E?E+Eo:b}g(b)})});r[Cl]=u,r[Tl]=r[Rd]||l}if(Xe(c)){var d=_l(c),f=d[YR];r[Tl]=r[Rd]?r[Rd]:f+Eo,r[Cl]=d[UR]||r[Cl]}r[Tl]=r[Rd]?r[Rd]:r[Tl]})),n.initialize(r,[new sg])}});function i(o){o&&(o.baseData=o.baseData||{},o.baseType=o.baseType||"EventData"),n.track(o)}}return t.__ieDyn=1,t})()});var WU=V(Cs=>{"use strict";var b6=Cs&&Cs.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),C6=Cs&&Cs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),T6=Cs&&Cs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&b6(e,t,n);return C6(e,t),e};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.appInsightsClientFactory=void 0;var w6=(ba(),Ns(vU)),N6=CR(),P6=async(t,e,n,r,i)=>{let o;try{let a=await Promise.resolve().then(()=>T6((GU(),Ns(BU)))),c={};if(r){let d={alwaysUseXhrOverride:!0,httpXHROverride:r};c[w6.BreezeChannelIdentifier]=d}let u;t.startsWith("InstrumentationKey=")||(u=t);let l=u?{instrumentationKey:u}:{connectionString:t};o=new a.ApplicationInsights({...l,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!1,disableInstrumentationKeyValidation:!0,extensionConfig:c})}catch(a){return Promise.reject(a)}return{logEvent:(a,c)=>{let u={...c?.properties,...c?.measurements};i?.length&&N6.TelemetryUtil.applyReplacements(u,i),o?.track({name:a,data:u,baseType:"EventData",ext:{user:{id:e,authId:e},app:{sesId:n}},baseData:{name:a,properties:c?.properties,measurements:c?.measurements}})},flush:async()=>{o?.flush(!1)},dispose:async()=>new Promise(c=>{o?.unload(!0,()=>{c(),o=void 0},1e3)})}};Cs.appInsightsClientFactory=P6});var zU=V(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.BaseTelemetryReporter=void 0;var HR=class{constructor(e,n,r){this.telemetrySender=e,this.vscodeAPI=n,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this._onDidChangeTelemetryLevel=new this.vscodeAPI.EventEmitter,this.onDidChangeTelemetryLevel=this._onDidChangeTelemetryLevel.event,this.telemetryLogger=this.vscodeAPI.env.createTelemetryLogger(this.telemetrySender,r),this.updateUserOptIn(),this.telemetryLogger.onDidChangeEnableStates(()=>{this.updateUserOptIn()})}updateUserOptIn(){this.errorOptIn=this.telemetryLogger.isErrorsEnabled,this.userOptIn=this.telemetryLogger.isUsageEnabled,(this.telemetryLogger.isErrorsEnabled||this.telemetryLogger.isUsageEnabled)&&this.telemetrySender.instantiateSender(),this._onDidChangeTelemetryLevel.fire(this.telemetryLevel)}get telemetryLevel(){return this.errorOptIn&&this.userOptIn?"all":this.errorOptIn?"error":"off"}internalSendTelemetryEvent(e,n,r,i){i?this.telemetrySender.sendEventData(e,{properties:n,measurements:r}):this.telemetryLogger.logUsage(e,{properties:n,measurements:r})}sendTelemetryEvent(e,n,r){this.internalSendTelemetryEvent(e,n,r,!1)}sendRawTelemetryEvent(e,n,r){let i={...n};for(let o of Object.keys(i??{})){let s=i[o];typeof o=="string"&&s!==void 0&&(i[o]=new this.vscodeAPI.TelemetryTrustedValue(typeof s=="string"?s:s.value))}this.sendTelemetryEvent(e,i,r)}sendDangerousTelemetryEvent(e,n,r){this.telemetrySender.instantiateSender(),this.internalSendTelemetryEvent(e,n,r,!0)}internalSendTelemetryErrorEvent(e,n,r,i){i?this.telemetrySender.sendEventData(e,{properties:n,measurements:r}):this.telemetryLogger.logError(e,{properties:n,measurements:r})}sendTelemetryErrorEvent(e,n,r){this.internalSendTelemetryErrorEvent(e,n,r,!1)}sendDangerousTelemetryErrorEvent(e,n,r){this.telemetrySender.instantiateSender(),this.internalSendTelemetryErrorEvent(e,n,r,!0)}async dispose(){return await this.telemetrySender.dispose(),this.telemetryLogger.dispose(),Promise.all(this.disposables.map(e=>e.dispose()))}};Xy.BaseTelemetryReporter=HR});var KU=V(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});Jy.BaseTelemetrySender=void 0;var Oa;(function(t){t[t.NOT_INSTANTIATED=0]="NOT_INSTANTIATED",t[t.INSTANTIATING=1]="INSTANTIATING",t[t.INSTANTIATED=2]="INSTANTIATED"})(Oa||(Oa={}));var $R=class{constructor(e,n){this._instantiationStatus=Oa.NOT_INSTANTIATED,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=n,this._key=e}sendEventData(e,n){if(!this._telemetryClient){this._instantiationStatus!==Oa.INSTANTIATED&&this._eventQueue.push({eventName:e,data:n});return}this._telemetryClient.logEvent(e,n)}sendErrorData(e,n){if(!this._telemetryClient){this._instantiationStatus!==Oa.INSTANTIATED&&this._exceptionQueue.push({exception:e,data:n});return}let r={stack:e.stack,message:e.message,name:e.name};if(n){let i=n.properties||n;n.properties={...i,...r}}else n={properties:r};this._telemetryClient.logEvent("unhandlederror",n)}async flush(){return this._telemetryClient?.flush()}async dispose(){this._telemetryClient&&(await this._telemetryClient.dispose(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach(({eventName:e,data:n})=>this.sendEventData(e,n)),this._eventQueue=[],this._exceptionQueue.forEach(({exception:e,data:n})=>this.sendErrorData(e,n)),this._exceptionQueue=[]}instantiateSender(){this._instantiationStatus===Oa.NOT_INSTANTIATED&&(this._instantiationStatus=Oa.INSTANTIATING,this._clientFactory(this._key).then(e=>{this._telemetryClient=e,this._instantiationStatus=Oa.INSTANTIATED,this._flushQueues()}).catch(e=>{console.error(e),this._instantiationStatus=Oa.INSTANTIATED}))}};Jy.BaseTelemetrySender=$R});var JU=V(xa=>{"use strict";var R6=xa&&xa.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),O6=xa&&xa.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),WR=xa&&xa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&R6(e,t,n);return O6(e,t),e};Object.defineProperty(xa,"__esModule",{value:!0});var x6=WR(require("https")),BR=WR(require("os")),Qy=WR(require("vscode")),I6=gq(),A6=WU(),M6=zU(),L6=KU(),VU=CR();function XU(){return{sendPOST:(e,n)=>{let r={method:"POST",headers:{...e.headers,"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)}};try{let i=x6.request(e.urlString,r,o=>{o.on("data",function(s){n(o.statusCode??200,o.headers,s.toString())}),o.on("error",function(){n(0,{})})});i.write(e.data,o=>{o&&n(0,{})}),i.end()}catch{n(0,{})}}}}var GR=class extends M6.BaseTelemetryReporter{constructor(e,n){let r=s=>(0,A6.appInsightsClientFactory)(s,Qy.env.machineId,Qy.env.sessionId,XU(),n);VU.TelemetryUtil.shouldUseOneDataSystemSDK(e)&&(r=s=>(0,I6.oneDataSystemClientFactory)(s,Qy,XU()));let i={release:BR.release(),platform:BR.platform(),architecture:BR.arch()},o=new L6.BaseTelemetrySender(e,r);if(e&&e.indexOf("AIF-")===0)throw new Error("AIF keys are no longer supported. Please switch to 1DS keys for 1st party extensions");super(o,Qy,{additionalCommonProperties:VU.TelemetryUtil.getAdditionalCommonProperties(i)})}};xa.default=GR});var H6={};Zc(H6,{activate:()=>j6,deactivate:()=>q6});module.exports=Ns(H6);var Ia=require("vscode");var ie=require("vscode"),Kt=Nl(CT());function U_(t,e=0){switch(typeof t){case"object":return t===null?Ja(349,e):Array.isArray(t)?gW(t,e):_W(t,e);case"string":return hM(t,e);case"boolean":return hW(t,e);case"number":return Ja(t,e);case"undefined":return 937*31;default:return Ja(t,617)}}function Ja(t,e){return(e<<5)-e+t|0}function hW(t,e){return Ja(t?433:863,e)}function hM(t,e){e=Ja(149417,e);for(let n=0,r=t.length;n<r;n++)e=Ja(t.charCodeAt(n),e);return e}function gW(t,e){return e=Ja(104579,e),t.reduce((n,r)=>U_(r,n),e)}function _W(t,e){return e=Ja(181387,e),Object.keys(t).sort().reduce((n,r)=>(n=hM(r,n),U_(t[r],n)),e)}var Ee=require("vscode");function mW(){let t=[];for(let e of Ee.extensions.all){let n=e.packageJSON?.contributes?.jsonValidation;if(Array.isArray(n))for(let r of n){let i=r.url;typeof i=="string"&&(i[0]==="."&&i[1]==="/"&&(i=Ee.Uri.joinPath(e.extensionUri,i).toString(!1)),t.push({fullUri:i,extension:e,label:r.url}))}}return{findExtension(e){for(let n of t)if(n.fullUri===e)return{label:n.label,detail:Ee.l10n.t("Configured by extension: {0}",n.extension.id),uri:Ee.Uri.parse(n.fullUri),buttons:[{iconPath:new Ee.ThemeIcon("extensions"),tooltip:Ee.l10n.t("Open Extension")}],buttonCommands:[()=>Ee.commands.executeCommand("workbench.extensions.action.showExtensionsWithIds",[[n.extension.id]])]}}}}function vW(t){let e=Ee.Uri.parse(t),n=Ee.workspace.getWorkspaceFolder(e),r=Ee.workspace.getConfiguration("json",e).inspect("schemas"),i=[],o=r?.workspaceFolderValue;if(n&&Array.isArray(o))for(let a of o){let c=a.url;if(typeof c=="string"){let u=c;c[0]==="."&&c[1]==="/"&&(u=Ee.Uri.joinPath(n.uri,c).toString(!1)),i.push({fullUri:u,workspaceFolder:n,label:c})}}let s=r?.globalValue;if(Array.isArray(s))for(let a of s){let c=a.url;if(typeof c=="string"){let u=c;n&&c[0]==="."&&c[1]==="/"&&(u=Ee.Uri.joinPath(n.uri,c).toString(!1)),i.push({fullUri:u,workspaceFolder:void 0,label:c})}}return{findSetting(a){for(let c of i)if(c.fullUri===a)return{label:c.label,detail:c.workspaceFolder?Ee.l10n.t("Configured in workspace settings"):Ee.l10n.t("Configured in user settings"),uri:Ee.Uri.parse(c.fullUri),buttons:[{iconPath:new Ee.ThemeIcon("gear"),tooltip:Ee.l10n.t("Open Settings")}],buttonCommands:[()=>Ee.commands.executeCommand(c.workspaceFolder?"workbench.action.openWorkspaceSettingsFile":"workbench.action.openSettingsJson",["json.schemas"])]}}}}function yW(t){let e=mW(),n=vW(t.uri),r=[],i=[],o=[];for(let c of t.schemas){let u=e.findExtension(c);if(u){r.push(u);continue}let l=n.findSetting(c);if(l){i.push(l);continue}o.push({label:c,uri:Ee.Uri.parse(c)})}let s=[...r,...i,...o];s.length===0&&s.push({label:Ee.l10n.t("No schema configured for this file"),buttons:[{iconPath:new Ee.ThemeIcon("gear"),tooltip:Ee.l10n.t("Open Settings")}],buttonCommands:[()=>Ee.commands.executeCommand("workbench.action.openSettingsJson",["json.schemas"])]}),s.push({label:"",kind:Ee.QuickPickItemKind.Separator}),s.push({label:Ee.l10n.t("Learn more about JSON schema configuration..."),uri:Ee.Uri.parse("https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings")});let a=Ee.window.createQuickPick();a.placeholder=s.length?Ee.l10n.t("Select the schema to use for {0}",t.uri):void 0,a.items=s,a.show(),a.onDidAccept(()=>{let c=a.selectedItems[0].uri;c&&(Ee.commands.executeCommand("vscode.open",c),a.dispose())}),a.onDidTriggerItemButton(c=>{let u=c.item.buttons?.indexOf(c.button);u!==void 0&&u>=0&&c.item.buttonCommands&&c.item.buttonCommands[u]&&c.item.buttonCommands[u]()})}function gM(t,e){let n=Ee.languages.createLanguageStatusItem("json.projectStatus",t);n.name=Ee.l10n.t("JSON Validation Status"),n.severity=Ee.LanguageStatusSeverity.Information;let r=Ee.commands.registerCommand(qn.showAssociatedSchemaList,yW),i=Ee.window.onDidChangeActiveTextEditor(()=>{o()});async function o(){let s=Ee.window.activeTextEditor?.document;if(s)try{n.text="$(loading~spin)",n.detail=Ee.l10n.t("Loading JSON info"),n.command=void 0;let a=(await e(s.uri.toString())).schemas;n.detail=void 0,a.length===0?(n.text=Ee.l10n.t("No schema validation"),n.detail=Ee.l10n.t("no JSON schema configured")):a.length===1?(n.text=Ee.l10n.t("Schema validated"),n.detail=Ee.l10n.t("JSON schema configured")):(n.text=Ee.l10n.t("Schema validated"),n.detail=Ee.l10n.t("multiple JSON schemas configured")),n.command={command:qn.showAssociatedSchemaList,title:Ee.l10n.t("Show Schemas"),arguments:[{schemas:a,uri:s.uri.toString()}]}}catch(a){n.text=Ee.l10n.t("Unable to compute used schemas: {0}",a.message),n.detail=void 0,n.command=void 0}else n.text=Ee.l10n.t("Unable to compute used schemas: No document"),n.detail=void 0,n.command=void 0}return o(),Ee.Disposable.from(n,i,r)}function _M(t){let e,n=new Map,r=[];r.push(Ee.window.onDidChangeActiveTextEditor(o=>{e?.dispose(),e=void 0;let s=o?.document;if(s){let a=n.get(s);a!==void 0&&(e=t(a))}})),r.push(Ee.workspace.onDidCloseTextDocument(o=>{n.delete(o)}));function i(o,s){s===!1?(n.delete(o),e&&o===Ee.window.activeTextEditor?.document&&(e.dispose(),e=void 0)):(n.set(o,s),o===Ee.window.activeTextEditor?.document&&(!e||s!==n.get(o))&&(e?.dispose(),e=t(s)))}return{update:i,dispose(){e?.dispose(),r.forEach(o=>o.dispose()),r.length=0,e=void 0,n.clear()}}}var SW="workbench.action.openSettings",DW=Ee.l10n.t("Configure");function mM(t,e,n){let r=Ee.languages.createLanguageStatusItem("json.documentSymbolsStatus",t);return r.name=Ee.l10n.t("JSON Outline Status"),r.severity=Ee.LanguageStatusSeverity.Warning,r.text=Ee.l10n.t("Outline"),r.detail=Ee.l10n.t("only {0} document symbols shown for performance reasons",n),r.command={command:SW,arguments:[e],title:DW},Ee.Disposable.from(r)}function vM(t){let e,n=new Map,r=[];r.push(Ee.window.onDidChangeActiveTextEditor(o=>{e?.dispose(),e=void 0;let s=o?.document;if(s){let a=n.get(s.uri.toString());a!==void 0&&(e=t(a))}})),r.push(Ee.workspace.onDidCloseTextDocument(o=>{n.delete(o.uri.toString())}));function i(o,s){let a=s.find(TT),c=o.toString();if(a===void 0)n.delete(c),e&&c===Ee.window.activeTextEditor?.document.uri.toString()&&(e.dispose(),e=void 0);else{if(n.get(c)?.message===a.message)return;n.set(c,a),c===Ee.window.activeTextEditor?.document.uri.toString()&&(e?.dispose(),e=t(a))}}return{update:i,dispose(){e?.dispose(),r.forEach(o=>o.dispose()),r.length=0,e=void 0,n.clear()}}}function yM(t,e,n){let r=Ee.languages.createLanguageStatusItem("json.documentSymbolsStatus",t);if(r.name=Ee.l10n.t("JSON Outline Status"),r.severity=Ee.LanguageStatusSeverity.Error,r.text="Schema download issue",!Ee.workspace.isTrusted)r.detail=Ee.l10n.t("Workspace untrusted"),r.command={command:qn.workbenchTrustManage,title:"Configure Trust"};else if(!e)r.detail=Ee.l10n.t("Download disabled"),r.command={command:qn.workbenchActionOpenSettings,arguments:[Tt.enableSchemaDownload],title:"Configure"};else if(typeof n.code=="number"&&n.code===uf.UntrustedSchemaError){r.detail=Ee.l10n.t("Location untrusted");let i=n.relatedInformation?.[0]?.location.uri;i?r.command={command:qn.configureTrustedDomainsCommandId,arguments:[i.toString()],title:"Configure Trusted Domains"}:r.command={command:qn.workbenchActionOpenSettings,arguments:[Tt.trustedDomains],title:"Configure Trusted Domains"}}else r.detail=Ee.l10n.t("Unable to resolve schema"),r.command={command:qn.retryResolveSchemaCommandId,title:"Retry"};return Ee.Disposable.from(r)}var Sp=require("vscode");function DM(){let t=new Sp.EventEmitter,e=new Set,n=new Set;function r(){let o=e,s=n;e=new Set,e.add("json"),e.add("jsonc"),e.add("snippets"),n=new Set,n.add("jsonc"),n.add("snippets");for(let a of Sp.extensions.allAcrossExtensionHosts){let c=a.packageJSON?.contributes?.jsonLanguageParticipants;if(Array.isArray(c))for(let u of c){let l=u.languageId;typeof l=="string"&&(e.add(l),u.comments===!0&&n.add(l))}}return!SM(e,o)||!SM(n,s)}r();let i=Sp.extensions.onDidChange(o=>{r()&&t.fire()});return{onDidChange:t.event,get documentSelector(){return Array.from(e)},hasLanguage(o){return e.has(o)},useComments(o){return n.has(o)},dispose:()=>i.dispose()}}function SM(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}var EM=require("vscode");function bM(t,e){if(NW(t.authority))return!0;for(let[n,r]of Object.entries(e))if(!(typeof n!="string"||n.trim()==="")){if(n==="*")return r;try{let i=EM.Uri.parse(n);if(t.scheme!==i.scheme||!EW(t.authority,i.authority)||!bW(t.path,i.path))continue;return r}catch{continue}}return!1}function EW(t,e){if(t=t.toLowerCase(),e=e.toLowerCase(),e===t)return!0;if(e.startsWith("*.")){let n=e.substring(2);return t===n||t.endsWith("."+n)}return!1}function bW(t,e){return!e||e==="/"||t===e?!0:e.endsWith("/")?t.startsWith(e):t.startsWith(e+"/")||t===e}var CW=/^(.+\.)?localhost(:\d+)?$/i,TW=/^127\.0\.0\.1(:\d+)?$/,wW=/^\[::1\](:\d+)?$/;function NW(t){return CW.test(t)||TW.test(t)||wW.test(t)}var OM;(e=>e.type=new Kt.RequestType("vscode/content"))(OM||={});var Y_;(e=>e.type=new Kt.NotificationType("json/schemaContent"))(Y_||={});var xM;(e=>e.type=new Kt.RequestType("json/validate"))(xM||={});var IM;(e=>e.type=new Kt.RequestType("json/languageStatus"))(IM||={});var AM;(e=>e.type=new Kt.RequestType("json/validateContent"))(AM||={});var MM;(e=>e.type=new Kt.RequestType("json/sort"))(MM||={});var wT;(e=>e.type=new Kt.NotificationType("json/schemaAssociations"))(wT||={});var Tt;(d=>(d.enableFormatter="json.format.enable",d.enableKeepLines="json.format.keepLines",d.enableValidation="json.validate.enable",d.enableSchemaDownload="json.schemaDownload.enable",d.trustedDomains="json.schemaDownload.trustedDomains",d.maxItemsComputed="json.maxItemsComputed",d.editorFoldingMaximumRegions="editor.foldingMaximumRegions",d.editorColorDecoratorsLimit="editor.colorDecoratorsLimit",d.editorSection="editor",d.foldingMaximumRegions="foldingMaximumRegions",d.colorDecoratorsLimit="colorDecoratorsLimit"))(Tt||={});var qn;(c=>(c.workbenchActionOpenSettings="workbench.action.openSettings",c.workbenchTrustManage="workbench.trust.manage",c.retryResolveSchemaCommandId="_json.retryResolveSchema",c.configureTrustedDomainsCommandId="_json.configureTrustedDomains",c.showAssociatedSchemaList="_json.showAssociatedSchemaList",c.clearCacheCommandId="json.clearCache",c.validateCommandId="json.validate",c.sortCommandId="json.sort"))(qn||={});var NT=ie.l10n.t("JSON Language Server"),k_=5e3,CM=5e3,TM=5e3,wM=5e3,NM=5e3;async function LM(t,e,n){let r=DM();t.subscriptions.push(r);let i=await PM(t,r,e,n),o;return r.onDidChange(()=>{o&&o.dispose(),o=n.timer.setTimeout(async()=>{if(i){n.logOutputChannel.info("Extensions have changed, restarting JSON server..."),n.logOutputChannel.info("");let s=i;i=void 0,await s.dispose(),i=await PM(t,r,e,n)}},2e3)}),{dispose:async()=>{o?.dispose(),await i?.dispose()}}}async function PM(t,e,n,r){let i=[],o,s,a,c=e.documentSelector,u=ie.window.createStatusBarItem("status.json.resolveError",ie.StatusBarAlignment.Right,0);u.name=ie.l10n.t("JSON: Schema Resolution Error"),u.text="$(alert)",i.push(u);let l=new Map,d=!!ie.workspace.getConfiguration().get(Tt.enableSchemaDownload),f=ie.workspace.getConfiguration().get(Tt.trustedDomains,{}),g=!1,h=_M(L=>mM(c,Tt.maxItemsComputed,L));i.push(h);let _=vM(L=>yM(c,d,L));i.push(_),i.push(ie.commands.registerCommand(qn.clearCacheCommandId,async()=>{if(g&&r.schemaRequests.clearCache){let L=await r.schemaRequests.clearCache();await v.sendNotification(Y_.type,L)}ie.window.showInformationMessage(ie.l10n.t("JSON schema cache cleared."))})),i.push(ie.commands.registerCommand(qn.validateCommandId,async(L,K)=>(await v.sendRequest(AM.type,{schemaUri:L.toString(),content:K})).map(v.protocol2CodeConverter.asDiagnostic))),i.push(ie.commands.registerCommand(qn.sortCommandId,async()=>{if(g){let L=ie.window.activeTextEditor;if(L){let K=L.options,z=await Y(L.document,K.tabSize,K.insertSpaces);await L.edit(_e=>{for(let ye of z)_e.replace(v.protocol2CodeConverter.asRange(ye.range),ye.newText)})||ie.window.showErrorMessage(ie.l10n.t("Failed to sort the JSONC document, please consider opening an issue."))}}}));function S(L,K){return _.update(L,K),d?K:K.filter(z=>!TT(z))}let b={documentSelector:c,initializationOptions:{handledSchemaProtocols:["file"],provideFormatter:!1,customCapabilities:{rangeFormatting:{editLimit:1e4}}},synchronize:{configurationSection:["json","http"],fileEvents:ie.workspace.createFileSystemWatcher("**/*.json")},middleware:{workspace:{didChangeConfiguration:()=>v.sendNotification(Kt.DidChangeConfigurationNotification.type,{settings:Z(!0)})},provideDiagnostics:async(L,K,z,j)=>{let _e=await j(L,K,z);if(_e&&_e.kind===Kt.DocumentDiagnosticReportKind.Full){let ye=L instanceof ie.Uri?L:L.uri;_e.items=S(ye,_e.items)}return _e},handleDiagnostics:(L,K,z)=>{K=S(L,K),z(L,K)},provideCompletionItem(L,K,z,j,_e){function ye(lt){let Dt=lt.range;Dt instanceof ie.Range&&Dt.end.isAfter(K)&&Dt.start.isBeforeOrEqual(K)&&(lt.range={inserting:new ie.Range(Dt.start,K),replacing:Dt}),lt.documentation instanceof ie.MarkdownString&&(lt.documentation=RM(lt.documentation))}function Fe(lt){return lt&&(Array.isArray(lt)?lt:lt.items).forEach(ye),lt}let Pe=_e(L,K,z,j);return Dp(Pe)?Pe.then(Fe):Fe(Pe)},provideHover(L,K,z,j){function _e(Fe){return Fe&&Array.isArray(Fe.contents)&&(Fe.contents=Fe.contents.map(Pe=>Pe instanceof ie.MarkdownString?RM(Pe):Pe)),Fe}let ye=j(L,K,z);return Dp(ye)?ye.then(_e):_e(ye)},provideFoldingRanges(L,K,z,j){let _e=j(L,K,z);return Dp(_e),_e},provideDocumentColors(L,K,z){let j=z(L,K);return Dp(j),j},provideDocumentSymbols(L,K,z){function j(Pe){return Pe.reduce((lt,Dt)=>lt+1+j(Dt.children),0)}function _e(Pe){return Pe[0]instanceof ie.DocumentSymbol}function ye(Pe){return Array.isArray(Pe)&&(_e(Pe)?j(Pe):Pe.length)>k_?h.update(L,k_):h.update(L,!1),Pe}let Fe=z(L,K);return Dp(Fe)?Fe.then(ye):ye(Fe)}}};b.outputChannel=r.logOutputChannel;let v=n("json",NT,b);v.registerProposedFeatures();let E={};v.onRequest(OM.type,async L=>{let K=ie.Uri.parse(L),z=K.toString(!0);if(K.scheme==="untitled")throw new Kt.ResponseError(7,ie.l10n.t("Unable to load {0}",z));if(K.scheme==="vscode")try{r.logOutputChannel.info("read schema from vscode: "+z),N(K);let j=await ie.workspace.fs.readFile(K);return new TextDecoder().decode(j)}catch(j){throw new Kt.ResponseError(6,j.toString(),j)}else if(K.scheme!=="http"&&K.scheme!=="https")try{let j=await ie.workspace.openTextDocument(K);return E[z]=!0,j.getText()}catch(j){throw new Kt.ResponseError(3,j.toString(),j)}else if(d){if(!ie.workspace.isTrusted)throw new Kt.ResponseError(1,ie.l10n.t("Downloading schemas is disabled in untrusted workspaces"));if(!await U(K))throw new Kt.ResponseError(2,ie.l10n.t("Location {0} is untrusted",z));r.telemetry&&K.authority==="schema.management.azure.com"&&r.telemetry.sendTelemetryEvent("json.schema",{schemaURL:z});try{return await r.schemaRequests.getContent(z)}catch(j){throw new Kt.ResponseError(5,j.toString(),j)}}else throw new Kt.ResponseError(4,ie.l10n.t("Downloading schemas is disabled through setting '{0}'",Tt.enableSchemaDownload))}),await v.start(),g=!0;let x=L=>E[L]?(v.sendNotification(Y_.type,L),!0):!1,P=L=>{x(L)&&delete E[L],l.delete(L)},T=new Map;i.push(new ie.Disposable(()=>{for(let L of T.values())L.dispose()}));let N=L=>{let K=L.toString();if(!T.has(K))try{let z=ie.workspace.createFileSystemWatcher(new ie.RelativePattern(L,"*")),j=Pe=>{r.logOutputChannel.info("schema change detected "+Pe.toString()),v.sendNotification(Y_.type,K)},_e=z.onDidCreate(j),ye=z.onDidChange(j),Fe=z.onDidDelete(()=>{let Pe=T.get(K);Pe&&(Pe.dispose(),T.delete(K))});T.set(K,ie.Disposable.from(z,_e,ye,Fe))}catch{r.logOutputChannel.info("Problem installing a file system watcher for "+K)}};i.push(ie.workspace.onDidChangeTextDocument(L=>x(L.document.uri.toString()))),i.push(ie.workspace.onDidCloseTextDocument(L=>P(L.uri.toString()))),i.push(ie.commands.registerCommand(qn.retryResolveSchemaCommandId,R)),i.push(ie.commands.registerCommand(qn.configureTrustedDomainsCommandId,re)),i.push(ie.languages.registerCodeActionsProvider(c,{provideCodeActions(L,K,z){let j=[];for(let _e of z.diagnostics)if(typeof _e.code=="number")switch(_e.code){case uf.UntrustedSchemaError:{let ye=ie.l10n.t("Configure Trusted Domains..."),Fe=new ie.CodeAction(ye,ie.CodeActionKind.QuickFix),Pe=_e.relatedInformation?.[0]?.location.uri;Pe?Fe.command={command:qn.configureTrustedDomainsCommandId,arguments:[Pe.toString()],title:ye}:Fe.command={command:qn.workbenchActionOpenSettings,arguments:[Tt.trustedDomains],title:ye},Fe.diagnostics=[_e],Fe.isPreferred=!0,j.push(Fe)}break;case uf.HTTPDisabledError:{let ye=ie.l10n.t("Enable Schema Downloading..."),Fe=new ie.CodeAction(ye,ie.CodeActionKind.QuickFix);Fe.command={command:qn.workbenchActionOpenSettings,arguments:[Tt.enableSchemaDownload],title:ye},Fe.diagnostics=[_e],Fe.isPreferred=!0,j.push(Fe)}break}return j}},{providedCodeActionKinds:[ie.CodeActionKind.QuickFix]})),v.sendNotification(wT.type,await oe(!1));let M=0,q,k=()=>{let L=++M;q?.dispose(),q=r.timer.setTimeout(async()=>{q=void 0;let K=await oe(!0);L===M&&v.sendNotification(wT.type,K)},500)};i.push(new ie.Disposable(()=>{M++,q?.dispose()}));let W=new Map,ne=()=>{let L=new Set(FM().map(K=>K.toString()));for(let[K,z]of W)L.has(K)||(z.dispose(),W.delete(K));for(let K of L)if(!W.has(K)){let z=ie.Uri.parse(K),j=z.path.substring(z.path.lastIndexOf("/")+1),_e=z.with({path:z.path.substring(0,z.path.length-j.length),query:void 0,fragment:void 0}),ye=ie.workspace.createFileSystemWatcher(new ie.RelativePattern(_e,j));W.set(K,ie.Disposable.from(ye,ye.onDidCreate(k),ye.onDidChange(k),ye.onDidDelete(k)))}};ne(),i.push(new ie.Disposable(()=>W.forEach(L=>L.dispose()))),i.push(ie.extensions.onDidChange(()=>{ne(),k()})),he(),i.push({dispose:()=>o&&o.dispose()}),i.push(ie.workspace.onDidChangeConfiguration(L=>{L.affectsConfiguration(Tt.enableFormatter)?he():L.affectsConfiguration(Tt.enableSchemaDownload)?(d=!!ie.workspace.getConfiguration().get(Tt.enableSchemaDownload),R()):L.affectsConfiguration(Tt.editorFoldingMaximumRegions)||L.affectsConfiguration(Tt.editorColorDecoratorsLimit)?v.sendNotification(Kt.DidChangeConfigurationNotification.type,{settings:Z(!0)}):L.affectsConfiguration(Tt.trustedDomains)&&(f=ie.workspace.getConfiguration().get(Tt.trustedDomains,{}),R())})),i.push(ie.workspace.onDidGrantWorkspaceTrust(()=>R())),i.push(gM(c,L=>v.sendRequest(IM.type,L)));function he(){let L=ie.workspace.getConfiguration().get(Tt.enableFormatter);!L&&o?(o.dispose(),o=void 0):L&&!o&&(o=ie.languages.registerDocumentRangeFormattingEditProvider(c,{provideDocumentRangeFormattingEdits(K,z,j,_e){let ye=ie.workspace.getConfiguration("files",K),Fe={trimTrailingWhitespace:ye.get("trimTrailingWhitespace"),trimFinalNewlines:ye.get("trimFinalNewlines"),insertFinalNewline:ye.get("insertFinalNewline")},Pe={textDocument:v.code2ProtocolConverter.asTextDocumentIdentifier(K),range:v.code2ProtocolConverter.asRange(z),options:v.code2ProtocolConverter.asFormattingOptions(j,Fe)};return v.sendRequest(Kt.DocumentRangeFormattingRequest.type,Pe,_e).then(v.protocol2CodeConverter.asTextEdits,lt=>(v.handleFailedRequest(Kt.DocumentRangeFormattingRequest.type,void 0,lt,[]),Promise.resolve([])))}}))}async function R(){let L=ie.window.activeTextEditor;if(L&&e.hasLanguage(L.document.languageId)){u.text="$(watch)",u.tooltip=ie.l10n.t("Validating...");let K=L.document.uri.toString();await v.sendRequest(xM.type,K)}}async function Y(L,K=4,z=!0){let j=ie.workspace.getConfiguration("files",L),_e={tabSize:Number(K),insertSpaces:!!z,trimTrailingWhitespace:j.get("trimTrailingWhitespace"),trimFinalNewlines:j.get("trimFinalNewlines"),insertFinalNewline:j.get("insertFinalNewline")},ye={uri:L.uri.toString(),options:_e};return(await v.sendRequest(MM.type,ye)).map(Pe=>new ie.TextEdit(new ie.Range(Pe.range.start.line,Pe.range.start.character,Pe.range.end.line,Pe.range.end.character),Pe.newText))}function Z(L){return(!s||L)&&(s=IW()),s}async function oe(L){return(!a||L)&&(a=PW()),a}async function U(L){if(L.scheme!=="http"&&L.scheme!=="https")return!0;let K=L.toString(!0);if(bM(L,f))return!0;let z=await oe(!1);for(let _e of z)if(_e.uri===K)return!0;let j=Z(!1);if(j.json&&j.json.schemas){for(let _e of j.json.schemas)if(_e.url===K)return!0}return!1}async function re(L){let K=ye=>Object.fromEntries(Object.entries(ye).sort(([Fe],[Pe])=>Fe.localeCompare(Pe))),z=async ye=>{let Fe=ie.workspace.getConfiguration(),Pe=Fe.get(Tt.trustedDomains,{});if(Pe[ye]===!0)return;let lt=K({...Pe,[ye]:!0});await Fe.update(Tt.trustedDomains,lt,!0)},j=[];try{let ye=ie.Uri.parse(L),Fe=`${ye.scheme}://${ye.authority}`;j.push({label:ie.l10n.t("Trust Domain: {0}",Fe),description:ie.l10n.t("Allow all schemas from this domain"),execute:async()=>{await z(Fe),await ie.commands.executeCommand(qn.workbenchActionOpenSettings,Tt.trustedDomains)}}),j.push({label:ie.l10n.t("Trust URI: {0}",L),description:ie.l10n.t("Allow only this specific schema"),execute:async()=>{await z(L),await ie.commands.executeCommand(qn.workbenchActionOpenSettings,Tt.trustedDomains)}})}catch{r.logOutputChannel.error(`Failed to parse schema URI: ${L}`)}j.push({label:ie.l10n.t("Configure Setting"),description:ie.l10n.t("Open settings editor"),execute:async()=>{await ie.commands.executeCommand(qn.workbenchActionOpenSettings,Tt.trustedDomains)}});let _e=await ie.window.showQuickPick(j,{placeHolder:ie.l10n.t("Select how to configure trusted schema domains")});_e&&await _e.execute()}return{dispose:async()=>{await v.stop(),i.forEach(L=>L.dispose()),o?.dispose()}}}async function PW(){return OW().concat(await xW())}function RW(t,e){return e.startsWith("./")?ie.Uri.joinPath(t,e):ie.Uri.parse(e)}function OW(){let t=[];return ie.extensions.allAcrossExtensionHosts.forEach(e=>{let n=e.packageJSON;if(n&&n.contributes&&n.contributes.jsonValidation){let r=n.contributes.jsonValidation;Array.isArray(r)&&r.forEach(i=>{let{fileMatch:o,url:s}=i;if(typeof o=="string"&&(o=[o]),Array.isArray(o)&&typeof s=="string"){let a=s;a[0]==="."&&a[1]==="/"&&(a=ie.Uri.joinPath(e.extensionUri,a).toString()),o=o.map(c=>(c[0]==="%"?(c=c.replace(/%APP_SETTINGS_HOME%/,"/User"),c=c.replace(/%MACHINE_SETTINGS_HOME%/,"/Machine"),c=c.replace(/%APP_WORKSPACES_HOME%/,"/Workspaces")):c.match(/^(\w+:\/\/|\/|!)/)||(c="/"+c),c)),t.push({fileMatch:o,uri:a})}})}}),t}function FM(){let t=[];for(let e of ie.extensions.allAcrossExtensionHosts){let n=e.packageJSON?.contributes?.jsonValidationRegistry;if(Array.isArray(n))for(let r of n)typeof r?.url=="string"&&t.push(RW(e.extensionUri,r.url))}return t}async function xW(){let t=[];for(let e of FM())try{let n=await ie.workspace.fs.readFile(e),r=new TextDecoder().decode(n),i=JSON.parse(r);if(Array.isArray(i.schemas))for(let o of i.schemas)typeof o.url=="string"&&Array.isArray(o.fileMatch)&&o.fileMatch.every(s=>typeof s=="string")&&t.push({fileMatch:o.fileMatch,uri:o.url})}catch{}return t}function IW(){let t=ie.workspace.getConfiguration(),e=ie.workspace.getConfiguration("http"),n=l=>Math.trunc(Math.max(0,Number(l)))||5e3;k_=n(ie.workspace.getConfiguration().get(Tt.maxItemsComputed));let r=ie.workspace.getConfiguration(Tt.editorSection,{languageId:"json"}),i=ie.workspace.getConfiguration(Tt.editorSection,{languageId:"jsonc"});CM=n(r.get(Tt.foldingMaximumRegions)),TM=n(i.get(Tt.foldingMaximumRegions)),wM=n(r.get(Tt.colorDecoratorsLimit)),NM=n(i.get(Tt.colorDecoratorsLimit));let o=[],s={http:{proxy:e.get("proxy"),proxyStrictSSL:e.get("proxyStrictSSL")},json:{validate:{enable:t.get(Tt.enableValidation)},format:{enable:t.get(Tt.enableFormatter)},keepLines:{enable:t.get(Tt.enableKeepLines)},schemas:o,resultLimit:k_+1,jsonFoldingLimit:CM+1,jsoncFoldingLimit:TM+1,jsonColorDecoratorLimit:wM+1,jsoncColorDecoratorLimit:NM+1}},a=(l,d,f)=>{if(l)for(let g of l){let h=AW(g,f);if(h){let _={url:h,fileMatch:g.fileMatch,folderUri:d,schema:g.schema};o.push(_)}}},c=ie.workspace.workspaceFolders??[],u=ie.workspace.getConfiguration("json",null).inspect("schemas");if(u)if(a(u.globalValue,void 0,void 0),ie.workspace.workspaceFile){if(u.workspaceValue){let l=ie.Uri.joinPath(ie.workspace.workspaceFile,"..");a(u.workspaceValue,void 0,l)}for(let l of c){let d=l.uri,f=ie.workspace.getConfiguration("json",d).inspect("schemas");a(f?.workspaceFolderValue,d.toString(!1),d)}}else u.workspaceValue&&c.length===1&&a(u.workspaceValue,void 0,c[0].uri);return s}function AW(t,e){let n=t.url;return n?e&&(n[0]==="."||n[0]==="/")&&(n=ie.Uri.joinPath(e,n).toString(!1)):t.schema&&(n=t.schema.id||`vscode://schemas/custom/${encodeURIComponent(U_(t.schema).toString(16))}`),n}function Dp(t){return!!t&&typeof t.then=="function"}function RM(t){let e=new ie.MarkdownString(t.value,!0);return e.isTrusted=t.isTrusted,e}var uf;(r=>(r.SchemaResolveError=65536,r.UntrustedSchemaError=65538,r.HTTPDisabledError=65540))(uf||={});function TT(t){return typeof t.code=="number"&&t.code>=uf.SchemaResolveError}var ug=Nl(YL()),zR=require("fs"),eY=Nl(require("path")),tS=Nl(HL()),tY=Nl(JU());var xd=require("fs"),cg=Nl(require("path")),ZU=require("crypto"),QU="json-schema-cache",Zy=class{constructor(e,n){this.schemaCacheLocation=e;this.globalState=n;let r=n.get(QU,{}),i={};for(let o in r){let{etag:s,fileName:a,updateTime:c}=r[o];typeof s=="string"&&typeof a=="string"&&typeof c=="number"&&(i[o]={etag:s,fileName:a,updateTime:c})}this.cacheInfo=i}schemaCacheLocation;globalState;cacheInfo;getETag(e){return this.cacheInfo[e]?.etag}getLastUpdatedInHours(e){let n=this.cacheInfo[e]?.updateTime;if(n!==void 0)return(new Date().getTime()-n)/1e3/60/60}async putSchema(e,n,r){try{let i=F6(e);await xd.promises.writeFile(cg.join(this.schemaCacheLocation,i),r);let o={etag:n,fileName:i,updateTime:new Date().getTime()};this.cacheInfo[e]=o}catch{delete this.cacheInfo[e]}finally{await this.updateMemento()}}async getSchemaIfUpdatedSince(e,n){let r=this.getLastUpdatedInHours(e);if(r!==void 0&&r<n)return this.loadSchemaFile(e,this.cacheInfo[e],!1)}async getSchema(e,n,r){let i=this.cacheInfo[e];if(i){if(i.etag===n)return this.loadSchemaFile(e,i,r);this.deleteSchemaFile(e,i)}}async loadSchemaFile(e,n,r){let i=cg.join(this.schemaCacheLocation,n.fileName);try{let o=(await xd.promises.readFile(i)).toString();return r&&(n.updateTime=new Date().getTime()),o}catch{delete this.cacheInfo[e];return}finally{await this.updateMemento()}}async deleteSchemaFile(e,n){let r=cg.join(this.schemaCacheLocation,n.fileName);delete this.cacheInfo[e],await this.updateMemento();try{await xd.promises.rm(r)}catch{}}getCacheInfo(){return this.cacheInfo}async updateMemento(){try{await this.globalState.update(QU,this.cacheInfo)}catch{}}async clearCache(){let e=Object.keys(this.cacheInfo);try{let n=await xd.promises.readdir(this.schemaCacheLocation);for(let r of n)try{await xd.promises.unlink(cg.join(this.schemaCacheLocation,r))}catch{}}catch{}finally{this.cacheInfo={},await this.updateMemento()}return e}};function F6(t){return`${(0,ZU.createHash)("sha256").update(t).digest("hex")}.schema.json`}var eS;async function j6(t){let e=await U6(t),n=new tY.default(e.aiKey);t.subscriptions.push(n);let r=Ia.window.createOutputChannel(NT,{log:!0});t.subscriptions.push(r);let i=`./server/${e.main.indexOf("/dist/")!==-1?"dist":"out"}/node/jsonServerMain`,o=t.asAbsolutePath(i),s={execArgv:["--nolazy","--inspect="+(6e3+Math.round(Math.random()*999))]},a={run:{module:o,transport:ug.TransportKind.ipc},debug:{module:o,transport:ug.TransportKind.ipc,options:s}},c=(d,f,g)=>new ug.LanguageClient(d,f,a,g),u={setTimeout(d,f,...g){let h=setTimeout(d,f,...g);return{dispose:()=>clearTimeout(h)}}};process.env.VSCODE_L10N_BUNDLE_LOCATION=Ia.l10n.uri?.toString()??"";let l=await k6(t,r);eS=await LM(t,c,{schemaRequests:l,telemetry:n,timer:u,logOutputChannel:r})}async function q6(){eS&&(await eS.dispose(),eS=void 0)}async function U6(t){let e=t.asAbsolutePath("./package.json");try{return JSON.parse((await zR.promises.readFile(e)).toString())}catch(n){return console.log(`Problems reading ${e}: ${n}`),{name:"",version:"",aiKey:"",main:""}}}var Y6=48;async function k6(t,e){let n,r=t.globalStorageUri,i;if(r.scheme==="file"){let a=eY.join(r.fsPath,"json-schema-cache");await zR.promises.mkdir(a,{recursive:!0});let c=new Zy(a,t.globalState);e.trace(`[json schema cache] initial state: ${JSON.stringify(c.getCacheInfo(),null," ")}`),n=c,i=async()=>{let u=await c.clearCache();return e.trace(`[json schema cache] cache cleared. Previously cached schemas: ${u.join(", ")}`),u}}let o=a=>typeof a?.status=="number",s=async(a,c)=>{let u={"Accept-Encoding":"gzip, deflate","User-Agent":`${Ia.env.appName} (${Ia.env.appHost})`};c&&(u["If-None-Match"]=c);try{e.trace(`[json schema cache] Requesting schema ${a} etag ${c}...`);let l=await(0,tS.xhr)({url:a,followRedirects:5,headers:u});if(n){let d=l.headers.etag;typeof d=="string"?(e.trace(`[json schema cache] Storing schema ${a} etag ${d} in cache`),await n.putSchema(a,d,l.responseText)):e.trace(`[json schema cache] Response: schema ${a} no etag`)}return l.responseText}catch(l){if(o(l)){if(l.status===304&&c&&n){e.trace(`[json schema cache] Response: schema ${a} unchanged etag ${c}`);let f=await n.getSchema(a,c,!0);return f?(e.trace(`[json schema cache] Get schema ${a} etag ${c} from cache`),f):s(a)}let d=(0,tS.getErrorStatusDescription)(l.status);throw d&&l.responseText&&(d=`${d}
${l.responseText.substring(0,200)}`),d||(d=l.toString()),e.trace(`[json schema cache] Respond schema ${a} error ${d}`),d}throw l}};return{getContent:async a=>{if(n&&/^https?:\/\/(json|www)\.schemastore\.org\//.test(a)){let c=await n.getSchemaIfUpdatedSince(a,Y6);if(c)return e.logLevel===Ia.LogLevel.Trace&&e.trace(`[json schema cache] Schema ${a} from cache without request (last accessed ${n.getLastUpdatedInHours(a)} hours ago)`),c}return s(a,n?.getETag(a))},clearCache:i}}0&&(module.exports={activate,deactivate});
/*! Bundled license information:

@nevware21/ts-utils/dist/es5/mod/ts-utils.js:
  (*! https://github.com/nevware21/ts-utils v0.14.0 *)

@nevware21/ts-async/dist/es5/mod/ts-async.js:
  (*!
   * NevWare21 Solutions LLC - ts-async, 0.5.4
   * https://github.com/nevware21/ts-async
   * Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
   * Licensed under the MIT license.
   *)
*/
//# sourceMappingURL=jsonClientMain.js.map