essage",En="type",tf="handler",Ec="status",b_="getResponseHeader",x_="getAllResponseHeaders",rf="isChildEvt",$s="data",Cc="getCtx",Ri="setCtx",zv="complete",P_="itemsReceived",nu="urlString",D_="sendPOST",$v="headers",bc="timeout",I_="setRequestHeader",iu="traceId",ou="spanId",Js="traceFlags",Jv="getAttribute"});function xP(r,e){N_||(N_=t_("AggregationError",function(n,i){i[se]>1&&(n.errors=i[1])}));var t=r||"One or more errors occurred.";throw V(e,function(n,i){t+=`
`.concat(i," > ").concat(ue(n))}),new N_(t,e||[])}var N_,PP=C(()=>{Ne();ct()});function jn(r,e){return RP(r,function(t){return e?e({status:"fulfilled",rejected:!1,value:t}):t},function(t){return e?e({status:M_,rejected:!0,reason:t}):t})}function RP(r,e,t,n){var i=r;try{if(nn(r))(e||t)&&(i=r.then(e,t));else try{e&&(i=e(r))}catch(o){if(t)i=t(o);else throw o}}finally{n&&kF(i,n)}return i}function kF(r,e){var t=r;return e&&(nn(r)?r.finally?t=r.finally(e):t=r.then(function(n){return e(),n},function(n){throw e(),n}):e()),t}function LF(r,e,t,n){R_=R_||{toString:function(){return"[[PromiseState]]"}},w_=w_||{toString:function(){return"[[PromiseResult]]"}},A_=A_||{toString:function(){return"[[PromiseIsHandled]]"}};var i={};i[R_]={get:e},i[w_]={get:t},i[A_]={get:n},Xx(r,i)}function FF(r){var e;return r&&r.createEvent&&(e=r.createEvent("Event")),!!e&&e.initEvent}function MF(r,e,t,n){var i=qt();!Xv&&(Xv=Fn(!!fr(FF,[i]).v));var o=Xv.v?i.createEvent("Event"):n?new Event(e):{};if(t&&t(o),Xv.v&&o.initEvent(e,!1,!0),o&&r[IP])r[IP](o);else{var s=r["on"+e];if(s)s(o);else{var a=et("console");a&&(a.error||a.log)(e,ue(o))}}}function NP(r){return Pe(r)?r.toString():ue(r)}function OP(r,e,t){var n=zl(arguments,3),i=0,o=!1,s,a=[],c=YF++,l=nf.length>0?nf[nf.length-1]:void 0,u=!1,d=null,f;function v(k,j){try{nf.push(c),u=!0,d&&d.cancel(),d=null;var q=r(function(oe,$){a.push(function(){try{var W=i===2?k:j,re=ke(W)?s:Pe(W)?W(s):W;nn(re)?re.then(oe,$):W?oe(re):i===3?$(re):oe(re)}catch(Q){$(Q)}}),o&&N()},n);return q}finally{nf.pop()}}function m(k){return v(void 0,k)}function S(k){var j=k,q=k;return Pe(k)&&(j=function(oe){return k&&k(),oe},q=function(oe){throw k&&k(),oe}),v(j,q)}function y(){return wP[i]}function N(){if(a.length>0){var k=a.slice();a=[],u=!0,d&&d.cancel(),d=null,e(k)}}function b(k,j){return function(q){if(i===j){if(k===2&&nn(q)){i=1,q.then(b(2,1),b(3,1));return}i=k,o=!0,s=q,N(),!u&&k===3&&!d&&(d=Mn(_,VF))}}}function _(){if(!u)if(u=!0,cP())process.emit(AP,s,f);else{var k=rr()||on();!O_&&(O_=Fn(fr(et,[Qv+"RejectionEvent"]).v)),MF(k,UF,function(j){return ot(j,"promise",{g:function(){return f}}),j.reason=s,j},!!O_.v)}}f={then:v,catch:m,finally:S},vn(f,"state",{get:y}),DP&&LF(f,y,function(){return bv(s)},function(){return u}),lP()&&(f[Gd(11)]="IPromise");function A(){return"IPromise"+(DP?"["+c+(ke(l)?"":":"+l)+"]":"")+" "+y()+(o?" - "+NP(s):"")}return f.toString=A,(function(){Pe(t)||kr(Qv+": executor is not a function - "+NP(t));var j=b(3,0);try{t.call(f,b(2,0),j)}catch(q){j(q)}})(),f}function jF(r){return function(e){var t=zl(arguments,1);return r(function(n,i){try{var o=[],s=1;wv(e,function(a,c){a&&(s++,RP(a,function(l){o[c]=l,--s===0&&n(o)},i))}),s--,s===0&&n(o)}catch(a){i(a)}},t)}}function qF(r){return Fn(function(e){var t=zl(arguments,1);return r(function(n,i){var o=[],s=1;function a(c,l){s++,jn(c,function(u){u.rejected?o[l]={status:M_,reason:u.reason}:o[l]={status:"fulfilled",value:u.value},--s===0&&n(o)})}try{pe(e)?V(e,a):ZS(e)?wv(e,a):kr("Input is not an iterable"),s--,s===0&&n(o)}catch(c){i(c)}},t)})}function kP(r){V(r,function(e){try{e()}catch{}})}function KF(r){var e=Or(r)?r:0;return function(t){Mn(function(){kP(t)},e)}}function LP(r,e){return OP(LP,KF(e),r,e)}function HF(r,e){!k_&&(k_=Fn(fr(et,[Qv]).v||null));var t=k_.v;if(!t)return LP(r);Pe(r)||kr(Qv+": executor is not a function - "+ue(r));var n=0;function i(){return wP[n]}var o=new t(function(s,a){function c(u){n=2,s(u)}function l(u){n=3,a(u)}r(c,l)});return vn(o,"state",{get:i}),o}function of(r){return OP(of,kP,r)}function FP(r,e){return!L_&&(L_=qF(of)),L_.v(r,e)}function ni(r,e){return!F_&&(F_=Fn(HF)),F_.v.call(this,r,e)}var Qv,M_,R_,w_,A_,DP,wP,IP,Xv,AP,UF,nf,YF,VF,O_,k_,L_,F_,MP,OH,xc=C(()=>{Ne();Qv="Promise",M_="rejected";DP=!1;wP=["pending","resolving","resolved",M_],IP="dispatchEvent";AP="unhandledRejection",UF=AP.toLowerCase(),nf=[],YF=0,VF=10;MP=jF(ni),OH=Gd(11)});var qn,Re,Xs,Ft,Zv,sf,Qo,Pc,Cn,Dc,su,Qs,au,io,em,tm,rm,cu,nm,im,UP,nr=C(()=>{qn=void 0,Re="",Xs="channels",Ft="core",Zv="createPerfMgr",sf="disabled",Qo="extensionConfig",Pc="extensions",Cn="processTelemetry",Dc="priority",su="eventsSent",Qs="eventsDiscarded",au="eventsSendRequest",io="perfEvent",em="offlineEventsStored",tm="offlineBatchSent",rm="offlineBatchDrop",cu="getPerfMgr",nm="domain",im="path",UP="Not dynamic - "});function ii(r){return!G(r)}function Ic(r){var e=r;return e&&Ie(e)&&(e=e[Ni](GF,function(t,n){return n.toUpperCase()}),e=e[Ni](WF,"_"),e=e[Ni](zF,function(t,n){return"_"+n})),e}function $t(r,e){return r&&e?mn(r,e)!==-1:!1}function Kn(r){return r&&r.toISOString()||""}function yt(r){return fc(r)?r[xr]:Re}function oi(r,e,t,n,i){var o=t;return r&&(o=r[e],o!==t&&(!i||i(o))&&(!n||n(t))&&(o=t,r[e]=o)),o}function af(r,e,t){var n;return r?(n=r[e],!n&&G(n)&&(n=ke(t)?{}:t,r[e]=n)):n=ke(t)?{}:t,n}function VP(r,e){var t=null,n=null;return Pe(r)?t=r:n=r,function(){var i=arguments;if(t&&(n=t()),n)return n[e][Ks](n,i)}}function U_(r,e,t){if(r&&e&&Lt(r)&&Lt(e)){var n=function(o){if(Ie(o)){var s=e[o];Pe(s)?(!t||t(o,!0,e,r))&&(r[o]=VP(e,o)):(!t||t(o,!1,e,r))&&(Ei(r,o)&&delete r[o],ot(r,o,{g:function(){return e[o]},s:function(a){e[o]=a}}))}};for(var i in e)n(i)}return r}function Zo(r,e,t,n,i){r&&e&&t&&(i!==!1||ke(r[e]))&&(r[e]=VP(t,n))}function Hn(r,e,t,n){return r&&e&&Lt(r)&&pe(t)&&V(t,function(i){Ie(i)&&Zo(r,i,e,i,n)}),r}function Y_(r){return(function(){function e(){var t=this;r&&me(r,function(n,i){t[n]=i})}return e})()}function bn(r){return r&&Kl&&(r=Vl(Kl({},r))),r}function om(r,e,t,n,i,o){var s=arguments,a=s[0]||{},c=s[se],l=!1,u=1;for(c>0&&Xi(a)&&(l=a,a=s[u]||{},u++),Lt(a)||(a={});u<c;u++){var d=s[u],f=pe(d),v=Lt(d);for(var m in d){var S=f&&m in d||v&&Ei(d,m);if(S){var y=d[m],N=void 0;if(l&&y&&((N=pe(y))||Fr(y))){var b=a[m];N?pe(b)||(b=[]):Fr(b)||(b={}),y=om(l,b,y)}y!==void 0&&(a[m]=y)}}}return a}function wi(r){try{return r.responseText}catch{}return null}function Nc(r,e){return r?"XDomainRequest,Response:"+wi(r)||"":e}function es(r,e){return r?"XMLHttpRequest,Status:"+r[Ec]+",Response:"+wi(r)||r.response||"":e}function ts(r,e){return e&&(Or(e)?r=[e].concat(r):pe(e)&&(r=e.concat(r))),r}function V_(r,e,t,n,i,o){n===void 0&&(n=!1),i===void 0&&(i=!1);function s(c,l,u){try{c[l]=u}catch{}}var a=new XMLHttpRequest;return n&&s(a,$F,n),t&&s(a,YP,t),a.open(r,e,!i),t&&s(a,YP,t),!i&&o&&s(a,JF,o),a}function sm(r){var e={};if(Ie(r)){var t=tt(r)[ri](/[\r\n]+/);V(t,function(n){if(n){var i=n.indexOf(": ");if(i!==-1){var o=tt(n.substring(0,i))[yn](),s=tt(n.substring(i+1));e[o]=s}else e[tt(n)]=1}})}return e}function lu(r,e,t){if(!r[t]&&e&&e[b_]){var n=e[b_](t);n&&(r[t]=tt(n))}return r}function rs(r,e){var t={};return r[x_]?t=sm(r[x_]()):e&&(t=lu(t,r,ZF),t=lu(t,r,XF),t=lu(t,r,QF)),t}var BF,GF,WF,zF,VH,$F,YP,JF,XF,QF,ZF,oo=C(()=>{hn();Ne();ct();nr();BF="getPrototypeOf",GF=/-([a-z])/g,WF=/([^\w\d_$])/g,zF=/^(\d+[\w\d_$])/,VH=Object[BF];$F="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",YP="withCredentials",JF="timeout";XF="kill-duration",QF="kill-duration-seconds",ZF="time-delta-millis"});function HP(r,e){var t=!1;if(r){try{if(t=e in r,!t){var n=r[_i];n&&(t=e in n)}}catch{}if(!t)try{var i=new r;t=!ke(i[e])}catch{}}return t}function G_(r){KP=r}function Rc(r){if(r&&KP){var e=et("__mockLocation");if(e)return e}return typeof location===Ho&&location?location:et(tM)}function cf(){return typeof console!==$i?console:et(rM)}function so(){return!!(typeof JSON===Ho&&JSON||et(jP)!==null)}function Mr(){return so()?JSON||et(jP):null}function lf(){return et(nM)}function uf(){return et(iM)}function Zs(){var r=vr();return r&&r.product?r.product===oM:!1}function ea(){var r=vr();if(r&&(r[ef]!==q_||j_===null)){q_=r[ef];var e=(q_||Re)[yn]();j_=$t(e,H_)||$t(e,B_)}return j_}function df(r){if(r===void 0&&(r=null),!r){var e=vr()||{};r=e?(e.userAgent||Re)[yn]():Re}var t=(r||Re)[yn]();if($t(t,H_)){var n=qt()||{};return Math.max(parseInt(t[ri](H_)[1]),n[eM]||0)}else if($t(t,B_)){var i=parseInt(t[ri](B_)[1]);if(i)return i+4}return null}function xn(r){return(K_===null||r===!1)&&(K_=Bd()&&!!vr().sendBeacon),K_}function ns(r){var e=!1;try{e=!!et("fetch");var t=et("Request");e&&r&&t&&(e=HP(t,"keepalive"))}catch{}return e}function ff(){return uu===null&&(uu=typeof XDomainRequest!==$i,uu&&du()&&(uu=uu&&!HP(et(qP),"withCredentials"))),uu}function du(){var r=!1;try{var e=et(qP);r=!!e}catch{}return r}function BP(r,e){if(r)for(var t=0;t<r[se];t++){var n=r[t];if(n[xr]&&n[xr]===e)return n}return{}}function W_(r){var e=qt();return e&&r?BP(e.querySelectorAll("meta"),r).content:null}function z_(r){var e,t=js();if(t){var n=t.getEntriesByType("navigation")||[];e=BP((n[se]>0?n[0]:{}).serverTiming,r).description}return e}var eM,tM,rM,jP,nM,iM,oM,H_,B_,qP,j_,q_,KP,uu,K_,ta=C(()=>{"use strict";hn();Ne();ct();oo();nr();eM="documentMode",tM="location",rM="console",jP="JSON",nM="crypto",iM="msCrypto",oM="ReactNative",H_="msie",B_="trident/",qP="XMLHttpRequest",j_=null,q_=null,KP=!1,uu=null,K_=null});function sM(r){r<0&&(r>>>=0),pf=WP+r&ra,vf=zP-r&ra,$P=!0}function aM(){try{var r=Kt()&2147483647;sM((Math.random()*GP^r)+r)}catch{}}function mf(r){return r>0?Math.floor(is()/ra*(r+1))>>>0:0}function is(r){var e=0,t=lf()||uf();return t&&t.getRandomValues&&(e=t.getRandomValues(new Uint32Array(1))[0]&ra),e===0&&ea()&&($P||aM(),e=JP()&ra),e===0&&(e=Math.floor(GP*Math.random()|0)),r||(e>>>=0),e}function JP(r){vf=36969*(vf&65535)+(vf>>16)&ra,pf=18e3*(pf&65535)+(pf>>16)&ra;var e=(vf<<16)+(pf&65535)>>>0&ra|0;return r||(e>>>=0),e}function gf(r){r===void 0&&(r=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=is()>>>0,n=0,i=Re;i[se]<r;)n++,i+=e.charAt(t&63),t>>>=6,n===5&&(t=(is()<<2&4294967295|t&3)>>>0,n=0);return i}var GP,ra,WP,zP,$P,pf,vf,am=C(()=>{Ne();ct();ta();nr();GP=4294967296,ra=4294967295,WP=123456789,zP=987654321,$P=!1,pf=WP,vf=zP});function QP(r){return r[Wv]===1||r[Wv]===9||!+r[Wv]}function uM(r,e){var t=e[r.id];if(!t){t={};try{QP(e)&&ot(e,r.id,{e:!1,v:t})}catch{}}return t}function Ur(r,e){return e===void 0&&(e=!1),Ic(r+lM+++(e?"."+XP:Re)+cM)}function cm(r){var e={id:Ur("_aiData-"+(r||Re)+"."+XP),accept:function(t){return QP(t)},get:function(t,n,i,o){var s=t[e.id];return s?s[Ic(n)]:(o&&(s=uM(e,t),s[Ic(n)]=i),i)},kill:function(t,n){if(t&&t[n])try{delete t[n]}catch{}}};return e}var XP,cM,lM,fu=C(()=>{Ne();ct();oo();nr();am();XP="3.3.4",cM="."+gf(6),lM=0});function lm(r){return r&&Lt(r)&&(r.isVal||r.fb||Ei(r,"v")||Ei(r,"mrg")||Ei(r,"ref")||r.set)}function ZP(r,e,t){var n,i=t.dfVal||xv;if(e&&t.fb){var o=t.fb;pe(o)||(o=[o]);for(var s=0;s<o[se];s++){var a=o[s],c=e[a];if(i(c)?n=c:r&&(c=r.cfg[a],i(c)&&(n=c),r.set(r.cfg,dr(a),c)),i(n))break}}return!i(n)&&i(t.v)&&(n=t.v),n}function $_(r,e,t){var n=t;if(t&&lm(t)&&(n=ZP(r,e,t)),n){lm(n)&&(n=$_(r,e,n));var i;pe(n)?(i=[],i[se]=n[se]):Fr(n)&&(i={}),i&&(me(n,function(o,s){s&&lm(s)&&(s=$_(r,e,s)),i[o]=s}),n=i)}return n}function hf(r,e,t,n){var i,o,s,a=n,c,l,u,d;lm(a)?(i=a.isVal,o=a.set,u=a[hc],d=a[qs],c=a.mrg,l=a.ref,!l&&ke(l)&&(l=!!c),s=ZP(r,e,a)):s=n,d&&r[qs](e,t);var f,v=!0,m=e[t];(m||!G(m))&&(f=m,v=!1,i&&f!==s&&!i(f)&&(f=s,v=!0),o&&(f=o(f,s,e),v=f===s)),v?s?f=$_(r,e,s):f=s:(Fr(f)||pe(s))&&c&&s&&(Fr(s)||pe(s))&&me(s,function(S,y){hf(r,f,S,y)}),r.set(e,t,f),l&&r.ref(e,t),u&&r[hc](e,t)}var J_=C(()=>{Ne();ct()});function X_(r){if(r){var e;if(pe(r)?(e=[],e[se]=r[se]):Fr(r)&&(e={}),e)return me(r,function(t,n){e[t]=X_(n)}),e}return r}function yf(r){if(r){var e=r[ao]||r;if(e.cfg&&(e.cfg===r||e.cfg[ao]===e))return e}return null}function Sf(r){if(r&&(Fr(r)||pe(r)))try{r[eD]=!0}catch{}return r}function Q_(r){if(r)try{r[tD]=!0}catch{}return r}function um(r,e,t){var n=!1;return t&&!r[e.blkVal]&&(n=t[tD],!n&&!t[eD]&&(n=Fr(t)||pe(t))),n}function dm(r){kr("InvalidAccess:"+r)}var ao,eD,tD,fm=C(()=>{Ne();ct();ao=Rv("[[ai_dynCfg_1]]"),eD=Rv("[[ai_blkDynCfg_1]]"),tD=Rv("[[ai_frcDynCfg_1]]")});function fM(r,e,t){pe(e)&&V(dM,function(n){var i=e[n];e[n]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=i[Ks](this,o);return _f(r,e,t,"Patching"),a}})}function pm(r,e){var t=Dv(r,e);return t&&t.get}function pM(r,e,t,n){var i={n:t,h:[],trk:function(l){l&&l.fn&&(Je(i.h,l)===-1&&i.h[Le](l),r.trk(l,i))},clr:function(l){var u=Je(i.h,l);u!==-1&&i.h[eo](u,1)}},o=!0,s=!1;function a(){o&&(s=s||um(a,r,n),n&&!n[ao]&&s&&(n=_f(r,n,t,"Converting")),o=!1);var l=r.act;return l&&i.trk(l),n}a[r.prop]={chng:function(){r.add(i)}};function c(l){if(n!==l){a[r.ro]&&!r.upd&&dm("["+t+"] is read-only:"+ue(e)),o&&(s=s||um(a,r,n),o=!1);var u=s&&a[r.rf];if(s)if(u){me(n,function(f){n[f]=l?l[f]:qn});try{me(l,function(f,v){Tf(r,n,f,v)}),l=n}catch(f){pu((r.hdlr||{})[mt],t,"Assigning",f),s=!1}}else n&&n[ao]&&me(n,function(f){var v=pm(n,f);if(v){var m=v[r.prop];m&&m.chng()}});if(l!==n){var d=l&&um(a,r,l);!u&&d&&(l=_f(r,l,t,"Converting")),n=l,s=d}r.add(i)}}ot(e,i.n,{g:a,s:c})}function Tf(r,e,t,n){if(e){var i=pm(e,t),o=i&&!!i[r.prop];o?e[t]=n:pM(r,e,t,n)}return e}function vm(r,e,t,n){if(e){var i=pm(e,t),o=i&&!!i[r.prop],s=n&&n[0],a=n&&n[1],c=n&&n[2];if(!o){if(c)try{Sf(e)}catch(l){pu((r.hdlr||{})[mt],t,"Blocking",l)}try{Tf(r,e,t,e[t]),i=pm(e,t)}catch(l){pu((r.hdlr||{})[mt],t,"State",l)}}s&&(i[r.rf]=s),a&&(i[r.ro]=a),c&&(i[r.blkVal]=!0)}return e}function _f(r,e,t,n){try{me(e,function(i,o){Tf(r,e,i,o)}),e[ao]||(vn(e,ao,{get:function(){return r[qv]}}),fM(r,e,t))}catch(i){pu((r.hdlr||{})[mt],t,n,i)}return e}var dM,pu,rD=C(()=>{Ne();nr();ct();fm();dM=["push","pop","shift","unshift","splice"],pu=function(r,e,t,n){r&&r[$o](3,108,"".concat(t," [").concat(e,"] failed - ")+ue(n))}});function nD(r){var e,t=Wl(Ef+"get"+r.uid+Cf),n=Wl(Ef+"ro"+r.uid+Cf),i=Wl(Ef+"rf"+r.uid+Cf),o=Wl(Ef+"blkVal"+r.uid+Cf),s=Wl(Ef+"dtl"+r.uid+Cf),a=null,c=null,l;function u(m,S){var y=l.act;try{l.act=m,m&&m[s]&&(V(m[s],function(b){b.clr(m)}),m[s]=[]),S({cfg:r.cfg,set:r.set.bind(r),setDf:r[Pi].bind(r),ref:r.ref.bind(r),rdOnly:r[hc].bind(r)})}catch(b){var N=r[mt];throw N&&N[$o](1,107,ue(b)),b}finally{l.act=y||null}}function d(){if(a){var m=a;a=null,c&&c[Jo](),c=null;var S=[];if(V(m,function(y){if(y&&(y[s]&&(V(y[s],function(N){N.clr(y)}),y[s]=null),y.fn))try{u(y,y.fn)}catch(N){S[Le](N)}}),a)try{d()}catch(y){S[Le](y)}S[se]>0&&xP("Watcher error(s): ",S)}}function f(m){if(m&&m.h[se]>0){a||(a=[]),c||(c=Mn(function(){c=null,d()},0));for(var S=0;S<m.h[se];S++){var y=m.h[S];y&&Je(a,y)===-1&&a[Le](y)}}}function v(m,S){if(m){var y=m[s]=m[s]||[];Je(y,S)===-1&&y[Le](S)}}return l=(e={prop:t,ro:n,rf:i},e[qs]=o,e[qv]=r,e.add=f,e[yc]=d,e.use=u,e.trk=v,e),l}var Ef,Cf,iD=C(()=>{Ne();PP();ct();Ef="[[ai_",Cf="]]"});function vM(r,e){var t={fn:e,rm:function(){t.fn=null,r=null,e=null}};return ot(t,"toJSON",{v:function(){return"WatcherHandler"+(t.fn?"":"[X]")}}),r.use(t,e),t}function mM(r,e,t){var n,i=yf(e);if(i)return i;var o=Ur("dyncfg",!0),s=e&&t!==!1?e:X_(e),a;function c(){a[yc]()}function l(N,b,_){try{N=Tf(a,N,b,_)}catch(A){pu(r,b,"Setting value",A)}return N[b]}function u(N){return vM(a,N)}function d(N,b){a.use(null,function(_){var A=a.upd;try{ke(b)||(a.upd=b),N(_)}finally{a.upd=A}})}function f(N,b){var _;return vm(a,N,b,(_={},_[0]=!0,_))[b]}function v(N,b){var _;return vm(a,N,b,(_={},_[1]=!0,_))[b]}function m(N,b){var _;return vm(a,N,b,(_={},_[2]=!0,_))[b]}function S(N,b){return b&&me(b,function(_,A){hf(y,N,_,A)}),N}var y=(n={uid:null,cfg:s},n[mt]=r,n[yc]=c,n.set=l,n[Pi]=S,n[Di]=u,n.ref=f,n[hc]=v,n[qs]=m,n._block=d,n);return ot(y,"uid",{c:!1,e:!1,w:!1,v:o}),a=nD(y),_f(a,s,"config","Creating"),y}function gM(r,e){r?(r[Ql](e),r[$o](2,108,e)):dm(e)}function Nt(r,e,t,n){var i=mM(t,r||{},n);return e&&i[Pi](i.cfg,e),i}function ir(r,e,t){var n=r[ao]||r;return n.cfg&&(n.cfg===r||n.cfg[ao]===n)?n[Di](e):(gM(t,UP+ue(r)),Nt(r,null,t)[Di](e))}var na=C(()=>{Ne();fu();nr();ct();J_();rD();iD();fm()});function os(r,e){if(r&&r[_n])return r[_n](e)}function mm(r,e,t){var n;return t||(n=ni(function(i){t=i})),r&&$l(r)>0?jn(os(r[0],e),function(){mm(zl(r,1),e,t)}):t(),n}var Z_=C(()=>{xc();Ne();ct()});var oD,eT,tT=C(()=>{oD=500,eT="Microsoft_ApplicationInsights_BypassAjaxInstrumentation"});function hM(r,e,t){return!r&&G(r)?e:Xi(r)?r:dr(r)[yn]()==="true"}function rT(r){return{mrg:!0,v:r}}function vu(r,e,t){return{fb:t,isVal:r,v:e}}function si(r,e){return{fb:e,set:hM,v:!!r}}var nT=C(()=>{Ne();ct()});function yM(r,e){return function(){var t=arguments,n=oT(e);if(n){var i=n.listener;i&&i[r]&&i[r][Ks](i,t)}}}function SM(){var r=et("Microsoft");return r&&(hm=r.ApplicationInsights),hm}function oT(r){var e=hm;return!e&&r.disableDbgExt!==!0&&(e=hm||SM()),e?e.ChromeDbgExt:null}function sD(r){if(!gm){gm={};for(var e=0;e<iT[se];e++)gm[iT[e]]=yM(iT[e],r)}return gm}var iT,hm,gm,sT=C(()=>{Ne();ct();nr();iT=[su,Qs,au,io],hm=null});function aD(r){return r?'"'+r[Ni](/\"/g,Re)+'"':Re}function aT(r,e){var t=cf();if(t){var n="log";t[r]&&(n=r),Pe(t[n])&&t[n](e)}}function Ai(r,e){return(r||{})[mt]||new ia(e)}function cT(r){return r||new ia}function X(r,e,t,n,i,o){o===void 0&&(o=!1),cT(r)[$o](e,t,n,i,o)}function sn(r,e){cT(r)[Ql](e)}function lT(r,e,t){cT(r)[C_](e,t)}var mu,cD,_M,TM,EM,CM,bM,wc,ia,Oi=C(()=>{"use strict";br();Ne();na();ct();sT();ta();nr();cD="warnToConsole",_M="AI (Internal): ",TM="AI: ",EM="AITR_",CM={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},bM=(mu={},mu[0]=null,mu[1]="errorToConsole",mu[2]=cD,mu[3]="debugToConsole",mu);wc=(function(){function r(e,t,n,i){n===void 0&&(n=!1);var o=this;o[ru]=e,o[no]=(n?TM:_M)+e;var s=Re;so()&&(s=Mr().stringify(i));var a=(t?" message:"+aD(t):Re)+(i?" props:"+aD(s):Re);o[no]+=a}return r.dataType="MessageData",r})();ia=(function(){function r(e){this.identifier="DiagnosticLogger",this.queue=[];var t=0,n={},i,o,s,a,c;qe(r,this,function(l){c=d(e||{}),l.consoleLoggingLevel=function(){return i},l[$o]=function(m,S,y,N,b){b===void 0&&(b=!1);var _=new wc(S,y,b,N);if(a)throw ue(_);var A=bM[m]||cD;if(ke(_[no]))v("throw"+(m===1?"Critical":"Warning"),_);else{if(b){var k=+_[ru];!n[k]&&i>=m&&(l[A](_[no]),n[k]=!0)}else i>=m&&l[A](_[no]);u(m,_)}},l.debugToConsole=function(m){aT("debug",m),v("warning",m)},l[Ql]=function(m){aT("warn",m),v("warning",m)},l.errorToConsole=function(m){aT("error",m),v("error",m)},l.resetInternalMessageCount=function(){t=0,n={}},l[C_]=u,l[_n]=function(m){c&&c.rm(),c=null};function u(m,S){if(!f()){var y=!0,N=EM+S[ru];if(n[N]?y=!1:n[N]=!0,y&&(m<=o&&(l.queue[Le](S),t++,v(m===1?"error":"warn",S)),t===s)){var b="Internal events throttle limit per PageView reached for this app.",_=new wc(23,b,!1);l.queue[Le](_),m===1?l.errorToConsole(b):l[Ql](b)}}}function d(m){return ir(Nt(m,CM,l).cfg,function(S){var y=S.cfg;i=y[Bv],o=y.loggingLevelTelemetry,s=y.maxMessageLimit,a=y.enableDebug})}function f(){return t>=s}function v(m,S){var y=oT(e||{});y&&y[Tn]&&y[Tn](m,S)}})}return r.__ieDyn=1,r})()});function mT(){!co&&(co=sP(function(){return qt()}))}function PM(r,e){var t=ss[oa]||_m[oa];return t||(t=ss[oa]=ss(r,e),_m[oa]=t),t}function Sm(r){return r?r.isEnabled():!0}function yD(r,e){return e&&r&&pe(r.ignoreCookies)?Je(r.ignoreCookies,e)!==-1:!1}function DM(r,e){return e&&r&&pe(r.blockedCookies)&&Je(r.blockedCookies,e)!==-1?!0:yD(r,e)}function vD(r,e){var t=e[Gs];if(G(t)){var n=void 0;ke(r[dD])||(n=!r[dD]),ke(r[pT])||(n=!r[pT]),t=n}return t}function gT(r,e){var t;if(r)t=r.getCookieMgr();else if(e){var n=e.cookieCfg;n&&n[oa]?t=n[oa]:t=ss(e)}return t||(t=PM(e,(r||{})[mt])),t}function ss(r,e){var t,n,i,o,s,a,c,l,u;r=Nt(r||_m,null,e).cfg,s=ir(r,function(f){f[Pi](f.cfg,xM),n=f.ref(f.cfg,"cookieCfg"),i=n[im]||"/",o=n[nm],a=vD(r,n)!==!1,c=n.getCookie||IM,l=n.setCookie||hD,u=n.delCookie||hD},e);var d=(t={isEnabled:function(){var f=vD(r,n)!==!1&&a&&gu(e),v=_m[oa];return f&&v&&d!==v&&(f=Sm(v)),f},setEnabled:function(f){a=f!==!1,n[Gs]=f},set:function(f,v,m,S,y){var N=!1;if(Sm(d)&&!DM(n,f)){var b={},_=tt(v||Re),A=mn(_,";");if(A!==-1&&(_=tt(pc(v,A)),b=SD(pr(v,A+1))),oi(b,nm,S||o,Ti,ke),!G(m)){var k=ea();if(ke(b[dT])){var j=Kt(),q=j+m*1e3;if(q>0){var oe=new Date;oe.setTime(q),oi(b,dT,mD(oe,k?lD:uD)||mD(oe,k?lD:uD)||Re,Ti)}}k||oi(b,"max-age",Re+m,null,ke)}var $=Rc();$&&$[Gv]==="https:"&&(oi(b,"secure",null,null,ke),fT===null&&(fT=!Tm((vr()||{})[ef])),fT&&oi(b,"SameSite","None",null,ke)),oi(b,im,y||i,null,ke),l(f,gD(_,b)),N=!0}return N},get:function(f){var v=Re;return Sm(d)&&!yD(n,f)&&(v=c(f)),v},del:function(f,v){var m=!1;return Sm(d)&&(m=d.purge(f,v)),m},purge:function(f,v){var m,S=!1;if(gu(e)){var y=(m={},m[im]=v||"/",m[dT]="Thu, 01 Jan 1970 00:00:01 GMT",m);ea()||(y["max-age"]="0"),u(f,gD(Re,y)),S=!0}return S}},t[_n]=function(f){s&&s.rm(),s=null},t);return d[oa]=d,d}function gu(r){if(ym===null){ym=!1,!co&&mT();try{var e=co.v||{};ym=e[vT]!==void 0}catch(t){X(r,2,68,"Cannot access document.cookie - "+yt(t),{exception:ue(t)})}}return ym}function SD(r){var e={};if(r&&r[se]){var t=tt(r)[ri](";");V(t,function(n){if(n=tt(n||Re),n){var i=mn(n,"=");i===-1?e[n]=null:e[tt(pc(n,i))]=tt(pr(n,i+1))}})}return e}function mD(r,e){return Pe(r[e])?r[e]():null}function gD(r,e){var t=r||Re;return me(e,function(n,i){t+="; "+n+(G(i)?Re:"="+i)}),t}function IM(r){var e=Re;if(!co&&mT(),co.v){var t=co.v[vT]||Re;fD!==t&&(pD=SD(t),fD=t),e=tt(pD[r]||Re)}return e}function hD(r,e){!co&&mT(),co.v&&(co.v[vT]=r+"="+e)}function Tm(r){return Ie(r)?!!($t(r,"CPU iPhone OS 12")||$t(r,"iPad; CPU OS 12")||$t(r,"Macintosh; Intel Mac OS X 10_14")&&$t(r,"Version/")&&$t(r,"Safari")||$t(r,"Macintosh; Intel Mac OS X 10_14")&&mc(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||$t(r,"Chrome/5")||$t(r,"Chrome/6")||$t(r,"UnrealEngine")&&!$t(r,"Chrome")||$t(r,"UCBrowser/12")||$t(r,"UCBrowser/11")):!1}var uT,Ac,lD,uD,vT,dT,dD,pT,oa,ym,fT,fD,co,pD,_m,xM,hT=C(()=>{Ne();nT();na();ct();Oi();ta();oo();nr();lD="toGMTString",uD="toUTCString",vT="cookie",dT="expires",dD="isCookieUseDisabled",pT="disableCookiesUsage",oa="_ckMgr",ym=null,fT=null,fD=null,pD={},_m={},xM=(uT={cookieCfg:rT((Ac={},Ac[nm]={fb:"cookieDomain",dfVal:ii},Ac.path={fb:"cookiePath",dfVal:ii},Ac.enabled=qn,Ac.ignoreCookies=qn,Ac.blockedCookies=qn,Ac)),cookieDomain:qn,cookiePath:qn},uT[pT]=qn,uT)});function RM(r){r.h=null;var e=r.cb;r.cb=[],V(e,function(t){fr(t.fn,[t.arg])})}function sa(r,e,t,n){V(r,function(i){i&&i[e]&&(t?(t.cb[Le]({fn:n,arg:i}),t.h=t.h||Mn(RM,0,t)):fr(n,[i]))})}var NM,bf,yT=C(()=>{br();xc();Ne();na();ct();nr();NM={perfEvtsSendAll:!1};bf=(function(){function r(e){this.listeners=[];var t,n,i=[],o={h:null,cb:[]},s=Nt(e,NM);n=s[Di](function(a){t=!!a.cfg.perfEvtsSendAll}),qe(r,this,function(a){ot(a,"listeners",{g:function(){return i}}),a[eu]=function(c){i[Le](c)},a[Zl]=function(c){for(var l=Je(i,c);l>-1;)i[eo](l,1),l=Je(i,c)},a[su]=function(c){sa(i,su,o,function(l){l[su](c)})},a[Qs]=function(c,l){sa(i,Qs,o,function(u){u[Qs](c,l)})},a[au]=function(c,l){sa(i,au,l?o:null,function(u){u[au](c,l)})},a[io]=function(c){c&&(t||!c[rf]())&&sa(i,io,null,function(l){c[Ii]?Mn(function(){return l[io](c)},0):l[io](c)})},a[em]=function(c){c&&c[se]&&sa(i,em,o,function(l){l[em](c)})},a[tm]=function(c){c&&c[$s]&&sa(i,tm,o,function(l){l[tm](c)})},a[rm]=function(c,l){if(c>0){var u=l||0;sa(i,rm,o,function(d){d[rm](c,u)})}},a[_n]=function(c){var l=function(){n&&n.rm(),n=null,i=[],o.h&&o.h[Jo](),o.h=null,o.cb=[]},u;if(sa(i,"unload",null,function(d){var f=d[_n](c);f&&(u||(u=[]),u[Le](f))}),u)return ni(function(d){return jn(MP(u),function(){l(),d()})});l()}})}return r.__ieDyn=1,r})()});function Bt(r,e,t,n,i){if(r){var o=r;if(o[cu]&&(o=o[cu]()),o){var s=void 0,a=o[Cc](ST);try{if(s=o.create(e(),n,i),s){if(a&&s[Ri]&&(s[Ri](Oc[_T],a),a[Cc]&&a[Ri])){var c=a[Cc](Oc[xf]);c||(c=[],a[Ri](Oc[xf],c)),c[Le](s)}return o[Ri](ST,s),t(s)}}catch(l){s&&s[Ri]&&s[Ri]("exception",l)}finally{s&&o.fire(s),o[Ri](ST,a)}}}return t()}function TT(){return wM}var hu,_T,xf,wM,Oc,Pf,ST,Em=C(()=>{br();Ne();ct();nr();hu="ctx",_T="ParentContextKey",xf="ChildrenContextKey",wM=null,Oc=(function(){function r(e,t,n){var i=this;if(i.start=Kt(),i[xr]=e,i[Ii]=n,i[rf]=function(){return!1},Pe(t)){var o;ot(i,"payload",{g:function(){return!o&&Pe(t)&&(o=t(),t=null),o}})}i[Cc]=function(s){return s?s===r[_T]||s===r[xf]?i[s]:(i[hu]||{})[s]:null},i[Ri]=function(s,a){if(s)if(s===r[_T])i[s]||(i[rf]=function(){return!0}),i[s]=a;else if(s===r[xf])i[s]=a;else{var c=i[hu]=i[hu]||{};c[s]=a}},i[zv]=function(){var s=0,a=i[Cc](r[xf]);if(pe(a))for(var c=0;c<a[se];c++){var l=a[c];l&&(s+=l[Bs])}i[Bs]=Kt()-i.start,i.exTime=i[Bs]-s,i[zv]=function(){}}}return r.ParentContextKey="parent",r.ChildrenContextKey="childEvts",r})(),Pf=(function(){function r(e){this.ctx={},qe(r,this,function(t){t.create=function(n,i,o){return new Oc(n,i,o)},t.fire=function(n){n&&(n[zv](),e&&Pe(e[io])&&e[io](n))},t[Ri]=function(n,i){if(n){var o=t[hu]=t[hu]||{};o[n]=i}},t[Cc]=function(n){return(t[hu]||{})[n]}})}return r.__ieDyn=1,r})(),ST="CoreUtils.doPerf"});function Df(){var r=kc();return pr(r,0,8)+"-"+pr(r,8,12)+"-"+pr(r,12,16)+"-"+pr(r,16,20)+"-"+pr(r,20)}function kc(){for(var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=Re,t,n=0;n<4;n++)t=is(),e+=r[t&15]+r[t>>4&15]+r[t>>8&15]+r[t>>12&15]+r[t>>16&15]+r[t>>20&15]+r[t>>24&15]+r[t>>28&15];var i=r[8+(is()&3)|0];return Qi(e,0,8)+Qi(e,9,4)+"4"+Qi(e,13,3)+i+Qi(e,16,3)+Qi(e,19,12)}var ET=C(()=>{"use strict";Ne();nr();am()});function as(r,e,t){return r&&r[se]===e&&r!==t?!!r.match(/^[\da-f]*$/i):!1}function TD(r,e,t){return as(r,e)?r:t}function ED(r){(isNaN(r)||r<0||r>255)&&(r=1);for(var e=r.toString(16);e[se]<2;)e="0"+e;return e}function If(r,e,t,n){var i;return i={},i[_c]=as(n,2,bT)?n:CT,i[iu]=lo(r)?r:kc(),i[ou]=uo(e)?e:pc(kc(),16),i.traceFlags=t>=0&&t<=255?t:1,i}function Lc(r,e){var t;if(!r||(pe(r)&&(r=r[0]||""),!r||!Ie(r)||r[se]>8192))return null;if(r.indexOf(",")!==-1){var n=r[ri](",");r=n[e>0&&n[se]>e?e:0]}var i=AM.exec(tt(r));return!i||i[1]===bT||i[2]===Cm||i[3]===bm?null:(t={version:(i[1]||Re)[yn](),traceId:(i[2]||Re)[yn](),spanId:(i[3]||Re)[yn]()},t[Js]=parseInt(i[4],16),t)}function lo(r){return as(r,32,Cm)}function uo(r){return as(r,16,bm)}function yu(r){return!(!r||!as(r[_c],2,bT)||!as(r[iu],32,Cm)||!as(r[ou],16,bm)||!as(ED(r[Js]),2))}function Nf(r){return yu(r)?(r[Js]&_D)===_D:!1}function Rf(r){if(r){var e=ED(r[Js]);as(e,2)||(e="01");var t=r[_c]||CT;return t!=="00"&&t!=="ff"&&(t=CT),"".concat(t.toLowerCase(),"-").concat(TD(r.traceId,32,Cm).toLowerCase(),"-").concat(TD(r.spanId,16,bm).toLowerCase(),"-").concat(e.toLowerCase())}return""}function wf(r){var e="traceparent",t=Lc(W_(e),r);return t||(t=Lc(z_(e),r)),t}function xT(r){var e=r.getElementsByTagName("script"),t=[];return V(e,function(n){var i=n[Jv]("src");if(i){var o=n[Jv]("crossorigin"),s=n.hasAttribute("async")===!0,a=n.hasAttribute("defer")===!0,c=n[Jv]("referrerpolicy"),l={url:i};o&&(l.crossOrigin=o),s&&(l.async=s),a&&(l.defer=a),c&&(l.referrerPolicy=c),t[Le](l)}}),t}var AM,CT,bT,Cm,bm,_D,PT=C(()=>{Ne();ct();ET();ta();nr();AM=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,CT="00",bT="ff",Cm="00000000000000000000000000000000",bm="0000000000000000",_D=1});function cs(r){return OM.get(r,"state",{},!0)}function DT(r,e){for(var t=[],n=null,i=r[Vn](),o;i;){var s=i[Hs]();if(s){n&&n[zs]&&s[Cn]&&n[zs](s),o=cs(s);var a=!!o[Sn];s[Sn]&&(a=s[Sn]()),a||t[Le](s),n=s,i=i[Vn]()}}V(t,function(c){var l=r[Ft]();c[Xo](r.getCfg(),l,e,r[Vn]()),o=cs(c),!c[Ft]&&!o[Ft]&&(o[Ft]=l),o[Sn]=!0,delete o[Yn]})}function xm(r){return r.sort(function(e,t){var n=0;if(t){var i=t[Cn];e[Cn]?n=i?e[Dc]-t[Dc]:1:i&&(n=-1)}else n=e?1:-1;return n})}function CD(r){var e={};return{getName:function(){return e[xr]},setName:function(t){r&&r.setName(t),e[xr]=t},getTraceId:function(){return e[iu]},setTraceId:function(t){r&&r.setTraceId(t),lo(t)&&(e[iu]=t)},getSpanId:function(){return e[ou]},setSpanId:function(t){r&&r.setSpanId(t),uo(t)&&(e[ou]=t)},getTraceFlags:function(){return e[Js]},setTraceFlags:function(t){r&&r.setTraceFlags(t),e[Js]=t}}}var OM,IT=C(()=>{"use strict";Ne();ct();fu();nr();PT();OM=cm("plugin")});function LM(r,e,t){for(;r;){if(r[Hs]()===t)return r;r=r[Vn]()}return aa([t],e.config||{},e)}function NT(r,e,t,n){var i=null,o=[];e||(e=Nt({},null,t[mt])),n!==null&&(i=n?LM(r,t,n):r);var s={_next:c,ctx:{core:function(){return t},diagLog:function(){return Ai(t,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:u,getConfig:d,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(v){i=v},iterate:f,onComplete:a}};function a(v,m){for(var S=[],y=2;y<arguments.length;y++)S[y-2]=arguments[y];v&&o[Le]({func:v,self:ke(m)?s.ctx:m,args:S})}function c(){var v=i;if(i=v?v[Vn]():null,!v){var m=o;m&&m[se]>0&&(V(m,function(S){try{S.func.call(S.self,S.args)}catch(y){X(t[mt],2,73,"Unexpected Exception during onComplete - "+ue(y))}}),o=[])}return v}function l(v,m){var S=null,y=e.cfg;if(y&&v){var N=y[Qo];!N&&m&&(N={}),y[Qo]=N,N=e.ref(y,Qo),N&&(S=N[v],!S&&m&&(S={}),N[v]=S,S=e.ref(N,v))}return S}function u(v,m){var S=l(v,!0);return m&&me(m,function(y,N){if(G(S[y])){var b=e.cfg[y];(b||!G(b))&&(S[y]=b)}hf(e,S,y,N)}),e[Pi](S,m)}function d(v,m,S){S===void 0&&(S=!1);var y,N=l(v,!1),b=e.cfg;return N&&(N[m]||!G(N[m]))?y=N[m]:(b[m]||!G(b[m]))&&(y=b[m]),y||!G(y)?y:S}function f(v){for(var m;m=s._next();){var S=m[Hs]();S&&v(S)}}return s}function an(r,e,t,n){var i=Nt(e),o=NT(r,i,t,n),s=o.ctx;function a(l){var u=o._next();return u&&u[Cn](l,s),!u}function c(l,u){return l===void 0&&(l=null),pe(l)&&(l=aa(l,i.cfg,t,u)),an(l||s[Vn](),i.cfg,t,u)}return s[mr]=a,s[ro]=c,s}function Su(r,e,t){var n=Nt(e.config),i=NT(r,n,e,t),o=i.ctx;function s(c){var l=i._next();return l&&l[_n](o,c),!l}function a(c,l){return c===void 0&&(c=null),pe(c)&&(c=aa(c,n.cfg,e,l)),Su(c||o[Vn](),e,l)}return o[mr]=s,o[ro]=a,o}function Af(r,e,t){var n=Nt(e.config),i=NT(r,n,e,t),o=i.ctx;function s(c){return o.iterate(function(l){Pe(l[Tc])&&l[Tc](o,c)})}function a(c,l){return c===void 0&&(c=null),pe(c)&&(c=aa(c,n.cfg,e,l)),Af(c||o[Vn](),e,l)}return o[mr]=s,o[ro]=a,o}function aa(r,e,t,n){var i=null,o=!n;if(pe(r)&&r[se]>0){var s=null;V(r,function(a){if(!o&&n===a&&(o=!0),o&&a&&Pe(a[Cn])){var c=FM(a,e,t);i||(i=c),s&&s._setNext(c),s=c}})}return n&&!i?aa([n],e,t):i}function FM(r,e,t){var n=null,i=Pe(r[Cn]),o=Pe(r[zs]),s;r?s=r[to]+"-"+r[Dc]+"-"+PD++:s="Unknown-0-"+PD++;var a={getPlugin:function(){return r},getNext:function(){return n},processTelemetry:u,unload:d,update:f,_id:s,_setNext:function(v){n=v}};function c(){var v;return r&&Pe(r[xD])&&(v=r[xD]()),v||(v=an(a,e,t)),v}function l(v,m,S,y,N){var b=!1,_=r?r[to]:kM,A=v[bD];return A||(A=v[bD]={}),v.setNext(n),r&&Bt(v[Ft](),function(){return _+":"+S},function(){A[s]=!0;try{var k=n?n._id:Re;k&&(A[k]=!1),b=m(v)}catch(q){var j=n?A[n._id]:!0;j&&(b=!0),(!n||!j)&&X(v[Tn](),1,73,"Plugin ["+_+"] failed during "+S+" - "+ue(q)+", run flags: "+ue(A))}},y,N),b}function u(v,m){m=m||c();function S(y){if(!r||!i)return!1;var N=cs(r);return N[Yn]||N[sf]?!1:(o&&r[zs](n),r[Cn](v,y),!0)}l(m,S,"processTelemetry",function(){return{item:v}},!v.sync)||m[mr](v)}function d(v,m){function S(){var y=!1;if(r){var N=cs(r),b=r[Ft]||N[Ft];r&&(!b||b===v.core())&&!N[Yn]&&(N[Ft]=null,N[Yn]=!0,N[Sn]=!1,r[Yn]&&r[Yn](v,m)===!0&&(y=!0))}return y}l(v,S,"unload",function(){},m[Ii])||v[mr](m)}function f(v,m){function S(){var y=!1;if(r){var N=cs(r),b=r[Ft]||N[Ft];r&&(!b||b===v.core())&&!N[Yn]&&r[Tc]&&r[Tc](v,m)===!0&&(y=!0)}return y}l(v,S,"update",function(){},!1)||v[mr](m)}return ei(a)}var kM,bD,xD,PD,RT,Pm=C(()=>{"use strict";Ne();J_();na();ct();Oi();oo();nr();Em();IT();kM="TelemetryPluginChain",bD="_hasRun",xD="_getTelCtx",PD=0;RT=(function(){function r(e,t,n,i){var o=this,s=an(e,t,n,i);Hn(o,s,Lr(s))}return r})()});function Fc(){var r=[];function e(n){n&&r[Le](n)}function t(n,i){V(r,function(o){try{o(n,i)}catch(s){X(n[Tn](),2,73,"Unexpected error calling unload handler - "+ue(s))}}),r=[]}return{add:e,run:t}}var Dm=C(()=>{Ne();ct();Oi()});function wT(r,e){Of=r,kf=e}function Lf(){var r=[];function e(n){var i=r;r=[],V(i,function(o){try{(o.rm||o.remove).call(o)}catch(s){X(n,2,73,"Unloading:"+ue(s))}}),Of&&i[se]>Of&&(kf?kf("doUnload",i):X(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}function t(n){n&&(bi(r,n),Of&&r[se]>Of&&(kf?kf("Add",r):X(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return{run:e,add:t}}var Of,kf,Im=C(()=>{Ne();ct();Oi()});var AT,ca,MM,ls,OT=C(()=>{"use strict";br();Ne();na();ct();Oi();oo();nr();Pm();Dm();Im();ca="getPlugin",MM=(AT={},AT[Qo]={isVal:ii,v:{}},AT),ls=(function(){function r(){var e=this,t,n,i,o,s;l(),qe(r,e,function(u){u[Xo]=function(d,f,v,m){c(d,f,m),t=!0},u[Yn]=function(d,f){var v,m=u[Ft];if(!m||d&&m!==d[Ft]())return;var S,y=!1,N=d||Su(null,m,i&&i[ca]?i[ca]():i),b=f||(v={reason:0},v[Ii]=!1,v);function _(){y||(y=!0,o.run(N,f),s.run(N[Tn]()),S===!0&&N[mr](b),l())}return!u[Ws]||u[Ws](N,b,_)!==!0?_():S=!0,S},u[Tc]=function(d,f){var v=u[Ft];if(!v||d&&v!==d[Ft]())return;var m,S=!1,y=d||Af(null,v,i&&i[ca]?i[ca]():i),N=f||{reason:0};function b(){S||(S=!0,c(y.getCfg(),y.core(),y[Vn]()))}return!u._doUpdate||u._doUpdate(y,N,b)!==!0?b():m=!0,m},Zo(u,"_addUnloadCb",function(){return o},"add"),Zo(u,"_addHook",function(){return s},"add"),ot(u,"_unloadHooks",{g:function(){return s}})}),e[Tn]=function(u){return a(u)[Tn]()},e[Sn]=function(){return t},e.setInitialized=function(u){t=u},e[zs]=function(u){i=u},e[mr]=function(u,d){d?d[mr](u):i&&Pe(i[Cn])&&i[Cn](u,null)},e._getTelCtx=a;function a(u){u===void 0&&(u=null);var d=u;if(!d){var f=n||an(null,{},e[Ft]);i&&i[ca]?d=f[ro](null,i[ca]):d=f[ro](null,i)}return d}function c(u,d,f){Nt(u,MM,Ai(d)),!f&&d&&(f=d[Hv]()[Vn]());var v=i;i&&i[ca]&&(v=i[ca]()),e[Ft]=d,n=an(f,u,d,v)}function l(){t=!1,e[Ft]=null,n=null,i=null,s=Lf(),o=Fc()}}return r.__ieDyn=1,r})()});function UM(r,e,t){var n={id:e,fn:t};bi(r,n);var i={remove:function(){V(r,function(o,s){if(o.id===n.id)return r[eo](s,1),-1})}};return i}function YM(r,e,t){for(var n=!1,i=r[se],o=0;o<i;++o){var s=r[o];if(s)try{if(s.fn[Ks](null,[e])===!1){n=!0;break}}catch(a){X(t,2,64,"Telemetry initializer failed: "+yt(a),{exception:ue(a)},!0)}}return!n}var DD,ID=C(()=>{hn();br();Ne();ct();OT();Oi();oo();nr();DD=(function(r){gn(e,r);function e(){var t=r.call(this)||this;t.identifier="TelemetryInitializerPlugin",t.priority=199;var n,i;o(),qe(e,t,function(s,a){s.addTelemetryInitializer=function(c){return UM(i,n++,c)},s[Cn]=function(c,l){YM(i,c,l?l[Tn]():s[Tn]())&&s[mr](c,l)},s[Ws]=function(){o()}});function o(){n=0,i=[]}return t}return e.__ieDyn=1,e})(ls)});function HM(r,e){return new Pf(e)}function BM(r,e,t){var n,i=[],o=[],s={};return V(t,function(a){(G(a)||G(a[Xo]))&&jt(AD);var c=a[Dc],l=a[to];a&&c&&(G(s[c])?s[c]=l:sn(r,"Two extensions have same priority #"+c+" - "+s[c]+", "+l)),!c||c<e?i[Le](a):o[Le](a)}),n={},n[Ft]=i,n[Xs]=o,n}function RD(r,e){var t=!1;return V(e,function(n){if(n===r)return t=!0,-1}),t}function LT(r,e,t,n){t&&me(t,function(i,o){n&&Fr(o)&&Fr(e[i])&&LT(r,e[i],o,n),n&&Fr(o)&&Fr(e[i])?LT(r,e[i],o,n):r.set(e,i,o)})}function wD(r,e){var t=null,n=-1;return V(r,function(i,o){if(i.w===e)return t=i,n=o,-1}),{i:n,l:t}}function GM(r,e){var t=wD(r,e).l;return t||(t={w:e,rm:function(){var n=wD(r,e);n.i!==-1&&r[eo](n.i,1)}},r[Le](t)),t}function WM(r,e,t){V(e,function(n){var i=ir(r,n.w,t);delete n.w,n.rm=function(){i.rm()}})}function zM(r,e,t,n){return e.add(r[Di](function(i){var o=i.cfg.disableDbgExt;o===!0&&n&&(t[Zl](n),n=null),t&&!n&&o!==!0&&(n=sD(i.cfg),t[eu](n))})),n}function $M(r){return ot({rm:function(){r.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(r)+">"}})}var la,AD,VM,ND,jM,qM,KM,kT,us,OD=C(()=>{"use strict";hn();br();xc();Ne();na();S_();ct();Z_();tT();hT();fu();sT();Oi();oo();nr();yT();Em();Pm();IT();ID();Dm();Im();AD="Plugins must provide initialize method",VM="_notificationManager",ND="SDK is still unloading...",jM="SDK is not initialized",qM=100,KM=5e4,kT=Ci((la={cookieCfg:{}},la[Pc]={rdOnly:!0,ref:!0,v:[]},la[Xs]={rdOnly:!0,ref:!0,v:[]},la[Qo]={ref:!0,v:{}},la[Zv]=qn,la.loggingLevelConsole=0,la.diagnosticLogInterval=qn,la));us=(function(){function r(){var e,t,n,i,o,s,a,c,l,u,d,f,v,m,S,y,N,b,_,A,k,j,q,oe,$,W,re,Q,ie,T,R,B,P;qe(r,this,function(g){w(),g._getDbgPlgTargets=function(){return[q,i]},g[Sn]=function(){return t},g.activeStatus=function(){return W},g._setPendingStatus=function(){W=3},g[Xo]=function(F,ne,Te,ce){v&&jt(ND),g[Sn]()&&jt("Core cannot be initialized more than once"),e=Nt(F,kT,Te||g[mt],!1),F=e.cfg,ht(e[Di](function(Be){var it=Be.cfg,It=W===3;if(!It){Q=it.initInMemoMaxSize||qM;var Vt=it[__],Gr=it.endpointUrl;if(G(Vt)){k=null,W=Un[Kv];var Wr="Please provide instrumentation key";t?(X(n,1,100,Wr),I()):jt(Wr);return}var Zn=[];if(nn(Vt)?(Zn[Le](Vt),k=null):k=Vt,nn(Gr)?(Zn[Le](Gr),re=null):re=Gr,Zn[se]){ie=!1,W=3;var Er=ii(it.initTimeOut)?it.initTimeOut:KM,qo=FP(Zn);T=Mn(function(){T=null,ie||D()},Er),jn(qo,function(K){try{if(ie)return;if(!K.rejected){var J=K[Sc];if(J&&J[se]){var de=J[0];if(k=de&&de[Sc],J[se]>1){var xe=J[1];re=xe&&xe[Sc]}}k&&(F[__]=k,F.endpointUrl=re)}D()}catch{ie||D()}})}else D();var E=Be.ref(Be.cfg,Qo);me(E,function(K){Be.ref(E,K)})}})),o=ce,_=zM(e,b,o&&g[Qd](),_),rn(),g[mt]=Te;var Ee=F[Pc];if(u=[],u[Le].apply(u,Av(Av([],ne,!1),Ee,!1)),d=F[Xs],Ye(null),(!f||f[se]===0)&&jt("No "+Xs+" available"),d&&d[se]>1){var ze=g[Hs]("TeeChannelController");(!ze||!ze.plugin)&&X(n,1,28,"TeeChannel required")}WM(F,j,n),j=null,t=!0,W===Un.ACTIVE&&I()},g.getChannels=function(){var F=[];return f&&V(f,function(ne){F[Le](ne)}),ei(F)},g.track=function(F){Bt(g[cu](),function(){return"AppInsightsCore:track"},function(){F===null&&(Dt(F),jt("Invalid telemetry item")),!F[xr]&&G(F[xr])&&(Dt(F),jt("telemetry name required")),F[tu]=F[tu]||k,F[Bs]=F[Bs]||Kn(new Date),F.ver=F.ver||"4.0",!v&&g[Sn]()&&W===Un.ACTIVE?Oe()[mr](F):W!==Un[Kv]&&i[se]<=Q&&i[Le](F)},function(){return{item:F}},!F.sync)},g[Hv]=Oe,g[Qd]=function(){return o||(o=new bf(e.cfg),g[VM]=o),o},g[eu]=function(F){g.getNotifyMgr()[eu](F)},g[Zl]=function(F){o&&o[Zl](F)},g.getCookieMgr=function(){return c||(c=ss(e.cfg,g[mt])),c},g.setCookieMgr=function(F){c!==F&&(os(c,!1),c=F)},g[cu]=function(){return s||a||TT()},g.setPerfMgr=function(F){s=F},g.eventCnt=function(){return i[se]},g.releaseQueue=function(){if(t&&i[se]>0){var F=i;i=[],W===2?V(F,function(ne){ne[tu]=ne[tu]||k,Oe()[mr](ne)}):X(n,2,20,"core init status is not active")}},g[T_]=function(F){return S=F||null,P=!1,R&&R[Jo](),Z(!0)};function D(){ie=!0,G(k)?(W=Un[Kv],X(n,1,112,"ikey can't be resolved from promises")):W=Un.ACTIVE,I()}function I(){t&&(g.releaseQueue(),g[T_]())}function Z(F){if((!R||!R[Gs])&&!P){var ne=F||n&&n.queue[se]>0;ne&&(B||(B=!0,ht(e[Di](function(Te){var ce=Te.cfg.diagnosticLogInterval;(!ce||!(ce>0))&&(ce=1e4);var Ee=!1;R&&(Ee=R[Gs],R[Jo]()),R=vP(Rr,ce),R.unref(),R[Gs]=Ee}))),R[Gs]=!0)}return R}g[E_]=function(){P=!0,R&&R[Jo](),Rr()},Hn(g,function(){return m},["addTelemetryInitializer"]),g[_n]=function(F,ne,Te){var ce;F===void 0&&(F=!0),t||jt(jM),v&&jt(ND);var Ee=(ce={reason:50},ce[Ii]=F,ce.flushComplete=!1,ce),ze;F&&!ne&&(ze=ni(function(It){ne=It}));var Be=Su(pt(),g);Be[Zd](function(){b.run(g[mt]),mm([c,o,n],F,function(){w(),ne&&ne(Ee)})},g);function it(It){Ee.flushComplete=It,v=!0,N.run(Be,Ee),g[E_](),Be[mr](Ee)}return Rr(),ur(F,it,6,Te)||it(!1),ze},g[Hs]=ft,g.addPlugin=function(F,ne,Te,ce){if(!F){ce&&ce(!1),Ze(AD);return}var Ee=ft(F[to]);if(Ee&&!ne){ce&&ce(!1),Ze("Plugin ["+F[to]+"] is already loaded!");return}var ze={reason:16};function Be(Vt){u[Le](F),ze.added=[F],Ye(ze),ce&&ce(!0)}if(Ee){var it=[Ee.plugin],It={reason:2,isAsync:!!Te};Zt(it,It,function(Vt){Vt?(ze.removed=it,ze.reason|=32,Be(!0)):ce&&ce(!1)})}else Be(!1)},g.updateCfg=function(F,ne){ne===void 0&&(ne=!0);var Te;if(g[Sn]()){Te={reason:1,cfg:e.cfg,oldCfg:n_({},e.cfg),newConfig:n_({},F),merge:ne},F=Te.newConfig;var ce=e.cfg;F[Pc]=ce[Pc],F[Xs]=ce[Xs]}e._block(function(Ee){var ze=Ee.cfg;LT(Ee,ze,F,ne),ne||me(ze,function(Be){Ei(F,Be)||Ee.set(ze,Be,qn)}),Ee[Pi](ze,kT)},!0),e[yc](),Te&&vt(Te)},g.evtNamespace=function(){return y},g.flush=ur,g.getTraceCtx=function(F){return A||(A=CD()),A},g.setTraceCtx=function(F){A=F||null},g.addUnloadHook=ht,Zo(g,"addUnloadCb",function(){return N},"add"),g.onCfgChange=function(F){var ne;return t?ne=ir(e.cfg,F,g[mt]):ne=GM(j,F),$M(ne)},g.getWParam=function(){return vc()||e.cfg.enableWParam?0:-1};function M(){var F={};oe=[];var ne=function(Te){Te&&V(Te,function(ce){if(ce[to]&&ce[_c]&&!F[ce.identifier]){var Ee=ce[to]+"="+ce[_c];oe[Le](Ee),F[ce.identifier]=ce}})};ne(f),d&&V(d,function(Te){ne(Te)}),ne(u)}function w(){t=!1,e=Nt({},kT,g[mt]),e.cfg[Bv]=1,ot(g,"config",{g:function(){return e.cfg},s:function(ne){g.updateCfg(ne,!1)}}),ot(g,"pluginVersionStringArr",{g:function(){return oe||M(),oe}}),ot(g,"pluginVersionString",{g:function(){return $||(oe||M(),$=oe.join(";")),$||Re}}),ot(g,"logger",{g:function(){return n||(n=new ia(e.cfg),e[mt]=n),n},s:function(ne){e[mt]=ne,n!==ne&&(os(n,!1),n=ne)}}),g[mt]=new ia(e.cfg),q=[];var F=g.config[Pc]||[];F.splice(0,F[se]),bi(F,q),m=new DD,i=[],os(o,!1),o=null,s=null,a=null,os(c,!1),c=null,l=null,u=[],d=null,f=null,v=!1,S=null,y=Ur("AIBaseCore",!0),N=Fc(),A=null,k=null,b=Lf(),j=[],$=null,oe=null,P=!1,R=null,B=!1,W=0,re=null,Q=null,ie=!1,T=null}function Oe(){var F=an(pt(),e.cfg,g);return F[Zd](Z),F}function Ye(F){var ne=BM(g[mt],oD,u);l=null,$=null,oe=null,f=(d||[])[0]||[],f=xm(bi(f,ne[Xs]));var Te=bi(xm(ne[Ft]),f);q=ei(Te);var ce=g.config[Pc]||[];ce.splice(0,ce[se]),bi(ce,q);var Ee=Oe();f&&f[se]>0&&DT(Ee[ro](f),Te),DT(Ee,Te),F&&vt(F)}function ft(F){var ne=null,Te=null,ce=[];return V(q,function(Ee){if(Ee[to]===F&&Ee!==m)return Te=Ee,-1;Ee.getChannel&&ce[Le](Ee)}),!Te&&ce[se]>0&&V(ce,function(Ee){if(Te=Ee.getChannel(F),!Te)return-1}),Te&&(ne={plugin:Te,setEnabled:function(Ee){cs(Te)[sf]=!Ee},isEnabled:function(){var Ee=cs(Te);return!Ee[Yn]&&!Ee[sf]},remove:function(Ee,ze){var Be;Ee===void 0&&(Ee=!0);var it=[Te],It=(Be={reason:1},Be[Ii]=Ee,Be);Zt(it,It,function(Vt){Vt&&Ye({reason:32,removed:it}),ze&&ze(Vt)})}}),ne}function pt(){if(!l){var F=(q||[]).slice();Je(F,m)===-1&&F[Le](m),l=aa(xm(F),e.cfg,g)}return l}function Zt(F,ne,Te){if(F&&F[se]>0){var ce=aa(F,e.cfg,g),Ee=Su(ce,g);Ee[Zd](function(){var ze=!1,Be=[];V(u,function(It,Vt){RD(It,F)?ze=!0:Be[Le](It)}),u=Be,$=null,oe=null;var it=[];d&&(V(d,function(It,Vt){var Gr=[];V(It,function(Wr){RD(Wr,F)?ze=!0:Gr[Le](Wr)}),it[Le](Gr)}),d=it),Te&&Te(ze),Z()}),Ee[mr](ne)}else Te(!1)}function Rr(){if(n&&n.queue){var F=n.queue.slice(0);n.queue[se]=0,V(F,function(ne){var Te,ce=(Te={},Te[xr]=S||"InternalMessageId: "+ne[ru],Te[tu]=k,Te[Bs]=Kn(new Date),Te.baseType=wc.dataType,Te.baseData={message:ne[no]},Te);g.track(ce)})}}function ur(F,ne,Te,ce){var Ee=1,ze=!1,Be=null;ce=ce||5e3;function it(){Ee--,ze&&Ee===0&&(Be&&Be[Jo](),Be=null,ne&&ne(ze),ne=null)}if(f&&f[se]>0){var It=Oe()[ro](f);It.iterate(function(Vt){if(Vt.flush){Ee++;var Gr=!1;Vt.flush(F,function(){Gr=!0,it()},Te)||Gr||(F&&Be==null?Be=Mn(function(){Be=null,it()},ce):it())}})}return ze=!0,it(),!0}function rn(){var F;ht(e[Di](function(ne){var Te=ne.cfg.enablePerfMgr;if(Te){var ce=ne.cfg[Zv];(F!==ce||!F)&&(ce||(ce=HM),af(ne.cfg,Zv,ce),F=ce,a=null),!s&&!a&&Pe(ce)&&(a=ce(g,g[Qd]()))}else a=null,F=null}))}function vt(F){var ne=Af(pt(),g);ne[Zd](Z),(!g._updateHook||g._updateHook(ne,F)!==!0)&&ne[mr](F)}function Ze(F){var ne=g[mt];ne?(X(ne,2,73,F),Z()):jt(F)}function Dt(F){var ne=g[Qd]();ne&&ne[Qs]([F],2)}function ht(F){b.add(F)}})}return r.__ieDyn=1,r})()});function Mc(r,e){try{if(r&&r!==""){var t=Mr().parse(r);if(t&&t[P_]&&t[P_]>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted===t.errors[se])return t}}catch(n){X(e,1,43,"Cannot parse the response. "+(n[xr]||ue(n)),{response:r})}return null}var kD=C(()=>{Ne();ct();Oi();ta()});var fo,JM,LD,FT,Uc,FD=C(()=>{br();xc();Ne();ct();tT();Oi();ta();oo();fo="",JM="NoResponseBody",LD="&"+JM+"=true",FT="POST",Uc=(function(){function r(){var e=0,t,n,i,o,s,a,c,l,u,d,f,v,m,S;qe(r,this,function(y,N){var b=!0;ie(),y[Xo]=function(T,R){i=R,n&&X(i,1,28,"Sender is already initialized"),y.SetConfig(T),n=!0},y._getDbgPlgTargets=function(){return[n,o,a,t]},y.SetConfig=function(T){try{if(s=T.senderOnCompleteCallBack||{},a=!!T.disableCredentials,c=T.fetchCredentials,o=!!T.isOneDs,t=!!T.enableSendPromise,u=!!T.disableXhr,d=!!T.disableBeacon,f=!!T.disableBeaconSync,S=T.timeWrapper,m=!!T.addNoResponse,v=!!T.disableFetchKeepAlive,l={sendPOST:W},o||(b=!1),a){var R=Rc();R&&R.protocol&&R.protocol[yn]()==="file:"&&(b=!1)}return!0}catch{}return!1},y.getSyncFetchPayload=function(){return e},y.getSenderInst=function(T,R){return T&&T[se]?j(T,R):null},y.getFallbackInst=function(){return l},y[Ws]=function(T,R){ie()};function _(T,R){q(R,200,{},T)}function A(T,R){X(i,2,26,"Failed to send telemetry.",{message:T}),q(R,400,{})}function k(T){A("No endpoint url is provided for the batch",T)}function j(T,R){for(var B,P=0,g=null,D=0;g==null&&D<T[se];)P=T[D],!u&&P===1?ff()?g=Q:du()&&(g=W):P===2&&ns(R)&&(!R||!v)?g=re:P===3&&xn()&&(R?!f:!d)&&(g=$),D++;return g?(B={_transport:P,_isSync:R},B[D_]=g,B):null}function q(T,R,B,P){try{T&&T(R,B,P)}catch{}}function oe(T,R){var B=vr(),P=T[nu];if(!P)return k(R),!0;P=T[nu]+(m?LD:fo);var g=T[$s],D=o?g:new Blob([g],{type:"text/plain;charset=UTF-8"}),I=B.sendBeacon(P,D);return I}function $(T,R,B){var P=T[$s];try{if(P)if(oe(T,R))_(fo,R);else{var g=s&&s.beaconOnRetry;g&&Pe(g)?g(T,R,oe):(l&&l[D_](T,R,!0),X(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(D){o&&sn(i,"Failed to send telemetry using sendBeacon API. Ex:"+ue(D)),q(R,o?0:400,{},fo)}}function W(T,R,B){var P,g,D,I=T[$v]||{};!B&&t&&(P=ni(function(Oe,Ye){g=Oe,D=Ye})),o&&B&&T.disableXhrSync&&(B=!1);var Z=T[nu];if(!Z){k(R),g&&g(!1);return}var M=V_(FT,Z,b,!0,B,T[bc]);o||M[I_]("Content-type","application/json"),V(Lr(I),function(Oe){M[I_](Oe,I[Oe])}),M.onreadystatechange=function(){o||(w(M),M.readyState===4&&g&&g(!0))},M.onload=function(){o&&w(M)};function w(Oe){var Ye=s&&s.xhrOnComplete,ft=Ye&&Pe(Ye);if(ft)Ye(Oe,R,T);else{var pt=wi(Oe);q(R,Oe[Ec],rs(Oe,o),pt)}}return M.onerror=function(Oe){q(R,o?M[Ec]:400,rs(M,o),o?fo:es(M)),D&&D(Oe)},M.ontimeout=function(){q(R,o?M[Ec]:500,rs(M,o),o?fo:es(M)),g&&g(!1)},M.send(T[$s]),P}function re(T,R,B){var P,g=T[nu],D=T[$s],I=o?D:new Blob([D],{type:"application/json"}),Z,M,w,Oe=new Headers,Ye=D[se],ft=!1,pt=!1,Zt=T[$v]||{},Rr=(P={method:FT,body:I},P[eT]=!0,P);T.headers&&Lr(T.headers)[se]>0&&(V(Lr(Zt),function(Ze){Oe.append(Ze,Zt[Ze])}),Rr[$v]=Oe),c?Rr.credentials=c:b&&o&&(Rr.credentials="include"),B&&(Rr.keepalive=!0,e+=Ye,o?T._sendReason===2&&(ft=!0,m&&(g+=LD)):ft=!0);var ur=new Request(g,Rr);try{ur[eT]=!0}catch{}if(!B&&t&&(Z=ni(function(Ze,Dt){M=Ze,w=Dt})),!g){k(R),M&&M(!1);return}function rn(Ze){q(R,o?0:400,{},o?fo:Ze)}function vt(Ze,Dt,ht){var F=Ze[Ec],ne=s.fetchOnComplete;ne&&Pe(ne)?ne(Ze,R,ht||fo,Dt):q(R,F,{},ht||fo)}try{jn(fetch(o?g:ur,o?Rr:null),function(Ze){if(B&&(e-=Ye,Ye=0),!pt)if(pt=!0,Ze.rejected)rn(Ze.reason&&Ze.reason[no]),w&&w(Ze.reason);else{var Dt=Ze[Sc];try{!o&&!Dt.ok?(rn(Dt.statusText),M&&M(!1)):o&&!Dt.body?(vt(Dt,null,fo),M&&M(!0)):jn(Dt.text(),function(ht){vt(Dt,T,ht[Sc]),M&&M(!0)})}catch(ht){rn(ue(ht)),w&&w(ht)}}})}catch(Ze){pt||(rn(ue(Ze)),w&&w(Ze))}return ft&&!pt&&(pt=!0,q(R,200,{}),M&&M(!0)),o&&!pt&&T[bc]>0&&S&&S.set(function(){pt||(pt=!0,q(R,500,{}),M&&M(!0))},T[bc]),Z}function Q(T,R,B){var P=rr(),g=new XDomainRequest,D=T[$s];g.onload=function(){var Oe=wi(g),Ye=s&&s.xdrOnComplete;Ye&&Pe(Ye)?Ye(g,R,T):q(R,200,{},Oe)},g.onerror=function(){q(R,400,{},o?fo:Nc(g))},g.ontimeout=function(){q(R,500,{})},g.onprogress=function(){};var I=P&&P.location&&P.location[Gv]||"",Z=T[nu];if(!Z){k(R);return}if(!o&&Z.lastIndexOf(I,0)!==0){var M="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";X(i,2,40,". "+M),A(M,R);return}var w=o?Z:Z[Ni](/^(https?:)/,"");g.open(FT,w),T[bc]&&(g[bc]=T[bc]),g.send(D),o&&B?S&&S.set(function(){g.send(D)},0):g.send(D)}function ie(){e=0,n=!1,t=!1,i=null,o=null,s=null,a=null,c=null,l=null,u=!1,d=!1,f=!1,v=!1,m=!1,S=null}})}return r.__ieDyn=1,r})()});function jD(r){return r&&r[Ni]?r[Ni](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Re):r}function wm(r,e){var t;if(e){var n=Re;pe(e)?(n=Re,V(e,function(o){o=jD(o),o&&(o[0]!=="."&&(o="."+o),n+=o)})):n=jD(e),n&&(n[0]!=="."&&(n="."+n),r=(r||Re)+n)}var i=e1.exec(r||Re)||[];return t={},t[En]=i[1],t.ns=(i[2]||Re).replace(XM,".").replace(QM,Re)[ri](".").sort().join("."),t}function MT(r,e,t){var n=[],i=Mf.get(r,Nm,{},!1),o=wm(e,t);return me(i,function(s,a){V(a,function(c){var l;(!o[En]||o[En]===c.evtName[En])&&(!o.ns||o.ns===o.ns)&&n[Le]((l={},l[xr]=c.evtName[En]+(c.evtName.ns?"."+c.evtName.ns:Re),l.handler=c[tf],l))})}),n}function $D(r,e,t){t===void 0&&(t=!0);var n=Mf.get(r,Nm,{},t),i=n[e];return i||(i=n[e]=[]),i}function JD(r,e,t,n){r&&e&&e[En]&&(r[VD]?r[VD](e[En],t,n):r[YD]&&r[YD](KD+e[En],t))}function t1(r,e,t,n){var i=!1;return r&&e&&e[En]&&t&&(r[UD]?(r[UD](e[En],t,n),i=!0):r[MD]&&(r[MD](KD+e[En],t),i=!0)),i}function qD(r,e,t,n){for(var i=e[se];i--;){var o=e[i];o&&(!t.ns||t.ns===o.evtName.ns)&&(!n||n(o))&&(JD(r,o.evtName,o[tf],o.capture),e[eo](i,1))}}function r1(r,e,t){if(e[En])qD(r,$D(r,e[En]),e,t);else{var n=Mf.get(r,Nm,{});me(n,function(i,o){qD(r,o,e,t)}),Lr(n)[se]===0&&Mf.kill(r,Nm)}}function Bn(r,e){var t;return e?(pe(e)?t=[r].concat(e):t=[r,e],t=wm("xx",t).ns[ri](".")):t=r,t}function po(r,e,t,n,i){var o;i===void 0&&(i=!1);var s=!1;if(r)try{var a=wm(e,n);if(s=t1(r,a,t,i),s&&Mf.accept(r)){var c=(o={guid:ZM++,evtName:a},o[tf]=t,o.capture=i,o);$D(r,a.type)[Le](c)}}catch{}return s}function ds(r,e,t,n,i){if(i===void 0&&(i=!1),r)try{var o=wm(e,n),s=!1;r1(r,o,function(a){return o.ns&&!t||a[tf]===t?(s=!0,!0):!1}),s||JD(r,o,t,i)}catch{}}function UT(r,e,t,n){return n===void 0&&(n=!1),po(r,e,t,null,n)}function YT(r,e,t,n){n===void 0&&(n=!1),ds(r,e,t,null,n)}function Am(r,e,t){var n=!1,i=rr();i&&(n=po(i,r,e,t),n=po(i.body,r,e,t)||n);var o=qt();return o&&(n=po(o,r,e,t)||n),n}function Om(r,e,t){var n=rr();n&&(ds(n,r,e,t),ds(n.body,r,e,t));var i=qt();i&&ds(i,r,e,t)}function _u(r,e,t,n){var i=!1;return e&&r&&r[se]>0&&V(r,function(o){o&&(!t||Je(t,o)===-1)&&(i=Am(o,e,n)||i)}),i}function km(r,e,t,n){var i=!1;return e&&r&&pe(r)&&(i=_u(r,e,t,n),!i&&t&&t[se]>0&&(i=_u(r,e,null,n))),i}function ua(r,e,t){r&&pe(r)&&V(r,function(n){n&&Om(n,e,t)})}function Uf(r,e,t){return km([GD,BD,Rm],r,e,t)}function Yf(r,e){ua([GD,BD,Rm],r,e)}function Tu(r,e,t){function n(s){var a=qt();r&&a&&a.visibilityState==="hidden"&&r(s)}var i=Bn(WD,t),o=_u([Rm],r,e,i);return(!e||Je(e,Ff)===-1)&&(o=_u([Ff],n,e,i)||o),!o&&e&&(o=Tu(r,null,t)),o}function Vf(r,e){var t=Bn(WD,e);ua([Rm],r,t),ua([Ff],null,t)}function Eu(r,e,t){function n(s){var a=qt();r&&a&&a.visibilityState==="visible"&&r(s)}var i=Bn(zD,t),o=_u([HD],r,e,i);return o=_u([Ff],n,e,i)||o,!o&&e&&(o=Eu(r,null,t)),o}function jf(r,e){var t=Bn(zD,e);ua([HD],r,t),ua([Ff],null,t)}var KD,MD,UD,YD,VD,Nm,Ff,Rm,HD,BD,GD,WD,zD,XM,QM,ZM,Mf,e1,XD=C(()=>{Ne();ct();fu();nr();KD="on",MD="attachEvent",UD="addEventListener",YD="detachEvent",VD="removeEventListener",Nm="events",Ff="visibilitychange",Rm="pagehide",HD="pageshow",BD="unload",GD="beforeunload",WD=Ur("aiEvtPageHide"),zD=Ur("aiEvtPageShow"),XM=/\.[\.]+/g,QM=/[\.]+$/,ZM=1,Mf=cm("events"),e1=/^([^.]*)(?:\.(.+)|)/});var VT,QD=C(()=>{Xd();VT=Ht({DISABLED:0,CRITICAL:1,WARNING:2,DEBUG:3})});var st=C(()=>{CP();bP();S_();OD();OT();am();ET();Z_();oo();kD();FD();Ne();Xd();XD();ta();hn();yT();Em();Oi();Pm();QD();hT();fu();Dm();Im();PT();na();fm();nT()});var vo,ZD,jT,Lm,Fm=C(()=>{vo="",ZD="https://browser.events.data.microsoft.com/OneCollector/1.0/",jT="version",Lm="properties"});var qT,KT,Cu,mo,HT,Rt,Yc,fs,Mm,Um,Ym,Vm,qf,jm=C(()=>{qT="initialize",KT="logger",Cu="indexOf",mo="timings",HT="pollInternalLogs",Rt="value",Yc="kind",fs="length",Mm="processTelemetryStart",Um="handleField",Ym="rmSanitizer",Vm="rmFieldSanitizer",qf="canHandle"});function Pr(r){return!(r===vo||G(r))}function qm(r){if(r){var e=mn(r,"-");if(e>-1)return pc(r,e)}return vo}function iI(){return BT===null&&(BT=!ke(Uint8Array)&&!a1()&&!Zs()),BT}function Km(r){return!!(r&&Or(r)&&r>=1&&r<=4)}function Hm(r,e,t){if(!e&&!Pr(e)||typeof r!="string")return null;var n=typeof e;if(n==="string"||n==="number"||n==="boolean"||pe(e))e={value:e};else if(n==="object"&&!tI.call(e,"value"))e={value:t?JSON.stringify(e):e};else if(G(e[Rt])||e[Rt]===vo||!Ie(e[Rt])&&!Or(e[Rt])&&!Xi(e[Rt])&&!pe(e[Rt]))return null;if(pe(e[Rt])&&!WT(e[Rt]))return null;if(!G(e[Yc])){if(pe(e[Rt])||!Kf(e[Yc]))return null;e[Rt]=e[Rt].toString()}return e}function xu(r,e,t){var n=-1;if(!ke(r))if(e>0&&(e===32?n=8192:e<=13&&(n=e<<5)),s1(t))n===-1&&(n=0),n|=t;else{var i=o1[go(r)]||-1;n!==-1&&i!==-1?n|=i:i===6&&(n=i)}return n}function oI(r,e,t){t===void 0&&(t=!0);var n;return r&&(n=r.get(e),t&&n&&decodeURIComponent&&(n=decodeURIComponent(n))),n||vo}function sI(r){r===void 0&&(r="D");var e=Df();return r==="B"?e="{"+e+"}":r==="P"?e="("+e+")":r==="N"&&(e=e.replace(/-/g,vo)),e}function Vc(r,e,t,n,i){var o={},s=!1,a=0,c=arguments[fs],l=arguments;for(Xi(l[0])&&(s=l[0],a++);a<c;a++){var r=l[a];me(r,function(d,f){s&&f&&Lt(f)?pe(f)?(o[d]=o[d]||[],V(f,function(v,m){v&&Lt(v)?o[d][m]=Vc(!0,o[d][m],v):o[d][m]=v})):o[d]=Vc(!0,o[d],f):o[d]=f})}return o}function Kf(r){return r===0||r>0&&r<=13||r===32}function s1(r){return r>=0&&r<=9}function a1(){var r=vr();if(!ke(r)&&r.userAgent){var e=r.userAgent.toLowerCase();if((e[Cu]("safari")>=0||e[Cu]("firefox")>=0)&&e[Cu]("chrome")<0)return!0}return!1}function WT(r){return r[fs]>0}function Hf(r,e){var t=r;t[mo]=t[mo]||{},t[mo][Mm]=t[mo][Mm]||{},t[mo][Mm][e]=Pn()}function go(r){var e=0;if(r!=null){var t=typeof r;t==="string"?e=1:t==="number"?e=2:t==="boolean"?e=3:t===Ho&&(e=4,pe(r)?(e=4096,r[fs]>0&&(e|=go(r[0]))):tI.call(r,"value")&&(e=8192|go(r[Rt])))}return e}function Bm(){return!!et("chrome")}function aI(r,e,t,n,i,o){n===void 0&&(n=!1),i===void 0&&(i=!1);function s(c,l,u){try{c[l]=u}catch{}}var a=new XMLHttpRequest;return n&&s(a,n1,n),t&&s(a,eI,t),a.open(r,e,!i),t&&s(a,eI,t),!i&&o&&s(a,i1,o),a}function da(r){return r>0}var ps,GT,bu,tI,n1,eI,i1,o1,BT,rI,nI,Pn,Gm=C(()=>{st();hn();Ne();Fm();jm();GT="4.3.4",bu="1DS-Web-JS-"+GT,tI=Vd.hasOwnProperty,n1="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",eI="withCredentials",i1="timeout",o1=(ps={},ps[0]=0,ps[2]=6,ps[1]=1,ps[3]=7,ps[4098]=6,ps[4097]=1,ps[4099]=7,ps),BT=null,rI=vc(),nI=Gl();Pn=zd});function l1(r){return r&&(!r.getProperty||!r.setProperty)&&jt("Invalid property storage override passed."),!0}var c1,cI,lI=C(()=>{hn();br();st();Ne();Fm();Gm();jm();c1=Ci({endpointUrl:ZD,propertyStorageOverride:{isVal:l1}});cI=(function(r){gn(e,r);function e(){var t=r.call(this)||this;return qe(e,t,function(n,i){n[qT]=function(o,s,a,c){Bt(n,function(){return"AppInsightsCore.initialize"},function(){try{i[qT](Nt(o,c1,a||n[KT],!1).cfg,s,a,c)}catch(d){var l=n[KT],u=ue(d);u[Cu]("channels")!==-1&&(u+=`
 - Channels must be provided through config.channels only!`),X(l,1,514,"SDK Initialization Failed - no telemetry will be sent: "+u)}},function(){return{config:o,extensions:s,logger:a,notificationManager:c}})},n.track=function(o){Bt(n,function(){return"AppInsightsCore.track"},function(){var s=o;if(s){s[mo]=s[mo]||{},s[mo].trackStart=Pn(),Km(s.latency)||(s.latency=1);var a=s.ext=s.ext||{};a.sdk=a.sdk||{},a.sdk.ver=bu;var c=s.baseData=s.baseData||{};c[Lm]=c[Lm]||{};var l=c[Lm];l[jT]=l[jT]||n.pluginVersionString||vo}i.track(s)},function(){return{item:o}},!o.sync)},n[HT]=function(o){return i[HT](o||"InternalLog")}}),t}return e.__ieDyn=1,e})(us)});var uI,dI,fI,pI,vI,mI=C(()=>{st();uI=Ht({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}),dI=Ht({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),fI=Ht({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),pI=Ht({Normal:1,Critical:2}),vI=Ht({NONE:0,ERROR:1,WARNING:2,INFORMATION:3})});var gI,hI=C(()=>{st();Ne();Fm();Gm();jm();gI=(function(){function r(e){var t=this,n={},i=[],o=[];e&&o.push(e);function s(u,d){var f,v=n[u];if(v&&(f=v[d]),!f&&f!==null){if(Ie(u)&&Ie(d))if(o[fs]>0){for(var m=0;m<o[fs];m++)if(o[m][Um](u,d)){f={canHandle:!0,fieldHandler:o[m]};break}}else i[fs]===0&&(f={canHandle:!0});if(!f&&f!==null){f=null;for(var m=0;m<i[fs];m++)if(i[m][Um](u,d)){f={canHandle:!0,handler:i[m],fieldHandler:null};break}}v||(v=n[u]={}),v[d]=f}return f}t.clearCache=function(){n={}},t.addSanitizer=function(u){u&&(e_(i,u)||i.push(u),n={})},t.addFieldSanitizer=function(u){u&&(e_(o,u)||o.push(u),n={})},t[Ym]=function(u){if(u){var d=Je(i,u);d!==-1&&(i.splice(d,1),n={}),V(i,function(f){f&&f[Ym]&&f[Ym](u)})}},t[Vm]=function(u){if(u){var d=Je(o,u);d!==-1&&(o.splice(d,1),n={}),V(i,function(f){f&&f[Vm]&&f[Vm](u)})}},t.isEmpty=function(){return $l(i)+$l(o)===0},t[Um]=function(u,d){var f=s(u,d);return f?f[qf]:!1},t[Rt]=function(u,d,f,v){var m=s(u,d);if(m&&m[qf]){if(!m||!m[qf])return null;if(m.handler)return m.handler[Rt](u,d,f,v);if(!Ie(d)||G(f)||f===vo)return null;var S=null,y=go(f);if((y&8192)===8192){var N=y&-8193;if(S=f,!Pr(S[Rt])||N!==1&&N!==2&&N!==3&&(N&4096)!==4096)return null}else y===1||y===2||y===3||(y&4096)===4096?S=c(u,d,f):y===4&&(S=c(u,d,v?JSON.stringify(f):f));if(S)return a(m,u,d,y,S,v)}return null},t.property=function(u,d,f,v){var m=s(u,d);if(!m||!m[qf]||!Ie(d)||G(f)||!Pr(f[Rt]))return null;var S=go(f[Rt]);return S===0?null:a(m,u,d,S,f,v)};function a(u,d,f,v,m,S){if(u.handler)return u.handler.property(d,f,m,S);if(!G(m[Yc])){if((v&4096)===4096||!Kf(m[Yc]))return null;m[Rt]=m[Rt].toString()}return l(u.fieldHandler,d,f,v,m)}function c(u,d,f){return Pr(f)?{value:f}:null}function l(u,d,f,v,m){if(m&&u){var S=u.getSanitizer(d,f,v,m[Yc],m.propertyType);if(S)if(v===4){var y={},N=m[Rt];me(N,function(_,A){var k=d+"."+f;if(Pr(A)){var j=c(k,_,A);j=l(u,k,_,go(A),j),j&&(y[_]=j[Rt])}}),m[Rt]=y}else{var b={path:d,name:f,type:v,prop:m,sanitizer:t};m=S.call(t,b)}}return m}}return r.getFieldType=go,r})()});var yI={};Ke(yI,{ActiveStatus:()=>Un,AppInsightsCore:()=>cI,BaseTelemetryPlugin:()=>ls,DiagnosticLogger:()=>ia,EventLatency:()=>dI,EventPersistence:()=>pI,EventPropertyType:()=>fI,EventsDiscardedReason:()=>xi,FullVersionString:()=>bu,InternalAppInsightsCore:()=>us,LoggingSeverity:()=>VT,MinChannelPriorty:()=>h_,NotificationManager:()=>bf,PerfEvent:()=>Oc,PerfManager:()=>Pf,ProcessTelemetryContext:()=>RT,SenderPostManager:()=>Uc,TraceLevel:()=>vI,Undefined:()=>$i,ValueKind:()=>uI,ValueSanitizer:()=>gI,Version:()=>GT,_InternalLogMessage:()=>wc,__getRegisteredEvents:()=>MT,_appendHeader:()=>lu,_getAllResponseHeaders:()=>rs,_logInternalMessage:()=>lT,_testHookMaxUnloadHooksCb:()=>wT,_throwInternal:()=>X,_warnToConsole:()=>sn,addEventHandler:()=>Am,addEventListeners:()=>km,addPageHideEventListener:()=>Tu,addPageShowEventListener:()=>Eu,addPageUnloadEventListener:()=>Uf,areCookiesSupported:()=>gu,arrForEach:()=>V,arrIndexOf:()=>Je,arrMap:()=>Wo,arrReduce:()=>Wd,attachEvent:()=>UT,blockDynamicConversion:()=>Sf,convertAllHeadersToMap:()=>sm,cookieAvailable:()=>gu,createCookieMgr:()=>ss,createDynamicConfig:()=>Nt,createEnumStyle:()=>Ht,createGuid:()=>sI,createProcessTelemetryContext:()=>an,createTraceParent:()=>If,createUniqueNamespace:()=>Ur,createUnloadHandlerContainer:()=>Fc,dateNow:()=>Kt,detachEvent:()=>YT,disallowsSameSiteNone:()=>Tm,doPerf:()=>Bt,dumpObj:()=>ue,eventOff:()=>ds,eventOn:()=>po,extend:()=>Vc,findW3cTraceParent:()=>wf,forceDynamicConversion:()=>Q_,formatErrorMessageXdr:()=>Nc,formatErrorMessageXhr:()=>es,formatTraceParent:()=>Rf,generateW3CId:()=>kc,getCommonSchemaMetaData:()=>xu,getConsole:()=>cf,getCookieValue:()=>oI,getCrypto:()=>lf,getDocument:()=>qt,getDynamicConfigHandler:()=>yf,getExceptionName:()=>yt,getFieldValueType:()=>go,getGlobal:()=>on,getGlobalInst:()=>et,getHistory:()=>Iv,getIEVersion:()=>df,getISOString:()=>Kn,getJSON:()=>Mr,getLocation:()=>Rc,getMsCrypto:()=>uf,getNavigator:()=>vr,getPerformance:()=>js,getResponseText:()=>wi,getSetValue:()=>af,getTenantId:()=>qm,getTime:()=>Pn,getWindow:()=>rr,hasDocument:()=>vc,hasHistory:()=>QS,hasJSON:()=>so,hasNavigator:()=>Bd,hasOwnProperty:()=>Cr,hasWindow:()=>Gl,isArray:()=>pe,isArrayValid:()=>WT,isBeaconsSupported:()=>xn,isBoolean:()=>Xi,isChromium:()=>Bm,isDate:()=>Pv,isDocumentObjectAvailable:()=>rI,isError:()=>fc,isFetchSupported:()=>ns,isFunction:()=>Pe,isGreaterThanZero:()=>da,isIE:()=>ea,isLatency:()=>Km,isNotTruthy:()=>zS,isNullOrUndefined:()=>G,isNumber:()=>Or,isObject:()=>Lt,isReactNative:()=>Zs,isSampledFlag:()=>Nf,isString:()=>Ie,isTruthy:()=>Ti,isTypeof:()=>WS,isUint8ArrayAvailable:()=>iI,isUndefined:()=>ke,isValidSpanId:()=>uo,isValidTraceId:()=>lo,isValidTraceParent:()=>yu,isValueAssigned:()=>Pr,isValueKind:()=>Kf,isWindowObjectAvailable:()=>nI,isXhrSupported:()=>du,mergeEvtNamespace:()=>Bn,newGuid:()=>Df,newId:()=>gf,normalizeJsName:()=>Ic,objDefineAccessors:()=>$S,objForEachKey:()=>me,objFreeze:()=>ei,objKeys:()=>Lr,objSeal:()=>JS,onConfigChange:()=>ir,openXhr:()=>aI,optimizeObject:()=>bn,parseResponse:()=>Mc,parseTraceParent:()=>Lc,perfNow:()=>zd,prependTransports:()=>ts,proxyAssign:()=>U_,proxyFunctionAs:()=>Zo,proxyFunctions:()=>Hn,random32:()=>is,randomValue:()=>mf,removeEventHandler:()=>Om,removeEventListeners:()=>ua,removePageHideEventListener:()=>Vf,removePageShowEventListener:()=>jf,removePageUnloadEventListener:()=>Yf,safeGetCookieMgr:()=>gT,safeGetLogger:()=>Ai,sanitizeProperty:()=>Hm,setEnableEnvMocks:()=>G_,setProcessTelemetryTimings:()=>Hf,setValue:()=>oi,strContains:()=>$t,strEndsWith:()=>mc,strFunction:()=>Yl,strObject:()=>Ho,strPrototype:()=>_i,strStartsWith:()=>Jl,strTrim:()=>tt,strUndefined:()=>$i,throwError:()=>jt,toISOString:()=>Kn,useXDomainRequest:()=>ff});var jc=C(()=>{lI();mI();hI();st();Gm()});var qc,Wm,zm,zT=C(()=>{qc="REAL_TIME",Wm="NEAR_REAL_TIME",zm="BEST_EFFORT"});var ki,$m,SI,$T,_I,TI,JT,Jm,Bf,Pu,EI,CI,bI,Xm,XT,Qm,Zm,eg,Gf,QT,ZT,xI,Du,eE,tg,Wf=C(()=>{ki="",$m="drop",SI="send",$T="requeue",_I="rspFail",TI="oth",JT="no-cache, no-store",Jm="application/x-json-stream",Bf="cache-control",Pu="content-type",EI="kill-tokens",CI="kill-duration",bI="time-delta-millis",Xm="client-version",XT="client-id",Qm="time-delta-to-apply-millis",Zm="upload-time",eg="apikey",Gf="AuthMsaDeviceTicket",QT="WebAuthToken",ZT="AuthXToken",xI="NoResponseBody",Du="msfpc",eE="trace",tg="user"});var zf,rg,ng,ig,$f,Ue,ho,Gn,Gt,yo,gr,So,Kc,og,Hc,sg,Bc,ag,cg,PI,tE,rE,DI,II,lg,nE,iE,NI,RI,oE,sE,aE,wI,ug,dg,fg,Jf,cE,Li,Iu,lE,$r,Dn,Xf,Qf,Nu,pg,Zf,AI,Ru,vg,mg,wu,uE,ep,gg,hg,Au,OI,yg,Sg,_g,tp,kI,LI,dE,fE,FI,MI,UI,Tg,rp,fa,Gc,Ou=C(()=>{zf="allowRequestSending",rg="firstRequestSent",ng="shouldAddClockSkewHeaders",ig="getClockSkewHeaderValue",$f="setClockSkew",Ue="length",ho="concat",Gn="iKey",Gt="count",yo="events",gr="push",So="split",Kc="splice",og="toLowerCase",Hc="hdrs",sg="useHdrs",Bc="initialize",ag="setTimeoutOverride",cg="clearTimeoutOverride",PI="payloadPreprocessor",tE="overrideEndpointUrl",rE="avoidOptions",DI="disableEventTimings",II="stringifyObjects",lg="enableCompoundKey",nE="disableXhrSync",iE="disableFetchKeepAlive",NI="addNoResponse",RI="excludeCsMetaData",oE="useSendBeacon",sE="fetchCredentials",aE="alwaysUseXhrOverride",wI="unloadTransports",ug="serializeOfflineEvt",dg="getOfflineRequestDetails",fg="createPayload",Jf="createOneDSPayload",cE="payloadBlob",Li="headers",Iu="_thePayload",lE="urlString",$r="batches",Dn="sendType",Xf="addHeader",Qf="canSendRequest",Nu="sendQueuedRequests",pg="isCompletelyIdle",Zf="setUnloading",AI="isTenantKilled",Ru="resume",vg="sendSynchronousBatch",mg="_transport",wu="getWParam",uE="isBeacon",ep="timings",gg="isTeardown",hg="isSync",Au="data",OI="timeout",yg="_sendReason",Sg="setKillSwitchTenants",_g="_backOffTransmission",tp="identifier",kI="disableOptimizeObj",LI="ignoreMc1Ms0CookieProcessing",dE="eventsLimitInMem",fE="autoFlushEventsLimit",FI="disableAutoBatchFlushLimit",MI="overrideInstrumentationKey",UI="disableTelemetry",Tg="baseData",rp="sendAttempt",fa="latency",Gc="sync"});function VI(r){var e=(r.ext||{}).intweb;return e&&Pr(e[Du])?e[Du]:null}function YI(r){for(var e=null,t=0;e===null&&t<r[Ue];t++)e=VI(r[t]);return e}var pa,Eg=C(()=>{jc();Wf();Ou();pa=(function(){function r(e,t){var n=t?[][ho](t):[],i=this,o=YI(n);i[Gn]=function(){return e},i.Msfpc=function(){return o||ki},i[Gt]=function(){return n[Ue]},i[yo]=function(){return n},i.addEvent=function(s){return s?(n[gr](s),o||(o=VI(s)),!0):!1},i[So]=function(s,a){var c;if(s<n[Ue]){var l=n[Ue]-s;G(a)||(l=a<l?a:l),c=n[Kc](s,l),o=YI(n)}return new r(e,c)}}return r.create=function(e,t){return new r(e,t)},r})()});var jI,qI=C(()=>{br();Ou();jI=(function(){function r(){var e=!0,t=!0,n=!0,i="use-collector-delta",o=!1;qe(r,this,function(s){s[zf]=function(){return e},s[rg]=function(){n&&(n=!1,o||(e=!1))},s[ng]=function(){return t},s[ig]=function(){return i},s[$f]=function(a){o||(a?(i=a,t=!0,o=!0):t=!1,e=!0)}})}return r.__ieDyn=1,r})()});var u1,KI,HI=C(()=>{br();jc();Ou();u1=1e3,KI=(function(){function r(){var e={};function t(n){var i=[];return n&&V(n,function(o){i[gr](tt(o))}),i}qe(r,this,function(n){n[Sg]=function(i,o){if(i&&o)try{var s=t(i[So](","));if(o==="this-request-only")return s;for(var a=parseInt(o,10)*u1,c=0;c<s[Ue];++c)e[s[c]]=Kt()+a}catch{return[]}return[]},n[AI]=function(i){var o=e,s=tt(i);return o[s]!==void 0&&o[s]>Kt()?!0:(delete o[s],!1)}})}return r.__ieDyn=1,r})()});function GI(r){return!(r>=300&&r<500&&r!=429||r==501||r==505)}function Cg(r){var e=0,t=BI*d1,n=BI*f1,i=Math.floor(Math.random()*(n-t))+t;return e=Math.pow(2,r)*i,Math.min(e,p1)}var d1,f1,BI,p1,pE=C(()=>{d1=.8,f1=1.2,BI=3e3,p1=6e5});function y1(r,e,t,n,i){if(i&&e){var o=r(i.value,i.kind,i.propertyType);if(o>-1){var s=e[WI];s||(s=e[WI]={f:{}});var a=s[bg];if(a||(a=s[bg]={}),t)for(var c=0;c<t.length;c++){var l=t[c];a[l]||(a[l]={f:{}});var u=a[l][bg];u||(u=a[l][bg]={}),a=u}a=a[n]={},pe(i.value)?a.a={t:o}:a.t=o}}}var v1,m1,zI,$I,g1,WI,bg,h1,JI,XI=C(()=>{br();jc();Eg();Wf();Ne();v1=20,m1=3984588,zI=65e3,$I=2e6,g1=Math.min($I,zI),WI="metadata",bg="f",h1=/\./,JI=(function(){function r(e,t,n,i,o,s){var a="data",c="baseData",l="ext",u=!!i,d=!0,f=t,v={},m=!!s,S=o||xu;qe(r,this,function(y){y.createPayload=function(_,A,k,j,q,oe){return{apiKeys:[],payloadBlob:ki,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:_,isTeardown:A,isSync:k,isBeacon:j,sendType:oe,sendReason:q}},y.appendPayload=function(_,A,k){var j=_&&A&&!_.overflow;return j&&Bt(e,function(){return"Serializer:appendPayload"},function(){for(var q=A.events(),oe=_.payloadBlob,$=_.numEvents,W=!1,re=[],Q=[],ie=_.isBeacon,T=ie?zI:m1,R=ie?g1:$I,B=0,P=0;B<q.length;){var g=q[B];if(g){if($>=k){_.overflow=A.split(B);break}var D=y.getEventBlob(g);if(D&&D.length<=R){var I=D.length,Z=oe.length;if(Z+I>T){_.overflow=A.split(B);break}oe&&(oe+=`
`),oe+=D,P++,P>v1&&(Qi(oe,0,1),P=0),W=!0,$++}else D?re.push(g):Q.push(g),q.splice(B,1),B--}B++}if(re.length>0&&_.sizeExceed.push(pa.create(A.iKey(),re)),Q.length>0&&_.failedEvts.push(pa.create(A.iKey(),Q)),W){_.batches.push(A),_.payloadBlob=oe,_.numEvents=$;var M=A.iKey();Je(_.apiKeys,M)===-1&&_.apiKeys.push(M)}},function(){return{payload:_,theBatch:{iKey:A.iKey(),evts:A.events()},max:k}}),j},y.getEventBlob=function(_){try{return Bt(e,function(){return"Serializer.getEventBlob"},function(){var A={};A.name=_.name,A.time=_.time,A.ver=_.ver,A.iKey="o:"+qm(_.iKey);var k={},j;m||(j=function(W,re,Q){y1(S,k,W,re,Q)});var q=_[l];q&&(A[l]=k,me(q,function(W,re){var Q=k[W]={};b(re,Q,"ext."+W,!0,null,null,!0)}));var oe=A[a]={};oe.baseType=_.baseType;var $=oe[c]={};return b(_.baseData,$,c,!1,[c],j,d),b(_.data,oe,a,!1,[],j,d),JSON.stringify(A)},function(){return{item:_}})}catch{return null}};function N(_,A){var k=v[_];return k===void 0&&(_.length>=7&&(k=Jl(_,"ext.metadata")||Jl(_,"ext.web")),v[_]=k),k}function b(_,A,k,j,q,oe,$){me(_,function(W,re){var Q=null;if(re||Pr(re)){var ie=k,T=W,R=q,B=A;if(u&&!j&&h1.test(W)){var P=W.split("."),g=P.length;if(g>1){R&&(R=R.slice());for(var D=0;D<g-1;D++){var I=P[D];B=B[I]=B[I]||{},ie+="."+I,R&&R.push(I)}T=P[g-1]}}var Z=j&&N(ie,T);if(!Z&&f&&f.handleField(ie,T)?Q=f.value(ie,T,re,n):Q=Hm(T,re,n),Q){var M=Q.value;if(B[T]=M,oe&&oe(R,T,Q),$&&typeof M=="object"&&!pe(M)){var w=R;w&&(w=w.slice(),w.push(T)),b(re,M,ie+"."+T,j,w,oe,$)}}}})}})}return r.__ieDyn=1,r})()});function ku(r,e){return{set:function(t,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return pP([r,e],t,n,i)}}}var vE=C(()=>{Ne()});function zc(r,e,t){gE[r]=e,t!==!1&&(hE[e]=r)}function xg(r,e){var t=!1;if(r&&e){var n=Lr(r);if(n&&n[Ue]>0)for(var i=e[og](),o=0;o<n[Ue];o++){var s=n[o];if(s&&Cr(e,s)&&s[og]()===i){t=!0;break}}}return t}function Lu(r,e,t,n){e&&t&&t[Ue]>0&&(n&&gE[e]?(r[Hc][gE[e]]=t,r[sg]=!0):r.url+="&"+e+"="+t)}function E1(r,e,t){for(var n=0;n<r[Ue];n++)if(r[n].name===e){r[n].value=t;return}r[gr]({name:e,value:t})}function C1(r,e){for(var t=0;t<r[Ue];t++)if(r[t].name===e){r[Kc](t,1);return}}var Wc,mE,S1,_1,T1,gE,hE,QI,ZI=C(()=>{br();jc();Ne();qI();Eg();Wf();HI();pE();XI();vE();Ou();mE="sendAttempt",S1="&"+xI+"=true",_1="?cors=true&"+Pu[og]()+"="+Jm,T1=(Wc={},Wc[1]=$T,Wc[100]=$T,Wc[200]="sent",Wc[8004]=$m,Wc[8003]=$m,Wc),gE={},hE={};zc(Gf,Gf,!1);zc(Xm,Xm);zc(XT,"Client-Id");zc(eg,eg);zc(Qm,Qm);zc(Zm,Zm);zc(ZT,ZT);QI=(function(){function r(e,t,n,i){var o,s,a,c,l=!1,u,d,f,v,m,S,y,N,b,_,A,k,j,q,oe,$,W,re,Q,ie,T,R,B,P,g,D,I,Z;qe(r,this,function(M){pt();var w=!0;M[Bc]=function(E,K,J){P||(m=K,k=K.getCookieMgr(),d=J,f=d.diagLog(),bi(ie,ir(E,function(de){var xe,Me=de.cfg,fe=de.cfg.extensionConfig[J.identifier];g=ku(fe[ag],fe[cg]),Pr(Me.anonCookieName)?E1(y,"anoncknm",Me.anonCookieName):C1(y,"anoncknm"),T=fe[PI],R=fe.payloadListener;var p=fe.httpXHROverride,h=fe[tE]?fe[tE]:Me.endpointUrl;o=h+_1,q=ke(fe[rE])?!0:!fe[rE],A=!fe[DI];var x=fe.valueSanitizer,O=fe[II],Y=!!Me[lg];ke(fe[lg])||(Y=!!fe[lg]),oe=fe.xhrTimeout,$=!!fe[nE],W=!!fe[iE],Q=fe[NI]!==!1,D=!!fe[RI],K.getPlugin("LocalStorage")&&(W=!0),l=!Zs(),_=new JI(m,x,O,Y,xu,D),G(fe[oE])||(l=!!fe[oE]),fe[sE]&&(Z=fe[sE]);var z=Ye();I?I.SetConfig(z):(I=new Uc,I[Bc](z,f));var te=p,De=fe[aE]?p:null,Ge=fe[aE]?p:null,Ce=[3,2];if(!p){S=!1;var dn=[];Zs()?(dn=[2,1],Ce=[2,1,3]):dn=[1,2,3],dn=ts(dn,fe.transports),p=Oe(dn,!1),p||sn(f,"No available transport to send events"),te=Oe(dn,!0)}De||(Ce=ts(Ce,fe[wI]),De=Oe(Ce,!0)),re=!S&&(l&&xn()||!W&&ns(!0)),v=(xe={},xe[0]=p,xe[1]=te||Oe([1,2,3],!0),xe[2]=De||te||Oe([1],!0),xe[3]=Ge||Oe([2,3],!0)||te||Oe([1],!0),xe)})),P=!0)},M.addResponseHandler=function(E){return B[gr](E),{rm:function(){var K=B.indexOf(E);K>=0&&B[Kc](K,1)}}},M[ug]=function(E){try{if(_)return _.getEventBlob(E)}catch{}return ki},M[dg]=function(){try{var E=_&&_[fg](0,!1,!1,!1,1,0);return ce(E,q)}catch{}return null},M[Jf]=function(E,K){try{var J=[];V(E,function(p){K&&(p=bn(p));var h=pa.create(p[Gn],[p]);J[gr](h)});for(var de=null;J[Ue]>0&&_;){var xe=J.shift();xe&&xe[Gt]()>0&&(de=de||_[fg](0,!1,!1,!1,1,0),_.appendPayload(de,xe,e))}var Me=ce(de,q),fe={data:de[cE],urlString:Me.url,headers:Me[Hc],timeout:oe,disableXhrSync:$,disableFetchKeepAlive:W};return q&&(xg(fe[Li],Bf)||(fe[Li][Bf]=JT),xg(fe[Li],Pu)||(fe[Li][Pu]=Jm)),fe}catch{}return null};function Oe(E,K){try{return I&&I.getSenderInst(E,K)}catch{}return null}M._getDbgPlgTargets=function(){return[v[0],s,_,v,Ye(),o]};function Ye(){try{var E={xdrOnComplete:ft,fetchOnComplete:Zt,xhrOnComplete:Rr,beaconOnRetry:rn},K={enableSendPromise:!1,isOneDs:!0,disableCredentials:!w,fetchCredentials:Z,disableXhr:!1,disableBeacon:!l,disableBeaconSync:!l,disableFetchKeepAlive:W,timeWrapper:g,addNoResponse:Q,senderOnCompleteCallBack:E};return K}catch{}return null}function ft(E,K,J){var de=wi(E);ur(K,200,{},de),Zn(de)}function pt(){var E;o=null,s=new KI,a=!1,c=new jI,l=!1,u=0,d=null,f=null,v=null,m=null,S=!0,y=[],N={},b=[],_=null,A=!1,k=null,j=!1,q=!1,oe=E,$=E,W=E,re=E,Q=E,ie=[],T=E,R=E,B=[],P=!1,g=ku(),D=!1,I=null}function Zt(E,K,J,de){var xe=function(p,h,x){ur(K,p,h,x),Zn(x)},Me={},fe=E[Li];fe&&fe.forEach(function(p,h){Me[h]=p}),xe(E.status,Me,J||ki)}function Rr(E,K,J){var de=wi(E);ur(K,E.status,rs(E,!0),de),Zn(de)}function ur(E,K,J,de){try{E(K,J,de)}catch(xe){X(f,2,518,ue(xe))}}function rn(E,K,J){var de=E,xe=200,Me=de[Iu],fe=E[lE]+(Q?S1:ki);try{var p=vr();if(Me){var h=!!m.getPlugin("LocalStorage"),x=[],O=[];V(Me[$r],function(Y){if(x&&Y&&Y[Gt]()>0)for(var z=Y[yo](),te=0;te<z[Ue];te++)if(p.sendBeacon(fe,_.getEventBlob(z[te])))O[gr](Y[te]);else{x[gr](Y[So](te));break}else x[gr](Y[So](0))}),O[Ue]>0&&(Me.sentEvts=O),h||Er(x,8003,Me[Dn],!0)}else xe=0}catch(Y){sn(f,"Failed to send telemetry using sendBeacon API. Ex:"+ue(Y)),xe=0}finally{ur(K,xe,{},ki)}}function vt(E){return E===2||E===3}function Ze(E){return j&&vt(E)&&(E=2),E}M[Xf]=function(E,K){N[E]=K},M.removeHeader=function(E){delete N[E]},M[Qf]=function(){return Dt()&&c[zf]()},M[Nu]=function(E,K){ke(E)&&(E=0),j&&(E=Ze(E),K=2),F(b,E,0)&&Te(ht(),0,!1,E,K||0)},M[pg]=function(){return!a&&u===0&&b[Ue]===0},M[Zf]=function(E){j=E},M.addBatch=function(E){if(E&&E[Gt]()>0){if(s.isTenantKilled(E[Gn]()))return!1;b[gr](E)}return!0},M.teardown=function(){b[Ue]>0&&Te(ht(),0,!0,2,2),V(ie,function(E){E&&E.rm&&E.rm()}),ie=[]},M.pause=function(){a=!0},M[Ru]=function(){a=!1,M[Nu](0,4)},M[vg]=function(E,K,J){E&&E[Gt]()>0&&(G(K)&&(K=1),j&&(K=Ze(K),J=2),Te([E],0,!1,K,J||0))};function Dt(){return!a&&u<t}function ht(){var E=b;return b=[],E}function F(E,K,J){var de=!1;return E&&E[Ue]>0&&!a&&v[K]&&_&&(de=K!==0||Dt()&&(J>0||c[zf]())),de}function ne(E){var K={};return E&&V(E,function(J,de){K[de]={iKey:J[Gn](),evts:J[yo]()}}),K}function Te(E,K,J,de,xe){if(!(!E||E[Ue]===0)){if(a){Er(E,1,de);return}de=Ze(de);try{var Me=E,fe=de!==0;Bt(m,function(){return"HttpManager:_sendBatches"},function(p){p&&(E=E.slice(0));for(var h=[],x=null,O=Pn(),Y=v[de]||(fe?v[1]:v[0]),z=Y&&Y[mg],te=re&&(j||vt(de)||z===3||Y._isSync&&z===2);F(E,de,K);){var De=E.shift();De&&De[Gt]()>0&&(s.isTenantKilled(De[Gn]())?h[gr](De):(x=x||_[fg](K,J,fe,te,xe,de),_.appendPayload(x,De,e)?x.overflow!==null&&(E=[x.overflow][ho](E),x.overflow=null,ze(x,O,Pn(),xe),O=Pn(),x=null):(ze(x,O,Pn(),xe),O=Pn(),E=[De][ho](E),x=null)))}x&&ze(x,O,Pn(),xe),E[Ue]>0&&(b=E[ho](b)),Er(h,8004,de)},function(){return{batches:ne(Me),retryCount:K,isTeardown:J,isSynchronous:fe,sendReason:xe,useSendBeacon:vt(de),sendType:de}},!fe)}catch(p){X(f,2,48,"Unexpected Exception sending batch: "+ue(p))}}}function ce(E,K){var J={url:o,hdrs:{},useHdrs:!1};K?(J[Hc]=Vc(J[Hc],N),J.useHdrs=Lr(J.hdrs)[Ue]>0):me(N,function(p,h){hE[p]?Lu(J,hE[p],h,!1):(J[Hc][p]=h,J[sg]=!0)}),Lu(J,XT,"NO_AUTH",K),Lu(J,Xm,bu,K);var de=ki;V(E.apiKeys,function(p){de[Ue]>0&&(de+=","),de+=p}),Lu(J,eg,de,K),Lu(J,Zm,Kt().toString(),K);var xe=Wr(E);if(Pr(xe)&&(J.url+="&ext.intweb.msfpc="+xe),c[ng]()&&Lu(J,Qm,c[ig](),K),m[wu]){var Me=m[wu]();Me>=0&&(J.url+="&w="+Me)}for(var fe=0;fe<y[Ue];fe++)J.url+="&"+y[fe].name+"="+y[fe].value;return J}function Ee(E,K,J){E[K]=E[K]||{},E[K][d.identifier]=J}function ze(E,K,J,de){if(E&&E.payloadBlob&&E.payloadBlob[Ue]>0){var xe=!!T,Me=v[E.sendType];!vt(E[Dn])&&E[uE]&&E.sendReason===2&&(Me=v[2]||v[3]||Me);var fe=q;(E.isBeacon||Me[mg]===3)&&(fe=!1);var p=ce(E,fe);fe=fe||p[sg];var h=Pn();Bt(m,function(){return"HttpManager:_doPayloadSend"},function(){for(var x=0;x<E.batches[Ue];x++)for(var O=E[$r][x],Y=O[yo](),z=0;z<Y[Ue];z++){var te=Y[z];if(A){var De=te[ep]=te[ep]||{};Ee(De,"sendEventStart",h),Ee(De,"serializationStart",K),Ee(De,"serializationCompleted",J)}te[mE]>0?te[mE]++:te[mE]=1}Er(E[$r],1e3+(de||0),E[Dn],!0);var Ge={data:E[cE],urlString:p.url,headers:p[Hc],_thePayload:E,_sendReason:de,timeout:oe,disableXhrSync:$,disableFetchKeepAlive:W};fe&&(xg(Ge[Li],Bf)||(Ge[Li][Bf]=JT),xg(Ge[Li],Pu)||(Ge[Li][Pu]=Jm));var Ce=null;Me&&(Ce=function(dn){c[rg]();var Ko=function(zi,uv){it(zi,uv,E,de)},fn=E[gg]||E[hg];try{Me.sendPOST(dn,Ko,fn),R&&R(Ge,dn,fn,E[uE])}catch(zi){sn(f,"Unexpected exception sending payload. Ex:"+ue(zi)),ur(Ko,0,{})}}),Bt(m,function(){return"HttpManager:_doPayloadSend.sender"},function(){if(Ce)if(E[Dn]===0&&u++,xe&&!E.isBeacon&&Me[mg]!==3){var dn={data:Ge[Au],urlString:Ge[lE],headers:Vc({},Ge[Li]),timeout:Ge[OI],disableXhrSync:Ge[nE],disableFetchKeepAlive:Ge[iE]},Ko=!1;Bt(m,function(){return"HttpManager:_doPayloadSend.sendHook"},function(){try{T(dn,function(fn){Ko=!0,!S&&!fn[Iu]&&(fn[Iu]=fn[Iu]||Ge[Iu],fn[yg]=fn[yg]||Ge[yg]),Ce(fn)},E.isSync||E[gg])}catch{Ko||Ce(Ge)}})}else Ce(Ge)})},function(){return{thePayload:E,serializationStart:K,serializationCompleted:J,sendReason:de}},E[hg])}E.sizeExceed&&E.sizeExceed[Ue]>0&&Er(E.sizeExceed,8003,E[Dn]),E.failedEvts&&E.failedEvts[Ue]>0&&Er(E.failedEvts,8002,E[Dn])}function Be(E,K){A&&V(E,function(J){var de=J[ep]=J[ep]||{};Ee(de,"sendEventCompleted",K)})}function it(E,K,J,de){var xe=9e3,Me=null,fe=!1,p=!1;try{var h=!0;if(typeof E!==$i){if(K){c[$f](K[bI]);var x=K[CI]||K["kill-duration-seconds"];V(s[Sg](K[EI],x),function(Y){V(J[$r],function(z){if(z[Gn]()===Y){Me=Me||[];var te=z[So](0);J.numEvents-=te[Gt](),Me[gr](te)}})})}if(E==200||E==204){xe=200;return}(!GI(E)||J.numEvents<=0)&&(h=!1),xe=9e3+E%1e3}if(h){xe=100;var O=J.retryCnt;J[Dn]===0&&(O<n?(fe=!0,Gr(function(){J[Dn]===0&&u--,Te(J[$r],O+1,J[gg],j?2:J[Dn],5)},j,Cg(O))):(p=!0,j&&(xe=8001)))}}finally{fe||(c[$f](),It(J,xe,de,p)),Er(Me,8004,J[Dn])}}function It(E,K,J,de){try{de&&d[_g]();var xe=E[$r];K===200&&(xe=E.sentEvts||E[$r],!de&&!E[hg]&&d._clearBackOff(),Vt(xe)),Er(xe,K,E[Dn],!0)}finally{E[Dn]===0&&(u--,J!==5&&M.sendQueuedRequests(E[Dn],J))}}function Vt(E){if(A){var K=Pn();V(E,function(J){J&&J[Gt]()>0&&Be(J[yo](),K)})}}function Gr(E,K,J){K?E():g.set(E,J)}function Wr(E){for(var K=0;K<E.batches[Ue];K++){var J=E[$r][K].Msfpc();if(J)return encodeURIComponent(J)}return ki}function Zn(E){var K=B;try{for(var J=0;J<K[Ue];J++)try{K[J](E)}catch(xe){X(f,1,519,"Response handler failed: "+xe)}if(E){var de=JSON.parse(E);Pr(de.webResult)&&Pr(de.webResult[Du])&&k.set("MSFPC",de.webResult[Du],365*86400)}}catch{}}function Er(E,K,J,de){if(E&&E[Ue]>0&&i){var xe=i[qo(K)];if(xe){var Me=J!==0;Bt(m,function(){return"HttpManager:_sendBatchesNotification"},function(){Gr(function(){try{xe.call(i,E,K,Me,J)}catch(fe){X(f,1,74,"send request notification failed: "+fe)}},de||Me,0)},function(){return{batches:ne(E),reason:K,isSync:Me,sendSync:de,sendType:J}},!Me)}}}function qo(E){var K=T1[E];return Pr(K)||(K=TI,E>=9e3&&E<=9999?K=_I:E>=8e3&&E<=8999?K=$m:E>=1e3&&E<=1999&&(K=SI)),K}})}return r.__ieDyn=1,r})()});function N1(r){return r&&r.sendPOST}var b1,eN,x1,nN,iN,P1,tN,D1,yE,$c,rN,or,I1,oN,sN=C(()=>{hn();br();jc();xc();Ne();zT();Eg();ZI();Wf();pE();vE();Ou();b1=.25,eN=500,x1=20,nN=6,iN=2,P1=4,tN=2,D1=1,yE=1e4,$c="eventsDiscarded",rN="",or=void 0,I1=Ci({eventsLimitInMem:{isVal:da,v:yE},immediateEventLimit:{isVal:da,v:500},autoFlushEventsLimit:{isVal:da,v:0},disableAutoBatchFlushLimit:!1,httpXHROverride:{isVal:N1,v:or},overrideInstrumentationKey:or,overrideEndpointUrl:or,disableTelemetry:!1,ignoreMc1Ms0CookieProcessing:!1,setTimeoutOverride:or,clearTimeoutOverride:or,payloadPreprocessor:or,payloadListener:or,disableEventTimings:or,valueSanitizer:or,stringifyObjects:or,enableCompoundKey:or,disableOptimizeObj:!1,fetchCredentials:or,transports:or,unloadTransports:or,useSendBeacon:or,disableFetchKeepAlive:or,avoidOptions:!1,xhrTimeout:or,disableXhrSync:or,alwaysUseXhrOverride:!1,maxEventRetryAttempts:{isVal:Or,v:nN},maxUnloadEventRetryAttempts:{isVal:Or,v:iN},addNoResponse:or,excludeCsMetaData:or});oN=(function(r){gn(e,r);function e(){var t=r.call(this)||this;t.identifier="PostChannel",t.priority=1011,t.version="4.3.4";var n,i=!1,o=[],s,a=!1,c=0,l,u=0,d,f={},v=qc,m,S,y,N,b,_,A,k,j,q,oe,$,W,re,Q,ie,T,R,B,P,g,D;return qe(e,t,function(I,Z){Ze(),I._getDbgPlgTargets=function(){return[b,n]},I[Bc]=function(p,h,x){Bt(h,function(){return"PostChannel:initialize"},function(){Z[Bc](p,h,x),B=h.getNotifyMgr();try{Q=Bn(Ur(I[tp]),h.evtNamespace&&h.evtNamespace()),I._addHook(ir(p,function(O){var Y=O.cfg,z=an(null,Y,h);n=z.getExtCfg(I[tp],I1),ie=ku(n[ag],n[cg]),oe=!n[kI]&&Bm(),T=n[LI],w(h),d=n[dE],l=n.immediateEventLimit,A=n[fE],W=n.maxEventRetryAttempts,re=n.maxUnloadEventRetryAttempts,R=n[FI],nn(Y.endpointUrl)?I.pause():a&&I[Ru](),fe(),g=n[MI],D=!!n[UI],P&&M();var te=Y.disablePageUnloadEvents||[];P=Uf(ft,te,Q),P=Tu(ft,te,Q)||P,P=Eu(pt,Y.disablePageShowEvents,Q)||P})),b[Bc](p,I.core,I)}catch(O){throw I.setInitialized(!1),O}},function(){return{theConfig:p,core:h,extensions:x}})},I.processTelemetry=function(p,h){Hf(p,I[tp]),h=h||I._getTelCtx(h);var x=p;!D&&!i&&(g&&(x[Gn]=g),Rr(x,!0),$?F(2,2):vt()),I.processNext(x,h)},I.getOfflineSupport=function(){try{var p=b&&b[dg]();if(b)return{getUrl:function(){return p?p.url:null},serialize:Ye,batch:Oe,shouldProcess:function(h){return!D},createPayload:function(h){return null},createOneDSPayload:function(h){if(b[Jf])return b[Jf](h,oe)}}}catch{}return null},I._doTeardown=function(p,h){F(2,2),i=!0,b.teardown(),M(),Ze()};function M(){Yf(null,Q),Vf(null,Q),jf(null,Q)}function w(p){var h=p[wu];p[wu]=function(){var x=0;return T&&(x=x|2),x|h.call(p)}}function Oe(p){var h=rN;return p&&p[Ue]&&V(p,function(x){h&&(h+=`
`),h+=x}),h}function Ye(p){var h=rN;try{Zt(p),h=b[ug](p)}catch{}return h}function ft(p){var h=p||rr().event;h.type!=="beforeunload"&&($=!0,b[Zf]($)),F(2,2)}function pt(p){$=!1,b[Zf]($)}function Zt(p){p.ext&&p.ext[eE]&&delete p.ext[eE],p.ext&&p.ext[tg]&&p.ext[tg].id&&delete p.ext[tg].id,oe&&(p.ext=bn(p.ext),p[Tg]&&(p[Tg]=bn(p[Tg])),p[Au]&&(p[Au]=bn(p[Au])))}function Rr(p,h){if(p[rp]||(p[rp]=0),p[fa]||(p[fa]=1),Zt(p),p[Gc]){if(y||a)p[fa]=3,p[Gc]=!1;else if(b){oe&&(p=bn(p)),b[vg](pa.create(p[Gn],[p]),p[Gc]===!0?1:p[Gc],3);return}}var x=p[fa],O=u,Y=d;x===4&&(O=c,Y=l);var z=!1;if(O<Y)z=!Ee(p,h);else{var te=1,De=x1;x===4&&(te=4,De=1),z=!0,ze(p[Gn],p[fa],te,De)&&(z=!Ee(p,h))}z&&qo($c,[p],xi.QueueFull)}I.setEventQueueLimits=function(p,h){n[dE]=d=da(p)?p:yE,n[fE]=A=da(h)?h:0,fe();var x=u>p;if(!x&&k>0)for(var O=1;!x&&O<=3;O++){var Y=_[O];Y&&Y[$r]&&V(Y[$r],function(z){z&&z[Gt]()>=k&&(x=!0)})}ce(!0,x)},I.pause=function(){ht(),a=!0,b&&b.pause()},I[Ru]=function(){a=!1,b&&b[Ru](),vt()},I._loadTransmitProfiles=function(p){Gr(),me(p,function(h,x){var O=x[Ue];if(O>=2){var Y=O>2?x[2]:0;if(x[Kc](0,O-2),x[1]<0&&(x[0]=-1),x[1]>0&&x[0]>0){var z=x[0]/x[1];x[0]=Math.ceil(z)*x[1]}Y>=0&&x[1]>=0&&Y>x[1]&&(Y=x[1]),x[gr](Y),f[h]=x}})},I.flush=function(p,h,x){p===void 0&&(p=!0);var O;if(!a)if(x=x||1,p)h||(O=ni(function(z){h=z})),s==null?(ht(),it(1,0,x),s=Dt(function(){s=null,It(h,x)},0)):o[gr](h);else{var Y=ht();ur(1,1,x),h&&h(),Y&&vt()}return O},I.setMsaAuthTicket=function(p){b[Xf](Gf,p)},I.setAuthPluginHeader=function(p){b[Xf](QT,p)},I.removeAuthPluginHeader=function(){b.removeHeader(QT)},I.hasEvents=rn,I._setTransmitProfile=function(p){v!==p&&f[p]!==void 0&&(ht(),v=p,vt())},Hn(I,function(){return b},["addResponseHandler"]);function ur(p,h,x){var O=it(p,h,x);return b[Nu](h,x),O}function rn(){return u>0}function vt(){if(j>=0&&it(j,0,q)&&b[Nu](0,q),c>0&&!S&&!a){var p=f[v][2];p>=0&&(S=Dt(function(){S=null,ur(4,0,1),vt()},p))}var h=f[v][1];!m&&!s&&h>=0&&!a&&(rn()?m=Dt(function(){m=null,ur(N===0?3:1,0,1),N++,N%=2,vt()},h):N=0)}I[_g]=function(){y<P1&&(y++,ht(),vt())},I._clearBackOff=function(){y&&(y=0,ht(),vt())};function Ze(){n=null,i=!1,o=[],s=null,a=!1,c=0,l=500,u=0,d=yE,f={},v=qc,m=null,S=null,y=0,N=0,_={},A=0,P=!1,k=0,j=-1,q=null,oe=!0,$=!1,W=nN,re=iN,Q=null,g=null,D=!1,ie=ku(),b=new QI(eN,tN,D1,{requeue:Zn,send:K,sent:J,drop:de,rspFail:xe,oth:Me}),Wr(),ne(),fe()}function Dt(p,h){h===0&&y&&(h=1);var x=1e3;return y&&(x=Cg(y-1)),ie.set(p,h*x)}function ht(){return m!==null?(m.cancel(),m=null,N=0,!0):!1}function F(p,h){ht(),s&&(s.cancel(),s=null),a||ur(1,p,h)}function ne(){_[4]={batches:[],iKeyMap:{}},_[3]={batches:[],iKeyMap:{}},_[2]={batches:[],iKeyMap:{}},_[1]={batches:[],iKeyMap:{}}}function Te(p,h,x){var O=_[h];O||(h=1,O=_[h]);var Y=O.iKeyMap[p];return!Y&&x&&(Y=pa.create(p),O.batches[gr](Y),O.iKeyMap[p]=Y),Y}function ce(p,h){b[Qf]()&&!y&&(A>0&&u>A&&(h=!0),h&&s==null&&I.flush(p,function(){},20))}function Ee(p,h){oe&&(p=bn(p));var x=p[fa],O=Te(p[Gn],x,!0);return O.addEvent(p)?(x!==4?(u++,h&&p[rp]===0&&ce(!p.sync,k>0&&O[Gt]()>=k)):c++,!0):!1}function ze(p,h,x,O){for(;x<=h;){var Y=Te(p,h,!0);if(Y&&Y[Gt]()>0){var z=Y[So](0,O),te=z[Gt]();if(te>0)return x===4?c-=te:u-=te,E($c,[z],xi.QueueFull),!0}x++}return Be(),!1}function Be(){for(var p=0,h=0,x=function(Y){var z=_[Y];z&&z[$r]&&V(z[$r],function(te){Y===4?p+=te[Gt]():h+=te[Gt]()})},O=1;O<=4;O++)x(O);u=h,c=p}function it(p,h,x){var O=!1,Y=h===0;return!Y||b[Qf]()?Bt(I.core,function(){return"PostChannel._queueBatches"},function(){for(var z=[],te=4;te>=p;){var De=_[te];De&&De.batches&&De.batches[Ue]>0&&(V(De[$r],function(Ge){b.addBatch(Ge)?O=O||Ge&&Ge[Gt]()>0:z=z[ho](Ge[yo]()),te===4?c-=Ge[Gt]():u-=Ge[Gt]()}),De[$r]=[],De.iKeyMap={}),te--}z[Ue]>0&&qo($c,z,xi.KillSwitch),O&&j>=p&&(j=-1,q=0)},function(){return{latency:p,sendType:h,sendReason:x}},!Y):(j=j>=0?Math.min(j,p):p,q=Math.max(q,x)),O}function It(p,h){ur(1,0,h),Be(),Vt(function(){p&&p(),o[Ue]>0?s=Dt(function(){s=null,It(o.shift(),h)},0):(s=null,vt())})}function Vt(p){b[pg]()?p():s=Dt(function(){s=null,Vt(p)},b1)}function Gr(){ht(),Wr(),v=qc,vt()}function Wr(){f={},f[qc]=[2,1,0],f[Wm]=[6,3,0],f[zm]=[18,9,0]}function Zn(p,h){var x=[],O=W;$&&(O=re),V(p,function(Y){Y&&Y[Gt]()>0&&V(Y[yo](),function(z){z&&(z[Gc]&&(z[fa]=4,z[Gc]=!1),z[rp]<O?(Hf(z,I[tp]),Rr(z,!1)):x[gr](z))})}),x[Ue]>0&&qo($c,x,xi.NonRetryableStatus),$&&F(2,2)}function Er(p,h){var x=B||{},O=x[p];if(O)try{O.apply(x,h)}catch(Y){X(I.diagLog(),1,74,p+" notification failed: "+Y)}}function qo(p,h){for(var x=[],O=2;O<arguments.length;O++)x[O-2]=arguments[O];h&&h[Ue]>0&&Er(p,[h][ho](x))}function E(p,h){for(var x=[],O=2;O<arguments.length;O++)x[O-2]=arguments[O];h&&h[Ue]>0&&V(h,function(Y){Y&&Y[Gt]()>0&&Er(p,[Y.events()][ho](x))})}function K(p,h,x){p&&p[Ue]>0&&Er("eventsSendRequest",[h>=1e3&&h<=1999?h-1e3:0,x!==!0])}function J(p,h){E("eventsSent",p,h),vt()}function de(p,h){E($c,p,h>=8e3&&h<=8999?h-8e3:xi.Unknown)}function xe(p){E($c,p,xi.NonRetryableStatus),vt()}function Me(p,h){E($c,p,xi.Unknown),vt()}function fe(){R?k=0:k=Math.max(eN*(tN+1),d/6)}}),t}return e.__ieDyn=1,e})(ls)});var aN={};Ke(aN,{BE_PROFILE:()=>zm,NRT_PROFILE:()=>Wm,PostChannel:()=>oN,RT_PROFILE:()=>qc});var cN=C(()=>{zT();sN()});var uN=le(_o=>{"use strict";var R1=_o&&_o.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),w1=_o&&_o.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),lN=_o&&_o.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&R1(e,r,t);return w1(e,r),e};Object.defineProperty(_o,"__esModule",{value:!0});_o.oneDataSystemClientFactory=void 0;var A1=async(r,e,t)=>{let n=await Promise.resolve().then(()=>lN((jc(),Yd(yI)))),i=await Promise.resolve().then(()=>lN((cN(),Yd(aN)))),o=new n.AppInsightsCore,s=new i.PostChannel,a={instrumentationKey:r,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[s]]};if(t){a.extensionConfig={};let u={alwaysUseXhrOverride:!0,httpXHROverride:t};a.extensionConfig[s.identifier]=u}let l=e.workspace.getConfiguration("telemetry").get("internalTesting");return o.initialize(a,[]),o.addTelemetryInitializer(u=>{u.ext=u.ext??{},u.ext.web=u.ext.web??{},u.ext.web.consentDetails='{"GPC_DataSharingOptIn":false}',l&&(u.ext.utc=u.ext.utc??{},u.ext.utc.flags=8462029)}),o},O1=async(r,e,t)=>{let n=await A1(r,e,t);return{logEvent:(s,a)=>{try{n?.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(!n){a();return}n.flush(!0,l=>{if(!l){c("Failed to flush app 1DS!");return}})})}catch(s){throw new Error(`Failed to flush 1DS!
`+s.message)}},dispose:async()=>new Promise(a=>{if(!n){a();return}n.unload(!1,()=>{a(),n=void 0},1e3)})}};_o.oneDataSystemClientFactory=O1});var dN,Fu,Mu,np,va,Fi,hr,Pg,ai=C(()=>{dN="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Fu="sampleRate",Mu="ProcessLegacy",np="http.method",va="https://dc.services.visualstudio.com",Fi="/v2/track",hr="not_specified",Pg="iKey"});var Jc,SE=C(()=>{st();Jc=y_({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 vs,we,To,ma,ms,gs,Dg,sr,Mi,ga,Ig,Ng,Rg,_E,wg,Ag,Xc,Uu,TE,ip,Qc,ci,Yr,Jr,Zc,Eo,el,Og,kg,EE,tl,ha,op,sp,rl,Yu,nl,CE,yr=C(()=>{vs="split",we="length",To="toLowerCase",ma="ingestionendpoint",ms="toString",gs="push",Dg="removeItem",sr="name",Mi="message",ga="count",Ig="preTriggerDate",Ng="disabled",Rg="interval",_E="daysOfMonth",wg="date",Ag="getUTCDate",Xc="stringify",Uu="pathname",TE="correlationHeaderExcludePatterns",ip="extensionConfig",Qc="exceptions",ci="parsedStack",Yr="properties",Jr="measurements",Zc="sizeInBytes",Eo="typeName",el="severityLevel",Og="problemGroup",kg="isManual",EE="CreateFromInterface",tl="assembly",ha="fileName",op="hasFullStack",sp="level",rl="method",Yu="line",nl="duration",CE="receivedResponse"});function Lg(r,e,t){var n=e[we],i=bE(r,e);if(i[we]!==n){for(var o=0,s=i;t[s]!==void 0;)o++,s=pr(i,0,147)+xE(o);i=s}return i}function bE(r,e){var t;return e&&(e=tt(dr(e)),e[we]>150&&(t=pr(e,0,150),X(r,2,57,"name is too long.  It has been truncated to 150 characters.",{name:e},!0))),t||e}function lt(r,e,t){t===void 0&&(t=1024);var n;return e&&(t=t||1024,e=tt(dr(e)),e[we]>t&&(n=pr(e,0,t),X(r,2,61,"string value is too long. It has been truncated to "+t+" characters.",{value:e},!0))),n||e}function ya(r,e){return Ug(r,e,2048,66)}function Vu(r,e){var t;return e&&e[we]>32768&&(t=pr(e,0,32768),X(r,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),t||e}function Fg(r,e){var t;if(e){var n=""+e;n[we]>32768&&(t=pr(n,0,32768),X(r,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return t||e}function Xr(r,e){if(e){var t={};me(e,function(n,i){if(Lt(i)&&so())try{i=Mr()[Xc](i)}catch(o){X(r,2,49,"custom property is not valid",{exception:o},!0)}i=lt(r,i,8192),n=Lg(r,n,t),t[n]=i}),e=t}return e}function Qr(r,e){if(e){var t={};me(e,function(n,i){n=Lg(r,n,t),t[n]=i}),e=t}return e}function Mg(r,e){return e&&Ug(r,e,128,69)[ms]()}function Ug(r,e,t,n){var i;return e&&(e=tt(dr(e)),e[we]>t&&(i=pr(e,0,t),X(r,2,n,"input is too long, it has been truncated to "+t+" characters.",{data:e},!0))),i||e}function xE(r){var e="00"+r;return Qi(e,e[we]-3)}var li=C(()=>{st();Ne();yr()});function il(r){var e=pN,t=k1,n=t[e];return fN.createElement?t[e]||(n=t[e]=fN.createElement("a")):n={host:PE(r,!0)},n.href=r,e++,e>=t[we]&&(e=0),pN=e,n}function vN(r){var e,t=il(r);return t&&(e=t.href),e}function mN(r){var e,t=il(r);return t&&(e=t[Uu]),e}function gN(r,e){return r?r.toUpperCase()+" "+e:e}function PE(r,e){var t=ap(r,e)||"";if(t){var n=t.match(/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[we]>3&&Ie(n[2])&&n[2][we]>0)return n[2]+(n[3]||"")}return t}function ap(r,e){var t=null;if(r){var n=r.match(/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[we]>2&&Ie(n[2])&&n[2][we]>0&&(t=n[2]||"",e&&n[we]>2)){var i=(n[1]||"")[To](),o=n[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),t+=o}}return t}var fN,pN,k1,DE=C(()=>{st();yr();fN=qt()||{},pN=0,k1=[null,null,null,null,null]});function cp(r){return Je(L1,r[To]())!==-1}function hN(r){IE=r}function yN(){return IE}function SN(r,e,t){if(!e||r&&r.disableCorrelationHeaders)return!1;if(r&&r[TE]){for(var n=0;n<r.correlationHeaderExcludePatterns[we];n++)if(r[TE][n].test(e))return!1}var i=il(e).host[To]();if(i&&(mn(i,":443")!==-1||mn(i,":80")!==-1)&&(i=(ap(e,!0)||"")[To]()),(!r||!r.enableCorsCorrelation)&&i&&i!==t)return!1;var o=r&&r.correlationHeaderDomains;if(o){var s;if(V(o,function(l){var u=new RegExp(l.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||u.test(i)}),!s)return!1}var a=r&&r.correlationHeaderExcludedDomains;if(!a||a[we]===0)return!0;for(var n=0;n<a[we];n++){var c=new RegExp(a[n].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[we]>0}function _N(r){if(r){var e=NE(r,Jc[1]);if(e&&e!==IE)return e}}function NE(r,e){if(r)for(var t=r[vs](","),n=0;n<t[we];++n){var i=t[n][vs]("=");if(i[we]===2&&i[0]===e)return i[1]}}function TN(r,e,t,n){var i,o=n,s=n;if(e&&e[we]>0){var a=il(e);if(i=a.host,!o)if(a[Uu]!=null){var c=a.pathname[we]===0?"/":a[Uu];c.charAt(0)!=="/"&&(c="/"+c),s=a[Uu],o=lt(r,t?t+" "+c:c)}else o=lt(r,e)}else i=n,o=n;return{target:i,name:o,data:s}}function EN(){var r=js();if(r&&r.now&&r.timing){var e=r.now()+r.timing.navigationStart;if(e>0)return e}return Kt()}function CN(r,e){var t=null;return r!==0&&e!==0&&!G(r)&&!G(e)&&(t=e-r),t}function bN(r,e){var t=r||{};return{getName:function(){return t[sr]},setName:function(n){e&&e.setName(n),t[sr]=n},getTraceId:function(){return t.traceID},setTraceId:function(n){e&&e.setTraceId(n),lo(n)&&(t.traceID=n)},getSpanId:function(){return t.parentID},setSpanId:function(n){e&&e.setSpanId(n),uo(n)&&(t.parentID=n)},getTraceFlags:function(){return t.traceFlags},setTraceFlags:function(n){e&&e.setTraceFlags(n),t.traceFlags=n}}}var L1,IE,RE=C(()=>{st();Ne();ai();SE();li();DE();yr();L1=[va+Fi,"https://breeze.aimon.applicationinsights.io"+Fi,"https://dc-int.services.visualstudio.com"+Fi],IE="cid-v1:"});var ju,xN,PN,wE=C(()=>{st();ju=Ht({LocalStorage:0,SessionStorage:1}),xN=Ht({AI:0,AI_AND_W3C:1,W3C:2}),PN=Ht({Normal:1,Critical:2})});function AE(){return qu()?Yg(ju.LocalStorage):null}function Yg(r){try{if(G(on()))return null;var e=new Date()[ms](),t=et(r===ju.LocalStorage?"localStorage":"sessionStorage"),n=DN+e;t.setItem(n,e);var i=t.getItem(n)!==e;if(t[Dg](n),!i)return t}catch{}return null}function OE(){return ol()?Yg(ju.SessionStorage):null}function IN(){Sa=!1,_a=!1}function Vg(r){DN=r||""}function NN(){Sa=qu(!0),_a=ol(!0)}function qu(r){return(r||Sa===void 0)&&(Sa=!!Yg(ju.LocalStorage)),Sa}function jg(r,e){var t=AE();if(t!==null)try{return t.getItem(e)}catch(n){Sa=!1,X(r,2,1,"Browser failed read of local storage. "+yt(n),{exception:ue(n)})}return null}function qg(r,e,t){var n=AE();if(n!==null)try{return n.setItem(e,t),!0}catch(i){Sa=!1,X(r,2,3,"Browser failed write to local storage. "+yt(i),{exception:ue(i)})}return!1}function RN(r,e){var t=AE();if(t!==null)try{return t[Dg](e),!0}catch(n){Sa=!1,X(r,2,5,"Browser failed removal of local storage item. "+yt(n),{exception:ue(n)})}return!1}function ol(r){return(r||_a===void 0)&&(_a=!!Yg(ju.SessionStorage)),_a}function wN(){var r=[];return ol()&&me(et("sessionStorage"),function(e){r[gs](e)}),r}function Kg(r,e){var t=OE();if(t!==null)try{return t.getItem(e)}catch(n){_a=!1,X(r,2,2,"Browser failed read of session storage. "+yt(n),{exception:ue(n)})}return null}function Hg(r,e,t){var n=OE();if(n!==null)try{return n.setItem(e,t),!0}catch(i){_a=!1,X(r,2,4,"Browser failed write to session storage. "+yt(i),{exception:ue(i)})}return!1}function Bg(r,e){var t=OE();if(t!==null)try{return t[Dg](e),!0}catch(n){_a=!1,X(r,2,6,"Browser failed removal of session storage item. "+yt(n),{exception:ue(n)})}return!1}var Sa,_a,DN,kE=C(()=>{st();wE();yr();Sa=void 0,_a=void 0,DN=""});var F1,AN,ON=C(()=>{st();Ne();kE();yr();F1="appInsightsThrottle",AN=(function(){function r(e,t){var n=this,i,o,s,a,c,l,u,d=!1,f=!1;m(),n._getDbgPlgTargets=function(){return[u]},n.getConfig=function(){return s},n.canThrottle=function(T){var R=re(T),B=S(T);return b(B,i,R)},n.isTriggered=function(T){return Q(T)},n.isReady=function(){return d},n.flush=function(T){try{var R=ie(T);if(R&&R[we]>0){var B=R.slice(0);return u[T]=[],V(B,function(P){v(P.msgID,P[Mi],P.severity,!1)}),!0}}catch{}return!1},n.flushAll=function(){try{if(u){var T=!0;return me(u,function(R){var B=n.flush(parseInt(R));T=T&&B}),T}}catch{}return!1},n.onReadyState=function(T,R){return R===void 0&&(R=!0),d=G(T)?!0:T,d&&R?n.flushAll():null},n.sendMessage=function(T,R,B){return v(T,R,B,!0)};function v(T,R,B,P){if(d){var g=W(T);if(!g)return;var D=S(T),I=re(T),Z=b(D,i,I),M=!1,w=0,Oe=Q(T);try{Z&&!Oe?(w=Math.min(D.limit.maxSendNumber,I[ga]+1),I[ga]=0,M=!0,c[T]=!0,I[Ig]=new Date):(c[T]=Z,I[ga]+=1);var Ye=_(T);q(o,Ye,I);for(var ft=0;ft<w;ft++)$(T,o,R,B)}catch{}return{isThrottled:M,throttleNum:w}}else if(P){var pt=ie(T);pt[gs]({msgID:T,message:R,severity:B})}return null}function m(){o=Ai(e),c={},a={},u={},s={},y(109),l=ii(t)?t:"",e.addUnloadHook(ir(e.config,function(T){var R=T.cfg;i=qu();var B=R.throttleMgrCfg||{};me(B,function(P,g){y(parseInt(P),g)})}))}function S(T){return s[T]||s[109]}function y(T,R){var B,P;try{var g=R||{},D={};D[Ng]=!!g[Ng];var I=g[Rg]||{};f=I?.daysOfMonth&&I?.daysOfMonth[we]>0,D[Rg]=N(I);var Z={samplingRate:((B=g.limit)===null||B===void 0?void 0:B.samplingRate)||100,maxSendNumber:((P=g.limit)===null||P===void 0?void 0:P.maxSendNumber)||1};D.limit=Z,s[T]=D}catch{}}function N(T){T=T||{};var R=T?.monthInterval,B=T?.dayInterval;return G(R)&&G(B)&&(T.monthInterval=3,f||(T[_E]=[28],f=!0)),T={monthInterval:T?.monthInterval,dayInterval:T?.dayInterval,daysOfMonth:T?.daysOfMonth},T}function b(T,R,B){if(T&&!T[Ng]&&R&&ii(B)){var P=j(),g=B[wg],D=T[Rg],I=1;if(D?.monthInterval){var Z=(P.getUTCFullYear()-g.getUTCFullYear())*12+P.getUTCMonth()-g.getUTCMonth();I=oe(D.monthInterval,0,Z)}var M=1;if(f)M=Je(D[_E],P[Ag]());else if(D?.dayInterval){var w=Math.floor((P.getTime()-g.getTime())/864e5);M=oe(D.dayInterval,0,w)}return I>=0&&M>=0}return!1}function _(T,R){var B=ii(R)?R:"";return T?F1+B+"-"+T:null}function A(T){try{if(T){var R=new Date;return T.getUTCFullYear()===R.getUTCFullYear()&&T.getUTCMonth()===R.getUTCMonth()&&T[Ag]()===R[Ag]()}}catch{}return!1}function k(T,R,B){try{var P={date:j(),count:0};if(T){var g=JSON.parse(T),D={date:j(g[wg])||P[wg],count:g[ga]||P[ga],preTriggerDate:g.preTriggerDate?j(g[Ig]):void 0};return D}else return q(R,B,P),P}catch{}return null}function j(T){try{if(T){var R=new Date(T);if(!isNaN(R.getDate()))return R}else return new Date}catch{}return null}function q(T,R,B){try{return qg(T,R,tt(JSON[Xc](B)))}catch{}return!1}function oe(T,R,B){return T<=0?1:B>=R&&(B-R)%T==0?Math.floor((B-R)/T)+1:-1}function $(T,R,B,P){X(R,P||1,T,B)}function W(T){try{var R=S(T);return mf(1e6)<=R.limit.samplingRate}catch{}return!1}function re(T){try{var R=a[T];if(!R){var B=_(T,l);R=k(jg(o,B),o,B),a[T]=R}return a[T]}catch{}return null}function Q(T){var R=c[T];if(G(R)){R=!1;var B=re(T);B&&(R=A(B[Ig])),c[T]=R}return c[T]}function ie(T){return u=u||{},G(u[T])&&(u[T]=[]),u[T]}}return r})()});function sl(r){if(!r)return{};var e=r[vs](M1),t=Wd(e,function(i,o){var s=o[vs](U1);if(s[we]===2){var a=s[0][To](),c=s[1];i[a]=c}return i},{});if(Lr(t)[we]>0){if(t.endpointsuffix){var n=t.location?t.location+".":"";t[ma]=t[ma]||"https://"+n+"dc."+t.endpointsuffix}t[ma]=t[ma]||va,mc(t[ma],"/")&&(t[ma]=t[ma].slice(0,-1))}return t}var M1,U1,kN,LN=C(()=>{st();ai();yr();M1=";",U1="=";kN={parse:sl}});var Gg,FN=C(()=>{st();ai();yr();li();Gg=(function(){function r(e,t,n){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[sr]=lt(e,n)||hr,o.data=t,o.time=Kn(new Date),o.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return r})()});var Co,MN=C(()=>{ai();yr();li();Co=(function(){function r(e,t,n,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[sr]=lt(e,t)||hr,o[Yr]=Xr(e,n),o[Jr]=Qr(e,i)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Event",r.dataType="EventData",r})()});function UE(r,e){var t=r;return t&&!Ie(t)&&(JSON&&JSON[Xc]?(t=JSON[Xc](r),e&&(!t||t==="{}")&&(Pe(r[ms])?t=r[ms]():t=""+r)):t=""+r+" - (Missing JSON.stringify)"),t||""}function qN(r,e){var t=r;return r&&(t&&!Ie(t)&&(t=r[ME]||r[jN]||t),t&&!Ie(t)&&(t=UE(t,!0)),r.filename&&(t=t+" @"+(r.filename||"")+":"+(r.lineno||"?")+":"+(r.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&mn(t||"",e)===-1&&(t=e+": "+t),t||""}function V1(r){try{if(Lt(r))return"hasFullStack"in r&&"typeName"in r}catch{}return!1}function j1(r){try{if(Lt(r))return"ver"in r&&"exceptions"in r&&"properties"in r}catch{}return!1}function YN(r){return r&&r.src&&Ie(r.src)&&r.obj&&pe(r.obj)}function al(r){var e=r||"";Ie(e)||(Ie(e[In])?e=e[In]:e=""+e);var t=e[vs](`
`);return{src:e,obj:t}}function q1(r){for(var e=[],t=r[vs](`
`),n=0;n<t[we];n++){var i=t[n];t[n+1]&&(i+="@"+t[n+1],n++),e[gs](i)}return{src:r,obj:e}}function KN(r){var e=null;if(r)try{if(r[In])e=al(r[In]);else if(r[Ku]&&r[Ku][In])e=al(r[Ku][In]);else if(r.exception&&r.exception[In])e=al(r.exception[In]);else if(YN(r))e=r;else if(YN(r[FE]))e=r[FE];else if(rr()&&rr().opera&&r[ME])e=q1(r[Mi]);else if(r.reason&&r.reason[In])e=al(r.reason[In]);else if(Ie(r))e=al(r);else{var t=r[ME]||r[jN]||"";Ie(r[UN])&&(t&&(t+=`
`),t+=" from "+r[UN]),t&&(e=al(t))}}catch(n){e=al(n)}return e||{src:"",obj:null}}function K1(r){var e="";return r&&(r.obj?V(r.obj,function(t){e+=t+`
`}):e=r.src||""),e}function H1(r){var e,t=r.obj;if(t&&t[we]>0){e=[];var n=0,i=0;V(t,function(m){var S=m[ms]();if(YE.regex.test(S)){var y=new YE(S,n++);i+=y[Zc],e[gs](y)}});var o=32*1024;if(i>o)for(var s=0,a=e[we]-1,c=0,l=s,u=a;s<a;){var d=e[s][Zc],f=e[a][Zc];if(c+=d+f,c>o){var v=u-l+1;e.splice(l,v);break}l=s,u=a,s++,a--}}return e}function Wg(r){var e="";if(r&&(e=r.typeName||r[sr]||"",!e))try{var t=/function (.{1,200})\(/,n=t.exec(r.constructor[ms]());e=n&&n[we]>1?n[1]:""}catch{}return e}function LE(r){if(r)try{if(!Ie(r)){var e=Wg(r),t=UE(r,!1);return(!t||t==="{}")&&(r[Ku]&&(r=r[Ku],e=Wg(r)),t=UE(r,!0)),mn(t,e)!==0&&e!=="String"?e+":"+t:t}}catch{}return""+(r||"")}var Y1,Ku,In,FE,UN,ME,jN,Ta,VN,YE,HN=C(()=>{hn();st();Ne();ai();yr();li();Y1="<no_method>",Ku="error",In="stack",FE="stackDetails",UN="errorSrc",ME="message",jN="description";Ta=(function(){function r(e,t,n,i,o,s){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,j1(t)?(a[Qc]=t[Qc]||[],a[Yr]=t[Yr],a[Jr]=t[Jr],t[el]&&(a[el]=t[el]),t.id&&(a.id=t.id,t[Yr].id=t.id),t[Og]&&(a[Og]=t[Og]),G(t[kg])||(a[kg]=t[kg])):(n||(n={}),s&&(n.id=s),a[Qc]=[new VN(e,t,n)],a[Yr]=Xr(e,n),a[Jr]=Qr(e,i),o&&(a[el]=o),s&&(a.id=s))}return r.CreateAutoException=function(e,t,n,i,o,s,a,c){var l,u=Wg(o||s||e);return l={},l[Mi]=qN(e,u),l.url=t,l.lineNumber=n,l.columnNumber=i,l.error=LE(o||s||e),l.evt=LE(s||e),l[Eo]=u,l.stackDetails=KN(a||o||s),l.errorSrc=c,l},r.CreateFromInterface=function(e,t,n,i){var o=t[Qc]&&Wo(t[Qc],function(a){return VN[EE](e,a)}),s=new r(e,ti(ti({},t),{exceptions:o}),n,i);return s},r.prototype.toInterface=function(){var e,t=this,n=t.exceptions,i=t.properties,o=t.measurements,s=t.severityLevel,a=t.problemGroup,c=t.id,l=t.isManual,u=n instanceof Array&&Wo(n,function(d){return d.toInterface()})||void 0;return e={ver:"4.0"},e[Qc]=u,e.severityLevel=s,e.properties=i,e.measurements=o,e.problemGroup=a,e.id=c,e.isManual=l,e},r.CreateSimpleException=function(e,t,n,i,o,s){var a;return{exceptions:[(a={},a[op]=!0,a.message=e,a.stack=o,a.typeName=t,a)]}},r.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",r.dataType="ExceptionData",r.formatError=LE,r})(),VN=(function(){function r(e,t,n){this.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2};var i=this;if(V1(t))i[Eo]=t[Eo],i[Mi]=t[Mi],i[In]=t[In],i[ci]=t[ci]||[],i[op]=t[op];else{var o=t,s=o&&o.evt;fc(o)||(o=o[Ku]||s||o),i[Eo]=lt(e,Wg(o))||hr,i[Mi]=Vu(e,qN(t||o,i[Eo]))||hr;var a=t[FE]||KN(t);i[ci]=H1(a),pe(i[ci])&&Wo(i[ci],function(c){c[tl]=lt(e,c[tl]),c[ha]=lt(e,c[ha])}),i[In]=Fg(e,K1(a)),i.hasFullStack=pe(i.parsedStack)&&i.parsedStack[we]>0,n&&(n[Eo]=n[Eo]||i[Eo])}}return r.prototype.toInterface=function(){var e,t=this,n=t[ci]instanceof Array&&Wo(t[ci],function(o){return o.toInterface()}),i=(e={id:t.id,outerId:t.outerId,typeName:t[Eo],message:t[Mi],hasFullStack:t[op],stack:t[In]},e[ci]=n||void 0,e);return i},r.CreateFromInterface=function(e,t){var n=t[ci]instanceof Array&&Wo(t[ci],function(o){return YE[EE](o)})||t[ci],i=new r(e,ti(ti({},t),{parsedStack:n}));return i},r})(),YE=(function(){function r(e,t){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var n=this;if(n[Zc]=0,typeof e=="string"){var i=e;n[sp]=t,n[rl]=Y1,n[tl]=tt(i),n[ha]="",n[Yu]=0;var o=i.match(r.regex);o&&o[we]>=5&&(n[rl]=tt(o[2])||n[rl],n[ha]=tt(o[4]),n[Yu]=parseInt(o[5])||0)}else n[sp]=e[sp],n[rl]=e[rl],n[tl]=e[tl],n[ha]=e[ha],n[Yu]=e[Yu],n[Zc]=0;n.sizeInBytes+=n.method[we],n.sizeInBytes+=n.fileName[we],n.sizeInBytes+=n.assembly[we],n[Zc]+=r.baseSize,n.sizeInBytes+=n.level.toString()[we],n.sizeInBytes+=n.line.toString()[we]}return r.CreateFromInterface=function(e){return new r(e,null)},r.prototype.toInterface=function(){var e=this;return{level:e[sp],method:e[rl],assembly:e[tl],fileName:e[ha],line:e[Yu]}},r.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,r.baseSize=58,r})()});var BN,GN=C(()=>{BN=(function(){function r(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return r})()});var bo,WN=C(()=>{ai();yr();GN();li();bo=(function(){function r(e,t,n,i,o,s,a,c,l){this.aiDataContract={ver:1,metrics:1,properties:0};var u=this;u.ver=2;var d=new BN;d[ga]=i>0?i:void 0,d.max=isNaN(s)||s===null?void 0:s,d.min=isNaN(o)||o===null?void 0:o,d[sr]=lt(e,t)||hr,d.value=n,d.stdDev=isNaN(a)||a===null?void 0:a,u.metrics=[d],u[Yr]=Xr(e,c),u[Jr]=Qr(e,l)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",r.dataType="MetricData",r})()});function zN(r,e){return e===void 0&&(e=!1),r==null?e:r.toString()[To]()==="true"}function Hu(r){(isNaN(r)||r<0)&&(r=0),r=Math.round(r);var e=lp+r%1e3,t=lp+Math.floor(r/1e3)%60,n=lp+Math.floor(r/(1e3*60))%60,i=lp+Math.floor(r/(1e3*60*60))%24,o=Math.floor(r/(1e3*60*60*24));return e=e[we]===1?"00"+e:e[we]===2?"0"+e:e,t=t[we]<2?"0"+t:t,n=n[we]<2?"0"+n:n,i=i[we]<2?"0"+i:i,(o>0?o+".":lp)+i+":"+n+":"+t+"."+e}function $N(r,e){var t=null;return V(r,function(n){if(n.identifier===e)return t=n,-1}),t}function JN(r,e,t,n,i){return!i&&Ie(r)&&(r==="Script error."||r==="Script error")}var lp,zg=C(()=>{st();yr();lp=""});var Ea,XN=C(()=>{ai();zg();yr();li();Ea=(function(){function r(e,t,n,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=Mg(e,a),c.url=ya(e,n),c[sr]=lt(e,t)||hr,isNaN(i)||(c[nl]=Hu(i)),c[Yr]=Xr(e,o),c[Jr]=Qr(e,s)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",r.dataType="PageviewData",r})()});var Ca,QN=C(()=>{zg();RE();yr();li();Ca=(function(){function r(e,t,n,i,o,s,a,c,l,u,d,f){l===void 0&&(l="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 v=this;v.ver=2,v.id=t,v[nl]=Hu(o),v.success=s,v.resultCode=a+"",v.type=lt(e,l);var m=TN(e,n,c,i);v.data=ya(e,i)||m.data,v.target=lt(e,m.target),u&&(v.target="".concat(v.target," | ").concat(u)),v[sr]=lt(e,m[sr]),v[Yr]=Xr(e,d),v[Jr]=Qr(e,f)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",r.dataType="RemoteDependencyData",r})()});var ba,ZN=C(()=>{ai();yr();li();ba=(function(){function r(e,t,n,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var s=this;s.ver=2,t=t||hr,s[Mi]=Vu(e,t),s[Yr]=Xr(e,i),s[Jr]=Qr(e,o),n&&(s[el]=n)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Message",r.dataType="MessageData",r})()});var xa,eR=C(()=>{ai();yr();li();xa=(function(){function r(e,t,n,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=ya(e,n),c[sr]=lt(e,t)||hr,c[Yr]=Xr(e,o),c[Jr]=Qr(e,s),a&&(c.domProcessing=a.domProcessing,c[nl]=a[nl],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c[CE]=a[CE],c.sentRequest=a.sentRequest)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",r.dataType="PageviewPerformanceData",r})()});var xo,tR=C(()=>{xo=(function(){function r(e,t){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=t}return r})()});var $g,rR=C(()=>{st();$g=Ht({Verbose:0,Information:1,Warning:2,Error:3,Critical:4})});var nR,iR=C(()=>{st();yr();nR=(function(){function r(){}return r.getConfig=function(e,t,n,i){i===void 0&&(i=!1);var o;return n&&e[ip]&&e[ip][n]&&!G(e[ip][n][t])?o=e[ip][n][t]:o=e[t],G(o)?i:o},r})()});function Da(r){var e="ai."+r+".";return function(t){return e+t}}var up,Sr,Jg,Bu,VE,Pa,cl,dp,Gu,jE=C(()=>{hn();st();up=Da("application"),Sr=Da("device"),Jg=Da("location"),Bu=Da("operation"),VE=Da("session"),Pa=Da("user"),cl=Da("cloud"),dp=Da("internal"),Gu=(function(r){gn(e,r);function e(){return r.call(this)||this}return e})(Y_({applicationVersion:up("ver"),applicationBuild:up("build"),applicationTypeId:up("typeId"),applicationId:up("applicationId"),applicationLayer:up("layer"),deviceId:Sr("id"),deviceIp:Sr("ip"),deviceLanguage:Sr("language"),deviceLocale:Sr("locale"),deviceModel:Sr("model"),deviceFriendlyName:Sr("friendlyName"),deviceNetwork:Sr("network"),deviceNetworkName:Sr("networkName"),deviceOEMName:Sr("oemName"),deviceOS:Sr("os"),deviceOSVersion:Sr("osVersion"),deviceRoleInstance:Sr("roleInstance"),deviceRoleName:Sr("roleName"),deviceScreenResolution:Sr("screenResolution"),deviceType:Sr("type"),deviceMachineName:Sr("machineName"),deviceVMName:Sr("vmName"),deviceBrowser:Sr("browser"),deviceBrowserVersion:Sr("browserVersion"),locationIp:Jg("ip"),locationCountry:Jg("country"),locationProvince:Jg("province"),locationCity:Jg("city"),operationId:Bu("id"),operationName:Bu("name"),operationParentId:Bu("parentId"),operationRootId:Bu("rootId"),operationSyntheticSource:Bu("syntheticSource"),operationCorrelationVector:Bu("correlationVector"),sessionId:VE("id"),sessionIsFirst:VE("isFirst"),sessionIsNew:VE("isNew"),userAccountAcquisitionDate:Pa("accountAcquisitionDate"),userAccountId:Pa("accountId"),userAgent:Pa("userAgent"),userId:Pa("id"),userStoreRegion:Pa("storeRegion"),userAuthUserId:Pa("authUserId"),userAnonymousUserAcquisitionDate:Pa("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Pa("authUserAcquisitionDate"),cloudName:cl("name"),cloudRole:cl("role"),cloudRoleVer:cl("roleVer"),cloudRoleInstance:cl("roleInstance"),cloudEnvironment:cl("environment"),cloudLocation:cl("location"),cloudDeploymentUnit:cl("deploymentUnit"),internalNodeName:dp("nodeName"),internalSdkVersion:dp("sdkVersion"),internalAgentVersion:dp("agentVersion"),internalSnippet:dp("snippet"),internalSdkSrc:dp("sdkSrc")}))});function qE(r,e,t,n,i,o){var s;t=lt(n,t)||hr,(G(r)||G(e)||G(t))&&jt("Input doesn't contain all required fields");var a="";r[Pg]&&(a=r[Pg],delete r[Pg]);var c=(s={},s[sr]=t,s.time=Kn(new Date),s.iKey=a,s.ext=o||{},s.tags=[],s.data={},s.baseType=e,s.baseData=r,s);return G(i)||me(i,function(l,u){c.data[l]=u}),c}var oR,sR=C(()=>{st();ai();li();yr();oR=(function(){function r(){}return r.create=qE,r})()});var aR,Jt,cR=C(()=>{jE();aR={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},Jt=new Gu});function lR(r){var e=null;if(Pe(Event))e=new Event(r);else{var t=qt();t&&t.createEvent&&(e=t.createEvent("Event"),e.initEvent(r,!0,!0))}return e}var uR=C(()=>{st()});function dR(r,e){ds(r,null,null,e)}function Xg(r){var e=qt(),t=vr(),n=!1,i=[],o=1;t&&!G(t.onLine)&&!t.onLine&&(o=2);var s=0,a=f(),c=Bn(Ur("OfflineListener"),r);try{if(u(rr())&&(n=!0),e){var l=e.body||e;l.ononline&&u(l)&&(n=!0)}}catch{n=!1}function u(_){var A=!1;return _&&(A=po(_,"online",S,c),A&&po(_,"offline",y,c)),A}function d(){return a}function f(){return!(s===2||o===2)}function v(){var _=f();a!==_&&(a=_,V(i,function(A){var k={isOnline:a,rState:o,uState:s};try{A(k)}catch{}}))}function m(_){s=_,v()}function S(){o=1,v()}function y(){o=2,v()}function N(){var _=rr();if(_&&n){if(dR(_,c),e){var A=e.body||e;ke(A.ononline)||dR(A,c)}n=!1}}function b(_){return i[gs](_),{rm:function(){var A=i.indexOf(_);if(A>-1)return i.splice(A,1)}}}return{isOnline:d,isListening:function(){return n},unload:N,addListener:b,setOnlineState:m}}var fR=C(()=>{st();yr()});var pR={};Ke(pR,{AnalyticsPluginIdentifier:()=>G1,BreezeChannelIdentifier:()=>KE,ConfigurationManager:()=>nR,ConnectionStringParser:()=>kN,ContextTagKeys:()=>Gu,CtxTagKeys:()=>Jt,DEFAULT_BREEZE_ENDPOINT:()=>va,DEFAULT_BREEZE_PATH:()=>Fi,Data:()=>xo,DisabledPropertyName:()=>dN,DistributedTracingModes:()=>xN,Envelope:()=>Gg,Event:()=>Co,EventPersistence:()=>PN,Exception:()=>Ta,Extensions:()=>aR,HttpMethod:()=>np,Metric:()=>bo,PageView:()=>Ea,PageViewPerformance:()=>xa,ProcessLegacy:()=>Mu,PropertiesPluginIdentifier:()=>B1,RemoteDependencyData:()=>Ca,RequestHeaders:()=>Jc,SampleRate:()=>Fu,SeverityLevel:()=>$g,TelemetryItemCreator:()=>oR,ThrottleMgr:()=>AN,Trace:()=>ba,correlationIdCanIncludeCorrelationHeader:()=>SN,correlationIdGetCorrelationContext:()=>_N,correlationIdGetCorrelationContextValue:()=>NE,correlationIdGetPrefix:()=>yN,correlationIdSetPrefix:()=>hN,createDistributedTraceContextFromTrace:()=>bN,createDomEvent:()=>lR,createOfflineListener:()=>Xg,createTelemetryItem:()=>qE,createTraceParent:()=>If,dataSanitizeException:()=>Fg,dataSanitizeId:()=>Mg,dataSanitizeInput:()=>Ug,dataSanitizeKey:()=>bE,dataSanitizeKeyAndAddUniqueness:()=>Lg,dataSanitizeMeasurements:()=>Qr,dataSanitizeMessage:()=>Vu,dataSanitizeProperties:()=>Xr,dataSanitizeString:()=>lt,dataSanitizeUrl:()=>ya,dateTimeUtilsDuration:()=>CN,dateTimeUtilsNow:()=>EN,dsPadNumber:()=>xE,findAllScripts:()=>xT,findW3cTraceParent:()=>wf,formatTraceParent:()=>Rf,getExtensionByName:()=>$N,isBeaconApiSupported:()=>xn,isCrossOriginError:()=>JN,isInternalApplicationInsightsEndpoint:()=>cp,isSampledFlag:()=>Nf,isValidSpanId:()=>uo,isValidTraceId:()=>lo,isValidTraceParent:()=>yu,msToTimeSpan:()=>Hu,parseConnectionString:()=>sl,parseTraceParent:()=>Lc,strNotSpecified:()=>hr,stringToBoolOrDefault:()=>zN,urlGetAbsoluteUrl:()=>vN,urlGetCompleteUrl:()=>gN,urlGetPathName:()=>mN,urlParseFullHost:()=>ap,urlParseHost:()=>PE,urlParseUrl:()=>il,utlCanUseLocalStorage:()=>qu,utlCanUseSessionStorage:()=>ol,utlDisableStorage:()=>IN,utlEnableStorage:()=>NN,utlGetLocalStorage:()=>jg,utlGetSessionStorage:()=>Kg,utlGetSessionStorageKeys:()=>wN,utlRemoveSessionStorage:()=>Bg,utlRemoveStorage:()=>RN,utlSetLocalStorage:()=>qg,utlSetSessionStorage:()=>Hg,utlSetStoragePrefix:()=>Vg});var B1,KE,G1,hs=C(()=>{RE();ON();LN();SE();ai();FN();MN();HN();WN();XN();QN();ZN();eR();tR();rR();iR();jE();li();sR();cR();wE();zg();st();uR();kE();DE();fR();B1="AppInsightsPropertiesPlugin",KE="AppInsightsChannelPlugin",G1="ApplicationInsightsAnalytics"});var BE=le(Qg=>{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});Qg.TelemetryUtil=void 0;var HE=class r{static applyReplacements(e,t){for(let n of Object.keys(e))for(let i of t)i.lookup.test(n)&&(i.replacementString!==void 0?e[n]=i.replacementString:delete e[n])}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 r._instance||(r._instance=new r),r._instance}};Qg.TelemetryUtil=HE});var Ia,vR=C(()=>{Ia="duration"});var ar,Zg,Vr,Po,ll,Fe,Na,Ra,ui,wa,ys,Wu,Ss,_s,eh,di,zu,fp,Aa,pp,$u,ul,vp,th,Ts,Oa,Ju,Xu,jr,rh,Qu,Zu,ed,nh,GE,ih,oh,WE,sh,zE,Es,$E,JE,XE,mp,QE,ZE,eC,td,ka,ah,gp,ch,lh,uh,dh,rd,tC,fh,mR,La=C(()=>{ar="tags",Zg="deviceType",Vr="data",Po="name",ll="traceID",Fe="length",Na="stringify",Ra="measurements",ui="dataType",wa="envelopeType",ys="toString",Wu="_get",Ss="enqueue",_s="count",eh="eventsLimitInMem",di="push",zu="item",fp="emitLineDelimitedJson",Aa="clear",pp="createNew",$u="markAsSent",ul="clearSent",vp="bufferOverride",th="BUFFER_KEY",Ts="SENT_BUFFER_KEY",Oa="concat",Ju="MAX_BUFFER_SIZE",Xu="triggerSend",jr="diagLog",rh="initialize",Qu="_sender",Zu="endpointUrl",ed="instrumentationKey",nh="customHeaders",GE="maxBatchSizeInBytes",ih="onunloadDisableBeacon",oh="isBeaconApiDisabled",WE="alwaysUseXhrOverride",sh="disableXhr",zE="enableSessionStorageBuffer",Es="_buffer",$E="onunloadDisableFetch",JE="disableSendBeaconSplit",XE="enableSendPromise",mp="getSenderInst",QE="unloadTransports",ZE="convertUndefined",eC="maxBatchInterval",td="serialize",ka="_onError",ah="_onPartialSuccess",gp="_onSuccess",ch="itemsReceived",lh="itemsAccepted",uh="oriPayload",dh="baseType",rd="sampleRate",tC="eventsSendRequest",fh="getSamplingScore",mR="getHashCodeScore"});function Xt(r,e,t){return oi(r,e,t,Ti)}function W1(r,e,t){var n=t[ar]=t[ar]||{},i=e.ext=e.ext||{},o=e[ar]=e[ar]||[],s=i.user;s&&(Xt(n,Jt.userAuthUserId,s.authId),Xt(n,Jt.userId,s.id||s.localId));var a=i.app;a&&Xt(n,Jt.sessionId,a.sesId);var c=i.device;c&&(Xt(n,Jt.deviceId,c.id||c.localId),Xt(n,Jt[Zg],c.deviceClass),Xt(n,Jt.deviceIp,c.ip),Xt(n,Jt.deviceModel,c.model),Xt(n,Jt[Zg],c[Zg]));var l=e.ext.web;if(l){Xt(n,Jt.deviceLanguage,l.browserLang),Xt(n,Jt.deviceBrowserVersion,l.browserVer),Xt(n,Jt.deviceBrowser,l.browser);var u=t[Vr]=t[Vr]||{},d=u[wt]=u[wt]||{},f=d[Dr]=d[Dr]||{};Xt(f,"domain",l.domain),Xt(f,"isManual",l.isManual?gR:null),Xt(f,"screenRes",l.screenRes),Xt(f,"userConsent",l.userConsent?gR:null)}var v=i.os;v&&(Xt(n,Jt.deviceOS,v[Po]),Xt(n,Jt.deviceOSVersion,v.osVer));var m=i.trace;m&&(Xt(n,Jt.operationParentId,m.parentID),Xt(n,Jt.operationName,lt(r,m[Po])),Xt(n,Jt.operationId,m[ll]));for(var S={},y=o[Fe]-1;y>=0;y--){var N=o[y];me(N,function(_,A){S[_]=A}),o.splice(y,1)}me(o,function(_,A){S[_]=A});var b=ti(ti({},n),S);b[Jt.internalSdkVersion]||(b[Jt.internalSdkVersion]=lt(r,"javascript:".concat(z1.Version),64)),t[ar]=bn(b)}function Fa(r,e,t){G(r)||me(r,function(n,i){Or(i)?t[n]=i:Ie(i)?e[n]=i:so()&&(e[n]=Mr()[Na](i))})}function dl(r,e){G(r)||me(r,function(t,n){r[t]=n||e})}function fl(r,e,t,n){var i=new Gg(r,n,e);Xt(i,"sampleRate",t[Fu]),(t[wt]||{}).startTime&&(i.time=Kn(t[wt].startTime)),i.iKey=t.iKey;var o=t.iKey.replace(/-/g,"");return i[Po]=i[Po].replace("{0}",o),W1(r,t,i),t[ar]=t[ar]||[],bn(i)}function pl(r,e){G(e[wt])&&X(r,1,46,"telemetryItem.baseData cannot be null.")}function hR(r,e,t){pl(r,e);var n=e[wt][Ra]||{},i=e[wt][Dr]||{};Fa(e[Vr],i,n),G(t)||dl(i,t);var o=e[wt];if(G(o))return sn(r,"Invalid input for dependency data"),null;var s=o[Dr]&&o[Dr][np]?o[Dr][np]:"GET",a=new Ca(r,o.id,o.target,o[Po],o[Ia],o.success,o.responseCode,s,o.type,o.correlationContext,i,n),c=new xo(Ca[ui],a);return fl(r,Ca[wa],e,c)}function nC(r,e,t){pl(r,e);var n={},i={};e[rC]!==Co[ui]&&(n.baseTypeSource=e[rC]),e[rC]===Co[ui]?(n=e[wt][Dr]||{},i=e[wt][Ra]||{}):e[wt]&&Fa(e[wt],n,i),Fa(e[Vr],n,i),G(t)||dl(n,t);var o=e[wt][Po],s=new Co(r,o,n,i),a=new xo(Co[ui],s);return fl(r,Co[wa],e,a)}function yR(r,e,t){pl(r,e);var n=e[wt][Ra]||{},i=e[wt][Dr]||{};Fa(e[Vr],i,n),G(t)||dl(i,t);var o=e[wt],s=Ta.CreateFromInterface(r,o,i,n),a=new xo(Ta[ui],s);return fl(r,Ta[wa],e,a)}function SR(r,e,t){pl(r,e);var n=e[wt],i=n[Dr]||{},o=n[Ra]||{};Fa(e[Vr],i,o),G(t)||dl(i,t);var s=new bo(r,n[Po],n.average,n.sampleCount,n.min,n.max,n.stdDev,i,o),a=new xo(bo[ui],s);return fl(r,bo[wa],e,a)}function _R(r,e,t){pl(r,e);var n,i=e[wt];!G(i)&&!G(i[Dr])&&!G(i[Dr][Ia])?(n=i[Dr][Ia],delete i[Dr][Ia]):!G(e[Vr])&&!G(e[Vr][Ia])&&(n=e[Vr][Ia],delete e[Vr][Ia]);var o=e[wt],s;((e.ext||{}).trace||{})[ll]&&(s=e.ext.trace[ll]);var a=o.id||s,c=o[Po],l=o.uri,u=o[Dr]||{},d=o[Ra]||{};if(G(o.refUri)||(u.refUri=o.refUri),G(o.pageType)||(u.pageType=o.pageType),G(o.isLoggedIn)||(u.isLoggedIn=o.isLoggedIn[ys]()),!G(o[Dr])){var f=o[Dr];me(f,function(S,y){u[S]=y})}Fa(e[Vr],u,d),G(t)||dl(u,t);var v=new Ea(r,c,l,n,u,d,a),m=new xo(Ea[ui],v);return fl(r,Ea[wa],e,m)}function TR(r,e,t){pl(r,e);var n=e[wt],i=n[Po],o=n.uri||n.url,s=n[Dr]||{},a=n[Ra]||{};Fa(e[Vr],s,a),G(t)||dl(s,t);var c=new xa(r,i,o,void 0,s,a,n),l=new xo(xa[ui],c);return fl(r,xa[wa],e,l)}function ER(r,e,t){pl(r,e);var n=e[wt].message,i=e[wt].severityLevel,o=e[wt][Dr]||{},s=e[wt][Ra]||{};Fa(e[Vr],o,s),G(t)||dl(o,t);var a=new ba(r,n,i,o,s),c=new xo(ba[ui],a);return fl(r,ba[wa],e,c)}var rC,wt,Dr,gR,z1,CR=C(()=>{hn();hs();st();vR();La();rC="baseType",wt="baseData",Dr="properties",gR="true";z1={Version:"3.3.4"}});var bR,ph,$1,iC,xR=C(()=>{hn();br();hs();st();La();bR=(function(){function r(e,t){var n=[],i=!1,o=t.maxRetryCnt;this[Wu]=function(){return n},this._set=function(s){return n=s,n},qe(r,this,function(s){s[Ss]=function(a){if(s[_s]()>=t[eh]){i||(X(e,2,105,"Maximum in-memory buffer size reached: "+s[_s](),!0),i=!0);return}a.cnt=a.cnt||0,!(!G(o)&&a.cnt>o)&&n[di](a)},s[_s]=function(){return n[Fe]},s.size=function(){for(var a=n[Fe],c=0;c<n[Fe];c++)a+=n[c].item[Fe];return t[fp]||(a+=2),a},s[Aa]=function(){n=[],i=!1},s.getItems=function(){return n.slice(0)},s.batchPayloads=function(a){if(a&&a[Fe]>0){var c=[];V(a,function(u){c[di](u[zu])});var l=t[fp]?c.join(`
`):"["+c.join(",")+"]";return l}return null},s[pp]=function(a,c,l){var u=n.slice(0);a=a||e,c=c||{};var d=l?new iC(a,c):new ph(a,c);return V(u,function(f){d[Ss](f)}),d}})}return r.__ieDyn=1,r})(),ph=(function(r){gn(e,r);function e(t,n){var i=r.call(this,t,n)||this;return qe(e,i,function(o,s){o[$u]=function(a){s[Aa]()},o[ul]=function(a){}}),i}return e.__ieDyn=1,e})(bR),$1=["AI_buffer","AI_sentBuffer"],iC=(function(r){gn(e,r);function e(n,i){var o=r.call(this,n,i)||this,s=!1,a=i?.namePrefix,c=i[vp]||{getItem:Kg,setItem:Hg},l=c.getItem,u=c.setItem,d=i.maxRetryCnt;return qe(e,o,function(f,v){var m=A(e[th]),S=A(e[Ts]),y=q(),N=S[Oa](y),b=f._set(m[Oa](N));b[Fe]>e[Ju]&&(b[Fe]=e[Ju]),j(e[Ts],[]),j(e[th],b),f[Ss]=function($){if(f[_s]()>=e[Ju]){s||(X(n,2,67,"Maximum buffer size reached: "+f[_s](),!0),s=!0);return}$.cnt=$.cnt||0,!(!G(d)&&$.cnt>d)&&(v[Ss]($),j(e.BUFFER_KEY,f[Wu]()))},f[Aa]=function(){v[Aa](),j(e.BUFFER_KEY,f[Wu]()),j(e[Ts],[]),s=!1},f[$u]=function($){j(e[th],f._set(_($,f[Wu]())));var W=A(e[Ts]);W instanceof Array&&$ instanceof Array&&(W=W[Oa]($),W[Fe]>e[Ju]&&(X(n,1,67,"Sent buffer reached its maximum size: "+W[Fe],!0),W[Fe]=e[Ju]),j(e[Ts],W))},f[ul]=function($){var W=A(e[Ts]);W=_($,W),j(e[Ts],W)},f[pp]=function($,W,re){re=!!re;var Q=f[Wu]().slice(0),ie=A(e[Ts]).slice(0);$=$||n,W=W||{},f[Aa]();var T=re?new e($,W):new ph($,W);return V(Q,function(R){T[Ss](R)}),re&&T[$u](ie),T};function _($,W){var re=[],Q=[];return V($,function(ie){Q[di](ie[zu])}),V(W,function(ie){!Pe(ie)&&Je(Q,ie[zu])===-1&&re[di](ie)}),re}function A($){var W=$;return W=a?a+"_"+W:W,k(W)}function k($){try{var W=l(n,$);if(W){var re=Mr().parse(W);if(Ie(re)&&(re=Mr().parse(re)),re&&pe(re))return re}}catch(Q){X(n,1,42," storage key: "+$+", "+yt(Q),{exception:ue(Q)})}return[]}function j($,W){var re=$;try{re=a?a+"_"+re:re;var Q=JSON[Na](W);u(n,re,Q)}catch(ie){u(n,re,JSON[Na]([])),X(n,2,41," storage key: "+re+", "+yt(ie)+". Buffer cleared",{exception:ue(ie)})}}function q(){var $=[];try{return V($1,function(W){var re=oe(W);if($=$[Oa](re),a){var Q=a+"_"+W,ie=oe(Q);$=$[Oa](ie)}}),$}catch(W){X(n,2,41,"Transfer events from previous buffers: "+yt(W)+". previous Buffer items can not be removed",{exception:ue(W)})}return[]}function oe($){try{var W=k($),re=[];return V(W,function(Q){var ie={item:Q,cnt:0};re[di](ie)}),Bg(n,$),re}catch{}return[]}}),o}var t;return t=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+t.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+t.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(bR)});var PR,DR=C(()=>{br();st();La();PR=(function(){function r(e){qe(r,this,function(t){t[td]=function(s){var a=n(s,"root");try{return Mr()[Na](a)}catch(c){X(e,1,48,c&&Pe(c[ys])?c[ys]():"Error serializing object",null,!0)}};function n(s,a){var c="__aiCircularRefCheck",l={};if(!s)return X(e,1,48,"cannot serialize object because it is null or undefined",{name:a},!0),l;if(s[c])return X(e,2,50,"Circular reference detected while serializing object",{name:a},!0),l;if(!s.aiDataContract){if(a==="measurements")l=o(s,"number",a);else if(a==="properties")l=o(s,"string",a);else if(a==="tags")l=o(s,"string",a);else if(pe(s))l=i(s,a);else{X(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:a},!0);try{Mr()[Na](s),l=s}catch(u){X(e,1,48,u&&Pe(u[ys])?u[ys]():"Error serializing object",null,!0)}}return l}return s[c]=!0,me(s.aiDataContract,function(u,d){var f=Pe(d)?d()&1:d&1,v=Pe(d)?d()&4:d&4,m=d&2,S=s[u]!==void 0,y=Lt(s[u])&&s[u]!==null;if(f&&!S&&!m)X(e,1,24,"Missing required field specification. The field is required but not present on source",{field:u,name:a});else if(!v){var N=void 0;y?m?N=i(s[u],u):N=n(s[u],u):N=s[u],N!==void 0&&(l[u]=N)}}),delete s[c],l}function i(s,a){var c;if(s)if(!pe(s))X(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 l=0;l<s[Fe];l++){var u=s[l],d=n(u,a+"["+l+"]");c[di](d)}}return c}function o(s,a,c){var l;return s&&(l={},me(s,function(u,d){if(a==="string")d===void 0?l[u]="undefined":d===null?l[u]="null":d[ys]?l[u]=d[ys]():l[u]="invalid field: toString() is not defined.";else if(a==="number")if(d===void 0)l[u]="undefined";else if(d===null)l[u]="null";else{var f=parseFloat(d);l[u]=f}else l[u]="invalid field: "+c+" is of unknown type.",X(e,1,l[u],null,!0)})),l}})}return r.__ieDyn=1,r})()});var J1,IR,NR=C(()=>{La();J1=8,IR=(function(){function r(){}return r.prototype.getHashCodeScore=function(e){var t=this.getHashCode(e)/r.INT_MAX_VALUE;return t*100},r.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[Fe]<J1;)e=e[Oa](e);for(var t=5381,n=0;n<e[Fe];++n)t=(t<<5)+t+e.charCodeAt(n),t=t&t;return Math.abs(t)},r.INT_MAX_VALUE=2147483647,r})()});var RR,wR=C(()=>{hs();La();NR();RR=(function(){function r(){var e=this,t=new IR,n=new Gu;e[fh]=function(i){var o=0;return i[ar]&&i[ar][n.userId]?o=t.getHashCodeScore(i[ar][n.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=t[mR](i.ext.user.id):i[ar]&&i[ar][n.operationId]?o=t.getHashCodeScore(i[ar][n.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[ll]?o=t.getHashCodeScore(i.ext.telemetryTrace[ll]):o=Math.random()*100,o}}return r})()});var AR,OR=C(()=>{hs();st();La();wR();AR=(function(){function r(e,t){this.INT_MAX_VALUE=2147483647;var n=t||Ai(null);(e>100||e<0)&&(n.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[rd]=e,this.samplingScoreGenerator=new RR}return r.prototype.isSampledIn=function(e){var t=this[rd],n=!1;return t==null||t>=100||e.baseType===bo[ui]?!0:(n=this.samplingScoreGenerator[fh](e)<t,n)},r})()});function LR(r){try{return r.responseText}catch{}return null}function Q1(r){return r&&r.sendPOST}function Z1(r){return!isNaN(r)&&r>0&&r<=100}var xt,Cs,Do,kR,X1,FR,eU,hp,MR=C(()=>{hn();br();hs();st();Ne();CR();xR();DR();OR();La();Do=void 0,kR="",X1=65e3;FR=Ci((xt={endpointUrl:vu(Ti,va+Fi)},xt[fp]=si(),xt[eC]=15e3,xt[GE]=102400,xt.disableTelemetry=si(),xt[zE]=si(!0),xt.isRetryDisabled=si(),xt[oh]=si(!0),xt[JE]=si(!0),xt[sh]=si(),xt[$E]=si(),xt[ih]=si(),xt[ed]=Do,xt.namePrefix=Do,xt.samplingPercentage=vu(Z1,100),xt[nh]=Do,xt[ZE]=Do,xt[eh]=1e4,xt[vp]=!1,xt.httpXHROverride={isVal:Q1,v:Do},xt[WE]=si(),xt.transports=Do,xt.retryCodes=Do,xt.maxRetryCnt={isVal:Or,v:10},xt));eU=(Cs={},Cs[Co.dataType]=nC,Cs[ba.dataType]=ER,Cs[Ea.dataType]=_R,Cs[xa.dataType]=TR,Cs[Ta.dataType]=yR,Cs[bo.dataType]=SR,Cs[Ca.dataType]=hR,Cs),hp=(function(r){gn(e,r);function e(){var t=r.call(this)||this;t.priority=1001,t.identifier=KE;var n,i,o,s,a,c,l,u,d=0,f,v,m,S,y,N,b,_,A,k,j,q,oe,$,W,re,Q,ie,T,R,B,P,g,D,I,Z,M;return qe(e,t,function(w,Oe){fe(),w.pause=function(){K(),s=!0},w.resume=function(){s&&(s=!1,i=null,Be(),E())},w.flush=function(p,h,x){if(p===void 0&&(p=!0),!s){K();try{return w[Xu](p,null,x||1)}catch(O){X(w[jr](),1,22,"flush failed, telemetry will not be collected: "+yt(O),{exception:ue(O)})}}},w.onunloadFlush=function(){if(!s)if(b||R)try{return w[Xu](!0,Vt,2)}catch(p){X(w[jr](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+yt(p),{exception:ue(p)})}else w.flush(!1)},w.addHeader=function(p,h){u[p]=h},w[rh]=function(p,h,x,O){w.isInitialized()&&X(w[jr](),1,28,"Sender is already initialized"),Oe[rh](p,h,x,O);var Y=w.identifier;c=new PR(h.logger),n=0,i=null,o=0,w[Qu]=null,l=0;var z=w[jr]();m=Bn(Ur("Sender"),h.evtNamespace&&h.evtNamespace()),v=Xg(m),w._addHook(ir(p,function(te){var De=te.cfg;De.storagePrefix&&Vg(De.storagePrefix);var Ge=an(null,De,h),Ce=Ge.getExtCfg(Y,FR),dn=Ce[Zu];if(S&&dn===S){var Ko=De[Zu];Ko&&Ko!==dn&&(Ce[Zu]=Ko)}nn(Ce[ed])&&(Ce[ed]=De[ed]),ot(w,"_senderConfig",{g:function(){return Ce}}),y!==Ce[Zu]&&(S=y=Ce[Zu]),h.activeStatus()===Un.PENDING?w.pause():h.activeStatus()===Un.ACTIVE&&w.resume(),k&&k!==Ce[nh]&&V(k,function(wr){delete u[wr.header]}),N=Ce[GE],b=(Ce[ih]===!1||Ce[oh]===!1)&&xn(),_=Ce[ih]===!1&&xn(),A=Ce[oh]===!1&&xn(),R=Ce[WE],B=!!Ce[sh],M=Ce.retryCodes;var fn=Ce[vp],zi=!!Ce[zE]&&(!!fn||ol()),uv=Ce.namePrefix,kL=zi!==re||zi&&ie!==uv||zi&&Q!==fn;if(w[Es]){if(kL)try{w._buffer=w._buffer[pp](z,Ce,zi)}catch(wr){X(w[jr](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+yt(wr),{exception:ue(wr)})}Be()}else w[Es]=zi?new iC(z,Ce):new ph(z,Ce);ie=uv,re=zi,Q=fn,P=!Ce[$E]&&ns(!0),I=!!Ce[JE],w._sample=new AR(Ce.samplingPercentage,z),q=Ce[ed],!nn(q)&&!Me(q,De)&&X(z,1,100,"Invalid Instrumentation key "+q),k=Ce[nh],Ie(S)&&!cp(S)&&k&&k[Fe]>0?V(k,function(wr){t.addHeader(wr.header,wr.value)}):k=null,T=Ce[XE];var Vx=ft();Z?Z.SetConfig(Vx):(Z=new Uc,Z[rh](Vx,z));var dv=Ce.httpXHROverride,fv=null,Ud=null,LL=ts([3,1,2],Ce.transports);fv=Z&&Z[mp](LL,!1);var DS=Z&&Z.getFallbackInst();g=function(wr,cc){return ce(DS,wr,cc)},D=function(wr,cc){return ce(DS,wr,cc,!1)},fv=R?dv:fv||dv||DS,w[Qu]=function(wr,cc){return ce(fv,wr,cc)},P&&(f=Zn);var IS=ts([3,1],Ce[QE]);P||(IS=IS.filter(function(wr){return wr!==2})),Ud=Z&&Z[mp](IS,!0),Ud=R?dv:Ud||dv,(R||Ce[QE]||!f)&&Ud&&(f=function(wr,cc){return ce(Ud,wr,cc)}),f||(f=g),j=Ce.disableTelemetry,oe=Ce[ZE]||Do,$=Ce.isRetryDisabled,W=Ce[eC]}))},w.processTelemetry=function(p,h){var x;h=w._getTelCtx(h);var O=h[jr]();try{var Y=vt(p,O);if(!Y)return;var z=Ze(p,O);if(!z)return;var te=c[td](z),De=w[Es];Be(te);var Ge=(x={},x[zu]=te,x.cnt=0,x);De[Ss](Ge),E()}catch(Ce){X(O,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+yt(Ce),{exception:ue(Ce)})}w.processNext(p,h)},w.isCompletelyIdle=function(){return!s&&d===0&&w._buffer[_s]()===0},w.getOfflineListener=function(){return v},w._xhrReadyStateChange=function(p,h,x){if(!Wr(h))return pt(p,h,x)},w[Xu]=function(p,h,x){p===void 0&&(p=!0);var O;if(!s)try{var Y=w[Es];if(j)Y[Aa]();else{if(Y[_s]()>0){var z=Y.getItems();xe(x||0,p),h?O=h.call(w,z,p):O=w[Qu](z,p)}o=+new Date}K()}catch(De){var te=df();(!te||te>9)&&X(w[jr](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+yt(De),{exception:ue(De)})}return O},w.getOfflineSupport=function(){var p;return p={getUrl:function(){return S},createPayload:F},p[td]=Dt,p.batch=ht,p.shouldProcess=function(h){return!!vt(h)},p},w._doTeardown=function(p,h){w.onunloadFlush(),os(v,!1),fe()},w[ka]=function(p,h,x){if(!Wr(p))return Zt(p,h,x)},w[ah]=function(p,h){if(!Wr(p))return Rr(p,h)},w[gp]=function(p,h){if(!Wr(p))return ur(p,h)},w._xdrOnLoad=function(p,h){if(!Wr(h))return Ye(p,h)};function Ye(p,h){var x=LR(p);if(p&&(x+""=="200"||x===""))n=0,w[gp](h,0);else{var O=Mc(x);O&&O[ch]&&O[ch]>O[lh]&&!$?w[ah](h,O):w[ka](h,Nc(p))}}function ft(){var p;try{var h={xdrOnComplete:function(O,Y,z){var te=rn(z);if(te)return Ye(O,te)},fetchOnComplete:function(O,Y,z,te){var De=rn(te);if(De)return it(O.status,De,O.url,De[Fe],O.statusText,z||"")},xhrOnComplete:function(O,Y,z){var te=rn(z);if(te)return pt(O,te,te[Fe])},beaconOnRetry:function(O,Y,z){return Gr(O,Y,z)}},x=(p={},p[XE]=T,p.isOneDs=!1,p.disableCredentials=!1,p[sh]=B,p.disableBeacon=!A,p.disableBeaconSync=!_,p.senderOnCompleteCallBack=h,p);return x}catch{}return null}function pt(p,h,x){p.readyState===4&&it(p.status,h,p.responseURL,x,es(p),LR(p)||p.response)}function Zt(p,h,x){X(w[jr](),2,26,"Failed to send telemetry.",{message:h}),w._buffer&&w._buffer[ul](p)}function Rr(p,h){for(var x=[],O=[],Y=h.errors.reverse(),z=0,te=Y;z<te.length;z++){var De=te[z],Ge=p.splice(De.index,1)[0];J(De.statusCode)?O[di](Ge):x[di](Ge)}p[Fe]>0&&w[gp](p,h[lh]),x[Fe]>0&&w[ka](x,es(null,["partial success",h[lh],"of",h.itemsReceived].join(" "))),O[Fe]>0&&(Er(O),X(w[jr](),2,40,"Partial success. Delivered: "+p[Fe]+", Failed: "+x[Fe]+". Will retry to send "+O[Fe]+" our of "+h[ch]+" items"))}function ur(p,h){w._buffer&&w._buffer[ul](p)}function rn(p){try{if(p){var h=p,x=h[uh];return x&&x[Fe]?x:null}}catch{}return null}function vt(p,h){if(j)return!1;if(!p)return h&&X(h,1,7,"Cannot send empty telemetry"),!1;if(p.baseData&&!p[dh])return h&&X(h,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(p[dh]||(p[dh]="EventData"),!w[Qu])return h&&X(h,1,28,"Sender was not initialized"),!1;if(ne(p))p[Fu]=w._sample[rd];else return h&&X(h,2,33,"Telemetry item was sampled out and not sent",{SampleRate:w._sample[rd]}),!1;return!0}function Ze(p,h){var x=p.iKey||q,O=e.constructEnvelope(p,x,h,oe);if(!O){X(h,1,47,"Unable to create an AppInsights envelope");return}var Y=!1;if(p[ar]&&p[ar][Mu]&&(V(p[ar][Mu],function(z){try{z&&z(O)===!1&&(Y=!0,sn(h,"Telemetry processor check returns false"))}catch(te){X(h,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+yt(te),{exception:ue(te)},!0)}}),delete p[ar][Mu]),!Y)return O}function Dt(p){var h=kR,x=w[jr]();try{var O=vt(p,x),Y=null;O&&(Y=Ze(p,x)),Y&&(h=c[td](Y))}catch{}return h}function ht(p){var h=kR;return p&&p[Fe]&&(h="["+p.join(",")+"]"),h}function F(p){var h,x=ze();return h={urlString:S},h[Vr]=p,h.headers=x,h}function ne(p){return w._sample.isSampledIn(p)}function Te(p,h,x,O){h===200&&p?w._onSuccess(p,p[Fe]):O&&w[ka](p,O)}function ce(p,h,x,O){O===void 0&&(O=!0);var Y=function(De,Ge,Ce){return Te(h,De,Ge,Ce)},z=Ee(h),te=p&&p.sendPOST;return te&&z?(O&&w._buffer[$u](h),te(z,Y,!x)):null}function Ee(p){var h;if(pe(p)&&p[Fe]>0){var x=w[Es].batchPayloads(p),O=ze(),Y=(h={},h[Vr]=x,h.urlString=S,h.headers=O,h.disableXhrSync=B,h.disableFetchKeepAlive=!P,h[uh]=p,h);return Y}return null}function ze(){try{var p=u||{};return cp(S)&&(p[Jc[6]]=Jc[7]),p}catch{}return null}function Be(p){var h=p?p[Fe]:0;return w[Es].size()+h>N?((!v||v.isOnline())&&w[Xu](!0,null,10),!0):!1}function it(p,h,x,O,Y,z){var te=null;if(w._appId||(te=Mc(z),te&&te.appId&&(w._appId=te.appId)),(p<200||p>=300)&&p!==0){if((p===301||p===307||p===308)&&!It(x)){w[ka](h,Y);return}if(v&&!v.isOnline()){if(!$){var De=10;Er(h,De),X(w[jr](),2,40,". Offline - Response Code: ".concat(p,". Offline status: ").concat(!v.isOnline(),". Will retry to send ").concat(h.length," items."))}return}!$&&J(p)?(Er(h),X(w[jr](),2,40,". Response code "+p+". Will retry to send "+h[Fe]+" items.")):w[ka](h,Y)}else It(x),p===206?(te||(te=Mc(z)),te&&!$?w[ah](h,te):w[ka](h,Y)):(n=0,w[gp](h,O))}function It(p){return l>=10?!1:!G(p)&&p!==""&&p!==S?(S=p,++l,!0):!1}function Vt(p,h){if(f)f(p,!1);else{var x=Z&&Z[mp]([3],!0);return ce(x,p,h)}}function Gr(p,h,x){var O=p,Y=O&&O[uh];if(I)D&&D(Y,!0),X(w[jr](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var z=[],te=0;te<Y[Fe];te++){var De=Y[te],Ge=[De],Ce=Ee(Ge);x(Ce,h)?w._onSuccess(Ge,Ge[Fe]):z[di](De)}z[Fe]>0&&(D&&D(z,!0),X(w[jr](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function Wr(p){try{if(p&&p[Fe])return Ie(p[0])}catch{}return null}function Zn(p,h){var x=null;if(pe(p)){for(var O=p[Fe],Y=0;Y<p[Fe];Y++)O+=p[Y].item[Fe];var z=Z.getSyncFetchPayload();z+O<=X1?x=2:xn()?x=3:(x=1,X(w[jr](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var te=Z&&Z[mp]([x],!0);return ce(te,p,h)}return null}function Er(p,h){if(h===void 0&&(h=1),!(!p||p[Fe]===0)){var x=w[Es];x[ul](p),n++;for(var O=0,Y=p;O<Y.length;O++){var z=Y[O];z.cnt=z.cnt||0,z.cnt++,x[Ss](z)}qo(h),E()}}function qo(p){var h=10,x;if(n<=1)x=h;else{var O=(Math.pow(2,n)-1)/2,Y=Math.floor(Math.random()*O*h)+1;Y=p*Y,x=Math.max(Math.min(Y,3600),h)}var z=Kt()+x*1e3;i=z}function E(){if(!a&&!s){var p=i?Math.max(0,i-Kt()):0,h=Math.max(W,p);a=Mn(function(){a=null,w[Xu](!0,null,1)},h)}}function K(){a&&a.cancel(),a=null,i=null}function J(p){return G(M)?p===401||p===408||p===429||p===500||p===502||p===503||p===504:M[Fe]&&M.indexOf(p)>-1}function de(){var p="getNotifyMgr";return w.core[p]?w.core[p]():w.core._notificationManager}function xe(p,h){var x=de();if(x&&x[tC])try{x[tC](p,h)}catch(O){X(w[jr](),1,74,"send request notification failed: "+yt(O),{exception:ue(O)})}}function Me(p,h){var x=h.disableInstrumentationKeyValidation,O=G(x)?!1:x;if(O)return!0;var Y="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",z=new RegExp(Y);return z.test(p)}function fe(){w[Qu]=null,w[Es]=null,w._appId=null,w._sample=null,u={},v=null,n=0,i=null,o=null,s=!1,a=null,c=null,l=0,d=0,f=null,m=null,S=null,y=null,N=0,b=!1,k=null,j=!1,q=null,oe=Do,$=!1,re=null,ie=Do,B=!1,P=!1,I=!1,g=null,D=null,Z=null,ot(w,"_senderConfig",{g:function(){return om({},FR)}})}}),t}return e.constructEnvelope=function(t,n,i,o){var s;n!==t.iKey&&!G(n)?s=ti(ti({},t),{iKey:n}):s=t;var a=eU[s.baseType]||nC;return a(i,s,o)},e})(ls)});var oC=C(()=>{MR()});var vl,yp,sC,ml,aC,nd,UR=C(()=>{vl="instrumentationKey",yp="connectionString",sC="instrumentationkey",ml="endpointUrl",aC="ingestionendpoint",nd="userOverrideEndpointUrl"});var YR={};Ke(YR,{AppInsightsCore:()=>us,ApplicationInsights:()=>nU,Sender:()=>hp,SeverityLevel:()=>$g,arrForEach:()=>V,isNullOrUndefined:()=>G,proxyFunctions:()=>Hn,throwError:()=>jt});function rU(r){return r&&r>0}var id,cC,tU,nU,VR=C(()=>{br();oC();hs();st();xc();Ne();UR();st();hs();oC();cC=void 0,tU=(id={diagnosticLogInterval:vu(rU,1e4)},id[yp]=cC,id[ml]=cC,id[vl]=cC,id.extensionConfig={},id);nU=(function(){function r(e){var t=new us,n;(G(e)||G(e[vl])&&G(e[yp]))&&jt("Invalid input configuration"),qe(r,this,function(o){ot(o,"config",{g:function(){return n}}),s(),o.initialize=s,o.track=i,Hn(o,t,["flush","pollInternalLogs","stopPollingInternalLogs","unload","getPlugin","addPlugin","evtNamespace","addUnloadCb","onCfgChange","getTraceCtx","updateCfg","addTelemetryInitializer"]);function s(){var a=Nt(e||{},tU);n=a.cfg,t.addUnloadHook(ir(a,function(){var c=n[yp];if(nn(c)){var l=of(function(v,m){jn(c,function(S){var y=S.value,N=n[vl];if(!S.rejected&&y){n[yp]=y;var b=sl(y);N=b[sC]||N}v(N)})}),u=of(function(v,m){jn(c,function(S){var y=S.value,N=n[ml];if(!S.rejected&&y){var b=sl(y),_=b[aC];N=_?_+Fi:N}v(N)})});n[vl]=l,n[ml]=n[nd]||u}if(Ie(c)){var d=sl(c),f=d[aC];n[ml]=n[nd]?n[nd]:f+Fi,n[vl]=d[sC]||n[vl]}n[ml]=n[nd]?n[nd]:n[ml]})),t.initialize(n,[new hp])}});function i(o){o&&(o.baseData=o.baseData||{},o.baseType=o.baseType||"EventData"),t.track(o)}}return r.__ieDyn=1,r})()});var jR=le(Io=>{"use strict";var iU=Io&&Io.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),oU=Io&&Io.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),sU=Io&&Io.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&iU(e,r,t);return oU(e,r),e};Object.defineProperty(Io,"__esModule",{value:!0});Io.appInsightsClientFactory=void 0;var aU=(hs(),Yd(pR)),cU=BE(),lU=async(r,e,t,n,i)=>{let o;try{let a=await Promise.resolve().then(()=>sU((VR(),Yd(YR)))),c={};if(n){let d={alwaysUseXhrOverride:!0,httpXHROverride:n};c[aU.BreezeChannelIdentifier]=d}let l;r.startsWith("InstrumentationKey=")||(l=r);let u=l?{instrumentationKey:l}:{connectionString:r};o=new a.ApplicationInsights({...u,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 l={...c?.properties,...c?.measurements};i?.length&&cU.TelemetryUtil.applyReplacements(l,i),o?.track({name:a,data:l,baseType:"EventData",ext:{user:{id:e,authId:e},app:{sesId:t}},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)})}};Io.appInsightsClientFactory=lU});var qR=le(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});vh.BaseTelemetryReporter=void 0;var lC=class{constructor(e,t,n){this.telemetrySender=e,this.vscodeAPI=t,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,n),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,t,n,i){i?this.telemetrySender.sendEventData(e,{properties:t,measurements:n}):this.telemetryLogger.logUsage(e,{properties:t,measurements:n})}sendTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!1)}sendRawTelemetryEvent(e,t,n){let i={...t};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,n)}sendDangerousTelemetryEvent(e,t,n){this.telemetrySender.instantiateSender(),this.internalSendTelemetryEvent(e,t,n,!0)}internalSendTelemetryErrorEvent(e,t,n,i){i?this.telemetrySender.sendEventData(e,{properties:t,measurements:n}):this.telemetryLogger.logError(e,{properties:t,measurements:n})}sendTelemetryErrorEvent(e,t,n){this.internalSendTelemetryErrorEvent(e,t,n,!1)}sendDangerousTelemetryErrorEvent(e,t,n){this.telemetrySender.instantiateSender(),this.internalSendTelemetryErrorEvent(e,t,n,!0)}async dispose(){return await this.telemetrySender.dispose(),this.telemetryLogger.dispose(),Promise.all(this.disposables.map(e=>e.dispose()))}};vh.BaseTelemetryReporter=lC});var KR=le(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});mh.BaseTelemetrySender=void 0;var bs;(function(r){r[r.NOT_INSTANTIATED=0]="NOT_INSTANTIATED",r[r.INSTANTIATING=1]="INSTANTIATING",r[r.INSTANTIATED=2]="INSTANTIATED"})(bs||(bs={}));var uC=class{constructor(e,t){this._instantiationStatus=bs.NOT_INSTANTIATED,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}sendEventData(e,t){if(!this._telemetryClient){this._instantiationStatus!==bs.INSTANTIATED&&this._eventQueue.push({eventName:e,data:t});return}this._telemetryClient.logEvent(e,t)}sendErrorData(e,t){if(!this._telemetryClient){this._instantiationStatus!==bs.INSTANTIATED&&this._exceptionQueue.push({exception:e,data:t});return}let n={stack:e.stack,message:e.message,name:e.name};if(t){let i=t.properties||t;t.properties={...i,...n}}else t={properties:n};this._telemetryClient.logEvent("unhandlederror",t)}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:t})=>this.sendEventData(e,t)),this._eventQueue=[],this._exceptionQueue.forEach(({exception:e,data:t})=>this.sendErrorData(e,t)),this._exceptionQueue=[]}instantiateSender(){this._instantiationStatus===bs.NOT_INSTANTIATED&&(this._instantiationStatus=bs.INSTANTIATING,this._clientFactory(this._key).then(e=>{this._telemetryClient=e,this._instantiationStatus=bs.INSTANTIATED,this._flushQueues()}).catch(e=>{console.error(e),this._instantiationStatus=bs.INSTANTIATED}))}};mh.BaseTelemetrySender=uC});var GR=le(xs=>{"use strict";var uU=xs&&xs.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),dU=xs&&xs.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),pC=xs&&xs.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&uU(e,r,t);return dU(e,r),e};Object.defineProperty(xs,"__esModule",{value:!0});var fU=pC(require("https")),dC=pC(require("os")),gh=pC(require("vscode")),pU=uN(),vU=jR(),mU=qR(),gU=KR(),HR=BE();function BR(){return{sendPOST:(e,t)=>{let n={method:"POST",headers:{...e.headers,"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)}};try{let i=fU.request(e.urlString,n,o=>{o.on("data",function(s){t(o.statusCode??200,o.headers,s.toString())}),o.on("error",function(){t(0,{})})});i.write(e.data,o=>{o&&t(0,{})}),i.end()}catch{t(0,{})}}}}var fC=class extends mU.BaseTelemetryReporter{constructor(e,t){let n=s=>(0,vU.appInsightsClientFactory)(s,gh.env.machineId,gh.env.sessionId,BR(),t);HR.TelemetryUtil.shouldUseOneDataSystemSDK(e)&&(n=s=>(0,pU.oneDataSystemClientFactory)(s,gh,BR()));let i={release:dC.release(),platform:dC.platform(),architecture:dC.arch()},o=new gU.BaseTelemetrySender(e,n);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,gh,{additionalCommonProperties:HR.TelemetryUtil.getAdditionalCommonProperties(i)})}};xs.default=fC});function mC(r){let e=[];for(let t of r)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store")}var _e,gl,gt=C(()=>{"use strict";_e=class{_isDisposed=!1;_disposables=[];dispose(){this._isDisposed||(this._isDisposed=!0,mC(this._disposables))}_register(e){return this._isDisposed?e.dispose():this._disposables.push(e),e}get isDisposed(){return this._isDisposed}},gl=class extends _e{add(e){return this._register(e),e}}});function H(r,e,t){let n=fi.workspace.getConfiguration(cn,t.scope),i=n.inspect(r);return gC(i)?n.get(r,e):fi.workspace.getConfiguration(t.fallbackSection,t.scope).get(t.fallbackSubSectionNameOverride??r,e)}function gC(r){return r?typeof r.globalValue<"u"||typeof r.workspaceValue<"u"||typeof r.workspaceFolderValue<"u"||typeof r.globalLanguageValue<"u"||typeof r.workspaceLanguageValue<"u"||typeof r.workspaceFolderLanguageValue<"u"||(r.languageIds?.length??0)>0:!1}function zR(r,e){let t=fi.workspace.getConfiguration(cn,e.scope);if(gC(t.inspect(r)))return!0;let n=fi.workspace.getConfiguration(e.fallbackSection,e.scope);return gC(n.inspect(r))}var fi,cn,hl,Ui,Mt=C(()=>{"use strict";fi=U(require("vscode"));gt();cn="js/ts";hl=class extends _e{constructor(t,n,i){super();this.subSectionName=t;this.defaultValue=n;this.options=i;this._value=this.read(),this._register(fi.workspace.onDidChangeConfiguration(o=>{if(o.affectsConfiguration(`${cn}.${t}`,i.scope??void 0)||o.affectsConfiguration(`${i.fallbackSection}.${i.fallbackSubSectionNameOverride??t}`,i.scope??void 0)){let s=this.read();s!==this._value&&(this._value=s,this._onDidChange.fire(s))}}))}_value;_onDidChange=this._register(new fi.EventEmitter);get onDidChange(){return this._onDidChange.event}read(){return H(this.subSectionName,this.defaultValue,this.options)}getValue(){return this._value}},Ui=class extends _e{constructor(t,n,i){super();this.subSectionName=t;this.defaultValue=n;this.options=i;let o=i?.fallbackSubSectionNameOverride??t;this._register(fi.workspace.onDidChangeConfiguration(s=>{(s.affectsConfiguration(`${cn}.${t}`)||s.affectsConfiguration(`javascript.${o}`)||s.affectsConfiguration(`typescript.${o}`))&&(this._cache.clear(),this._onDidChange.fire())})),this._register(fi.workspace.onDidChangeWorkspaceFolders(()=>{this._cache.clear(),this._onDidChange.fire()}))}_cache=new Map;_onDidChange=this._register(new fi.EventEmitter);onDidChange=this._onDidChange.event;getValue(t){let n=this.keyFor(t),i=this._cache.get(n);if(i!==void 0)return i;let o=this.fallbackSectionFor(t.languageId),s=H(this.subSectionName,this.defaultValue,{scope:{uri:t.uri,languageId:t.languageId},fallbackSection:o,fallbackSubSectionNameOverride:this.options?.fallbackSubSectionNameOverride});return this._cache.set(n,s),s}fallbackSectionFor(t){switch(t){case"javascript":case"javascriptreact":return"javascript";default:return"typescript"}}keyFor(t){let n=fi.workspace.getWorkspaceFolder(t.uri);return n?n.uri.toString():""}}});var Tp=le((XJ,JR)=>{var hU="2.0.0",yU=Number.MAX_SAFE_INTEGER||9007199254740991,SU=16,_U=["major","premajor","minor","preminor","patch","prepatch","prerelease"];JR.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:SU,MAX_SAFE_INTEGER:yU,RELEASE_TYPES:_U,SEMVER_SPEC_VERSION:hU,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ep=le((QJ,XR)=>{var TU=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};XR.exports=TU});var sd=le((Ps,QR)=>{var{MAX_SAFE_COMPONENT_LENGTH:hC}=Tp(),EU=Ep();Ps=QR.exports={};var CU=Ps.re=[],bU=Ps.safeRe=[],ge=Ps.src=[],he=Ps.t={},xU=0,Ve=(r,e,t)=>{let n=e.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),i=xU++;EU(r,i,e),he[r]=i,ge[i]=e,CU[i]=new RegExp(e,t?"g":void 0),bU[i]=new RegExp(n,t?"g":void 0)};Ve("NUMERICIDENTIFIER","0|[1-9]\\d*");Ve("NUMERICIDENTIFIERLOOSE","[0-9]+");Ve("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");Ve("MAINVERSION",`(${ge[he.NUMERICIDENTIFIER]})\\.(${ge[he.NUMERICIDENTIFIER]})\\.(${ge[he.NUMERICIDENTIFIER]})`);Ve("MAINVERSIONLOOSE",`(${ge[he.NUMERICIDENTIFIERLOOSE]})\\.(${ge[he.NUMERICIDENTIFIERLOOSE]})\\.(${ge[he.NUMERICIDENTIFIERLOOSE]})`);Ve("PRERELEASEIDENTIFIER",`(?:${ge[he.NUMERICIDENTIFIER]}|${ge[he.NONNUMERICIDENTIFIER]})`);Ve("PRERELEASEIDENTIFIERLOOSE",`(?:${ge[he.NUMERICIDENTIFIERLOOSE]}|${ge[he.NONNUMERICIDENTIFIER]})`);Ve("PRERELEASE",`(?:-(${ge[he.PRERELEASEIDENTIFIER]}(?:\\.${ge[he.PRERELEASEIDENTIFIER]})*))`);Ve("PRERELEASELOOSE",`(?:-?(${ge[he.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ge[he.PRERELEASEIDENTIFIERLOOSE]})*))`);Ve("BUILDIDENTIFIER","[0-9A-Za-z-]+");Ve("BUILD",`(?:\\+(${ge[he.BUILDIDENTIFIER]}(?:\\.${ge[he.BUILDIDENTIFIER]})*))`);Ve("FULLPLAIN",`v?${ge[he.MAINVERSION]}${ge[he.PRERELEASE]}?${ge[he.BUILD]}?`);Ve("FULL",`^${ge[he.FULLPLAIN]}$`);Ve("LOOSEPLAIN",`[v=\\s]*${ge[he.MAINVERSIONLOOSE]}${ge[he.PRERELEASELOOSE]}?${ge[he.BUILD]}?`);Ve("LOOSE",`^${ge[he.LOOSEPLAIN]}$`);Ve("GTLT","((?:<|>)?=?)");Ve("XRANGEIDENTIFIERLOOSE",`${ge[he.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ve("XRANGEIDENTIFIER",`${ge[he.NUMERICIDENTIFIER]}|x|X|\\*`);Ve("XRANGEPLAIN",`[v=\\s]*(${ge[he.XRANGEIDENTIFIER]})(?:\\.(${ge[he.XRANGEIDENTIFIER]})(?:\\.(${ge[he.XRANGEIDENTIFIER]})(?:${ge[he.PRERELEASE]})?${ge[he.BUILD]}?)?)?`);Ve("XRANGEPLAINLOOSE",`[v=\\s]*(${ge[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ge[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ge[he.XRANGEIDENTIFIERLOOSE]})(?:${ge[he.PRERELEASELOOSE]})?${ge[he.BUILD]}?)?)?`);Ve("XRANGE",`^${ge[he.GTLT]}\\s*${ge[he.XRANGEPLAIN]}$`);Ve("XRANGELOOSE",`^${ge[he.GTLT]}\\s*${ge[he.XRANGEPLAINLOOSE]}$`);Ve("COERCE",`(^|[^\\d])(\\d{1,${hC}})(?:\\.(\\d{1,${hC}}))?(?:\\.(\\d{1,${hC}}))?(?:$|[^\\d])`);Ve("COERCERTL",ge[he.COERCE],!0);Ve("LONETILDE","(?:~>?)");Ve("TILDETRIM",`(\\s*)${ge[he.LONETILDE]}\\s+`,!0);Ps.tildeTrimReplace="$1~";Ve("TILDE",`^${ge[he.LONETILDE]}${ge[he.XRANGEPLAIN]}$`);Ve("TILDELOOSE",`^${ge[he.LONETILDE]}${ge[he.XRANGEPLAINLOOSE]}$`);Ve("LONECARET","(?:\\^)");Ve("CARETTRIM",`(\\s*)${ge[he.LONECARET]}\\s+`,!0);Ps.caretTrimReplace="$1^";Ve("CARET",`^${ge[he.LONECARET]}${ge[he.XRANGEPLAIN]}$`);Ve("CARETLOOSE",`^${ge[he.LONECARET]}${ge[he.XRANGEPLAINLOOSE]}$`);Ve("COMPARATORLOOSE",`^${ge[he.GTLT]}\\s*(${ge[he.LOOSEPLAIN]})$|^$`);Ve("COMPARATOR",`^${ge[he.GTLT]}\\s*(${ge[he.FULLPLAIN]})$|^$`);Ve("COMPARATORTRIM",`(\\s*)${ge[he.GTLT]}\\s*(${ge[he.LOOSEPLAIN]}|${ge[he.XRANGEPLAIN]})`,!0);Ps.comparatorTrimReplace="$1$2$3";Ve("HYPHENRANGE",`^\\s*(${ge[he.XRANGEPLAIN]})\\s+-\\s+(${ge[he.XRANGEPLAIN]})\\s*$`);Ve("HYPHENRANGELOOSE",`^\\s*(${ge[he.XRANGEPLAINLOOSE]})\\s+-\\s+(${ge[he.XRANGEPLAINLOOSE]})\\s*$`);Ve("STAR","(<|>)?=?\\s*\\*");Ve("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ve("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var _h=le((ZJ,ZR)=>{var PU=Object.freeze({loose:!0}),DU=Object.freeze({}),IU=r=>r?typeof r!="object"?PU:r:DU;ZR.exports=IU});var yC=le((e5,rw)=>{var ew=/^[0-9]+$/,tw=(r,e)=>{let t=ew.test(r),n=ew.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},NU=(r,e)=>tw(e,r);rw.exports={compareIdentifiers:tw,rcompareIdentifiers:NU}});var Zr=le((t5,sw)=>{var Th=Ep(),{MAX_LENGTH:nw,MAX_SAFE_INTEGER:Eh}=Tp(),{safeRe:iw,t:ow}=sd(),RU=_h(),{compareIdentifiers:ad}=yC(),SC=class r{constructor(e,t){if(t=RU(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.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>nw)throw new TypeError(`version is longer than ${nw} characters`);Th("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?iw[ow.LOOSE]:iw[ow.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Eh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Eh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Eh||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<Eh)return o}return i}):this.prerelease=[],this.build=n[5]?n[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(Th("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),ad(this.major,e.major)||ad(this.minor,e.minor)||ad(this.patch,e.patch)}comparePre(e){if(e instanceof r||(e=new r(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 t=0;do{let n=this.prerelease[t],i=e.prerelease[t];if(Th("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return ad(n,i)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let n=this.build[t],i=e.build[t];if(Th("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return ad(n,i)}while(++t)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,n);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(n)?1:0;if(!t&&n===!1)throw new Error("invalid increment argument: identifier is empty");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(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let o=[t,i];n===!1&&(o=[t]),ad(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):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}};sw.exports=SC});var yl=le((r5,cw)=>{var aw=Zr(),wU=(r,e,t=!1)=>{if(r instanceof aw)return r;try{return new aw(r,e)}catch(n){if(!t)return null;throw n}};cw.exports=wU});var uw=le((n5,lw)=>{var AU=yl(),OU=(r,e)=>{let t=AU(r,e);return t?t.version:null};lw.exports=OU});var fw=le((i5,dw)=>{var kU=yl(),LU=(r,e)=>{let t=kU(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};dw.exports=LU});var mw=le((o5,vw)=>{var pw=Zr(),FU=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new pw(r instanceof pw?r.version:r,t).inc(e,n,i).version}catch{return null}};vw.exports=FU});var yw=le((s5,hw)=>{var gw=yl(),MU=(r,e)=>{let t=gw(r,null,!0),n=gw(e,null,!0),i=t.compare(n);if(i===0)return null;let o=i>0,s=o?t:n,a=o?n:t,c=!!s.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":s.patch?"patch":s.minor?"minor":"major";let u=c?"pre":"";return t.major!==n.major?u+"major":t.minor!==n.minor?u+"minor":t.patch!==n.patch?u+"patch":"prerelease"};hw.exports=MU});var _w=le((a5,Sw)=>{var UU=Zr(),YU=(r,e)=>new UU(r,e).major;Sw.exports=YU});var Ew=le((c5,Tw)=>{var VU=Zr(),jU=(r,e)=>new VU(r,e).minor;Tw.exports=jU});var bw=le((l5,Cw)=>{var qU=Zr(),KU=(r,e)=>new qU(r,e).patch;Cw.exports=KU});var Pw=le((u5,xw)=>{var HU=yl(),BU=(r,e)=>{let t=HU(r,e);return t&&t.prerelease.length?t.prerelease:null};xw.exports=BU});var pi=le((d5,Iw)=>{var Dw=Zr(),GU=(r,e,t)=>new Dw(r,t).compare(new Dw(e,t));Iw.exports=GU});var Rw=le((f5,Nw)=>{var WU=pi(),zU=(r,e,t)=>WU(e,r,t);Nw.exports=zU});var Aw=le((p5,ww)=>{var $U=pi(),JU=(r,e)=>$U(r,e,!0);ww.exports=JU});var Ch=le((v5,kw)=>{var Ow=Zr(),XU=(r,e,t)=>{let n=new Ow(r,t),i=new Ow(e,t);return n.compare(i)||n.compareBuild(i)};kw.exports=XU});var Fw=le((m5,Lw)=>{var QU=Ch(),ZU=(r,e)=>r.sort((t,n)=>QU(t,n,e));Lw.exports=ZU});var Uw=le((g5,Mw)=>{var eY=Ch(),tY=(r,e)=>r.sort((t,n)=>eY(n,t,e));Mw.exports=tY});var Cp=le((h5,Yw)=>{var rY=pi(),nY=(r,e,t)=>rY(r,e,t)>0;Yw.exports=nY});var bh=le((y5,Vw)=>{var iY=pi(),oY=(r,e,t)=>iY(r,e,t)<0;Vw.exports=oY});var _C=le((S5,jw)=>{var sY=pi(),aY=(r,e,t)=>sY(r,e,t)===0;jw.exports=aY});var TC=le((_5,qw)=>{var cY=pi(),lY=(r,e,t)=>cY(r,e,t)!==0;qw.exports=lY});var xh=le((T5,Kw)=>{var uY=pi(),dY=(r,e,t)=>uY(r,e,t)>=0;Kw.exports=dY});var Ph=le((E5,Hw)=>{var fY=pi(),pY=(r,e,t)=>fY(r,e,t)<=0;Hw.exports=pY});var EC=le((C5,Bw)=>{var vY=_C(),mY=TC(),gY=Cp(),hY=xh(),yY=bh(),SY=Ph(),_Y=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return vY(r,t,n);case"!=":return mY(r,t,n);case">":return gY(r,t,n);case">=":return hY(r,t,n);case"<":return yY(r,t,n);case"<=":return SY(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Bw.exports=_Y});var Ww=le((b5,Gw)=>{var TY=Zr(),EY=yl(),{safeRe:Dh,t:Ih}=sd(),CY=(r,e)=>{if(r instanceof TY)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Dh[Ih.COERCE]);else{let n;for(;(n=Dh[Ih.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Dh[Ih.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Dh[Ih.COERCERTL].lastIndex=-1}return t===null?null:EY(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Gw.exports=CY});var $w=le((x5,zw)=>{"use strict";zw.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Xw=le((P5,Jw)=>{"use strict";Jw.exports=rt;rt.Node=Sl;rt.create=rt;function rt(r){var e=this;if(e instanceof rt||(e=new rt),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}rt.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};rt.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};rt.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};rt.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)xY(this,arguments[r]);return this.length};rt.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)PY(this,arguments[r]);return this.length};rt.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};rt.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};rt.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};rt.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};rt.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};rt.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};rt.prototype.map=function(r,e){e=e||this;for(var t=new rt,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};rt.prototype.mapReverse=function(r,e){e=e||this;for(var t=new rt,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};rt.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)t=r(t,n.value,i),n=n.next;return t};rt.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)t=r(t,n.value,i),n=n.prev;return t};rt.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};rt.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};rt.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new rt;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<r;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)t.push(i.value);return t};rt.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new rt;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>r;n--,i=i.prev)t.push(i.value);return t};rt.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,i=this.head;i!==null&&n<r;n++)i=i.next;for(var o=[],n=0;i&&n<e;n++)o.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<t.length;n++)i=bY(this,i,t[n]);return o};rt.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function bY(r,e,t){var n=e===r.head?new Sl(t,null,e,r):new Sl(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function xY(r,e){r.tail=new Sl(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function PY(r,e){r.head=new Sl(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Sl(r,e,t,n){if(!(this instanceof Sl))return new Sl(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{$w()(rt)}catch{}});var rA=le((D5,tA)=>{"use strict";var DY=Xw(),_l=Symbol("max"),Is=Symbol("length"),cd=Symbol("lengthCalculator"),xp=Symbol("allowStale"),Tl=Symbol("maxAge"),Ds=Symbol("dispose"),Qw=Symbol("noDisposeOnSet"),Ir=Symbol("lruList"),Yi=Symbol("cache"),eA=Symbol("updateAgeOnGet"),CC=()=>1,xC=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[_l]=e.max||1/0,n=e.length||CC;if(this[cd]=typeof n!="function"?CC:n,this[xp]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Tl]=e.maxAge||0,this[Ds]=e.dispose,this[Qw]=e.noDisposeOnSet||!1,this[eA]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[_l]=e||1/0,bp(this)}get max(){return this[_l]}set allowStale(e){this[xp]=!!e}get allowStale(){return this[xp]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Tl]=e,bp(this)}get maxAge(){return this[Tl]}set lengthCalculator(e){typeof e!="function"&&(e=CC),e!==this[cd]&&(this[cd]=e,this[Is]=0,this[Ir].forEach(t=>{t.length=this[cd](t.value,t.key),this[Is]+=t.length})),bp(this)}get lengthCalculator(){return this[cd]}get length(){return this[Is]}get itemCount(){return this[Ir].length}rforEach(e,t){t=t||this;for(let n=this[Ir].tail;n!==null;){let i=n.prev;Zw(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[Ir].head;n!==null;){let i=n.next;Zw(this,e,n,t),n=i}}keys(){return this[Ir].toArray().map(e=>e.key)}values(){return this[Ir].toArray().map(e=>e.value)}reset(){this[Ds]&&this[Ir]&&this[Ir].length&&this[Ir].forEach(e=>this[Ds](e.key,e.value)),this[Yi]=new Map,this[Ir]=new DY,this[Is]=0}dump(){return this[Ir].map(e=>Nh(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ir]}set(e,t,n){if(n=n||this[Tl],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,o=this[cd](t,e);if(this[Yi].has(e)){if(o>this[_l])return ld(this,this[Yi].get(e)),!1;let c=this[Yi].get(e).value;return this[Ds]&&(this[Qw]||this[Ds](e,c.value)),c.now=i,c.maxAge=n,c.value=t,this[Is]+=o-c.length,c.length=o,this.get(e),bp(this),!0}let s=new PC(e,t,o,i,n);return s.length>this[_l]?(this[Ds]&&this[Ds](e,t),!1):(this[Is]+=s.length,this[Ir].unshift(s),this[Yi].set(e,this[Ir].head),bp(this),!0)}has(e){if(!this[Yi].has(e))return!1;let t=this[Yi].get(e).value;return!Nh(this,t)}get(e){return bC(this,e,!0)}peek(e){return bC(this,e,!1)}pop(){let e=this[Ir].tail;return e?(ld(this,e),e.value):null}del(e){ld(this,this[Yi].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let i=e[n],o=i.e||0;if(o===0)this.set(i.k,i.v);else{let s=o-t;s>0&&this.set(i.k,i.v,s)}}}prune(){this[Yi].forEach((e,t)=>bC(this,t,!1))}},bC=(r,e,t)=>{let n=r[Yi].get(e);if(n){let i=n.value;if(Nh(r,i)){if(ld(r,n),!r[xp])return}else t&&(r[eA]&&(n.value.now=Date.now()),r[Ir].unshiftNode(n));return i.value}},Nh=(r,e)=>{if(!e||!e.maxAge&&!r[Tl])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Tl]&&t>r[Tl]},bp=r=>{if(r[Is]>r[_l])for(let e=r[Ir].tail;r[Is]>r[_l]&&e!==null;){let t=e.prev;ld(r,e),e=t}},ld=(r,e)=>{if(e){let t=e.value;r[Ds]&&r[Ds](t.key,t.value),r[Is]-=t.length,r[Yi].delete(t.key),r[Ir].removeNode(e)}},PC=class{constructor(e,t,n,i,o){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=o||0}},Zw=(r,e,t,n)=>{let i=t.value;Nh(r,i)&&(ld(r,t),r[xp]||(i=void 0)),i&&e.call(n,i.value,i.key,r)};tA.exports=xC});var vi=le((I5,sA)=>{var DC=class r{constructor(e,t){if(t=NY(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof IC)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(n=>this.parseRange(n)).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!iA(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&FY(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&kY)|(this.options.loose&&LY))+":"+e,i=nA.get(n);if(i)return i;let o=this.options.loose,s=o?Nn[ln.HYPHENRANGELOOSE]:Nn[ln.HYPHENRANGE];e=e.replace(s,GY(this.options.includePrerelease)),Ut("hyphen replace",e),e=e.replace(Nn[ln.COMPARATORTRIM],wY),Ut("comparator trim",e),e=e.replace(Nn[ln.TILDETRIM],AY),e=e.replace(Nn[ln.CARETTRIM],OY);let a=e.split(" ").map(d=>MY(d,this.options)).join(" ").split(/\s+/).map(d=>BY(d,this.options));o&&(a=a.filter(d=>(Ut("loose invalid filter",d,this.options),!!d.match(Nn[ln.COMPARATORLOOSE])))),Ut("range list",a);let c=new Map,l=a.map(d=>new IC(d,this.options));for(let d of l){if(iA(d))return[d];c.set(d.value,d)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return nA.set(n,u),u}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>oA(n,t)&&e.set.some(i=>oA(i,t)&&n.every(o=>i.every(s=>o.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new RY(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(WY(this.set[t],e,this.options))return!0;return!1}};sA.exports=DC;var IY=rA(),nA=new IY({max:1e3}),NY=_h(),IC=Pp(),Ut=Ep(),RY=Zr(),{safeRe:Nn,t:ln,comparatorTrimReplace:wY,tildeTrimReplace:AY,caretTrimReplace:OY}=sd(),{FLAG_INCLUDE_PRERELEASE:kY,FLAG_LOOSE:LY}=Tp(),iA=r=>r.value==="<0.0.0-0",FY=r=>r.value==="",oA=(r,e)=>{let t=!0,n=r.slice(),i=n.pop();for(;t&&n.length;)t=n.every(o=>i.intersects(o,e)),i=n.pop();return t},MY=(r,e)=>(Ut("comp",r,e),r=VY(r,e),Ut("caret",r),r=UY(r,e),Ut("tildes",r),r=qY(r,e),Ut("xrange",r),r=HY(r,e),Ut("stars",r),r),un=r=>!r||r.toLowerCase()==="x"||r==="*",UY=(r,e)=>r.trim().split(/\s+/).map(t=>YY(t,e)).join(" "),YY=(r,e)=>{let t=e.loose?Nn[ln.TILDELOOSE]:Nn[ln.TILDE];return r.replace(t,(n,i,o,s,a)=>{Ut("tilde",r,n,i,o,s,a);let c;return un(i)?c="":un(o)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:un(s)?c=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:a?(Ut("replaceTilde pr",a),c=`>=${i}.${o}.${s}-${a} <${i}.${+o+1}.0-0`):c=`>=${i}.${o}.${s} <${i}.${+o+1}.0-0`,Ut("tilde return",c),c})},VY=(r,e)=>r.trim().split(/\s+/).map(t=>jY(t,e)).join(" "),jY=(r,e)=>{Ut("caret",r,e);let t=e.loose?Nn[ln.CARETLOOSE]:Nn[ln.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,o,s,a,c)=>{Ut("caret",r,i,o,s,a,c);let l;return un(o)?l="":un(s)?l=`>=${o}.0.0${n} <${+o+1}.0.0-0`:un(a)?o==="0"?l=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`:c?(Ut("replaceCaret pr",c),o==="0"?s==="0"?l=`>=${o}.${s}.${a}-${c} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a}-${c} <${+o+1}.0.0-0`):(Ut("no pr"),o==="0"?s==="0"?l=`>=${o}.${s}.${a}${n} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),Ut("caret return",l),l})},qY=(r,e)=>(Ut("replaceXRanges",r,e),r.split(/\s+/).map(t=>KY(t,e)).join(" ")),KY=(r,e)=>{r=r.trim();let t=e.loose?Nn[ln.XRANGELOOSE]:Nn[ln.XRANGE];return r.replace(t,(n,i,o,s,a,c)=>{Ut("xRange",r,n,i,o,s,a,c);let l=un(o),u=l||un(s),d=u||un(a),f=d;return i==="="&&f&&(i=""),c=e.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&f?(u&&(s=0),a=0,i===">"?(i=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",u?o=+o+1:s=+s+1),i==="<"&&(c="-0"),n=`${i+o}.${s}.${a}${c}`):u?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),Ut("xRange return",n),n})},HY=(r,e)=>(Ut("replaceStars",r,e),r.trim().replace(Nn[ln.STAR],"")),BY=(r,e)=>(Ut("replaceGTE0",r,e),r.trim().replace(Nn[e.includePrerelease?ln.GTE0PRE:ln.GTE0],"")),GY=r=>(e,t,n,i,o,s,a,c,l,u,d,f,v)=>(un(n)?t="":un(i)?t=`>=${n}.0.0${r?"-0":""}`:un(o)?t=`>=${n}.${i}.0${r?"-0":""}`:s?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,un(l)?c="":un(u)?c=`<${+l+1}.0.0-0`:un(d)?c=`<${l}.${+u+1}.0-0`:f?c=`<=${l}.${u}.${d}-${f}`:r?c=`<${l}.${u}.${+d+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),WY=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(Ut(r[n].semver),r[n].semver!==IC.ANY&&r[n].semver.prerelease.length>0){let i=r[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Pp=le((N5,fA)=>{var Dp=Symbol("SemVer ANY"),wC=class r{static get ANY(){return Dp}constructor(e,t){if(t=aA(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),RC("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Dp?this.value="":this.value=this.operator+this.semver.version,RC("comp",this)}parse(e){let t=this.options.loose?cA[lA.COMPARATORLOOSE]:cA[lA.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new uA(n[2],this.options.loose):this.semver=Dp}toString(){return this.value}test(e){if(RC("Comparator.test",e,this.options.loose),this.semver===Dp||e===Dp)return!0;if(typeof e=="string")try{e=new uA(e,this.options)}catch{return!1}return NC(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new dA(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new dA(this.value,t).test(e.semver):(t=aA(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.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("=")||NC(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||NC(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};fA.exports=wC;var aA=_h(),{safeRe:cA,t:lA}=sd(),NC=EC(),RC=Ep(),uA=Zr(),dA=vi()});var Ip=le((R5,pA)=>{var zY=vi(),$Y=(r,e,t)=>{try{e=new zY(e,t)}catch{return!1}return e.test(r)};pA.exports=$Y});var mA=le((w5,vA)=>{var JY=vi(),XY=(r,e)=>new JY(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));vA.exports=XY});var hA=le((A5,gA)=>{var QY=Zr(),ZY=vi(),eV=(r,e,t)=>{let n=null,i=null,o=null;try{o=new ZY(e,t)}catch{return null}return r.forEach(s=>{o.test(s)&&(!n||i.compare(s)===-1)&&(n=s,i=new QY(n,t))}),n};gA.exports=eV});var SA=le((O5,yA)=>{var tV=Zr(),rV=vi(),nV=(r,e,t)=>{let n=null,i=null,o=null;try{o=new rV(e,t)}catch{return null}return r.forEach(s=>{o.test(s)&&(!n||i.compare(s)===1)&&(n=s,i=new tV(n,t))}),n};yA.exports=nV});var EA=le((k5,TA)=>{var AC=Zr(),iV=vi(),_A=Cp(),oV=(r,e)=>{r=new iV(r,e);let t=new AC("0.0.0");if(r.test(t)||(t=new AC("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let i=r.set[n],o=null;i.forEach(s=>{let a=new AC(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||_A(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!t||_A(t,o))&&(t=o)}return t&&r.test(t)?t:null};TA.exports=oV});var bA=le((L5,CA)=>{var sV=vi(),aV=(r,e)=>{try{return new sV(r,e).range||"*"}catch{return null}};CA.exports=aV});var Rh=le((F5,IA)=>{var cV=Zr(),DA=Pp(),{ANY:lV}=DA,uV=vi(),dV=Ip(),xA=Cp(),PA=bh(),fV=Ph(),pV=xh(),vV=(r,e,t,n)=>{r=new cV(r,n),e=new uV(e,n);let i,o,s,a,c;switch(t){case">":i=xA,o=fV,s=PA,a=">",c=">=";break;case"<":i=PA,o=pV,s=xA,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(dV(r,e,n))return!1;for(let l=0;l<e.set.length;++l){let u=e.set[l],d=null,f=null;if(u.forEach(v=>{v.semver===lV&&(v=new DA(">=0.0.0")),d=d||v,f=f||v,i(v.semver,d.semver,n)?d=v:s(v.semver,f.semver,n)&&(f=v)}),d.operator===a||d.operator===c||(!f.operator||f.operator===a)&&o(r,f.semver))return!1;if(f.operator===c&&s(r,f.semver))return!1}return!0};IA.exports=vV});var RA=le((M5,NA)=>{var mV=Rh(),gV=(r,e,t)=>mV(r,e,">",t);NA.exports=gV});var AA=le((U5,wA)=>{var hV=Rh(),yV=(r,e,t)=>hV(r,e,"<",t);wA.exports=yV});var LA=le((Y5,kA)=>{var OA=vi(),SV=(r,e,t)=>(r=new OA(r,t),e=new OA(e,t),r.intersects(e,t));kA.exports=SV});var MA=le((V5,FA)=>{var _V=Ip(),TV=pi();FA.exports=(r,e,t)=>{let n=[],i=null,o=null,s=r.sort((u,d)=>TV(u,d,t));for(let u of s)_V(u,e,t)?(o=u,i||(i=u)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);let a=[];for(let[u,d]of n)u===d?a.push(u):!d&&u===s[0]?a.push("*"):d?u===s[0]?a.push(`<=${d}`):a.push(`${u} - ${d}`):a.push(`>=${u}`);let c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var KA=le((j5,qA)=>{var UA=vi(),kC=Pp(),{ANY:OC}=kC,Np=Ip(),LC=pi(),EV=(r,e,t={})=>{if(r===e)return!0;r=new UA(r,t),e=new UA(e,t);let n=!1;e:for(let i of r.set){for(let o of e.set){let s=bV(i,o,t);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},CV=[new kC(">=0.0.0-0")],YA=[new kC(">=0.0.0")],bV=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===OC){if(e.length===1&&e[0].semver===OC)return!0;t.includePrerelease?r=CV:r=YA}if(e.length===1&&e[0].semver===OC){if(t.includePrerelease)return!0;e=YA}let n=new Set,i,o;for(let v of r)v.operator===">"||v.operator===">="?i=VA(i,v,t):v.operator==="<"||v.operator==="<="?o=jA(o,v,t):n.add(v.semver);if(n.size>1)return null;let s;if(i&&o){if(s=LC(i.semver,o.semver,t),s>0)return null;if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let v of n){if(i&&!Np(v,String(i),t)||o&&!Np(v,String(o),t))return null;for(let m of e)if(!Np(v,String(m),t))return!1;return!0}let a,c,l,u,d=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1,f=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;d&&d.prerelease.length===1&&o.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let v of e){if(u=u||v.operator===">"||v.operator===">=",l=l||v.operator==="<"||v.operator==="<=",i){if(f&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===f.major&&v.semver.minor===f.minor&&v.semver.patch===f.patch&&(f=!1),v.operator===">"||v.operator===">="){if(a=VA(i,v,t),a===v&&a!==i)return!1}else if(i.operator===">="&&!Np(i.semver,String(v),t))return!1}if(o){if(d&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===d.major&&v.semver.minor===d.minor&&v.semver.patch===d.patch&&(d=!1),v.operator==="<"||v.operator==="<="){if(c=jA(o,v,t),c===v&&c!==o)return!1}else if(o.operator==="<="&&!Np(o.semver,String(v),t))return!1}if(!v.operator&&(o||i)&&s!==0)return!1}return!(i&&l&&!o&&s!==0||o&&u&&!i&&s!==0||f||d)},VA=(r,e,t)=>{if(!r)return e;let n=LC(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},jA=(r,e,t)=>{if(!r)return e;let n=LC(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};qA.exports=EV});var WA=le((q5,GA)=>{var FC=sd(),HA=Tp(),xV=Zr(),BA=yC(),PV=yl(),DV=uw(),IV=fw(),NV=mw(),RV=yw(),wV=_w(),AV=Ew(),OV=bw(),kV=Pw(),LV=pi(),FV=Rw(),MV=Aw(),UV=Ch(),YV=Fw(),VV=Uw(),jV=Cp(),qV=bh(),KV=_C(),HV=TC(),BV=xh(),GV=Ph(),WV=EC(),zV=Ww(),$V=Pp(),JV=vi(),XV=Ip(),QV=mA(),ZV=hA(),ej=SA(),tj=EA(),rj=bA(),nj=Rh(),ij=RA(),oj=AA(),sj=LA(),aj=MA(),cj=KA();GA.exports={parse:PV,valid:DV,clean:IV,inc:NV,diff:RV,major:wV,minor:AV,patch:OV,prerelease:kV,compare:LV,rcompare:FV,compareLoose:MV,compareBuild:UV,sort:YV,rsort:VV,gt:jV,lt:qV,eq:KV,neq:HV,gte:BV,lte:GV,cmp:WV,coerce:zV,Comparator:$V,Range:JV,satisfies:XV,toComparators:QV,maxSatisfying:ZV,minSatisfying:ej,minVersion:tj,validRange:rj,outside:nj,gtr:ij,ltr:oj,intersects:sj,simplifyRange:aj,subset:cj,SemVer:xV,re:FC.re,src:FC.src,tokens:FC.t,SEMVER_SPEC_VERSION:HA.SEMVER_SPEC_VERSION,RELEASE_TYPES:HA.RELEASE_TYPES,compareIdentifiers:BA.compareIdentifiers,rcompareIdentifiers:BA.rcompareIdentifiers}});var ud,zA,ve,Wt=C(()=>{"use strict";ud=U(WA()),zA=U(require("vscode")),ve=class r{constructor(e,t,n){this.displayName=e;this.version=t;this.fullVersionString=n}static fromSimpleString(e){return new r(e,e,e)}static defaultVersion=r.fromSimpleString("1.0.0");static v380=r.fromSimpleString("3.8.0");static v390=r.fromSimpleString("3.9.0");static v400=r.fromSimpleString("4.0.0");static v401=r.fromSimpleString("4.0.1");static v420=r.fromSimpleString("4.2.0");static v430=r.fromSimpleString("4.3.0");static v440=r.fromSimpleString("4.4.0");static v460=r.fromSimpleString("4.6.0");static v470=r.fromSimpleString("4.7.0");static v490=r.fromSimpleString("4.9.0");static v500=r.fromSimpleString("5.0.0");static v510=r.fromSimpleString("5.1.0");static v520=r.fromSimpleString("5.2.0");static v544=r.fromSimpleString("5.4.4");static v540=r.fromSimpleString("5.4.0");static v560=r.fromSimpleString("5.6.0");static v570=r.fromSimpleString("5.7.0");static v590=r.fromSimpleString("5.9.0");static fromVersionString(e){let t=ud.valid(e);if(!t)return new r(zA.l10n.t("invalid version"),"1.0.0","1.0.0");let n=e.indexOf("-");return n>=0&&(t=t.substr(0,n)),new r(e,t,e)}eq(e){return ud.eq(this.version,e.version)}gte(e){return ud.gte(this.version,e.version)}lt(e){return!this.gte(e)}isYarnPnp(){return this.fullVersionString.includes("-sdk")}}});var $A,lj,Pt,No=C(()=>{"use strict";$A=U(require("vscode")),lj=$A.Disposable.from(),Pt={isCancellationRequested:!1,onCancellationRequested:()=>lj}});function El(r){return r.startsWith("/dev/null/")}function MC(r,e,t){let n={module:r.gte(ve.v540)?"Preserve":"ESNext",moduleResolution:r.gte(ve.v540)?"Bundler":"Node",target:"ES2022",jsx:"react-jsx"};return r.gte(ve.v500)&&(n.allowImportingTsExtensions=!0),t.implicitProjectConfiguration.checkJs&&(n.checkJs=!0,e===0&&(n.allowJs=!0)),t.implicitProjectConfiguration.experimentalDecorators&&(n.experimentalDecorators=!0),t.implicitProjectConfiguration.strictNullChecks&&(n.strictNullChecks=!0),t.implicitProjectConfiguration.strictFunctionTypes&&(n.strictFunctionTypes=!0),t.implicitProjectConfiguration.strict&&(n.strict=!0),t.implicitProjectConfiguration.module&&(n.module=t.implicitProjectConfiguration.module),t.implicitProjectConfiguration.target&&(n.target=t.implicitProjectConfiguration.target),e===0&&(n.sourceMap=!0),n}function uj(r,e,t){let n=MC(r,e,t);e===0&&delete n.allowImportingTsExtensions;let i=Object.keys(n).map(o=>`"${o}": ${JSON.stringify(n[o])}`);return new St.SnippetString(`{
	"compilerOptions": {
		${i.join(`,
		`)}$0
	},
	"exclude": [
		"node_modules",
		"**/node_modules/*"
	]
}`)}async function Rp(r,e,t,n){let i=St.Uri.joinPath(t,e===0?"tsconfig.json":"jsconfig.json"),o=St.window.activeTextEditor?.viewColumn;try{let s=await St.workspace.openTextDocument(i);return St.window.showTextDocument(s,o)}catch{let s=await St.workspace.openTextDocument(i.with({scheme:"untitled"})),a=await St.window.showTextDocument(s,o);return a.document.getText().length===0&&await a.insertSnippet(uj(r,e,n)),a}}async function UC(r,e,t,n){if(!El(n)){let s=await St.workspace.openTextDocument(e.toResource(n));St.window.showTextDocument(s,St.window.activeTextEditor?.viewColumn);return}let i={title:r===0?St.l10n.t("Configure tsconfig.json"):St.l10n.t("Configure jsconfig.json")};if(await St.window.showInformationMessage(r===0?St.l10n.t("File is not part of a TypeScript project. View the [tsconfig.json documentation]({0}) to learn more.","https://go.microsoft.com/fwlink/?linkid=841896"):St.l10n.t("File is not part of a JavaScript project. View the [jsconfig.json documentation]({0}) to learn more.","https://go.microsoft.com/fwlink/?linkid=759670"),i)===i){Rp(e.apiVersion,r,t,e.configuration);return}}async function wp(r,e,t){let n=e.getWorkspaceRootForResource(t);if(!n){St.window.showInformationMessage(St.l10n.t("Please open a folder in VS Code to use a TypeScript or JavaScript project"));return}let i=e.toTsFilePath(t);if(!i||!e.toTsFilePath(t)){St.window.showWarningMessage(St.l10n.t("Could not determine TypeScript or JavaScript project. Unsupported file type"));return}let o;try{o=await e.execute("projectInfo",{file:i,needFileNameList:!1},Pt)}catch{}if(o?.type!=="response"||!o.body){St.window.showWarningMessage(St.l10n.t("Could not determine TypeScript or JavaScript project"));return}return UC(r,e,n,o.body.configFileName)}var St,dd=C(()=>{"use strict";St=U(require("vscode"));Wt();No()});function Ro(r){return VC.languages.match([Cl,Ns,Ma,Ua],r)>0}function bl(r){return VC.languages.match([Cl,Ns],r)>0}var VC,Cl,Ns,Ma,Ua,Oh,mi=C(()=>{"use strict";VC=U(require("vscode")),Cl="typescript",Ns="typescriptreact",Ma="javascript",Ua="javascriptreact",Oh=[Ma,Ua,Cl,Ns]});var xl,fd,qC=C(()=>{"use strict";xl=U(require("vscode"));mi();fd=class r{static id="_typescript.learnMoreAboutRefactorings";id=r.id;execute(){let e=xl.window.activeTextEditor&&bl(xl.window.activeTextEditor.document)?"https://go.microsoft.com/fwlink/?linkid=2114477":"https://go.microsoft.com/fwlink/?linkid=2116761";xl.env.openExternal(xl.Uri.parse(e))}}});var Va,Ya,KC=C(()=>{"use strict";Va=U(require("vscode")),Ya=class r{static id="_typescript.openJsDocLink";id=r.id;async execute(e){let{line:t,character:n}=e.position,i=new Va.Position(t,n);await Va.commands.executeCommand("vscode.open",Va.Uri.from(e.file),{selection:new Va.Range(i,i)})}}});function Rs(r,e,t=(n,i)=>n===i){return r===e?!0:r.length!==e.length?!1:r.every((n,i)=>t(n,e[i]))}function _r(r){return r.filter(e=>!!e)}var Ap,gi=C(()=>{"use strict";Ap=Object.freeze([])});function Vi(r,e){if(r===e)return!0;if(r==null||e===null||e===void 0||typeof r!=typeof e||typeof r!="object"||Array.isArray(r)!==Array.isArray(e))return!1;if(Array.isArray(r))return Rs(r,e,Vi);{let t=[];for(let i in r)t.push(i);t.sort();let n=[];for(let i in e)n.push(i);return n.sort(),Rs(t,n)?t.every(i=>Vi(r[i],e[i])):!1}}var Op=C(()=>{"use strict";gi()});var zC=le(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.TargetPopulation=Ka.Filters=Ka.VSCodeFilterProvider=void 0;var Kh=require("vscode"),WC=class r{constructor(e,t,n){this.extensionName=e,this.extensionVersion=t,this.targetPopulation=n}static trimVersionSuffix(e){let t=/\-[a-zA-Z0-9]+$/;return e.split(t)[0]}getFilterValue(e){switch(e){case Ao.ApplicationVersion:return r.trimVersionSuffix(Kh.version);case Ao.Build:return Kh.env.appName;case Ao.ClientId:return Kh.env.machineId;case Ao.ExtensionName:return this.extensionName;case Ao.ExtensionVersion:return r.trimVersionSuffix(this.extensionVersion);case Ao.Language:return Kh.env.language;case Ao.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let e=new Map,t=Object.values(Ao);for(let n of t)e.set(n,this.getFilterValue(n));return e}};Ka.VSCodeFilterProvider=WC;var Ao;(function(r){r.Market="X-MSEdge-Market",r.CorpNet="X-FD-Corpnet",r.ApplicationVersion="X-VSCode-AppVersion",r.Build="X-VSCode-Build",r.ClientId="X-MSEdge-ClientId",r.ExtensionName="X-VSCode-ExtensionName",r.ExtensionVersion="X-VSCode-ExtensionVersion",r.Language="X-VSCode-Language",r.TargetPopulation="X-VSCode-TargetPopulation"})(Ao||(Ka.Filters=Ao={}));var i0;(function(r){r.Team="team",r.Internal="internal",r.Insiders="insider",r.Public="public"})(i0||(Ka.TargetPopulation=i0={}))});var o0=le(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});Hh.BaseFeatureProvider=void 0;var $C=class{constructor(e){this.telemetry=e,this.isFetching=!1}async getFeatures(){if(this.isFetching&&this.fetchPromise)return this.fetchPromise;this.fetchPromise=this.fetch();let e=await this.fetchPromise;return this.isFetching=!1,this.fetchPromise=void 0,e}};Hh.BaseFeatureProvider=$C});var s0=le(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});Bh.FilteredFeatureProvider=void 0;var pj=o0(),JC=class extends pj.BaseFeatureProvider{constructor(e,t){super(e),this.telemetry=e,this.filterProviders=t,this.cachedTelemetryEvents=[]}getFilters(){let e=new Map;for(let t of this.filterProviders){let n=t.getFilters();for(let i of n.keys()){let o=n.get(i);e.set(i,o)}}return e}PostEventToTelemetry(e){if(this.cachedTelemetryEvents.includes(e))return;let t=JSON.stringify(e);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",t]])),this.cachedTelemetryEvents.push(e)}};Bh.FilteredFeatureProvider=JC});var a0=le(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.TasApiFeatureProvider=Ha.TASAPI_FETCHERROR_EVENTNAME=void 0;var vj=s0();Ha.TASAPI_FETCHERROR_EVENTNAME="call-tas-error";var XC="ErrorType",QC=class extends vj.FilteredFeatureProvider{constructor(e,t,n){super(t,n),this.httpClient=e,this.telemetry=t,this.filterProviders=n}async fetch(){let e=this.getFilters(),t={};for(let a of e.keys()){let c=e.get(a);t[a]=c}let n;try{n=await this.httpClient.get({headers:t})}catch(a){let c=a,l=new Map;c.responseReceived&&!c.responseOk?l.set(XC,"ServerError"):c.responseReceived===!1?l.set(XC,"NoResponse"):l.set(XC,"GenericError"),this.telemetry.postEvent(Ha.TASAPI_FETCHERROR_EVENTNAME,l)}if(!n)throw Error(Ha.TASAPI_FETCHERROR_EVENTNAME);e.keys.length>0&&this.PostEventToTelemetry(t);let i=n.data,o=i.Configs,s=[];for(let a of o)if(a.Parameters)for(let c of Object.keys(a.Parameters)){let l=c+(a.Parameters[c]?"":"cf");s.includes(l)||s.push(l)}return{features:s,assignmentContext:i.AssignmentContext,configs:o}}};Ha.TasApiFeatureProvider=QC});var c0=le(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.HttpClient=md.FetchError=void 0;var vd=class extends Error{constructor(e,t,n){super(e),this.responseReceived=t,this.responseOk=n}};md.FetchError=vd;var ZC=class{constructor(e){this.endpoint=e}async get(e){let t=await fetch(this.endpoint,{method:"GET",headers:e?.headers});if(!t)throw new vd("No response received",!1);if(!t.ok)throw new vd("Response not ok",!0,!1);let n=await t.json();if(!n)throw new vd("No data received",!1);return{data:n}}};md.HttpClient=ZC});var l0=le(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});Gh.MemoryKeyValueStorage=void 0;var eb=class{constructor(){this.storage=new Map}async getValue(e,t){return this.storage.has(e)?await Promise.resolve(this.storage.get(e)):await Promise.resolve(t||void 0)}setValue(e,t){this.storage.set(e,t)}};Gh.MemoryKeyValueStorage=eb});var u0=le(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});Wh.ExperimentationServiceBase=void 0;var mj=l0(),tb=class{get features(){return this._features}set features(e){this._features=e,this.telemetry&&this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext)}constructor(e,t,n,i,o){this.telemetry=e,this.assignmentContextTelemetryPropertyName=t,this.telemetryEventName=n,this.storageKey=i,this.storage=o,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(o=new mj.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise((s,a)=>{this.resolveInitialFetchPromise=s})}async getFeaturesAsync(e=!1){if(this.fetchPromise!=null){try{await this.fetchPromise}catch{}return this.features}if(!this.featureProviders||this.featureProviders.length===0)return Promise.resolve({features:[],assignmentContext:"",configs:[]});try{this.fetchPromise=Promise.all(this.featureProviders.map(async n=>await n.getFeatures()));let t=await this.fetchPromise;this.updateFeatures(t,e)}catch{}return this.fetchPromise=void 0,this.resolveInitialFetchPromise&&(this.resolveInitialFetchPromise(),this.resolveInitialFetchPromise=void 0),this.features}updateFeatures(e,t=!1){let n={features:[],assignmentContext:"",configs:[]};for(let i of e){for(let o of i.features)n.features.includes(o)||n.features.push(o);for(let o of i.configs){let s=n.configs.find(a=>a.Id===o.Id);s?s.Parameters=Object.assign(Object.assign({},s.Parameters),o.Parameters):n.configs.push(o)}n.assignmentContext+=i.assignmentContext}(t||!this.featuresConsumed)&&(this.features=n),this.storage&&this.storage.setValue(this.storageKey,n)}async loadCachedFeatureData(){let e;this.storage&&(e=await this.storage.getValue(this.storageKey),e!==void 0&&e.configs===void 0&&(e.configs=[])),this.features.features.length===0&&(this.features=e||{features:[],assignmentContext:"",configs:[]})}isFlightEnabled(e){return this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isCachedFlightEnabled(e){return await this.loadCachePromise,this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isFlightEnabledAsync(e){let t=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(e),t.features.includes(e)}getTreatmentVariable(e,t){this.featuresConsumed=!0,this.PostEventToTelemetry(`${e}.${t}`);let n=this.features.configs.find(i=>i.Id===e);return n?.Parameters[t]}async getTreatmentVariableAsync(e,t,n){if(n){let i=this.featuresConsumed,o=this.getTreatmentVariable(e,t);if(o===void 0)this.featuresConsumed=i;else return o}return await this.getFeaturesAsync(!0),this.getTreatmentVariable(e,t)}PostEventToTelemetry(e){this.cachedTelemetryEvents.includes(e)||(this.telemetry.postEvent(this.telemetryEventName,new Map([["ABExp.queriedFeature",e]])),this.cachedTelemetryEvents.push(e))}invokeInit(){this.init()}addFeatureProvider(...e){if(!(e==null||this.featureProviders==null))for(let t of e)this.featureProviders.push(t)}};Wh.ExperimentationServiceBase=tb});var d0=le(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.PollingService=void 0;var rb=class{constructor(e){this.fetchInterval=e}StopPolling(){clearInterval(this.intervalHandle),this.intervalHandle=void 0}OnPollTick(e){this.onTick=e}StartPolling(e=!1){this.intervalHandle&&this.StopPolling(),this.onTick!=null&&(e&&this.onTick().then(()=>{}).catch(()=>{}),this.intervalHandle=setInterval(async()=>{await this.onTick()},this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}};zh.PollingService=rb});var f0=le($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.ExperimentationServiceAutoPolling=void 0;var gj=u0(),hj=d0(),nb=class extends gj.ExperimentationServiceBase{constructor(e,t,n,i,o,s,a){if(super(e,i,o,s,a),this.telemetry=e,this.filterProviders=t,this.refreshRateMs=n,this.assignmentContextTelemetryPropertyName=i,this.telemetryEventName=o,this.storageKey=s,this.storage=a,n<1e3&&n!==0)throw new Error("The minimum refresh rate for polling is 1000 ms (1 second). If you wish to deactivate this auto-polling use value of 0.");n>0&&(this.pollingService=new hj.PollingService(n),this.pollingService.OnPollTick(async()=>{await super.getFeaturesAsync()}))}init(){this.pollingService?this.pollingService.StartPolling(!0):super.getFeaturesAsync()}async getFeaturesAsync(e=!1){if(this.pollingService){this.pollingService.StopPolling();let t=await super.getFeaturesAsync(e);return this.pollingService.StartPolling(),t}else return await super.getFeaturesAsync(e)}};$h.ExperimentationServiceAutoPolling=nb});var p0=le(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});Xh.ExperimentationService=void 0;var yj=a0(),Sj=c0(),_j=f0(),Jh=class extends _j.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],e.refetchInterval!=null?e.refetchInterval:0,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new yj.TasApiFeatureProvider(new Sj.HttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}};Xh.ExperimentationService=Jh;Jh.REFRESH_RATE_IN_MINUTES=30});var v0=le(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.ExperimentationService=void 0;var Tj=p0();Object.defineProperty(Qh,"ExperimentationService",{enumerable:!0,get:function(){return Tj.ExperimentationService}})});var m0=le(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});Zh.MementoKeyValueStorage=void 0;var ib=class{constructor(e){this.mementoGlobalStorage=e}async getValue(e,t){return await this.mementoGlobalStorage.get(e)||t}setValue(e,t){this.mementoGlobalStorage.update(e,t)}};Zh.MementoKeyValueStorage=ib});var g0=le(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});var ob=class{constructor(){this.initializePromise=Promise.resolve(),this.initialFetch=Promise.resolve()}isFlightEnabled(e){return!1}isCachedFlightEnabled(e){return Promise.resolve(!1)}isFlightEnabledAsync(e){return Promise.resolve(!1)}getTreatmentVariable(e,t){}getTreatmentVariableAsync(e,t){return Promise.resolve(void 0)}};sb.default=ob});var y0=le(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.getExperimentationServiceAsync=gd.getExperimentationService=void 0;var Ej=zC(),Cj=v0(),ab=require("vscode"),bj=m0(),xj=g0(),Pj="https://default.exp-tas.com/vscode/ab",Dj="query-expfeature",Ij="abexp.assignmentcontext",Nj="VSCode.ABExp.FeatureData",Rj=1e3*60*30;function h0(r,e,t,n,i,...o){if(!i)throw new Error("Memento storage was not provided.");let s=ab.workspace.getConfiguration("telemetry");if(!(ab.env.isTelemetryEnabled===void 0?s.get("enableTelemetry",!0):ab.env.isTelemetryEnabled))return new xj.default;let l=[new Ej.VSCodeFilterProvider(r,e,t),...o],u=new bj.MementoKeyValueStorage(i);return new Cj.ExperimentationService({filterProviders:l,telemetry:n,storageKey:Nj,keyValueStorage:u,featuresTelemetryPropertyName:"",assignmentContextTelemetryPropertyName:Ij,telemetryEventName:Dj,endpoint:Pj,refetchInterval:Rj})}gd.getExperimentationService=h0;async function wj(r,e,t,n,i,...o){let s=h0(r,e,t,n,i,...o);return await s.initializePromise,s}gd.getExperimentationServiceAsync=wj});var _0=le(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.TargetPopulation=Ba.getExperimentationServiceAsync=Ba.getExperimentationService=void 0;var S0=y0();Object.defineProperty(Ba,"getExperimentationService",{enumerable:!0,get:function(){return S0.getExperimentationService}});Object.defineProperty(Ba,"getExperimentationServiceAsync",{enumerable:!0,get:function(){return S0.getExperimentationServiceAsync}});var Aj=zC();Object.defineProperty(Ba,"TargetPopulation",{enumerable:!0,get:function(){return Aj.TargetPopulation}})});function E0(r){return/^tsconfig\.(.+\.)?json$/i.test((0,cb.basename)(r))}function hd(r){return/^[jt]sconfig\.(.+\.)?json$/i.test((0,cb.basename)(r))}function yd(r){return/\.(tsx?|mts|cts)$/i.test(r.fsPath)}function C0(r){return/\.(jsx?|mjs|cjs)$/i.test(r.fsPath)}var cb,lb,Wa=C(()=>{"use strict";cb=require("path");mi();lb=[{id:"typescript",diagnosticOwner:"typescript",diagnosticSource:"ts",diagnosticLanguage:1,languageIds:[Cl,Ns],configFilePattern:/^tsconfig(\..*)?\.json$/i,standardFileExtensions:["ts","tsx","cts","mts"]},{id:"javascript",diagnosticOwner:"typescript",diagnosticSource:"ts",diagnosticLanguage:0,languageIds:[Ma,Ua],configFilePattern:/^jsconfig(\..*)?\.json$/i,standardFileExtensions:["js","jsx","cjs","mjs","es6","pac"]}]});function en(){return!(typeof process=="object"&&process.versions.node)&&ty.env.uiKind===ty.UIKind.Web}function za(){return en()&&!!globalThis.crossOriginIsolated}function b0(){return en()&&"ReadableByteStreamController"in globalThis}var ty,Sd=C(()=>{"use strict";ty=U(require("vscode"))});function ry(){let r=[kj,db,fb,_d];return en()?[...(x0.workspace.workspaceFolders??[]).map(e=>e.uri.scheme),...r]:[ji,...r]}function kp(r,...e){let t=r.scheme.toLowerCase();return e.some(n=>t===n)}var x0,ji,kj,ub,Lj,Fj,Mj,Uj,db,fb,P0,_d,Dl,qi=C(()=>{"use strict";x0=U(require("vscode"));Sd();ji="file",kj="untitled",ub="git",Lj="github",Fj="azurerepos",Mj="chat-editing-text-model",Uj="vsls",db="walkThroughSnippet",fb="vscode-notebook-cell",P0="office-script",_d="vscode-chat-code-block";Dl=new Set([ub,Uj,Lj,Fj,Mj])});async function Il(r){try{return!!((await ny.workspace.fs.stat(r)).type&ny.FileType.File)}catch{return!1}}function iy(r){return/^[a-zA-Z]:[\/\\]/.test(r)}var ny,oy=C(()=>{"use strict";ny=U(require("vscode"))});var Rn,sy=C(()=>{"use strict";qi();oy();Rn=class r{constructor(e=r.defaultPathNormalizer,t){this._normalizePath=e;this.config=t}static defaultPathNormalizer=e=>e.scheme===ji?e.fsPath:e.toString(!0);_map=new Map;get size(){return this._map.size}has(e){let t=this.toKey(e);return!!t&&this._map.has(t)}get(e){let t=this.toKey(e);if(!t)return;let n=this._map.get(t);return n?n.value:void 0}set(e,t){let n=this.toKey(e);if(!n)return;let i=this._map.get(n);i?i.value=t:this._map.set(n,{resource:e,value:t})}delete(e){let t=this.toKey(e);t&&this._map.delete(t)}clear(){this._map.clear()}values(){return Array.from(this._map.values(),e=>e.value)}entries(){return this._map.values()}toKey(e){let t=this._normalizePath(e);return t&&(this.isCaseInsensitivePath(t)?t.toLowerCase():t)}isCaseInsensitivePath(e){return iy(e)?!0:e[0]==="/"&&this.config.onCaseInsensitiveFileSystem}}});function Yj(r,e){return Vi(r,e)}function D0(r,e){return r===e?void 0:r}function pb(r,e){return{includeInlayParameterNameHints:Vj(r,e),includeInlayParameterNameHintsWhenArgumentMatchesName:!H(Oo.parameterNamesSuppressWhenArgumentMatchesName,!0,{scope:r,fallbackSection:e}),includeInlayFunctionParameterTypeHints:H(Oo.parameterTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayVariableTypeHints:H(Oo.variableTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayVariableTypeHintsWhenTypeMatchesName:!H(Oo.variableTypesSuppressWhenTypeMatchesName,!0,{scope:r,fallbackSection:e}),includeInlayPropertyDeclarationTypeHints:H(Oo.propertyDeclarationTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayFunctionLikeReturnTypeHints:H(Oo.functionLikeReturnTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayEnumMemberValueHints:H(Oo.enumMemberValuesEnabled,!1,{scope:r,fallbackSection:e})}}function Vj(r,e){switch(H(Oo.parameterNamesEnabled,"none",{scope:r,fallbackSection:e})){case"none":return"none";case"literals":return"literals";case"all":return"all";default:return}}function jj(r,e){switch(H("preferences.quoteStyle","auto",{scope:r,fallbackSection:e})){case"single":return"single";case"double":return"double";default:return"auto"}}function qj(r,e){switch(H("preferences.importModuleSpecifier","shortest",{scope:r,fallbackSection:e})){case"project-relative":return"project-relative";case"relative":return"relative";case"non-relative":return"non-relative";default:return}}function Kj(r,e){switch(H("preferences.importModuleSpecifierEnding","auto",{scope:r,fallbackSection:e})){case"minimal":return"minimal";case"index":return"index";case"js":return"js";default:return"auto"}}function Hj(r,e){switch(H("preferences.jsxAttributeCompletionStyle","auto",{scope:r,fallbackSection:e})){case"braces":return"braces";case"none":return"none";default:return"auto"}}function Bj(r,e){let t=H("preferences.organizeImports.unicodeCollation","ordinal",{scope:r,fallbackSection:e}),n=H("preferences.organizeImports.caseSensitivity","auto",{scope:r,fallbackSection:e});return{organizeImportsTypeOrder:D0(H("preferences.organizeImports.typeOrder","auto",{scope:r,fallbackSection:e}),"auto"),organizeImportsIgnoreCase:n==="caseInsensitive"?!0:n==="caseSensitive"?!1:"auto",organizeImportsCollation:t,...t==="unicode"?{organizeImportsCaseFirst:n==="caseInsensitive"?void 0:D0(H("preferences.organizeImports.caseFirst",!1,{scope:r,fallbackSection:e}),"default"),organizeImportsAccentCollation:H("preferences.organizeImports.accentCollation",void 0,{scope:r,fallbackSection:e}),organizeImportsLocale:H("preferences.organizeImports.locale",void 0,{scope:r,fallbackSection:e}),organizeImportsNumericCollation:H("preferences.organizeImports.numericCollation",void 0,{scope:r,fallbackSection:e})}:{}}}var Td,As,Lp,Oo,vb=C(()=>{"use strict";Td=U(require("path")),As=U(require("vscode"));qi();mi();Wt();Mt();gt();Op();sy();Lp=class extends _e{constructor(t,n){super();this.client=t;this.formatOptions=new Rn(void 0,{onCaseInsensitiveFileSystem:n}),As.workspace.onDidCloseTextDocument(i=>{this.formatOptions.delete(i.uri)},void 0,this._disposables)}formatOptions;async ensureConfigurationForDocument(t,n){let i=this.getFormattingOptions(t);if(i)return this.ensureConfigurationOptions(t,i,n)}getFormattingOptions(t){let n=As.window.visibleTextEditors.find(i=>i.document.uri.toString()===t.uri.toString());if(n)return{tabSize:typeof n.options.tabSize=="number"?n.options.tabSize:void 0,insertSpaces:typeof n.options.insertSpaces=="boolean"?n.options.insertSpaces:void 0}}async ensureConfigurationOptions(t,n,i){let o=this.client.toOpenTsFilePath(t);if(!o)return;let s=this.getFileOptions(t,n),a=this.formatOptions.get(t.uri);if(a){let l=await a;if(i.isCancellationRequested||l&&Yj(l,s))return}let c=(async()=>{try{return(await this.client.execute("configure",{file:o,...s},i)).type==="response"?s:void 0}catch{return}})();this.formatOptions.set(t.uri,c),await c}async setGlobalConfigurationFromDocument(t,n){let i=this.getFormattingOptions(t);if(!i)return;let o={file:void 0,...this.getFileOptions(t,i)};await this.client.execute("configure",o,n)}reset(){this.formatOptions.clear()}getFileOptions(t,n){return{formatOptions:this.getFormatOptions(t,n),preferences:this.getPreferences(t)}}getFormatOptions(t,n){let i=bl(t)?"typescript":"javascript";return{tabSize:n.tabSize,indentSize:n.tabSize,convertTabsToSpaces:n.insertSpaces,newLineCharacter:`
`,insertSpaceAfterCommaDelimiter:H("format.insertSpaceAfterCommaDelimiter",!0,{scope:t,fallbackSection:i}),insertSpaceAfterConstructor:H("format.insertSpaceAfterConstructor",!1,{scope:t,fallbackSection:i}),insertSpaceAfterSemicolonInForStatements:H("format.insertSpaceAfterSemicolonInForStatements",!0,{scope:t,fallbackSection:i}),insertSpaceBeforeAndAfterBinaryOperators:H("format.insertSpaceBeforeAndAfterBinaryOperators",!0,{scope:t,fallbackSection:i}),insertSpaceAfterKeywordsInControlFlowStatements:H("format.insertSpaceAfterKeywordsInControlFlowStatements",!0,{scope:t,fallbackSection:i}),insertSpaceAfterFunctionKeywordForAnonymousFunctions:H("format.insertSpaceAfterFunctionKeywordForAnonymousFunctions",!0,{scope:t,fallbackSection:i}),insertSpaceBeforeFunctionParenthesis:H("format.insertSpaceBeforeFunctionParenthesis",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:H("format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:H("format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:H("format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces",!0,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingEmptyBraces:H("format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces",!0,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:H("format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:H("format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces",!1,{scope:t,fallbackSection:i}),insertSpaceAfterTypeAssertion:H("format.insertSpaceAfterTypeAssertion",!1,{scope:t,fallbackSection:i}),placeOpenBraceOnNewLineForFunctions:H("format.placeOpenBraceOnNewLineForFunctions",!1,{scope:t,fallbackSection:i}),placeOpenBraceOnNewLineForControlBlocks:H("format.placeOpenBraceOnNewLineForControlBlocks",!1,{scope:t,fallbackSection:i}),semicolons:H("format.semicolons","ignore",{scope:t,fallbackSection:i}),indentSwitchCase:H("format.indentSwitchCase",!0,{scope:t,fallbackSection:i})}}getPreferences(t){let n=bl(t)?"typescript":"javascript";return{...As.workspace.getConfiguration(n,t).get("unstable"),quotePreference:jj(t,n),importModuleSpecifierPreference:qj(t,n),importModuleSpecifierEnding:Kj(t,n),jsxAttributeCompletionStyle:Hj(t,n),allowTextChangesInNewFiles:t.uri.scheme===ji,providePrefixAndSuffixTextForRename:H("preferences.useAliasesForRenames",!0,{scope:t,fallbackSection:n}),allowRenameOfImportPath:!0,includeAutomaticOptionalChainCompletions:H("suggest.includeAutomaticOptionalChainCompletions",!0,{scope:t,fallbackSection:n}),provideRefactorNotApplicableReason:!0,generateReturnInDocTemplate:H("suggest.jsdoc.generateReturns",!0,{scope:t,fallbackSection:n}),includeCompletionsForImportStatements:H("suggest.includeCompletionsForImportStatements",!0,{scope:t,fallbackSection:n}),includeCompletionsWithSnippetText:!0,includeCompletionsWithClassMemberSnippets:H("suggest.classMemberSnippets.enabled",!0,{scope:t,fallbackSection:n}),includeCompletionsWithObjectLiteralMethodSnippets:H("suggest.objectLiteralMethodSnippets.enabled",!0,{scope:t,fallbackSection:n}),autoImportFileExcludePatterns:this.getAutoImportFileExcludePatternsPreference(t,n,As.workspace.getWorkspaceFolder(t.uri)?.uri),autoImportSpecifierExcludeRegexes:H("preferences.autoImportSpecifierExcludeRegexes",void 0,{scope:t,fallbackSection:n}),preferTypeOnlyAutoImports:H("preferences.preferTypeOnlyAutoImports",!1,{scope:t,fallbackSection:n}),useLabelDetailsInCompletionEntries:!0,allowIncompleteCompletions:!0,displayPartsForJSDoc:!0,disableLineTextInReferences:!0,interactiveInlayHints:!0,includeCompletionsForModuleExports:H("suggest.autoImports",!0,{scope:t,fallbackSection:n}),...pb(t,n),...Bj(t,n),maximumHoverLength:this.getMaximumHoverLength(t)}}getAutoImportFileExcludePatternsPreference(t,n,i){let o=H("preferences.autoImportFileExcludePatterns",void 0,{scope:t,fallbackSection:n});return i&&o?.map(s=>{let a=/^\.\.?($|[\/\\])/.test(s),c=this.client.apiVersion.gte(ve.v540)?"":Td.parse(this.client.toTsFilePath(i)).root;return Td.isAbsolute(s)?s:s.startsWith("*")?c+s:a?this.client.toTsFilePath(As.Uri.joinPath(i,s)):c+"**"+Td.sep+s})}getMaximumHoverLength(t){let i=As.workspace.getConfiguration("js/ts",t).get("hover.maximumLength",500);return!Number.isSafeInteger(i)||i<=0?500:i}};Oo=Object.freeze({parameterNamesEnabled:"inlayHints.parameterNames.enabled",parameterNamesSuppressWhenArgumentMatchesName:"inlayHints.parameterNames.suppressWhenArgumentMatchesName",parameterTypesEnabled:"inlayHints.parameterTypes.enabled",variableTypesEnabled:"inlayHints.variableTypes.enabled",variableTypesSuppressWhenTypeMatchesName:"inlayHints.variableTypes.suppressWhenTypeMatchesName",propertyDeclarationTypesEnabled:"inlayHints.propertyDeclarationTypes.enabled",functionLikeReturnTypesEnabled:"inlayHints.functionLikeReturnTypes.enabled",enumMemberValuesEnabled:"inlayHints.enumMemberValues.enabled"})});var Ed,ay=C(()=>{"use strict";Ed=Object.freeze({file:"file",untitled:"untitled",mailto:"mailto",vscode:"vscode","vscode-insiders":"vscode-insiders",notebookCell:"vscode-notebook-cell"})});var ko,$a,ut=C(()=>{"use strict";(n=>{class r{constructor(o){this.reason=o}type="cancelled"}n.Cancelled=r,n.NoContent={type:"noContent"},n.NoServer={type:"noServer"}})(ko||={});$a=class{capabilities;constructor(...e){this.capabilities=new Set(e)}has(e){return this.capabilities.has(e)}}});function Os(r){return new Set(r.split(/,|\s+/g))}var Fp=C(()=>{"use strict"});var L,Rl,Wn,ks,wn=C(()=>{"use strict";L=class{static alias="alias";static callSignature="call";static class="class";static const="const";static constructorImplementation="constructor";static constructSignature="construct";static directory="directory";static enum="enum";static enumMember="enum member";static externalModuleName="external module name";static function="function";static indexSignature="index";static interface="interface";static keyword="keyword";static let="let";static localFunction="local function";static localVariable="local var";static method="method";static memberGetAccessor="getter";static memberSetAccessor="setter";static memberVariable="property";static module="module";static primitiveType="primitive type";static script="script";static type="type";static variable="var";static warning="warning";static string="string";static parameter="parameter";static typeParameter="type parameter"},Rl=class{static error="error";static warning="warning";static suggestion="suggestion"},Wn=class r{static optional="optional";static deprecated="deprecated";static color="color";static dtsFile=".d.ts";static tsFile=".ts";static tsxFile=".tsx";static jsFile=".js";static jsxFile=".jsx";static jsonFile=".json";static fileExtensionKindModifiers=[r.dtsFile,r.tsFile,r.tsxFile,r.jsFile,r.jsxFile,r.jsonFile]},ks=class{static functionName="functionName";static methodName="methodName";static parameterName="parameterName";static propertyName="propertyName";static punctuation="punctuation";static text="text"}});var He,Se,ye,Tr,Ja,qr,yb,Sb,_b,$e=C(()=>{"use strict";He=U(require("vscode"));wn();(a=>(a.fromTextSpan=c=>(0,a.fromLocations)(c.start,c.end),a.toTextSpan=c=>({start:ye.toLocation(c.start),end:ye.toLocation(c.end)}),a.fromLocations=(c,l)=>new He.Range(Math.max(0,c.line-1),Math.max(c.offset-1,0),Math.max(0,l.line-1),Math.max(0,l.offset-1)),a.toFileRange=c=>({startLine:c.start.line+1,startOffset:c.start.character+1,endLine:c.end.line+1,endOffset:c.end.character+1}),a.toFileRangeRequestArgs=(c,l)=>({file:c,...(0,a.toFileRange)(l)}),a.toFileRangesRequestArgs=(c,l)=>({file:c,ranges:l.map(a.toFileRange)}),a.toFormattingRequestArgs=(c,l)=>({file:c,line:l.start.line+1,offset:l.start.character+1,endLine:l.end.line+1,endOffset:l.end.character+1})))(Se||={});(n=>(n.fromLocation=i=>new He.Position(i.line-1,i.offset-1),n.toLocation=i=>({line:i.line+1,offset:i.character+1}),n.toFileLocationRequestArgs=(i,o)=>({file:i,line:o.line+1,offset:o.character+1})))(ye||={});(e=>e.fromTextSpan=(t,n)=>new He.Location(t,Se.fromTextSpan(n)))(Tr||={});(e=>e.fromCodeEdit=t=>new He.TextEdit(Se.fromTextSpan(t),t.newText))(Ja||={});(t=>{function r(n,i){return e(new He.WorkspaceEdit,n,i)}t.fromFileCodeEdits=r;function e(n,i,o){for(let s of o){let a=i.toResource(s.fileName);for(let c of s.textChanges)n.replace(a,Se.fromTextSpan(c),c.newText)}return n}t.withFileCodeEdits=e})(qr||={});(e=>{function r(t){switch(t){case L.module:return He.SymbolKind.Module;case L.class:return He.SymbolKind.Class;case L.enum:return He.SymbolKind.Enum;case L.enumMember:return He.SymbolKind.EnumMember;case L.interface:return He.SymbolKind.Interface;case L.indexSignature:return He.SymbolKind.Method;case L.callSignature:return He.SymbolKind.Method;case L.method:return He.SymbolKind.Method;case L.memberVariable:return He.SymbolKind.Property;case L.memberGetAccessor:return He.SymbolKind.Property;case L.memberSetAccessor:return He.SymbolKind.Property;case L.variable:return He.SymbolKind.Variable;case L.let:return He.SymbolKind.Variable;case L.const:return He.SymbolKind.Variable;case L.localVariable:return He.SymbolKind.Variable;case L.alias:return He.SymbolKind.Variable;case L.function:return He.SymbolKind.Function;case L.localFunction:return He.SymbolKind.Function;case L.constructSignature:return He.SymbolKind.Constructor;case L.constructorImplementation:return He.SymbolKind.Constructor;case L.typeParameter:return He.SymbolKind.TypeParameter;case L.string:return He.SymbolKind.String;default:return He.SymbolKind.Variable}}e.fromProtocolScriptElementKind=r})(yb||={});(e=>{function r(t){switch(t){case He.CompletionTriggerKind.Invoke:return 1;case He.CompletionTriggerKind.TriggerCharacter:return 2;case He.CompletionTriggerKind.TriggerForIncompleteCompletions:return 3}}e.toProtocolCompletionTriggerKind=r})(Sb||={});(e=>{function r(t){switch(t){case"All":return"All";case"SortAndCombine":return"SortAndCombine";case"RemoveUnused":return"RemoveUnused"}}e.toProtocolOrganizeImportsMode=r})(_b||={})});function Ae(r,e,t){return new Tb(r,e,t)}function Fo(r,e){return new Ls(()=>r.apiVersion.gte(e),r.onTsServerStarted)}function uy(r,e){return new Ls(()=>zR(r,{fallbackSection:e}),Xa.workspace.onDidChangeConfiguration)}function Cd(r,e){return new Ls(()=>!!H(r,void 0,e),Xa.workspace.onDidChangeConfiguration)}function je(r,...e){return new Ls(()=>e.some(t=>r.capabilities.has(t)),r.onDidChangeCapabilities)}function I0(r){return new Ls(()=>!!Xa.extensions.getExtension(r),Xa.extensions.onDidChange)}var Xa,Ls,Tb,At=C(()=>{"use strict";Xa=U(require("vscode"));Mt();gt();Ls=class extends _e{constructor(t,n){super();this.getValue=t;this._value=this.getValue(),n(()=>{let i=this.getValue();i!==this._value&&(this._value=i,this._onDidChange.fire())})}_value;get value(){return this._value}_onDidChange=this._register(new Xa.EventEmitter);onDidChange=this._onDidChange.event},Tb=class{constructor(e,t,n){this.conditions=e;this.doRegister=t;this.elseDoRegister=n;for(let i of e)i.onDidChange(()=>this.update());this.update()}state;dispose(){this.state?.registration?.dispose(),this.state=void 0}update(){this.conditions.every(t=>t.value)?this.state?.enabled||(this.state?.registration?.dispose(),this.state={enabled:!0,registration:this.doRegister()}):(this.state?.enabled||!this.state)&&(this.state?.registration?.dispose(),this.state={enabled:!1,registration:this.elseDoRegister?.()})}}});var N0={};Ke(N0,{register:()=>Qj});function $j(r){return r.kind===L.script||r.kind===L.module&&r.selectionSpan.start.line===1&&r.selectionSpan.start.offset===1}function fy(r){let e=$j(r),t=e?py.basename(r.file):r.name,n=e?An.workspace.asRelativePath(py.dirname(r.file)):r.containerName??"",i=new An.CallHierarchyItem(yb.fromProtocolScriptElementKind(r.kind),t,n,An.Uri.file(r.file),Se.fromTextSpan(r.span),Se.fromTextSpan(r.selectionSpan));return(r.kindModifiers?Os(r.kindModifiers):void 0)?.has(Wn.deprecated)&&(i.tags=[An.SymbolTag.Deprecated]),i}function Jj(r){return new An.CallHierarchyIncomingCall(fy(r.from),r.fromSpans.map(Se.fromTextSpan))}function Xj(r){return new An.CallHierarchyOutgoingCall(fy(r.to),r.fromSpans.map(Se.fromTextSpan))}function Qj(r,e){return Ae([Fo(e,dy.minVersion),je(e,2)],()=>An.languages.registerCallHierarchyProvider(r.semantic,new dy(e)))}var py,An,dy,R0=C(()=>{"use strict";py=U(require("path")),An=U(require("vscode"));Wt();Fp();wn();$e();ut();At();dy=class{constructor(e){this.client=e}static minVersion=ve.v380;async prepareCallHierarchy(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o=ye.toFileLocationRequestArgs(i,t),s=await this.client.execute("prepareCallHierarchy",o,n);if(!(s.type!=="response"||!s.body))return Array.isArray(s.body)?s.body.map(fy):fy(s.body)}async provideCallHierarchyIncomingCalls(e,t){let n=this.client.toTsFilePath(e.uri);if(!n)return;let i=ye.toFileLocationRequestArgs(n,e.selectionRange.start),o=await this.client.execute("provideCallHierarchyIncomingCalls",i,t);if(!(o.type!=="response"||!o.body))return o.body.map(Jj)}async provideCallHierarchyOutgoingCalls(e,t){let n=this.client.toTsFilePath(e.uri);if(!n)return;let i=ye.toFileLocationRequestArgs(n,e.selectionRange.start),o=await this.client.execute("provideCallHierarchyOutgoingCalls",i,t);if(!(o.type!=="response"||!o.body))return o.body.map(Xj)}}});function w0(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var A0=C(()=>{"use strict"});function hi(r,e){if(e.nameSpan)return Se.fromTextSpan(e.nameSpan);let t=e.spans?.[0];if(!t)return;let n=Se.fromTextSpan(t),i=r.getText(n),s=new RegExp(`^(.*?(\\b|\\W))${w0(e.text||"")}(\\b|\\W)`,"gm").exec(i),a=s?s.index+s[1].length:0,c=r.offsetAt(new Uo.Position(n.start.line,n.start.character))+a;return new Uo.Range(r.positionAt(c),r.positionAt(c+e.text.length))}var Uo,Eb,Mo,Cb=C(()=>{"use strict";Uo=U(require("vscode"));$e();A0();gt();Eb=class extends Uo.CodeLens{constructor(t,n,i){super(i);this.document=t;this.file=n}},Mo=class extends _e{constructor(t,n){super();this.client=t;this.cachedResponse=n}changeEmitter=this._register(new Uo.EventEmitter);onDidChangeCodeLenses=this.changeEmitter.event;static cancelledCommand={title:"",command:""};static errorCommand={title:Uo.l10n.t("Could not determine references"),command:""};async provideCodeLenses(t,n){let i=this.client.toOpenTsFilePath(t);if(!i)return[];let o=await this.cachedResponse.execute(t,()=>this.client.execute("navtree",{file:i},n));if(o.type!=="response")return[];let s=[];return o.body?.childItems?.forEach(a=>this.walkNavTree(t,a,void 0,s)),s.map(a=>new Eb(t.uri,i,a))}walkNavTree(t,n,i,o){let s=this.extractSymbol(t,n,i);s&&o.push(s),n.childItems?.forEach(a=>this.walkNavTree(t,a,n,o))}}});var O0=le(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.Cancellation=void 0;var Zj;(function(r){function e(n){if(n.$cancellationData!==void 0)throw new Error("Message already has a property $cancellationData");let i=new SharedArrayBuffer(4),o=new Int32Array(i,0,1);return o[0]=0,n.$cancellationData=i,()=>{Atomics.store(o,0,1)}}r.addData=e;function t(n){let i=n;if(!(i instanceof SharedArrayBuffer))return()=>!1;let o=new Int32Array(i.$cancellationData,0,1);return()=>Atomics.load(o,0)===1}r.retrieveCheck=t})(Zj=Mp.Cancellation||(Mp.Cancellation={}))});var vy,k0=C(()=>{"use strict";ut();vy=class{_callbacks=new Map;_asyncCallbacks=new Map;destroy(e){let t=new ko.Cancelled(e);for(let n of this._callbacks.values())n.onSuccess(t);this._callbacks.clear();for(let n of this._asyncCallbacks.values())n.onSuccess(t);this._asyncCallbacks.clear()}add(e,t,n){n?this._asyncCallbacks.set(e,t):this._callbacks.set(e,t)}fetch(e){let t=this._callbacks.get(e)||this._asyncCallbacks.get(e);return this.delete(e),t}peek(e){return this._callbacks.get(e)??this._asyncCallbacks.get(e)}delete(e){this._callbacks.delete(e)||this._asyncCallbacks.delete(e)}}});var my,L0=C(()=>{"use strict";my=class{queue=[];sequenceNumber=0;get length(){return this.queue.length}enqueue(e){if(e.queueingType===1){let t=this.queue.length-1;for(;t>=0&&this.queue[t].queueingType===2;)--t;this.queue.splice(t+1,0,e)}else this.queue.push(e)}dequeue(){return this.queue.shift()}getQueuedCommands(e=!1){let t=[],n=e?this.queue.length-1:this.queue.length;if(n<=0)return t;for(let i=0;i<n;i++){let o=this.queue[i];if(t.push(o.request.command),t.length>=5)break}return t}tryDeletePendingRequest(e){for(let t=0;t<this.queue.length;t++)if(this.queue[t].request.seq===e)return this.queue.splice(t,1),!0;return!1}createRequest(e,t){return{seq:this.sequenceNumber++,type:"request",command:e,arguments:t}}}});var Fs,bb=C(()=>{"use strict";Fs=class r extends Error{constructor(t,n,i,o,s,a){super([`<${t}> TypeScript Server Error (${n.displayName})`,o,s].filter(Boolean).join(`
`));this.serverId=t;this.version=n;this.response=i;this.serverMessage=o;this.serverStack=s;this.sanitizedStack=a}static create(t,n,i){let o=r.parseErrorText(i);return new r(t,n,i,o?.message,o?.stack,o?.sanitizedStack)}get serverErrorText(){return this.response.message}get serverCommand(){return this.response.command}get telemetry(){return{command:this.serverCommand,serverid:this.serverId,sanitizedstack:this.sanitizedStack||"",badclient:/\bBADCLIENT\b/.test(this.stack||"")}}static parseErrorText(t){let n=t.message;if(n){let i="Error processing request. ";if(n.startsWith(i)){let o=n.substr(i.length),s=o.indexOf(`
`);if(s>=0){let a=o.substring(s+1);return{message:o.substring(0,s),stack:a,sanitizedStack:r.sanitizeStack(a)}}}}}static sanitizeStack(t){if(!t)return"";let n=/(\btsserver)?(\.(?:ts|tsx|js|jsx)(?::\d+(?::\d+)?)?)\)?$/igm,i="";for(;;){let o=n.exec(t);if(!o)break;i+=`${o[1]||"suppressed"}${o[2]}
`}return i}}});var F0,yi,gy,hy,yy,Sy,wl,Up=C(()=>{"use strict";F0=U(O0()),yi=U(require("vscode"));k0();L0();bb();ut();gt();Sd();wn();gy=class r extends _e{constructor(t,n,i,o,s,a,c,l){super();this._serverId=t;this._serverSource=n;this._process=i;this._tsServerLog=o;this._requestCanceller=s;this._version=a;this._telemetryReporter=c;this._tracer=l;this._process.onData(u=>{this.dispatchMessage(u)}),this._process.onExit((u,d)=>{this._onExit.fire({code:u,signal:d}),this._callbacks.destroy("server exited")}),this._process.onError(u=>{this._onError.fire(u),this._callbacks.destroy("server errored")})}_requestQueue=new my;_callbacks=new vy;_pendingResponses=new Set;_onEvent=this._register(new yi.EventEmitter);onEvent=this._onEvent.event;_onExit=this._register(new yi.EventEmitter);onExit=this._onExit.event;_onError=this._register(new yi.EventEmitter);onError=this._onError.event;get tsServerLog(){return this._tsServerLog}write(t){this._process.write(t)}dispose(){super.dispose(),this._callbacks.destroy("server disposed"),this._pendingResponses.clear()}kill(){this._process.kill()}dispatchMessage(t){try{switch(t.type){case"response":this._serverSource?this.dispatchResponse({...t,_serverType:this._serverSource}):this.dispatchResponse(t);break;case"event":{let n=t;if(n.event==="requestCompleted"){let i=n.body.request_seq,o=this._callbacks.fetch(i);o&&(this._tracer.traceRequestCompleted(this._serverId,"requestCompleted",i,o),o.onSuccess(void 0)),n.body.performanceData&&this._onEvent.fire(n)}else this._tracer.traceEvent(this._serverId,n),this._onEvent.fire(n);break}default:throw new Error(`Unknown message type ${t.type} received`)}}finally{this.sendNextRequests()}}tryCancelRequest(t,n){let i=t.seq,o=this._callbacks.peek(i);o?.traceId!==void 0&&this._telemetryReporter.logTraceEvent("TSServer.tryCancelRequest",o.traceId,JSON.stringify({command:n,cancelled:!0}));try{return this._requestQueue.tryDeletePendingRequest(i)?(this.logTrace(`Canceled request with sequence number ${i}`),!0):this._requestCanceller.tryCancelOngoingRequest(i)?!0:(this.logTrace(`Tried to cancel request with sequence number ${i}. But request got already delivered.`),!1)}finally{this.fetchCallback(i)?.onSuccess(new ko.Cancelled(`Cancelled request ${i} - ${n}`))}}dispatchResponse(t){let n=this.fetchCallback(t.request_seq);n&&(n.traceId!==void 0&&this._telemetryReporter.logTraceEvent("TSServerRequest.dispatchResponse",n.traceId,JSON.stringify({command:t.command,success:t.success,performanceData:t.performanceData})),this._tracer.traceResponse(this._serverId,t,n),t.success?n.onSuccess(t):t.message==="No content available."?n.onSuccess(ko.NoContent):n.onError(Fs.create(this._serverId,this._version,t)))}executeImpl(t,n,i){let o=this._requestQueue.createRequest(t,n),s={request:o,expectsResponse:i.expectsResult,isAsync:i.isAsync,queueingType:r.getQueueingType(t,i.lowPriority)},a;i.expectsResult&&(a=new Promise((l,u)=>{let d=typeof o.arguments?.$traceId=="string"?{onSuccess:l,onError:u,queuingStartTime:Date.now(),isAsync:i.isAsync,command:o.command,traceId:o.arguments.$traceId}:{onSuccess:l,onError:u,queuingStartTime:Date.now(),isAsync:i.isAsync,command:o.command};if(this._callbacks.add(o.seq,d,i.isAsync),i.token){let f=za()?F0.Cancellation.addData(o):void 0;i.token.onCancellationRequested(()=>{f?.(),this.tryCancelRequest(o,t)})}}).catch(l=>{throw l instanceof Fs&&(i.token?.isCancellationRequested||this._telemetryReporter.logTelemetry("languageServiceErrorResponse",l.telemetry)),l})),this._requestQueue.enqueue(s);let c=n?.$traceId;if(n&&typeof c=="string"){let l=this._requestQueue.length-1,u=this._pendingResponses.size,d={command:o.command,queueLength:l,pendingResponses:u};l>0&&(d.queuedCommands=this._requestQueue.getQueuedCommands(!0)),u>0&&(d.pendingCommands=this.getPendingCommands()),this._telemetryReporter.logTraceEvent("TSServer.enqueueRequest",c,JSON.stringify(d))}return this.sendNextRequests(),[a]}getPendingCommands(){let t=[];for(let n of this._pendingResponses){let i=this._callbacks.peek(n);if(typeof i?.command=="string"&&(t.push(i.command),t.length>=5))break}return t}sendNextRequests(){for(;this._pendingResponses.size===0&&this._requestQueue.length>0;){let t=this._requestQueue.dequeue();t&&this.sendRequest(t)}}sendRequest(t){let n=t.request;this._tracer.traceRequest(this._serverId,n,t.expectsResponse,this._requestQueue.length),t.expectsResponse&&!t.isAsync&&this._pendingResponses.add(t.request.seq);try{this.write(n),typeof n.arguments?.$traceId=="string"&&this._telemetryReporter.logTraceEvent("TSServer.sendRequest",n.arguments.$traceId,JSON.stringify({command:n.command}))}catch(i){this.fetchCallback(n.seq)?.onError(i)}}fetchCallback(t){let n=this._callbacks.fetch(t);if(n)return this._pendingResponses.delete(t),n}logTrace(t){this._tracer.trace(this._serverId,t)}static fenceCommands=new Set(["change","close","open","updateOpen"]);static getQueueingType(t,n){return r.fenceCommands.has(t)?3:n?2:1}},hy=class r{constructor(e,t){this.servers=e;this.delegate=t}static sharedCommands=new Set(["change","close","open","updateOpen","configure"]);execute(e,t,n){if(r.sharedCommands.has(e)&&typeof n.executionTarget>"u"){let i=this.servers.map(()=>wl.Unresolved),o;if(n.token){let a=new yi.CancellationTokenSource;n.token.onCancellationRequested(()=>{i.some(c=>c===wl.Resolved)||a.cancel()}),o=a.token}let s=[];for(let a=0;a<this.servers.length;++a){let l=this.servers[a].server.executeImpl(e,t,{...n,token:o})[0];s.push(l),l&&l.then(u=>{i[a]=wl.Resolved;let d=i.find(f=>f.type===wl.Type.Errored);return d&&this.delegate.onFatalError(e,d.err),u},u=>{throw i[a]=new wl.Errored(u),i.some(d=>d===wl.Resolved)&&this.delegate.onFatalError(e,u),u})}return s}for(let{canRun:i,server:o}of this.servers)if(!i||i(e,n))return o.executeImpl(e,t,n);throw new Error(`Could not find server for command: '${e}'`)}},yy=class r extends _e{static diagnosticEvents=new Set(["configFileDiag","syntaxDiag","semanticDiag","suggestionDiag"]);getErrServer;mainServer;router;constructor(e,t){super(),this.getErrServer=e.getErr,this.mainServer=e.primary,this.router=new hy([{server:this.getErrServer,canRun:n=>["geterr","geterrForProject"].includes(n)},{server:this.mainServer,canRun:void 0}],t),this._register(this.getErrServer.onEvent(n=>{r.diagnosticEvents.has(n.event)&&this._onEvent.fire(n)})),this._register(this.mainServer.onEvent(n=>{r.diagnosticEvents.has(n.event)||this._onEvent.fire(n)})),this._register(this.getErrServer.onError(n=>this._onError.fire(n))),this._register(this.mainServer.onError(n=>this._onError.fire(n))),this._register(this.mainServer.onExit(n=>{this._onExit.fire(n),this.getErrServer.kill()}))}_onEvent=this._register(new yi.EventEmitter);onEvent=this._onEvent.event;_onExit=this._register(new yi.EventEmitter);onExit=this._onExit.event;_onError=this._register(new yi.EventEmitter);onError=this._onError.event;get tsServerLog(){return this.mainServer.tsServerLog}kill(){this.getErrServer.kill(),this.mainServer.kill()}executeImpl(e,t,n){return this.router.execute(e,t,n)}},Sy=class r extends _e{static syntaxAlwaysCommands=new Set(["navtree","getOutliningSpans","jsxClosingTag","selectionRange","format","formatonkey","docCommentTemplate","linkedEditingRange"]);static semanticCommands=new Set(["geterr","geterrForProject","projectInfo","configurePlugin"]);static syntaxAllowedCommands=new Set(["completions","completionEntryDetails","completionInfo","definition","definitionAndBoundSpan","documentHighlights","implementation","navto","quickinfo","references","rename","signatureHelp"]);syntaxServer;semanticServer;router;_projectLoading=!0;constructor(e,t,n){super(),this.syntaxServer=e.syntax,this.semanticServer=e.semantic,this.router=new hy([{server:this.syntaxServer,canRun:(i,o)=>{switch(o.executionTarget){case 0:return!1;case 1:return!0}return r.syntaxAlwaysCommands.has(i)?!0:r.semanticCommands.has(i)?!1:!!(n&&this.projectLoading&&r.syntaxAllowedCommands.has(i))}},{server:this.semanticServer,canRun:void 0}],t),this._register(this.syntaxServer.onEvent(i=>this._onEvent.fire(i))),this._register(this.semanticServer.onEvent(i=>{switch(i.event){case"projectLoadingStart":this._projectLoading=!0;break;case"projectLoadingFinish":case"semanticDiag":case"syntaxDiag":case"suggestionDiag":case"configFileDiag":this._projectLoading=!1;break}return this._onEvent.fire(i)})),this._register(this.semanticServer.onExit(i=>{this._onExit.fire(i),this.syntaxServer.kill()})),this._register(this.semanticServer.onError(i=>this._onError.fire(i)))}get projectLoading(){return this._projectLoading}_onEvent=this._register(new yi.EventEmitter);onEvent=this._onEvent.event;_onExit=this._register(new yi.EventEmitter);onExit=this._onExit.event;_onError=this._register(new yi.EventEmitter);onError=this._onError.event;get tsServerLog(){return this.semanticServer.tsServerLog}kill(){this.syntaxServer.kill(),this.semanticServer.kill()}executeImpl(e,t,n){return this.router.execute(e,t,n)}};(i=>{let r;(c=>(c[c.Unresolved=0]="Unresolved",c[c.Resolved=1]="Resolved",c[c.Errored=2]="Errored"))(r=i.Type||={}),i.Unresolved={type:0},i.Resolved={type:1};class n{constructor(s){this.err=s}type=2}i.Errored=n})(wl||={})});var M0={};Ke(M0,{default:()=>Yp,register:()=>rq});function rq(r,e,t,n){return Ae([uy(_y.enabled,e.id),je(t,2)],()=>Ki.languages.registerCodeLensProvider(r.semantic,new Yp(t,n)))}var Ki,_y,Yp,U0=C(()=>{"use strict";Ki=U(require("vscode"));wn();$e();ut();Mt();At();Cb();Up();_y=Object.freeze({enabled:"implementationsCodeLens.enabled",showOnInterfaceMethods:"implementationsCodeLens.showOnInterfaceMethods",showOnAllClassMethods:"implementationsCodeLens.showOnAllClassMethods"}),Yp=class extends Mo{constructor(t,n){super(t,n);this._cachedResponse=n;this._enabled=this._register(new Ui(_y.enabled,!1)),this._register(this._enabled.onDidChange(()=>this.changeEmitter.fire())),this._showOnInterfaceMethods=this._register(new Ui(_y.showOnInterfaceMethods,!1)),this._register(this._showOnInterfaceMethods.onDidChange(()=>this.changeEmitter.fire())),this._showOnAllClassMethods=this._register(new Ui(_y.showOnAllClassMethods,!1)),this._register(this._showOnAllClassMethods.onDidChange(()=>this.changeEmitter.fire()))}_enabled;_showOnInterfaceMethods;_showOnAllClassMethods;async provideCodeLenses(t,n){return this._enabled.getValue(t)?super.provideCodeLenses(t,n):[]}async resolveCodeLens(t,n){let i=ye.toFileLocationRequestArgs(t.file,t.range.start),o=await this.client.execute("implementation",i,n,{lowPriority:!0,executionTarget:0,cancelOnResourceChange:t.document});if(o.type!=="response"||!o.body)return t.command=o.type==="cancelled"?Mo.cancelledCommand:Mo.errorCommand,t;let s=o.body.map(a=>new Ki.Location(this.client.toResource(a.file),a.start.line===a.end.line?Se.fromTextSpan(a):new Ki.Range(ye.fromLocation(a.start),new Ki.Position(a.start.line,0)))).filter(a=>!(a.uri.toString()===t.document.toString()&&a.range.start.line===t.range.start.line&&a.range.start.character===t.range.start.character));return t.command=this.getCommand(s,t),t}getCommand(t,n){return{title:this.getTitle(t),command:t.length?"editor.action.showReferences":"",arguments:[n.document,n.range.start,t]}}getTitle(t){return t.length===1?Ki.l10n.t("1 implementation"):Ki.l10n.t("{0} implementations",t.length)}extractSymbol(t,n,i){if(n.kind===L.interface)return hi(t,n);if((n.kind===L.class||n.kind===L.method||n.kind===L.memberVariable||n.kind===L.memberGetAccessor||n.kind===L.memberSetAccessor)&&/\babstract\b/.test(n.kindModifiers??""))return hi(t,n);if(n.kind===L.method&&i?.kind===L.interface&&this._showOnInterfaceMethods.getValue(t))return hi(t,n);if(n.kind===L.method&&i?.kind===L.class&&this._showOnAllClassMethods.getValue(t))return/\bprivate\b/.test(n.kindModifiers??"")?void 0:hi(t,n)}}});var Y0={};Ke(Y0,{TypeScriptReferencesCodeLensProvider:()=>Ty,register:()=>nq});function nq(r,e,t,n){return Ae([uy(xb.enabled,e.id),je(t,2)],()=>Vp.languages.registerCodeLensProvider(r.semantic,new Ty(t,n)))}var Vp,xb,Ty,V0=C(()=>{"use strict";Vp=U(require("vscode"));wn();Up();$e();ut();Mt();At();Cb();xb=Object.freeze({enabled:"referencesCodeLens.enabled",showOnAllFunctions:"referencesCodeLens.showOnAllFunctions"}),Ty=class extends Mo{constructor(t,n){super(t,n);this._cachedResponse=n;this._enabled=this._register(new Ui(xb.enabled,!1)),this._register(this._enabled.onDidChange(()=>this.changeEmitter.fire())),this._showOnAllFunctions=this._register(new Ui(xb.showOnAllFunctions,!1)),this._register(this._showOnAllFunctions.onDidChange(()=>this.changeEmitter.fire()))}_enabled;_showOnAllFunctions;async provideCodeLenses(t,n){return this._enabled.getValue(t)?super.provideCodeLenses(t,n):[]}async resolveCodeLens(t,n){let i=ye.toFileLocationRequestArgs(t.file,t.range.start),o=await this.client.execute("references",i,n,{lowPriority:!0,executionTarget:0,cancelOnResourceChange:t.document});if(o.type!=="response"||!o.body)return t.command=o.type==="cancelled"?Mo.cancelledCommand:Mo.errorCommand,t;let s=o.body.refs.filter(a=>!a.isDefinition).map(a=>Tr.fromTextSpan(this.client.toResource(a.file),a));return t.command={title:this.getCodeLensLabel(s),command:s.length?"editor.action.showReferences":"",arguments:[t.document,t.range.start,s]},t}getCodeLensLabel(t){return t.length===1?Vp.l10n.t("1 reference"):Vp.l10n.t("{0} references",t.length)}extractSymbol(t,n,i){if(i&&i.kind===L.enum)return hi(t,n);switch(n.kind){case L.function:if(this._showOnAllFunctions.getValue(t)&&n.nameSpan)return hi(t,n);case L.const:case L.let:case L.variable:if(/\bexport\b/.test(n.kindModifiers))return hi(t,n);break;case L.class:if(n.text==="<class>")break;return hi(t,n);case L.interface:case L.type:case L.enum:return hi(t,n);case L.method:case L.memberGetAccessor:case L.memberSetAccessor:case L.constructorImplementation:case L.memberVariable:if(i&&ye.fromLocation(i.spans[0].start).isEqual(ye.fromLocation(n.spans[0].start)))return;switch(i?.kind){case L.class:case L.interface:case L.type:return hi(t,n)}break}}}});function Ey(r,e){return e.changes?.length?qr.fromFileCodeEdits(r,e.changes):void 0}async function Pb(r,e,t){let n=Ey(r,e);return n&&!await j0.workspace.applyEdit(n)?!1:Cy(r,e.commands,t)}async function Cy(r,e,t){if(e?.length)for(let n of e)await r.execute("applyCodeActionCommand",{command:n},t);return!0}var j0,Db=C(()=>{"use strict";j0=U(require("vscode"));$e()});function K0(r,e){if(r.insertText&&typeof r.insertText!="string")return{snippet:r.insertText,parameterCount:0};let t=oq(e),n=new q0.SnippetString;return n.appendText(`${r.insertText||r.label}(`),iq(n,t.parts,", "),t.hasOptionalParameters&&n.appendTabstop(),n.appendText(")"),n.appendTabstop(0),{snippet:n,parameterCount:t.parts.length+(t.hasOptionalParameters?1:0)}}function iq(r,e,t){for(let n=0;n<e.length;++n){let i=e[n];r.appendPlaceholder(i.text),n!==e.length-1&&r.appendText(t)}}function oq(r){let e=[],t=[],n=!1,i=!1,o=0,s=0;e:for(let a=0;a<r.length;++a){let c=r[a];switch(c.kind){case ks.methodName:case ks.functionName:case ks.text:case ks.propertyName:o===0&&s===0&&(n=!0);break;case ks.parameterName:if(o===1&&s===0&&n){let l=r[a+1],u=l&&l.text==="?",d=c.text==="this";u?t.push(c):(e.push(...t),t=[]),!u&&!d&&e.push(c),i=i||u}break;case ks.punctuation:if(c.text==="(")++o;else if(c.text===")"){if(--o,o<=0&&n)break e}else if(c.text==="..."&&o===1){i=!0;break e}else c.text==="{"?++s:c.text==="}"&&--s;break}}return{hasOptionalParameters:i,parts:e}}var q0,H0=C(()=>{"use strict";q0=U(require("vscode"));wn()});function sq(r,e){if(!r.text)return;function t(i){return/^\s*[~`]{3}/m.test(i)?i:"```tsx\n"+i+"\n```"}let n=by(r.text,e);switch(r.name){case"example":{n=lq(r.text);let i=n.match(/<caption>(.*?)<\/caption>\s*(\r\n|\n)/);return i&&i.index===0?i[1]+`
`+t(n.substr(i[0].length)):t(n)}case"author":{let i=n.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);return i===null?n:`${i[1]} ${i[2]}`}case"default":return t(n);default:return n}}function aq(r,e){switch(r.name){case"augments":case"extends":case"param":case"template":{let i=cq(r,e);if(i?.length===3){let o=i[1],s=i[2],a=`*@${r.name}* \`${o}\``;return s?a+(s.match(/\r\n|\n/g)?`  
`+s:` \u2014 ${s}`):a}break}case"return":case"returns":{if(!r.text?.length)return;break}}let t=`*@${r.name}*`,n=sq(r,e);return n?t+(n.match(/\r\n|\n/g)?`  
`+n:` \u2014 ${n}`):t}function cq(r,e){if(r.name==="template"){let t=r.text;if(t&&typeof t!="string"){let n=t.filter(o=>o.kind==="typeParameterName").map(o=>o.text).join(", "),i=t.filter(o=>o.kind==="text").map(o=>by(o.text.replace(/^\s*-?\s*/,""),e)).join(" ");return n?["",n,i]:void 0}}return by(r.text,e).split(/^(\S+)\s*-?\s*/)}function lq(r){return typeof r=="string"?r:r.map(e=>e.text).join("")}function Ms(r,e){return by(r,e)}function by(r,e){if(!r)return"";if(typeof r=="string")return r;let t=[],n;for(let i of r)switch(i.kind){case"link":if(n){if(n.target){let s={file:{...e.toResource(n.target.file).toJSON(),$mid:void 0},position:ye.fromLocation(n.target.start)},a=`command:${Ya.id}?${encodeURIComponent(JSON.stringify([s]))}`,c=n.text?n.text:Ib(n.name??"");t.push(`[${n.linkcode?"`"+c+"`":c}](${a} "${xy.l10n.t("Open symbol link")}")`)}else{let o=n.text??n.name;if(o)if(/^https?:/.test(o)){let s=o.split(" ");if(s.length===1&&!n.linkcode)t.push(`<${s[0]}>`);else{let a=s.length>1?s.slice(1).join(" "):s[0];t.push(`[${n.linkcode?"`"+Ib(a)+"`":a}](${s[0]})`)}}else t.push(Ib(o))}n=void 0}else n={linkcode:i.text==="{@linkcode "};break;case"linkName":n&&(n.name=i.text,n.target=i.target);break;case"linkText":n&&(n.text=i.text);break;default:t.push(i.text);break}return t.join("")}function Ib(r){return r.replace(/`/g,"\\$&")}function uq(r,e){return r.map(t=>aq(t,e)).join(`  

`)}function jp(r,e,t,n){let i=new xy.MarkdownString;return Nb(i,r,e,t),i.baseUri=n,i.isTrusted={enabledCommands:[Ya.id]},i}function Nb(r,e,t,n){if(e&&r.appendMarkdown(Ms(e,n)),t){let i=uq(t,n);i&&r.appendMarkdown(`

`+i)}return r.isTrusted={enabledCommands:[Ya.id]},r}var xy,Py=C(()=>{"use strict";xy=U(require("vscode"));KC();$e()});var W0={};Ke(W0,{register:()=>pq});function dq(r){if(!r.kindModifiers||r.kind!==L.script)return;let e=Os(r.kindModifiers);for(let t of Wn.fileExtensionKindModifiers)if(e.has(t))return r.name.toLowerCase().endsWith(t)?r.name:r.name+t}function fq(r,e){return!e.nameSuggestions&&r.kind===L.warning||!e.pathSuggestions&&(r.kind===L.directory||r.kind===L.script||r.kind===L.externalModuleName)||!e.autoImportSuggestions&&r.hasAction}function pq(r,e,t,n,i,o,s,a){return Ae([je(t,1,2)],()=>be.languages.registerCompletionItemProvider(r.syntax,new wy(t,e,n,i,o,s,a),...wy.triggerCharacters))}var be,Dy,Iy,Ny,Ry,G0,wy,z0=C(()=>{"use strict";be=U(require("vscode"));Wt();Fp();wn();$e();ut();No();Mt();Db();At();H0();Py();Dy=class r extends be.CompletionItem{constructor(t,n,i,o,s,a,c){let l=i.name||(i.insertText??"");super(l,r.convertKind(i.kind));this.position=t;this.document=n;this.tsEntry=i;this.completionContext=o;this.metadata=s;if(i.source&&i.hasAction&&a.apiVersion.lt(ve.v490)?this.sortText="\uFFFF"+i.sortText:this.sortText=i.sortText,i.source&&i.hasAction){let f=be.workspace.asRelativePath(i.source);f!==i.source&&(this.label={label:l,description:f})}let{sourceDisplay:u,isSnippet:d}=i;if(u&&(this.label={label:l,description:Ms(u,a)}),i.labelDetails&&(this.label={label:l,...i.labelDetails}),this.preselect=i.isRecommended,this.position=t,this.useCodeSnippet=o.completeFunctionCalls&&(this.kind===be.CompletionItemKind.Function||this.kind===be.CompletionItemKind.Method),this.range=this.getRangeFromReplacementSpan(i,o),this.commitCharacters=r.getCommitCharacters(o,i,c),this.insertText=d&&i.insertText?new be.SnippetString(i.insertText):i.insertText,this.filterText=i.filterText||this.getFilterText(o.line,i.insertText),o.isMemberCompletion&&o.dotAccessorContext&&!(this.insertText instanceof be.SnippetString)&&(this.filterText=o.dotAccessorContext.text+(this.insertText||this.textLabel),!this.range)){let f=this.completionContext.wordRange;f?this.range={inserting:o.dotAccessorContext.range,replacing:o.dotAccessorContext.range.union(f)}:this.range=o.dotAccessorContext.range,this.insertText=this.filterText}if(i.kindModifiers){let f=Os(i.kindModifiers);f.has(Wn.optional)&&(this.insertText??=this.textLabel,this.filterText??=this.textLabel,typeof this.label=="string"?this.label+="?":this.label.label+="?"),f.has(Wn.deprecated)&&(this.tags=[be.CompletionItemTag.Deprecated]),f.has(Wn.color)&&(this.kind=be.CompletionItemKind.Color),this.detail=dq(i)}this.resolveRange()}useCodeSnippet;get textLabel(){return typeof this.label=="string"?this.label:this.label.label}_resolvedPromise;async resolveCompletionItem(t,n){if(n.onCancellationRequested(()=>{this._resolvedPromise&&--this._resolvedPromise.waiting<=0&&setTimeout(()=>{this._resolvedPromise&&this._resolvedPromise.waiting<=0&&this._resolvedPromise.requestToken.cancel()},300)}),this._resolvedPromise)return++this._resolvedPromise.waiting,this._resolvedPromise.promise;let i=new be.CancellationTokenSource,o=(async()=>{let s=t.toOpenTsFilePath(this.document);if(!s)return;let a={...ye.toFileLocationRequestArgs(s,this.position),entryNames:[this.tsEntry.source||this.tsEntry.data?{name:this.tsEntry.name,source:this.tsEntry.source,data:this.tsEntry.data}:this.tsEntry.name]},c=await t.interruptGetErr(()=>t.execute("completionEntryDetails",a,i.token));if(c.type!=="response"||!c.body?.length)return;let l=c.body[0],u=this.getDetails(t,l);u&&(this.detail=u),this.documentation=this.getDocumentation(t,l,this.document.uri);let d=this.getCodeActions(l,s),f=[{command:Iy.ID,title:"",arguments:[this]}];d.command&&f.push(d.command);let v=d.additionalTextEdits;if(this.useCodeSnippet&&await this.isValidFunctionCompletionContext(t,s,this.position,this.document,n)){let{snippet:S,parameterCount:y}=K0({...this,label:this.textLabel},l.displayParts);this.insertText=S,y>0&&be.workspace.getConfiguration("editor.parameterHints").get("enabled")&&f.push({title:"triggerParameterHints",command:"editor.action.triggerParameterHints"})}return{commands:f,edits:v}})();return this._resolvedPromise={promise:o,requestToken:i,waiting:1},this._resolvedPromise.promise}getDetails(t,n){let i=[];if(n.kind!==L.script){for(let o of n.codeActions??[])i.push(o.description);return i.push(Ms(n.displayParts,t)),i.join(`

`)}}getDocumentation(t,n,i){let o=new be.MarkdownString;return Nb(o,n.documentation,n.tags,t),o.baseUri=i,o.value.length?o:void 0}async isValidFunctionCompletionContext(t,n,i,o,s){try{let u=ye.toFileLocationRequestArgs(n,i),d=await t.execute("quickinfo",u,s);if(d.type==="response"&&d.body)switch(d.body.kind){case"var":case"let":case"const":case"alias":return!1}}catch{}let a=o.lineAt(i.line);return!(a.text.slice(i.character).match(/^[a-z_$0-9]*\s*\(/gi)||a.text.slice(0,i.character).match(/<\s*[\w]*$/gi))}getCodeActions(t,n){if(!t.codeActions?.length)return{};let i=[],o=!1;for(let a of t.codeActions)if(a.commands&&(o=!0),a.changes)for(let c of a.changes)c.fileName===n?i.push(...c.textChanges.map(Ja.fromCodeEdit)):o=!0;let s;return o&&(s={title:"",command:Ry.ID,arguments:[n,t.codeActions.map(a=>({commands:a.commands,description:a.description,changes:a.changes.filter(c=>c.fileName!==n)}))]}),{command:s,additionalTextEdits:i.length?i:void 0}}getRangeFromReplacementSpan(t,n){if(!t.replacementSpan)return n.optionalReplacementRange?{inserting:new be.Range(n.optionalReplacementRange.start,this.position),replacing:n.optionalReplacementRange}:void 0;let i=Se.fromTextSpan(t.replacementSpan);return i.isSingleLine||(i=new be.Range(i.start.line,i.start.character,i.start.line,n.line.length)),{inserting:i,replacing:i}}getFilterText(t,n){if(this.tsEntry.name.startsWith("#")){let i=this.completionContext.wordRange,o=i?t.charAt(i.start.character):void 0;return n?n.startsWith("this.#")?o==="#"?n:n.replace(/^this\.#/,""):n:o==="#"?void 0:this.tsEntry.name.replace(/^#/,"")}if(!n?.startsWith("this."))return n?.startsWith("[")?n.replace(/^\[['"](.+)[['"]\]$/,".$1"):n}resolveRange(){if(this.range)return;let t=this.completionContext.wordRange;t&&(this.range={inserting:new be.Range(t.start,this.position),replacing:t})}static convertKind(t){switch(t){case L.primitiveType:case L.keyword:return be.CompletionItemKind.Keyword;case L.const:case L.let:case L.variable:case L.localVariable:case L.alias:case L.parameter:return be.CompletionItemKind.Variable;case L.memberVariable:case L.memberGetAccessor:case L.memberSetAccessor:return be.CompletionItemKind.Field;case L.function:case L.localFunction:return be.CompletionItemKind.Function;case L.method:case L.constructSignature:case L.callSignature:case L.indexSignature:return be.CompletionItemKind.Method;case L.enum:return be.CompletionItemKind.Enum;case L.enumMember:return be.CompletionItemKind.EnumMember;case L.module:case L.externalModuleName:return be.CompletionItemKind.Module;case L.class:case L.type:return be.CompletionItemKind.Class;case L.interface:return be.CompletionItemKind.Interface;case L.warning:return be.CompletionItemKind.Text;case L.script:return be.CompletionItemKind.File;case L.directory:return be.CompletionItemKind.Folder;case L.string:return be.CompletionItemKind.Constant;default:return be.CompletionItemKind.Property}}static getCommitCharacters(t,n,i){let o=n.commitCharacters??(i?Array.from(i):void 0);if(o)return t.enableCallCompletions&&!t.isNewIdentifierLocation&&n.kind!==L.warning&&n.kind!==L.string&&o.push("("),o;if(!(n.kind===L.warning||n.kind===L.string)&&!t.isNewIdentifierLocation)return o=[".",",",";"],t.enableCallCompletions&&o.push("("),o}};Iy=class r{constructor(e,t){this.onCompletionAccepted=e;this.telemetryReporter=t}static ID="_typescript.onCompletionAccepted";id=r.ID;execute(e){this.onCompletionAccepted(e),e instanceof Dy&&this.telemetryReporter.logTelemetry("completions.accept",{isPackageJsonImport:e.tsEntry.isPackageJsonImport?"true":void 0,isImportStatementCompletion:e.tsEntry.isImportStatementCompletion?"true":void 0})}},Ny=class r{constructor(e){this.client=e}static ID="_typescript.applyCompletionCommand";id=r.ID;async execute(e){let t=await e.resolveCompletionItem(this.client,Pt);if(!t)return;let{edits:n,commands:i}=t;if(n){let o=new be.WorkspaceEdit;for(let s of n)o.replace(e.document.uri,s.range,s.newText);await be.workspace.applyEdit(o)}for(let o of i)await be.commands.executeCommand(o.command,...o.arguments??[])}},Ry=class r{constructor(e){this.client=e}static ID="_typescript.applyCompletionCodeAction";id=r.ID;async execute(e,t){if(t.length===0)return!0;if(t.length===1)return Pb(this.client,t[0],Pt);let n=await be.window.showQuickPick(t.map(i=>({label:i.description,description:"",action:i})),{placeHolder:be.l10n.t("Select code action to apply")});return n?Pb(this.client,n.action,Pt):!1}};(s=>{s.completeFunctionCalls="suggest.completeFunctionCalls",s.nameSuggestions="suggest.names",s.pathSuggestions="suggest.paths",s.autoImportSuggestions="suggest.autoImports",s.importStatementSuggestions="suggest.importStatements";function o(a,c){return{completeFunctionCalls:H(s.completeFunctionCalls,!1,{scope:c,fallbackSection:a}),pathSuggestions:H(s.pathSuggestions,!0,{scope:c,fallbackSection:a}),autoImportSuggestions:H(s.autoImportSuggestions,!0,{scope:c,fallbackSection:a}),nameSuggestions:H(s.nameSuggestions,!0,{scope:c,fallbackSection:a}),importStatementSuggestions:H(s.importStatementSuggestions,!0,{scope:c,fallbackSection:a})}}s.getConfigurationForResource=o})(G0||={});wy=class{constructor(e,t,n,i,o,s,a){this.client=e;this.language=t;this.typingsStatus=n;this.fileConfigurationManager=i;this.telemetryReporter=s;o.register(new Ry(this.client)),o.register(new Iy(a,this.telemetryReporter)),o.register(new Ny(this.client))}static triggerCharacters=[".",'"',"'","`","/","@","<","#"," "];async provideCompletionItems(e,t,n,i){if(!H("suggest.enabled",!0,{scope:e,fallbackSection:this.language.id}))return;if(this.typingsStatus.isAcquiringTypings)return Promise.reject({label:be.l10n.t({message:"Acquiring typings...",comment:["Typings refers to the *.d.ts typings files that power our IntelliSense. It should not be localized"]}),detail:be.l10n.t({message:"Acquiring typings definitions for IntelliSense.",comment:["Typings refers to the *.d.ts typings files that power our IntelliSense. It should not be localized"]})});let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=e.lineAt(t.line),a=G0.getConfigurationForResource(this.language.id,e);if(!this.shouldTrigger(i,s,t,a))return;let c=e.getWordRangeAtPosition(t);if(c&&!c.isEmpty){let $=c.start.translate(0,1);e.getText(new be.Range(c.start,$))==="@"&&(c=c.with($))}await this.client.interruptGetErr(()=>this.fileConfigurationManager.ensureConfigurationForDocument(e,n));let l={...ye.toFileLocationRequestArgs(o,t),includeExternalModuleExports:a.autoImportSuggestions,includeInsertTextCompletions:!0,triggerCharacter:this.getTsTriggerCharacter(i),triggerKind:Sb.toProtocolCompletionTriggerKind(i.triggerKind)},u,d,f,v,m=Date.now();try{d=await this.client.interruptGetErr(()=>this.client.execute("completionInfo",l,n))}finally{f=Date.now()-m}if(d.type!=="response"||!d.body){this.logCompletionsTelemetry(f,d);return}let S=d.body.isNewIdentifierLocation,y=d.body.isMemberCompletion;if(y){let $=s.text.slice(0,t.character).match(/\??\.\s*$/)||void 0;if($){let W=new be.Range(t.translate({characterDelta:-$[0].length}),t),re=e.getText(W);u={range:W,text:re}}}let N=!!d.body.isIncomplete||!!d.metadata?.isIncomplete,b=d.body.entries,_=d.metadata,A=Object.freeze(d.body.defaultCommitCharacters);d.body.optionalReplacementSpan&&(v=Se.fromTextSpan(d.body.optionalReplacementSpan));let k={isNewIdentifierLocation:S,isMemberCompletion:y,dotAccessorContext:u,enableCallCompletions:!a.completeFunctionCalls,wordRange:c,line:s.text,completeFunctionCalls:a.completeFunctionCalls,optionalReplacementRange:v},j=!1,q=!1,oe=[];for(let $ of b)if(!fq($,a)){let W=new Dy(t,e,$,k,_,this.client,A);W.command={command:Ny.ID,title:"",arguments:[W]},oe.push(W),j=j||!!$.isPackageJsonImport,q=q||!!$.isImportStatementCompletion}return f!==void 0&&this.logCompletionsTelemetry(f,d,j,q),new be.CompletionList(oe,N)}logCompletionsTelemetry(e,t,n,i){this.telemetryReporter.logTelemetry("completions.execute",{duration:String(e),type:t?.type??"unknown",flags:t?.type==="response"&&typeof t.body?.flags=="number"?String(t.body.flags):void 0,count:String(t?.type==="response"&&t.body?t.body.entries.length:0),updateGraphDurationMs:t?.type==="response"&&typeof t.performanceData?.updateGraphDurationMs=="number"?String(t.performanceData.updateGraphDurationMs):void 0,createAutoImportProviderProgramDurationMs:t?.type==="response"&&typeof t.performanceData?.createAutoImportProviderProgramDurationMs=="number"?String(t.performanceData.createAutoImportProviderProgramDurationMs):void 0,includesPackageJsonImport:n?"true":void 0,includesImportStatementCompletion:i?"true":void 0})}getTsTriggerCharacter(e){switch(e.triggerCharacter){case"@":return"@";case"#":return"#";case" ":return this.client.apiVersion.gte(ve.v430)?" ":void 0;case".":case'"':case"'":case"`":case"/":case"<":return e.triggerCharacter;default:return}}async resolveCompletionItem(e,t){return await e.resolveCompletionItem(this.client,t),e}shouldTrigger(e,t,n,i){return e.triggerCharacter===" "?!i.importStatementSuggestions||this.client.apiVersion.lt(ve.v430)?!1:t.text.slice(0,n.character)==="import":!0}}});function Qa(r,...e){if(global.setImmediate){let t=global.setImmediate(r,...e);return{dispose:()=>global.clearImmediate(t)}}else{let t=setTimeout(r,0,...e);return{dispose:()=>clearTimeout(t)}}}function Rb(r,e,t){let n,i=setTimeout(()=>{n?.(void 0),t?.()},e);return Promise.race([r.finally(()=>clearTimeout(i)),new Promise(o=>n=o)])}var bd,xd=C(()=>{"use strict";bd=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(n=>{this.onSuccess=n}).then(()=>{this.completionPromise=null,this.onSuccess=null;let n=this.task?.();return this.task=null,n})),(t>=0||this.timeout===null)&&(this.timeout=setTimeout(()=>{this.timeout=null,this.onSuccess?.(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}}});var J0={};Ke(J0,{register:()=>vq});function vq(r,e,t,n){return Ae([je(t,2),Fo(t,ve.v570),Cd($0,{fallbackSection:e.id})],()=>cr.languages.registerDocumentPasteEditProvider(r.semantic,new Al(e.id,t,n),{providedPasteEditKinds:[Al.kind],copyMimeTypes:[Al.metadataMimeType],pasteMimeTypes:[Al.metadataMimeType]}))}var cr,Pd,Ay,qp,$0,Al,X0=C(()=>{"use strict";cr=U(require("vscode"));Wt();$e();ut();xd();Mt();At();Pd=class r{constructor(e,t,n){this.resource=e;this.ranges=t;this.copyOperation=n}static parse(e){try{let t=JSON.parse(e),n=cr.Uri.parse(t.resource),i=t.ranges.map(s=>new cr.Range(s.start,s.end)),o=t.copyOperation?Promise.resolve(t.copyOperation):void 0;return new r(n,i,o)}catch{return}}},Ay=class r extends cr.DocumentPasteEdit{static tryCreateFromResponse(e,t){if(t.type!=="response"||!t.body?.edits.length)return;let n=new r,i=new cr.WorkspaceEdit;for(let o of t.body.edits)i.set(e.toResource(o.fileName),o.textChanges.map(Ja.fromCodeEdit));return n.additionalEdit=i,n}constructor(){super("",cr.l10n.t("Paste with imports"),Al.kind),this.yieldTo=[cr.DocumentDropOrPasteEditKind.Text.append("plain")]}},qp=class extends Ay{constructor(t,n){super();this.operation=n;this.insertText=t}},$0="updateImportsOnPaste.enabled",Al=class r{constructor(e,t,n){this._modeId=e;this._client=t;this.fileConfigurationManager=n}static kind=cr.DocumentDropOrPasteEditKind.TextUpdateImports.append("jsts");static metadataMimeType="application/vnd.code.jsts.metadata";async prepareDocumentPaste(e,t,n,i){if(!this.isEnabled(e))return;let o=this._client.toOpenTsFilePath(e);if(!o)return;let s=this._client.interruptGetErr(()=>this._client.execute("preparePasteEdits",{file:o,copiedTextSpan:t.map(Se.toTextSpan)},i)),c=await Rb(s,200);if(!i.isCancellationRequested)if(c){if(c.type!=="response"||!c.body)return;n.set(r.metadataMimeType,new cr.DataTransferItem(new Pd(e.uri,t,void 0)))}else n.set(r.metadataMimeType,new cr.DataTransferItem(new Pd(e.uri,t,s)))}async provideDocumentPasteEdits(e,t,n,i,o){if(!this.isEnabled(e))return;let s=this._client.toOpenTsFilePath(e);if(!s)return;let a=await n.get("text/plain")?.asString();if(!a||o.isCancellationRequested)return;let c=await this.extractMetadata(n,o);if(o.isCancellationRequested)return;let l;if(c){let d=c.ranges.map(Se.toTextSpan),f=this._client.toTsFilePath(c.resource);f&&(l={file:f,spans:d})}if(l?.file===s)return;let u=new cr.CancellationTokenSource;o.onCancellationRequested(()=>u.cancel()),c?.copyOperation?.then(d=>{(d.type!=="response"||!d.body)&&u.cancel()},d=>{});try{let d=this._client.interruptGetErr(()=>(this.fileConfigurationManager.ensureConfigurationForDocument(e,o),this._client.execute("getPasteEdits",{file:s,pastedText:[a],pasteLocations:t.map(Se.toTextSpan),copiedFrom:l},u.token))),v=await Rb(d,200);if(v){let m=Ay.tryCreateFromResponse(this._client,v);return m?[m]:void 0}else return[new qp(a,d)]}finally{u.dispose()}}async resolveDocumentPasteEdit(e,t){if(!(e instanceof qp))return;let n=await e.operation;return qp.tryCreateFromResponse(this._client,n)??e}async extractMetadata(e,t){let n=await e.get(r.metadataMimeType)?.value;if(!t.isCancellationRequested){if(n instanceof Pd)return n;if(typeof n=="string")return Pd.parse(n)}}isEnabled(e){return H($0,!0,{scope:e,fallbackSection:this._modeId})}}});var Us,Oy=C(()=>{"use strict";$e();Us=class{constructor(e){this.client=e}async getSymbolLocations(e,t,n,i){let o=this.client.toOpenTsFilePath(t);if(!o)return;let s=ye.toFileLocationRequestArgs(o,n),a=await this.client.execute(e,s,i);if(!(a.type!=="response"||!a.body))return a.body.map(c=>Tr.fromTextSpan(this.client.toResource(c.file),c))}}});var Z0={};Ke(Z0,{default:()=>Kp,register:()=>mq});function mq(r,e){return Ae([je(e,1,2)],()=>Q0.languages.registerDefinitionProvider(r.syntax,new Kp(e)))}var Q0,Kp,eO=C(()=>{"use strict";Q0=U(require("vscode"));Wt();$e();ut();Oy();Mt();At();Kp=class extends Us{async provideDefinition(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o=ye.toFileLocationRequestArgs(i,t),s=await this.client.execute("definitionAndBoundSpan",o,n);if(s.type!=="response"||!s.body)return;let a=s.body.textSpan?Se.fromTextSpan(s.body.textSpan):void 0,c=s.body.definitions;if(H("preferGoToSourceDefinition",!1,{scope:e,fallbackSection:e.languageId})&&this.client.apiVersion.gte(ve.v470)){let l=await this.client.execute("findSourceDefinition",o,n);l.type==="response"&&l.body?.length&&(c=l.body)}return c.map(l=>{let u=Tr.fromTextSpan(this.client.toResource(l.file),l);return l.contextStart&&l.contextEnd?{originSelectionRange:a,targetRange:Se.fromLocations(l.contextStart,l.contextEnd),targetUri:u.uri,targetSelectionRange:u.range}:{originSelectionRange:a,targetRange:u.range,targetUri:u.uri}})}}});var rO={};Ke(rO,{register:()=>hq});function hq(r,e){return zn.languages.registerCompletionItemProvider(r.syntax,new wb(e),"@")}var zn,tO,gq,wb,nO=C(()=>{"use strict";zn=U(require("vscode"));Wt();tO=[{value:"@ts-check",description:zn.l10n.t("Enables semantic checking in a JavaScript file. Must be at the top of a file.")},{value:"@ts-nocheck",description:zn.l10n.t("Disables semantic checking in a JavaScript file. Must be at the top of a file.")},{value:"@ts-ignore",description:zn.l10n.t("Suppresses @ts-check errors on the next line of a file.")}],gq=[...tO,{value:"@ts-expect-error",description:zn.l10n.t("Suppresses @ts-check errors on the next line of a file, expecting at least one to exist.")}],wb=class{constructor(e){this.client=e}provideCompletionItems(e,t,n){if(!this.client.toOpenTsFilePath(e))return[];let a=e.lineAt(t.line).text.slice(0,t.character).match(/^\s*\/\/+\s?(@[a-zA-Z\-]*)?$/);return a?(this.client.apiVersion.gte(ve.v390)?gq:tO).map(l=>{let u=new zn.CompletionItem(l.value,zn.CompletionItemKind.Snippet);return u.detail=l.description,u.range=new zn.Range(t.line,Math.max(0,t.character-(a[1]?a[1].length:0)),t.line,t.character),u}):[]}}});var oO={};Ke(oO,{register:()=>yq});function iO(r){return r.highlightSpans.map(e=>new On.DocumentHighlight(Se.fromTextSpan(e),e.kind==="writtenReference"?On.DocumentHighlightKind.Write:On.DocumentHighlightKind.Read))}function yq(r,e){let t=new Ab(e);return On.Disposable.from(On.languages.registerDocumentHighlightProvider(r.syntax,t),On.languages.registerMultiDocumentHighlightProvider(r.syntax,t))}var On,Ab,sO=C(()=>{"use strict";On=U(require("vscode"));$e();Ab=class{constructor(e){this.client=e}async provideMultiDocumentHighlights(e,t,n,i){let o=[e,...n].map(u=>this.client.toOpenTsFilePath(u)).filter(u=>!!u),s=this.client.toOpenTsFilePath(e);if(!s||o.length===0)return[];let a={...ye.toFileLocationRequestArgs(s,t),filesToSearch:o},c=await this.client.execute("documentHighlights",a,i);return c.type!=="response"||!c.body?[]:c.body.map(u=>new On.MultiDocumentHighlight(On.Uri.file(u.file),[...iO(u)]))}async provideDocumentHighlights(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return[];let o={...ye.toFileLocationRequestArgs(i,t),filesToSearch:[i]},s=await this.client.execute("documentHighlights",o,n);return s.type!=="response"||!s.body?[]:s.body.flatMap(iO)}}});var aO={};Ke(aO,{register:()=>_q});function _q(r,e,t){return Yt.languages.registerDocumentSymbolProvider(r.syntax,new Ob(e,t),{label:"TypeScript"})}var Yt,Sq,Ob,cO=C(()=>{"use strict";Yt=U(require("vscode"));Fp();wn();$e();Sq=r=>{switch(r){case L.module:return Yt.SymbolKind.Module;case L.class:return Yt.SymbolKind.Class;case L.enum:return Yt.SymbolKind.Enum;case L.interface:return Yt.SymbolKind.Interface;case L.method:return Yt.SymbolKind.Method;case L.memberVariable:return Yt.SymbolKind.Property;case L.memberGetAccessor:return Yt.SymbolKind.Property;case L.memberSetAccessor:return Yt.SymbolKind.Property;case L.variable:return Yt.SymbolKind.Variable;case L.const:return Yt.SymbolKind.Variable;case L.localVariable:return Yt.SymbolKind.Variable;case L.function:return Yt.SymbolKind.Function;case L.localFunction:return Yt.SymbolKind.Function;case L.constructSignature:return Yt.SymbolKind.Constructor;case L.constructorImplementation:return Yt.SymbolKind.Constructor}return Yt.SymbolKind.Variable},Ob=class r{constructor(e,t){this.client=e;this.cachedResponse=t}async provideDocumentSymbols(e,t){let n=this.client.toOpenTsFilePath(e);if(!n)return;let i={file:n},o=await this.cachedResponse.execute(e,()=>this.client.execute("navtree",i,t));if(o.type!=="response"||!o.body?.childItems)return;let s=[];for(let a of o.body.childItems)r.convertNavTree(e.uri,s,a);return s}static convertNavTree(e,t,n){let i=r.shouldInclueEntry(n);if(!i&&!n.childItems?.length)return!1;let o=new Set(n.childItems||[]);for(let s of n.spans){let a=Se.fromTextSpan(s),c=r.convertSymbol(n,a);for(let l of o)if(l.spans.some(u=>!!a.intersection(Se.fromTextSpan(u)))){let u=r.convertNavTree(e,c.children,l);i=i||u,o.delete(l)}i&&t.push(c)}return i}static convertSymbol(e,t){let n=e.nameSpan?Se.fromTextSpan(e.nameSpan):t,i=e.text;switch(e.kind){case L.memberGetAccessor:i=`(get) ${i}`;break;case L.memberSetAccessor:i=`(set) ${i}`;break}let o=new Yt.DocumentSymbol(i,"",Sq(e.kind),t,t.contains(n)?n:t);return Os(e.kindModifiers).has(Wn.deprecated)&&(o.tags=[Yt.SymbolTag.Deprecated]),o}static shouldInclueEntry(e){return e.kind===L.alias?!1:!!(e.text&&e.text!=="<function>"&&e.text!=="<class>")}}});var lO={};Ke(lO,{register:()=>Tq});function Tq(r,e){function t(n){_t.commands.executeCommand("setContext",Hp.context,n??r.apiVersion.gte(Hp.minVersion))}return t(),e.register(new Hp(r)),_t.Disposable.from(r.onTsServerStarted(()=>t()),new _t.Disposable(()=>t(!1)))}var _t,Hp,uO=C(()=>{"use strict";_t=U(require("vscode"));mi();Wt();$e();Hp=class r{constructor(e){this.client=e}static context="tsSupportsFileReferences";static minVersion=ve.v420;id="typescript.findAllFileReferences";async execute(e){if(this.client.apiVersion.lt(r.minVersion)){_t.window.showErrorMessage(_t.l10n.t("Find file references failed. Requires TypeScript 4.2+."));return}if(e??=_t.window.activeTextEditor?.document.uri,!e){_t.window.showErrorMessage(_t.l10n.t("Find file references failed. No resource provided."));return}let t=await _t.workspace.openTextDocument(e);if(!Ro(t)){_t.window.showErrorMessage(_t.l10n.t("Find file references failed. Unsupported file type."));return}let n=this.client.toOpenTsFilePath(t);if(!n){_t.window.showErrorMessage(_t.l10n.t("Find file references failed. Unknown file type."));return}await _t.window.withProgress({location:_t.ProgressLocation.Window,title:_t.l10n.t("Finding file references")},async(i,o)=>{let s=await this.client.execute("fileReferences",{file:n},o);if(s.type!=="response"||!s.body)return;let a=s.body.refs.map(u=>Tr.fromTextSpan(this.client.toResource(u.file),u)),c=_t.workspace.getConfiguration("references"),l=c.inspect("preferredLocation");await c.update("preferredLocation","view");try{await _t.commands.executeCommand("editor.action.showReferences",e,new _t.Position(0,0),a)}finally{await c.update("preferredLocation",l?.workspaceFolderValue??l?.workspaceValue)}})}}});var ky,dO,fO,Ly,pO,vO,mO,gO,hO,yO,kb=C(()=>{"use strict";ky=new Set([6196,6133]),dO=new Set([6138]),fO=new Set([6192]),Ly=new Set([7027]),pO=new Set([7028]),vO=new Set([7029]),mO=new Set([7030]),gO=new Set([2420]),hO=new Set([2552,2304]),yO=new Set([1308])});var _O,TO,EO,CO,Fy,bO,Bp,xO,PO,My,DO,IO,NO,RO,wO,AO,OO,Uy,Yy,Lb=C(()=>{"use strict";_O="addMissingAwait",TO="addMissingNewOperator",EO="fixOverrideModifier",CO="annotateWithTypeFromJSDoc",Fy="fixAwaitInSyncFunction",bO="fixClassDoesntImplementInheritedAbstractMember",Bp="fixClassIncorrectlyImplementsInterface",xO="constructorForDerivedNeedSuperCall",PO="extendsInterfaceBecomesImplements",My="import",DO="forgottenThisPropertyAccess",IO="removeUnnecessaryAwait",NO="spelling",RO="inferFromUsage",wO="addNameToNamelessParameter",AO="fixMissingFunctionDeclaration",OO="fixClassDoesntImplementInheritedAbstractMember",Uy="fixUnreachableCode",Yy="unusedIdentifier"});var LO={};Ke(LO,{register:()=>Cq});async function Eq(r,e,t,n,i,o){for(let s of i)for(let{codes:a,fixName:c}of r){if(o.isCancellationRequested)return;if(!a.has(s.code))continue;let l={...Se.toFileRangeRequestArgs(n,s.range),errorCodes:[+s.code]},u=await t.execute("getCodeFixes",l,o);if(u.type!=="response")continue;let d=u.body?.find(f=>f.fixName===c);if(d){qr.withFileCodeEdits(e,t,d.changes);break}}}async function Vb(r,e,t,n,i,o){for(let s of i)for(let{codes:a,fixName:c}of r){if(o.isCancellationRequested)return;if(!a.has(s.code))continue;let l={...Se.toFileRangeRequestArgs(n,s.range),errorCodes:[+s.code]},u=await t.execute("getCodeFixes",l,o);if(u.type!=="response"||!u.body?.length)continue;let d=u.body?.find(m=>m.fixName===c);if(!d)continue;if(!d.fixId){qr.withFileCodeEdits(e,t,d.changes);return}let f={scope:{type:"file",args:{file:n}},fixId:d.fixId},v=await t.execute("getCombinedCodeFix",f,o);if(v.type!=="response"||!v.body)return;qr.withFileCodeEdits(e,t,v.body.changes);return}}function Cq(r,e,t,n){return Ae([je(e,2)],()=>{let i=new Yb(e,t,n);return Kr.languages.registerCodeActionsProvider(r.semantic,i,i.metadata)})}var Kr,Gp,Fb,Mb,Ub,Yb,FO=C(()=>{"use strict";Kr=U(require("vscode"));kb();Lb();$e();ut();At();Gp=class extends Kr.CodeAction{},Fb=class r extends Gp{static kind=Kr.CodeActionKind.SourceFixAll.append("ts");constructor(){super(Kr.l10n.t("Fix all fixable JS/TS issues"),r.kind)}async build(e,t,n,i){this.edit=new Kr.WorkspaceEdit,await Eq([{codes:gO,fixName:Bp},{codes:yO,fixName:Fy}],this.edit,e,t,n,i),await Vb([{codes:Ly,fixName:Uy}],this.edit,e,t,n,i)}},Mb=class r extends Gp{static kind=Kr.CodeActionKind.Source.append("removeUnused").append("ts");constructor(){super(Kr.l10n.t("Remove all unused code"),r.kind)}async build(e,t,n,i){this.edit=new Kr.WorkspaceEdit,await Vb([{codes:ky,fixName:Yy}],this.edit,e,t,n,i)}},Ub=class r extends Gp{static kind=Kr.CodeActionKind.Source.append("addMissingImports").append("ts");constructor(){super(Kr.l10n.t("Add all missing imports"),r.kind)}async build(e,t,n,i){this.edit=new Kr.WorkspaceEdit,await Vb([{codes:hO,fixName:My}],this.edit,e,t,n,i)}},Yb=class r{constructor(e,t,n){this.client=e;this.fileConfigurationManager=t;this.diagnosticsManager=n}static kindProviders=[Fb,Mb,Ub];get metadata(){return{providedCodeActionKinds:r.kindProviders.map(e=>e.kind)}}async provideCodeActions(e,t,n,i){if(!n.only||!Kr.CodeActionKind.Source.intersects(n.only))return;let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=this.getFixAllActions(n.only),a=this.diagnosticsManager.getDiagnostics(e.uri);if(!a.length)return s;if(await this.fileConfigurationManager.ensureConfigurationForDocument(e,i),!i.isCancellationRequested)return await Promise.all(s.map(c=>c.build(this.client,o,a,i))),s}getFixAllActions(e){return r.kindProviders.filter(t=>e.intersects(t.kind)).map(t=>new t)}}});var MO={};Ke(MO,{register:()=>bq});function bq(r,e){return Yo.languages.registerFoldingRangeProvider(r.syntax,new jb(e))}var Yo,jb,UO=C(()=>{"use strict";Yo=U(require("vscode"));$e();gi();jb=class r{constructor(e){this.client=e}async provideFoldingRanges(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o={file:i},s=await this.client.execute("getOutliningSpans",o,n);if(!(s.type!=="response"||!s.body))return _r(s.body.map(a=>this.convertOutliningSpan(a,e)))}convertOutliningSpan(e,t){let n=Se.fromTextSpan(e.textSpan),i=r.getFoldingRangeKind(e);if(e.kind==="comment"){let a=t.lineAt(n.start.line).text;if(/\/\/\s*#endregion/gi.test(a))return}let o=n.start.line,s=this.adjustFoldingEnd(n,t);return new Yo.FoldingRange(o,s,i)}static foldEndPairCharacters=["}","]",")","`",">"];adjustFoldingEnd(e,t){if(e.end.character>0){let n=t.getText(new Yo.Range(e.end.translate(0,-1),e.end));if(r.foldEndPairCharacters.includes(n))return Math.max(e.end.line-1,e.start.line)}return e.end.line}static getFoldingRangeKind(e){switch(e.kind){case"comment":return Yo.FoldingRangeKind.Comment;case"region":return Yo.FoldingRangeKind.Region;case"imports":return Yo.FoldingRangeKind.Imports;default:return}}}});var YO={};Ke(YO,{register:()=>xq});function xq(r,e,t,n){return Ae([Cd("format.enabled",{fallbackSection:e.id,fallbackSubSectionNameOverride:"format.enable"})],()=>{let i=new qb(t,n);return Wp.Disposable.from(Wp.languages.registerOnTypeFormattingEditProvider(r.syntax,i,";","}",`
`),Wp.languages.registerDocumentRangeFormattingEditProvider(r.syntax,i))})}var Wp,qb,VO=C(()=>{"use strict";Wp=U(require("vscode"));$e();At();qb=class{constructor(e,t){this.client=e;this.fileConfigurationManager=t}async provideDocumentRangeFormattingEdits(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;await this.fileConfigurationManager.ensureConfigurationOptions(e,n,i);let s=Se.toFormattingRequestArgs(o,t),a=await this.client.execute("format",s,i);if(!(a.type!=="response"||!a.body))return a.body.map(Ja.fromCodeEdit)}async provideOnTypeFormattingEdits(e,t,n,i,o){let s=this.client.toOpenTsFilePath(e);if(!s)return;await this.fileConfigurationManager.ensureConfigurationOptions(e,i,o);let a={...ye.toFileLocationRequestArgs(s,t),key:n},c=await this.client.execute("formatonkey",a,o);if(c.type!=="response"||!c.body)return[];let l=[];for(let u of c.body){let d=Ja.fromCodeEdit(u),f=d.range;if(f.start.character===0&&f.start.line===f.end.line&&d.newText===""){let v=e.lineAt(f.start.line).text;(v.trim().length>0||v.length>f.end.character)&&l.push(d)}else l.push(d)}return l}}});var jO={};Ke(jO,{register:()=>Dq});function Dq(r,e,t){return Ae([je(e,1,2)],()=>Vo.languages.registerHoverProvider(r.syntax,new Kb(e,t)))}var Vo,Kb,qO=C(()=>{"use strict";Vo=U(require("vscode"));ut();At();Py();$e();Wt();Kb=class{constructor(e,t){this.client=e;this.fileConfigurationManager=t}lastHoverAndLevel;async provideHover(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s;this.client.apiVersion.gte(ve.v590)&&(s=Math.max(0,this.getPreviousLevel(i?.previousHover)+(i?.verbosityDelta??0)));let a={...ye.toFileLocationRequestArgs(o,t),verbosityLevel:s},c=await this.client.interruptGetErr(async()=>(await this.fileConfigurationManager.ensureConfigurationForDocument(e,n),this.client.execute("quickinfo",a,n)));if(c.type!=="response"||!c.body)return;let l=this.getContents(e.uri,c.body,c._serverType),u=Se.fromTextSpan(c.body),d=s!==void 0?new Vo.VerboseHover(l,u,c.body.canIncreaseVerbosityLevel,s!==0):new Vo.Hover(l,u);return s!==void 0&&(this.lastHoverAndLevel=[d,s]),d}getContents(e,t,n){let i=[];if(t.displayString){let s=[];n==="syntax"&&this.client.hasCapabilityForResource(e,2)&&s.push(Vo.l10n.t({message:"(loading...)",comment:["Prefix displayed for hover entries while the server is still loading"]})),s.push(t.displayString),i.push(new Vo.MarkdownString().appendCodeblock(s.join(" "),"typescript"))}let o=jp(t.documentation,t.tags,this.client,e);return i.push(o),i}getPreviousLevel(e){return e&&this.lastHoverAndLevel&&this.lastHoverAndLevel[0]===e?this.lastHoverAndLevel[1]:0}}});var HO={};Ke(HO,{register:()=>Iq});function Iq(r,e){return Ae([je(e,2)],()=>KO.languages.registerImplementationProvider(r.semantic,new Hb(e)))}var KO,Hb,BO=C(()=>{"use strict";KO=U(require("vscode"));ut();Oy();At();Hb=class extends Us{provideImplementation(e,t,n){return this.getSymbolLocations("implementation",e,t,n)}}});var GO={};Ke(GO,{register:()=>Aq});function Rq(r){switch(r){case"Parameter":return kn.InlayHintKind.Parameter;case"Type":return kn.InlayHintKind.Type;case"Enum":return;default:return}}function wq(r,e){let t=pb(e,r.id);return t.includeInlayParameterNameHints==="literals"||t.includeInlayParameterNameHints==="all"||t.includeInlayEnumMemberValueHints||t.includeInlayFunctionLikeReturnTypeHints||t.includeInlayFunctionParameterTypeHints||t.includeInlayPropertyDeclarationTypeHints||t.includeInlayVariableTypeHints}function Aq(r,e,t,n,i){return Ae([Fo(t,Vy.minVersion),je(t,2)],()=>{let o=new Vy(e,t,n,i);return kn.languages.registerInlayHintsProvider(r.semantic,o)})}var kn,Nq,Vy,WO=C(()=>{"use strict";kn=U(require("vscode"));Wt();$e();ut();Mt();gt();vb();At();Nq=Object.values(Oo),Vy=class extends _e{constructor(t,n,i,o){super();this.language=t;this.client=n;this.fileConfigurationManager=i;this.telemetryReporter=o;this._register(kn.workspace.onDidChangeConfiguration(s=>{Nq.some(a=>s.affectsConfiguration(cn+"."+a)||s.affectsConfiguration(t.id+"."+a))&&this._onDidChangeInlayHints.fire()})),this._register(kn.workspace.onDidChangeTextDocument(s=>{t.languageIds.includes(s.document.languageId)&&this._onDidChangeInlayHints.fire()}))}static minVersion=ve.v440;_onDidChangeInlayHints=this._register(new kn.EventEmitter);onDidChangeInlayHints=this._onDidChangeInlayHints.event;hasReportedTelemetry=!1;async provideInlayHints(t,n,i){let o=this.client.toOpenTsFilePath(t);if(!o||!wq(this.language,t))return;let s=t.offsetAt(n.start),a=t.offsetAt(n.end)-s;if(await this.fileConfigurationManager.ensureConfigurationForDocument(t,i),i.isCancellationRequested)return;this.hasReportedTelemetry||(this.hasReportedTelemetry=!0,this.telemetryReporter.logTelemetry("inlayHints.provide",{}));let c=await this.client.execute("provideInlayHints",{file:o,start:s,length:a},i);if(!(c.type!=="response"||!c.success||!c.body))return c.body.map(l=>{let u=new kn.InlayHint(ye.fromLocation(l.position),this.convertInlayHintText(l),Rq(l.kind));return u.paddingLeft=l.whitespaceBefore,u.paddingRight=l.whitespaceAfter,u})}convertInlayHintText(t){return t.displayParts?t.displayParts.map(n=>{let i=new kn.InlayHintLabelPart(n.text);return n.span&&(i.location=Tr.fromTextSpan(this.client.toResource(n.span.file),n.span)),i}):t.text}}});var $O={};Ke($O,{register:()=>kq,templateToSnippet:()=>zO});function zO(r){let e=1;return r=r.replace(/\$/g,"\\$"),r=r.replace(/^[ \t]*(?=(\/|[ ]\*))/gm,""),r=r.replace(/^(\/\*\*\s*\*[ ]*)$/m,t=>t+"$0"),r=r.replace(/\* @param([ ]\{\S+\})?\s+(\S+)[ \t]*$/gm,(t,n,i)=>{let o="* @param ";return n===" {any}"||n===" {*}"?o+=`{\${${e++}:*}} `:n&&(o+=n+" "),o+=i+` \${${e++}}`,o}),r=r.replace(/\* @returns[ \t]*$/gm,`* @returns \${${e++}}`),new $n.SnippetString(r)}function kq(r,e,t,n){return $n.languages.registerCompletionItemProvider(r.syntax,new Gb(t,e,n),"*")}var $n,Oq,Bb,Gb,JO=C(()=>{"use strict";$n=U(require("vscode"));$e();Mt();Oq=new $n.SnippetString(`/**
 * $0
 */`),Bb=class extends $n.CompletionItem{constructor(t,n){super("/** */",$n.CompletionItemKind.Text);this.document=t;this.position=n;this.detail=$n.l10n.t("JSDoc comment"),this.sortText="\0";let i=t.lineAt(n.line).text,o=i.slice(0,n.character).match(/\/\**\s*$/),s=i.slice(n.character).match(/^\s*\**\//),a=n.translate(0,o?-o[0].length:0),c=new $n.Range(a,n.translate(0,s?s[0].length:0));this.range={inserting:c,replacing:c}}},Gb=class{constructor(e,t,n){this.client=e;this.language=t;this.fileConfigurationManager=n}async provideCompletionItems(e,t,n){if(!H("suggest.jsdoc.enabled",!0,{scope:e,fallbackSection:this.language.id,fallbackSubSectionNameOverride:"suggest.completeJSDocs"}))return;let i=this.client.toOpenTsFilePath(e);if(!i||!this.isPotentiallyValidDocCompletionPosition(e,t))return;let o=await this.client.interruptGetErr(async()=>{await this.fileConfigurationManager.ensureConfigurationForDocument(e,n);let a=ye.toFileLocationRequestArgs(i,t);return this.client.execute("docCommentTemplate",a,n)});if(o.type!=="response"||!o.body)return;let s=new Bb(e,t);return o.body.newText==="/** */"?s.insertText=Oq:s.insertText=zO(o.body.newText),[s]}isPotentiallyValidDocCompletionPosition(e,t){let n=e.lineAt(t.line).text,i=n.slice(0,t.character);if(!/^\s*$|\/\*\*\s*$|^\s*\/\*\*+\s*$/.test(i))return!1;let o=n.slice(t.character);return/^\s*(\*+\/)?\s*$/.test(o)}}});var XO={};Ke(XO,{register:()=>Lq});function Lq(r,e){return Ae([Fo(e,jy.minVersion),je(e,0)],()=>qy.languages.registerLinkedEditingRangeProvider(r.syntax,new jy(e)))}var qy,jy,QO=C(()=>{"use strict";qy=U(require("vscode"));Wt();$e();ut();At();jy=class{constructor(e){this.client=e}static minVersion=ve.v510;async provideLinkedEditingRanges(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o=ye.toFileLocationRequestArgs(i,t),s=await this.client.execute("linkedEditingRange",o,n);if(s.type!=="response"||!s.body)return;let a=s.body.wordPattern?new RegExp(s.body.wordPattern):void 0;return new qy.LinkedEditingRanges(s.body.ranges.map(c=>Se.fromTextSpan(c)),a)}}});var ZO={};Ke(ZO,{register:()=>Yq});function Yq(r,e,t,n,i){let o=[];for(let s of[Fq,Mq,Uq])o.push(Ae([Fo(e,s.minVersion??ve.defaultVersion),je(e,2)],()=>{let a=new zb(e,s,t,n,i);return Hr.Disposable.from(Hr.languages.registerCodeActionsProvider(r.semantic,a,{providedCodeActionKinds:[s.kind]}))}),...s.commandIds.map(a=>t.register({id:a,execute(){return Hr.commands.executeCommand("editor.action.sourceAction",{kind:s.kind.value,apply:"first"})}})));return Hr.Disposable.from(...o)}var Hr,Fq,Mq,Uq,Ky,Wb,zb,ek=C(()=>{"use strict";Hr=U(require("vscode"));Wt();wn();$e();ut();No();At();Fq={commandIds:[],title:Hr.l10n.t("Organize Imports"),kind:Hr.CodeActionKind.SourceOrganizeImports,mode:"All"},Mq={commandIds:["typescript.sortImports","javascript.sortImports"],minVersion:ve.v430,title:Hr.l10n.t("Sort Imports"),kind:Hr.CodeActionKind.Source.append("sortImports"),mode:"SortAndCombine"},Uq={commandIds:["typescript.removeUnusedImports","javascript.removeUnusedImports"],minVersion:ve.v490,title:Hr.l10n.t("Remove Unused Imports"),kind:Hr.CodeActionKind.Source.append("removeUnusedImports"),mode:"RemoveUnused"},Ky=class r{constructor(e){this.telemetryReporter=e}static ID="_typescript.didOrganizeImports";id=r.ID;async execute(){this.telemetryReporter.logTelemetry("organizeImports.execute",{})}},Wb=class extends Hr.CodeAction{constructor(t,n,i){super(t,n);this.document=i}},zb=class{constructor(e,t,n,i,o){this.client=e;this.commandMetadata=t;this.fileConfigManager=i;n.register(new Ky(o))}provideCodeActions(e,t,n,i){return n.only?.contains(this.commandMetadata.kind)?this.client.toOpenTsFilePath(e)?[new Wb(this.commandMetadata.title,this.commandMetadata.kind,e)]:[]:[]}async resolveCodeAction(e,t){let n=await this.client.interruptGetErr(async()=>{if(await this.fileConfigManager.ensureConfigurationForDocument(e.document,t),t.isCancellationRequested)return;let i=this.client.toOpenTsFilePath(e.document);if(!i)return;let o={scope:{type:"file",args:{file:i}},skipDestructiveCodeActions:this.commandMetadata.mode==="SortAndCombine",mode:_b.toProtocolOrganizeImportsMode(this.commandMetadata.mode)};return this.client.execute("organizeImports",o,Pt)});if(!(n?.type!=="response"||!n.body||t.isCancellationRequested))return n.body.length&&(e.edit=qr.fromFileCodeEdits(this.client,n.body)),e.command={command:Ky.ID,title:"",arguments:[]},e}}});var Br,Za=C(()=>{"use strict";Br=class r{constructor(e){this.executor=e}_didRun=!1;_value;_error;get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}map(e){return new r(()=>e(this.value))}}});function rk(r,e){for(let t of e){let n=Se.fromTextSpan(t.spans[0]);if(r===n.start.line)return n;if(r>n.start.line&&r<=n.end.line&&t.childItems)return rk(r,t.childItems)}}async function nk(r,e,t){let n=r.toOpenTsFilePath(e);if(!n)return;let i=await r.execute("navtree",{file:n},Pt);if(!(i.type!=="response"||!i.body?.childItems))return rk(t,i.body.childItems)}async function tk(r,e,t){let n=ye.fromLocation(t[0].start),i=t[0],o=t[0],s=ye.fromLocation(t[0].start);for(let v of t){let m=ye.fromLocation(v.start),S=ye.fromLocation(v.end);m.compareTo(n)<0&&(n=m,i=v),S.compareTo(s)>0&&(s=S,o=v)}let a=e.getText(),c=a.indexOf(i.newText),l=c>-1?e.positionAt(c):n,u=a.lastIndexOf(o.newText),d=u>-1?e.positionAt(u+o.newText.length):s,f=await nk(r,e,d.line);return new Ol.Range(l,f?.end??d)}var Ol,ec,tc,$b=C(()=>{"use strict";Ol=U(require("vscode"));No();$e();ec=class r{constructor(e,t){this.client=e;this.telemetryReporter=t}static ID="_typescript.quickFix.editorChatReplacement2";id=r.ID;async execute({message:e,document:t,expand:n,action:i}){i.type==="quickfix"?this.telemetryReporter.logTelemetry("aiQuickfix.execute",{action:i.quickfix.fixName}):this.telemetryReporter.logTelemetry("aiRefactor.execute",{action:i.refactor.name});let o=n.kind==="navtree-function"?await nk(this.client,t,n.pos.line):n.kind==="refactor-info"?await tk(this.client,t,n.refactor.edits.flatMap(a=>a.textChanges)):n.kind==="code-action"?await tk(this.client,t,n.action.changes.flatMap(a=>a.textChanges)):n.range,s=o?new Ol.Selection(o.start,o.end):void 0;await Ol.commands.executeCommand("vscode.editorChat.start",{initialRange:o,initialSelection:s,message:e,autoSend:!0})}},tc=class r{static ID="_typescript.compositeCommand";id=r.ID;async execute(...e){for(let t of e)await Ol.commands.executeCommand(t.command,...t.arguments??[])}}});var ok={};Ke(ok,{register:()=>jq});function Vq(r,e){if(r instanceof Id)return!1;let t=ik.get(r.tsAction.fixName);return t?e.every(n=>{if(n===r||n instanceof Id)return!0;let i=ik.get(n.tsAction.fixName);return!i||i.priority<t.priority?!0:!(i.priority>t.priority||t.thereCanOnlyBeOne&&r.tsAction.fixName===n.tsAction.fixName)}):!1}function jq(r,e,t,n,i,o){return Ae([je(e,2)],()=>Tt.languages.registerCodeActionsProvider(r.semantic,new By(e,t,n,i,o),By.metadata))}var Tt,zp,Hy,Xb,Dd,Id,Qb,Zb,By,Jb,ik,sk=C(()=>{"use strict";Tt=U(require("vscode"));Lb();$e();ut();No();Za();Op();Db();$b();At();zp=class r{constructor(e,t,n){this.client=e;this.diagnosticManager=t;this.telemetryReporter=n}static ID="_typescript.applyCodeActionCommand";id=r.ID;async execute({document:e,action:t,diagnostic:n,followupAction:i}){this.telemetryReporter.logTelemetry("quickFix.execute",{fixName:t.fixName}),this.diagnosticManager.deleteDiagnostic(e.uri,n);let o=await Cy(this.client,t.commands,Pt);return await i?.execute(),o}},Hy=class r{constructor(e,t){this.client=e;this.telemetryReporter=t}static ID="_typescript.applyFixAllCodeAction";id=r.ID;async execute(e){this.telemetryReporter.logTelemetry("quickFixAll.execute",{fixName:e.action.tsAction.fixName}),e.action.combinedResponse&&await Cy(this.client,e.action.combinedResponse.body.commands,Pt)}},Xb=class r{constructor(e){this._values=e}static from(e){let t=new Map;for(let n of e)t.set(r.key(n),n);return new r(t)}static key(e){let{start:t,end:n}=e.range;return`${e.code}-${t.line},${t.character}-${n.line},${n.character}`}get values(){return this._values.values()}get size(){return this._values.size}},Dd=class extends Tt.CodeAction{constructor(t,n,i){super(n,i);this.tsAction=t}},Id=class extends Dd{constructor(t,n,i,o){super(t,i,o);this.file=n}combinedResponse},Qb=class{_actions=new Set;_fixAllActions=new Map;_aiActions=new Set;*values(){yield*this._actions,yield*this._aiActions}addAction(e){if(e.isAI){this._aiActions.add(e);return}for(let t of this._actions)e.tsAction.fixName===t.tsAction.fixName&&Vi(e.edit,t.edit)&&this._actions.delete(t);if(this._actions.add(e),e.tsAction.fixId){let t=this._fixAllActions.get(e.tsAction.fixId);t&&(this._actions.delete(t),this._actions.add(t))}}addFixAllAction(e,t){let n=this._fixAllActions.get(e);n&&this._actions.delete(n),this.addAction(t),this._fixAllActions.set(e,t)}hasFixAllAction(e){return this._fixAllActions.has(e)}},Zb=class{constructor(e){this.client=e}async getFixableDiagnosticsForContext(e){let t=await this.fixableDiagnosticCodes.value;return Xb.from(e.filter(n=>typeof n.code<"u"&&t.has(n.code+"")))}fixableDiagnosticCodes=new Br(()=>this.client.execute("getSupportedCodeFixes",null,Pt).then(e=>e.type==="response"?e.body||[]:[]).then(e=>new Set(e)))},By=class r{constructor(e,t,n,i,o){this.client=e;this.formattingConfigurationManager=t;this.diagnosticsManager=i;n.register(new tc),n.register(new zp(e,i,o)),n.register(new Hy(e,o)),n.register(new ec(e,o)),this.supportedCodeActionProvider=new Zb(e)}static _maxCodeActionsPerFile=1e3;static metadata={providedCodeActionKinds:[Tt.CodeActionKind.QuickFix]};supportedCodeActionProvider;async provideCodeActions(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=n.diagnostics;if(this.client.bufferSyncSupport.hasPendingDiagnostics(e.uri)){if(await new Promise(d=>{setTimeout(d,500)}),i.isCancellationRequested)return;let u=[];for(let d of this.diagnosticsManager.getDiagnostics(e.uri))if(t.intersection(d.range)&&u.push(d)>r._maxCodeActionsPerFile)break;s=u}let a=await this.supportedCodeActionProvider.getFixableDiagnosticsForContext(s);if(!a.size||i.isCancellationRequested||(await this.formattingConfigurationManager.ensureConfigurationForDocument(e,i),i.isCancellationRequested))return;let c=new Qb;for(let u of a.values)if(await this.getFixesForDiagnostic(e,o,u,c,i),i.isCancellationRequested)return;let l=Array.from(c.values());for(let u of l)u.isPreferred=Vq(u,l);return l}async resolveCodeAction(e,t){if(!(e instanceof Id)||!e.tsAction.fixId)return e;let n={scope:{type:"file",args:{file:e.file}},fixId:e.tsAction.fixId},i=await this.client.execute("getCombinedCodeFix",n,t);return i.type==="response"&&(e.combinedResponse=i,e.edit=qr.fromFileCodeEdits(this.client,i.body.changes)),e}async getFixesForDiagnostic(e,t,n,i,o){let s={...Se.toFileRangeRequestArgs(t,n.range),errorCodes:[+n.code]},a=await this.client.execute("getCodeFixes",s,o);if(a.type!=="response"||!a.body)return i;for(let c of a.body){for(let l of this.getFixesForTsCodeAction(e,n,c))i.addAction(l);this.addFixAllForTsCodeAction(i,e.uri,t,n,c)}return i}getFixesForTsCodeAction(e,t,n){let i=[],o=new Dd(n,n.description,Tt.CodeActionKind.QuickFix);if(o.edit=Ey(this.client,n),o.diagnostics=[t],o.ranges=[t.range],o.command={command:zp.ID,arguments:[{action:n,diagnostic:t,document:e}],title:""},i.push(o),Tt.extensions.getExtension("github.copilot-chat")?.isActive){let a,c,l=n.description;if(n.fixName===Bp)l=Tt.l10n.t("{0} with AI",n.description),a=Tt.l10n.t("Implement the stubbed-out class members for {0} with a useful implementation.",e.getText(t.range)),c={kind:"code-action",action:n};else if(n.fixName===OO)l=Tt.l10n.t("{0} with AI",n.description),a=Tt.l10n.t("Implement the stubbed-out class members for {0} with a useful implementation.",e.getText(t.range)),c={kind:"code-action",action:n};else if(n.fixName===AO)l=Tt.l10n.t("Implement missing function declaration '{0}' using AI",e.getText(t.range)),a=Tt.l10n.t("Provide a reasonable implementation of the function {0} given its type and the context it's called in.",e.getText(t.range)),c={kind:"code-action",action:n};else if(n.fixName===RO){let u=new Dd(n,Tt.l10n.t("Infer types using AI"),Tt.CodeActionKind.QuickFix);u.edit=new Tt.WorkspaceEdit,u.diagnostics=[t],u.ranges=[t.range],u.isAI=!0,u.command={command:ec.ID,arguments:[{message:Tt.l10n.t("Add types to this code. Add separate interfaces when possible. Do not change the code except for adding types."),expand:{kind:"navtree-function",pos:t.range.start},document:e,action:{type:"quickfix",quickfix:n}}],title:""},i.push(u)}else if(n.fixName===wO){let u=n.changes.map(d=>d.textChanges.map(f=>f.newText).join("")).join("");l=Tt.l10n.t("Add meaningful parameter name with AI"),a=Tt.l10n.t("Rename the parameter {0} with a more meaningful name.",u),c={kind:"navtree-function",pos:t.range.start}}if(c&&a!==void 0){let u=new Dd(n,l,Tt.CodeActionKind.QuickFix);u.edit=Ey(this.client,n),u.edit?.insert(e.uri,t.range.start,""),u.diagnostics=[t],u.ranges=[t.range],u.isAI=!0,u.command={command:tc.ID,title:"",arguments:[{command:zp.ID,arguments:[{action:n,diagnostic:t,document:e}],title:""},{command:ec.ID,title:"",arguments:[{message:a,expand:c,document:e,action:{type:"quickfix",quickfix:n}}]}]},i.push(u)}}return i}addFixAllForTsCodeAction(e,t,n,i,o){if(!o.fixId||e.hasFixAllAction(o.fixId)||!this.diagnosticsManager.getDiagnostics(t).some(a=>a===i?!1:a.code===i.code||Jb.has(a.code)&&Jb.get(a.code)===Jb.get(i.code)))return e;let s=new Id(o,n,o.fixAllDescription||Tt.l10n.t("{0} (Fix all in file)",o.description),Tt.CodeActionKind.QuickFix);return s.diagnostics=[i],s.ranges=[i.range],s.command={command:Hy.ID,arguments:[{action:s}],title:""},e.addFixAllAction(o.fixId,s),e}},Jb=new Map([[2339,2339],[2345,2339]]),ik=new Map([[CO,{priority:2}],[xO,{priority:2}],[PO,{priority:2}],[Fy,{priority:2}],[IO,{priority:2}],[Bp,{priority:3}],[bO,{priority:3}],[Uy,{priority:2}],[Yy,{priority:2}],[DO,{priority:2}],[NO,{priority:0}],[_O,{priority:2}],[EO,{priority:2}],[TO,{priority:2}],[My,{priority:1,thereCanOnlyBeOne:!0}]])});var ak,b7,rc,ex=C(()=>{ak=(()=>{"use strict";var r={470:n=>{function i(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function o(a,c){for(var l,u="",d=0,f=-1,v=0,m=0;m<=a.length;++m){if(m<a.length)l=a.charCodeAt(m);else{if(l===47)break;l=47}if(l===47){if(!(f===m-1||v===1))if(f!==m-1&&v===2){if(u.length<2||d!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var S=u.lastIndexOf("/");if(S!==u.length-1){S===-1?(u="",d=0):d=(u=u.slice(0,S)).length-1-u.lastIndexOf("/"),f=m,v=0;continue}}else if(u.length===2||u.length===1){u="",d=0,f=m,v=0;continue}}c&&(u.length>0?u+="/..":u="..",d=2)}else u.length>0?u+="/"+a.slice(f+1,m):u=a.slice(f+1,m),d=m-f-1;f=m,v=0}else l===46&&v!==-1?++v:v=-1}return u}var s={resolve:function(){for(var a,c="",l=!1,u=arguments.length-1;u>=-1&&!l;u--){var d;u>=0?d=arguments[u]:(a===void 0&&(a=process.cwd()),d=a),i(d),d.length!==0&&(c=d+"/"+c,l=d.charCodeAt(0)===47)}return c=o(c,!l),l?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(a){if(i(a),a.length===0)return".";var c=a.charCodeAt(0)===47,l=a.charCodeAt(a.length-1)===47;return(a=o(a,!c)).length!==0||c||(a="."),a.length>0&&l&&(a+="/"),c?"/"+a:a},isAbsolute:function(a){return i(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,c=0;c<arguments.length;++c){var l=arguments[c];i(l),l.length>0&&(a===void 0?a=l:a+="/"+l)}return a===void 0?".":s.normalize(a)},relative:function(a,c){if(i(a),i(c),a===c||(a=s.resolve(a))===(c=s.resolve(c)))return"";for(var l=1;l<a.length&&a.charCodeAt(l)===47;++l);for(var u=a.length,d=u-l,f=1;f<c.length&&c.charCodeAt(f)===47;++f);for(var v=c.length-f,m=d<v?d:v,S=-1,y=0;y<=m;++y){if(y===m){if(v>m){if(c.charCodeAt(f+y)===47)return c.slice(f+y+1);if(y===0)return c.slice(f+y)}else d>m&&(a.charCodeAt(l+y)===47?S=y:y===0&&(S=0));break}var N=a.charCodeAt(l+y);if(N!==c.charCodeAt(f+y))break;N===47&&(S=y)}var b="";for(y=l+S+1;y<=u;++y)y!==u&&a.charCodeAt(y)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+c.slice(f+S):(f+=S,c.charCodeAt(f)===47&&++f,c.slice(f))},_makeLong:function(a){return a},dirname:function(a){if(i(a),a.length===0)return".";for(var c=a.charCodeAt(0),l=c===47,u=-1,d=!0,f=a.length-1;f>=1;--f)if((c=a.charCodeAt(f))===47){if(!d){u=f;break}}else d=!1;return u===-1?l?"/":".":l&&u===1?"//":a.slice(0,u)},basename:function(a,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');i(a);var l,u=0,d=-1,f=!0;if(c!==void 0&&c.length>0&&c.length<=a.length){if(c.length===a.length&&c===a)return"";var v=c.length-1,m=-1;for(l=a.length-1;l>=0;--l){var S=a.charCodeAt(l);if(S===47){if(!f){u=l+1;break}}else m===-1&&(f=!1,m=l+1),v>=0&&(S===c.charCodeAt(v)?--v==-1&&(d=l):(v=-1,d=m))}return u===d?d=m:d===-1&&(d=a.length),a.slice(u,d)}for(l=a.length-1;l>=0;--l)if(a.charCodeAt(l)===47){if(!f){u=l+1;break}}else d===-1&&(f=!1,d=l+1);return d===-1?"":a.slice(u,d)},extname:function(a){i(a);for(var c=-1,l=0,u=-1,d=!0,f=0,v=a.length-1;v>=0;--v){var m=a.charCodeAt(v);if(m!==47)u===-1&&(d=!1,u=v+1),m===46?c===-1?c=v:f!==1&&(f=1):c!==-1&&(f=-1);else if(!d){l=v+1;break}}return c===-1||u===-1||f===0||f===1&&c===u-1&&c===l+1?"":a.slice(c,u)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return(function(c,l){var u=l.dir||l.root,d=l.base||(l.name||"")+(l.ext||"");return u?u===l.root?u+d:u+"/"+d:d})(0,a)},parse:function(a){i(a);var c={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return c;var l,u=a.charCodeAt(0),d=u===47;d?(c.root="/",l=1):l=0;for(var f=-1,v=0,m=-1,S=!0,y=a.length-1,N=0;y>=l;--y)if((u=a.charCodeAt(y))!==47)m===-1&&(S=!1,m=y+1),u===46?f===-1?f=y:N!==1&&(N=1):f!==-1&&(N=-1);else if(!S){v=y+1;break}return f===-1||m===-1||N===0||N===1&&f===m-1&&f===v+1?m!==-1&&(c.base=c.name=v===0&&d?a.slice(1,m):a.slice(v,m)):(v===0&&d?(c.name=a.slice(1,f),c.base=a.slice(1,m)):(c.name=a.slice(v,f),c.base=a.slice(v,m)),c.ext=a.slice(f,m)),v>0?c.dir=a.slice(0,v-1):d&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,n.exports=s},447:(n,i,o)=>{var s;if(o.r(i),o.d(i,{URI:()=>b,Utils:()=>ie}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;s=a.indexOf("Windows")>=0}var c,l,u=(c=function(P,g){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,I){D.__proto__=I}||function(D,I){for(var Z in I)Object.prototype.hasOwnProperty.call(I,Z)&&(D[Z]=I[Z])})(P,g)},function(P,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function D(){this.constructor=P}c(P,g),P.prototype=g===null?Object.create(g):(D.prototype=g.prototype,new D)}),d=/^\w[\w\d+.-]*$/,f=/^\//,v=/^\/\//;function m(P,g){if(!P.scheme&&g)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(P.authority,'", path: "').concat(P.path,'", query: "').concat(P.query,'", fragment: "').concat(P.fragment,'"}'));if(P.scheme&&!d.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!f.test(P.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(v.test(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var S="",y="/",N=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,b=(function(){function P(g,D,I,Z,M,w){w===void 0&&(w=!1),typeof g=="object"?(this.scheme=g.scheme||S,this.authority=g.authority||S,this.path=g.path||S,this.query=g.query||S,this.fragment=g.fragment||S):(this.scheme=(function(Oe,Ye){return Oe||Ye?Oe:"file"})(g,w),this.authority=D||S,this.path=(function(Oe,Ye){switch(Oe){case"https":case"http":case"file":Ye?Ye[0]!==y&&(Ye=y+Ye):Ye=y}return Ye})(this.scheme,I||S),this.query=Z||S,this.fragment=M||S,m(this,w))}return P.isUri=function(g){return g instanceof P||!!g&&typeof g.authority=="string"&&typeof g.fragment=="string"&&typeof g.path=="string"&&typeof g.query=="string"&&typeof g.scheme=="string"&&typeof g.fsPath=="string"&&typeof g.with=="function"&&typeof g.toString=="function"},Object.defineProperty(P.prototype,"fsPath",{get:function(){return oe(this,!1)},enumerable:!1,configurable:!0}),P.prototype.with=function(g){if(!g)return this;var D=g.scheme,I=g.authority,Z=g.path,M=g.query,w=g.fragment;return D===void 0?D=this.scheme:D===null&&(D=S),I===void 0?I=this.authority:I===null&&(I=S),Z===void 0?Z=this.path:Z===null&&(Z=S),M===void 0?M=this.query:M===null&&(M=S),w===void 0?w=this.fragment:w===null&&(w=S),D===this.scheme&&I===this.authority&&Z===this.path&&M===this.query&&w===this.fragment?this:new A(D,I,Z,M,w)},P.parse=function(g,D){D===void 0&&(D=!1);var I=N.exec(g);return I?new A(I[2]||S,Q(I[4]||S),Q(I[5]||S),Q(I[7]||S),Q(I[9]||S),D):new A(S,S,S,S,S)},P.file=function(g){var D=S;if(s&&(g=g.replace(/\\/g,y)),g[0]===y&&g[1]===y){var I=g.indexOf(y,2);I===-1?(D=g.substring(2),g=y):(D=g.substring(2,I),g=g.substring(I)||y)}return new A("file",D,g,S,S)},P.from=function(g){var D=new A(g.scheme,g.authority,g.path,g.query,g.fragment);return m(D,!0),D},P.prototype.toString=function(g){return g===void 0&&(g=!1),$(this,g)},P.prototype.toJSON=function(){return this},P.revive=function(g){if(g){if(g instanceof P)return g;var D=new A(g);return D._formatted=g.external,D._fsPath=g._sep===_?g.fsPath:null,D}return g},P})(),_=s?1:void 0,A=(function(P){function g(){var D=P!==null&&P.apply(this,arguments)||this;return D._formatted=null,D._fsPath=null,D}return u(g,P),Object.defineProperty(g.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=oe(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),g.prototype.toString=function(D){return D===void 0&&(D=!1),D?$(this,!0):(this._formatted||(this._formatted=$(this,!1)),this._formatted)},g.prototype.toJSON=function(){var D={$mid:1};return this._fsPath&&(D.fsPath=this._fsPath,D._sep=_),this._formatted&&(D.external=this._formatted),this.path&&(D.path=this.path),this.scheme&&(D.scheme=this.scheme),this.authority&&(D.authority=this.authority),this.query&&(D.query=this.query),this.fragment&&(D.fragment=this.fragment),D},g})(b),k=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function j(P,g){for(var D=void 0,I=-1,Z=0;Z<P.length;Z++){var M=P.charCodeAt(Z);if(M>=97&&M<=122||M>=65&&M<=90||M>=48&&M<=57||M===45||M===46||M===95||M===126||g&&M===47)I!==-1&&(D+=encodeURIComponent(P.substring(I,Z)),I=-1),D!==void 0&&(D+=P.charAt(Z));else{D===void 0&&(D=P.substr(0,Z));var w=k[M];w!==void 0?(I!==-1&&(D+=encodeURIComponent(P.substring(I,Z)),I=-1),D+=w):I===-1&&(I=Z)}}return I!==-1&&(D+=encodeURIComponent(P.substring(I))),D!==void 0?D:P}function q(P){for(var g=void 0,D=0;D<P.length;D++){var I=P.charCodeAt(D);I===35||I===63?(g===void 0&&(g=P.substr(0,D)),g+=k[I]):g!==void 0&&(g+=P[D])}return g!==void 0?g:P}function oe(P,g){var D;return D=P.authority&&P.path.length>1&&P.scheme==="file"?"//".concat(P.authority).concat(P.path):P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?g?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,s&&(D=D.replace(/\//g,"\\")),D}function $(P,g){var D=g?q:j,I="",Z=P.scheme,M=P.authority,w=P.path,Oe=P.query,Ye=P.fragment;if(Z&&(I+=Z,I+=":"),(M||Z==="file")&&(I+=y,I+=y),M){var ft=M.indexOf("@");if(ft!==-1){var pt=M.substr(0,ft);M=M.substr(ft+1),(ft=pt.indexOf(":"))===-1?I+=D(pt,!1):(I+=D(pt.substr(0,ft),!1),I+=":",I+=D(pt.substr(ft+1),!1)),I+="@"}(ft=(M=M.toLowerCase()).indexOf(":"))===-1?I+=D(M,!1):(I+=D(M.substr(0,ft),!1),I+=M.substr(ft))}if(w){if(w.length>=3&&w.charCodeAt(0)===47&&w.charCodeAt(2)===58)(Zt=w.charCodeAt(1))>=65&&Zt<=90&&(w="/".concat(String.fromCharCode(Zt+32),":").concat(w.substr(3)));else if(w.length>=2&&w.charCodeAt(1)===58){var Zt;(Zt=w.charCodeAt(0))>=65&&Zt<=90&&(w="".concat(String.fromCharCode(Zt+32),":").concat(w.substr(2)))}I+=D(w,!0)}return Oe&&(I+="?",I+=D(Oe,!1)),Ye&&(I+="#",I+=g?Ye:j(Ye,!1)),I}function W(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+W(P.substr(3)):P}}var re=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Q(P){return P.match(re)?P.replace(re,(function(g){return W(g)})):P}var ie,T=o(470),R=function(P,g,D){if(D||arguments.length===2)for(var I,Z=0,M=g.length;Z<M;Z++)!I&&Z in g||(I||(I=Array.prototype.slice.call(g,0,Z)),I[Z]=g[Z]);return P.concat(I||Array.prototype.slice.call(g))},B=T.posix||T;(function(P){P.joinPath=function(g){for(var D=[],I=1;I<arguments.length;I++)D[I-1]=arguments[I];return g.with({path:B.join.apply(B,R([g.path],D,!1))})},P.resolvePath=function(g){for(var D=[],I=1;I<arguments.length;I++)D[I-1]=arguments[I];var Z=g.path||"/";return g.with({path:B.resolve.apply(B,R([Z],D,!1))})},P.dirname=function(g){var D=B.dirname(g.path);return D.length===1&&D.charCodeAt(0)===46?g:g.with({path:D})},P.basename=function(g){return B.basename(g.path)},P.extname=function(g){return B.extname(g.path)}})(ie||(ie={}))}},e={};function t(n){if(e[n])return e[n].exports;var i=e[n]={exports:{}};return r[n](i,i.exports,t),i.exports}return t.d=(n,i)=>{for(var o in i)t.o(i,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:i[o]})},t.o=(n,i)=>Object.prototype.hasOwnProperty.call(n,i),t.r=n=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t(447)})();({URI:b7,Utils:rc}=ak)});var pk={};Ke(pk,{register:()=>Wq});function ck(r,e){let t=new ae.WorkspaceEdit;for(let n of e){let i=r.toResource(n.fileName);i.scheme===ji&&t.createFile(i,{ignoreIfExists:!0})}return qr.withFileCodeEdits(t,r,e),t}function Wq(r,e,t,n,i,o){return Ae([je(e,2)],()=>ae.languages.registerCodeActionsProvider(r.semantic,new Jy(e,t,n,i,o),Jy.metadata))}var Ys,ae,Wy,zy,$y,Gy,Nd,lk,uk,nx,dk,qq,Kq,Hq,Bq,Gq,fk,$p,tx,rx,Jy,vk=C(()=>{"use strict";Ys=U(require("path")),ae=U(require("vscode"));ex();qC();qi();ay();Wt();wn();$e();ut();gi();No();$b();At();Wy=class r{constructor(e){this.telemetryReporter=e}static ID="_typescript.didApplyRefactoring";id=r.ID;async execute(e){this.telemetryReporter.logTelemetry("refactor.execute",{action:e.action,trigger:e.trigger})}},zy=class r{constructor(e){this.client=e}static ID="_typescript.selectRefactoring";id=r.ID;async execute(e){if(!this.client.toOpenTsFilePath(e.document))return;let n=await ae.window.showQuickPick(e.refactor.actions.map(o=>({action:o,label:o.name,description:o.description})));if(!n)return;let i=new $p(this.client,e.document,e.refactor,n.action,e.rangeOrSelection,e.trigger);if(await i.resolve(Pt),i.edit&&!await ae.workspace.applyEdit(i.edit,{isRefactoring:!0})){ae.window.showErrorMessage(ae.l10n.t("Could not apply refactoring"));return}i.command&&await ae.commands.executeCommand(i.command.command,...i.command.arguments??[])}},$y=class r{constructor(e,t){this.client=e;this.didApplyCommand=t}static ID="_typescript.moveToFileRefactoring";id=r.ID;async execute(e){let t=this.client.toOpenTsFilePath(e.document);if(!t)return;let n=await this.getTargetFile(e.document,t,e.range);if(!n||n.toString()===t.toString())return;let i={...Se.toFileRangeRequestArgs(t,e.range),action:"Move to file",refactor:"Move to file",interactiveRefactorArguments:{targetFile:n}},o=await this.client.execute("getEditsForRefactor",i,Pt);if(o.type!=="response"||!o.body)return;let s=ck(this.client,o.body.edits);if(!await ae.workspace.applyEdit(s,{isRefactoring:!0})){ae.window.showErrorMessage(ae.l10n.t("Could not apply refactoring"));return}await this.didApplyCommand.execute({action:e.action.name,trigger:e.trigger})}async getTargetFile(e,t,n){let i=Se.toFileRangeRequestArgs(t,n),o=await this.client.execute("getMoveToRefactoringFileSuggestions",i,Pt);if(o.type!=="response"||!o.body)return;let s=o.body,a={label:ae.l10n.t("Select existing file...")},c={label:ae.l10n.t("Enter new file path...")},l=ae.workspace.getWorkspaceFolder(e.uri),u=ae.window.createQuickPick();u.ignoreFocusOut=!0;let d=!0,f=()=>{let m=["./","../"].find(y=>u.value.startsWith(y));if(d===!1&&!m)return;d=!!m;let S=s.files.map(y=>{let N=this.client.toResource(y),b=rc.dirname(N),_=rc.basename(N),A;if(l){if(N.scheme===Ed.file?A=Ys.relative(l.uri.fsPath,b.fsPath):A=Ys.posix.relative(l.uri.path,b.path),m){let j=(q=>q.startsWith("../")?q:`./${q}`)(Ys.relative(Ys.dirname(e.uri.fsPath),N.fsPath));if(!j.startsWith(m))return;A=j}}else A=b.fsPath;return{file:y,label:rc.basename(N),description:m?A:Ys.join(A,_)}});u.items=[a,c,{label:ae.l10n.t("destination files"),kind:ae.QuickPickItemKind.Separator},..._r(S)]};u.title=ae.l10n.t("Move to File"),u.placeholder=ae.l10n.t("Enter file path"),u.matchOnDescription=!0,u.onDidChangeValue(f),f();let v=await new Promise(m=>{u.onDidAccept(()=>{m(u.selectedItems[0]),u.dispose()}),u.onDidHide(()=>{m(void 0),u.dispose()}),u.show()});if(v)if(v===a){let m=await ae.window.showOpenDialog({title:ae.l10n.t("Select move destination"),openLabel:ae.l10n.t("Move to File"),defaultUri:rc.dirname(e.uri)});return m?.length?this.client.toTsFilePath(m[0]):void 0}else if(v===c){let m=await ae.window.showSaveDialog({title:ae.l10n.t("Select move destination"),saveLabel:ae.l10n.t("Move to File"),defaultUri:this.client.toResource(o.body.newFileName)});return m?this.client.toTsFilePath(m):void 0}else return v.file}},Gy=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("function"),matches:r=>r.name.startsWith("function_")}),Nd=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("constant"),matches:r=>r.name.startsWith("constant_")}),lk=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("type"),matches:r=>r.name.startsWith("Extract to type alias")}),uk=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("interface"),matches:r=>r.name.startsWith("Extract to interface")}),nx=Object.freeze({kind:ae.CodeActionKind.RefactorMove.append("file"),matches:r=>r.name.startsWith("Move to file")}),dk=Object.freeze({kind:ae.CodeActionKind.RefactorMove.append("newFile"),matches:r=>r.name.startsWith("Move to a new file")}),qq=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("import"),matches:r=>r.name.startsWith("Convert namespace import")||r.name.startsWith("Convert named imports")}),Kq=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("export"),matches:r=>r.name.startsWith("Convert default export")||r.name.startsWith("Convert named export")}),Hq=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("arrow").append("braces"),matches:r=>r.name.startsWith("Convert default export")||r.name.startsWith("Convert named export")}),Bq=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("parameters").append("toDestructured"),matches:r=>r.name.startsWith("Convert parameters to destructured object")}),Gq=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("property").append("generateAccessors"),matches:r=>r.name.startsWith("Generate 'get' and 'set' accessors")}),fk=[Gy,Nd,lk,uk,nx,dk,qq,Kq,Hq,Bq,Gq],$p=class r extends ae.CodeAction{constructor(t,n,i,o,s,a){let c=o.description;super(c,r.getKind(o));this.client=t;this.document=n;this.refactor=i;this.action=o;this.range=s;o.notApplicableReason&&(this.disabled={reason:o.notApplicableReason}),this.command={title:c,command:Wy.ID,arguments:[{action:o.name,trigger:a}]}}async resolve(t){let n=this.client.toOpenTsFilePath(this.document);if(!n)return;let i={...Se.toFileRangeRequestArgs(n,this.range),refactor:this.refactor.name,action:this.action.name},o=await this.client.execute("getEditsForRefactor",i,t);if(!(o.type!=="response"||!o.body)){if(this.edit=ck(this.client,o.body.edits),!this.edit.size){ae.window.showErrorMessage(ae.l10n.t("Could not apply refactoring"));return}o.body.renameLocation&&this.document.uri.scheme!==db&&(this.command={command:tc.ID,title:"",arguments:_r([this.command,{command:"editor.action.rename",arguments:[[this.document.uri,ye.fromLocation(o.body.renameLocation)]]}])})}}static getKind(t){if(t.kind)return ae.CodeActionKind.Empty.append(t.kind);let n=fk.find(i=>i.matches(t));return n?n.kind:ae.CodeActionKind.Refactor}},tx=class extends ae.CodeAction{constructor(e,t,n,i){super(t.description,nx.kind),t.notApplicableReason&&(this.disabled={reason:t.notApplicableReason}),this.command={title:t.description,command:$y.ID,arguments:[{action:t,document:e,range:n,trigger:i}]}}},rx=class extends ae.CodeAction{constructor(e,t,n,i){super(e.description,ae.CodeActionKind.Refactor),this.command={title:e.description,command:zy.ID,arguments:[{document:t,refactor:e,rangeOrSelection:n,trigger:i}]}}},Jy=class r{constructor(e,t,n,i,o){this.client=e;this.cachedNavTree=t;this.formattingOptionsManager=n;let s=new Wy(o);i.register(s),i.register(new tc),i.register(new zy(this.client)),i.register(new $y(this.client,s)),i.register(new ec(this.client,o))}static _declarationKinds=new Set([L.module,L.class,L.interface,L.function,L.enum,L.type,L.const,L.variable,L.let]);static isOnSignatureName(e,t){if(this._declarationKinds.has(e.kind)){if(e.nameSpan){let n=Se.fromTextSpan(e.nameSpan);if(t.intersection(n))return!0}if(!e.nameSpan&&/\bexport\b/.test(e.kindModifiers)&&e.spans.length){let n=Se.fromTextSpan(e.spans[0]);if(t.intersection(new ae.Range(n.start.line,0,n.start.line,Number.MAX_SAFE_INTEGER)))return!0}}return e.childItems?.some(n=>this.isOnSignatureName(n,t))??!1}static metadata={providedCodeActionKinds:[ae.CodeActionKind.Refactor,...fk.map(e=>e.kind)],documentation:[{kind:ae.CodeActionKind.Refactor,command:{command:fd.id,title:ae.l10n.t("Learn more about JS/TS refactorings")}}]};async provideCodeActions(e,t,n,i){if(!this.shouldTrigger(n,t)||!this.client.toOpenTsFilePath(e))return;let o=await this.interruptGetErrIfNeeded(n,()=>{let c=this.client.toOpenTsFilePath(e);if(!c)return;this.formattingOptionsManager.ensureConfigurationForDocument(e,i);let l={...Se.toFileRangeRequestArgs(c,t),triggerReason:this.toTsTriggerReason(n),kind:n.only?.value,includeInteractiveActions:this.client.apiVersion.gte(ve.v520)};return this.client.execute("getApplicableRefactors",l,i)});if(o?.type!=="response"||!o.body)return;let s=this.convertApplicableRefactors(e,n,o.body,t),a=_r(await Promise.all(Array.from(s,async c=>{if(!(this.client.apiVersion.lt(ve.v430)&&!n.only&&c.kind?.value==="refactor.rewrite.function.returnType")){if(this.client.apiVersion.lt(ve.v540)&&n.triggerKind===ae.CodeActionTriggerKind.Automatic&&(c.kind?.value===dk.kind.value||c.kind?.value===nx.kind.value)){let l=this.client.toOpenTsFilePath(e);if(!l)return;let u=await this.cachedNavTree.execute(e,()=>this.client.execute("navtree",{file:l},i));if(u.type!=="response"||!u.body||!r.isOnSignatureName(u.body,t))return}return c}})));return n.only?this.pruneInvalidActions(this.appendInvalidActions(a),n.only,5):a}interruptGetErrIfNeeded(e,t){return e.triggerKind===ae.CodeActionTriggerKind.Invoke?this.client.interruptGetErr(t):t()}async resolveCodeAction(e,t){return e instanceof $p&&await e.resolve(t),e}toTsTriggerReason(e){return e.triggerKind===ae.CodeActionTriggerKind.Invoke?"invoked":"implicit"}*convertApplicableRefactors(e,t,n,i){for(let o of n)if(o.inlineable===!1)yield new rx(o,e,i,t.triggerKind);else for(let s of o.actions)for(let a of this.refactorActionToCodeActions(e,t,o,s,i,o.actions))yield a}refactorActionToCodeActions(e,t,n,i,o,s){let a=[];i.name==="Move to file"?a.push(new tx(e,i,o,t.triggerKind)):a.push(new $p(this.client,e,n,i,o,t.triggerKind));for(let c of a)c.isPreferred=r.isPreferred(i,s);return a}shouldTrigger(e,t){return e.only&&!ae.CodeActionKind.Refactor.contains(e.only)?!1:e.triggerKind===ae.CodeActionTriggerKind.Invoke?!0:t instanceof ae.Selection}static isPreferred(e,t){if(Nd.matches(e)){let n=o=>{let s=o.match(/scope_(\d)/)?.[1];return s?+s:void 0},i=n(e.name);return typeof i!="number"?!1:t.filter(o=>o!==e&&Nd.matches(o)).every(o=>{let s=n(o.name);return typeof s=="number"?i<s:!0})}return!!(lk.matches(e)||uk.matches(e))}appendInvalidActions(e){if(this.client.apiVersion.gte(ve.v400))return e;if(!e.some(t=>t.kind&&Nd.kind.contains(t.kind))){let t=new ae.CodeAction(ae.l10n.t("Extract to constant"),Nd.kind);t.disabled={reason:ae.l10n.t("The current selection cannot be extracted")},t.isPreferred=!0,e.push(t)}if(!e.some(t=>t.kind&&Gy.kind.contains(t.kind))){let t=new ae.CodeAction(ae.l10n.t("Extract to function"),Gy.kind);t.disabled={reason:ae.l10n.t("The current selection cannot be extracted")},e.push(t)}return e}pruneInvalidActions(e,t,n){if(this.client.apiVersion.lt(ve.v400))return e;let i=[],o=[],s=[];for(let l of e){if(!l.disabled){i.push(l);continue}if(l.kind&&(Nd.kind.contains(l.kind)||Gy.kind.contains(l.kind))){o.push(l);continue}s.push(l)}let a=[];a.push(...o),a.push(...s);let c=a.filter(l=>!t||l.kind&&t.contains(l.kind)).slice(0,n);return i.push(...c),i}}});var gk={};Ke(gk,{register:()=>zq});function zq(r,e){return Ae([je(e,1,2)],()=>mk.languages.registerReferenceProvider(r.syntax,new ix(e)))}var mk,ix,hk=C(()=>{"use strict";mk=U(require("vscode"));$e();ut();At();ix=class{constructor(e){this.client=e}async provideReferences(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return[];let s=ye.toFileLocationRequestArgs(o,t),a=await this.client.execute("references",s,i);if(a.type!=="response"||!a.body)return[];let c=[];for(let l of a.body.refs){if(!n.includeDeclaration&&l.isDefinition)continue;let u=this.client.toResource(l.file),d=Tr.fromTextSpan(u,l);c.push(d)}return c}}});var yk={};Ke(yk,{register:()=>$q});function $q(r,e,t,n){return Ae([je(t,2)],()=>Bi.languages.registerRenameProvider(r.semantic,new ox(e,t,n)))}var Hi,Bi,ox,Sk=C(()=>{"use strict";Hi=U(require("path")),Bi=U(require("vscode"));mi();Wt();$e();ut();Mt();At();ox=class{constructor(e,t,n){this.language=e;this.client=t;this.fileConfigurationManager=n}async prepareRename(e,t,n){let i=await this.execRename(e,t,n);if(i)switch(i.type){case"rename":{let o=i.body.info;return o.canRename?Se.fromTextSpan(o.triggerSpan):Promise.reject(o.localizedErrorMessage)}case"jsxLinkedEditing":return i.spans.map(Se.fromTextSpan).find(o=>o.contains(t))}}async provideRenameEdits(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=await this.execRename(e,t,i);if(!(!s||i.isCancellationRequested))switch(s.type){case"rename":{let a=s.body.info;if(!a.canRename)return Promise.reject(a.localizedErrorMessage);if(a.fileToRename){let c=await this.renameFile(a.fileToRename,a.fullDisplayName,n,i);return c||Promise.reject(Bi.l10n.t("An error occurred while renaming file"))}return this.updateLocs(s.body.locs,n)}case"jsxLinkedEditing":return this.updateLocs([{file:o,locs:s.spans.map(a=>({...a}))}],n)}}async execRename(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;if(this.client.apiVersion.gte(ve.v510)&&H("preferences.renameMatchingJsxTags",!0,{scope:e,fallbackSection:this.language.id})&&this.looksLikePotentialJsxTagContext(e,t)){let s=ye.toFileLocationRequestArgs(i,t),a=await this.client.execute("linkedEditingRange",s,n);return a.type!=="response"||!a.body?void 0:{type:"jsxLinkedEditing",spans:a.body.ranges}}let o={...ye.toFileLocationRequestArgs(i,t),findInStrings:!1,findInComments:!1};return this.client.interruptGetErr(async()=>{this.fileConfigurationManager.ensureConfigurationForDocument(e,n);let s=await this.client.execute("rename",o,n);if(!(s.type!=="response"||!s.body))return{type:"rename",body:s.body}})}looksLikePotentialJsxTagContext(e,t){if(![Ns,Ma,Ua].includes(e.languageId))return!1;let n=e.getText(new Bi.Range(t.line,0,t.line,t.character));return/\<\/?\s*[\w\d_$.]*$/.test(n)}updateLocs(e,t){let n=new Bi.WorkspaceEdit;for(let i of e){let o=this.client.toResource(i.file);for(let s of i.locs)n.replace(o,Se.fromTextSpan(s),(s.prefixText||"")+t+(s.suffixText||""))}return n}async renameFile(e,t,n,i){Hi.extname(n)?Hi.extname(n)===Hi.extname(t)&&(n=n.slice(0,n.length-Hi.extname(n).length)+Hi.extname(e)):n+=Hi.extname(e);let o=Hi.dirname(e),s=Hi.join(o,n),a={file:e,oldFilePath:e,newFilePath:s},c=await this.client.execute("getEditsForFileRename",a,i);if(c.type!=="response"||!c.body)return;let l=qr.fromFileCodeEdits(this.client,c.body);return l.renameFile(Bi.Uri.file(e),Bi.Uri.file(s)),l}}});var Tk={};Ke(Tk,{register:()=>Jq});function Jq(r,e){return Ae([je(e,2)],()=>{let t=new sx(e);return nc.languages.registerDocumentRangeSemanticTokensProvider(r.semantic,t,t.getLegend())})}function Xq(r){let e=r.version;return new Promise(t=>{let n=setInterval(i=>{r.version===e&&(clearInterval(n),t()),e=r.version},400)})}function Qq(r){if(r>255)return(r>>8)-1}function Zq(r){return r&255}var nc,_k,sx,Jn,kl,Ek=C(()=>{"use strict";nc=U(require("vscode"));ut();At();_k=1e5;sx=class{constructor(e){this.client=e}getLegend(){return new nc.SemanticTokensLegend(Jn,kl)}async provideDocumentSemanticTokens(e,t){let n=this.client.toOpenTsFilePath(e);return!n||e.getText().length>_k?null:this.provideSemanticTokens(e,{file:n,start:0,length:e.getText().length},t)}async provideDocumentRangeSemanticTokens(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i||e.offsetAt(t.end)-e.offsetAt(t.start)>_k)return null;let o=e.offsetAt(t.start),s=e.offsetAt(t.end)-o;return this.provideSemanticTokens(e,{file:i,start:o,length:s},n)}async provideSemanticTokens(e,t,n){if(!this.client.toOpenTsFilePath(e))return null;let o=e.version,s=await this.client.execute("encodedSemanticClassifications-full",{...t,format:"2020"},n,{cancelOnResourceChange:e.uri});if(s.type!=="response"||!s.body)return null;let a=e.version;if(o!==a)throw await Xq(e),new nc.CancellationError;let c=s.body.spans,l=new nc.SemanticTokensBuilder;for(let u=0;u<c.length;){let d=c[u++],f=c[u++],v=c[u++],m=Qq(v);if(m===void 0)continue;let S=Zq(v),y=e.positionAt(d),N=e.positionAt(d+f);for(let b=y.line;b<=N.line;b++){let _=b===y.line?y.character:0,A=b===N.line?N.character:e.lineAt(b).text.length;l.push(b,_,A-_,m,S)}}return l.build()}};Jn=[];Jn[0]="class";Jn[1]="enum";Jn[2]="interface";Jn[3]="namespace";Jn[4]="typeParameter";Jn[5]="type";Jn[6]="parameter";Jn[7]="variable";Jn[8]="enumMember";Jn[9]="property";Jn[10]="function";Jn[11]="method";kl=[];kl[2]="async";kl[0]="declaration";kl[3]="readonly";kl[1]="static";kl[5]="local";kl[4]="defaultLibrary"});var Ck={};Ke(Ck,{register:()=>tK});function eK(r){switch(r.triggerKind){case Si.SignatureHelpTriggerKind.TriggerCharacter:return r.triggerCharacter?r.isRetrigger?{kind:"retrigger",triggerCharacter:r.triggerCharacter}:{kind:"characterTyped",triggerCharacter:r.triggerCharacter}:{kind:"invoked"};case Si.SignatureHelpTriggerKind.ContentChange:return r.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case Si.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}function tK(r,e){return Ae([je(e,1,2)],()=>Si.languages.registerSignatureHelpProvider(r.syntax,new Jp(e),{triggerCharacters:Jp.triggerCharacters,retriggerCharacters:Jp.retriggerCharacters}))}var Si,Jp,bk=C(()=>{"use strict";Si=U(require("vscode"));$e();ut();At();Py();Jp=class{constructor(e){this.client=e}static triggerCharacters=["(",",","<"];static retriggerCharacters=[")"];async provideSignatureHelp(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s={...ye.toFileLocationRequestArgs(o,t),triggerReason:eK(i)},a=await this.client.interruptGetErr(()=>this.client.execute("signatureHelp",s,n));if(a.type!=="response"||!a.body)return;let c=a.body,l=new Si.SignatureHelp;return l.signatures=c.items.map(u=>this.convertSignature(u,e.uri)),l.activeSignature=this.getActiveSignature(i,c,l.signatures),l.activeParameter=this.getActiveParameter(c),l}getActiveSignature(e,t,n){let i=e.activeSignatureHelp?.signatures[e.activeSignatureHelp.activeSignature];if(i&&e.isRetrigger){let o=n.findIndex(s=>s.label===i?.label);if(o>=0)return o}return t.selectedItemIndex}getActiveParameter(e){let t=e.items[e.selectedItemIndex];return t?.isVariadic?Math.min(e.argumentIndex,t.parameters.length-1):e.argumentIndex}convertSignature(e,t){let n=new Si.SignatureInformation(Ms(e.prefixDisplayParts,this.client),jp(e.documentation,e.tags.filter(s=>s.name!=="param"),this.client,t)),i=n.label.length,o=Ms(e.separatorDisplayParts,this.client);for(let s=0;s<e.parameters.length;++s){let a=e.parameters[s],c=Ms(a.displayParts,this.client);n.parameters.push(new Si.ParameterInformation([i,i+c.length],jp(a.documentation,[],this.client,t))),i+=c.length,n.label+=c,s!==e.parameters.length-1&&(n.label+=o,i+=o.length)}return n.label+=Ms(e.suffixDisplayParts,this.client),n}}});var xk={};Ke(xk,{register:()=>rK});function rK(r,e){return Xy.languages.registerSelectionRangeProvider(r.syntax,new ax(e))}var Xy,ax,Pk=C(()=>{"use strict";Xy=U(require("vscode"));$e();ax=class r{constructor(e){this.client=e}async provideSelectionRanges(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o={file:i,locations:t.map(ye.toLocation)},s=await this.client.execute("selectionRange",o,n);if(!(s.type!=="response"||!s.body))return s.body.map(r.convertSelectionRange)}static convertSelectionRange(e){return new Xy.SelectionRange(Se.fromTextSpan(e.textSpan),e.parent?r.convertSelectionRange(e.parent):void 0)}}});var Dk={};Ke(Dk,{register:()=>nK});function nK(r,e){function t(n){Et.commands.executeCommand("setContext",Xp.context,n??r.apiVersion.gte(Xp.minVersion))}return t(),e.register(new Xp(r)),Et.Disposable.from(r.onTsServerStarted(()=>t()),new Et.Disposable(()=>t(!1)))}var Et,Xp,Ik=C(()=>{"use strict";Et=U(require("vscode"));mi();Wt();$e();Xp=class r{constructor(e){this.client=e}static context="tsSupportsSourceDefinition";static minVersion=ve.v470;id="typescript.goToSourceDefinition";async execute(){if(this.client.apiVersion.lt(r.minVersion)){Et.window.showErrorMessage(Et.l10n.t("Go to Source Definition failed. Requires TypeScript 4.7+."));return}let e=Et.window.activeTextEditor;if(!e){Et.window.showErrorMessage(Et.l10n.t("Go to Source Definition failed. No resource provided."));return}let t=e.document.uri,n=await Et.workspace.openTextDocument(t);if(!Ro(n)){Et.window.showErrorMessage(Et.l10n.t("Go to Source Definition failed. Unsupported file type."));return}let i=this.client.toOpenTsFilePath(n);if(!i){Et.window.showErrorMessage(Et.l10n.t("Go to Source Definition failed. Unknown file type."));return}await Et.window.withProgress({location:Et.ProgressLocation.Window,title:Et.l10n.t("Finding source definitions")},async(o,s)=>{let a=e.selection.anchor,c=ye.toFileLocationRequestArgs(i,a),l=await this.client.execute("findSourceDefinition",c,s);if(l.type==="response"&&l.body){let u=l.body.map(d=>Tr.fromTextSpan(this.client.toResource(d.file),d));if(u.length){u.length===1?Et.commands.executeCommand("vscode.open",u[0].uri.with({fragment:`L${u[0].range.start.line+1},${u[0].range.start.character+1}`})):Et.commands.executeCommand("editor.action.showReferences",t,a,u);return}}Et.window.showErrorMessage(Et.l10n.t("No source definitions found."))})}}});var Nk={};Ke(Nk,{register:()=>oK});function iK(r,e){return new Ls(()=>{let t=kt.window.activeTextEditor;return!t||!kt.languages.match(r,t.document)?!1:!!H("autoClosingTags.enabled",!0,{scope:t.document,fallbackSection:e.id,fallbackSubSectionNameOverride:"autoClosingTags"})},t=>kt.Disposable.from(kt.window.onDidChangeActiveTextEditor(t),kt.workspace.onDidOpenTextDocument(t),kt.workspace.onDidChangeConfiguration(t)))}function oK(r,e,t){return Ae([iK(r.syntax,e)],()=>new cx(t))}var kt,cx,Rk=C(()=>{"use strict";kt=U(require("vscode"));$e();gt();Mt();At();cx=class extends _e{constructor(t){super();this.client=t;kt.workspace.onDidChangeTextDocument(n=>this.onDidChangeTextDocument(n),null,this._disposables)}_disposed=!1;_timeout=void 0;_cancel=void 0;dispose(){super.dispose(),this._disposed=!0,this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._cancel&&(this._cancel.cancel(),this._cancel.dispose(),this._cancel=void 0)}onDidChangeTextDocument({document:t,contentChanges:n,reason:i}){if(n.length===0||i===kt.TextDocumentChangeReason.Undo||i===kt.TextDocumentChangeReason.Redo)return;let o=kt.window.activeTextEditor?.document;if(t!==o)return;let s=this.client.toOpenTsFilePath(t);if(!s)return;typeof this._timeout<"u"&&clearTimeout(this._timeout),this._cancel&&(this._cancel.cancel(),this._cancel.dispose(),this._cancel=void 0);let a=n[n.length-1],c=a.text[a.text.length-1];if(a.rangeLength>0||c!==">"&&c!=="/"||(a.range.start.character>0?t.getText(new kt.Range(a.range.start.translate({characterDelta:-1}),a.range.start)):"")===">")return;let u=t.version;this._timeout=setTimeout(async()=>{if(this._timeout=void 0,this._disposed)return;let d=a.text.split(/\r\n|\n/g),f=d.length<=1?a.range.start.translate({characterDelta:a.text.length}):new kt.Position(a.range.start.line+d.length-1,d[d.length-1].length),v=ye.toFileLocationRequestArgs(s,f);this._cancel=new kt.CancellationTokenSource;let m=await this.client.execute("jsxClosingTag",v,this._cancel.token);if(m.type!=="response"||!m.body||this._disposed)return;let S=kt.window.activeTextEditor;if(!S)return;let y=m.body,N=S.document;t===N&&N.version===u&&S.insertSnippet(this.getTagSnippet(y),this.getInsertionPositions(S,f))},100)}getTagSnippet(t){let n=new kt.SnippetString;return n.appendPlaceholder("",0),n.appendText(t.newText),n}getInsertionPositions(t,n){let i=t.selections.map(o=>o.active);return i.some(o=>o.isEqual(n))?i:n}}});var Ak={};Ke(Ak,{default:()=>Qp,register:()=>sK});function sK(r,e){return Ae([je(e,1,2)],()=>wk.languages.registerTypeDefinitionProvider(r.syntax,new Qp(e)))}var wk,Qp,Ok=C(()=>{"use strict";wk=U(require("vscode"));ut();Oy();At();Qp=class extends Us{provideTypeDefinition(e,t,n){return this.getSymbolLocations("typeDefinition",e,t,n)}}});var Hk={};Ke(Hk,{register:()=>yK});async function hK(r){try{return(await Qe.workspace.fs.stat(r)).type===Qe.FileType.Directory}catch{return!1}}function yK(r,e,t){return Ae([je(r,2)],()=>new Ex(r,e,t))}var Tx,Qe,Od,Ex,Bk=C(()=>{"use strict";Tx=U(require("path")),Qe=U(require("vscode"));qi();Wa();$e();ut();xd();No();Mt();gt();At();Od="updateImportsOnFileMove.enabled";Ex=class extends _e{constructor(t,n,i){super();this.client=t;this.fileConfigurationManager=n;this._handles=i;this._register(Qe.workspace.onDidRenameFiles(async o=>{for(let{newUri:s,oldUri:a}of o.files){let c=this.client.toTsFilePath(s);if(!c)continue;let l=this.client.toTsFilePath(a);if(!l)continue;let u=yd(s)?"typescript":"javascript";if(H(Od,"prompt",{scope:null,fallbackSection:u})==="never")continue;let f=await this.getJsTsFileBeingMoved(s);!f||!this.client.toTsFilePath(f)||(this._pendingRenames.add({oldUri:a,newUri:s,newFilePath:c,oldFilePath:l,jsTsFileThatIsBeingMoved:f}),this._delayer.trigger(()=>{Qe.window.withProgress({location:Qe.ProgressLocation.Window,title:Qe.l10n.t("Checking for update of JS/TS imports")},()=>this.flushRenames())}))}}))}_delayer=new bd(50);_pendingRenames=new Set;async flushRenames(){let t=Array.from(this._pendingRenames);this._pendingRenames.clear();for(let n of this.groupRenames(t)){let i=new Qe.WorkspaceEdit,o=[];for(let{oldUri:s,newUri:a,newFilePath:c,oldFilePath:l,jsTsFileThatIsBeingMoved:u}of n){let d=await Qe.workspace.openTextDocument(u);this.client.bufferSyncSupport.closeResource(s),this.client.bufferSyncSupport.openTextDocument(d),await this.withEditsForFileRename(i,d,l,c)&&o.push(a)}i.size&&await this.confirmActionWithUser(o)&&await Qe.workspace.applyEdit(i,{isRefactoring:!0})}}async confirmActionWithUser(t){if(!t.length)return!1;let n=yd(t[0])?"typescript":"javascript";switch(H(Od,"prompt",{scope:null,fallbackSection:n})){case"always":return!0;case"never":return!1;default:return this.promptUser(t)}}async promptUser(t){if(!t.length)return!1;let n={title:Qe.l10n.t("No"),isCloseAffordance:!0},i={title:Qe.l10n.t("Yes")},o={title:Qe.l10n.t("Always")},s={title:Qe.l10n.t("Never")};switch(await Qe.window.showInformationMessage(t.length===1?Qe.l10n.t("Update imports for '{0}'?",Tx.basename(t[0].fsPath)):this.getConfirmMessage(Qe.l10n.t("Update imports for the following {0} files?",t.length),t),{modal:!0},n,i,o,s)){case i:return!0;case n:return!1;case o:{let c=Qe.workspace.getConfiguration(cn);return c.update(Od,"always",this.getConfigTargetScope(c,Od)),!0}case s:{let c=Qe.workspace.getConfiguration(cn);return c.update(Od,"never",this.getConfigTargetScope(c,Od)),!1}default:return!1}}async getJsTsFileBeingMoved(t){if(t.scheme===ji)return await hK(t)?(await Qe.workspace.findFiles(new Qe.RelativePattern(t,"**/*.{ts,tsx,js,jsx}"),"**/node_modules/**",1))[0]:await this._handles(t)?t:void 0}async withEditsForFileRename(t,n,i,o){let s=await this.client.interruptGetErr(()=>{this.fileConfigurationManager.setGlobalConfigurationFromDocument(n,Pt);let a={oldFilePath:i,newFilePath:o};return this.client.execute("getEditsForFileRename",a,Pt)});return s.type!=="response"||!s.body.length?!1:(qr.withFileCodeEdits(t,this.client,s.body),!0)}groupRenames(t){let n=new Map;for(let i of t){let o=`${this.client.getWorkspaceRootForResource(i.jsTsFileThatIsBeingMoved)?.fsPath}@@@${yd(i.jsTsFileThatIsBeingMoved)}`;n.has(o)||n.set(o,new Set),n.get(o).add(i)}return n.values()}getConfirmMessage(t,n){let o=[t];return o.push(""),o.push(...n.slice(0,10).map(s=>Tx.basename(s.fsPath))),n.length>10&&(n.length-10===1?o.push(Qe.l10n.t("...1 additional file not shown")):o.push(Qe.l10n.t("...{0} additional files not shown",n.length-10))),o.push(""),o.join(`
`)}getConfigTargetScope(t,n){let i=t.inspect(n);return i?.workspaceFolderValue?Qe.ConfigurationTarget.WorkspaceFolder:i?.workspaceValue?Qe.ConfigurationTarget.Workspace:Qe.ConfigurationTarget.Global}}});var Gk={};Ke(Gk,{register:()=>_K});function SK(r){switch(r.kind){case L.method:return bt.SymbolKind.Method;case L.enum:return bt.SymbolKind.Enum;case L.enumMember:return bt.SymbolKind.EnumMember;case L.function:return bt.SymbolKind.Function;case L.class:return bt.SymbolKind.Class;case L.interface:return bt.SymbolKind.Interface;case L.type:return bt.SymbolKind.Class;case L.memberVariable:return bt.SymbolKind.Field;case L.memberGetAccessor:return bt.SymbolKind.Field;case L.memberSetAccessor:return bt.SymbolKind.Field;case L.variable:return bt.SymbolKind.Variable;default:return bt.SymbolKind.Variable}}function _K(r,e){return bt.languages.registerWorkspaceSymbolProvider(new Cx(r,e))}var bt,Cx,Wk=C(()=>{"use strict";bt=U(require("vscode"));qi();Wa();Wt();Fp();wn();$e();gi();Mt();Cx=class r{constructor(e,t){this.client=e;this.modeIds=t}async provideWorkspaceSymbols(e,t){let n;if(this.searchAllOpenProjects)n=void 0;else{let s=this.getDocument();if(n=s?await this.toOpenedFiledPath(s):void 0,!n&&this.client.apiVersion.lt(ve.v390))return[]}let i={file:n,searchValue:e,maxResultCount:256},o=await this.client.execute("navto",i,t);return o.type!=="response"||!o.body?[]:_r(o.body.map(s=>this.toSymbolInformation(s)))}get searchAllOpenProjects(){return this.client.apiVersion.gte(ve.v390)&&H("workspaceSymbols.scope","allOpenProjects",{scope:null,fallbackSection:"typescript"})==="allOpenProjects"}async toOpenedFiledPath(e){if(e.uri.scheme===ub)try{let t=bt.Uri.file(JSON.parse(e.uri.query)?.path);if(yd(t)||C0(t)){let n=await bt.workspace.openTextDocument(t);return this.client.toOpenTsFilePath(n)}}catch{}return this.client.toOpenTsFilePath(e)}toSymbolInformation(e){if(e.kind==="alias"&&!e.containerName)return;let t=this.client.toResource(e.file);if(kp(t,_d))return;let n=r.getLabel(e),i=new bt.SymbolInformation(n,SK(e),e.containerName||"",Tr.fromTextSpan(t,e));return(e.kindModifiers?Os(e.kindModifiers):void 0)?.has(Wn.deprecated)&&(i.tags=[bt.SymbolTag.Deprecated]),i}static getLabel(e){let t=e.name;return e.kind==="method"||e.kind==="function"?t+"()":t}getDocument(){let e=bt.window.activeTextEditor?.document;if(e&&this.modeIds.includes(e.languageId))return e;let t=bt.workspace.textDocuments;for(let n of t)if(this.modeIds.includes(n.languageId))return n}}});function CS(r,e=!1){let t=r.length,n=0,i="",o=0,s=16,a=0,c=0,l=0,u=0,d=0;function f(_,A){let k=0,j=0;for(;k<_||!A;){let q=r.charCodeAt(n);if(q>=48&&q<=57)j=j*16+q-48;else if(q>=65&&q<=70)j=j*16+q-65+10;else if(q>=97&&q<=102)j=j*16+q-97+10;else break;n++,k++}return k<_&&(j=-1),j}function v(_){n=_,i="",o=0,s=16,d=0}function m(){let _=n;if(r.charCodeAt(n)===48)n++;else for(n++;n<r.length&&Md(r.charCodeAt(n));)n++;if(n<r.length&&r.charCodeAt(n)===46)if(n++,n<r.length&&Md(r.charCodeAt(n)))for(n++;n<r.length&&Md(r.charCodeAt(n));)n++;else return d=3,r.substring(_,n);let A=n;if(n<r.length&&(r.charCodeAt(n)===69||r.charCodeAt(n)===101))if(n++,(n<r.length&&r.charCodeAt(n)===43||r.charCodeAt(n)===45)&&n++,n<r.length&&Md(r.charCodeAt(n))){for(n++;n<r.length&&Md(r.charCodeAt(n));)n++;A=n}else d=3;return r.substring(_,A)}function S(){let _="",A=n;for(;;){if(n>=t){_+=r.substring(A,n),d=2;break}let k=r.charCodeAt(n);if(k===34){_+=r.substring(A,n),n++;break}if(k===92){if(_+=r.substring(A,n),n++,n>=t){d=2;break}switch(r.charCodeAt(n++)){case 34:_+='"';break;case 92:_+="\\";break;case 47:_+="/";break;case 98:_+="\b";break;case 102:_+="\f";break;case 110:_+=`
`;break;case 114:_+="\r";break;case 116:_+="	";break;case 117:let q=f(4,!0);q>=0?_+=String.fromCharCode(q):d=4;break;default:d=5}A=n;continue}if(k>=0&&k<=31)if(av(k)){_+=r.substring(A,n),d=2;break}else d=6;n++}return _}function y(){if(i="",d=0,o=n,c=a,u=l,n>=t)return o=t,s=17;let _=r.charCodeAt(n);if(wx(_)){do n++,i+=String.fromCharCode(_),_=r.charCodeAt(n);while(wx(_));return s=15}if(av(_))return n++,i+=String.fromCharCode(_),_===13&&r.charCodeAt(n)===10&&(n++,i+=`
`),a++,l=n,s=14;switch(_){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,i=S(),s=10;case 47:let A=n-1;if(r.charCodeAt(n+1)===47){for(n+=2;n<t&&!av(r.charCodeAt(n));)n++;return i=r.substring(A,n),s=12}if(r.charCodeAt(n+1)===42){n+=2;let k=t-1,j=!1;for(;n<k;){let q=r.charCodeAt(n);if(q===42&&r.charCodeAt(n+1)===47){n+=2,j=!0;break}n++,av(q)&&(q===13&&r.charCodeAt(n)===10&&n++,a++,l=n)}return j||(n++,d=1),i=r.substring(A,n),s=13}return i+=String.fromCharCode(_),n++,s=16;case 45:if(i+=String.fromCharCode(_),n++,n===t||!Md(r.charCodeAt(n)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),s=11;default:for(;n<t&&N(_);)n++,_=r.charCodeAt(n);if(o!==n){switch(i=r.substring(o,n),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(_),n++,s=16}}function N(_){if(wx(_)||av(_))return!1;switch(_){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function b(){let _;do _=y();while(_>=12&&_<=15);return _}return{setPosition:v,getPosition:()=>n,scan:e?b:y,getToken:()=>s,getTokenValue:()=>i,getTokenOffset:()=>o,getTokenLength:()=>n-o,getTokenStartLine:()=>c,getTokenStartCharacter:()=>o-u,getTokenError:()=>d}}function wx(r){return r===32||r===9}function av(r){return r===10||r===13}function Md(r){return r>=48&&r<=57}var pL,bS=C(()=>{"use strict";(function(r){r[r.lineFeed=10]="lineFeed",r[r.carriageReturn=13]="carriageReturn",r[r.space=32]="space",r[r._0=48]="_0",r[r._1=49]="_1",r[r._2=50]="_2",r[r._3=51]="_3",r[r._4=52]="_4",r[r._5=53]="_5",r[r._6=54]="_6",r[r._7=55]="_7",r[r._8=56]="_8",r[r._9=57]="_9",r[r.a=97]="a",r[r.b=98]="b",r[r.c=99]="c",r[r.d=100]="d",r[r.e=101]="e",r[r.f=102]="f",r[r.g=103]="g",r[r.h=104]="h",r[r.i=105]="i",r[r.j=106]="j",r[r.k=107]="k",r[r.l=108]="l",r[r.m=109]="m",r[r.n=110]="n",r[r.o=111]="o",r[r.p=112]="p",r[r.q=113]="q",r[r.r=114]="r",r[r.s=115]="s",r[r.t=116]="t",r[r.u=117]="u",r[r.v=118]="v",r[r.w=119]="w",r[r.x=120]="x",r[r.y=121]="y",r[r.z=122]="z",r[r.A=65]="A",r[r.B=66]="B",r[r.C=67]="C",r[r.D=68]="D",r[r.E=69]="E",r[r.F=70]="F",r[r.G=71]="G",r[r.H=72]="H",r[r.I=73]="I",r[r.J=74]="J",r[r.K=75]="K",r[r.L=76]="L",r[r.M=77]="M",r[r.N=78]="N",r[r.O=79]="O",r[r.P=80]="P",r[r.Q=81]="Q",r[r.R=82]="R",r[r.S=83]="S",r[r.T=84]="T",r[r.U=85]="U",r[r.V=86]="V",r[r.W=87]="W",r[r.X=88]="X",r[r.Y=89]="Y",r[r.Z=90]="Z",r[r.asterisk=42]="asterisk",r[r.backslash=92]="backslash",r[r.closeBrace=125]="closeBrace",r[r.closeBracket=93]="closeBracket",r[r.colon=58]="colon",r[r.comma=44]="comma",r[r.dot=46]="dot",r[r.doubleQuote=34]="doubleQuote",r[r.minus=45]="minus",r[r.openBrace=123]="openBrace",r[r.openBracket=91]="openBracket",r[r.plus=43]="plus",r[r.slash=47]="slash",r[r.formFeed=12]="formFeed",r[r.tab=9]="tab"})(pL||(pL={}))});var Ax=C(()=>{"use strict";bS()});function vL(r,e=[],t=cv.DEFAULT){let n=null,i=[],o=[];function s(c){Array.isArray(i)?i.push(c):n!==null&&(i[n]=c)}return Lx(r,{onObjectBegin:()=>{let c={};s(c),o.push(i),i=c,n=null},onObjectProperty:c=>{n=c},onObjectEnd:()=>{i=o.pop()},onArrayBegin:()=>{let c=[];s(c),o.push(i),i=c,n=null},onArrayEnd:()=>{i=o.pop()},onLiteralValue:s,onError:(c,l,u)=>{e.push({error:c,offset:l,length:u})}},t),i[0]}function Ox(r,e=[],t=cv.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(c){n.type==="property"&&(n.length=c-n.offset,n=n.parent)}function o(c){return n.children.push(c),c}Lx(r,{onObjectBegin:c=>{n=o({type:"object",offset:c,length:-1,parent:n,children:[]})},onObjectProperty:(c,l,u)=>{n=o({type:"property",offset:l,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:c,offset:l,length:u,parent:n})},onObjectEnd:(c,l)=>{i(c+l),n.length=c+l-n.offset,n=n.parent,i(c+l)},onArrayBegin:(c,l)=>{n=o({type:"array",offset:c,length:-1,parent:n,children:[]})},onArrayEnd:(c,l)=>{n.length=c+l-n.offset,n=n.parent,i(c+l)},onLiteralValue:(c,l,u)=>{o({type:OK(c),offset:l,length:u,parent:n,value:c}),i(l+u)},onSeparator:(c,l,u)=>{n.type==="property"&&(c===":"?n.colonOffset=l:c===","&&i(l))},onError:(c,l,u)=>{e.push({error:c,offset:l,length:u})}},t);let a=n.children[0];return a&&delete a.parent,a}function kx(r,e){if(!r)return;let t=r;for(let n of e)if(typeof n=="string"){if(t.type!=="object"||!Array.isArray(t.children))return;let i=!1;for(let o of t.children)if(Array.isArray(o.children)&&o.children[0].value===n&&o.children.length===2){t=o.children[1],i=!0;break}if(!i)return}else{let i=n;if(t.type!=="array"||i<0||!Array.isArray(t.children)||i>=t.children.length)return;t=t.children[i]}return t}function Lx(r,e,t=cv.DEFAULT){let n=CS(r,!1),i=[];function o(Q){return Q?()=>Q(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function s(Q){return Q?()=>Q(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}function a(Q){return Q?ie=>Q(ie,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(Q){return Q?ie=>Q(ie,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}let l=s(e.onObjectBegin),u=c(e.onObjectProperty),d=o(e.onObjectEnd),f=s(e.onArrayBegin),v=o(e.onArrayEnd),m=c(e.onLiteralValue),S=a(e.onSeparator),y=o(e.onComment),N=a(e.onError),b=t&&t.disallowComments,_=t&&t.allowTrailingComma;function A(){for(;;){let Q=n.scan();switch(n.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:b||k(11);break;case 2:k(12);break;case 6:k(16);break}switch(Q){case 12:case 13:b?k(10):y();break;case 16:k(1);break;case 15:case 14:break;default:return Q}}}function k(Q,ie=[],T=[]){if(N(Q),ie.length+T.length>0){let R=n.getToken();for(;R!==17;){if(ie.indexOf(R)!==-1){A();break}else if(T.indexOf(R)!==-1)break;R=A()}}}function j(Q){let ie=n.getTokenValue();return Q?m(ie):(u(ie),i.push(ie)),A(),!0}function q(){switch(n.getToken()){case 11:let Q=n.getTokenValue(),ie=Number(Q);isNaN(ie)&&(k(2),ie=0),m(ie);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return A(),!0}function oe(){return n.getToken()!==10?(k(3,[],[2,5]),!1):(j(!1),n.getToken()===6?(S(":"),A(),re()||k(4,[],[2,5])):k(5,[],[2,5]),i.pop(),!0)}function $(){l(),A();let Q=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(Q||k(4,[],[]),S(","),A(),n.getToken()===2&&_)break}else Q&&k(6,[],[]);oe()||k(4,[],[2,5]),Q=!0}return d(),n.getToken()!==2?k(7,[2],[]):A(),!0}function W(){f(),A();let Q=!0,ie=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(ie||k(4,[],[]),S(","),A(),n.getToken()===4&&_)break}else ie&&k(6,[],[]);Q?(i.push(0),Q=!1):i[i.length-1]++,re()||k(4,[],[4,5]),ie=!0}return v(),Q||i.pop(),n.getToken()!==4?k(8,[4],[]):A(),!0}function re(){switch(n.getToken()){case 3:return W();case 1:return $();case 10:return j(!0);default:return q()}}return A(),n.getToken()===17?t.allowEmptyContent?!0:(k(4,[],[]),!1):re()?(n.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}function OK(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(r){if(Array.isArray(r))return"array"}else return"null";return"object"}default:return"null"}}var cv,Fx=C(()=>{"use strict";bS();(function(r){r.DEFAULT={allowTrailingComma:!1}})(cv||(cv={}))});var mL=C(()=>{"use strict";Ax();Fx()});var gL,hL,SL,_L,lv,yL,Mx=C(()=>{"use strict";Ax();mL();bS();Fx();(function(r){r[r.None=0]="None",r[r.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=2]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",r[r.InvalidUnicode=4]="InvalidUnicode",r[r.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",r[r.InvalidCharacter=6]="InvalidCharacter"})(gL||(gL={}));(function(r){r[r.OpenBraceToken=1]="OpenBraceToken",r[r.CloseBraceToken=2]="CloseBraceToken",r[r.OpenBracketToken=3]="OpenBracketToken",r[r.CloseBracketToken=4]="CloseBracketToken",r[r.CommaToken=5]="CommaToken",r[r.ColonToken=6]="ColonToken",r[r.NullKeyword=7]="NullKeyword",r[r.TrueKeyword=8]="TrueKeyword",r[r.FalseKeyword=9]="FalseKeyword",r[r.StringLiteral=10]="StringLiteral",r[r.NumericLiteral=11]="NumericLiteral",r[r.LineCommentTrivia=12]="LineCommentTrivia",r[r.BlockCommentTrivia=13]="BlockCommentTrivia",r[r.LineBreakTrivia=14]="LineBreakTrivia",r[r.Trivia=15]="Trivia",r[r.Unknown=16]="Unknown",r[r.EOF=17]="EOF"})(hL||(hL={}));SL=vL,_L=Ox,lv=kx;(function(r){r[r.InvalidSymbol=1]="InvalidSymbol",r[r.InvalidNumberFormat=2]="InvalidNumberFormat",r[r.PropertyNameExpected=3]="PropertyNameExpected",r[r.ValueExpected=4]="ValueExpected",r[r.ColonExpected=5]="ColonExpected",r[r.CommaExpected=6]="CommaExpected",r[r.CloseBraceExpected=7]="CloseBraceExpected",r[r.CloseBracketExpected=8]="CloseBracketExpected",r[r.EndOfFileExpected=9]="EndOfFileExpected",r[r.InvalidCommentToken=10]="InvalidCommentToken",r[r.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=12]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",r[r.InvalidUnicode=14]="InvalidUnicode",r[r.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",r[r.InvalidCharacter=16]="InvalidCharacter"})(yL||(yL={}))});var bL={};Ke(bL,{register:()=>YK});function EL(r,e){return r&&r.type==="array"&&r.children?r.children.map(e):[]}async function MK(r,e){let t=r,n=e[0],i=n.startsWith("@")?2:1,o=n.split(Ml.posix.sep).slice(0,i).join(Ml.posix.sep);for(;;){let s=at.Uri.joinPath(t,"node_modules",o),a;try{a=await at.workspace.fs.stat(s)}catch{}if(a&&a.type&at.FileType.Directory){for(let l of e.map(u=>u.split(Ml.posix.sep).slice(i).join(Ml.posix.sep)).filter(Boolean).map(u=>at.Uri.joinPath(s,u)))if(await Il(l))return l}let c=t;if(t=at.Uri.joinPath(t,".."),c.path===t.path)return}}async function UK(r,e,t){async function n(o){return o.path.endsWith(".json")||await Il(o)?o:o.with({path:`${o.path}${t===1?"/tsconfig.json":".json"}`})}return["./","../"].some(o=>e.startsWith(o))?n(at.Uri.joinPath(r,e)):e.startsWith("/")||iy(e)?n(at.Uri.file(e)):MK(r,[e,...e.endsWith(".json")?[]:[`${e}.json`,`${e}/tsconfig.json`]])}function YK(){let r=["**/[jt]sconfig.json","**/[jt]sconfig.*.json"],t=["json","jsonc"].map(n=>r.map(i=>({language:n,pattern:i}))).flat();return at.Disposable.from(at.commands.registerCommand(CL,async({resourceUri:n,extendsValue:i,linkType:o})=>{let s=await UK(rc.dirname(at.Uri.from(n)),i,o);if(s===void 0){at.window.showErrorMessage(at.l10n.t("Failed to resolve {0} as module",i));return}await at.commands.executeCommand("vscode.open",s)}),at.languages.registerDocumentLinkProvider(t,new Ux))}var Ml,at,CL,Ux,xL=C(()=>{"use strict";Mx();Ml=require("path"),at=U(require("vscode"));ex();gi();oy();CL="_typescript.openExtendsLink",Ux=class{provideDocumentLinks(e,t){let n=_L(e.getText());return n?_r([this.getExtendsLink(e,n),...this.getFilesLinks(e,n),...this.getReferencesLinks(e,n)]):[]}getExtendsLink(e,t){let n=lv(t,["extends"]);return n&&this.tryCreateTsConfigLink(e,n,0)}getReferencesLinks(e,t){return EL(lv(t,["references"]),n=>{let i=lv(n,["path"]);return i&&this.tryCreateTsConfigLink(e,i,1)})}tryCreateTsConfigLink(e,t,n){if(!this.isPathValue(t))return;let i={resourceUri:{...e.uri.toJSON(),$mid:void 0},extendsValue:t.value,linkType:n},o=new at.DocumentLink(this.getRange(e,t),at.Uri.parse(`command:${CL}?${JSON.stringify(i)}`));return o.tooltip=at.l10n.t("Follow link"),o}getFilesLinks(e,t){return EL(lv(t,["files"]),n=>this.pathNodeToLink(e,n))}pathNodeToLink(e,t){return this.isPathValue(t)?new at.DocumentLink(this.getRange(e,t),this.getFileTarget(e,t)):void 0}isPathValue(e){return e&&e.type==="string"&&e.value&&!e.value.includes("*")}getFileTarget(e,t){return(0,Ml.isAbsolute)(t.value)?at.Uri.file(t.value):at.Uri.joinPath(rc.dirname(e.uri),t.value)}getRange(e,t){let n=t.offset,i=e.positionAt(n+1),o=e.positionAt(n+(t.length-1));return new at.Range(i,o)}}});var Ul,PL,gee,hee,DL=C(()=>{"use strict";Ul=U(require("vscode")),PL=r=>new Promise(e=>setTimeout(()=>e(),r)),gee=Object.freeze({autoClosingBrackets:"editor.autoClosingBrackets",completeFunctionCalls:"js/ts.suggest.completeFunctionCalls",insertMode:"editor.suggest.insertMode",snippetSuggestions:"editor.snippetSuggestions",suggestSelection:"editor.suggestSelection",quoteStyle:"js/ts.preferences.quoteStyle"}),hee=Object.freeze(["insert","replace"])});var xS,PS,IL=C(()=>{"use strict";xS=U(require("vscode")),PS=class{async getConfigsForWorkspace(e){if(!xS.workspace.workspaceFolders)return[];let t=new Map;for(let n of await this.findConfigFiles(e)){let i=xS.workspace.getWorkspaceFolder(n);i&&t.set(n.fsPath,{uri:n,fsPath:n.fsPath,posixPath:n.path,workspaceFolder:i})}return t.values()}async findConfigFiles(e){return await xS.workspace.findFiles("**/tsconfig*.json","**/{node_modules,.*}/**",void 0,e)}}});var NL={};Ke(NL,{register:()=>VK});function VK(r){return We.tasks.registerTaskProvider("typescript",new Yx(r))}var Qn,We,Yx,RL=C(()=>{"use strict";Mx();Qn=U(require("path")),We=U(require("vscode"));DL();ut();gi();Mt();gt();oy();Wa();dd();IL();Yx=class r extends _e{constructor(t){super();this.client=t;this.tsconfigProvider=new PS,this._register(We.workspace.onDidChangeConfiguration(this.onConfigurationChanged,this)),this.onConfigurationChanged()}projectInfoRequestTimeout=2e3;findConfigFilesTimeout=5e3;autoDetect="on";tsconfigProvider;async provideTasks(t){let n=We.workspace.workspaceFolders;if(this.autoDetect==="off"||!n?.length)return[];let i=new Set,o=[];for(let s of await this.getAllTsConfigs(t))i.has(s.fsPath)||(i.add(s.fsPath),o.push(...await this.getTasksForProject(s)));return o}async resolveTask(t){let n=t.definition;if(/\\tsconfig.*\.json/.test(n.tsconfig)){We.window.showWarningMessage(We.l10n.t('TypeScript Task in tasks.json contains "\\\\". TypeScript tasks tsconfig must use "/"'));return}let i=n.tsconfig;if(!i||t.scope===void 0||t.scope===We.TaskScope.Global||t.scope===We.TaskScope.Workspace)return;let o=t.scope.uri.with({path:t.scope.uri.path+"/"+i}),s={uri:o,fsPath:o.fsPath,posixPath:o.path,workspaceFolder:t.scope};return this.getTasksForProjectAndDefinition(s,n)}async getAllTsConfigs(t){let n=(await Promise.all([this.getTsConfigForActiveFile(t),this.getTsConfigsInWorkspace(t)])).flat();return Promise.all(n.map(async i=>await Il(i.uri)?i:void 0)).then(_r)}async getTsConfigForActiveFile(t){let n=We.window.activeTextEditor;if(n&&E0(n.document.fileName)){let a=n.document.uri;return[{uri:a,fsPath:a.fsPath,posixPath:a.path,workspaceFolder:We.workspace.getWorkspaceFolder(a)}]}let i=this.getActiveTypeScriptFile();if(!i)return[];let o=await Promise.race([this.client.value.execute("projectInfo",{file:i,needFileNameList:!1},t),new Promise(a=>setTimeout(()=>a(ko.NoContent),this.projectInfoRequestTimeout))]);if(o.type!=="response"||!o.body)return[];let{configFileName:s}=o.body;if(s&&!El(s)){let a=Qn.normalize(s),c=We.Uri.file(a),l=We.workspace.getWorkspaceFolder(c);return[{uri:c,fsPath:a,posixPath:c.path,workspaceFolder:l}]}return[]}async getTsConfigsInWorkspace(t){let n=new We.CancellationTokenSource;return t.onCancellationRequested(()=>n.cancel()),Promise.race([this.tsconfigProvider.getConfigsForWorkspace(n.token).then(i=>Array.from(i)),PL(this.findConfigFilesTimeout).then(()=>(n.cancel(),[]))])}static async getCommand(t){if(t.workspaceFolder){let n=await r.getLocalTscAtPath(Qn.dirname(t.fsPath));if(n)return n;let i=await r.getLocalTscAtPath(t.workspaceFolder.uri.fsPath);if(i)return i}return"tsc"}static async getLocalTscAtPath(t){let n=process.platform,i=Qn.join(t,"node_modules",".bin");if(n==="win32"&&await Il(We.Uri.file(Qn.join(i,"tsc.cmd"))))return Qn.join(i,"tsc.cmd");if((n==="linux"||n==="darwin")&&await Il(We.Uri.file(Qn.join(i,"tsc"))))return Qn.join(i,"tsc")}getActiveTypeScriptFile(){let t=We.window.activeTextEditor;if(t){let n=t.document;if(n&&(n.languageId==="typescript"||n.languageId==="typescriptreact"))return this.client.value.toTsFilePath(n.uri)}}getBuildTask(t,n,i,o,s){let a=new We.Task(s,t||We.TaskScope.Workspace,We.l10n.t("build - {0}",n),"tsc",new We.ShellExecution(i,o),"$tsc");return a.group=We.TaskGroup.Build,a.isBackground=!1,a}getWatchTask(t,n,i,o,s){let a=new We.Task(s,t||We.TaskScope.Workspace,We.l10n.t("watch - {0}",n),"tsc",new We.ShellExecution(i,[...o,"--watch"]),"$tsc-watch");return a.group=We.TaskGroup.Build,a.isBackground=!0,a}async getTasksForProject(t){let n=await r.getCommand(t),i=await this.getBuildShellArgs(t),o=this.getLabelForTasks(t),s=[];return(this.autoDetect==="build"||this.autoDetect==="on")&&s.push(this.getBuildTask(t.workspaceFolder,o,n,i,{type:"typescript",tsconfig:o})),(this.autoDetect==="watch"||this.autoDetect==="on")&&s.push(this.getWatchTask(t.workspaceFolder,o,n,i,{type:"typescript",tsconfig:o,option:"watch"})),s}async getTasksForProjectAndDefinition(t,n){let i=await r.getCommand(t),o=await this.getBuildShellArgs(t),s=this.getLabelForTasks(t),a;return n.option===void 0?a=this.getBuildTask(t.workspaceFolder,s,i,o,n):n.option==="watch"&&(a=this.getWatchTask(t.workspaceFolder,s,i,o,n)),a}async getBuildShellArgs(t){let n=["-p",t.fsPath];try{let i=await We.workspace.fs.readFile(t.uri),o=Buffer.from(i).toString("utf-8");if(SL(o)?.references)return["-b",t.fsPath]}catch{}return n}getLabelForTasks(t){if(t.workspaceFolder){let n=We.Uri.file(Qn.normalize(t.workspaceFolder.uri.fsPath));return Qn.posix.relative(n.path,t.posixPath)}return t.posixPath}onConfigurationChanged(){let t=H("tsc.autoDetect",void 0,{fallbackSection:"typescript"});this.autoDetect=typeof t>"u"?"on":t}}});var KK={};Ke(KK,{activate:()=>jK,deactivate:()=>qK});module.exports=Yd(KK);var wL=U(GR()),AL=U(require("fs")),OL=U(require("vscode"));var vC=class{constructor(e,t){this.onCompletionAccepted=e;this._pluginManager=t}configurePlugin(e,t){this._pluginManager.setConfiguration(e,t)}};function WR(r,e){return{getAPI(t){if(t===0)return new vC(r,e)}}}var hh=U(require("vscode")),Sp=class{commands=new Map;dispose(){for(let e of this.commands.values())e.registration.dispose();this.commands.clear()}register(e){let t=this.commands.get(e.id);return t?t.refCount+=1:(t={refCount:1,registration:hh.commands.registerCommand(e.id,e.execute,e)},this.commands.set(e.id,t)),new hh.Disposable(()=>{t.refCount-=1,t.refCount<=0&&(t.registration.dispose(),this.commands.delete(e.id))})}};var Qt=U(require("vscode"));Mt();var _p="typescriptteam.native-preview",yh=class{id="typescript.experimental.enableTsgo";async execute(){await $R(!0)}},od=class{id="typescript.experimental.disableTsgo";async execute(){await $R(!1)}};async function $R(r){if(Qt.extensions.getExtension(_p)||await Qt.window.showErrorMessage(Qt.l10n.t("The TypeScript Go extension is not installed."),{title:Qt.l10n.t("Open on GitHub"),isCloseAffordance:!0})&&await Qt.env.openExternal(Qt.Uri.parse("https://github.com/microsoft/typescript-go")),H("experimental.useTsgo",!1,{fallbackSection:"typescript"})===r)return;let n=Qt.ConfigurationTarget.Global,i=Qt.workspace.getConfiguration(cn),o=i.inspect("experimental.useTsgo"),s=Qt.workspace.getConfiguration("typescript").inspect("experimental.useTsgo");if(o?.workspaceValue!==void 0||s?.workspaceValue!==void 0)n=Qt.ConfigurationTarget.Workspace;else if(o?.workspaceFolderValue!==void 0||s?.workspaceFolderValue!==void 0)n=Qt.ConfigurationTarget.WorkspaceFolder;else{let c=Qt.workspace.getConfiguration("typescript-go").inspect("executablePath");c?.workspaceValue!==void 0?n=Qt.ConfigurationTarget.Workspace:c?.workspaceFolderValue!==void 0&&(n=Qt.ConfigurationTarget.WorkspaceFolder)}await i.update("experimental.useTsgo",r,n)}var Sh=class{constructor(e){this.pluginManager=e}id="_typescript.configurePlugin";execute(e,t){this.pluginManager.setConfiguration(e,t)}};dd();var wh=class{constructor(e,t){this.activeJsTsEditorTracker=e;this.lazyClientHost=t}id="typescript.goToProjectConfig";execute(){let e=this.activeJsTsEditorTracker.activeJsTsEditor;e&&wp(0,this.lazyClientHost.value.serviceClient,e.document.uri)}},Ah=class{constructor(e,t){this.activeJsTsEditorTracker=e;this.lazyClientHost=t}id="javascript.goToProjectConfig";execute(){let e=this.activeJsTsEditorTracker.activeJsTsEditor;e&&wp(1,this.lazyClientHost.value.serviceClient,e.document.uri)}};qC();KC();var kh=class{constructor(e){this.lazyClientHost=e}id="typescript.openTsServerLog";execute(){this.lazyClientHost.value.serviceClient.openTsServerLogFile()}};var Lh=class{constructor(e){this.lazyClientHost=e}id="typescript.reloadProjects";execute(){this.lazyClientHost.value.reloadProjects()}},Fh=class{constructor(e){this.lazyClientHost=e}id="javascript.reloadProjects";execute(){this.lazyClientHost.value.reloadProjects()}};var Mh=class{constructor(e){this.lazyClientHost=e}id="typescript.restartTsServer";execute(){this.lazyClientHost.value.serviceClient.restartTsServer(!0)}};var pd=class r{constructor(e){this.lazyClientHost=e}static id="typescript.selectTypeScriptVersion";id=r.id;execute(){this.lazyClientHost.value.serviceClient.showVersionPicker()}};var JA=U(require("vscode"));No();function dj(r){return r&&typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}var Uh=class{constructor(e){this.lazyClientHost=e}id="typescript.tsserverRequest";async execute(e,t,n,i){if(dj(i)||(i=Pt),t&&typeof t=="object"&&!Array.isArray(t)){let s=t,a=s.file instanceof JA.Uri,c=typeof s.$traceId=="string";if(a||c){let l={file:void 0,...t};if(a){let u=this.lazyClientHost.value.serviceClient;l.file=u.toOpenTsFilePath(s.file)}c&&this.lazyClientHost.value.serviceClient.telemetryReporter.logTraceEvent("TSServerRequestCommand.execute",s.$traceId,JSON.stringify({command:e})),t=l}}if(["emit-output","semanticDiagnosticsSync","syntacticDiagnosticsSync","suggestionDiagnosticsSync","quickinfo","quickinfo-full","completionInfo"].includes(e)||e.startsWith("_"))return this.lazyClientHost.value.serviceClient.execute(e,t,i,n)}};function XA(r,e,t,n){r.register(new Lh(e)),r.register(new Fh(e)),r.register(new pd(e)),r.register(new kh(e)),r.register(new Mh(e)),r.register(new wh(n,e)),r.register(new Ah(n,e)),r.register(new Sh(t)),r.register(new fd),r.register(new Uh(e)),r.register(new Ya),r.register(new yh),r.register(new od)}var r0=U(require("os")),Pl=U(require("path")),qa=U(require("vscode")),n0=U(require("child_process")),jh=U(require("fs"));var QA=U(require("vscode"));Mt();Op();var wo=(o=>(o[o.Off=0]="Off",o[o.Normal=1]="Normal",o[o.Terse=2]="Terse",o[o.Verbose=3]="Verbose",o[o.RequestTime=4]="RequestTime",o))(wo||{});(t=>{function r(n){switch(n?.toLowerCase()){case"normal":return 1;case"terse":return 2;case"verbose":return 3;case"requestTime":return 4;default:return 0}}t.fromString=r;function e(n){switch(n){case 1:return"normal";case 2:return"terse";case 3:return"verbose";case 4:return"requestTime";default:return"off"}}t.toString=e})(wo||={});var GC=class r{target;module;checkJs;experimentalDecorators;strictNullChecks;strictFunctionTypes;strict;constructor(e){this.target=r.readTarget(e),this.module=r.readModule(e),this.checkJs=r.readCheckJs(e),this.experimentalDecorators=r.readExperimentalDecorators(e),this.strictNullChecks=r.readImplicitStrictNullChecks(e),this.strictFunctionTypes=r.readImplicitStrictFunctionTypes(e),this.strict=r.readImplicitStrict(e)}isEqualTo(e){return Vi(this,e)}static readTarget(e){return e.get("js/ts.implicitProjectConfig.target")}static readModule(e){return e.get("js/ts.implicitProjectConfig.module")}static readCheckJs(e){return e.get("js/ts.implicitProjectConfig.checkJs",!1)}static readExperimentalDecorators(e){return e.get("js/ts.implicitProjectConfig.experimentalDecorators",!1)}static readImplicitStrictNullChecks(e){return e.get("js/ts.implicitProjectConfig.strictNullChecks",!0)}static readImplicitStrictFunctionTypes(e){return e.get("js/ts.implicitProjectConfig.strictFunctionTypes",!0)}static readImplicitStrict(e){return e.get("js/ts.implicitProjectConfig.strict",!0)}};function ZA(r,e){return Vi(r,e)}var BC="vscode",Yh=class{loadFromWorkspace(){let e=QA.workspace.getConfiguration();return{locale:this.readLocale(),globalTsdk:this.readGlobalTsdk(e),localTsdk:this.readLocalTsdk(e),npmLocation:this.readNpmLocation(),tsServerLogLevel:this.readTsServerLogLevel(),tsServerPluginPaths:this.readTsServerPluginPaths(),implicitProjectConfiguration:new GC(e),disableAutomaticTypeAcquisition:this.readDisableAutomaticTypeAcquisition(e),useSyntaxServer:this.readUseSyntaxServer(e),webProjectWideIntellisenseEnabled:this.readWebProjectWideIntellisenseEnable(),webProjectWideIntellisenseSuppressSemanticErrors:this.readWebProjectWideIntellisenseSuppressSemanticErrors(),webTypeAcquisitionEnabled:this.readWebTypeAcquisition(),enableDiagnosticsTelemetry:this.readEnableDiagnosticsTelemetry(),enableProjectDiagnostics:this.readEnableProjectDiagnostics(),maxTsServerMemory:this.readMaxTsServerMemory(),enablePromptUseWorkspaceTsdk:this.readEnablePromptUseWorkspaceTsdk(),useVsCodeWatcher:this.readUseVsCodeWatcher(e),watchOptions:this.readWatchOptions(),includePackageJsonAutoImports:this.readIncludePackageJsonAutoImports(),enableTsServerTracing:this.readEnableTsServerTracing(),localNodePath:this.readLocalNodePath(e),globalNodePath:this.readGlobalNodePath(e),workspaceSymbolsExcludeLibrarySymbols:this.readWorkspaceSymbolsExcludeLibrarySymbols()}}readTsServerLogLevel(){let e=H("tsserver.log","off",{fallbackSection:"typescript"});return wo.fromString(e)}readTsServerPluginPaths(){return H("tsserver.pluginPaths",[],{fallbackSection:"typescript"})}readNpmLocation(){return H("tsserver.npm.path",null,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"npm"})}readDisableAutomaticTypeAcquisition(e){let t=H("tsserver.automaticTypeAcquisition.enabled",void 0,{fallbackSection:"typescript"});return t!==void 0?!t:e.get("typescript.disableAutomaticTypeAcquisition",!1)}readLocale(){let e=H("locale","auto",{fallbackSection:"typescript"});return!e||e==="auto"?null:e}readUseSyntaxServer(e){switch(H("tsserver.useSyntaxServer",void 0,{fallbackSection:"typescript"})){case"never":return 0;case"always":return 1;case"auto":return 2}let n=e.get("typescript.tsserver.useSeparateSyntaxServer",!0);return n==="forAllRequests"?1:n===!0?2:0}readEnableDiagnosticsTelemetry(){return H("enableDiagnosticsTelemetry",!1,{fallbackSection:"typescript"})}readEnableProjectDiagnostics(){return H("tsserver.experimental.enableProjectDiagnostics",!1,{fallbackSection:"typescript"})}readUseVsCodeWatcher(e){let t=e.get("files.watcherExclude")??{};if(t["**/node_modules/*/**"]===!0||t["**/node_modules/**"]===!0||t["**/node_modules"]===!0||t["**"]===!0)return!1;let n=e.inspect("typescript.tsserver.experimental.useVsCodeWatcher");return typeof n?.globalValue=="boolean"?n.globalValue:typeof n?.workspaceValue=="boolean"?n.workspaceValue:typeof n?.workspaceFolderValue=="boolean"?n.workspaceFolderValue:H("tsserver.watchOptions",BC,{fallbackSection:"typescript"})===BC}readWatchOptions(){let e=H("tsserver.watchOptions",void 0,{fallbackSection:"typescript"});if(!(!e||e===BC))return{...e??{}}}readIncludePackageJsonAutoImports(){return H("preferences.includePackageJsonAutoImports",void 0,{fallbackSection:"typescript"})}readMaxTsServerMemory(){let n=H("tsserver.maxMemory",3072,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"tsserver.maxTsServerMemory"});return Number.isSafeInteger(n)?Math.max(n,128):3072}readEnablePromptUseWorkspaceTsdk(){return H("tsdk.promptToUseWorkspaceVersion",!1,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"enablePromptUseWorkspaceTsdk"})}readEnableTsServerTracing(){return H("tsserver.tracing.enabled",!1,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"tsserver.enableTracing"})}readWorkspaceSymbolsExcludeLibrarySymbols(){return H("workspaceSymbols.excludeLibrarySymbols",!0,{scope:null,fallbackSection:"typescript"})}readWebProjectWideIntellisenseEnable(){return H("tsserver.web.projectWideIntellisense.enabled",!0,{fallbackSection:"typescript"})}readWebProjectWideIntellisenseSuppressSemanticErrors(){return this.readWebTypeAcquisition()&&H("tsserver.web.projectWideIntellisense.suppressSemanticErrors",!1,{fallbackSection:"typescript"})}readWebTypeAcquisition(){return H("tsserver.web.typeAcquisition.enabled",!0,{fallbackSection:"typescript"})}};var e0=U(require("path")),t0=U(require("vscode")),ja=class{static asAbsoluteWorkspacePath(e){for(let t of t0.workspace.workspaceFolders||[]){let n=[`./${t.name}/`,`${t.name}/`,`.\\${t.name}\\`,`${t.name}\\`];for(let i of n)if(e.startsWith(i))return e0.join(t.uri.fsPath,e.replace(i,""))}}};var Vh=class extends Yh{fixPathPrefixes(e){let t=["~"+Pl.sep];for(let n of t)if(e.startsWith(n))return Pl.join(r0.homedir(),e.slice(n.length));return e}readGlobalTsdk(e){let t=e.inspect("js/ts.tsdk.path");if(t&&typeof t.globalValue=="string")return this.fixPathPrefixes(t.globalValue);let n=e.inspect("typescript.tsdk");return n&&typeof n.globalValue=="string"?this.fixPathPrefixes(n.globalValue):null}readLocalTsdk(e){let t=e.inspect("js/ts.tsdk.path");if(t&&typeof t.workspaceValue=="string")return this.fixPathPrefixes(t.workspaceValue);let n=e.inspect("typescript.tsdk");return n&&typeof n.workspaceValue=="string"?this.fixPathPrefixes(n.workspaceValue):null}readLocalNodePath(e){return this.validatePath(this.readLocalNodePathWorker(e))}readLocalNodePathWorker(e){let t=e.inspect("js/ts.tsserver.node.path"),n=t?.workspaceValue&&typeof t.workspaceValue=="string"?t:e.inspect("typescript.tsserver.nodePath");if(n?.workspaceValue&&typeof n.workspaceValue=="string"){if(n.workspaceValue==="node")return this.findNodePath();let i=this.fixPathPrefixes(n.workspaceValue);return Pl.isAbsolute(i)?i:ja.asAbsoluteWorkspacePath(i)||null}return null}readGlobalNodePath(e){return this.validatePath(this.readGlobalNodePathWorker(e))}readGlobalNodePathWorker(e){let t=e.inspect("js/ts.tsserver.node.path"),n=t?.globalValue&&typeof t.globalValue=="string"?t:e.inspect("typescript.tsserver.nodePath");if(n?.globalValue&&typeof n.globalValue=="string"){if(n.globalValue==="node")return this.findNodePath();let i=this.fixPathPrefixes(n.globalValue);if(Pl.isAbsolute(i))return i}return null}findNodePath(){try{return n0.execFileSync("node",["-e","console.log(process.execPath)"],{windowsHide:!0,timeout:2e3,cwd:qa.workspace.workspaceFolders?.[0].uri.fsPath,encoding:"utf-8"}).trim()}catch{return qa.window.showWarningMessage(qa.l10n.t("Could not detect a Node installation to run TS Server.")),null}}validatePath(e){return e&&(!jh.existsSync(e)||jh.lstatSync(e).isDirectory())?(qa.window.showWarningMessage(qa.l10n.t("The path {0} doesn't point to a valid Node installation to run TS Server. Falling back to bundled Node.",e)),null):e}};var qh=class{_sharedProperties={};_reporter;constructor(e){this._reporter=e}setSharedProperty(e,t){this._sharedProperties[e]=t}postEvent(e,t){let n={...this._sharedProperties,...Object.fromEntries(t)};this._reporter.sendTelemetryEvent(e,n)}postEventObj(e,t){this._reporter.sendTelemetryEvent(e,{...this._sharedProperties,...t})}dispose(){this._reporter.dispose()}};var T0=U(require("vscode")),Ga=U(_0()),ey=class{_experimentationServicePromise;_telemetryReporter;constructor(e,t,n,i){this._telemetryReporter=e,this._experimentationServicePromise=Oj(this._telemetryReporter,t,n,i)}async getTreatmentVariable(e,t){let n=await this._experimentationServicePromise;try{return n.getTreatmentVariableAsync("vscode",e,!0)}catch{return t}}};async function Oj(r,e,t,n){let i;switch(T0.env.uriScheme){case"vscode":i=Ga.TargetPopulation.Public;break;case"vscode-insiders":i=Ga.TargetPopulation.Insiders;break;case"vscode-exploration":i=Ga.TargetPopulation.Internal;break;case"code-oss":i=Ga.TargetPopulation.Team;break;default:i=Ga.TargetPopulation.Public;break}let o=Ga.getExperimentationService(e,t,i,r,n);return await o.initialFetch,o}var sv=U(require("vscode"));var lr=U(require("vscode"));Wa();Mt();vb();var Qy=require("path");qi();ay();var Nl=U(require("vscode"));gi();gt();Op();sy();function Gj(r,e){return r===e?!0:r.code===e.code&&r.message===e.message&&r.severity===e.severity&&r.source===e.source&&r.range.isEqual(e.range)&&Rs(r.relatedInformation||Ap,e.relatedInformation||Ap,(t,n)=>t.message===n.message&&t.location.range.isEqual(n.location.range)&&t.location.uri.fsPath===n.location.uri.fsPath)&&Rs(r.tags||Ap,e.tags||Ap)}var mb=class{constructor(e,t){this.file=e;this.language=t}_diagnostics=new Map;updateDiagnostics(e,t,n,i){return e!==this.language&&(this._diagnostics.clear(),this.language=e),this._diagnostics.get(t)?.length===0&&n.length===0?!1:t===3?this.updateRegionDiagnostics(n,i):(this._diagnostics.set(t,n),!0)}getAllDiagnostics(e){return e.getValidate(this.language)?[...this.get(0),...this.get(1),...this.getSuggestionDiagnostics(e)]:[]}delete(e){for(let[t,n]of this._diagnostics)this._diagnostics.set(t,n.filter(i=>!Gj(i,e)))}updateRegionDiagnostics(e,t){if(!this._diagnostics.get(1))return this._diagnostics.set(1,e),!0;let i=this._diagnostics.get(1).filter(o=>!t.some(s=>o.range.intersection(s)));return i.push(...e),this._diagnostics.set(1,i),!0}getSuggestionDiagnostics(e){let t=e.getEnableSuggestions(this.language);return this.get(2).filter(n=>t?!0:n.tags&&(n.tags.includes(Nl.DiagnosticTag.Unnecessary)||n.tags.includes(Nl.DiagnosticTag.Deprecated)))}get(e){return this._diagnostics.get(e)||[]}};function Wj(r,e){return r.validate===e.validate&&r.enableSuggestions===e.enableSuggestions}var gb=class r{static defaultSettings={validate:!0,enableSuggestions:!0};_languageSettings=new Map;getValidate(e){return this.get(e).validate}setValidate(e,t){return this.update(e,n=>({validate:t,enableSuggestions:n.enableSuggestions}))}getEnableSuggestions(e){return this.get(e).enableSuggestions}setEnableSuggestions(e,t){return this.update(e,n=>({validate:n.validate,enableSuggestions:t}))}get(e){return this._languageSettings.get(e)||r.defaultSettings}update(e,t){let n=this.get(e),i=t(n);return this._languageSettings.set(e,i),!Wj(n,i)}},hb=class extends _e{constructor(t,n){super();this._telemetryReporter=t;this._diagnosticsCollection=n;this._register(Nl.workspace.onDidChangeTextDocument(i=>{(i.document.languageId==="typescript"||i.document.languageId==="typescriptreact")&&this._updateAllDiagnosticCodesAfterTimeout()})),this._updateAllDiagnosticCodesAfterTimeout(),this._registerTelemetryEventEmitter()}_diagnosticCodesMap=new Map;_diagnosticSnapshotsMap=new Rn(t=>t.toString(),{onCaseInsensitiveFileSystem:!1});_timeout;_telemetryEmitter;logDiagnosticsPerformanceTelemetry(t){for(let n of t)this._telemetryReporter.logTelemetry("diagnostics.performance",{syntaxDiagDuration:n.syntaxDiag,semanticDiagDuration:n.semanticDiag,suggestionDiagDuration:n.suggestionDiag,regionSemanticDiagDuration:n.regionSemanticDiag,fileLineCount:n.fileLineCount})}_updateAllDiagnosticCodesAfterTimeout(){clearTimeout(this._timeout),this._timeout=setTimeout(()=>this._updateDiagnosticCodes(),5e3)}_increaseDiagnosticCodeCount(t){t!==void 0&&this._diagnosticCodesMap.set(Number(t),(this._diagnosticCodesMap.get(Number(t))||0)+1)}_updateDiagnosticCodes(){this._diagnosticsCollection.forEach((t,n)=>{let i=this._diagnosticSnapshotsMap.get(t);this._diagnosticSnapshotsMap.set(t,n),n.filter(s=>!i?.some(a=>Vi(s,a))).forEach(s=>{let a=s.code;this._increaseDiagnosticCodeCount(typeof a=="string"||typeof a=="number"?a:a?.value)})})}_registerTelemetryEventEmitter(){this._telemetryEmitter=setInterval(()=>{if(this._diagnosticCodesMap.size>0){let t="";this._diagnosticCodesMap.forEach((n,i)=>{t+=`${i}:${n},`}),this._diagnosticCodesMap.clear(),this._telemetryReporter.logTelemetry("typescript.diagnostics",{diagnosticCodes:t})}},300*1e3)}dispose(){super.dispose(),clearTimeout(this._timeout),clearInterval(this._telemetryEmitter)}},cy=class extends _e{_diagnostics;_settings=new gb;_currentDiagnostics;_pendingUpdates;_updateDelay=50;_diagnosticsTelemetryManager;constructor(e,t,n,i){super(),this._diagnostics=new Rn(void 0,{onCaseInsensitiveFileSystem:i}),this._pendingUpdates=new Rn(void 0,{onCaseInsensitiveFileSystem:i}),this._currentDiagnostics=this._register(Nl.languages.createDiagnosticCollection(e)),(Math.random()*1e3<=1||t.enableDiagnosticsTelemetry)&&(this._diagnosticsTelemetryManager=this._register(new hb(n,this._currentDiagnostics)))}dispose(){super.dispose();for(let e of this._pendingUpdates.values())clearTimeout(e);this._pendingUpdates.clear()}reInitialize(){this._currentDiagnostics.clear(),this._diagnostics.clear()}setValidate(e,t){this._settings.setValidate(e,t)&&this.rebuildAll()}setEnableSuggestions(e,t){this._settings.setEnableSuggestions(e,t)&&this.rebuildAll()}updateDiagnostics(e,t,n,i,o){let s=!1,a=this._diagnostics.get(e);if(a)s=a.updateDiagnostics(t,n,i,o);else if(i.length){let c=new mb(e,t);c.updateDiagnostics(t,n,i,o),this._diagnostics.set(e,c),s=!0}s&&this.scheduleDiagnosticsUpdate(e)}configFileDiagnosticsReceived(e,t){this._currentDiagnostics.set(e,t)}deleteAllDiagnosticsInFile(e){this._currentDiagnostics.delete(e),this._diagnostics.delete(e)}deleteDiagnostic(e,t){let n=this._diagnostics.get(e);n&&(n.delete(t),this.rebuildFile(n))}getDiagnostics(e){return this._currentDiagnostics.get(e)||[]}logDiagnosticsPerformanceTelemetry(e){this._diagnosticsTelemetryManager?.logDiagnosticsPerformanceTelemetry(e)}scheduleDiagnosticsUpdate(e){this._pendingUpdates.has(e)||this._pendingUpdates.set(e,setTimeout(()=>this.updateCurrentDiagnostics(e),this._updateDelay))}updateCurrentDiagnostics(e){this._pendingUpdates.has(e)&&(clearTimeout(this._pendingUpdates.get(e)),this._pendingUpdates.delete(e));let t=this._diagnostics.get(e);this._currentDiagnostics.set(e,t?t.getAllDiagnostics(this._settings):[])}rebuildAll(){this._currentDiagnostics.clear();for(let e of this._diagnostics.values())this.rebuildFile(e)}rebuildFile(e){this._currentDiagnostics.set(e.file,e.getAllDiagnostics(this._settings))}};var ly=class{response;version=-1;document="";execute(e,t){return this.response&&this.matches(e)?this.response=this.response.then(n=>n.type==="cancelled"?t():n):this.reset(e,t)}matches(e){return this.version===e.version&&this.document===e.uri.toString()}async reset(e,t){return this.version=e.version,this.document=e.uri.toString(),this.response=t()}};ut();gt();Mt();Sd();var Rd=class extends _e{constructor(t,n,i,o,s,a,c){super();this.client=t;this.description=n;this.commandManager=i;this.telemetryReporter=o;this.typingsStatus=s;this.fileConfigurationManager=a;this.onCompletionAccepted=c;let l={languageId:this.description.languageIds[0]},u=this._register(new hl("validate.enabled",!0,{scope:l,fallbackSection:this.id,fallbackSubSectionNameOverride:"validate.enable"}));this.updateValidate(u.getValue()),this._register(u.onDidChange(f=>this.updateValidate(f)));let d=this._register(new hl("suggestionActions.enabled",!0,{scope:l,fallbackSection:this.id}));this.updateSuggestionDiagnostics(d.getValue()),this._register(d.onDidChange(f=>this.updateSuggestionDiagnostics(f))),t.onReady(()=>this.registerProviders())}get documentSelector(){let t=[],n=[];for(let i of this.description.languageIds){n.push({language:i});for(let o of ry())t.push({language:i,scheme:o})}return{semantic:t,syntax:n}}async registerProviders(){let t=this.documentSelector,n=new ly;await Promise.all([Promise.resolve().then(()=>(R0(),N0)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(U0(),M0)).then(i=>this._register(i.register(t,this.description,this.client,n))),Promise.resolve().then(()=>(V0(),Y0)).then(i=>this._register(i.register(t,this.description,this.client,n))),Promise.resolve().then(()=>(z0(),W0)).then(i=>this._register(i.register(t,this.description,this.client,this.typingsStatus,this.fileConfigurationManager,this.commandManager,this.telemetryReporter,this.onCompletionAccepted))),Promise.resolve().then(()=>(X0(),J0)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(eO(),Z0)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(nO(),rO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(sO(),oO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(cO(),aO)).then(i=>this._register(i.register(t,this.client,n))),Promise.resolve().then(()=>(uO(),lO)).then(i=>this._register(i.register(this.client,this.commandManager))),Promise.resolve().then(()=>(FO(),LO)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager,this.client.diagnosticsManager))),Promise.resolve().then(()=>(UO(),MO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(VO(),YO)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(qO(),jO)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(BO(),HO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(WO(),GO)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager,this.telemetryReporter))),Promise.resolve().then(()=>(JO(),$O)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(QO(),XO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(ek(),ZO)).then(i=>this._register(i.register(t,this.client,this.commandManager,this.fileConfigurationManager,this.telemetryReporter))),Promise.resolve().then(()=>(sk(),ok)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager,this.commandManager,this.client.diagnosticsManager,this.telemetryReporter))),Promise.resolve().then(()=>(vk(),pk)).then(i=>this._register(i.register(t,this.client,n,this.fileConfigurationManager,this.commandManager,this.telemetryReporter))),Promise.resolve().then(()=>(hk(),gk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Sk(),yk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(Ek(),Tk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(bk(),Ck)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Pk(),xk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Ik(),Dk)).then(i=>this._register(i.register(this.client,this.commandManager))),Promise.resolve().then(()=>(Rk(),Nk)).then(i=>this._register(i.register(t,this.description,this.client))),Promise.resolve().then(()=>(Ok(),Ak)).then(i=>this._register(i.register(t,this.client)))])}handlesUri(t){let n=(0,Qy.extname)(t.path).slice(1).toLowerCase();return this.description.standardFileExtensions.includes(n)||this.handlesConfigFile(t)}handlesDocument(t){return this.description.languageIds.includes(t.languageId)||this.handlesConfigFile(t.uri)}handlesConfigFile(t){let n=(0,Qy.basename)(t.fsPath);return!!n&&!!this.description.configFilePattern&&this.description.configFilePattern.test(n)}get id(){return this.description.id}get diagnosticSource(){return this.description.diagnosticSource}updateValidate(t){this.client.diagnosticsManager.setValidate(this._diagnosticLanguage,t)}updateSuggestionDiagnostics(t){this.client.diagnosticsManager.setEnableSuggestions(this._diagnosticLanguage,t)}reInitialize(){this.client.diagnosticsManager.reInitialize()}triggerAllDiagnostics(){this.client.bufferSyncSupport.requestAllDiagnostics()}diagnosticsReceived(t,n,i,o){t!==0&&!this.client.hasCapabilityForResource(n,2)||t===1&&en()&&(!za()||!b0()||this.client.configuration.webProjectWideIntellisenseSuppressSemanticErrors||!this.client.configuration.webProjectWideIntellisenseEnabled)||t===1&&n.scheme===Ed.notebookCell||this.client.diagnosticsManager.updateDiagnostics(n,this._diagnosticLanguage,t,i,o)}configFileDiagnosticsReceived(t,n){this.client.diagnosticsManager.configFileDiagnosticsReceived(t,n)}get _diagnosticLanguage(){return this.description.diagnosticLanguage}};var ic=U(require("vscode"));Mt();gt();var Zy=class r extends _e{constructor(t){super();this.context=t;this._logLevel=this._register(new hl("tsserver.log","off",{fallbackSection:"typescript"})),this._register(this._logLevel.onDidChange(()=>{this.context.globalState.update(r.logLevelChangedStorageKey,new Date)})),this.shouldNotifyExtendedLogging()&&this.notifyExtendedLogging()}static logLevelChangedStorageKey="typescript.tsserver.logLevelChanged";static doNotPromptLogLevelStorageKey="typescript.tsserver.doNotPromptLogLevel";_logLevel;get logLevel(){return wo.fromString(this._logLevel.getValue())}get lastLogLevelChange(){let t=this.context.globalState.get(r.logLevelChangedStorageKey);if(t){let n=new Date(t);if(n instanceof Date&&!isNaN(n.valueOf()))return n}}get doNotPrompt(){return this.context.globalState.get(r.doNotPromptLogLevelStorageKey)||!1}shouldNotifyExtendedLogging(){let t=this.lastLogLevelChange?new Date(this.lastLogLevelChange).valueOf():0,n=new Date(t+864e5*7);return!this.doNotPrompt&&this.logLevel!==0&&n.valueOf()<Date.now()}notifyExtendedLogging(){let t;(o=>(o[o.DisableLogging=0]="DisableLogging",o[o.DoNotShowAgain=1]="DoNotShowAgain"))(t||={}),ic.window.showInformationMessage(ic.l10n.t("TS Server logging is currently enabled which may impact performance."),{title:ic.l10n.t("Disable logging"),choice:0},{title:ic.l10n.t("Don't show again"),choice:1}).then(n=>{if(n){if(n.choice===0)return ic.workspace.getConfiguration().update(`${cn}.tsserver.log`,"off",!0);if(n.choice===1)return this.context.globalState.update(r.doNotPromptLogLevelStorageKey,!0)}})}};kb();wn();$e();var Vk=U(require("path")),ee=U(require("vscode"));qi();ay();var eS=class{constructor(e,t){this.reporter=e;this.clientVersionDelegate=t}logTelemetry(e,t={}){let n=this.reporter;n&&(t.version=this.clientVersionDelegate(),n.postEventObj(e,t))}logTraceEvent(e,t,n){let i={point:e,traceId:t};n&&(i.data=n),this.logTelemetry("typeScriptExtension.trace",i)}};var Zp=U(require("vscode"));gt();var ev=class extends _e{constructor(t){super();this.logger=t}traceRequest(t,n,i,o){this.logger.logLevel===Zp.LogLevel.Trace&&this.trace(t,`Sending request: ${n.command} (${n.seq}). Response expected: ${i?"yes":"no"}. Current queue length: ${o}`,n.arguments)}traceResponse(t,n,i){this.logger.logLevel===Zp.LogLevel.Trace&&this.trace(t,`Response received: ${n.command} (${n.request_seq}). Request took ${Date.now()-i.queuingStartTime} ms. Success: ${n.success} ${n.success?"":". Message: "+n.message}`,n.body)}traceRequestCompleted(t,n,i,o){this.logger.logLevel===Zp.LogLevel.Trace&&this.trace(t,`Async response received: ${n} (${i}). Request took ${Date.now()-o.queuingStartTime} ms.`)}traceEvent(t,n){this.logger.logLevel===Zp.LogLevel.Trace&&this.trace(t,`Event received: ${n.event} (${n.seq}).`,n.body)}trace(t,n,i){this.logger.trace(`<${t}> ${n}`,...i?[JSON.stringify(i,null,4)]:[])}};dd();Wt();var dt=U(require("vscode"));qi();mi();$e();ut();gi();Mt();xd();No();gt();sy();Wt();function kk(r){switch(r){case Cl:return"TS";case Ns:return"TSX";case Ma:return"JS";case Ua:return"JSX"}}var lx=class{constructor(e,t){this.args=e;this.scriptKind=t}type=0},ux=class{constructor(e,t){this.args=e;this.scriptKind=t}type=1},dx=class{constructor(e){this.args=e}type=2},fx=class{constructor(e,t,n){this.client=e;this._pending=new Rn(t,{onCaseInsensitiveFileSystem:n})}_pending;open(e,t){this.updatePending(e,new ux(t,t.scriptKindName))}close(e,t,n){return this.updatePending(e,new lx(t,n))}change(e,t,n){n.length&&this.updatePending(e,new dx({fileName:t,textChanges:n.map(i=>({newText:i.text,start:ye.toLocation(i.range.start),end:ye.toLocation(i.range.end)})).reverse()}))}reset(){this._pending.clear()}beforeCommand(e){e!=="updateOpen"&&this.flush()}flush(){if(this._pending.size>0){let e=[],t=[],n=[];for(let i of this._pending.values())switch(i.type){case 2:n.push(i.args);break;case 1:t.push(i.args);break;case 0:e.push(i.args);break}this.client.execute("updateOpen",{changedFiles:n,closedFiles:e,openFiles:t},Pt,{nonRecoverable:!0}),this._pending.clear()}}updatePending(e,t){switch(t.type){case 0:{let n=this._pending.get(e);switch(n?.type){case 1:if(n.scriptKind===t.scriptKind)return this._pending.delete(e),!1}break}}return this._pending.has(e)&&this.flush(),this._pending.set(e,t),!0}},px=class{constructor(e,t,n,i){this.document=e;this.filepath=t;this.client=n;this.synchronizer=i}state=0;open(){let e={file:this.filepath,fileContent:this.document.getText(),projectRootPath:this.getProjectRootPath(this.document.uri)},t=kk(this.document.languageId);t&&(e.scriptKindName=t);let n=this.client.pluginManager.plugins.filter(i=>i.languages.indexOf(this.document.languageId)>=0);n.length&&(e.plugins=n.map(i=>i.name)),this.synchronizer.open(this.resource,e),this.state=1}getProjectRootPath(e){let t=this.client.getWorkspaceRootForResource(e);if(!t&&dt.workspace.workspaceFolders){for(let n of Array.from(dt.workspace.workspaceFolders).sort((i,o)=>i.uri.path.length-o.uri.path.length))if(n.uri.scheme===e.scheme&&n.uri.authority===e.authority){t=n.uri;break}}if(t){let n=this.client.toTsFilePath(t);return n?.startsWith(wd)?void 0:n}return kp(e,P0,_d)?"/":void 0}get resource(){return this.document.uri}get lineCount(){return this.document.lineCount}get languageId(){return this.document.languageId}close(){return this.state!==1?(this.state=2,!1):(this.state=2,this.synchronizer.close(this.resource,this.filepath,kk(this.document.languageId)))}onContentChanged(e){this.state!==1&&console.error(`Unexpected buffer state: ${this.state}`),this.synchronizer.change(this.resource,this.filepath,e)}},vx=class extends Rn{getForPath(e){return this.get(dt.Uri.file(e))}get allBuffers(){return this.values()}},mx=class extends Rn{getOrderedFileSet(){let e=Array.from(this.entries()).sort((n,i)=>n.value-i.value).map(n=>n.resource),t=new Rn(this._normalizePath,this.config);for(let n of e)t.set(n,void 0);return t}},gx=class r{constructor(e,t,n){this.client=e;this.files=t;if(!this.isErrorReportingEnabled()){this._done=!0,Qa(n);return}let i=this.client.apiVersion.gte(ve.v440),o=Array.from(t.entries()).filter(a=>i||e.hasCapabilityForResource(a.resource,2)),s=_r(o.map(a=>e.toTsFilePath(a.resource)));if(!s.length)this._done=!0,Qa(n);else{let a;if(this.areProjectDiagnosticsEnabled())a=e.executeAsync("geterrForProject",{delay:0,file:s[0]},this._token.token);else{let c;this.areRegionDiagnosticsEnabled()?c=_r(o.map(l=>{let u=e.toTsFilePath(l.resource),d=l.value;return u&&d?Se.toFileRangesRequestArgs(u,d):u})):c=s,a=e.executeAsync("geterr",{delay:0,files:c},this._token.token)}a.finally(()=>{this._done||(this._done=!0,n())})}}static executeGetErrRequest(e,t,n){return new r(e,t,n)}_done=!1;_token=new dt.CancellationTokenSource;isErrorReportingEnabled(){return this.client.apiVersion.gte(ve.v440)?!0:this.client.capabilities.has(2)}areProjectDiagnosticsEnabled(){return this.client.configuration.enableProjectDiagnostics&&this.client.capabilities.has(2)}areRegionDiagnosticsEnabled(){return this.client.apiVersion.gte(ve.v560)}cancel(){this._done||this._token.cancel(),this._token.dispose()}},hx=class extends _e{_onDidChange=this._register(new dt.EventEmitter);onDidChange=this._onDidChange.event;_tabResources;constructor(e,t){super(),this._tabResources=new Rn(e,t);for(let n of dt.window.tabGroups.all)for(let i of n.tabs)this.add(i);this._register(dt.window.tabGroups.onDidChangeTabs(n=>{let i=n.closed.flatMap(s=>this.delete(s)),o=n.opened.flatMap(s=>this.add(s));(i.length||o.length)&&this._onDidChange.fire({closed:i,opened:o})}))}has(e){if(e.scheme===fb){let n=dt.workspace.notebookDocuments.find(i=>i.getCells().some(o=>o.document.uri.toString()===e.toString()));return!!n&&this.has(n.uri)}let t=this._tabResources.get(e);return!!t&&t.tabs.size>0}add(e){let t=[];for(let n of this.getResourcesForTab(e)){let i=this._tabResources.get(n);i?i.tabs.add(e):(this._tabResources.set(n,{tabs:new Set([e])}),t.push(n))}return t}delete(e){let t=[];for(let n of this.getResourcesForTab(e)){let i=this._tabResources.get(n);i&&(i.tabs.delete(e),i.tabs.size===0&&(this._tabResources.delete(n),t.push(n)))}return t}getResourcesForTab(e){return e.input instanceof dt.TabInputText?[e.input.uri]:e.input instanceof dt.TabInputTextDiff?[e.input.original,e.input.modified]:e.input instanceof dt.TabInputNotebook?[e.input.uri]:[]}},tv=class extends _e{client;modeIds;syncedBuffers;pendingDiagnostics;diagnosticDelayer;pendingGetErr;listening=!1;synchronizer;_validate;_tabResources;constructor(e,t,n){super(),this.client=e,this.modeIds=new Set(t),this._validate=this._register(new Ui("validate.enabled",!0,{fallbackSubSectionNameOverride:"validate.enable"})),this.diagnosticDelayer=new bd(300);let i=o=>this.client.toTsFilePath(o);this.syncedBuffers=new vx(i,{onCaseInsensitiveFileSystem:n}),this.pendingDiagnostics=new mx(i,{onCaseInsensitiveFileSystem:n}),this.synchronizer=new fx(e,i,n),this._tabResources=this._register(new hx(i,{onCaseInsensitiveFileSystem:n})),this._register(this._tabResources.onDidChange(o=>{if(!this.client.configuration.enableProjectDiagnostics){for(let s of o.closed)this.syncedBuffers.get(s)&&(this.pendingDiagnostics.delete(s),this.pendingGetErr?.files.delete(s));for(let s of o.opened){let a=this.syncedBuffers.get(s);a&&this.requestDiagnostic(a)}}})),this._register(this._validate.onDidChange(()=>this.requestAllDiagnostics()))}_onDelete=this._register(new dt.EventEmitter);onDelete=this._onDelete.event;_onWillChange=this._register(new dt.EventEmitter);onWillChange=this._onWillChange.event;listen(){this.listening||(this.listening=!0,dt.workspace.onDidOpenTextDocument(this.openTextDocument,this,this._disposables),dt.workspace.onDidCloseTextDocument(this.onDidCloseTextDocument,this,this._disposables),dt.workspace.onDidChangeTextDocument(this.onDidChangeTextDocument,this,this._disposables),dt.window.onDidChangeVisibleTextEditors(e=>{for(let{document:t}of e){let n=this.syncedBuffers.get(t.uri);n&&this.requestDiagnostic(n)}},this,this._disposables),dt.workspace.textDocuments.forEach(this.openTextDocument,this))}handles(e){return this.syncedBuffers.has(e)}ensureHasBuffer(e){if(this.syncedBuffers.has(e))return!0;let t=dt.workspace.textDocuments.find(n=>n.uri.toString()===e.toString());return t?this.openTextDocument(t):!1}toVsCodeResource(e){let t=this.client.toTsFilePath(e);for(let n of this.syncedBuffers.allBuffers)if(n.filepath===t)return n.resource;return e}toResource(e){let t=this.syncedBuffers.getForPath(e);return t?t.resource:dt.Uri.file(e)}reset(){this.pendingGetErr?.cancel(),this.pendingDiagnostics.clear(),this.synchronizer.reset()}reinitialize(){this.reset();for(let e of this.syncedBuffers.allBuffers)e.open()}openTextDocument(e){if(!this.modeIds.has(e.languageId))return!1;let t=e.uri,n=this.client.toTsFilePath(t);if(!n)return!1;if(this.syncedBuffers.has(t))return!0;let i=new px(e,n,this.client,this.synchronizer);return this.syncedBuffers.set(t,i),i.open(),this.requestDiagnostic(i),!0}closeResource(e){let t=this.syncedBuffers.get(e);if(!t)return;this.pendingDiagnostics.delete(e),this.pendingGetErr?.files.delete(e),this.syncedBuffers.delete(e);let n=t.close();this._onDelete.fire(e),n&&this.requestAllDiagnostics()}interruptGetErr(e){if(!this.pendingGetErr||this.client.configuration.enableProjectDiagnostics)return e();this.pendingGetErr.cancel(),this.pendingGetErr=void 0;let t=e();return this.triggerDiagnostics(),t}beforeCommand(e){this.synchronizer.beforeCommand(e)}lineCount(e){return this.syncedBuffers.get(e)?.lineCount}onDidCloseTextDocument(e){this.closeResource(e.uri)}onDidChangeTextDocument(e){let t=this.syncedBuffers.get(e.document.uri);if(!t)return;this._onWillChange.fire(t.resource),t.onContentChanged(e.contentChanges),!this.requestDiagnostic(t)&&this.pendingGetErr&&(this.pendingGetErr.cancel(),this.pendingGetErr=void 0,this.triggerDiagnostics())}requestAllDiagnostics(){for(let e of this.syncedBuffers.allBuffers)this.shouldValidate(e)&&this.pendingDiagnostics.set(e.resource,Date.now());this.triggerDiagnostics()}getErr(e){let t=e.filter(n=>this.handles(n));if(t.length){for(let n of t)this.pendingDiagnostics.set(n,Date.now());this.triggerDiagnostics()}}triggerDiagnostics(e=200){this.diagnosticDelayer.trigger(()=>{this.sendPendingDiagnostics()},e)}requestDiagnostic(e){if(!this.shouldValidate(e))return!1;this.pendingDiagnostics.set(e.resource,Date.now());let t=Math.min(Math.max(Math.ceil(e.lineCount/20),300),800);return this.triggerDiagnostics(t),!0}hasPendingDiagnostics(e){return this.pendingDiagnostics.has(e)}sendPendingDiagnostics(){let e=this.pendingDiagnostics.getOrderedFileSet();if(this.pendingGetErr){this.pendingGetErr.cancel();for(let{resource:t}of this.pendingGetErr.files.entries())this.syncedBuffers.get(t)&&e.set(t,void 0);this.pendingGetErr=void 0}for(let t of this.syncedBuffers.values()){let i=dt.window.visibleTextEditors.filter(o=>o.document.uri.toString()===t.resource.toString()).flatMap(o=>o.visibleRanges);e.set(t.resource,i.length?i:void 0)}for(let{resource:t}of e.entries()){let n=this.syncedBuffers.get(t);n&&!this.shouldValidate(n)&&e.delete(t)}if(e.size){let t=this.pendingGetErr=gx.executeGetErrRequest(this.client,e,()=>{this.pendingGetErr===t&&(this.pendingGetErr=void 0)})}this.pendingDiagnostics.clear()}shouldValidate(e){return kp(e.resource,_d)||!this.client.configuration.enableProjectDiagnostics&&!this._tabResources.has(e.resource)?!1:this._validate.getValue(e.document)}};var Xn=U(require("vscode"));xd();gt();var Lk="typescript.useWorkspaceNode",Fk="typescript.lastKnownWorkspaceNode",tS=class extends _e{constructor(t,n){super();this.configuration=t;this.workspaceState=n;if(this._currentVersion=this.configuration.globalNodePath||void 0,Xn.workspace.isTrusted){let i=this.configuration.localNodePath;if(i){let o=this.canUseWorkspaceNode(i);o===void 0?Qa(()=>{this.promptAndSetWorkspaceNode()}):o&&(this._currentVersion=i)}}else this._disposables.push(Xn.workspace.onDidGrantWorkspaceTrust(()=>{let i=this.configuration.localNodePath;if(i){let o=this.canUseWorkspaceNode(i);o===void 0?Qa(()=>{this.promptAndSetWorkspaceNode()}):o&&this.updateActiveVersion(i)}}))}_currentVersion;_onDidPickNewVersion=this._register(new Xn.EventEmitter);onDidPickNewVersion=this._onDidPickNewVersion.event;get currentVersion(){return this._currentVersion}async updateConfiguration(t){let n=this.configuration;this.configuration=t,(n.globalNodePath!==t.globalNodePath||n.localNodePath!==t.localNodePath)&&await this.computeNewVersion()}async computeNewVersion(){let t=this.configuration.globalNodePath||void 0,n=this.configuration.localNodePath;if(Xn.workspace.isTrusted&&n){let i=this.canUseWorkspaceNode(n);i===void 0?t=await this.promptUseWorkspaceNode()||t:i&&(t=n)}this.updateActiveVersion(t)}async promptUseWorkspaceNode(){let t=this.configuration.localNodePath;if(t===null)throw new Error("Could not prompt to use workspace Node installation because no workspace Node installation is specified");let n=Xn.l10n.t("Yes"),i=Xn.l10n.t("No"),o=Xn.l10n.t("Not now"),s=await Xn.window.showInformationMessage(Xn.l10n.t("This workspace wants to use the Node installation at '{0}' to run TS Server. Would you like to use it?",t),n,i,o),a;switch(s){case n:await this.setUseWorkspaceNodeState(!0,t),a=t;break;case i:await this.setUseWorkspaceNodeState(!1,t);break;case o:await this.setUseWorkspaceNodeState(void 0,t);break}return a}async promptAndSetWorkspaceNode(){let t=await this.promptUseWorkspaceNode();t!==void 0&&this.updateActiveVersion(t)}updateActiveVersion(t){let n=this.currentVersion;this._currentVersion=t,n!==t&&this._onDidPickNewVersion.fire()}canUseWorkspaceNode(t){if(this.workspaceState.get(Fk)===t)return this.workspaceState.get(Lk)}async setUseWorkspaceNodeState(t,n){await this.workspaceState.update(Fk,n),await this.workspaceState.update(Lk,t)}};var nS=U(require("path")),Mk=U(require("vscode"));var rS=class{constructor(e){this.configuration=e}updateConfiguration(e){this.configuration=e}getPluginPaths(){let e=[];for(let t of this.configuration.tsServerPluginPaths)e.push(...this.resolvePluginPath(t));return e}resolvePluginPath(e){if(nS.isAbsolute(e))return[e];let t=ja.asAbsoluteWorkspacePath(e);return t!==void 0?[t]:(Mk.workspace.workspaceFolders||[]).map(n=>nS.join(n.uri.fsPath,e))}};wn();bb();var oc=U(require("vscode"));ut();Sd();Wt();Up();Za();var iS=class r{constructor(e,t,n,i,o,s,a,c,l){this._versionProvider=e;this._versionManager=t;this._nodeVersionManager=n;this._logDirectoryProvider=i;this._pluginPathsProvider=o;this._logger=s;this._telemetryReporter=a;this._tracer=c;this._factory=l}static tsServerLogOutputChannel=new Br(()=>oc.window.createOutputChannel(oc.l10n.t("TypeScript Server Log")));spawn(e,t,n,i,o,s){let a,c=this.getCompositeServerType(e,t,n),l=this.shouldUseSeparateDiagnosticsServer(n);switch(c){case 1:case 2:{let u=!l&&c===2;a=new Sy({syntax:this.spawnTsServer("syntax",e,n,i,o),semantic:this.spawnTsServer("semantic",e,n,i,o)},s,u);break}case 0:{a=this.spawnTsServer("main",e,n,i,o);break}case 3:{a=this.spawnTsServer("syntax",e,n,i,o);break}}return l?new yy({getErr:this.spawnTsServer("diagnostics",e,n,i,o),primary:a},s):a}getCompositeServerType(e,t,n){if(!t.has(2))return 3;switch(n.useSyntaxServer){case 1:return 3;case 0:return 0;case 2:return e.apiVersion?.gte(ve.v400)?2:1}}shouldUseSeparateDiagnosticsServer(e){return e.enableProjectDiagnostics}spawnTsServer(e,t,n,i,o){let s=t.apiVersion||ve.defaultVersion,a=o.create(e,this._tracer),{args:c,tsServerLog:l,tsServerTraceDirectory:u}=this.getTsServerArgs(e,n,t,s,i,a.cancellationPipeName);r.isLoggingEnabled(n)&&(l?.type==="file"?this._logger.info(`<${e}> Log file: ${l.uri.fsPath}`):l?.type==="output"?this._logger.info(`<${e}> Logging to output`):this._logger.error(`<${e}> Could not create TS Server log`)),n.enableTsServerTracing&&(u?this._logger.info(`<${e}> Trace directory: ${u.fsPath}`):this._logger.error(`<${e}> Could not create trace directory`)),this._logger.info(`<${e}> Forking...`);let d=this._factory.fork(t,c,e,n,this._versionManager,this._nodeVersionManager,l);return this._logger.info(`<${e}> Starting...`),new gy(e,this.kindToServerType(e),d,l,a,t,this._telemetryReporter,this._tracer)}kindToServerType(e){switch(e){case"syntax":return"syntax";case"main":case"semantic":case"diagnostics":default:return"semantic"}}getTsServerArgs(e,t,n,i,o,s){let a=[],c,l;if(e==="syntax"&&(i.gte(ve.v401)?a.push("--serverMode","partialSemantic"):a.push("--syntaxOnly")),a.push("--useInferredProjectPerProjectRoot"),(t.disableAutomaticTypeAcquisition||e==="syntax"||e==="diagnostics")&&a.push("--disableAutomaticTypingAcquisition"),(e==="semantic"||e==="main")&&a.push("--enableTelemetry"),s&&a.push("--cancellationPipeName",s+"*"),r.isLoggingEnabled(t))if(en())a.push("--logVerbosity",wo.toString(t.tsServerLogLevel)),c={type:"output",output:r.tsServerLogOutputChannel.value};else{let v=this._logDirectoryProvider.getNewLogDirectory();if(v){let m=oc.Uri.joinPath(v,"tsserver.log");c={type:"file",uri:m},a.push("--logVerbosity",wo.toString(t.tsServerLogLevel)),a.push("--logFile",m.fsPath)}}t.enableTsServerTracing&&!en()&&(l=this._logDirectoryProvider.getNewLogDirectory(),l&&a.push("--traceDirectory",`"${l.fsPath}"`));let u=en()?[]:this._pluginPathsProvider.getPluginPaths();if(o.plugins.length){a.push("--globalPlugins",o.plugins.map(m=>m.name).join(","));let v=n.path===this._versionProvider.defaultVersion.path;for(let m of o.plugins)(v||m.enableForWorkspaceTypeScriptVersions)&&u.push(en()?m.uri.toString():m.uri.fsPath)}u.length!==0&&a.push("--pluginProbeLocations",u.join(",")),t.npmLocation&&!en()&&a.push("--npmLocation",`"${t.npmLocation}"`),a.push("--locale",r.getTsLocale(t)),a.push("--noGetErrOnBackgroundUpdate");let d=t.useVsCodeWatcher,f=i.isYarnPnp();return i.gte(ve.v544)&&d&&!f?a.push("--canUseWatchEvents"):d?f&&this._logger.info(`<${e}> Falling back to legacy node.js based file watching because of Yarn PnP.`):this._logger.info(`<${e}> Falling back to legacy node.js based file watching because of user settings.`),a.push("--validateDefaultNpmLocation"),za()&&a.push("--enableProjectWideIntelliSenseOnWeb"),{args:a,tsServerLog:c,tsServerTraceDirectory:l}}static isLoggingEnabled(e){return e.tsServerLogLevel!==0}static getTsLocale(e){return e.locale?e.locale:oc.env.language}};var nt=U(require("vscode"));Mt();xd();gt();var oS="typescript.useWorkspaceTsdk",Uk="typescript.suppressPromptWorkspaceTsdk",sS=class extends _e{constructor(t,n,i){super();this.configuration=t;this.versionProvider=n;this.workspaceState=i;if(this._currentVersion=this.versionProvider.defaultVersion,this.useWorkspaceTsdkSetting)if(nt.workspace.isTrusted){let o=this.versionProvider.localVersion;o&&(this._currentVersion=o)}else this._disposables.push(nt.workspace.onDidGrantWorkspaceTrust(()=>{this.versionProvider.localVersion&&this.updateActiveVersion(this.versionProvider.localVersion)}));this.isInPromptWorkspaceTsdkState(t)&&Qa(()=>{this.promptUseWorkspaceTsdk()})}_currentVersion;_onDidPickNewVersion=this._register(new nt.EventEmitter);onDidPickNewVersion=this._onDidPickNewVersion.event;updateConfiguration(t){let n=this.configuration;this.configuration=t,!this.isInPromptWorkspaceTsdkState(n)&&this.isInPromptWorkspaceTsdkState(t)&&this.promptUseWorkspaceTsdk()}get currentVersion(){return this._currentVersion}reset(){this._currentVersion=this.versionProvider.bundledVersion}async promptUserForVersion(){let t=this.getNativePreviewPickItem(),n=[this.getBundledPickItem(),...this.getLocalPickItems()];return t&&n.push(t),n.push({kind:nt.QuickPickItemKind.Separator,label:"",run:()=>{}},uK),(await nt.window.showQuickPick(n,{placeHolder:nt.l10n.t("Select the TypeScript version used for JavaScript and TypeScript language features")}))?.run()}getBundledPickItem(){let t=this.versionProvider.defaultVersion;return{label:(!this.useWorkspaceTsdkSetting||!nt.workspace.isTrusted?"\u2022 ":"")+nt.l10n.t("Use VS Code's Version"),description:t.displayName,detail:t.pathLabel,run:async()=>{await this.workspaceState.update(oS,!1),this.updateActiveVersion(t)}}}getLocalPickItems(){return this.versionProvider.localVersions.map(t=>({label:(this.useWorkspaceTsdkSetting&&nt.workspace.isTrusted&&this.currentVersion.eq(t)?"\u2022 ":"")+nt.l10n.t("Use Workspace Version"),description:t.displayName,detail:t.pathLabel,run:async()=>{await nt.workspace.requestWorkspaceTrust()&&(await this.workspaceState.update(oS,!0),await nt.workspace.getConfiguration(cn).update("tsdk.path",t.pathLabel,!1),this.updateActiveVersion(t))}}))}getNativePreviewPickItem(){let t=nt.extensions.getExtension(_p);return t?{label:(H("experimental.useTsgo",!1,{fallbackSection:"typescript"})?"\u2022 ":"")+nt.l10n.t("Use TypeScript Native Preview (Experimental)"),description:t.packageJSON.version,run:async()=>{await nt.commands.executeCommand("typescript.native-preview.enable")}}:void 0}async promptUseWorkspaceTsdk(){let t=this.versionProvider.localVersion;if(t===void 0)throw new Error("Could not prompt to use workspace TypeScript version because no workspace version is specified");let n=nt.l10n.t("Allow"),i=nt.l10n.t("Dismiss"),o=nt.l10n.t("Never in this Workspace"),s=await nt.window.showInformationMessage(nt.l10n.t("This workspace contains a TypeScript version. Would you like to use the workspace TypeScript version for TypeScript and JavaScript language features?"),n,i,o);s===n?(await this.workspaceState.update(oS,!0),this.updateActiveVersion(t)):s===o&&await this.workspaceState.update(Uk,!0)}updateActiveVersion(t){let n=this.currentVersion;this._currentVersion=t,n.eq(t)||this._onDidPickNewVersion.fire()}get useWorkspaceTsdkSetting(){return this.workspaceState.get(oS,!1)}get suppressPromptWorkspaceTsdkSetting(){return this.workspaceState.get(Uk,!1)}isInPromptWorkspaceTsdkState(t){return t.localTsdk!==null&&t.enablePromptUseWorkspaceTsdk===!0&&this.suppressPromptWorkspaceTsdkSetting===!1&&this.useWorkspaceTsdkSetting===!1}},uK={label:nt.l10n.t("Learn more about managing TypeScript versions"),description:"",run:()=>{nt.env.openExternal(nt.Uri.parse("https://go.microsoft.com/fwlink/?linkid=839919"))}};ut();gt();function aS(r,e=0){switch(typeof r){case"object":return r===null?sc(349,e):Array.isArray(r)?fK(r,e):pK(r,e);case"string":return Yk(r,e);case"boolean":return dK(r,e);case"number":return sc(r,e);case"undefined":return 937*31;default:return sc(r,617)}}function sc(r,e){return(e<<5)-e+r|0}function dK(r,e){return sc(r?433:863,e)}function Yk(r,e){e=sc(149417,e);for(let t=0,n=r.length;t<n;t++)e=sc(r.charCodeAt(t),e);return e}function fK(r,e){return e=sc(104579,e),r.reduce((t,n)=>aS(n,t),e)}function pK(r,e){return e=sc(181387,e),Object.keys(r).sort().reduce((t,n)=>(t=Yk(n,t),aS(r[n],t)),e)}Sd();var ac;(i=>{let r;(c=>(c[c.None=0]="None",c[c.Running=1]="Running",c[c.Errored=2]="Errored"))(r=i.Type||={}),i.None={type:0};class t{constructor(s,a,c,l){this.server=s;this.apiVersion=a;this.tsserverVersion=c;this.languageServiceEnabled=l}type=1;toCancelOnResourceChange=new Set;updateTsserverVersion(s){this.tsserverVersion=s}updateLanguageServiceEnabled(s){this.languageServiceEnabled=s}}i.Running=t;class n{constructor(s,a){this.error=s;this.tsServerLog=a}type=2}i.Errored=n})(ac||={});var yx="ts-nul-authority",wd="^",rv=class extends _e{constructor(t,n,i,o){super();this.context=t;this.loadingIndicator=this._register(new Sx(this)),this.logger=i.logger,this.tracer=new ev(this.logger),this.pluginManager=i.pluginManager,this.logDirectoryProvider=i.logDirectoryProvider,this.cancellerFactory=i.cancellerFactory,this.versionProvider=i.versionProvider,this.processFactory=i.processFactory,this.lastStart=Date.now();let s,a,c=new Promise((l,u)=>{s=l,a=u});this._onReady={promise:c,resolve:s,reject:a},this.numberRestarts=0,this._configuration=i.serviceConfigurationProvider.loadFromWorkspace(),this.versionProvider.updateConfiguration(this._configuration),this.pluginPathsProvider=new rS(this._configuration),this._versionManager=this._register(new sS(this._configuration,this.versionProvider,t.workspaceState)),this._register(this._versionManager.onDidPickNewVersion(()=>{this.restartTsServer()})),this._nodeVersionManager=this._register(new tS(this._configuration,t.workspaceState)),this._register(this._nodeVersionManager.onDidPickNewVersion(()=>{this.restartTsServer()})),this.bufferSyncSupport=new tv(this,o,n),this.onReady(()=>{this.bufferSyncSupport.listen()}),this.bufferSyncSupport.onDelete(l=>{this.cancelInflightRequestsForResource(l),this.diagnosticsManager.deleteAllDiagnosticsInFile(l)},null,this._disposables),this.bufferSyncSupport.onWillChange(l=>{this.cancelInflightRequestsForResource(l)}),ee.workspace.onDidChangeConfiguration(()=>{let l=this._configuration;this._configuration=i.serviceConfigurationProvider.loadFromWorkspace(),this.versionProvider.updateConfiguration(this._configuration),this._versionManager.updateConfiguration(this._configuration),this.pluginPathsProvider.updateConfiguration(this._configuration),this._nodeVersionManager.updateConfiguration(this._configuration),this.serverState.type===1&&(this._configuration.implicitProjectConfiguration.isEqualTo(l.implicitProjectConfiguration)||this.setCompilerOptionsForInferredProjects(this._configuration),ZA(this._configuration,l)||this.restartTsServer())},this,this._disposables),this.telemetryReporter=new eS(i.experimentTelemetryReporter,()=>this.serverState.type===1&&this.serverState.tsserverVersion?this.serverState.tsserverVersion:this.apiVersion.fullVersionString),this.diagnosticsManager=this._register(new cy("typescript",this._configuration,this.telemetryReporter,n)),this.typescriptServerSpawner=new iS(this.versionProvider,this._versionManager,this._nodeVersionManager,this.logDirectoryProvider,this.pluginPathsProvider,this.logger,this.telemetryReporter,this.tracer,this.processFactory),this._register(this.pluginManager.onDidUpdateConfig(l=>{this.configurePlugin(l.pluginId,l.config)})),this._register(this.pluginManager.onDidChangePlugins(()=>{this.restartTsServer()}))}_onReady;_configuration;pluginPathsProvider;_versionManager;_nodeVersionManager;logger;tracer;typescriptServerSpawner;serverState=ac.None;lastStart;numberRestarts;_isPromptingAfterCrash=!1;isRestarting=!1;hasServerFatallyCrashedTooManyTimes=!1;loadingIndicator;telemetryReporter;bufferSyncSupport;diagnosticsManager;pluginManager;logDirectoryProvider;cancellerFactory;versionProvider;processFactory;watches=new Map;watchEvents=new Map;watchChangeTimeout;get capabilities(){return this._configuration.useSyntaxServer===1?new $a(0,1):en()?this.isProjectWideIntellisenseOnWebEnabled()?new $a(0,1,2):new $a(0,1):this.apiVersion.gte(ve.v400)?new $a(0,1,2):new $a(0,2)}_onDidChangeCapabilities=this._register(new ee.EventEmitter);onDidChangeCapabilities=this._onDidChangeCapabilities.event;isProjectWideIntellisenseOnWebEnabled(){return za()&&this._configuration.webProjectWideIntellisenseEnabled}cancelInflightRequestsForResource(t){if(this.serverState.type===1)for(let n of this.serverState.toCancelOnResourceChange)n.resource.toString()===t.toString()&&n.cancel()}get configuration(){return this._configuration}dispose(){super.dispose(),this.bufferSyncSupport.dispose(),this.serverState.type===1&&this.serverState.server.kill(),this.loadingIndicator.reset(),this.resetWatchers()}restartTsServer(t=!1){this.serverState.type===1&&(this.logger.info("Killing TS Server"),this.isRestarting=!0,this.serverState.server.kill()),t&&(this.hasServerFatallyCrashedTooManyTimes=!1,this.numberRestarts=0,this.lastStart=Date.now()),this.serverState=this.startService(!0)}_onTsServerStarted=this._register(new ee.EventEmitter);onTsServerStarted=this._onTsServerStarted.event;_onDiagnosticsReceived=this._register(new ee.EventEmitter);onDiagnosticsReceived=this._onDiagnosticsReceived.event;_onConfigDiagnosticsReceived=this._register(new ee.EventEmitter);onConfigDiagnosticsReceived=this._onConfigDiagnosticsReceived.event;_onResendModelsRequested=this._register(new ee.EventEmitter);onResendModelsRequested=this._onResendModelsRequested.event;_onProjectLanguageServiceStateChanged=this._register(new ee.EventEmitter);onProjectLanguageServiceStateChanged=this._onProjectLanguageServiceStateChanged.event;_onDidBeginInstallTypings=this._register(new ee.EventEmitter);onDidBeginInstallTypings=this._onDidBeginInstallTypings.event;_onDidEndInstallTypings=this._register(new ee.EventEmitter);onDidEndInstallTypings=this._onDidEndInstallTypings.event;_onTypesInstallerInitializationFailed=this._register(new ee.EventEmitter);onTypesInstallerInitializationFailed=this._onTypesInstallerInitializationFailed.event;_onSurveyReady=this._register(new ee.EventEmitter);onSurveyReady=this._onSurveyReady.event;get apiVersion(){return this.serverState.type===1?this.serverState.apiVersion:ve.defaultVersion}onReady(t){return this._onReady.promise.then(t)}ensureServiceStarted(){this.serverState.type!==1&&this.startService()}token=0;startService(t=!1){if(this.logger.info("Starting TS Server"),this.isDisposed)return this.logger.info("Not starting server: disposed"),ac.None;if(this.hasServerFatallyCrashedTooManyTimes)return this.logger.info("Not starting server: too many crashes"),ac.None;let n=this._versionManager.currentVersion;n.isValid||(ee.window.showWarningMessage(ee.l10n.t("The path {0} doesn't point to a valid tsserver install. Falling back to bundled TypeScript version.",n.path)),this._versionManager.reset(),n=this._versionManager.currentVersion),this.logger.info(`Using tsserver from: ${n.path}`);let i=this._nodeVersionManager.currentVersion;i&&this.logger.info(`Using Node installation from ${i} to run TS Server`),this.resetWatchers();let o=n.apiVersion||ve.defaultVersion,s=++this.token,a=this.typescriptServerSpawner.spawn(n,this.capabilities,this.configuration,this.pluginManager,this.cancellerFactory,{onFatalError:(l,u)=>this.fatalError(l,u)});this.serverState=new ac.Running(a,o,void 0,!0),this.lastStart=Date.now();let c={hasGlobalPlugins:this.pluginManager.plugins.length>0,globalPluginNameHashes:JSON.stringify(this.pluginManager.plugins.map(l=>aS(l.name)))};return this.telemetryReporter.logTelemetry("tsserver.spawned",{...c,localTypeScriptVersion:this.versionProvider.localVersion?this.versionProvider.localVersion.displayName:"",typeScriptVersionSource:n.source}),a.onError(l=>{if(this.token===s){if(!(l instanceof Error)){this.logger.error("TSServer got unknown error type:",l);return}l&&ee.window.showErrorMessage(ee.l10n.t("TypeScript language server exited with error. Error message is: {0}",l.message||l.name)),this.serverState=new ac.Errored(l,a.tsServerLog),this.logger.error("TSServer errored with error.",l),a.tsServerLog?.type==="file"&&this.logger.error(`TSServer log file: ${a.tsServerLog.uri.fsPath}`),this.telemetryReporter.logTelemetry("tsserver.error",{...c}),this.serviceExited(!1,o)}}),a.onExit(l=>{let{code:u,signal:d}=l;this.logger.error(`TSServer exited. Code: ${u}. Signal: ${d}`),this.telemetryReporter.logTelemetry("tsserver.exitWithCode",{...c,code:u??void 0,signal:d??void 0}),this.token===s&&(a.tsServerLog?.type==="file"&&this.logger.info(`TSServer log file: ${a.tsServerLog.uri.fsPath}`),this.serviceExited(!this.isRestarting,o),this.isRestarting=!1)}),a.onEvent(l=>this.dispatchEvent(l)),this.serviceStarted(t),this._onReady.resolve(),this._onTsServerStarted.fire({version:n,usedApiVersion:o}),this._onDidChangeCapabilities.fire(),this.serverState}resetWatchers(){clearTimeout(this.watchChangeTimeout),mC(Array.from(this.watches.values()))}async showVersionPicker(){this._versionManager.promptUserForVersion()}async openTsServerLogFile(){if(this._configuration.tsServerLogLevel===0)return ee.window.showErrorMessage(ee.l10n.t("TS Server logging is off. Please set 'js/ts.tsserver.log' and restart the TS server to enable logging"),{title:ee.l10n.t("Enable logging and restart TS server")}).then(t=>{if(t)return ee.workspace.getConfiguration().update("js/ts.tsserver.log","verbose",!0).then(()=>{this.restartTsServer()})}),!1;if(this.serverState.type!==1||!this.serverState.server.tsServerLog)return ee.window.showWarningMessage(ee.l10n.t("TS Server has not started logging.")),!1;switch(this.serverState.server.tsServerLog.type){case"output":return this.serverState.server.tsServerLog.output.show(),!0;case"file":{try{let t=await ee.workspace.openTextDocument(this.serverState.server.tsServerLog.uri);return await ee.window.showTextDocument(t),!0}catch{}try{return await ee.commands.executeCommand("revealFileInOS",this.serverState.server.tsServerLog.uri),!0}catch{return ee.window.showWarningMessage(ee.l10n.t("Could not open TS Server log file")),!1}}}}serviceStarted(t){this.bufferSyncSupport.reset();let n=this.apiVersion.gte(ve.v380)?this.configuration.watchOptions:void 0,i={hostInfo:"vscode",preferences:{providePrefixAndSuffixTextForRename:!0,allowRenameOfImportPath:!0,includePackageJsonAutoImports:this._configuration.includePackageJsonAutoImports,excludeLibrarySymbolsInNavTo:this._configuration.workspaceSymbolsExcludeLibrarySymbols},watchOptions:n};this.executeWithoutWaitingForResponse("configure",i),this.setCompilerOptionsForInferredProjects(this._configuration),t&&(this._onResendModelsRequested.fire(),this.bufferSyncSupport.reinitialize(),this.bufferSyncSupport.requestAllDiagnostics());for(let[o,s]of this.pluginManager.configurations())this.configurePlugin(o,s)}setCompilerOptionsForInferredProjects(t){let n={options:this.getCompilerOptionsForInferredProjects(t)};this.executeWithoutWaitingForResponse("compilerOptionsForInferredProjects",n)}getCompilerOptionsForInferredProjects(t){return{...MC(this.apiVersion,0,t),allowJs:!0,allowSyntheticDefaultImports:!0,allowNonTsExtensions:!0,resolveJsonModule:!0}}serviceExited(t,n){if(this.resetWatchers(),this.loadingIndicator.reset(),this.serverState=ac.None,!this.isDisposed&&t){let i=Date.now()-this.lastStart;this.numberRestarts++;let o=!0,s=this.pluginManager.plugins.map(l=>l.extension.id).join(", "),a={title:ee.l10n.t("Report Issue")},c;this.numberRestarts>5?(this.numberRestarts=0,i<10*1e3?(this.lastStart=Date.now(),o=!1,this.hasServerFatallyCrashedTooManyTimes=!0,this.pluginManager.plugins.length?c=ee.window.showErrorMessage(ee.l10n.t(`The JS/TS language service immediately crashed 5 times. The service will not be restarted.
This may be caused by a plugin contributed by one of these extensions: {0}.
Please try disabling these extensions before filing an issue against VS Code.`,s)):c=ee.window.showErrorMessage(ee.l10n.t("The JS/TS language service immediately crashed 5 times. The service will not be restarted."),a),this.telemetryReporter.logTelemetry("serviceExited")):i<60*1e3*5&&(this.lastStart=Date.now(),this._isPromptingAfterCrash||(this.pluginManager.plugins.length?c=ee.window.showWarningMessage(ee.l10n.t(`The JS/TS language service crashed 5 times in the last 5 Minutes.
This may be caused by a plugin contributed by one of these extensions: {0}
Please try disabling these extensions before filing an issue against VS Code.`,s)):c=ee.window.showWarningMessage(ee.l10n.t("The JS/TS language service crashed 5 times in the last 5 Minutes."),a)))):["vscode-insiders","code-oss"].includes(ee.env.uriScheme)&&(this.numberRestarts=0,this._isPromptingAfterCrash||(this.pluginManager.plugins.length?c=ee.window.showWarningMessage(ee.l10n.t(`The JS/TS language service crashed.
This may be caused by a plugin contributed by one of these extensions: {0}.
Please try disabling these extensions before filing an issue against VS Code.`,s)):c=ee.window.showWarningMessage(ee.l10n.t("The JS/TS language service crashed."),a))),c&&(this._isPromptingAfterCrash=!0),c?.then(async l=>{if(this._isPromptingAfterCrash=!1,l===a){let u=this.versionProvider.bundledVersion.apiVersion;if(n.isYarnPnp()){let d={title:ee.l10n.t("Report issue against Yarn PnP")};await ee.window.showWarningMessage(ee.l10n.t("Please report an issue against Yarn PnP"),{modal:!0,detail:ee.l10n.t("The workspace is using a version of the TypeScript Server that has been patched by Yarn PnP. This patching is a common source of bugs.")},d)===d&&ee.env.openExternal(ee.Uri.parse("https://github.com/yarnpkg/berry/issues"))}else u&&n.lt(u)?ee.window.showWarningMessage(ee.l10n.t("Please update your TypeScript version"),{modal:!0,detail:ee.l10n.t(`The workspace is using an old version of TypeScript ({0}).

Before reporting an issue, please update the workspace to use TypeScript {1} or newer to make sure the bug has not already been fixed.`,n.displayName,u.displayName)}):ee.env.openExternal(ee.Uri.parse("https://github.com/microsoft/vscode/wiki/TypeScript-Issues"))}}),o&&this.startService(!0)}}toTsFilePath(t){if(!Dl.has(t.scheme))return t.scheme===ji&&!en()?t.fsPath:(this.isProjectWideIntellisenseOnWebEnabled()?"":wd)+"/"+t.scheme+"/"+(t.authority||yx)+(t.path.startsWith("/")?t.path:"/"+t.path)+(t.fragment?"#"+t.fragment:"")}toOpenTsFilePath(t,n={}){let i=t instanceof ee.Uri?t:t.uri;if(!this.bufferSyncSupport.ensureHasBuffer(i)){!n.suppressAlertOnFailure&&!Dl.has(i.scheme)&&console.error(`Unexpected resource ${i}`);return}return this.toTsFilePath(i)}hasCapabilityForResource(t,n){if(!this.capabilities.has(n))return!1;switch(n){case 2:return ry().includes(t.scheme);case 0:case 1:return!0}}toResource(t){if(en()){if(t.startsWith("/lib.")&&t.endsWith(".d.ts"))return ee.Uri.joinPath(this.context.extensionUri,"dist","browser","typescript",t.slice(1));let n=t.match(/^\/([^\/]+)\/([^\/]*)\/(.+)$/);if(n){let i=ee.Uri.parse(n[1]+"://"+(n[2]===yx?"":n[2])+"/"+n[3]);return this.bufferSyncSupport.toVsCodeResource(i)}}if(t.startsWith(wd)){let n=t.match(/^\^\/([^\/]+)\/([^\/]*)\/(.+)$/);if(n){let i=ee.Uri.parse(n[1]+"://"+(n[2]===yx?"":n[2])+"/"+n[3]);return this.bufferSyncSupport.toVsCodeResource(i)}}return this.bufferSyncSupport.toResource(t)}getWorkspaceRootForResource(t){let n=ee.workspace.workspaceFolders?Array.from(ee.workspace.workspaceFolders):void 0;if(n?.length){if(t.scheme===Ed.notebookCell){for(let i of ee.workspace.notebookDocuments)for(let o of i.getCells())if(o.document.uri.toString()===t.toString()){t=i.uri;break}}for(let i of n.sort((o,s)=>o.uri.path.length-s.uri.path.length))if(i.uri.scheme===t.scheme&&i.uri.authority===t.authority&&t.path.startsWith(i.uri.path+"/"))return i.uri;return ee.workspace.getWorkspaceFolder(t)?.uri}}execute(t,n,i,o){let s;if(o?.cancelOnResourceChange){let a=this.serverState;if(a.type===1){let c=new ee.CancellationTokenSource;i.onCancellationRequested(()=>c.cancel());let l={resource:o.cancelOnResourceChange,cancel:()=>c.cancel()};a.toCancelOnResourceChange.add(l),s=this.executeImpl(t,n,{isAsync:!1,token:c.token,expectsResult:!0,...o}),s[0].finally(()=>{a.toCancelOnResourceChange.delete(l),c.dispose()})}}if(s||(s=this.executeImpl(t,n,{isAsync:!1,token:i,expectsResult:!0,...o})),o?.nonRecoverable&&s[0].catch(a=>this.fatalError(t,a)),t==="updateOpen"){let a=Promise.all(s).then(()=>{this.loadingIndicator.reset()}),c=n;c.openFiles?.length===1&&this.loadingIndicator.startedLoadingFile(c.openFiles[0].file,a)}return s[0]}executeWithoutWaitingForResponse(t,n){this.executeImpl(t,n,{isAsync:!1,token:void 0,expectsResult:!1})}executeAsync(t,n,i){return this.executeImpl(t,n,{isAsync:!0,token:i,expectsResult:!0})[0]}executeImpl(t,n,i){let o=this.serverState;return o.type===1?(this.bufferSyncSupport.beforeCommand(t),o.server.executeImpl(t,n,i)):[Promise.resolve(ko.NoServer)]}interruptGetErr(t){return this.bufferSyncSupport.interruptGetErr(t)}fatalError(t,n){if(this.telemetryReporter.logTelemetry("fatalError",{...n instanceof Fs?n.telemetry:{command:t}}),console.error(`A non-recoverable error occurred while executing tsserver command: ${t}`),n instanceof Fs&&n.serverErrorText&&console.error(n.serverErrorText),this.serverState.type===1){this.logger.info("Killing TS Server");let i=this.serverState.server.tsServerLog;this.serverState.server.kill(),n instanceof Fs&&(this.serverState=new ac.Errored(n,i))}}dispatchEvent(t){switch(t.event){case"syntaxDiag":case"semanticDiag":case"suggestionDiag":case"regionSemanticDiag":{this.loadingIndicator.reset();let n=t;n.body?.diagnostics&&this._onDiagnosticsReceived.fire({kind:vK(t),resource:this.toResource(n.body.file),diagnostics:n.body.diagnostics,spans:n.body.spans});return}case"configFileDiag":this._onConfigDiagnosticsReceived.fire(t);return;case"telemetry":{let n=t.body;this.dispatchTelemetryEvent(n);return}case"projectLanguageServiceState":{let n=t.body;this.serverState.type===1&&this.serverState.updateLanguageServiceEnabled(n.languageServiceEnabled),this._onProjectLanguageServiceStateChanged.fire(n);return}case"projectsUpdatedInBackground":{this.loadingIndicator.reset();let i=t.body.openFiles.map(o=>this.toResource(o));this.bufferSyncSupport.getErr(i);return}case"beginInstallTypes":this._onDidBeginInstallTypings.fire(t.body);return;case"endInstallTypes":this._onDidEndInstallTypings.fire(t.body);return;case"typesInstallerInitializationFailed":this._onTypesInstallerInitializationFailed.fire(t.body);return;case"surveyReady":this._onSurveyReady.fire(t.body);return;case"projectLoadingStart":this.loadingIndicator.startedLoadingProject(t.body.projectName);return;case"projectLoadingFinish":this.loadingIndicator.finishedLoadingProject(t.body.projectName);return;case"createDirectoryWatcher":{let n=t.body.path;if(n.startsWith(wd))return;this.createFileSystemWatcher(t.body.id,new ee.RelativePattern(ee.Uri.file(n),t.body.recursive?"**":"*"),t.body.ignoreUpdate);return}case"createFileWatcher":{let n=t.body.path;if(n.startsWith(wd))return;this.createFileSystemWatcher(t.body.id,new ee.RelativePattern(ee.Uri.file(n),"*"));return}case"closeFileWatcher":this.closeFileSystemWatcher(t.body.id);return;case"requestCompleted":{let n=t.body.performanceData?.diagnosticsDuration;n&&this.diagnosticsManager.logDiagnosticsPerformanceTelemetry(n.map(i=>{let o=this.toResource(i.file);return{...i,fileLineCount:this.bufferSyncSupport.lineCount(o)}}));return}}}scheduleExecuteWatchChangeRequest(){this.watchChangeTimeout||(this.watchChangeTimeout=setTimeout(()=>{this.watchChangeTimeout=void 0;let t=Array.from(this.watchEvents,([n,i])=>({id:n,updated:i.updated&&Array.from(i.updated),created:i.created&&Array.from(i.created),deleted:i.deleted&&Array.from(i.deleted)}));this.watchEvents.clear(),this.executeWithoutWaitingForResponse("watchChange",t)},100))}addWatchEvent(t,n,i){let o=this.watchEvents.get(t),s=c=>{o?.[c]?.delete(i)&&o[c].size===0&&(o[c]=void 0)},a=()=>{o||this.watchEvents.set(t,o={}),(o[n]??=new Set).add(i)};switch(n){case"created":s("deleted"),s("updated"),a();break;case"deleted":s("created"),s("updated"),a();break;case"updated":if(o?.created?.has(i))return;s("deleted"),a();break}this.scheduleExecuteWatchChangeRequest()}createFileSystemWatcher(t,n,i){let o=new gl,s=o.add(ee.workspace.createFileSystemWatcher(n,void 0,i));o.add(s.onDidChange(a=>this.addWatchEvent(t,"updated",a.fsPath))),o.add(s.onDidCreate(a=>this.addWatchEvent(t,"created",a.fsPath))),o.add(s.onDidDelete(a=>this.addWatchEvent(t,"deleted",a.fsPath))),o.add({dispose:()=>{this.watchEvents.delete(t),this.watches.delete(t)}}),this.watches.has(t)&&this.closeFileSystemWatcher(t),this.watches.set(t,o)}closeFileSystemWatcher(t){this.watches.get(t)?.dispose()}dispatchTelemetryEvent(t){let n=Object.create(null);if(t.telemetryEventName==="typingsInstalled"){let i=t.payload;n.installedPackages=i.installedPackages,typeof i.installSuccess=="boolean"&&(n.installSuccess=i.installSuccess.toString()),typeof i.typingsInstallerVersion=="string"&&(n.typingsInstallerVersion=i.typingsInstallerVersion)}else{let i=t.payload;i&&Object.keys(i).forEach(o=>{try{i.hasOwnProperty(o)&&(n[o]=typeof i[o]=="string"?i[o]:JSON.stringify(i[o]))}catch{}})}t.telemetryEventName==="projectInfo"&&this.serverState.type===1&&this.serverState.updateTsserverVersion(n.version),this.telemetryReporter.logTelemetry(t.telemetryEventName,n)}configurePlugin(t,n){this.executeWithoutWaitingForResponse("configurePlugin",{pluginName:t,configuration:n})}};function vK(r){switch(r.event){case"syntaxDiag":return 0;case"semanticDiag":return 1;case"suggestionDiag":return 2;case"regionSemanticDiag":return 3}throw new Error("Unknown dignostics kind")}var Sx=class extends _e{constructor(t){super();this.client=t}_task;reset(){this._task&&(this._task.resolve(),this._task=void 0)}startedLoadingProject(t){this.reset();let n=this.getProjectDisplayName(t);ee.window.withProgress({location:ee.ProgressLocation.Window,title:ee.l10n.t("Initializing '{0}'",n)},()=>new Promise(i=>{this._task={project:t,resolve:i}}))}getProjectDisplayName(t){let n=this.client.toResource(t),i=ee.workspace.asRelativePath(n),o=60;return i.length>o?"..."+i.slice(-o):i}startedLoadingFile(t,n){this._task||ee.window.withProgress({location:ee.ProgressLocation.Window,title:ee.l10n.t("Analyzing '{0}' and its dependencies",Vk.basename(t))},()=>n)}finishedLoadingProject(t){this._task&&this._task.project===t&&(this._task.resolve(),this._task=void 0)}};var Ct=U(require("vscode"));mi();dd();ut();gt();var Ll;(o=>{let r;(u=>(u[u.None=0]="None",u[u.Pending=1]="Pending",u[u.Resolved=2]="Resolved",u[u.SyntaxOnly=3]="SyntaxOnly"))(r=o.Type||={}),o.None=Object.freeze({type:0}),o.SyntaxOnly=Object.freeze({type:3});class n{constructor(a,c){this.resource=a;this.projectType=c}type=1;cancellation=new Ct.CancellationTokenSource}o.Pending=n;class i{constructor(a,c,l){this.resource=a;this.projectType=c;this.configFile=l}type=2}o.Resolved=i})(Ll||={});var cS=class extends _e{constructor(t,n,i){super();this._client=t;this._activeTextEditorManager=i;n.register({id:this.openOpenConfigCommandId,execute:async(...[o,s])=>{this._state.type===2?await UC(s,this._client,o,this._state.configFile):this._state.type===1&&await wp(s,this._client,this._state.resource)}}),n.register({id:this.createOrOpenConfigCommandId,execute:async(...[o,s])=>{await Rp(this._client.apiVersion,s,o,this._client.configuration)}}),i.onDidChangeActiveJsTsEditor(this.updateStatus,this,this._disposables),this._client.onReady(()=>{this._ready=!0,this.updateStatus()})}openOpenConfigCommandId="_typescript.openConfig";createOrOpenConfigCommandId="_typescript.createOrOpenConfig";_statusItem;_ready=!1;_state=Ll.None;dispose(){super.dispose(),this._statusItem?.dispose()}async updateStatus(){let t=this._activeTextEditorManager.activeJsTsEditor?.document;if(!t||!Ro(t)){this.updateState(Ll.None);return}if(!this._client.hasCapabilityForResource(t.uri,2)){this.updateState(Ll.SyntaxOnly);return}let n=this._client.toOpenTsFilePath(t,{suppressAlertOnFailure:!0});if(!n){this.updateState(Ll.None);return}if(!this._ready)return;let i=bl(t)?0:1,o=new Ll.Pending(t.uri,i);this.updateState(o);let s=await this._client.execute("projectInfo",{file:n,needFileNameList:!1},o.cancellation.token);s.type==="response"&&s.body&&this._state===o&&this.updateState(new Ll.Resolved(t.uri,i,s.body.configFileName))}updateState(t){if(this._state!==t)switch(this._state.type===1&&(this._state.cancellation.cancel(),this._state.cancellation.dispose()),this._state=t,this._state.type){case 0:{this._statusItem?.dispose(),this._statusItem=void 0;break}case 1:{let n=this.ensureStatusItem();n.severity=Ct.LanguageStatusSeverity.Information,n.text=Ct.l10n.t("Loading IntelliSense status"),n.detail=void 0,n.command=void 0,n.busy=!0;break}case 2:{let n=this._state.projectType===0?Ct.l10n.t("No tsconfig"):Ct.l10n.t("No jsconfig"),i=this._client.getWorkspaceRootForResource(this._state.resource);if(!i){this._statusItem&&(this._statusItem.text=n,this._statusItem.detail=Ct.workspace.workspaceFolders?Ct.l10n.t("File is not part opened folders"):Ct.l10n.t("No opened folders"),this._statusItem.busy=!1);return}let o=this.ensureStatusItem();o.busy=!1,o.detail=void 0,o.severity=Ct.LanguageStatusSeverity.Information,El(this._state.configFile)?(o.text=n,o.detail=void 0,o.command={command:this.createOrOpenConfigCommandId,title:this._state.projectType===0?Ct.l10n.t("Configure TSConfig"):Ct.l10n.t("Configure JSConfig"),arguments:[i,this._state.projectType]}):(o.text=Ct.workspace.asRelativePath(this._state.configFile),o.detail=void 0,o.command={command:this.openOpenConfigCommandId,title:Ct.l10n.t("Open Config File"),arguments:[i,this._state.projectType]});break}case 3:{let n=this.ensureStatusItem();n.severity=Ct.LanguageStatusSeverity.Warning,n.text=Ct.l10n.t("Partial mode"),n.detail=Ct.l10n.t("Project wide IntelliSense not available"),n.busy=!1,n.command={title:Ct.l10n.t("Learn More"),command:"vscode.open",arguments:[Ct.Uri.parse("https://aka.ms/vscode/jsts/partial-mode")]};break}}}ensureStatusItem(){return this._statusItem||(this._statusItem=Ct.languages.createLanguageStatusItem("typescript.projectStatus",Oh),this._statusItem.name=Ct.l10n.t("JS/TS IntelliSense Status")),this._statusItem}};var zt=U(require("vscode"));dd();var _x=class{constructor(e){this.telemetryReporter=e;this._item=zt.window.createStatusBarItem("status.typescript.exclude",zt.StatusBarAlignment.Right,98),this._item.name=zt.l10n.t("TypeScript: Configure Excludes"),this._item.command="js.projectStatus.command"}configFileName;_item;_currentHint;getCurrentHint(){return this._currentHint}hide(){this._item.hide()}show(e){this._currentHint={message:e?zt.l10n.t("To enable project-wide JavaScript/TypeScript language features, exclude folders with many files, like: {0}",e):zt.l10n.t("To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.")},this._item.tooltip=this._currentHint.message,this._item.text=zt.l10n.t("Configure Excludes"),this._item.tooltip=zt.l10n.t("To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on."),this._item.color="#A5DF3B",this._item.show(),this.telemetryReporter.logTelemetry("js.hintProjectExcludes")}};function mK(r,e){return e.onProjectLanguageServiceStateChanged(t=>{if(t.languageServiceEnabled)r.hide();else{r.show();let n=t.projectName;n&&(r.configFileName=n,zt.window.showWarningMessage(r.getCurrentHint().message,{title:zt.l10n.t("Configure Excludes"),index:0}).then(i=>{i&&i.index===0&&jk(e,n)}))}})}function jk(r,e){if(!El(e))zt.workspace.openTextDocument(e).then(zt.window.showTextDocument);else{let t=r.getWorkspaceRootForResource(zt.Uri.file(e));t&&Rp(r.apiVersion,/tsconfig\.?.*\.json/.test(e)?0:1,t,r.configuration)}}function qk(r){let e=[],t=new _x(r.telemetryReporter);return e.push(zt.commands.registerCommand("js.projectStatus.command",()=>{t.configFileName&&jk(r,t.configFileName);let{message:n}=t.getCurrentHint();return zt.window.showInformationMessage(n)})),e.push(mK(t,r)),zt.Disposable.from(...e)}var Gi=U(require("vscode"));Mt();gt();var Kk=30*1e3,nv=class extends _e{_acquiringTypings=new Map;_client;constructor(e){super(),this._client=e,this._register(this._client.onDidBeginInstallTypings(t=>this.onBeginInstallTypings(t.eventId))),this._register(this._client.onDidEndInstallTypings(t=>this.onEndInstallTypings(t.eventId)))}dispose(){super.dispose();for(let e of this._acquiringTypings.values())clearTimeout(e)}get isAcquiringTypings(){return Object.keys(this._acquiringTypings).length>0}onBeginInstallTypings(e){this._acquiringTypings.has(e)||this._acquiringTypings.set(e,setTimeout(()=>{this.onEndInstallTypings(e)},Kk))}onEndInstallTypings(e){let t=this._acquiringTypings.get(e);t&&clearTimeout(t),this._acquiringTypings.delete(e)}},lS=class extends _e{_promises=new Map;constructor(e){super(),this._register(e.onDidBeginInstallTypings(t=>this._onBegin(t.eventId))),this._register(e.onDidEndInstallTypings(t=>this._onEndOrTimeout(t.eventId))),this._register(e.onTypesInstallerInitializationFailed(t=>this.onTypesInstallerInitializationFailed()))}dispose(){super.dispose(),this._promises.forEach(e=>e())}_onBegin(e){let t=setTimeout(()=>this._onEndOrTimeout(e),Kk),n=new Promise(i=>{this._promises.set(e,()=>{clearTimeout(t),i()})});Gi.window.withProgress({location:Gi.ProgressLocation.Window,title:Gi.l10n.t("Fetching data for better TypeScript IntelliSense")},()=>n)}_onEndOrTimeout(e){let t=this._promises.get(e);t&&(this._promises.delete(e),t())}async onTypesInstallerInitializationFailed(){if(H("tsserver.checkNpmIsInstalled",!0,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"check.npmIsInstalled"})){let e={title:Gi.l10n.t("Don't Show Again")};await Gi.window.showWarningMessage(Gi.l10n.t("Could not install typings files for JavaScript language features. Please ensure that NPM is installed, or configure 'js/ts.tsserver.npm.path' in your user settings. Alternatively, check the [documentation]({0}) to learn more.","https://go.microsoft.com/fwlink/?linkid=847635"),e)===e&&Gi.workspace.getConfiguration("js/ts").update("tsserver.checkNpmIsInstalled",!1,!0)}}};var Ad=U(require("vscode"));mi();gt();var uS=class extends _e{constructor(t){super();this._client=t;this._statusItem=this._register(Ad.languages.createLanguageStatusItem("typescript.version",Oh)),this._statusItem.name=Ad.l10n.t("TypeScript Version"),this._statusItem.detail=Ad.l10n.t("TypeScript version"),this._register(this._client.onTsServerStarted(({version:n})=>this.onDidChangeTypeScriptVersion(n)))}_statusItem;onDidChangeTypeScriptVersion(t){this._statusItem.text=t.displayName,this._statusItem.command={command:pd.id,title:Ad.l10n.t("Select Version"),tooltip:t.path}}};gi();gt();var TK=new Set([...ky,...dO,...fO,...Ly,...pO,...vO,...mO]),iv=class extends _e{client;languages=[];languagePerId=new Map;typingsStatus;fileConfigurationManager;reportStyleCheckAsWarnings=!0;commandManager;constructor(e,t,n,i,o){super(),this.commandManager=i.commandManager;let s=this.getAllModeIds(e,i.pluginManager);this.client=this._register(new rv(t,n,i,s)),this.client.onDiagnosticsReceived(({kind:a,resource:c,diagnostics:l,spans:u})=>{this.diagnosticsReceived(a,c,l,u)},null,this._disposables),this.client.onConfigDiagnosticsReceived(a=>this.configFileDiagnosticsReceived(a),null,this._disposables),this.client.onResendModelsRequested(()=>this.populateService(),null,this._disposables),this._register(new uS(this.client)),this._register(new cS(this.client,i.commandManager,i.activeJsTsEditorTracker)),this._register(new lS(this.client)),this.typingsStatus=this._register(new nv(this.client)),this._register(qk(this.client)),this.fileConfigurationManager=this._register(new Lp(this.client,n));for(let a of e){let c=new Rd(this.client,a,this.commandManager,this.client.telemetryReporter,this.typingsStatus,this.fileConfigurationManager,o);this.languages.push(c),this._register(c),this.languagePerId.set(a.id,c)}Promise.resolve().then(()=>(Bk(),Hk)).then(a=>this._register(a.register(this.client,this.fileConfigurationManager,c=>this.handles(c)))),Promise.resolve().then(()=>(Wk(),Gk)).then(a=>this._register(a.register(this.client,s))),this.client.ensureServiceStarted(),this.client.onReady(()=>{let a=new Set;for(let c of i.pluginManager.plugins)if(c.configNamespace&&c.languages.length)this.registerExtensionLanguageProvider({id:c.configNamespace,languageIds:Array.from(c.languages),diagnosticSource:"ts-plugin",diagnosticLanguage:1,diagnosticOwner:"typescript",isExternal:!0,standardFileExtensions:[]},o);else for(let l of c.languages)a.add(l);a.size&&this.registerExtensionLanguageProvider({id:"typescript-plugins",languageIds:Array.from(a.values()),diagnosticSource:"ts-plugin",diagnosticLanguage:1,diagnosticOwner:"typescript",isExternal:!0,standardFileExtensions:[]},o)}),this.client.onTsServerStarted(()=>{this.triggerAllDiagnostics()}),lr.workspace.onDidChangeConfiguration(this.configurationChanged,this,this._disposables),this.configurationChanged(),this._register(new Zy(t))}registerExtensionLanguageProvider(e,t){let n=new Rd(this.client,e,this.commandManager,this.client.telemetryReporter,this.typingsStatus,this.fileConfigurationManager,t);this.languages.push(n),this._register(n),this.languagePerId.set(e.id,n)}getAllModeIds(e,t){return[...e.map(n=>n.languageIds),...t.plugins.map(n=>n.languages)].flat()}get serviceClient(){return this.client}reloadProjects(){this.client.executeWithoutWaitingForResponse("reloadProjects",null),this.triggerAllDiagnostics()}async handles(e){return await this.findLanguage(e)?!0:this.client.bufferSyncSupport.handles(e)}configurationChanged(){this.reportStyleCheckAsWarnings=H("reportStyleChecksAsWarnings",!0,{scope:null,fallbackSection:"typescript"})}async findLanguage(e){try{for(let n of this.languages)if(n.handlesUri(e))return n;let t=await lr.workspace.openTextDocument(e);return this.languages.find(n=>n.handlesDocument(t))}catch{return}}triggerAllDiagnostics(){for(let e of this.languagePerId.values())e.triggerAllDiagnostics()}populateService(){this.fileConfigurationManager.reset();for(let e of this.languagePerId.values())e.reInitialize()}async diagnosticsReceived(e,t,n,i){let o=await this.findLanguage(t);o&&o.diagnosticsReceived(e,t,this.createMarkerDatas(n,o.diagnosticSource),i?.map(s=>Se.fromTextSpan(s)))}configFileDiagnosticsReceived(e){let t=e.body;!t?.diagnostics||!t.configFile||this.findLanguage(this.client.toResource(t.configFile)).then(n=>{n?.configFileDiagnosticsReceived(this.client.toResource(t.configFile),t.diagnostics.map(i=>{let o=i.start&&i.end?Se.fromTextSpan(i):new lr.Range(0,0,0,1),s=new lr.Diagnostic(o,i.text,this.getDiagnosticSeverity(i));return s.source=n.diagnosticSource,s}))})}createMarkerDatas(e,t){return e.map(n=>this.tsDiagnosticToVsDiagnostic(n,t))}tsDiagnosticToVsDiagnostic(e,t){let{start:n,end:i,text:o}=e,s=new lr.Range(ye.fromLocation(n),ye.fromLocation(i)),a=new lr.Diagnostic(s,o,this.getDiagnosticSeverity(e));a.source=e.source||t,e.code&&(a.code=e.code);let c=e.relatedInformation;c&&(a.relatedInformation=_r(c.map(d=>{let f=d.span;if(f)return new lr.DiagnosticRelatedInformation(Tr.fromTextSpan(this.client.toResource(f.file),f),d.message)})));let l=[];e.reportsUnnecessary&&l.push(lr.DiagnosticTag.Unnecessary),e.reportsDeprecated&&l.push(lr.DiagnosticTag.Deprecated),a.tags=l.length?l:void 0;let u=a;return u.reportUnnecessary=e.reportsUnnecessary,u.reportDeprecated=e.reportsDeprecated,u}getDiagnosticSeverity(e){if(this.reportStyleCheckAsWarnings&&this.isStyleCheckDiagnostic(e.code)&&e.category===Rl.error)return lr.DiagnosticSeverity.Warning;switch(e.category){case Rl.error:return lr.DiagnosticSeverity.Error;case Rl.warning:return lr.DiagnosticSeverity.Warning;case Rl.suggestion:return lr.DiagnosticSeverity.Hint;default:return lr.DiagnosticSeverity.Error}}isStyleCheckDiagnostic(e){return typeof e=="number"&&TK.has(e)}};var zk=U(require("vscode"));qi();Wa();mi();gt();var ov=class r extends _e{static contextName="typescript.isManagedFile";isInManagedFileContext=!1;constructor(e){super(),e.onDidChangeActiveJsTsEditor(this.onDidChangeActiveTextEditor,this,this._disposables),this.onDidChangeActiveTextEditor(e.activeJsTsEditor)}dispose(){this.updateContext(!1),super.dispose()}onDidChangeActiveTextEditor(e){e?this.updateContext(this.isManagedFile(e)):this.updateContext(!1)}updateContext(e){e!==this.isInManagedFileContext&&(zk.commands.executeCommand("setContext",r.contextName,e),this.isInManagedFileContext=e)}isManagedFile(e){return this.isManagedScriptFile(e)||this.isManagedConfigFile(e)}isManagedScriptFile(e){return Ro(e.document)&&!Dl.has(e.document.uri.scheme)}isManagedConfigFile(e){return hd(e.document.fileName)}};qi();Wa();Za();function $k(r,e,t,n){return new Br(()=>new iv(lb,r,e,t,n))}function Jk(r,e,t,n=()=>Promise.resolve()){let i=[],o=[...lb.map(l=>l.languageIds),...e.plugins.map(l=>l.languages)].flat(),s=!1,a=l=>!s&&EK(o,l)?(s=!0,n().then(()=>{r.value,i.push(new ov(t))}),!0):!1;if(!sv.workspace.textDocuments.some(a)){let l=sv.workspace.onDidOpenTextDocument(u=>{a(u)&&l.dispose()},void 0,i)}return new sv.Disposable(()=>{i.forEach(l=>l.dispose())})}function EK(r,e){return(r.indexOf(e.languageId)>=0||hd(e.fileName))&&!Dl.has(e.uri.scheme)}var Xk=U(require("vscode"));Za();var dS=class{output=new Br(()=>Xk.window.createOutputChannel("TypeScript",{log:!0}));get logLevel(){return this.output.value.logLevel}info(e,...t){this.output.value.info(e,...t)}trace(e,...t){this.output.value.trace(e,...t)}error(e,t){t&&t.message==="No content available."||this.output.value.error(e,...t?[t]:[])}};var tL=U(require("fs"));var Qk=U(require("fs")),Zk=U(require("os")),fS=U(require("path"));Za();function eL(r){let e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t="";for(let n=0;n<r;n++){let i=Math.floor(e.length*Math.random());t+=e[i]}return t}var CK=new Br(()=>{let r=`vscode-typescript${process.platform!=="win32"&&process.getuid?process.getuid():""}`;return fS.join(Zk.tmpdir(),r)}),bx=new Br(()=>{let r=fS.join(CK.value,eL(20));return Qk.mkdirSync(r,{recursive:!0}),r});function pS(r){return fS.join(bx.value,`${r}-${eL(20)}.tmp`)}var xx=class{constructor(e,t){this._serverId=e;this._tracer=t;this.cancellationPipeName=pS("tscancellation")}cancellationPipeName;tryCancelOngoingRequest(e){if(!this.cancellationPipeName)return!1;this._tracer.trace(this._serverId,`TypeScript Server: trying to cancel ongoing request with sequence number ${e}`);try{tL.writeFileSync(this.cancellationPipeName+e,"")}catch{}return!0}},rL=new class{create(r,e){return new xx(r,e)}};var kd=U(require("fs")),nL=U(require("path")),iL=U(require("vscode"));Za();var vS=class{constructor(e){this.context=e}getNewLogDirectory(){let e=this.logDirectory.value;if(e)try{return iL.Uri.file(kd.mkdtempSync(nL.join(e,"tsserver-log-")))}catch{return}}logDirectory=new Br(()=>{try{let e=this.context.logPath;return kd.existsSync(e)||kd.mkdirSync(e),this.context.logPath}catch{return}})};var Ld=U(require("vscode"));gi();gt();var oL;(e=>{function r(t,n){return t.uri.toString()===n.uri.toString()&&t.name===n.name&&t.enableForWorkspaceTypeScriptVersions===n.enableForWorkspaceTypeScriptVersions&&Rs(t.languages,n.languages)}e.equals=r})(oL||={});var mS=class extends _e{_pluginConfigurations=new Map;_plugins;constructor(){super(),Ld.extensions.onDidChange(()=>{if(!this._plugins)return;let e=this.readPlugins();Rs(Array.from(this._plugins.values()).flat(),Array.from(e.values()).flat(),oL.equals)||(this._plugins=e,this._onDidUpdatePlugins.fire(this))},void 0,this._disposables)}get plugins(){return this._plugins??=this.readPlugins(),Array.from(this._plugins.values()).flat()}_onDidUpdatePlugins=this._register(new Ld.EventEmitter);onDidChangePlugins=this._onDidUpdatePlugins.event;_onDidUpdateConfig=this._register(new Ld.EventEmitter);onDidUpdateConfig=this._onDidUpdateConfig.event;setConfiguration(e,t){this._pluginConfigurations.set(e,t),this._onDidUpdateConfig.fire({pluginId:e,config:t})}configurations(){return this._pluginConfigurations.entries()}readPlugins(){let e=new Map;for(let t of Ld.extensions.all){let n=t.packageJSON;if(n.contributes&&Array.isArray(n.contributes.typescriptServerPlugins)){let i=[];for(let o of n.contributes.typescriptServerPlugins)i.push({extension:t,name:o.name,enableForWorkspaceTypeScriptVersions:!!o.enableForWorkspaceTypeScriptVersions,uri:t.extensionUri,languages:Array.isArray(o.languages)?o.languages:[],configNamespace:o.configNamespace});i.length&&e.set(t.id,i)}}return e}};var SS=U(require("child_process")),aL=U(require("fs")),cL=U(require("path")),jo=U(require("vscode"));gt();Wt();Up();var Px=8192,xK="Content-Length: ",sL=Buffer.byteLength(xK,"utf8"),PK=Buffer.from(" ","utf8")[0],gS=Buffer.from("\r","utf8")[0],hS=Buffer.from(`
`,"utf8")[0],Dx=class{index=0;buffer=Buffer.allocUnsafe(Px);append(e){let t=null;if(Buffer.isBuffer(e)?t=e:t=Buffer.from(e,"utf8"),this.buffer.length-this.index>=t.length)t.copy(this.buffer,this.index,0,t.length);else{let n=(Math.ceil((this.index+t.length)/Px)+1)*Px;this.index===0?(this.buffer=Buffer.allocUnsafe(n),t.copy(this.buffer,0,0,t.length)):this.buffer=Buffer.concat([this.buffer.slice(0,this.index),t],n)}this.index+=t.length}tryReadContentLength(){let e=-1,t=0;for(;t<this.index&&(this.buffer[t]===PK||this.buffer[t]===gS||this.buffer[t]===hS);)t++;if(this.index<t+sL)return e;t+=sL;let n=t;for(;t<this.index&&this.buffer[t]!==gS;)t++;if(t+3>=this.index||this.buffer[t+1]!==hS||this.buffer[t+2]!==gS||this.buffer[t+3]!==hS)return e;let i=this.buffer.toString("utf8",n,t);return e=parseInt(i),this.buffer=this.buffer.slice(t+4),this.index=this.index-(t+4),e}tryReadContent(e){if(this.index<e)return null;let t=this.buffer.toString("utf8",0,e),n=e;for(;n<this.index&&(this.buffer[n]===gS||this.buffer[n]===hS);)n++;return this.buffer.copy(this.buffer,0,n),this.index=this.index-n,t}},Ix=class extends _e{buffer=new Dx;nextMessageLength=-1;constructor(e){super(),e.on("data",t=>this.onLengthData(t))}_onError=this._register(new jo.EventEmitter);onError=this._onError.event;_onData=this._register(new jo.EventEmitter);onData=this._onData.event;onLengthData(e){if(!this.isDisposed)try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1&&(this.nextMessageLength=this.buffer.tryReadContentLength(),this.nextMessageLength===-1))return;let t=this.buffer.tryReadContent(this.nextMessageLength);if(t===null)return;this.nextMessageLength=-1;let n=JSON.parse(t);this._onData.fire(n)}}catch(t){this._onError.fire(t)}}};function DK(r,e,t){let n=Object.assign({},r);return t||(n.ELECTRON_RUN_AS_NODE="1"),n.NODE_PATH=cL.join(e,"..","..",".."),n.PATH=n.PATH||process.env.PATH,n}function IK(r,e){let t=[],n=NK(r);if(n){let i=lL()?"--inspect-brk":"--inspect";t.push(`${i}=${n}`)}return e.maxTsServerMemory&&t.push(`--max-old-space-size=${e.maxTsServerMemory}`),t}function NK(r){if(r==="syntax")return;let e=lL()||RK();if(e){let t=parseInt(e);if(!isNaN(t))return t}}function RK(){return process.env[jo.env.remoteName?"TSS_REMOTE_DEBUG":"TSS_DEBUG"]}function lL(){return process.env[jo.env.remoteName?"TSS_REMOTE_DEBUG_BRK":"TSS_DEBUG_BRK"]}var Nx=class extends _e{constructor(t){super();this._process=t}write(t){this._process.send(t)}onData(t){this._process.on("message",t)}onExit(t){this._process.on("exit",t)}onError(t){this._process.on("error",t)}kill(){this._process.kill()}},Rx=class extends _e{constructor(t){super();this._process=t;this._reader=this._register(new Ix(this._process.stdout))}_reader;write(t){this._process.stdin.write(JSON.stringify(t)+`\r
`,"utf8")}onData(t){this._reader.onData(t)}onExit(t){this._process.on("exit",t)}onError(t){this._process.on("error",t),this._reader.onError(t)}kill(){this._process.kill(),this._reader.dispose()}},yS=class{fork(e,t,n,i,o,s,a){let c=e.tsServerPath;aL.existsSync(c)||(jo.window.showWarningMessage(jo.l10n.t("The path {0} doesn't point to a valid tsserver install. Falling back to bundled TypeScript version.",c)),o.reset(),c=o.currentVersion.tsServerPath);let l=s.currentVersion,u=DK(process.env,c,!!l),d=[...t],f=IK(n,i),v=!l&&e.apiVersion?.gte(ve.v460);v&&d.push("--useNodeIpc");let m=l?SS.spawn(l,[...f,c,...d],{windowsHide:!0,cwd:void 0,env:u}):SS.fork(c,d,{silent:!0,cwd:void 0,env:u,execArgv:f,stdio:v?["pipe","pipe","pipe","ipc"]:void 0});return v?new Nx(m):new Rx(m)}};var Fd=U(require("fs")),tn=U(require("path")),Wi=U(require("vscode"));Wt();var uL=U(require("vscode"));var Fl=class{constructor(e,t,n,i){this.source=e;this.path=t;this.apiVersion=n;this._pathLabel=i}get tsServerPath(){return this.path}get pathLabel(){return this._pathLabel??this.path}get isValid(){return this.apiVersion!==void 0}eq(e){return this.path!==e.path?!1:this.apiVersion===e.apiVersion?!0:!this.apiVersion||!e.apiVersion?!1:this.apiVersion.eq(e.apiVersion)}get displayName(){let e=this.apiVersion;return e?e.displayName:uL.l10n.t("Could not load the TypeScript version at this path")}};var _S=class r{constructor(e){this.configuration=e}updateConfiguration(e){this.configuration=e}get defaultVersion(){return this.globalVersion||this.bundledVersion}get globalVersion(){if(this.configuration?.globalTsdk){let e=this.loadVersionsFromSetting("user-setting",this.configuration.globalTsdk);if(e?.length)return e[0]}return this.contributedTsNextVersion}get localVersion(){let e=this.localTsdkVersions;if(e?.length)return e[0];let t=this.localNodeModulesVersions;if(t&&t.length===1)return t[0]}get localVersions(){let e=this.localTsdkVersions.concat(this.localNodeModulesVersions),t=new Set;return e.filter(n=>t.has(n.path)?!1:(t.add(n.path),!0))}get bundledVersion(){let e=this.getContributedVersion("bundled","vscode.typescript-language-features",["..","node_modules"]);if(e)return e;throw Wi.window.showErrorMessage(Wi.l10n.t("VS Code's tsserver was deleted by another application such as a misbehaving virus detection tool. Please reinstall VS Code.")),new Error("Could not find bundled tsserver.js")}get contributedTsNextVersion(){return this.getContributedVersion("ts-nightly-extension","ms-vscode.vscode-typescript-next",["node_modules"])}getContributedVersion(e,t,n){try{let i=Wi.extensions.getExtension(t);if(i){let o=tn.join(i.extensionPath,...n,"typescript","lib","tsserver.js"),s=new Fl(e,o,r.getApiVersion(o),"");if(s.isValid)return s}}catch{}}get localTsdkVersions(){let e=this.configuration?.localTsdk;return e?this.loadVersionsFromSetting("workspace-setting",e):[]}loadVersionsFromSetting(e,t){if(tn.isAbsolute(t)){let i=tn.join(t,"tsserver.js");return[new Fl(e,i,r.getApiVersion(i),t)]}let n=ja.asAbsoluteWorkspacePath(t);if(n!==void 0){let i=tn.join(n,"tsserver.js");return[new Fl(e,i,r.getApiVersion(i),t)]}return this.loadTypeScriptVersionsFromPath(e,t)}get localNodeModulesVersions(){return this.loadTypeScriptVersionsFromPath("node-modules",tn.join("node_modules","typescript","lib")).filter(e=>e.isValid)}loadTypeScriptVersionsFromPath(e,t){if(!Wi.workspace.workspaceFolders)return[];let n=[];for(let i of Wi.workspace.workspaceFolders){let o=t;Wi.workspace.workspaceFolders.length>1&&(o=tn.join(i.name,t));let s=tn.join(i.uri.fsPath,t,"tsserver.js");n.push(new Fl(e,s,r.getApiVersion(s),o))}return n}static getApiVersion(e){let t=r.getTypeScriptVersion(e);if(t)return t;let n=Wi.workspace.getConfiguration().get("typescript.tsdk_version",void 0);if(n)return ve.fromVersionString(n)}static getTypeScriptVersion(e){if(!Fd.existsSync(e))return;let t=e.split(tn.sep);if(t.length<=2)return;let i=t.slice(0,-2).join(tn.sep),o=tn.join(i,"package.json");if(Fd.existsSync(o)||tn.basename(i)==="built"&&(o=tn.join(i,"..","package.json")),!Fd.existsSync(o))return;let s=Fd.readFileSync(o).toString(),a;try{a=JSON.parse(s)}catch{return}if(a?.version)return a.version?ve.fromVersionString(a.version):void 0}};var Nr=U(require("vscode"));Wa();mi();gt();gi();var TS=class extends _e{_activeJsTsEditor;_onDidChangeActiveJsTsEditor=this._register(new Nr.EventEmitter);onDidChangeActiveJsTsEditor=this._onDidChangeActiveJsTsEditor.event;constructor(){super(),this._register(Nr.window.onDidChangeActiveTextEditor(e=>this.update())),this._register(Nr.window.onDidChangeVisibleTextEditors(e=>this.update())),this._register(Nr.window.tabGroups.onDidChangeTabGroups(e=>this.update())),this.update()}get activeJsTsEditor(){return this._activeJsTsEditor}update(){let n=this.getEditorCandidatesForActiveTab().filter(i=>this.isManagedFile(i)).at(0);this._activeJsTsEditor!==n&&(this._activeJsTsEditor=n,this._onDidChangeActiveJsTsEditor.fire(this._activeJsTsEditor))}getEditorCandidatesForActiveTab(){let e=Nr.window.tabGroups.activeTabGroup.activeTab;if(!e)return[];if(e.input instanceof Nr.TabInputText){let t=e.input.uri,n=Nr.window.visibleTextEditors.find(i=>i.document.uri.toString()===t.toString()&&i.viewColumn===e.group.viewColumn);return n?[n]:[]}if(e.input instanceof Nr.TabInputTextDiff){let t=e.input.original,n=e.input.modified;return _r([Nr.window.activeTextEditor,...Nr.window.visibleTextEditors]).filter(i=>(i.document.uri.toString()===t.toString()||i.document.uri.toString()===n.toString())&&i.viewColumn===void 0)}if(e.input instanceof Nr.TabInputNotebook){let t=Nr.window.activeTextEditor;return t?t.viewColumn!==void 0?[]:Nr.window.visibleNotebookEditors.find(i=>i.notebook.uri.toString()===e.input.uri.toString()&&i.viewColumn===e.group.viewColumn)?.notebook.getCells().some(i=>i.document.uri.toString()===t.document.uri.toString())?[t]:[]:[]}return[]}isManagedFile(e){return this.isManagedScriptFile(e)||this.isManagedConfigFile(e)}isManagedScriptFile(e){return Ro(e.document)}isManagedConfigFile(e){return hd(e.document.fileName)}};var ES=U(require("fs"));var dL=(()=>{let r;return()=>{if(typeof r>"u")if(process.platform==="win32")r=!0;else if(process.platform!=="darwin")r=!1;else{let e=pS("typescript-case-check");ES.writeFileSync(e,""),r=ES.existsSync(e.toUpperCase())}return r}})();Za();function fL(r){let e=r.extension.packageJSON;return e&&typeof e=="object"?{name:e.name??"",version:e.version??"",aiKey:e.aiKey??""}:null}At();gt();function jK(r){let e=new mS;r.subscriptions.push(e);let t=new OL.EventEmitter;r.subscriptions.push(t);let n=new vS(r),i=new _S,o,s=fL(r);if(s){let{name:a,version:c,aiKey:l}=s,u=new wL.default(l);o=new qh(u),r.subscriptions.push(o),new ey(o,a,c,r.globalState)}return Promise.resolve().then(()=>(xL(),bL)).then(a=>{r.subscriptions.push(a.register())}),r.subscriptions.push(Ae([Cd("experimental.useTsgo",{fallbackSection:"typescript"}),I0(_p)],()=>{let a=new gl;return a.add(new Sp).register(new od),a},()=>{let a=new gl,c=a.add(new Sp),l=a.add(new TS),u=$k(r,dL(),{pluginManager:e,commandManager:c,logDirectoryProvider:n,cancellerFactory:rL,versionProvider:i,processFactory:new yS,activeJsTsEditorTracker:l,serviceConfigurationProvider:new Vh,experimentTelemetryReporter:o,logger:new dS},d=>{t.fire(d)}).map(d=>a.add(d));return XA(c,u,e,l),Promise.resolve().then(()=>(RL(),NL)).then(d=>{a.add(d.register(new Br(()=>u.value.serviceClient)))}),a.add(Jk(u,e,l)),a})),WR(t.event,e)}function qK(){AL.rmSync(bx.value,{recursive:!0,force:!0})}0&&(module.exports={activate,deactivate});
/*! Bundled license information:

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

@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=extension.js.map
