UNPKG

@vscode/webview-ui-toolkit

Version:

A component library for building webview-based extensions in Visual Studio Code.

3 lines 194 kB
/*! For license information please see extension.js.LICENSE.txt */
(()=>{var e={8331:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Uc});var r,i,o,a,s,c,u,l,d,f,p,h,g=n(7549),m=Object.defineProperty,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,w=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t)=>{for(var n in t||(t={}))y.call(t,n)&&w(e,n,t[n]);if(v)for(var n of v(t))x.call(t,n)&&w(e,n,t[n]);return e},C=(e,t)=>()=>(e&&(t=e(e=0)),t),T=(e,t,n)=>new Promise(((r,i)=>{var o=e=>{try{s(n.next(e))}catch(e){i(e)}},a=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,a);s((n=n.apply(e,t)).next())})),b=C((()=>{r={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}})),S=C((()=>{i="function",o="object",a="undefined",s="prototype",c="hasOwnProperty",l=(u=Object)[s],d=u.assign,f=u.create,p=u.defineProperty,h=l[c]}));function E(){return typeof globalThis!==a&&globalThis?globalThis:typeof self!==a&&self?self:typeof window!==a&&window?window:typeof global!==a&&global?global:null}function P(e){throw new TypeError(e)}function _(e){if(f)return f(e);if(null==e)return{};var t=typeof e;function n(){}return t!==o&&t!==i&&P("Object prototype may only be an Object:"+e),n[s]=e,new n}var k=C((()=>{S()}));function A(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&P("Class extends value "+String(t)+" is not a constructor or null"),M(e,t),e[s]=null===t?_(t):(n[s]=t[s],new n)}var N,R,M,L=C((()=>{S(),k(),(E()||{}).Symbol,(E()||{}).Reflect,N=function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])l[c].call(t,i)&&(e[i]=t[i]);return e},R=d||N,M=function(e,t){return(M=u.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[c](n)&&(e[n]=t[n])})(e,t)}})),D=C((()=>{})),F=C((()=>{S(),k(),L(),D()}));function U(e,t){return e&&ue[J].hasOwnProperty.call(e,t)}function O(e){return e&&(e===ue[J]||e===Array[J])}function j(e){return O(e)||e===Function[J]}function B(e){if(e){if(le)return le(e);var t=e[ae]||e[J]||(e[X]?e[X][J]:null);if(t)return t}return null}function V(e,t){var n=[],r=ue.getOwnPropertyNames;if(r)n=r(e);else for(var i in e)"string"==typeof i&&U(e,i)&&n.push(i);if(n&&n.length>0)for(var o=0;o<n.length;o++)t(n[o])}function q(e,t,n){return t!==X&&typeof e[t]===Q&&(n||U(e,t))}function H(e){throw new TypeError("DynamicProto: "+e)}function z(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function G(e,t,n,r){var i=null;if(e&&U(n,ee)){var o=e[Z]||{};if((i=(o[n[ee]]||{})[t])||H("Missing ["+t+"] "+Q),!i[ne]&&!1!==o[re]){for(var a=!U(e,t),s=B(e),c=[];a&&s&&!j(s)&&!z(c,s);){var u=s[t];if(u){a=u===r;break}c.push(s),s=B(s)}try{a&&(e[t]=i),i[ne]=1}catch(e){o[re]=!1}}}return i}function K(e,t,n){var r=t[e];return r===n&&(r=B(t)[e]),typeof r!==Q&&H("["+e+"] is not a "+Q),r}function W(e,t){return U(e,J)?e.name||t||oe:((e||{})[X]||{}).name||t||oe}function $(e,t,n,r){U(e,J)||H("theClass is an invalid class definition.");var i=e[J];(function(e,t){if(le)for(var n=[],r=B(t);r&&!j(r)&&!z(n,r);){if(r===e)return!0;n.push(r),r=B(r)}return!1})(i,t)||H("["+W(e)+"] is not in class hierarchy of ["+W(t)+"]");var o=null;U(i,ee)?o=i[ee]:(o=te+W(e,"_")+"$"+de,de++,i[ee]=o);var a=$[ie],s=!!a[se];s&&r&&void 0!==r[se]&&(s=!!r[se]);var c=function(e){var t={};return V(e,(function(n){!t[n]&&q(e,n,!1)&&(t[n]=e[n])})),t}(t);n(t,function(e,t,n,r){function i(e,t,n){var i=t[n];if(i[Y]&&r){var o=e[Z]||{};!1!==o[re]&&(i=(o[t[ee]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var o={};V(n,(function(e){o[e]=i(t,n,e)}));for(var a=B(e),s=[];a&&!j(a)&&!z(s,a);)V(a,(function(e){!o[e]&&q(a,e,!le)&&(o[e]=i(t,a,e))})),s.push(a),a=B(a);return o}(i,t,c,s));var u=!!le&&!!a[ce];u&&r&&(u=!!r[ce]),function(e,t,n,r,i){if(!O(e)){var o=n[Z]=n[Z]||{},a=o[t]=o[t]||{};!1!==o[re]&&(o[re]=!!i),V(n,(function(t){q(n,t,!1)&&n[t]!==r[t]&&(a[t]=n[t],delete n[t],(!U(e,t)||e[t]&&!e[t][Y])&&(e[t]=function(e,t){var n=function(){return(G(this,t,e,n)||K(t,e,n)).apply(this,arguments)};return n[Y]=1,n}(e,t)))}))}}(i,o,t,c,!1!==u)}var X,J,Q,Z,Y,ee,te,ne,re,ie,oe,ae,se,ce,ue,le,de,fe,pe,he,ge,me=C((()=>{X="constructor",J="prototype",Q="function",Z="_dynInstFuncs",Y="_isDynProxy",ee="_dynClass",te="_dynCls$",re=ne="_dynInstChk",ie="_dfOpts",oe="_unknown_",ae="__proto__",se="useBaseInst",ce="setInstFuncs",le=(ue=Object).getPrototypeOf,de=0,fe={setInstFuncs:!0,useBaseInst:!0},$[ie]=fe,pe=$})),ve=C((()=>{var e;(e=he||(he={}))[e.CRITICAL=1]="CRITICAL",e[e.WARNING=2]="WARNING",ge={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103}}));function ye(e){return l.toString.call(e)}function xe(e,t){return typeof e===t}function we(e){return void 0===e||typeof e===a}function Ie(e){return null===e||we(e)}function Ce(e){return!Ie(e)}function Te(e,t){return e&&h.call(e,t)}function be(e){return typeof e===o}function Se(e){return typeof e===i}function Ee(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!Ie(e))try{Ie(e[tt])?Ie(e[et])||(e[et](Ye+t,n),i=!0):(e[tt](t,n,r),i=!0)}catch(e){}return i}function Pe(e,t,n,r){if(void 0===r&&(r=!1),!Ie(e))try{Ie(e[rt])?Ie(e[nt])||e[nt](Ye+t,n):e[rt](t,n,r)}catch(e){}}function _e(e,t){if(e)for(var n in e)h.call(e,n)&&t.call(e,n,e[n])}function ke(e,t){return!(!e||!t)&&-1!==e.indexOf(t)}function Ae(e){return"[object Date]"===ye(e)}function Ne(e){return"[object Array]"===ye(e)}function Re(e){return"[object Error]"===ye(e)}function Me(e){return"string"==typeof e}function Le(e){return"number"==typeof e}function De(e){return"boolean"==typeof e}function Fe(e){if(Ae(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}function Ue(e,t,n){for(var r=e.length,i=0;i<r&&(!(i in e)||-1!==t.call(n||e,e[i],i,e));i++);}function Oe(e,t,n){for(var r=e.length,i=n||0,o=Math.max(i>=0?i:r-Math.abs(i),0);o<r;o++)if(o in e&&e[o]===t)return o;return-1}function je(e,t,n){for(var r=e.length,i=n||e,o=new Array(r),a=0;a<r;a++)a in e&&(o[a]=t.call(i,e[a],e));return o}function Be(e,t,n){var r,i=e.length,o=0;if(arguments.length>=3)r=arguments[2];else{for(;o<i&&!(o in e);)o++;r=e[o++]}for(;o<i;)o in e&&(r=t(r,e[o],o,e)),o++;return r}function Ve(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")}function qe(e){var t=typeof e;t!==i&&(t!==o||null===e)&&P("objKeys called on non-object");var n=[];for(var r in e)e&&h.call(e,r)&&n.push(r);if(ot)for(var a=at.length,s=0;s<a;s++)e&&h.call(e,at[s])&&n.push(at[s]);return n}function He(e,t,n,r){if(it)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),it(e,t,i),!0}catch(e){}return!1}function ze(){var e=Date;return e.now?e.now():(new e).getTime()}function Ge(e){return Re(e)?e.name:""}function Ke(e,t,n,r,i){var o=n;return e&&(o=e[t])!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,e[t]=o),o}function We(e,t,n){var r;return e?!(r=e[t])&&Ie(r)&&(r=we(n)?{}:n,e[t]=r):r=we(n)?{}:n,r}function $e(e){return!e}function Xe(e){return!!e}function Je(e){throw new Error(e)}function Qe(e,t,n){if(e&&t&&e!==t&&be(e)&&be(t)){var r=function(r){if(Me(r)){var i=t[r];Se(i)?(!n||n(r,!0,t,e))&&(e[r]=(o=r,function(){var e=arguments;return t[o].apply(t,e)})):(!n||n(r,!1,t,e))&&(Te(e,r)&&delete e[r],He(e,r,(function(){return t[r]}),(function(e){t[r]=e}))||(e[r]=i))}var o};for(var i in t)r(i)}return e}function Ze(e){return e&&(e=u(d?d({},e):e)),e}var Ye,et,tt,nt,rt,it,ot,at,st=C((()=>{F(),Ye="on",et="attachEvent",tt="addEventListener",nt="detachEvent",rt="removeEventListener",it=p,u.freeze,u.seal,ot=!{toString:null}.propertyIsEnumerable("toString"),at=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]}));function ct(e){var t=E();return t&&t[e]?t[e]:e===It&&ut()?window:null}function ut(){return Boolean(typeof window===o&&window)}function lt(){return ut()?window:ct(It)}function dt(){return Boolean(typeof document===o&&document)}function ft(){return dt()?document:ct(Ct)}function pt(){return Boolean(typeof navigator===o&&navigator)?navigator:ct(Tt)}function ht(e){if(e&&Ft){var t=ct("__mockLocation");if(t)return t}return typeof location===o&&location?location:ct(St)}function gt(){return ct(Pt)}function mt(){return Boolean(typeof JSON===o&&JSON||null!==ct(_t))}function vt(){return mt()?JSON||ct(_t):null}function yt(){var e=pt();if(e&&(e.userAgent!==Dt||null===Lt)){var t=((Dt=e.userAgent)||"").toLowerCase();Lt=ke(t,Rt)||ke(t,Mt)}return Lt}function xt(e){if(void 0===e&&(e=null),!e){var t=pt()||{};e=t?(t.userAgent||"").toLowerCase():""}var n=(e||"").toLowerCase();if(ke(n,Rt))return parseInt(n.split(Rt)[1]);if(ke(n,Mt)){var r=parseInt(n.split(Mt)[1]);if(r)return r+4}return null}function wt(e){var t=Object[s].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":mt()&&(n=vt().stringify(e)),t+n}var It,Ct,Tt,bt,St,Et,Pt,_t,kt,At,Nt,Rt,Mt,Lt,Dt,Ft,Ut=C((()=>{F(),st(),It="window",Ct="document",Tt="navigator",bt="history",St="location",Et="console",Pt="performance",_t="JSON",kt="crypto",At="msCrypto",Nt="ReactNative",Rt="msie",Mt="trident/",Lt=null,Dt=null,Ft=!1}));function Ot(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function jt(e,t){return(e||{}).logger||new Vt(t)}var Bt,Vt,qt=C((()=>{ve(),Ut(),me(),st(),Bt=function(){function e(e,t,n,r){void 0===n&&(n=!1);var i=this;i.messageId=e,i.message=(n?"AI: ":"AI (Internal): ")+e;var o="";mt()&&(o=vt().stringify(r));var a=(t?" message:"+Ot(t):"")+(r?" props:"+Ot(o):"");i.message+=a}return e.dataType="MessageData",e}(),Vt=function e(t){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={};pe(e,this,(function(e){function i(e,n){var r=t[e];return Ie(r)?n:r}Ie(t)&&(t={}),e.consoleLoggingLevel=function(){return i("loggingLevelConsole",0)},e.telemetryLoggingLevel=function(){return i("loggingLevelTelemetry",1)},e.maxInternalMessageLimit=function(){return i("maxMessageLimit",25)},e.enableDebugExceptions=function(){return i("enableDebugExceptions",!1)},e.throwInternal=function(t,n,i,o,a){void 0===a&&(a=!1);var s=new Bt(n,i,a,o);if(e.enableDebugExceptions())throw s;if(!we(s.message)){var c=e.consoleLoggingLevel();if(a){var u=+s.messageId;!r[u]&&c>=he.WARNING&&(e.warnToConsole(s.message),r[u]=!0)}else c>=he.WARNING&&e.warnToConsole(s.message);e.logInternalMessage(t,s)}},e.warnToConsole=function(e){var t=typeof console!==a?console:ct(Et);if(t){var n="log";t.warn&&(n="warn"),Se(t[n])&&t[n](e)}},e.resetInternalMessageCount=function(){n=0,r={}},e.logInternalMessage=function(t,i){if(!(n>=e.maxInternalMessageLimit())){var o=!0,a="AITR_"+i.messageId;if(r[a]?o=!1:r[a]=!0,o&&(t<=e.telemetryLoggingLevel()&&(e.queue.push(i),n++),n===e.maxInternalMessageLimit())){var s="Internal events throttle limit per PageView reached for this app.",c=new Bt(ge.MessageLimitPerPVExceeded,s,!1);e.queue.push(c),e.warnToConsole(s)}}}}))}}));function Ht(e,t,n,r,i){if(e){var o=e;if(Se(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var a=void 0,s=o.getCtx(Kt);try{if(a=o.create(t(),r,i)){if(s&&a.setCtx&&(a.setCtx(zt.ParentContextKey,s),s.getCtx&&s.setCtx)){var c=s.getCtx(zt.ChildrenContextKey);c||(c=[],s.setCtx(zt.ChildrenContextKey,c)),c.push(a)}return o.setCtx(Kt,a),n(a)}}catch(e){a&&a.setCtx&&a.setCtx("exception",e)}finally{a&&o.fire(a),o.setCtx(Kt,s)}}}return n()}var zt,Gt,Kt,Wt,$t=C((()=>{me(),st(),zt=function(){function e(t,n,r){var i,o=this,a=!1;o.start=ze(),o.name=t,o.isAsync=r,o.isChildEvt=function(){return!1},Se(n)&&(a=He(o,"payload",(function(){return!i&&Se(n)&&(i=n(),n=null),i}))),o.getCtx=function(t){return t?t===e.ParentContextKey||t===e.ChildrenContextKey?o[t]:(o.ctx||{})[t]:null},o.setCtx=function(t,n){t&&(t===e.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=n):t===e.ChildrenContextKey?o[t]=n:(o.ctx=o.ctx||{})[t]=n)},o.complete=function(){var t=0,r=o.getCtx(e.ChildrenContextKey);if(Ne(r))for(var i=0;i<r.length;i++){var s=r[i];s&&(t+=s.time)}o.time=ze()-o.start,o.exTime=o.time-t,o.complete=function(){},!a&&Se(n)&&(o.payload=n())}}return e.ParentContextKey="parent",e.ChildrenContextKey="childEvts",e}(),Gt=function e(t){this.ctx={},pe(e,this,(function(e){e.create=function(e,t,n){return new zt(e,t,n)},e.fire=function(e){e&&(e.complete(),t&&t.perfEvent(e))},e.setCtx=function(t,n){t&&((e.ctx=e.ctx||{})[t]=n)},e.getCtx=function(t){return(e.ctx||{})[t]}}))},Kt="CoreUtils.doPerf"})),Xt=C((()=>{$t(),ve(),st(),Wt=function(e,t){var n=this,r=null,i=Se(e.processTelemetry),o=Se(e.setNextPlugin);n._hasRun=!1,n.getPlugin=function(){return e},n.getNext=function(){return r},n.setNext=function(e){r=e},n.processTelemetry=function(a,s){s||(s=t);var c=e?e.identifier:"TelemetryPluginChain";Ht(s?s.core():null,(function(){return c+":processTelemetry"}),(function(){if(e&&i){n._hasRun=!0;try{s.setNext(r),o&&e.setNextPlugin(r),r&&(r._hasRun=!1),e.processTelemetry(a,s)}catch(n){var t=r&&r._hasRun;(!r||!t)&&s.diagLog().throwInternal(he.CRITICAL,ge.PluginException,"Plugin ["+e.identifier+"] failed during processTelemetry - "+n),r&&!t&&r.processTelemetry(a,s)}}else r&&(n._hasRun=!0,r.processTelemetry(a,s))}),(function(){return{item:a}}),!a.sync)}}}));function Jt(e,t){var n=[];if(e&&e.length>0)for(var r=null,i=0;i<e.length;i++){var o=e[i];if(o&&Se(o.processTelemetry)){var a=new Wt(o,t);n.push(a),r&&r.setNext(a),r=a}}return n.length>0?n[0]:null}var Qt,Zt,Yt,en,tn,nn=C((()=>{qt(),Xt(),st(),Qt=function e(t,n,r,i){var o=this,a=null;null!==i&&(t&&Se(t.getPlugin)?a=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var o=e.getPlugin();(i||o===n)&&(i=!0,r.push(o)),e=e.getNext()}return i||r.push(n),Jt(r,t)}(t,o,i||t.getPlugin()):i?a=function(e,t,n){var r=e,i=!1;return n&&e&&(r=[],Ue(e,(function(e){(i||e===n)&&(i=!0,r.push(e))}))),n&&!i&&(r||(r=[]),r.push(n)),Jt(r,t)}(t,o,i):we(i)&&(a=Jt(t,o))),o.core=function(){return r},o.diagLog=function(){return jt(r,n)},o.getCfg=function(){return n},o.getExtCfg=function(e,t){var r;if(void 0===t&&(t={}),n){var i=n.extensionConfig;i&&e&&(r=i[e])}return r||t},o.getConfig=function(e,t,r){void 0===r&&(r=!1);var i,a=o.getExtCfg(e,null);return a&&!Ie(a[t])?i=a[t]:n&&!Ie(n[t])&&(i=n[t]),Ie(i)?r:i},o.hasNext=function(){return null!=a},o.getNext=function(){return a},o.setNext=function(e){a=e},o.processNext=function(e){var t=a;t&&(a=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(t,i){return void 0===t&&(t=null),new e(t||a,n,r,i)}}})),rn=C((()=>{Zt="iKey",Yt="extensionConfig"})),on=C((()=>{nn(),st(),rn(),en="getPlugin",tn=function(){function e(){var e=this,t=!1,n=null,r=null;e.core=null,e.diagLog=function(t){return e._getTelCtx(t).diagLog()},e.isInitialized=function(){return t},e.setInitialized=function(e){t=e},e.setNextPlugin=function(e){r=e},e.processNext=function(e,t){t?t.processNext(e):r&&Se(r.processTelemetry)&&r.processTelemetry(e,null)},e._getTelCtx=function(t){void 0===t&&(t=null);var i=t;if(!i){var o=n||new Qt(null,{},e.core);i=r&&r[en]?o.createNew(null,r[en]):o.createNew(null,r)}return i},e._baseTelInit=function(i,o,a,s){i&&Ke(i,Yt,[],null,Ie),!s&&o&&(s=o.getProcessTelContext().getNext());var c=r;r&&r[en]&&(c=r[en]()),e.core=o,n=new Qt(s,i,o,c),t=!0}}return e.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},e}()}));function an(e,t){for(var n=[],r=null,i=e.getNext();i;){var o=i.getPlugin();o&&(r&&Se(r[ln])&&Se(o[cn])&&r[ln](o),(!Se(o[dn])||!o[dn]())&&n.push(o),r=o,i=i.getNext())}Ue(n,(function(n){n.initialize(e.getCfg(),e.core(),t,e.getNext())}))}function sn(e){return e.sort((function(e,t){var n=0,r=Se(t[cn]);return Se(e[cn])?n=r?e[un]-t[un]:1:r&&(n=-1),n}))}var cn,un,ln,dn,fn,pn=C((()=>{st(),cn="processTelemetry",un="priority",ln="setNextPlugin",dn="isInitialized"})),hn=C((()=>{F(),me(),on(),nn(),pn(),st(),500,fn=function(e){function t(){var n,r=e.call(this)||this;function i(e){e&&e.length>0&&(function(e){Ue(e,(function(e){e.priority<500&&Je("Channel has invalid priority"+e.identifier)}))}(e=e.sort((function(e,t){return e.priority-t.priority}))),n.push(e))}return r.identifier="ChannelControllerPlugin",r.priority=500,pe(t,r,(function(e,t){e.setNextPlugin=function(e){},e.processTelemetry=function(e,t){n&&Ue(n,(function(n){n.length>0&&r._getTelCtx(t).createNew(n).processNext(e)}))},e.getChannelControls=function(){return n},e.initialize=function(r,o,a){e.isInitialized()||(t.initialize(r,o,a),function(e,t){if(n=[],e&&Ue(e,(function(e){return i(e)})),t){var r=[];Ue(t,(function(e){e.priority>500&&r.push(e)})),i(r)}}((r||{}).channels,a),Ue(n,(function(e){return an(new Qt(e,r,o),a)})))}})),r}return A(t,e),t._staticInit=(He(n=t.prototype,"ChannelControls",n.getChannelControls),void He(n,"channelQueue",n.getChannelControls)),t;var n}(tn)}));function gn(e,t){var n=yn[Mn]||Bn[Mn];return n||(n=yn[Mn]=yn(e,t),Bn[Mn]=n),n}function mn(e){return!e||e.isEnabled()}function vn(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var r=t.cookieCfg;n=r[Mn]?r[Mn]:yn(t)}return n||(n=gn(t,(e||{}).logger)),n}function yn(e,t){var n=function(e){var t=e.cookieCfg=e.cookieCfg||{};if(Ke(t,"domain",e.cookieDomain,Ce,Ie),Ke(t,"path",e.cookiePath||"/",null,Ie),Ie(t[An])){var n=void 0;we(e[Nn])||(n=!e[Nn]),we(e[Rn])||(n=!e[Rn]),t[An]=n}return t}(e||Bn),r=n.path||"/",i=n.domain,o=!1!==n[An],a={isEnabled:function(){var e=o&&xn(t),n=Bn[Mn];return e&&n&&a!==n&&(e=mn(n)),e},setEnabled:function(e){o=!1!==e},set:function(e,t,o,s,c){if(mn(a)){var u={},l=Ve(t||Ln),d=l.indexOf(";");if(-1!==d&&(l=Ve(t.substring(0,d)),u=wn(t.substring(d+1))),Ke(u,"domain",s||i,Xe,we),!Ie(o)){var f=yt();if(we(u[kn])){var p=ze()+1e3*o;if(p>0){var h=new Date;h.setTime(p),Ke(u,kn,In(h,f?En:Pn)||In(h,f?En:Pn)||Ln,Xe)}}f||Ke(u,"max-age",Ln+o,null,we)}var g=ht();g&&"https:"===g.protocol&&(Ke(u,"secure",null,null,we),null===Fn&&(Fn=!Sn((pt()||{}).userAgent)),Fn&&Ke(u,"SameSite","None",null,we)),Ke(u,"path",c||r,null,we),(n.setCookie||bn)(e,Cn(l,u))}},get:function(e){var t=Ln;return mn(a)&&(t=(n.getCookie||Tn)(e)),t},del:function(e,t){mn(a)&&a.purge(e,t)},purge:function(e,r){if(xn(t)){var i=((o={}).path=r||"/",o[kn]="Thu, 01 Jan 1970 00:00:01 GMT",o);yt()||(i["max-age"]="0"),(n.delCookie||bn)(e,Cn(Ln,i))}var o}};return a[Mn]=a,a}function xn(e){if(null===Dn){Dn=!1;try{Dn=void 0!==(On||{})[_n]}catch(t){e&&e.throwInternal(he.WARNING,ge.CannotAccessCookie,"Cannot access document.cookie - "+Ge(t),{exception:wt(t)})}}return Dn}function wn(e){var t={};return e&&e.length&&Ue(Ve(e).split(";"),(function(e){if(e=Ve(e||Ln)){var n=e.indexOf("=");-1===n?t[e]=null:t[Ve(e.substring(0,n))]=Ve(e.substring(n+1))}})),t}function In(e,t){return Se(e[t])?e[t]():null}function Cn(e,t){var n=e||Ln;return _e(t,(function(e,t){n+="; "+e+(Ie(t)?Ln:"="+t)})),n}function Tn(e){var t=Ln;if(On){var n=On[_n]||Ln;Un!==n&&(jn=wn(n),Un=n),t=Ve(jn[e]||Ln)}return t}function bn(e,t){On&&(On[_n]=e+"="+t)}function Sn(e){return!!Me(e)&&!!(ke(e,"CPU iPhone OS 12")||ke(e,"iPad; CPU OS 12")||ke(e,"Macintosh; Intel Mac OS X 10_14")&&ke(e,"Version/")&&ke(e,"Safari")||ke(e,"Macintosh; Intel Mac OS X 10_14")&&function(e,t){if(e){var n=t.length,r=e.length;if(e===t)return!0;if(r>=n){for(var i=r-1,o=n-1;o>=0;o--){if(e[i]!=t[o])return!1;i--}return!0}}return!1}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||ke(e,"Chrome/5")||ke(e,"Chrome/6")||ke(e,"UnrealEngine")&&!ke(e,"Chrome")||ke(e,"UCBrowser/12")||ke(e,"UCBrowser/11"))}var En,Pn,_n,kn,An,Nn,Rn,Mn,Ln,Dn,Fn,Un,On,jn,Bn,Vn,qn,Hn,zn,Gn=C((()=>{ve(),Ut(),st(),En="toGMTString",Pn="toUTCString",_n="cookie",kn="expires",An="enabled",Nn="isCookieUseDisabled",Rn="disableCookiesUsage",Mn="_ckMgr",Ln="",Dn=null,Fn=null,Un=null,On=ft(),jn={},Bn={}})),Kn=C((()=>{F(),me(),hn(),nn(),pn(),$t(),Gn(),st(),rn(),Vn="_notificationManager",qn=function e(){var t,n,r,i,o,a=!1;pe(e,this,(function(e){e._extensions=new Array,n=new fn,e.logger=_({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),t=[],e.isInitialized=function(){return a},e.initialize=function(t,i,o,s){e.isInitialized()&&Je("Core should not be initialized more than once"),(!t||Ie(t.instrumentationKey))&&Je("Please provide instrumentation key"),r=s,e[Vn]=s,e.config=t||{},t.extensions=Ie(t.extensions)?[]:t.extensions,We(t,Yt).NotificationManager=s,o&&(e.logger=o);var c=[];c.push.apply(c,i.concat(t.extensions)),c=sn(c);var u=[],l=[],d={};Ue(c,(function(e){(Ie(e)||Ie(e.initialize))&&Je("Extensions must provide callback to initialize");var t=e.priority,r=e.identifier;e&&t&&(Ie(d[t])?d[t]=r:o.warnToConsole("Two extensions have same priority #"+t+" - "+d[t]+", "+r)),!t||t<n.priority?u.push(e):l.push(e)})),c.push(n),u.push(n),c=sn(c),e._extensions=c,an(new Qt([n],t,e),c),an(new Qt(u,t,e),c),e._extensions=u,0===e.getTransmissionControls().length&&Je("No channels available"),a=!0,e.releaseQueue()},e.getTransmissionControls=function(){return n.getChannelControls()},e.track=function(n){Ke(n,Zt,e.config.instrumentationKey,null,$e),Ke(n,"time",Fe(new Date),null,$e),Ke(n,"ver","4.0",null,Ie),e.isInitialized()?e.getProcessTelContext().processNext(n):t.push(n)},e.getProcessTelContext=function(){var t=e._extensions,r=t;return(!t||0===t.length)&&(r=[n]),new Qt(r,e.config,e)},e.getNotifyMgr=function(){return r||(r=_({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),e[Vn]=r),r},e.getCookieMgr=function(){return o||(o=yn(e.config,e.logger)),o},e.setCookieMgr=function(e){o=e},e.getPerfMgr=function(){return i||e.config&&e.config.enablePerfMgr&&(i=new Gt(e.getNotifyMgr())),i},e.setPerfMgr=function(e){i=e},e.eventCnt=function(){return t.length},e.releaseQueue=function(){t.length>0&&(Ue(t,(function(t){e.getProcessTelContext().processNext(t)})),t=[])}}))}})),Wn=C((()=>{me(),st(),Hn=function e(t){this.listeners=[];var n=!!(t||{}).perfEvtsSendAll;pe(e,this,(function(e){e.addNotificationListener=function(t){e.listeners.push(t)},e.removeNotificationListener=function(t){for(var n=Oe(e.listeners,t);n>-1;)e.listeners.splice(n,1),n=Oe(e.listeners,t)},e.eventsSent=function(t){Ue(e.listeners,(function(e){e&&e.eventsSent&&setTimeout((function(){return e.eventsSent(t)}),0)}))},e.eventsDiscarded=function(t,n){Ue(e.listeners,(function(e){e&&e.eventsDiscarded&&setTimeout((function(){return e.eventsDiscarded(t,n)}),0)}))},e.eventsSendRequest=function(t,n){Ue(e.listeners,(function(e){if(e&&e.eventsSendRequest)if(n)setTimeout((function(){return e.eventsSendRequest(t,n)}),0);else try{e.eventsSendRequest(t,n)}catch(e){}}))},e.perfEvent=function(t){t&&(n||!t.isChildEvt())&&Ue(e.listeners,(function(e){if(e&&e.perfEvent)if(t.isAsync)setTimeout((function(){return e.perfEvent(t)}),0);else try{e.perfEvent(t)}catch(e){}}))}}))}})),$n=C((()=>{F(),Kn(),b(),Wn(),$t(),qt(),me(),st(),zn=function(e){function t(){var n=e.call(this)||this;return pe(t,n,(function(e,t){function n(t){var n=e.getNotifyMgr();n&&n.eventsDiscarded([t],r.InvalidEvent)}e.initialize=function(e,n,r,i){t.initialize(e,n,r||new Vt(e),i||new Hn(e))},e.track=function(r){Ht(e.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){null===r&&(n(r),Je("Invalid telemetry item")),function(e){if(Ie(e.name))throw n(e),Error("telemetry name required")}(r),t.track(r)}),(function(){return{item:r}}),!r.sync)},e.addNotificationListener=function(t){var n=e.getNotifyMgr();n&&n.addNotificationListener(t)},e.removeNotificationListener=function(t){var n=e.getNotifyMgr();n&&n.removeNotificationListener(t)},e.pollInternalLogs=function(t){var n=e.config.diagnosticLogInterval;return(!n||!(n>0))&&(n=1e4),setInterval((function(){var n=e.logger?e.logger.queue:[];Ue(n,(function(n){var r={name:t||"InternalMessageId: "+n.messageId,iKey:e.config.instrumentationKey,time:Fe(new Date),baseType:Bt.dataType,baseData:{message:n.message}};e.track(r)})),n.length=0}),n)}})),n}return A(t,e),t}(qn)}));function Xn(e){e<0&&(e>>>=0),ir=123456789+e&nr,or=987654321-e&nr,rr=!0}function Jn(){try{var e=2147483647&ze();Xn((Math.random()*tr^e)+e)}catch(e){}}function Qn(e){return e>0?Math.floor(Zn()/nr*(e+1))>>>0:0}function Zn(e){var t,n=ct(kt)||ct(At);return n&&n.getRandomValues?t=n.getRandomValues(new Uint32Array(1))[0]&nr:yt()?(rr||Jn(),t=er()&nr):t=Math.floor(tr*Math.random()|0),e||(t>>>=0),t}function Yn(e){e?Xn(e):Jn()}function er(e){var t=((or=36969*(65535&or)+(or>>16)&nr)<<16)+(65535&(ir=18e3*(65535&ir)+(ir>>16)&nr))>>>0&nr|0;return e||(t>>>=0),t}var tr,nr,rr,ir,or,ar=C((()=>{Ut(),st(),tr=4294967296,nr=4294967295,rr=!1,ir=123456789,or=987654321}));function sr(e,t){var n=!1,r=lt();r&&(n=Ee(r,e,t),n=Ee(r.body,e,t)||n);var i=ft();return i&&(n=Cr.Attach(i,e,t)||n),n}function cr(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Ir,(function(e){var t=0|Qn(15);return("x"===e?t:3&t|8).toString(16)}))}function ur(){var e=gt();return e&&e.now?e.now():ze()}function lr(e){void 0===e&&(e=22);for(var t=Zn()>>>0,n=0,r="";r.length<e;)n++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&t),t>>>=6,5===n&&(t=(Zn()<<2&4294967295|3&t)>>>0,n=0);return r}function dr(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=Zn())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+(3&Zn())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}function fr(e,t){var n=gn(e,t),r=wr._canUseCookies;return null===yr&&(yr=[],xr=r,He(wr,"_canUseCookies",(function(){return xr}),(function(e){xr=e,Ue(yr,(function(t){t.setEnabled(e)}))}))),-1===Oe(yr,n)&&yr.push(n),De(r)&&n.setEnabled(r),De(xr)&&n.setEnabled(xr),n}function pr(){fr().setEnabled(!1)}function hr(e){return fr(null,e).isEnabled()}function gr(e,t){return fr(null,e).get(t)}function mr(e,t,n,r){fr(null,e).set(t,n,null,r)}function vr(e,t){return fr(null,e).del(t)}var yr,xr,wr,Ir,Cr,Tr=C((()=>{F(),Gn(),Ut(),st(),ar(),yr=null,wr={_canUseCookies:void 0,isTypeof:xe,isUndefined:we,isNullOrUndefined:Ie,hasOwnProperty:Te,isFunction:Se,isObject:be,isDate:Ae,isArray:Ne,isError:Re,isString:Me,isNumber:Le,isBoolean:De,toISOString:Fe,arrForEach:Ue,arrIndexOf:Oe,arrMap:je,arrReduce:Be,strTrim:Ve,objCreate:_,objKeys:qe,objDefineAccessors:He,addEventHandler:sr,dateNow:ze,isIE:yt,disableCookies:pr,newGuid:cr,perfNow:ur,newId:lr,randomValue:Qn,random32:Zn,mwcRandomSeed:Yn,mwcRandom32:er,generateW3CId:dr},Ir=/[xy]/g,Cr={Attach:Ee,AttachEvent:Ee,Detach:Pe,DetachEvent:Pe}}));function br(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Sr(e,t,n,r,i){i>=0&&i<=2&&br(e,(function(e,o){var a=e.cbks,s=a[kr[i]];if(s){t.ctx=function(){return r[o]=r[o]||{}};try{s.apply(t.inst,n)}catch(e){var c=t.err;try{var u=a[kr[2]];u&&(t.err=e,u.apply(t.inst,n))}catch(e){}finally{t.err=c}}}}))}function Er(e,t,n){var r=null;return e&&(Te(e,t)?r=e:n&&(r=Er(function(e){if(e){if(Rr)return Rr(e);var t=e[Ar]||e[s]||e[Nr];if(t)return t}return null}(e),t,!1))),r}function Pr(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var o=Er(e,t,r);if(o){var a=o[t];if(typeof a===i){var s=a[_r];if(!s){var c=function(e){return function(){var t=this,n=arguments,r=e.h,i={name:e.n,inst:t,ctx:null,set:c},o=[],a=s([i],n);function s(e,t){return br(t,(function(t){e.push(t)})),e}function c(e,t){(n=s([],n))[e]=t,a=s([i],n)}Sr(r,i,a,o,0);var u=e.f;try{i.rslt=u.apply(t,n)}catch(e){throw i.err=e,Sr(r,i,a,o,3),e}return Sr(r,i,a,o,1),i.rslt}}(s={i:0,n:t,f:a,h:[]});c[_r]=s,o[t]=c}var u={id:s.i,cbks:n,rm:function(){var e=this.id;br(s.h,(function(t,n){if(t.id===e)return s.h.splice(n,1),1}))}};return s.i++,s.h.push(u),u}}}return null}var _r,kr,Ar,Nr,Rr,Mr,Lr=C((()=>{F(),st(),_r="_aiHooks",kr=["req","rsp","hkErr","fnErr"],Ar="__proto__",Nr="constructor",Rr=Object.getPrototypeOf})),Dr=C((()=>{$n(),Kn(),on(),ar(),Tr(),st(),Ut(),F(),Wn(),$t(),qt(),ve(),Lr(),Gn()})),Fr=C((()=>{Mr={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"}}));function Ur(e,t,n){var r=t.length,i=Or(e,t);if(i.length!==r){for(var o=0,a=i;void 0!==n[a];)o++,a=i.substring(0,147)+Wr(o);i=a}return i}function Or(e,t){var n;return t&&(t=Ve(t.toString())).length>150&&(n=t.substring(0,150),e.throwInternal(he.WARNING,ge.NameTooLong,"name is too long.  It has been truncated to 150 characters.",{name:t},!0)),n||t}function jr(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=Ve(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(he.WARNING,ge.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function Br(e,t){return Kr(e,t,2048,ge.UrlTooLong)}function Vr(e,t){var n;return t&&t.length>32768&&(n=t.substring(0,32768),e.throwInternal(he.WARNING,ge.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:t},!0)),n||t}function qr(e,t){var n;if(t){var r=""+t;r.length>32768&&(n=r.substring(0,32768),e.throwInternal(he.WARNING,ge.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:t},!0))}return n||t}function Hr(e,t){if(t){var n={};_e(t,(function(t,r){if(be(r)&&mt())try{r=vt().stringify(r)}catch(t){e.throwInternal(he.WARNING,ge.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}r=jr(e,r,8192),t=Ur(e,t,n),n[t]=r})),t=n}return t}function zr(e,t){if(t){var n={};_e(t,(function(t,r){t=Ur(e,t,n),n[t]=r})),t=n}return t}function Gr(e,t){return t&&Kr(e,t,128,ge.IdTooLong).toString()}function Kr(e,t,n,r){var i;return t&&(t=Ve(t)).length>n&&(i=t.substring(0,n),e.throwInternal(he.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t}function Wr(e){var t="00"+e;return t.substr(t.length-3)}var $r,Xr=C((()=>{Dr(),$r={MAX_NAME_LENGTH:150,MAX_ID_LENGTH:128,MAX_PROPERTY_LENGTH:8192,MAX_STRING_LENGTH:1024,MAX_URL_LENGTH:2048,MAX_MESSAGE_LENGTH:32768,MAX_EXCEPTION_LENGTH:32768,sanitizeKeyAndAddUniqueness:Ur,sanitizeKey:Or,sanitizeString:jr,sanitizeUrl:Br,sanitizeMessage:Vr,sanitizeException:qr,sanitizeProperties:Hr,sanitizeMeasurements:zr,sanitizeId:Gr,sanitizeInput:Kr,padNumber:Wr,trim:Ve}}));function Jr(e){var t=null;if(Se(Event))t=new Event(e);else{var n=ft();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t}var Qr=C((()=>{Dr()}));function Zr(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()}function Yr(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(o>0?o+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t}function ei(){var e=pt();return"sendBeacon"in e&&e.sendBeacon}function ti(e,t){var n=null;return Ue(e,(function(e){if(e.identifier===t)return n=e,-1})),n}function ni(e,t,n,r,i){return!i&&Me(e)&&("Script error."===e||"Script error"===e)}var ri,ii,oi,ai,si,ci,ui,li,di=C((()=>{Dr()})),fi=C((()=>{ri="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",ii="sampleRate",oi="ProcessLegacy",ai="http.method",si="https://dc.services.visualstudio.com",ci="not_specified"})),pi=C((()=>{var e;(e=ui||(ui={}))[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",function(e){e[e.AI=0]="AI",e[e.AI_AND_W3C=1]="AI_AND_W3C",e[e.W3C=2]="W3C"}(li||(li={}))}));function hi(){return yi()?gi(ui.LocalStorage):null}function gi(e){try{if(Ie(E()))return null;var t=new Date,n=ct(e===ui.LocalStorage?"localStorage":"sessionStorage");n.setItem(t.toString(),t.toString());var r=n.getItem(t.toString())!==t.toString();if(n.removeItem(t.toString()),!r)return n}catch(e){}return null}function mi(){return Ci()?gi(ui.SessionStorage):null}function vi(){Pi=!1,_i=!1}function yi(){return void 0===Pi&&(Pi=!!gi(ui.LocalStorage)),Pi}function xi(e,t){var n=hi();if(null!==n)try{return n.getItem(t)}catch(t){Pi=!1,e.throwInternal(he.WARNING,ge.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+Ge(t),{exception:wt(t)})}return null}function wi(e,t,n){var r=hi();if(null!==r)try{return r.setItem(t,n),!0}catch(t){Pi=!1,e.throwInternal(he.WARNING,ge.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+Ge(t),{exception:wt(t)})}return!1}function Ii(e,t){var n=hi();if(null!==n)try{return n.removeItem(t),!0}catch(t){Pi=!1,e.throwInternal(he.WARNING,ge.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+Ge(t),{exception:wt(t)})}return!1}function Ci(){return void 0===_i&&(_i=!!gi(ui.SessionStorage)),_i}function Ti(){var e=[];return Ci()&&_e(ct("sessionStorage"),(function(t){e.push(t)})),e}function bi(e,t){var n=mi();if(null!==n)try{return n.getItem(t)}catch(t){_i=!1,e.throwInternal(he.WARNING,ge.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+Ge(t),{exception:wt(t)})}return null}function Si(e,t,n){var r=mi();if(null!==r)try{return r.setItem(t,n),!0}catch(t){_i=!1,e.throwInternal(he.WARNING,ge.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+Ge(t),{exception:wt(t)})}return!1}function Ei(e,t){var n=mi();if(null!==n)try{return n.removeItem(t),!0}catch(t){_i=!1,e.throwInternal(he.WARNING,ge.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+Ge(t),{exception:wt(t)})}return!1}var Pi,_i,ki=C((()=>{Dr(),pi(),Pi=void 0,_i=void 0}));function Ai(e){var t=Ui,n=Oi,r=n[t];return Fi.createElement?n[t]||(r=n[t]=Fi.createElement("a")):r={host:Li(e,!0)},r.href=e,++t>=n.length&&(t=0),Ui=t,r}function Ni(e){var t,n=Ai(e);return n&&(t=n.href),t}function Ri(e){var t,n=Ai(e);return n&&(t=n.pathname),t}function Mi(e,t){return e?e.toUpperCase()+" "+t:t}function Li(e,t){var n=Di(e,t)||"";if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&r.length>3&&Me(r[2])&&r[2].length>0)return r[2]+(r[3]||"")}return n}function Di(e,t){var n=null;if(e){var r=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&r.length>2&&Me(r[2])&&r[2].length>0&&(n=r[2]||"",t&&r.length>2)){var i=(r[1]||"").toLowerCase(),o=r[3]||"";("http"===i&&":80"===o||"https"===i&&":443"===o)&&(o=""),n+=o}}return n}var Fi,Ui,Oi,ji=C((()=>{Dr(),Fi=ft()||{},Ui=0,Oi=[null,null,null,null,null]}));function Bi(e){return-1!==Hi.indexOf(e.toLowerCase())}function Vi(){var e=gt();if(e&&e.now&&e.timing){var t=e.now()+e.timing.navigationStart;if(t>0)return t}return ze()}function qi(e,t){var n=null;return 0!==e&&0!==t&&!Ie(e)&&!Ie(t)&&(n=t-e),n}var Hi,zi,Gi,Ki,Wi,$i=C((()=>{Dr(),Fr(),Xr(),Qr(),di(),fi(),ki(),ji(),Hi=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],zi={NotSpecified:ci,createDomEvent:Jr,disableStorage:vi,isInternalApplicationInsightsEndpoint:Bi,canUseLocalStorage:yi,getStorage:xi,setStorage:wi,removeStorage:Ii,canUseSessionStorage:Ci,getSessionStorageKeys:Ti,getSessionStorage:bi,setSessionStorage:Si,removeSessionStorage:Ei,disableCookies:pr,canUseCookies:hr,disallowsSameSiteNone:Sn,setCookie:mr,stringToBoolOrDefault:Zr,getCookie:gr,deleteCookie:vr,trim:Ve,newId:lr,random32:function(){return Zn(!0)},generateW3CId:dr,isArray:Ne,isError:Re,isDate:Ae,toISOStringForIE8:Fe,getIEVersion:xt,msToTimeSpan:Yr,isCrossOriginError:ni,dump:wt,getExceptionName:Ge,addEventHandler:Ee,IsBeaconApiSupported:ei,getExtension:ti},Gi={parseUrl:Ai,getAbsoluteUrl:Ni,getPathName:Ri,getCompleteUrl:Mi,parseHost:Li,parseFullHost:Di},Ki={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var i=Ai(t).host.toLowerCase();if(i&&(-1!==i.indexOf(":443")||-1!==i.indexOf(":80"))&&(i=(Di(t,!0)||"").toLowerCase()),(!e||!e.enableCorsCorrelation)&&i&&i!==n)return!1;var o,a=e&&e.correlationHeaderDomains;if(a&&(Ue(a,(function(e){var t=new RegExp(e.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));o=o||t.test(i)})),!o))return!1;var s=e&&e.correlationHeaderExcludedDomains;if(!s||0===s.length)return!0;for(r=0;r<s.length;r++)if(new RegExp(s[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")).test(i))return!1;return i&&i.length>0},getCorrelationContext:function(e){if(e){var t=Ki.getCorrelationContextValue(e,Mr.requestContextTargetKey);if(t&&t!==Ki.correlationIdPrefix)return t}},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}}},Wi={Now:Vi,GetDuration:qi}}));function Xi(e){if(!e)return{};var t=Be(e.split(Ji),(function(e,t){var n=t.split(Qi);if(2===n.length){var r=n[0].toLowerCase(),i=n[1];e[r]=i}return e}),{});if(qe(t).length>0){if(t.endpointsuffix){var n=t.location?t.location+".":"";t.ingestionendpoint=t.ingestionendpoint||"https://"+n+"dc."+t.endpointsuffix}t.ingestionendpoint=t.ingestionendpoint||si}return t}var Ji,Qi,Zi,Yi,eo,to,no,ro,io,oo,ao,so,co=C((()=>{fi(),Dr(),Ji=";",Qi="=",Zi={parse:Xi}})),uo=C((()=>{Yi=function(){}})),lo=C((()=>{F(),uo(),eo=function(e){function t(){return e.call(this)||this}return A(t,e),t}(Yi)})),fo=C((()=>{to=function(){this.ver=1,this.sampleRate=100,this.tags={}}})),po=C((()=>{F(),fo(),Xr(),Dr(),fi(),no=function(e){function t(t,n,r){var i=e.call(this)||this;return i.name=jr(t,r)||ci,i.data=n,i.time=Fe(new Date),i.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===i.sampleRate?4:1},tags:1,data:1},i}return A(t,e),t}(to)})),ho=C((()=>{ro=function(){this.ver=2,this.properties={},this.measurements={}}})),go=C((()=>{F(),ho(),Xr(),fi(),io=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.aiDataContract={ver:1,name:1,properties:0,measurements:0},o.name=jr(t,n)||ci,o.properties=Hr(t,r),o.measurements=zr(t,i),o}return A(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t}(ro)})),mo=C((()=>{oo=function(){}})),vo=C((()=>{ao=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}})),yo=C((()=>{so=function(){this.hasFullStack=!0,this.parsedStack=[]}}));function xo(e,t){var n=e;return n&&!Me(n)&&(JSON&&JSON.stringify?(n=JSON.stringify(e),t&&(!n||"{}"===n)&&(n=Se(e.toString)?e.toString():""+e)):n=e+" - (Missing JSON.stringify)"),n||""}function wo(e,t){var n=e;return e&&((n=e[Ao]||e[No]||"")&&!Me(n)&&(n=xo(n,!0)),e.filename&&(n=n+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),t&&"String"!==t&&"Object"!==t&&"Error"!==t&&-1===(n||"").indexOf(t)&&(n=t+": "+n),n||""}function Io(e){return e&&e.src&&Me(e.src)&&e.obj&&Ne(e.obj)}function Co(e){var t=e||"";Me(t)||(t=Me(t[Po])?t[Po]:""+t);var n=t.split("\n");return{src:t,obj:n}}function To(e){var t=null;if(e)try{if(e[Po])t=Co(e[Po]);else if(e[Eo]&&e[Eo][Po])t=Co(e[Eo][Po]);else if(e.exception&&e.exception[Po])t=Co(e.exception[Po]);else if(Io(e))t=e;else if(Io(e[_o]))t=e[_o];else if(window.opera&&e[Ao])t=function(e){for(var t=[],n=e.split("\n"),r=0;r<n.length;r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),t.push(i)}return{src:e,obj:t}}(e.message);else if(Me(e))t=Co(e);else{var n=e[Ao]||e[No]||"";Me(e[ko])&&(n&&(n+="\n"),n+=" from "+e[ko]),n&&(t=Co(n))}}catch(e){t=Co(e)}return t||{src:"",obj:null}}function bo(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,200})\(/.exec(e.constructor.toString());t=n&&n.length>1?n[1]:""}catch(e){}return t}function So(e){if(e)try{if(!Me(e)){var t=bo(e),n=xo(e,!1);return(!n||"{}"===n)&&(e[Eo]&&(t=bo(e=e[Eo])),n=xo(e,!0)),0!==n.indexOf(t)&&"String"!==t?t+":"+n:n}}catch(e){}return""+(e||"")}var Eo,Po,_o,ko,Ao,No,Ro,Mo,Lo,Do,Fo,Uo,Oo,jo,Bo,Vo,qo,Ho,zo,Go,Ko,Wo,$o,Xo,Jo,Qo=C((()=>{F(),mo(),vo(),yo(),Xr(),Dr(),fi(),Eo="error",Po="stack",_o="stackDetails",ko="errorSrc",Ao="message",No="description",Ro=function(e){function t(t,n,r,i,o,a){var s=e.call(this)||this;return s.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){return!!be(e)&&"ver"in e&&"exceptions"in e&&"properties"in e}(n)?(s.exceptions=n.exceptions,s.properties=n.properties,s.measurements=n.measurements,n.severityLevel&&(s.severityLevel=n.severityLevel),n.id&&(s.id=n.id),n.problemGroup&&(s.problemGroup=n.problemGroup),s.ver=2,Ie(n.isManual)||(s.isManual=n.isManual)):(r||(r={}),s.exceptions=[new Mo(t,n,r)],s.properties=Hr(t,r),s.measurements=zr(t,i),o&&(s.severityLevel=o),a&&(s.id=a)),s}return A(t,e),t.CreateAutoException=function(e,t,n,r,i,o,a,s){var c=bo(i||o||e);return{message:wo(e,c),url:t,lineNumber:n,columnNumber:r,error:So(i||o||e),evt:So(o||e),typeName:c,stackDetails:To(a||i||o),errorSrc:s}},t.CreateFromInterface=function(e,n,r,i){var o=n.exceptions&&je(n.exceptions,(function(t){return Mo.CreateFromInterface(e,t)}));return new t(e,R({},n,{exceptions:o}),r,i)},t.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,o=(e.ver,e.problemGroup),a=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&je(t,(function(e){return e.toInterface()}))||void 0,severityLevel:i,properties:n,measurements:r,problemGroup:o,id:a,isManual:s}},t.CreateSimpleException=function(e,t,n,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=So,t}(ao),Mo=function(e){function t(t,n,r){var i=e.call(this)||this;if(i.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){return!!be(e)&&"hasFullStack"in e&&"typeName"in e}(n))i.typeName=n.typeName,i.message=n.message,i[Po]=n[Po],i.parsedStack=n.parsedStack,i.hasFullStack=n.hasFullStack;else{var o=n,a=o&&o.evt;Re(o)||(o=o[Eo]||a||o),i.typeName=jr(t,bo(o))||ci,i.message=Vr(t,wo(n||o,i.typeName))||ci;var s=n[_o]||To(n);i.parsedStack=function(e){var t,n=e.obj;if(n&&n.length>0){t=[];var r=0,i=0;if(Ue(n,(function(e){var n=e.toString();if(Lo.regex.test(n)){var o=new Lo(n,r++);i+=o.sizeInBytes,t.push(o)}})),i>32768)for(var o=0,a=t.length-1,s=0,c=o,u=a;o<a;){if((s+=t[o].sizeInBytes+t[a].sizeInBytes)>32768){var l=u-c+1;t.splice(c,l);break}c=o,u=a,o++,a--}}return t}(s),i[Po]=qr(t,function(e){var t="";return e&&(e.obj?Ue(e.obj,(function(e){t+=e+"\n"})):t=e.src||""),t}(s)),i.hasFullStack=Ne(i.parsedStack)&&i.parsedStack.length>0,r&&(r.typeName=r.typeName||i.typeName)}return i}return A(t,e),t.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&je(this.parsedStack,(function(e){return e.toInterface()}));return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this[Po],parsedStack:e||void 0}},t.CreateFromInterface=function(e,n){var r=n.parsedStack instanceof Array&&je(n.parsedStack,(function(e){return Lo.CreateFromInterface(e)}))||n.parsedStack;return new t(e,R({},n,{parsedStack:r}))},t}(so),Lo=function(e){function t(n,r){var i=e.call(this)||this;if(i.sizeInBytes=0,i.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof n){var o=n;i.level=r,i.method="<no_method>",i.assembly=Ve(o),i.fileName="",i.line=0;var a=o.match(t.regex);a&&a.length>=5&&(i.method=Ve(a[2])||i.method,i.fileName=Ve(a[4]),i.line=parseInt(a[5])||0)}else i.level=n.level,i.method=n.method,i.assembly=n.assembly,i.fileName=n.fileName,i.line=n.line,i.sizeInBytes=0;return i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=t.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}return A(t,e),t.CreateFromInterface=function(e){return new t(e,null)},t.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},t.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,t.baseSize=58,t}(oo)})),Zo=C((()=>{Do=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}})),Yo=C((()=>{var e;(e=Fo||(Fo={}))[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"})),ea=C((()=>{Yo(),Uo=function(){this.kind=Fo.Measurement}})),ta=C((()=>{F(),ea(),Oo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},t}return A(t,e),t}(Uo)})),na=C((()=>{F(),Zo(),Xr(),ta(),fi(),jo=function(e){function t(t,n,r,i,o,a,s,c){var u=e.call(this)||this;u.aiDataContract={ver:1,metrics:1,properties:0};var l=new Oo;return l.count=i>0?i:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(o)||null===o?void 0:o,l.name=jr(t,n)||ci,l.value=r,u.metrics=[l],u.properties=Hr(t,s),u.measurements=zr(t,c),u}return A(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t}(Do)})),ra=C((()=>{F(),ho(),Bo=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return A(t,e),t}(ro)})),ia=C((()=>{F(),ra(),Xr(),di(),fi(),Vo=function(e){function t(t,n,r,i,o,a,s){var c=e.call(this)||this;return c.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},c.id=Gr(t,s),c.url=Br(t,r),c.name=jr(t,n)||ci,isNaN(i)||(c.duration=Yr(i)),c.properties=Hr(t,o),c.measurements=zr(t,a),c}return A(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t}(Bo)})),oa=C((()=>{qo=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}})),aa=C((()=>{F(),Xr(),$i(),oa(),di(),Ho=function(e){function t(t,n,r,i,o,a,s,c,u,l,d,f){void 0===u&&(u="Ajax");var p=e.call(this)||this;p.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},p.id=n,p.duration=Yr(o),p.success=a,p.resultCode=s+"",p.type=jr(t,u);var h=function(e,t,n,r){var i,o=r,a=r;if(t&&t.length>0){var s=Ai(t);if(i=s.host,!o)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),a=s.pathname,o=jr(e,n?n+" "+c:c)}else o=jr(e,t)}else i=r,o=r;return{target:i,name:o,data:a}}(t,r,c,i);return p.data=Br(t,i)||h.data,p.target=jr(t,h.target),l&&(p.target=p.target+" | "+l),p.name=jr(t,h.name),p.properties=Hr(t,d),p.measurements=zr(t,f),p}return A(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t}(qo)})),sa=C((()=>{zo=function(){this.ver=2,this.properties={},this.measurements={}}})),ca=C((()=>{F(),sa(),Xr(),fi(),Go=function(e){function t(t,n,r,i,o){var a=e.call(this)||this;return a.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},n=n||ci,a.message=Vr(t,n),a.properties=Hr(t,i),a.measurements=zr(t,o),r&&(a.severityLevel=r),a}return A(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t}(zo)})),ua=C((()=>{F(),ra(),Ko=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return A(t,e),t}(Bo)})),la=C((()=>{F(),ua(),Xr(),fi(),Wo=function(e){function t(t,n,r,i,o,a,s){var c=e.call(this)||this;return c.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},c.url=Br(t,r),c.name=jr(t,n)||ci,c.properties=Hr(t,o),c.measurements=zr(t,a),s&&(c.domProcessing=s.domProcessing,c.duration=s.duration,c.networkConnect=s.networkConnect,c.perfTotal=s.perfTotal,c.receivedResponse=s.receivedResponse,c.sentRequest=s.sentRequest),c}return A(t,e),t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t}(Ko)})),da=C((()=>{F(),lo(),$o=function(e){function t(t,n){var r=e.call(this)||this;return r.aiDataContract={baseType:1,baseData:1},r.baseType=t,r.baseData=n,r}return A(t,e),t}(eo)})),fa=C((()=>{var e;(e=Xo||(Xo={}))[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"})),pa=C((()=>{Dr(),Jo=function(){function e(){}return e.getConfig=function(e,t,n,r){var i;return void 0===r&&(r=!1),i=n&&e.extensionConfig&&e.extensionConfig[n]&&!Ie(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],Ie(i)?r:i},e}()}));function ha(e){var t="ai."+e+".";return function(e){return t+e}}var ga,ma,va,ya,xa,wa,Ia,Ca,Ta,ba,Sa,Ea,Pa,_a,ka,Aa,Na,Ra,Ma,La=C((()=>{var e;F(),Dr(),ga=ha("application"),ma=ha("device"),va=ha("location"),ya=ha("operation"),xa=ha("session"),wa=ha("user"),Ia=ha("cloud"),Ca=ha("internal"),Ta=function(e){function t(){return e.call(this)||this}return A(t,e),t}((e={applicationVersion:ga("ver"),applicationBuild:ga("build"),applicationTypeId:ga("typeId"),applicationId:ga("applicationId"),applicationLayer:ga("layer"),deviceId:ma("id"),deviceIp:ma("ip"),deviceLanguage:ma("language"),deviceLocale:ma("locale"),deviceModel:ma("model"),deviceFriendlyName:ma("friendlyName"),deviceNetwork:ma("network"),deviceNetworkName:ma("networkName"),deviceOEMName:ma("oemName"),deviceOS:ma("os"),deviceOSVersion:ma("osVersion"),deviceRoleInstance:ma("roleInstance"),deviceRoleName:ma("roleName"),deviceScreenResolution:ma("screenResolution"),deviceType:ma("type"),deviceMachineName:ma("machineName"),deviceVMName:ma("vmName"),deviceBrowser:ma("browser"),deviceBrowserVersion:ma("browserVersion"),locationIp:va("ip"),locationCountry:va("country"),locationProvince:va("province"),locationCity:va("city"),operationId:ya("id"),operationName:ya("name"),operationParentId:ya("parentId"),operationRootId:ya("rootId"),operationSyntheticSource:ya("syntheticSource"),operationCorrelationVector:ya("correlationVector"),sessionId:xa("id"),sessionIsFirst:xa("isFirst"),sessionIsNew:xa("isNew"),userAccountAcquisitionDate:wa("accountAcquisitionDate"),userAccountId:wa("accountId"),userAgent:wa("userAgent"),userId:wa("id"),userStoreRegion:wa("storeRegion"),userAuthUserId:wa("authUserId"),userAnonymousUserAcquisitionDate:wa("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:wa("authUserAcquisitionDate"),cloudName:Ia("name"),cloudRole:Ia("role"),cloudRoleVer:Ia("roleVer"),cloudRoleInstance:Ia("roleInstance"),cloudEnvironment:Ia("environment"),cloudLocation:Ia("location"),cloudDeploymentUnit:Ia("deploymentUnit"),internalNodeName:Ca("nodeName"),internalSdkVersion:Ca("sdkVersion"),internalAgentVersion:Ca("agentVersion"),internalSnippet:Ca("snippet"),internalSdkSrc:Ca("sdkSrc")},function(){var t=this;e&&_e(e,(function(e,n){t[e]=n}))}))})),Da=C((()=>{Xr(),Dr(),fi(),ba=function(){function e(){}return e.create=function(e,t,n,r,i,o){if(n=jr(r,n)||ci,Ie(e)||Ie(t)||Ie(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:Fe(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return Ie(i)||_e(i,(function(e,t){a.data[e]=t})),a},e}()})),Fa=C((()=>{La(),Sa={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},Ea=new Ta})),Ua=C((()=>{$i(),co(),Fr(),fi(),lo(),uo(),po(),go(),Qo(),na(),ia(),ra(),aa(),ca(),la(),da(),fa(),pa(),La(),Xr(),Da(),Fa(),pi(),di(),Qr(),ki(),ji(),Pa="AppInsightsPropertiesPlugin",_a="AppInsightsChannelPlugin",ka="ApplicationInsightsAnalytics"})),Oa=C((()=>{Ua(),Dr(),me(),Aa=function e(t,n,r,i){pe(e,this,(function(e){var o,a=null,s=[],c=!1;function u(){r&&Ue(r.getTransmissionControls(),(function(e){Ue(e,(function(e){return e.flush(!0)}))}))}r&&(o=r.logger),e.trackPageView=function(e,r){var l=e.name;if(Ie(l)||"string"!=typeof l){var d=ft();l=e.name=d&&d.title||""}var f=e.uri;if(Ie(f)||"string"!=typeof f){var p=ht();f=e.uri=p&&p.href||""}if(!i.isPerformanceTimingSupported())return t.sendPageViewInternal(e,r),u(),void o.throwInternal(he.WARNING,ge.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var h,g,m=!1,v=i.getPerformanceTiming().navigationStart;v>0&&(h=qi(v,+new Date),i.shouldCollectDuration(h)||(h=void 0)),!Ie(r)&&!Ie(r.duration)&&(g=r.duration),(n||!isNaN(g))&&(isNaN(g)&&(r||(r={}),r.duration=h),t.sendPageViewInternal(e,r),u(),m=!0),r||(r={}),function(e){s.push(e),a||(a=setInterval((function(){var e=s.slice(0),t=!1;s=[],Ue(e,(function(e){e()?t=!0:s.push(e)})),0===s.length&&(clearInterval(a),a=null),t&&u()}),100))}((function(){var n=!1;try{if(i.isPerformanceTimingDataReady()){n=!0;var a={name:l,uri:f};i.populatePageViewPerformanceEvent(a),a.isValid||m?(m||(r.duration=a.durationMs,t.sendPageViewInternal(e,r)),c||(t.sendPageViewPerformanceInternal(a,r),c=!0)):(r.duration=h,t.sendPageViewInternal(e,r))}else v>0&&qi(v,+new Date)>6e4&&(n=!0,m||(r.duration=6e4,t.sendPageViewInternal(e,r)))}catch(e){o.throwInternal(he.CRITICAL,ge.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+Ge(e),{exception:wt(e)})}return n}))}}))}})),ja=C((()=>{Ua(),Dr(),Na=function(){function e(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}return e.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(e){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+wt(e))}},e.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(e){return this._logger.warnToConsole("Call to restart failed: "+wt(e)),null}},e.prototype.startPageVisitTimer=function(e,t){try{if(Ci()){null!=bi(this._logger,this.prevPageVisitDataKeyName)&&Je("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new Ra(e,t),r=vt().stringify(n);Si(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+wt(e))}},e.prototype.stopPageVisitTimer=function(){try{if(Ci()){var e=ze(),t=bi(this._logger,this.prevPageVisitDataKeyName);if(t&&mt()){var n=vt().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,Ei(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(e){return this._logger.warnToConsole("Stop page visit timer failed: "+wt(e)),null}},e}(),Ra=function(e,t){this.pageVisitStartTime=ze(),this.pageName=e,this.pageUrl=t}})),Ba=C((()=>{Ua(),Dr(),Ma=function(){function e(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}return e.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming(),r=0,i=0,o=0,a=0,s=0;(t||n)&&(t?(r=t.duration,i=0===t.startTime?t.connectEnd:qi(t.startTime,t.connectEnd),o=qi(t.requestStart,t.responseStart),a=qi(t.responseStart,t.responseEnd),s=qi(t.responseEnd,t.loadEventEnd)):(r=qi(n.navigationStart,n.loadEventEnd),i=qi(n.navigationStart,n.connectEnd),o=qi(n.requestStart,n.responseStart),a=qi(n.responseStart,n.responseEnd),s=qi(n.responseEnd,n.loadEventEnd)),0===r?this._logger.throwInternal(he.WARNING,ge.ErrorPVCalc,"error calculating page view performance.",{total:r,network:i,request:o,response:a,dom:s}):this.shouldCollectDuration(r,i,o,a,s)?r<Math.floor(i)+Math.floor(o)+Math.floor(a)+Math.floor(s)?this._logger.throwInternal(he.WARNING,ge.ClientPerformanceMathError,"client performance math error.",{total:r,network:i,request:o,response:a,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=Yr(r),e.networkConnect=Yr(i),e.sentRequest=Yr(o),e.receivedResponse=Yr(a),e.domProcessing=Yr(s),e.isValid=!0):this._logger.throwInternal(he.WARNING,ge.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:o,response:a,dom:s}))},e.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?gt().timing:null},e.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?gt().getEntriesByType("navigation")[0]:null},e.prototype.isPerformanceNavigationTimingSupported=function(){var e=gt();return e&&e.getEntriesByType&&e.getEntriesByType("navigation").length>0},e.prototype.isPerformanceTimingSupported=function(){var e=gt();return e&&e.timing},e.prototype.isPerformanceTimingDataReady=function(){var e=gt(),t=e?e.timing:0;return t&&t.domainLookupStart>0&&t.navigationStart>0&&t.responseStart>0&&t.requestStart>0&&t.loadEventEnd>0&&t.responseEnd>0&&t.connectEnd>0&&t.domLoading>0},e.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=pt()||{},r=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=n.userAgent,o=!1;if(i)for(var a=0;a<r.length;a++)o=o||-1!==i.toLowerCase().indexOf(r[a]);if(o)return!1;for(a=0;a<e.length;a++)if(e[a]<0||e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},e}()}));function Va(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var qa,Ha,za,Ga,Ka,Wa,$a=C((()=>{F(),Ua(),Dr(),Oa(),ja(),Ba(),me(),qa="duration",Ha="event",za=function(e){function t(){var n,r,i,a,s,c=e.call(this)||this;return c.identifier=ka,c.priority=180,c.autoRoutePVDelay=500,pe(t,c,(function(e,u){var l=ht(!0);a=l&&l.href||"",e.getCookieMgr=function(){return vn(e.core)},e.processTelemetry=function(t,n){Ht(e.core,(function(){return e.identifier+":processTelemetry"}),(function(){var r=!1,i=e._telemetryInitializers.length;n=e._getTelCtx(n);for(var o=0;o<i;++o){var a=e._telemetryInitializers[o];if(a)try{if(!1===a.apply(null,[t])){r=!0;break}}catch(e){n.diagLog().throwInternal(he.CRITICAL,ge.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+Ge(e),{exception:wt(e)},!0)}}r||e.processNext(t,n)}),(function(){return{item:t}}),!t.sync)},e.trackEvent=function(t,n){try{var r=ba.create(t,io.dataType,io.envelopeType,e.diagLog(),n);e.core.track(r)}catch(t){e.diagLog().throwInternal(he.WARNING,ge.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+Ge(t),{exception:wt(t)})}},e.startTrackEvent=function(t){try{n.start(t)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+Ge(t),{exception:wt(t)})}},e.stopTrackEvent=function(t,r,i){try{n.stop(t,void 0,r)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+Ge(t),{exception:wt(t)})}},e.trackTrace=function(t,n){try{var r=ba.create(t,Go.dataType,Go.envelopeType,e.diagLog(),n);e.core.track(r)}catch(t){e.diagLog().throwInternal(he.WARNING,ge.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+Ge(t),{exception:wt(t)})}},e.trackMetric=function(t,n){try{var r=ba.create(t,jo.dataType,jo.envelopeType,e.diagLog(),n);e.core.track(r)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.TrackMetricFailed,"trackMetric failed, metric will not be collected: "+Ge(t),{exception:wt(t)})}},e.trackPageView=function(t,n){try{var r=t||{};e._pageViewManager.trackPageView(r,R({},r.properties,r.measurements,n)),e.config.autoTrackPageVisitTime&&e._pageVisitTimeManager.trackPreviousPageVisit(r.name,r.uri)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.TrackPVFailed,"trackPageView failed, page view will not be collected: "+Ge(t),{exception:wt(t)})}},e.sendPageViewInternal=function(t,n,r){var i=ft();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var o=ba.create(t,Vo.dataType,Vo.envelopeType,e.diagLog(),n,r);e.core.track(o)},e.sendPageViewPerformanceInternal=function(t,n,r){var i=ba.create(t,Wo.dataType,Wo.envelopeType,e.diagLog(),n,r);e.core.track(i)},e.trackPageViewPerformance=function(t,n){try{e._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),e.sendPageViewPerformanceInternal(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.TrackPVFailed,"trackPageViewPerformance failed, page view will not be collected: "+Ge(t),{exception:wt(t)})}},e.startTrackPage=function(t){try{if("string"!=typeof t){var n=ft();t=n&&n.title||""}r.start(t)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.StartTrackFailed,"startTrackPage failed, page view may not be collected: "+Ge(t),{exception:wt(t)})}},e.stopTrackPage=function(t,n,i,o){try{if("string"!=typeof t){var a=ft();t=a&&a.title||""}if("string"!=typeof n){var s=ht();n=s&&s.href||""}r.stop(t,n,i,o),e.config.autoTrackPageVisitTime&&e._pageVisitTimeManager.trackPreviousPageVisit(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+Ge(t),{exception:wt(t)})}},e.sendExceptionInternal=function(t,n,r){var i=t.exception||t.error||new Error(ci),o=new Ro(e.diagLog(),i,t.properties||n,t.measurements,t.severityLevel,t.id).toInterface(),a=ba.create(o,Ro.dataType,Ro.envelopeType,e.diagLog(),n,r);e.core.track(a)},e.trackException=function(t,n){try{e.sendExceptionInternal(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.TrackExceptionFailed,"trackException failed, exception will not be collected: "+Ge(t),{exception:wt(t)})}},e._onerror=function(t){var n=t&&t.error,r=t&&t.evt;try{if(!r){var i=lt();i&&(r=i[Ha])}var o=t&&t.url||(ft()||{}).URL,a=t.errorSrc||"window.onerror@"+o+":"+(t.lineNumber||0)+":"+(t.columnNumber||0),s={errorSrc:a,url:o,lineNumber:t.lineNumber||0,columnNumber:t.columnNumber||0,message:t.message};ni(t.message,t.url,t.lineNumber,t.columnNumber,t.error)?function(t,n){var r=ba.create(t,Ro.dataType,Ro.envelopeType,e.diagLog(),n);e.core.track(r)}(Ro.CreateAutoException("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",o,t.lineNumber||0,t.columnNumber||0,n,r,null,a),s):(t.errorSrc||(t.errorSrc=a),e.trackException({exception:t,severityLevel:Xo.Error},s))}catch(t){var c=n?n.name+", "+n.message:"null";e.diagLog().throwInternal(he.CRITICAL,ge.ExceptionWhileLoggingError,"_onError threw exception while logging error, error will not be collected: "+Ge(t),{exception:wt(t),errorString:c})}},e.addTelemetryInitializer=function(t){e._telemetryInitializers.push(t)},e.initialize=function(l,d,f,p){if(!e.isInitialized()){if(Ie(d))throw Error("Error initializing");u.initialize(l,d,f,p),e.setInitialized(!1);var h=e._getTelCtx(),g=e.identifier;e.config=h.getExtCfg(g);var m=t.getDefaultConfig(l);void 0!==m&&_e(m,(function(t,n){e.config[t]=h.getConfig(g,t,n),void 0===e.config[t]&&(e.config[t]=n)})),e.config.isStorageUseDisabled&&vi();var v={instrumentationKey:function(){return l.instrumentationKey},accountId:function(){return e.config.accountId||l.accountId},sessionRenewalMs:function(){return e.config.sessionRenewalMs||l.sessionRenewalMs},sessionExpirationMs:function(){return e.config.sessionExpirationMs||l.sessionExpirationMs},sampleRate:function(){return e.config.samplingPercentage||l.samplingPercentage},sdkExtension:function(){return e.config.sdkExtension||l.sdkExtension},isBrowserLinkTrackingEnabled:function(){return e.config.isBrowserLinkTrackingEnabled||l.isBrowserLinkTrackingEnabled},appId:function(){return e.config.appId||l.appId}};e._pageViewPerformanceManager=new Ma(e.core),e._pageViewManager=new Aa(c,e.config.overridePageViewDuration,e.core,e._pageViewPerformanceManager),e._pageVisitTimeManager=new Na(e.diagLog(),(function(t,n,r){return function(t,n,r){var i={PageName:t,PageUrl:n};e.trackMetric({name:"PageVisitTime",average:r,max:r,min:r,sampleCount:1},i)}(t,n,r)})),e._telemetryInitializers=e._telemetryInitializers||[],function(t){if(!t.isBrowserLinkTrackingEnabled()){var n=["/browserLinkSignalR/","/__browserLink/"];e._telemetryInitializers.push((function(e){if(e.baseType===Ho.dataType){var t=e.baseData;if(t)for(var r=0;r<n.length;r++)if(t.target&&t.target.indexOf(n[r])>=0)return!1}return!0}))}}(v),(n=new Ga(e.diagLog(),"trackEvent")).action=function(t,n,r,i){i||(i={}),i[qa]=r.toString(),e.trackEvent({name:t,properties:i})},(r=new Ga(e.diagLog(),"trackPageView")).action=function(t,n,r,i,o){Ie(i)&&(i={}),i[qa]=r.toString();var a={name:t,uri:n,properties:i,measurements:o};e.sendPageViewInternal(a,i)};var y=lt(),x=Boolean(typeof history===o&&history)?history:ct(bt),w=ht(!0),I=c;if(!1===e.config.disableExceptionTracking&&!e.config.autoExceptionInstrumented&&y){var C=y.onerror;y.onerror=function(e,t,n,r,i){var o=y[Ha],a=C&&C(e,t,n,r,i);return!0!==a&&I._onerror(Ro.CreateAutoException(e,t,n,r,i,o)),a},e.config.autoExceptionInstrumented=!0}if(!1===e.config.disableExceptionTracking&&!0===e.config.enableUnhandledPromiseRejectionTracking&&!e.config.autoUnhandledPromiseInstrumented&&y){var T="onunhandledrejection",b=y[T];y[T]=function(e){var t=y[Ha],n=b&&b.call(y,e);return!0!==n&&I._onerror(Ro.CreateAutoException(e.reason.toString(),w?w.href:"",0,0,e,t)),n},e.config.autoUnhandledPromiseInstrumented=!0}if(!0===e.config.enableAutoRouteTracking&&x&&Se(x.pushState)&&Se(x.replaceState)&&y&&"undefined"!=typeof Event){var S=c;Ue(f,(function(e){e.identifier===Pa&&(i=e)})),x.pushState=(E=x.pushState,function(){var e=E.apply(this,arguments);return Va(y,Jr(S.config.namePrefix+"pushState")),Va(y,Jr(S.config.namePrefix+"locationchange")),e}),x.replaceState=function(e){return function(){var t=e.apply(this,arguments);return Va(y,Jr(S.config.namePrefix+"replaceState")),Va(y,Jr(S.config.namePrefix+"locationchange")),t}}(x.replaceState),y.addEventListener&&(y.addEventListener(S.config.namePrefix+"popstate",(function(){Va(y,Jr(S.config.namePrefix+"locationchange"))})),y.addEventListener(S.config.namePrefix+"locationchange",(function(){if(i&&i.context&&i.context.telemetryTrace){i.context.telemetryTrace.traceID=dr();var e="_unknown_";w&&w.pathname&&(e=w.pathname+(w.hash||"")),i.context.telemetryTrace.name=e}s&&(a=s),s=w&&w.href||"",setTimeout(function(e){S.trackPageView({refUri:e,properties:{duration:0}})}.bind(c,a),S.autoRoutePVDelay)})))}e.setInitialized(!0)}var E}})),c}return A(t,e),t.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=Zr(e.disableExceptionTracking),e.autoTrackPageVisitTime=Zr(e.autoTrackPageVisitTime),e.overridePageViewDuration=Zr(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=Zr(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.isStorageUseDisabled=Zr(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=Zr(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=Zr(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e.enableDebug=Zr(e.enableDebug),e.disableFlushOnBeforeUnload=Zr(e.disableFlushOnBeforeUnload),e.disableFlushOnUnload=Zr(e.disableFlushOnUnload,e.disableFlushOnBeforeUnload),e},t.Version="2.6.4",t}(tn),Ga=function(e,t){var n=this,r={};n.start=function(t){void 0!==r[t]&&e.throwInternal(he.WARNING,ge.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:t,key:t},!0),r[t]=+new Date},n.stop=function(t,i,o,a){var s=r[t];if(isNaN(s))e.throwInternal(he.WARNING,ge.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:t,key:t},!0);else{var c=qi(s,+new Date);n.action(t,i,c,o,a)}delete r[t],r[t]=void 0}}})),Xa=C((()=>{$a()})),Ja=C((()=>{Ua(),Dr(),me(),Ka=function e(t){var n=[];pe(e,this,(function(e){e.enqueue=function(e){n.push(e)},e.count=function(){return n.length},e.clear=function(){n.length=0},e.getItems=function(){return n.slice(0)},e.batchPayloads=function(e){return e&&e.length>0?t.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},e.markAsSent=function(t){e.clear()},e.clearSent=function(e){}}))},Wa=function(){function e(t,n){var r,i=!1;pe(e,this,(function(o){var a=u(e.BUFFER_KEY),s=u(e.SENT_BUFFER_KEY);function c(e,t){var n=[];return Ue(t,(function(t){!Se(t)&&-1===Oe(e,t)&&n.push(t)})),n}function u(e){var r=e;try{r=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+r:r;var i=bi(t,r);if(i){var o=vt().parse(i);if(Me(o)&&(o=vt().parse(o)),o&&Ne(o))return o}}catch(e){t.throwInternal(he.CRITICAL,ge.FailedToRestoreStorageBuffer," storage key: "+r+", "+Ge(e),{exception:wt(e)})}return[]}function l(e,r){var i=e;try{i=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+i:i;var o=JSON.stringify(r);Si(t,i,o)}catch(e){Si(t,i,JSON.stringify([])),t.throwInternal(he.WARNING,ge.FailedToSetStorageBuffer," storage key: "+i+", "+Ge(e)+". Buffer cleared",{exception:wt(e)})}}(r=a.concat(s)).length>e.MAX_BUFFER_SIZE&&(r.length=e.MAX_BUFFER_SIZE),l(e.SENT_BUFFER_KEY,[]),l(e.BUFFER_KEY,r),o.enqueue=function(n){r.length>=e.MAX_BUFFER_SIZE?i||(t.throwInternal(he.WARNING,ge.SessionStorageBufferFull,"Maximum buffer size reached: "+r.length,!0),i=!0):(r.push(n),l(e.BUFFER_KEY,r))},o.count=function(){return r.length},o.clear=function(){r=[],l(e.BUFFER_KEY,[]),l(e.SENT_BUFFER_KEY,[]),i=!1},o.getItems=function(){return r.slice(0)},o.batchPayloads=function(e){return e&&e.length>0?n.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null},o.markAsSent=function(n){r=c(n,r),l(e.BUFFER_KEY,r);var i=u(e.SENT_BUFFER_KEY);i instanceof Array&&n instanceof Array&&((i=i.concat(n)).length>e.MAX_BUFFER_SIZE&&(t.throwInternal(he.CRITICAL,ge.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+i.length,!0),i.length=e.MAX_BUFFER_SIZE),l(e.SENT_BUFFER_KEY,i))},o.clearSent=function(t){var n=u(e.SENT_BUFFER_KEY);n=c(t,n),l(e.SENT_BUFFER_KEY,n)}}))}return e.BUFFER_KEY="AI_buffer",e.SENT_BUFFER_KEY="AI_sentBuffer",e.MAX_BUFFER_SIZE=2e3,e}()}));function Qa(e,t,n){return Ke(e,t,n,Xe)}var Za,Ya,es,ts,ns,rs,is,os,as,ss,cs,us,ls,ds,fs,ps,hs,gs,ms=C((()=>{F(),Ua(),Dr(),Za="baseType",Ya="baseData",es="properties",ts="true",ns=function(){function e(){}return e.extractPropsAndMeasurements=function(e,t,n){Ie(e)||_e(e,(function(e,r){Le(r)?n[e]=r:Me(r)?t[e]=r:mt()&&(t[e]=vt().stringify(r))}))},e.createEnvelope=function(t,n,r,i){var o=new no(t,i,n);Qa(o,"sampleRate",r[ii]),(r[Ya]||{}).startTime&&(o.time=Fe(r[Ya].startTime)),o.iKey=r.iKey;var a=r.iKey.replace(/-/g,"");return o.name=o.name.replace("{0}",a),e.extractPartAExtensions(r,o),r.tags=r.tags||[],Ze(o)},e.extractPartAExtensions=function(t,n){var r=n.tags=n.tags||{},i=t.ext=t.ext||{},o=t.tags=t.tags||[],a=i.user;a&&(Qa(r,Ea.userAuthUserId,a.authId),Qa(r,Ea.userId,a.id||a.localId));var s=i.app;s&&Qa(r,Ea.sessionId,s.sesId);var c=i.device;c&&(Qa(r,Ea.deviceId,c.id||c.localId),Qa(r,Ea.deviceType,c.deviceClass),Qa(r,Ea.deviceIp,c.ip),Qa(r,Ea.deviceModel,c.model),Qa(r,Ea.deviceType,c.deviceType));var u=t.ext.web;if(u){Qa(r,Ea.deviceLanguage,u.browserLang),Qa(r,Ea.deviceBrowserVersion,u.browserVer),Qa(r,Ea.deviceBrowser,u.browser);var l=n.data=n.data||{},d=l[Ya]=l[Ya]||{},f=d[es]=d[es]||{};Qa(f,"domain",u.domain),Qa(f,"isManual",u.isManual?ts:null),Qa(f,"screenRes",u.screenRes),Qa(f,"userConsent",u.userConsent?ts:null)}var p=i.os;p&&Qa(r,Ea.deviceOS,p.name);var h=i.trace;h&&(Qa(r,Ea.operationParentId,h.parentID),Qa(r,Ea.operationName,h.name),Qa(r,Ea.operationId,h.traceID));for(var g={},m=o.length-1;m>=0;m--)_e(o[m],(function(e,t){g[e]=t})),o.splice(m,1);_e(o,(function(e,t){g[e]=t}));var v=R({},r,g);v[Ea.internalSdkVersion]||(v[Ea.internalSdkVersion]="javascript:"+e.Version),n.tags=Ze(v)},e.prototype.Init=function(e,t){this._logger=e,Ie(t[Ya])&&this._logger.throwInternal(he.CRITICAL,ge.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")},e.Version="2.6.4",e}(),rs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Ya].measurements||{},i=n[Ya][es]||{};ns.extractPropsAndMeasurements(n.data,i,r);var o=n[Ya];if(Ie(o))return t.warnToConsole("Invalid input for dependency data"),null;var a=o[es]&&o[es][ai]?o[es][ai]:"GET",s=new Ho(t,o.id,o.target,o.name,o.duration,o.success,o.responseCode,a,o.type,o.correlationContext,i,r),c=new $o(Ho.dataType,s);return ns.createEnvelope(t,Ho.envelopeType,n,c)},t.DependencyEnvelopeCreator=new t,t}(ns),is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r={},i={};n[Za]!==io.dataType&&(r.baseTypeSource=n[Za]),n[Za]===io.dataType?(r=n[Ya][es]||{},i=n[Ya].measurements||{}):n[Ya]&&ns.extractPropsAndMeasurements(n[Ya],r,i),ns.extractPropsAndMeasurements(n.data,r,i);var o=n[Ya].name,a=new io(t,o,r,i),s=new $o(io.dataType,a);return ns.createEnvelope(t,io.envelopeType,n,s)},t.EventEnvelopeCreator=new t,t}(ns),os=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Ya].measurements||{},i=n[Ya][es]||{};ns.extractPropsAndMeasurements(n.data,i,r);var o=n[Ya],a=Ro.CreateFromInterface(t,o,i,r),s=new $o(Ro.dataType,a);return ns.createEnvelope(t,Ro.envelopeType,n,s)},t.ExceptionEnvelopeCreator=new t,t}(ns),as=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Ya],i=r[es]||{},o=r.measurements||{};ns.extractPropsAndMeasurements(n.data,i,o);var a=new jo(t,r.name,r.average,r.sampleCount,r.min,r.max,i,o),s=new $o(jo.dataType,a);return ns.createEnvelope(t,jo.envelopeType,n,s)},t.MetricEnvelopeCreator=new t,t}(ns),ss=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r,i="duration",o=n[Ya];Ie(o)||Ie(o[es])||Ie(o[es][i])?!Ie(n.data)&&!Ie(n.data[i])&&(r=n.data[i],delete n.data[i]):(r=o[es][i],delete o[es][i]);var a,s=n[Ya];((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID);var c=s.id||a,u=s.name,l=s.uri,d=s[es]||{},f=s.measurements||{};Ie(s.refUri)||(d.refUri=s.refUri),Ie(s.pageType)||(d.pageType=s.pageType),Ie(s.isLoggedIn)||(d.isLoggedIn=s.isLoggedIn.toString()),Ie(s[es])||_e(s[es],(function(e,t){d[e]=t})),ns.extractPropsAndMeasurements(n.data,d,f);var p=new Vo(t,u,l,r,d,f,c),h=new $o(Vo.dataType,p);return ns.createEnvelope(t,Vo.envelopeType,n,h)},t.PageViewEnvelopeCreator=new t,t}(ns),cs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Ya],i=r.name,o=r.uri||r.url,a=r[es]||{},s=r.measurements||{};ns.extractPropsAndMeasurements(n.data,a,s);var c=new Wo(t,i,o,void 0,a,s,r),u=new $o(Wo.dataType,c);return ns.createEnvelope(t,Wo.envelopeType,n,u)},t.PageViewPerformanceEnvelopeCreator=new t,t}(ns),us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Ya].message,i=n[Ya].severityLevel,o=n[Ya][es]||{},a=n[Ya].measurements||{};ns.extractPropsAndMeasurements(n.data,o,a);var s=new Go(t,r,i,o,a),c=new $o(Go.dataType,s);return ns.createEnvelope(t,Go.envelopeType,n,c)},t.TraceEnvelopeCreator=new t,t}(ns)})),vs=C((()=>{Dr(),me(),ls=function e(t){pe(e,this,(function(e){function n(e,o){var a="__aiCircularRefCheck",s={};if(!e)return t.throwInternal(he.CRITICAL,ge.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:o},!0),s;if(e[a])return t.throwInternal(he.WARNING,ge.CircularReferenceDetected,"Circular reference detected while serializing object",{name:o},!0),s;if(!e.aiDataContract){if("measurements"===o)s=i(e,"number",o);else if("properties"===o)s=i(e,"string",o);else if("tags"===o)s=i(e,"string",o);else if(Ne(e))s=r(e,o);else{t.throwInternal(he.WARNING,ge.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:o},!0);try{vt().stringify(e),s=e}catch(e){t.throwInternal(he.CRITICAL,ge.CannotSerializeObject,e&&Se(e.toString)?e.toString():"Error serializing object",null,!0)}}return s}return e[a]=!0,_e(e.aiDataContract,(function(i,a){var c=Se(a)?1&a():1&a,u=Se(a)?4&a():4&a,l=2&a,d=void 0!==e[i],f=be(e[i])&&null!==e[i];if(!c||d||l){if(!u){var p;void 0!==(p=f?l?r(e[i],i):n(e[i],i):e[i])&&(s[i]=p)}}else t.throwInternal(he.CRITICAL,ge.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:i,name:o})})),delete e[a],s}function r(e,r){var i;if(e)if(Ne(e)){i=[];for(var o=0;o<e.length;o++){var a=n(e[o],r+"["+o+"]");i.push(a)}}else t.throwInternal(he.CRITICAL,ge.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:r},!0);return i}function i(e,n,r){var i;return e&&(i={},_e(e,(function(e,o){if("string"===n)void 0===o?i[e]="undefined":null===o?i[e]="null":o.toString?i[e]=o.toString():i[e]="invalid field: toString() is not defined.";else if("number"===n)if(void 0===o)i[e]="undefined";else if(null===o)i[e]="null";else{var a=parseFloat(o);isNaN(a)?i[e]="NaN":i[e]=a}else i[e]="invalid field: "+r+" is of unknown type.",t.throwInternal(he.CRITICAL,i[e],null,!0)}))),i}e.serialize=function(e){var r=n(e,"root");try{return vt().stringify(r)}catch(e){t.throwInternal(he.CRITICAL,ge.CannotSerializeObject,e&&Se(e.toString)?e.toString():"Error serializing object",null,!0)}}}))}})),ys=C((()=>{Dr(),me(),ds=function(){function e(){var t=lt(),n=ft(),r=!1,i=!0;pe(e,this,(function(e){try{if(t&&Cr.Attach(t,"online",s)&&(Cr.Attach(t,"offline",c),r=!0),n){var o=n.body||n;we(o.ononline)||(o.ononline=s,o.onoffline=c,r=!0)}if(r){var a=pt();a&&!Ie(a.onLine)&&(i=a.onLine)}}catch(e){r=!1}function s(){i=!0}function c(){i=!1}e.isListening=r,e.isOnline=function(){var e=!0,t=pt();return r?e=i:t&&!Ie(t.onLine)&&(e=t.onLine),e},e.isOffline=function(){return!e.isOnline()}}))}return e.Offline=new e,e}(),fs=ds.Offline})),xs=C((()=>{ps=function(){function e(){}return e.prototype.getHashCodeScore=function(t){return this.getHashCode(t)/e.INT_MAX_VALUE*100},e.prototype.getHashCode=function(t){if(""===t)return 0;for(;t.length<e.MIN_INPUT_LENGTH;)t=t.concat(t);for(var n=5381,r=0;r<t.length;++r)n=(n<<5)+n+t.charCodeAt(r),n&=n;return Math.abs(n)},e.INT_MAX_VALUE=2147483647,e.MIN_INPUT_LENGTH=8,e}()})),ws=C((()=>{xs(),Ua(),hs=function(){function e(){this.hashCodeGeneragor=new ps,this.keys=new Ta}return e.prototype.getSamplingScore=function(e){return e.tags&&e.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId]):e.ext&&e.ext.user&&e.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()},e}()})),Is=C((()=>{ws(),Ua(),Dr(),gs=function(){function e(e,t){this.INT_MAX_VALUE=2147483647,this._logger=t||jt(null),(e>100||e<0)&&(this._logger.throwInternal(he.WARNING,ge.SampleRateOutOfRange,"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.sampleRate=e,this.samplingScoreGenerator=new hs}return e.prototype.isSampledIn=function(e){var t=this.sampleRate;return null==t||t>=100||e.baseType===jo.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},e}()}));function Cs(e){try{return e.responseText}catch(e){}return null}var Ts,bs,Ss,Es,Ps,_s,ks=C((()=>{F(),Ja(),ms(),vs(),Ua(),Dr(),ys(),Is(),me(),Ts=function(e){function t(){var n=e.call(this)||this;n.priority=1001,n.identifier=_a,n._XMLHttpRequestSupported=!1;var r,i,o,s,c,u={};return pe(t,n,(function(e,l){function d(){Je("Method not implemented.")}function f(t,n,i,o,a,s){var c=null;if(e._appId||(c=v(s))&&c.appId&&(e._appId=c.appId),(t<200||t>=300)&&0!==t){if((301===t||307===t||308===t)&&!p(i))return void e._onError(n,a);!e._senderConfig.isRetryDisabled()&&w(t)?(y(n),e.diagLog().throwInternal(he.WARNING,ge.TransmissionFailed,". Response code "+t+". Will retry to send "+n.length+" items.")):e._onError(n,a)}else fs.isOffline()?e._senderConfig.isRetryDisabled()||(y(n,10),e.diagLog().throwInternal(he.WARNING,ge.TransmissionFailed,". Offline - Response Code: "+t+". Offline status: "+fs.isOffline()+". Will retry to send "+n.length+" items.")):(p(i),206===t?(c||(c=v(s)),c&&!e._senderConfig.isRetryDisabled()?e._onPartialSuccess(n,c):e._onError(n,a)):(r=0,e._onSuccess(n,o)))}function p(t){return!(c>=10||Ie(t)||""===t||t===e._senderConfig.endpointUrl()||(e._senderConfig.endpointUrl=function(){return t},++c,0))}function h(t,n){var r=e._senderConfig.endpointUrl(),i=e._buffer.batchPayloads(t),o=new Blob([i],{type:"text/plain;charset=UTF-8"});pt().sendBeacon(r,o)?(e._buffer.markAsSent(t),e._onSuccess(t,t.length)):(g(t,!0),e.diagLog().throwInternal(he.WARNING,ge.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function g(t,n){var r=new XMLHttpRequest,i=e._senderConfig.endpointUrl();try{r[ri]=!0}catch(e){}r.open("POST",i,n),r.setRequestHeader("Content-type","application/json"),Bi(i)&&r.setRequestHeader(Mr.sdkContextHeader,Mr.sdkContextHeaderAppIdRequest),Ue(qe(u),(function(e){r.setRequestHeader(e,u[e])})),r.onreadystatechange=function(){return e._xhrReadyStateChange(r,t,t.length)},r.onerror=function(n){return e._onError(t,I(r),n)};var o=e._buffer.batchPayloads(t);r.send(o),e._buffer.markAsSent(t)}function m(t,n){var r=e._senderConfig.endpointUrl(),i=e._buffer.batchPayloads(t),o=new Blob([i],{type:"text/plain;charset=UTF-8"}),a=new Headers;Bi(r)&&a.append(Mr.sdkContextHeader,Mr.sdkContextHeaderAppIdRequest),Ue(qe(u),(function(e){a.append(e,u[e])}));var s=new Request(r,{method:"POST",headers:a,body:o});fetch(s).then((function(n){if(!n.ok)throw Error(n.statusText);n.text().then((function(e){f(n.status,t,n.url,t.length,n.statusText,e)})),e._buffer.markAsSent(t)})).catch((function(n){e._onError(t,n.message)}))}function v(t){try{if(t&&""!==t){var n=vt().parse(t);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(n){e.diagLog().throwInternal(he.CRITICAL,ge.InvalidBackendResponse,"Cannot parse the response. "+Ge(n),{response:t})}return null}function y(t,n){if(void 0===n&&(n=1),t&&0!==t.length){e._buffer.clearSent(t),r++;for(var o=0,a=t;o<a.length;o++){var s=a[o];e._buffer.enqueue(s)}(function(e){var t;if(r<=1)t=10;else{var n=(Math.pow(2,r)-1)/2,o=Math.floor(Math.random()*n*10)+1;o*=e,t=Math.max(Math.min(o,3600),10)}var a=ze()+1e3*t;i=a})(n),x()}}function x(){if(!o){var t=i?Math.max(0,i-ze()):0,n=Math.max(e._senderConfig.maxBatchInterval(),t);o=setTimeout((function(){e.triggerSend(!0,null,1)}),n)}}function w(e){return 408===e||429===e||500===e||503===e}function I(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+Cs(e)||0:t}function C(t,n){var r=lt(),i=new XDomainRequest;i.onload=function(){return e._xdrOnLoad(i,t)},i.onerror=function(n){return e._onError(t,T(i),n)};var o=r&&r.location&&r.location.protocol||"";if(0!==e._senderConfig.endpointUrl().lastIndexOf(o,0))return e.diagLog().throwInternal(he.WARNING,ge.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void e._buffer.clear();var a=e._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",a);var s=e._buffer.batchPayloads(t);i.send(s),e._buffer.markAsSent(t)}function T(e,t){return e?"XDomainRequest,Response:"+Cs(e)||0:t}e.pause=d,e.resume=d,e.flush=function(){try{e.triggerSend(!0,null,1)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.FlushFailed,"flush failed, telemetry will not be collected: "+Ge(t),{exception:wt(t)})}},e.onunloadFlush=function(){if(!1!==e._senderConfig.onunloadDisableBeacon()&&!1!==e._senderConfig.isBeaconApiDisabled()||!ei())e.flush();else try{e.triggerSend(!0,h,2)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Ge(t),{exception:wt(t)})}},e.teardown=d,e.addHeader=function(e,t){u[e]=t},e.initialize=function(o,u,d,f){l.initialize(o,u,d,f);var p=e._getTelCtx(),v=e.identifier;s=new ls(u.logger),r=0,i=null,e._sender=null,c=0;var y=t._getDefaultAppInsightsChannelConfig();if(e._senderConfig=t._getEmptyAppInsightsChannelConfig(),_e(y,(function(t,n){e._senderConfig[t]=function(){return p.getConfig(v,t,n())}})),e._buffer=e._senderConfig.enableSessionStorageBuffer()&&Ci()?new Wa(e.diagLog(),e._senderConfig):new Ka(e._senderConfig),e._sample=new gs(e._senderConfig.samplingPercentage(),e.diagLog()),function(e){return!(Ie(e.disableInstrumentationKeyValidation)||!e.disableInstrumentationKeyValidation)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e.instrumentationKey)}(o)||e.diagLog().throwInternal(he.CRITICAL,ge.InvalidInstrumentationKey,"Invalid Instrumentation key "+o.instrumentationKey),!Bi(e._senderConfig.endpointUrl())&&e._senderConfig.customHeaders()&&e._senderConfig.customHeaders().length>0&&Ue(e._senderConfig.customHeaders(),(function(e){n.addHeader(e.header,e.value)})),!e._senderConfig.isBeaconApiDisabled()&&ei())e._sender=h;else{var x=ct("XMLHttpRequest");x?"withCredentials"in new x?(e._sender=g,e._XMLHttpRequestSupported=!0):typeof XDomainRequest!==a&&(e._sender=C):ct("fetch")&&(e._sender=m)}},e.processTelemetry=function(n,r){r=e._getTelCtx(r);try{if(e._senderConfig.disableTelemetry())return;if(!n)return void r.diagLog().throwInternal(he.CRITICAL,ge.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(n.baseData&&!n.baseType)return void r.diagLog().throwInternal(he.CRITICAL,ge.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(n.baseType||(n.baseType="EventData"),!e._sender)return void r.diagLog().throwInternal(he.CRITICAL,ge.SenderNotInitialized,"Sender was not initialized");if(!function(t){return e._sample.isSampledIn(t)}(n))return void r.diagLog().throwInternal(he.WARNING,ge.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:e._sample.sampleRate});n[ii]=e._sample.sampleRate;var i=t.constructEnvelope(n,e._senderConfig.instrumentationKey(),r.diagLog());if(!i)return void r.diagLog().throwInternal(he.CRITICAL,ge.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(n.tags&&n.tags[oi]&&(Ue(n.tags[oi],(function(e){try{e&&!1===e(i)&&(o=!0,r.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(e){r.diagLog().throwInternal(he.CRITICAL,ge.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+Ge(e),{exception:wt(e)},!0)}})),delete n.tags[oi]),o)return;var a=s.serialize(i),c=e._buffer.getItems(),u=e._buffer.batchPayloads(c);u&&u.length+a.length>e._senderConfig.maxBatchSizeInBytes()&&e.triggerSend(!0,null,10),e._buffer.enqueue(a),x()}catch(e){r.diagLog().throwInternal(he.WARNING,ge.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Ge(e),{exception:wt(e)})}e.processNext(n,r)},e._xhrReadyStateChange=function(e,t,n){4===e.readyState&&f(e.status,t,e.responseURL,n,I(e),Cs(e)||e.response)},e.triggerSend=function(t,r,a){void 0===t&&(t=!0);try{if(e._senderConfig.disableTelemetry())e._buffer.clear();else{if(e._buffer.count()>0){var s=e._buffer.getItems();(function(t,n){var r=function(){var t="getNotifyMgr";return e.core[t]?e.core[t]():e.core._notificationManager}();if(r&&r.eventsSendRequest)try{r.eventsSendRequest(t,n)}catch(t){e.diagLog().throwInternal(he.CRITICAL,ge.NotificationException,"send request notification failed: "+Ge(t),{exception:wt(t)})}})(a||0,t),r?r.call(n,s,t):e._sender(s,t)}new Date}clearTimeout(o),o=null,i=null}catch(t){var c=xt();(!c||c>9)&&e.diagLog().throwInternal(he.CRITICAL,ge.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+Ge(t),{exception:wt(t)})}},e._onError=function(t,n,r){e.diagLog().throwInternal(he.WARNING,ge.OnError,"Failed to send telemetry.",{message:n}),e._buffer.clearSent(t)},e._onPartialSuccess=function(t,n){for(var r=[],i=[],o=0,a=n.errors.reverse();o<a.length;o++){var s=a[o],c=t.splice(s.index,1)[0];w(s.statusCode)?i.push(c):r.push(c)}t.length>0&&e._onSuccess(t,n.itemsAccepted),r.length>0&&e._onError(r,I(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),i.length>0&&(y(i),e.diagLog().throwInternal(he.WARNING,ge.TransmissionFailed,"Partial success. Delivered: "+t.length+", Failed: "+r.length+". Will retry to send "+i.length+" our of "+n.itemsReceived+" items"))},e._onSuccess=function(t,n){e._buffer.clearSent(t)},e._xdrOnLoad=function(t,n){var i=Cs(t);if(!t||i+""!="200"&&""!==i){var o=v(i);o&&o.itemsReceived&&o.itemsReceived>o.itemsAccepted&&!e._senderConfig.isRetryDisabled()?e._onPartialSuccess(n,o):e._onError(n,T(t))}else r=0,e._onSuccess(n,0)}})),n}return A(t,e),t.constructEnvelope=function(e,t,n){var r;switch((r=t===e.iKey||Ie(t)?e:R({},e,{iKey:t})).baseType){case io.dataType:return is.EventEnvelopeCreator.Create(n,r);case Go.dataType:return us.TraceEnvelopeCreator.Create(n,r);case Vo.dataType:return ss.PageViewEnvelopeCreator.Create(n,r);case Wo.dataType:return cs.PageViewPerformanceEnvelopeCreator.Create(n,r);case Ro.dataType:return os.ExceptionEnvelopeCreator.Create(n,r);case jo.dataType:return as.MetricEnvelopeCreator.Create(n,r);case Ho.dataType:return rs.DependencyEnvelopeCreator.Create(n,r);default:return is.EventEnvelopeCreator.Create(n,r)}},t._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100},customHeaders:function(){}}},t._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0,customHeaders:void 0}},t}(tn)})),As=C((()=>{ks()})),Ns=C((()=>{me(),Ua(),Dr(),bs=function(){},Ss=function(){function e(t,n){var r,i,o=jt(n),a=vn(n);pe(e,this,(function(n){t||(t={}),Se(t.sessionExpirationMs)||(t.sessionExpirationMs=function(){return e.acquisitionSpan}),Se(t.sessionRenewalMs)||(t.sessionRenewalMs=function(){return e.renewalSpan}),n.config=t;var s=n.config.sessionCookiePostfix&&n.config.sessionCookiePostfix()?n.config.sessionCookiePostfix():n.config.namePrefix&&n.config.namePrefix()?n.config.namePrefix():"";function c(e,t){var n=!1,r=", session will be reset",i=t.split("|");if(i.length>=2)try{var a=+i[1]||0,s=+i[2]||0;isNaN(a)||a<=0?o.throwInternal(he.WARNING,ge.SessionRenewalDateIsZero,"AI session acquisition date is 0"+r):isNaN(s)||s<=0?o.throwInternal(he.WARNING,ge.SessionRenewalDateIsZero,"AI session renewal date is 0"+r):i[0]&&(e.id=i[0],e.acquisitionDate=a,e.renewalDate=s,n=!0)}catch(e){o.throwInternal(he.CRITICAL,ge.ErrorParsingAISessionCookie,"Error parsing ai_session value ["+(t||"")+"]"+r+" - "+Ge(e),{exception:wt(e)})}return n}function u(e,t){var o=e.acquisitionDate;e.renewalDate=t;var s,c=n.config,u=c.sessionRenewalMs(),l=o+c.sessionExpirationMs()-t,d=[e.id,o,t];s=l<u?l/1e3:u/1e3;var f=c.cookieDomain?c.cookieDomain():null;a.set(r(),d.join("|"),c.sessionExpirationMs()>0?s:null,f),i=t}r=function(){return"ai_session"+s},n.automaticSession=new bs,n.update=function(){var t=ze(),s=!1,l=n.automaticSession;l.id||(s=!function(e,t){var n=!1,i=a.get(r());if(i&&Se(i.split))n=c(e,i);else{var s=xi(o,r());s&&(n=c(e,s))}return n||!!e.id}(l));var d=n.config.sessionExpirationMs();if(!s&&d>0){var f=n.config.sessionRenewalMs(),p=t-l.acquisitionDate,h=t-l.renewalDate;s=(s=(s=p<0||h<0)||p>d)||h>f}s?function(e){var t=n.config||{},r=(t.getNewId?t.getNewId():null)||lr;n.automaticSession.id=r(t.idLength?t.idLength():22),n.automaticSession.acquisitionDate=e,u(n.automaticSession,e),yi()||o.throwInternal(he.WARNING,ge.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")}(t):(!i||t-i>e.cookieUpdateInterval)&&u(l,t)},n.backup=function(){var e=n.automaticSession;!function(e,t,n){wi(o,r(),[e,t,n].join("|"))}(e.id,e.acquisitionDate,e.renewalDate)}}))}return e.acquisitionSpan=864e5,e.renewalSpan=18e5,e.cookieUpdateInterval=6e4,e}()})),Rs=C((()=>{Es=function(){}})),Ms=C((()=>{Ps=function(){this.id="browser",this.deviceClass="Browser"}})),Ls=C((()=>{_s=function(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.6.4"}}));function Ds(e){return!("string"!=typeof e||!e||e.match(/,|;|=| |\|/))}var Fs,Us,Os,js=C((()=>{me(),Ua(),Dr(),Fs=function(){function e(t,n){this.isNewUser=!1;var r,i=jt(n),o=vn(n);pe(e,this,(function(n){n.config=t;var a=n.config.userCookiePostfix&&n.config.userCookiePostfix()?n.config.userCookiePostfix():"";r=function(){return e.userCookieName+a};var s=o.get(r());if(s){n.isNewUser=!1;var c=s.split(e.cookieSeparator);c.length>0&&(n.id=c[0])}if(!n.id){var u=t||{},l=(u.getNewId?u.getNewId():null)||lr;n.id=l(u.idLength?t.idLength():22);var d=Fe(new Date);n.accountAcquisitionDate=d,n.isNewUser=!0;var f=[n.id,d];o.set(r(),f.join(e.cookieSeparator),31536e3);var p=t.namePrefix&&t.namePrefix()?t.namePrefix()+"ai_session":"ai_session";Ii(i,p)}n.accountId=t.accountId?t.accountId():void 0;var h=o.get(e.authUserCookieName);if(h){var g=(h=decodeURI(h)).split(e.cookieSeparator);g[0]&&(n.authenticatedId=g[0]),g.length>1&&g[1]&&(n.accountId=g[1])}n.setAuthenticatedUserContext=function(t,r,a){if(void 0===a&&(a=!1),!Ds(t)||r&&!Ds(r))i.throwInternal(he.WARNING,ge.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{n.authenticatedId=t;var s=n.authenticatedId;r&&(n.accountId=r,s=[n.authenticatedId,n.accountId].join(e.cookieSeparator)),a&&o.set(e.authUserCookieName,encodeURI(s))}},n.clearAuthenticatedUserContext=function(){n.authenticatedId=null,n.accountId=null,o.del(e.authUserCookieName)}}))}return e.cookieSeparator="|",e.userCookieName="ai_user",e.authUserCookieName="ai_authUser",e}()})),Bs=C((()=>{Us=function(){}})),Vs=C((()=>{Ua(),Dr(),Os=function(e,t,n,r){var i=this;i.traceID=e||dr(),i.parentID=t,i.name=n;var o=ht();!n&&o&&o.pathname&&(i.name=o.pathname),i.name=jr(r,i.name)}}));function qs(e,t){e&&e[t]&&0===qe(e[t]).length&&delete e[t]}var Hs,zs,Gs,Ks,Ws,$s=C((()=>{me(),Dr(),Ns(),Ua(),Rs(),Ms(),Ls(),js(),Bs(),Vs(),Hs="ext",zs="tags",Gs=function e(t,n){var r=this,i=t.logger;this.appId=function(){return null},pe(e,this,(function(e){e.application=new Es,e.internal=new _s(n),ut()&&(e.sessionManager=new Ss(n,t),e.device=new Ps,e.location=new Us,e.user=new Fs(n,t),e.telemetryTrace=new Os(void 0,void 0,void 0,i),e.session=new bs),e.applySessionContext=function(t,n){var r=e.session,i=e.sessionManager;r&&Me(r.id)?Ke(We(t.ext,Sa.AppExt),"sesId",r.id):i&&i.automaticSession&&Ke(We(t.ext,Sa.AppExt),"sesId",i.automaticSession.id,Me)},e.applyOperatingSystemContxt=function(t,n){Ke(t.ext,Sa.OSExt,e.os)},e.applyApplicationContext=function(t,n){var r=e.application;if(r){var i=We(t,zs);Ke(i,Ea.applicationVersion,r.ver,Me),Ke(i,Ea.applicationBuild,r.build,Me)}},e.applyDeviceContext=function(t,n){var r=e.device;if(r){var i=We(We(t,Hs),Sa.DeviceExt);Ke(i,"localId",r.id,Me),Ke(i,"ip",r.ip,Me),Ke(i,"model",r.model,Me),Ke(i,"deviceClass",r.deviceClass,Me)}},e.applyInternalContext=function(t,n){var r=e.internal;if(r){var i=We(t,zs);Ke(i,Ea.internalAgentVersion,r.agentVersion,Me),Ke(i,Ea.internalSdkVersion,r.sdkVersion,Me),(t.baseType===Bt.dataType||t.baseType===Vo.dataType)&&(Ke(i,Ea.internalSnippet,r.snippetVer,Me),Ke(i,Ea.internalSdkSrc,r.sdkSrc,Me))}},e.applyLocationContext=function(e,t){var n=r.location;n&&Ke(We(e,zs,[]),Ea.locationIp,n.ip,Me)},e.applyOperationContext=function(t,n){var r=e.telemetryTrace;if(r){var i=We(We(t,Hs),Sa.TraceExt,{traceID:void 0,parentID:void 0});Ke(i,"traceID",r.traceID,Me),Ke(i,"name",r.name,Me),Ke(i,"parentID",r.parentID,Me)}},e.applyWebContext=function(e,t){var n=r.web;n&&Ke(We(e,Hs),Sa.WebExt,n)},e.applyUserContext=function(t,n){var r=e.user;if(r){Ke(We(t,zs,[]),Ea.userAccountId,r.accountId,Me);var i=We(We(t,Hs),Sa.UserExt);Ke(i,"id",r.id,Me),Ke(i,"authId",r.authenticatedId,Me)}},e.cleanUp=function(e,t){var n=e.ext;n&&(qs(n,Sa.DeviceExt),qs(n,Sa.UserExt),qs(n,Sa.WebExt),qs(n,Sa.OSExt),qs(n,Sa.AppExt),qs(n,Sa.TraceExt))}}))}})),Xs=C((()=>{F(),me(),Dr(),$s(),Ua(),Ks=function(e){function t(){var n,r,i=e.call(this)||this;return i.priority=110,i.identifier=Pa,pe(t,i,(function(e,i){e.initialize=function(o,a,s,c){i.initialize(o,a,s,c);var u=e._getTelCtx(),l=e.identifier,d=t.getDefaultConfig();r=r||{},_e(d,(function(e,t){r[e]=function(){return u.getConfig(l,e,t())}})),e.context=new Gs(a,r),n=ti(s,_a),e.context.appId=function(){return n?n._appId:null},e._extConfig=r},e.processTelemetry=function(t,n){if(!Ie(t)){n=e._getTelCtx(n),t.name===Vo.envelopeType&&n.diagLog().resetInternalMessageCount();var r=e.context||{};if(r.session&&"string"!=typeof e.context.session.id&&r.sessionManager&&r.sessionManager.update(),function(t,n){We(t,"tags",[]),We(t,"ext",{});var r=e.context;r.applySessionContext(t,n),r.applyApplicationContext(t,n),r.applyDeviceContext(t,n),r.applyOperationContext(t,n),r.applyUserContext(t,n),r.applyOperatingSystemContxt(t,n),r.applyWebContext(t,n),r.applyLocationContext(t,n),r.applyInternalContext(t,n),r.cleanUp(t,n)}(t,n),r.user&&r.user.isNewUser){r.user.isNewUser=!1;var i=new Bt(ge.SendBrowserInfoOnUserInit,(pt()||{}).userAgent||"");n.diagLog().logInternalMessage(he.CRITICAL,i)}e.processNext(t,n)}}})),i}return A(t,e),t.getDefaultConfig=function(){return{instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){},sessionCookiePostfix:function(){},userCookiePostfix:function(){},idLength:function(){return 22},getNewId:function(){return null}}},t}(tn),Ws=Ks})),Js=C((()=>{Xs()}));function Qs(e,t,n){var r=0,i=e[t],o=e[n];return i&&o&&(r=qi(i,o)),r}function Zs(e,t,n,r,i){var o=0,a=Qs(n,r,i);return a&&(o=Ys(e,t,Yr(a))),o}function Ys(e,t,n){var r="ajaxPerf",i=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1),i}var ec,tc,nc,rc,ic=C((()=>{Ua(),Dr(),me(),ec="properties",tc=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},nc=function e(t,n,r){var i=this,o=r,a="responseText";i.perfMark=null,i.completed=!1,i.requestHeadersSize=null,i.requestHeaders=null,i.responseReceivingDuration=null,i.callbackDuration=null,i.ajaxTotalDuration=null,i.aborted=0,i.pageUrl=null,i.requestUrl=null,i.requestSize=0,i.method=null,i.status=null,i.requestSentTime=null,i.responseStartedTime=null,i.responseFinishedTime=null,i.callbackFinishedTime=null,i.endTime=null,i.xhrMonitoringState=new tc,i.clientFailure=0,i.traceID=t,i.spanID=n,pe(e,i,(function(e){e.getAbsoluteUrl=function(){return e.requestUrl?Ni(e.requestUrl):null},e.getPathName=function(){return e.requestUrl?Br(o,Mi(e.method,e.requestUrl)):null},e.CreateTrackItem=function(t,n,r){if(e.ajaxTotalDuration=Math.round(1e3*qi(e.requestSentTime,e.responseFinishedTime))/1e3,e.ajaxTotalDuration<0)return null;var i,o=((i={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:t,startTime:null,duration:e.ajaxTotalDuration,success:+e.status>=200&&+e.status<400,responseCode:+e.status,method:e.method})[ec]={HttpMethod:e.method},i);if(e.requestSentTime&&(o.startTime=new Date,o.startTime.setTime(e.requestSentTime)),function(e,t){var n=e.perfTiming,r=t[ec]||{},i=0,o="name",a="Start",s="End",c="connect",u="redirect",l="request",d="response",f="duration",p="startTime",h=c+s,g=l+a,m=d+s,v=u+a,y=u=s,x="transferSize",w="encodedBodySize",I="decodedBodySize",C="serverTiming";if(n){i|=Zs(r,u,n,v,y),i|=Zs(r,"domainLookup",n,"domainLookupStart","domainLookupEnd"),i|=Zs(r,c,n,"connectStart",h),i|=Zs(r,l,n,g,"requestEnd"),i|=Zs(r,d,n,"responseStart",m),i|=Zs(r,"networkConnect",n,p,h),i|=Zs(r,"sentRequest",n,g,m);var T=n[f];T||(T=Qs(n,p,m)||0),i|=Ys(r,f,T),i|=Ys(r,"perfTotal",T);var b=n[C];if(b){var S={};Ue(b,(function(e,t){var n=function(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(e[o]||""+t),r=S[n]||{};_e(e,(function(e,t){(e!==o&&Me(t)||Le(t))&&(r[e]&&(t=r[e]+";"+t),(t||!Me(t))&&(r[e]=t))})),S[n]=r})),i|=Ys(r,C,S)}i|=Ys(r,x,n[x]),i|=Ys(r,w,n[w]),i|=Ys(r,I,n[I])}else e.perfMark&&(i|=Ys(r,"missing",e.perfAttempts));i&&(t[ec]=r)}(e,o),n&&qe(e.requestHeaders).length>0&&(o[ec]=o[ec]||{},o[ec].requestHeaders=e.requestHeaders),r){var s=r();if(s){var c=s.correlationContext;if(c&&(o.correlationContext=c),s.headerMap&&qe(s.headerMap).length>0&&(o[ec]=o[ec]||{},o[ec].responseHeaders=s.headerMap),e.status>=400){var u=s.type;o[ec]=o[ec]||{},(""===u||"text"===u)&&(o[ec][a]=s[a]?s.statusText+" - "+s[a]:s.statusText),"json"===u&&(o[ec][a]=s.response?s.statusText+" - "+JSON.stringify(s.response):s.statusText)}}}return o}}))}})),oc=C((()=>{Dr(),Dr(),function(){function e(){}e.GetLength=function(e){var t=0;if(!Ie(e)){var n="";try{n=e.toString()}catch(e){}t=n.length,t=isNaN(t)?0:t}return t}}()})),ac=C((()=>{Dr(),rc=function(){function e(t,n){var r=this;r.traceFlag=e.DEFAULT_TRACE_FLAG,r.version=e.DEFAULT_VERSION,t&&e.isValidTraceId(t)?r.traceId=t:r.traceId=dr(),n&&e.isValidSpanId(n)?r.spanId=n:r.spanId=dr().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.prototype.toString=function(){var e=this;return e.version+"-"+e.traceId+"-"+e.spanId+"-"+e.traceFlag},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}()}));function sc(e){var t="";try{!Ie(e)&&!Ie(e[hc])&&!Ie(e[hc].requestUrl)&&(t+="(url: '"+e[hc].requestUrl+"')")}catch(e){}return t}function cc(e,t,n,r,i){e[pc]()[gc](he.CRITICAL,t,n,r,i)}function uc(e,t,n,r,i){e[pc]()[gc](he.WARNING,t,n,r,i)}function lc(e,t,n){return function(r){cc(e,t,n,{ajaxDiagnosticsMessage:sc(r.inst),exception:wt(r.err)})}}function dc(e,t){return e&&t?e.indexOf(t):-1}var fc,pc,hc,gc,mc,vc,yc,xc,wc,Ic,Cc,Tc,bc,Sc,Ec=C((()=>{F(),Ua(),Dr(),ic(),oc(),ac(),me(),fc="ai.ajxmn.",pc="diagLog",hc="ajaxData",gc="throwInternal",mc="fetch",vc=0,yc=function(e){function t(){var n=e.call(this)||this;n.identifier=t.identifier,n.priority=120;var r,i,o,c,u,l="trackDependencyDataInternal",d=ht(),f=!1,p=!1,h=d&&d.host&&d.host.toLowerCase(),g=t.getEmptyConfig(),m=!1,v=0,y=!1,x=0,w=!1,I=[],C={};return pe(t,n,(function(e,n){function d(e){var t=!0;return(e||g.ignoreHeaders)&&Ue(g.ignoreHeaders,(function(n){if(n.toLowerCase()===e.toLowerCase())return t=!1,-1})),t}function T(e,t,n){I.push(function(e,t,n){return e?Pr(e[s],t,n,!1):null}(e,t,n))}function b(e,t,n){var r=!1,i=((Me(t)?t:(t||{}).url||"")||"").toLowerCase();if(Ue(u,(function(e){var t=e;Me(e)&&(t=new RegExp(e)),r||(r=t.test(i))})),r)return r;var o=dc(i,"?"),a=dc(i,"#");return(-1===o||-1!==a&&a<o)&&(o=a),-1!==o&&(i=i.substring(0,o)),Ie(e)?Ie(t)||(r="object"==typeof t&&!0===t[ri]||!!n&&!0===n[ri]):r=!0===e[ri]||!0===i[ri],r?C[i]||(C[i]=1):C[i]&&(r=!0),r}function S(e,t){var n=!0,r=p;return Ie(e)||(n=!0===t||!Ie(e[hc])),r&&n}function P(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(e){}return null}function _(t){try{var n=t.getAllResponseHeaders();if(null!==n&&-1!==dc(n.toLowerCase(),Mr.requestContextHeaderLowerCase)){var r=t.getResponseHeader(Mr.requestContextHeader);return Ki.getCorrelationContext(r)}}catch(n){uc(e,ge.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:sc(t),exception:wt(n)})}}function k(e,t){if(t.requestUrl&&c&&y){var n=gt();if(n&&Se(n.mark)){vc++;var r=c+e+"#"+vc;n.mark(r);var i=n.getEntriesByName(r);i&&1===i.length&&(t.perfMark=i[0])}}}function A(e,t,n,r){var i=t.perfMark,o=gt(),a=g.maxAjaxPerfLookupAttempts,s=g.ajaxPerfLookupDelay,c=t.requestUrl,u=0;!function l(){try{if(o&&i){u++;for(var d=null,f=o.getEntries(),p=f.length-1;p>=0;p--){var h=f[p];if(h){if("resource"===h.entryType)h.initiatorType===e&&(-1!==dc(h.name,c)||-1!==dc(c,h.name))&&(d=h);else if("mark"===h.entryType&&h.name===i.name){t.perfTiming=d;break}if(h.startTime<i.startTime-1e3)break}}}!i||t.perfTiming||u>=a||!1===t.async?(i&&Se(o.clearMarks)&&o.clearMarks(i.name),t.perfAttempts=u,n()):setTimeout(l,s)}catch(e){r(e)}}()}function N(t){var n="";try{Ie(t)||(n+="string"==typeof t?"(url: '"+t+"')":"(url: '"+t.url+"')")}catch(t){cc(e,ge.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:wt(t)})}return n}function R(t,n,r,i,o,a){function s(t,n,i){var o=i||{};o.fetchDiagnosticsMessage=N(r),n&&(o.exception=wt(n)),uc(e,t,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",o)}i&&(i.responseFinishedTime=Vi(),i.status=n,A("fetch",i,(function(){var t=i.CreateTrackItem("Fetch",m,o);t?e[l](t):s(ge.FailedMonitorAjaxDur,null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})}),(function(e){s(ge.FailedMonitorAjaxGetCorrelationHeader,e,null)})))}function M(t){if(t&&t.headers)try{var n=t.headers.get(Mr.requestContextHeader);return Ki.getCorrelationContext(n)}catch(n){uc(e,ge.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:N(t),exception:wt(n)})}}e.initialize=function(h,v,C,N){if(!e.isInitialized()){n.initialize(h,v,C,N);var L=e._getTelCtx();_e(t.getDefaultConfig(),(function(e,n){g[e]=L.getConfig(t.identifier,e,n)}));var D=g.distributedTracingMode;if(m=g.enableRequestHeaderTracking,y=g.enableAjaxPerfTracking,x=g.maxAjaxCallsPerView,w=g.enableResponseHeaderTracking,u=g.excludeRequestFromAutoTrackingPatterns,o=D===li.AI||D===li.AI_AND_W3C,i=D===li.AI_AND_W3C||D===li.W3C,y){var F=h.instrumentationKey||"unkwn";c=F.length>5?fc+F.substring(F.length-5)+".":fc+F+"."}if(!1===g.disableAjaxTracking&&function(e){var t=!1;if(typeof XMLHttpRequest!==a&&!Ie(XMLHttpRequest)){var n=XMLHttpRequest[s];t=!(Ie(n)||Ie(n.open)||Ie(n.send)||Ie(n.abort))}var r=xt();if(r&&r<9&&(t=!1),t)try{(new XMLHttpRequest)[hc]={};var i=XMLHttpRequest[s].open;XMLHttpRequest[s].open=i}catch(n){t=!1,cc(e,ge.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:wt(n)})}return t}(e)&&!p&&(T(XMLHttpRequest,"open",{req:function(t,n,i,o){var a=t.inst,s=a[hc];!b(a,i)&&S(a,!0)&&(!s||!s.xhrMonitoringState.openDone)&&function(t,n,i,o){var a=r&&r.telemetryTrace&&r.telemetryTrace.traceID||dr(),s=dr().substr(0,16),c=new nc(a,s,e[pc]());c.method=n,c.requestUrl=i,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=o,t[hc]=c,function(t){t[hc].xhrMonitoringState.stateChangeAttached=Cr.Attach(t,"readystatechange",(function(){try{t&&4===t.readyState&&S(t)&&function(t){var n=t[hc];function r(n,r){var i=r||{};i.ajaxDiagnosticsMessage=sc(t),n&&(i.exception=wt(n)),uc(e,ge.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",i)}n.responseFinishedTime=Vi(),n.status=t.status,A("xmlhttprequest",n,(function(){try{var i=n.CreateTrackItem("Ajax",m,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:_(t),type:t.responseType,responseText:P(t),response:t.response};if(w){var n=t.getAllResponseHeaders();if(n){var r=Ve(n).split(/[\r\n]+/),i={};Ue(r,(function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");d(n)&&(i[n]=r)})),e.headerMap=i}}return e}));i?e[l](i):r(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}finally{try{t[hc]=null}catch(e){}}}),(function(e){r(e,null)}))}(t)}catch(r){var n=wt(r);(!n||-1===dc(n.toLowerCase(),"c00c023f"))&&cc(e,ge.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:sc(t),exception:n})}}))}(t)}(a,n,i,o)},hkErr:lc(e,ge.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),T(XMLHttpRequest,"send",{req:function(t,n){var r=t.inst,i=r[hc];S(r)&&!i.xhrMonitoringState.sendDone&&(k("xhr",i),i.requestSentTime=Vi(),e.includeCorrelationHeaders(i,void 0,void 0,r),i.xhrMonitoringState.sendDone=!0)},hkErr:lc(e,ge.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),T(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[hc];S(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:lc(e,ge.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),m&&T(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;S(r)&&d(t)&&(r[hc].requestHeaders[t]=n)},hkErr:lc(e,ge.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),p=!0),function(){var t=function(){var e=E();return!e||Ie(e.Request)||Ie(e.Request[s])||Ie(e[mc])?null:e[mc]}();if(t){var n=E(),i=t.polyfill;!1===g.disableFetchTracking?(I.push(Pr(n,mc,{req:function(t,n,o){var a;if(f&&!b(null,n,o)&&(!i||!p)){var s=t.ctx();a=function(t,n){var i=r&&r.telemetryTrace&&r.telemetryTrace.traceID||dr(),o=dr().substr(0,16),a=new nc(i,o,e[pc]());a.requestSentTime=Vi(),t instanceof Request?a.requestUrl=t?t.url:"":a.requestUrl=t;var s="GET";n&&n.method?s=n.method:t&&t instanceof Request&&(s=t.method),a.method=s;var c={};return m&&new Headers((n?n.headers:0)||t instanceof Request&&t.headers||{}).forEach((function(e,t){d(t)&&(c[t]=e)})),a.requestHeaders=c,k("fetch",a),a}(n,o);var c=e.includeCorrelationHeaders(a,n,o);c!==o&&t.set(1,c),s.data=a}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then((function(e){return R(0,(e||{}).status,e,n,(function(){var t={statusText:e.statusText,headerMap:null,correlationContext:M(e)};if(w){var n={};e.headers.forEach((function(e,t){d(t)&&(n[t]=e)})),t.headerMap=n}return t})),e})).catch((function(e){throw R(0,0,t,n,null,e.message),e})))},hkErr:lc(e,ge.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),f=!0):i&&I.push(Pr(n,mc,{req:function(e,t,n){b(null,t,n)}})),i&&(n[mc].polyfill=i)}}(),C.length>0&&C){for(var U=void 0,O=0;!U&&O<C.length;)C[O]&&C[O].identifier===Pa&&(U=C[O]),O++;U&&(r=U.context)}}},e.teardown=function(){Ue(I,(function(e){e.rm()})),I=[],f=!1,p=!1,e.setInitialized(!1)},e.trackDependencyData=function(t,n){e[l](t,n)},e.includeCorrelationHeaders=function(t,n,a,s){var c=e._currentWindowHost||h;if(n){if(Ki.canIncludeCorrelationHeader(g,t.getAbsoluteUrl(),c)){if(a||(a={}),a.headers=new Headers(a.headers||n instanceof Request&&n.headers||{}),o){var u="|"+t.traceID+"."+t.spanID;a.headers.set(Mr.requestIdHeader,u),m&&(t.requestHeaders[Mr.requestIdHeader]=u)}if((d=g.appId||r&&r.appId())&&(a.headers.set(Mr.requestContextHeader,Mr.requestContextAppIdFormat+d),m&&(t.requestHeaders[Mr.requestContextHeader]=Mr.requestContextAppIdFormat+d)),i){var l=new rc(t.traceID,t.spanID);a.headers.set(Mr.traceParentHeader,l.toString()),m&&(t.requestHeaders[Mr.traceParentHeader]=l.toString())}}return a}if(s){var d;if(Ki.canIncludeCorrelationHeader(g,t.getAbsoluteUrl(),c))o&&(u="|"+t.traceID+"."+t.spanID,s.setRequestHeader(Mr.requestIdHeader,u),m&&(t.requestHeaders[Mr.requestIdHeader]=u)),(d=g.appId||r&&r.appId())&&(s.setRequestHeader(Mr.requestContextHeader,Mr.requestContextAppIdFormat+d),m&&(t.requestHeaders[Mr.requestContextHeader]=Mr.requestContextAppIdFormat+d)),i&&(l=new rc(t.traceID,t.spanID),s.setRequestHeader(Mr.traceParentHeader,l.toString()),m&&(t.requestHeaders[Mr.traceParentHeader]=l.toString()));return s}},e[l]=function(t,n,r){if(-1===x||v<x){(g.distributedTracingMode===li.W3C||g.distributedTracingMode===li.AI_AND_W3C)&&"string"==typeof t.id&&"."!==t.id[t.id.length-1]&&(t.id+="."),Ie(t.startTime)&&(t.startTime=new Date);var i=ba.create(t,Ho.dataType,Ho.envelopeType,e[pc](),n,r);e.core.track(i)}else v===x&&cc(e,ge.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++v}})),n}return A(t,e),t.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:void 0,disableCorrelationHeaders:!1,distributedTracingMode:li.AI_AND_W3C,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,correlationHeaderExcludePatterns:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"]}},t.getEmptyConfig=function(){var e=this.getDefaultConfig();return _e(e,(function(t){e[t]=void 0})),e},t.prototype.processTelemetry=function(e,t){this.processNext(e,t)},t.identifier="AjaxDependencyPlugin",t}(tn)})),Pc=C((()=>{Ec()})),_c=C((()=>{Dr(),Xa(),As(),Js(),Pc(),Ua(),wc=["snippet","dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],Ic={__proto__:null,PropertiesPluginIdentifier:Pa,BreezeChannelIdentifier:_a,AnalyticsPluginIdentifier:ka,Util:zi,CorrelationIdHelper:Ki,UrlHelper:Gi,DateTimeUtils:Wi,ConnectionStringParser:Zi,FieldType:{Default:0,Required:1,Array:2,Hidden:4},RequestHeaders:Mr,DisabledPropertyName:ri,ProcessLegacy:oi,SampleRate:ii,HttpMethod:ai,DEFAULT_BREEZE_ENDPOINT:si,AIData:eo,AIBase:Yi,Envelope:no,Event:io,Exception:Ro,Metric:jo,PageView:Vo,PageViewData:Bo,RemoteDependencyData:Ho,Trace:Go,PageViewPerformance:Wo,Data:$o,SeverityLevel:Xo,ConfigurationManager:Jo,ContextTagKeys:Ta,DataSanitizer:$r,TelemetryItemCreator:ba,CtxTagKeys:Ea,Extensions:Sa,DistributedTracingModes:li},Cc=function(){function e(e){var t=this;t._snippetVersion=""+(e.sv||e.version||""),e.queue=e.queue||[],e.version=e.version||2;var n=e.config||{};if(n.connectionString){var r=Xi(n.connectionString),i=r.ingestionendpoint;n.endpointUrl=i?i+"/v2/track":n.endpointUrl,n.instrumentationKey=r.instrumentationkey||n.instrumentationKey}t.appInsights=new za,t.properties=new Ws,t.dependencies=new yc,t.core=new zn,t._sender=new Ts,t.snippet=e,t.config=n,t.getSKUDefaults()}return e.prototype.getCookieMgr=function(){return this.appInsights.getCookieMgr()},e.prototype.trackEvent=function(e,t){this.appInsights.trackEvent(e,t)},e.prototype.trackPageView=function(e){var t=e||{};this.appInsights.trackPageView(t)},e.prototype.trackPageViewPerformance=function(e){var t=e||{};this.appInsights.trackPageViewPerformance(t)},e.prototype.trackException=function(e){e&&!e.exception&&e.error&&(e.exception=e.error),this.appInsights.trackException(e)},e.prototype._onerror=function(e){this.appInsights._onerror(e)},e.prototype.trackTrace=function(e,t){this.appInsights.trackTrace(e,t)},e.prototype.trackMetric=function(e,t){this.appInsights.trackMetric(e,t)},e.prototype.startTrackPage=function(e){this.appInsights.startTrackPage(e)},e.prototype.stopTrackPage=function(e,t,n,r){this.appInsights.stopTrackPage(e,t,n,r)},e.prototype.startTrackEvent=function(e){this.appInsights.startTrackEvent(e)},e.prototype.stopTrackEvent=function(e,t,n){this.appInsights.stopTrackEvent(e,t,n)},e.prototype.addTelemetryInitializer=function(e){return this.appInsights.addTelemetryInitializer(e)},e.prototype.setAuthenticatedUserContext=function(e,t,n){void 0===n&&(n=!1),this.properties.context.user.setAuthenticatedUserContext(e,t,n)},e.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},e.prototype.trackDependencyData=function(e){this.dependencies.trackDependencyData(e)},e.prototype.flush=function(e){var t=this;void 0===e&&(e=!0),Ht(this.core,(function(){return"AISKU.flush"}),(function(){Ue(t.core.getTransmissionControls(),(function(t){Ue(t,(function(t){t.flush(e)}))}))}),null,e)},e.prototype.onunloadFlush=function(e){void 0===e&&(e=!0),Ue(this.core.getTransmissionControls(),(function(t){Ue(t,(function(t){t.onunloadFlush?t.onunloadFlush():t.flush(e)}))}))},e.prototype.loadAppInsights=function(e,t,n){var r=this;void 0===e&&(e=!1);var i=this;return e&&i.config.extensions&&i.config.extensions.length>0&&Je("Extensions not allowed in legacy mode"),Ht(i.core,(function(){return"AISKU.loadAppInsights"}),(function(){var o=[];o.push(i._sender),o.push(i.properties),o.push(i.dependencies),o.push(i.appInsights),i.core.initialize(i.config,o,t,n),i.context=i.properties.context,xc&&i.context&&(i.context.internal.sdkSrc=xc),function(t){if(t){var n="";Ie(i._snippetVersion)||(n+=i._snippetVersion),e&&(n+=".lg"),i.context&&i.context.internal&&(i.context.internal.snippetVer=n||"-"),_e(i,(function(e,n){Me(e)&&!Se(n)&&e&&"_"!==e[0]&&-1===wc.indexOf(e)&&(t[e]=n)}))}}(i.snippet),i.emptyQueue(),i.pollInternalLogs(),i.addHousekeepingBeforeUnload(r)})),i},e.prototype.updateSnippetDefinitions=function(e){Qe(e,this,(function(e){return e&&-1===wc.indexOf(e)}))},e.prototype.emptyQueue=function(){var e=this;try{if(Ne(e.snippet.queue)){for(var t=e.snippet.queue.length,n=0;n<t;n++)(0,e.snippet.queue[n])();e.snippet.queue=void 0,delete e.snippet.queue}}catch(e){e&&Se(e.toString)&&e.toString()}},e.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},e.prototype.addHousekeepingBeforeUnload=function(e){if(ut()||dt()){var t=function(){e.onunloadFlush(!1),Ue(e.appInsights.core._extensions,(function(e){if(e.identifier===Pa)return e&&e.context&&e.context._sessionManager&&e.context._sessionManager.backup(),-1}))};if(!e.appInsights.config.disableFlushOnBeforeUnload){var n=sr("beforeunload",t);n=sr("unload",t)||n,n=sr("pagehide",t)||n,!(n=sr("visibilitychange",t)||n)&&!function(){var e=pt();return!(!e||!e.product)&&e.product===Nt}()&&e.appInsights.core.logger.throwInternal(he.CRITICAL,ge.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload and pagehide")}e.appInsights.config.disableFlushOnUnload||(sr("pagehide",t),sr("visibilitychange",t))}},e.prototype.getSender=function(){return this._sender},e.prototype.getSKUDefaults=function(){var e=this;e.config.diagnosticLogInterval=e.config.diagnosticLogInterval&&e.config.diagnosticLogInterval>0?e.config.diagnosticLogInterval:1e4},e}(),function(){var e=null,t=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var n=(document||{}).currentScript;n&&(e=n.src)}catch(e){}if(e)try{var r=e.toLowerCase();if(r)for(var i="",o=0;o<t.length;o++)if(-1!==r.indexOf(t[o])){i="cdn"+(o+1),-1===r.indexOf("/scripts/")&&(-1!==r.indexOf("/next/")?i+="-next":-1!==r.indexOf("/beta/")&&(i+="-beta")),xc=i+"";break}}catch(e){}}()})),kc=C((()=>{Ua(),Dr(),Tc=["snippet","getDefaultConfig","_hasLegacyInitializers","_queue","_processLegacyInitializers"],bc=function(){function e(t,n){this._hasLegacyInitializers=!1,this._queue=[],this.config=e.getDefaultConfig(t.config),this.appInsightsNew=n,this.context={addTelemetryInitializer:this.addTelemetryInitializers.bind(this)}}return e.getDefaultConfig=function(e){return e||(e={}),e.endpointUrl=e.endpointUrl||"https://dc.services.visualstudio.com/v2/track",e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.maxBatchSizeInBytes=e.maxBatchSizeInBytes>0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=Zr(e.enableDebug),e.disableExceptionTracking=Zr(e.disableExceptionTracking),e.disableTelemetry=Zr(e.disableTelemetry),e.verboseLogging=Zr(e.verboseLogging),e.emitLineDelimitedJson=Zr(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=Zr(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=Zr(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=Zr(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=Zr(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=Zr(e.disableFlushOnBeforeUnload),e.disableFlushOnUnload=Zr(e.disableFlushOnUnload,e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=Zr(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=Zr(e.isRetryDisabled),e.isCookieUseDisabled=Zr(e.isCookieUseDisabled),e.isStorageUseDisabled=Zr(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=Zr(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=Zr(e.enableCorsCorrelation),e},e.prototype.addTelemetryInitializers=function(e){var t=this;this._hasLegacyInitializers||(this.appInsightsNew.addTelemetryInitializer((function(e){t._processLegacyInitializers(e)})),this._hasLegacyInitializers=!0),this._queue.push(e)},e.prototype.getCookieMgr=function(){return this.appInsightsNew.getCookieMgr()},e.prototype.startTrackPage=function(e){this.appInsightsNew.startTrackPage(e)},e.prototype.stopTrackPage=function(e,t,n,r){this.appInsightsNew.stopTrackPage(e,t,n)},e.prototype.trackPageView=function(e,t,n,r,i){var o={name:e,uri:t,properties:n,measurements:r};this.appInsightsNew.trackPageView(o)},e.prototype.trackEvent=function(e,t,n){this.appInsightsNew.trackEvent({name:e})},e.prototype.trackDependency=function(e,t,n,r,i,o,a){this.appInsightsNew.trackDependencyData({id:e,target:n,type:r,duration:i,properties:{HttpMethod:t},success:o,responseCode:a})},e.prototype.trackException=function(e,t,n,r,i){this.appInsightsNew.trackException({exception:e})},e.prototype.trackMetric=function(e,t,n,r,i,o){this.appInsightsNew.trackMetric({name:e,average:t,sampleCount:n,min:r,max:i})},e.prototype.trackTrace=function(e,t,n){this.appInsightsNew.trackTrace({message:e,severityLevel:n})},e.prototype.flush=function(e){this.appInsightsNew.flush(e)},e.prototype.setAuthenticatedUserContext=function(e,t,n){this.appInsightsNew.context.user.setAuthenticatedUserContext(e,t,n)},e.prototype.clearAuthenticatedUserContext=function(){this.appInsightsNew.context.user.clearAuthenticatedUserContext()},e.prototype._onerror=function(e,t,n,r,i){this.appInsightsNew._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i})},e.prototype.startTrackEvent=function(e){this.appInsightsNew.startTrackEvent(e)},e.prototype.stopTrackEvent=function(e,t,n){this.appInsightsNew.stopTrackEvent(e,t,n)},e.prototype.downloadAndSetup=function(e){Je("downloadAndSetup not implemented in web SKU")},e.prototype.updateSnippetDefinitions=function(e){Qe(e,this,(function(e){return e&&-1===Tc.indexOf(e)}))},e.prototype.loadAppInsights=function(){var e=this;if(this.config.iKey){var t=this.trackPageView;this.trackPageView=function(n,r,i){t.apply(e,[null,n,r,i])}}var n="logPageView";"function"==typeof this.snippet[n]&&(this[n]=function(t,n,r){e.trackPageView(null,t,n,r)});var r="logEvent";return"function"==typeof this.snippet[r]&&(this[r]=function(t,n,r){e.trackEvent(t,n,r)}),this},e.prototype._processLegacyInitializers=function(e){return e.tags[oi]=this._queue,e},e}()})),Ac=C((()=>{kc(),_c(),Dr(),Sc=function(){function e(){}return e.getAppInsights=function(e,t){var n=new Cc(e),r=2!==t;if(fr(),2===t)return n.updateSnippetDefinitions(e),n.loadAppInsights(r),n;var i=new bc(e,n);return i.updateSnippetDefinitions(e),n.loadAppInsights(r),i},e}()})),Nc={};((e,t)=>{for(var n in(e=>{m(e,"__esModule",{value:!0})})(e),t)m(e,n,{get:t[n],enumerable:!0})})(Nc,{AppInsightsCore:()=>zn,ApplicationAnalytics:()=>za,ApplicationInsights:()=>Cc,ApplicationInsightsContainer:()=>Sc,BaseCore:()=>qn,BaseTelemetryPlugin:()=>tn,CoreUtils:()=>wr,DependenciesPlugin:()=>yc,DistributedTracingModes:()=>li,Event:()=>io,Exception:()=>Ro,LoggingSeverity:()=>he,Metric:()=>jo,NotificationManager:()=>Hn,PageView:()=>Vo,PageViewPerformance:()=>Wo,PerfEvent:()=>zt,PerfManager:()=>Gt,PropertiesPlugin:()=>Ws,RemoteDependencyData:()=>Ho,Sender:()=>Ts,SeverityLevel:()=>Xo,Telemetry:()=>Ic,Trace:()=>Go,Util:()=>zi,_InternalMessageId:()=>ge,doPerf:()=>Ht});var Rc,Mc,Lc=C((()=>{_c(),Ac(),Dr(),Ua(),As(),Xa(),Js(),Pc()}));function Dc(){return void 0!==g.env.isTelemetryEnabled?g.env.isTelemetryEnabled?Rc.ON:Rc.OFF:g.workspace.getConfiguration("telemetry").get("enableTelemetry")?Rc.ON:Rc.OFF}(Mc=Rc||(Rc={})).ON="on",Mc.OFF="off";var Fc=e=>T(void 0,null,(function*(){let t;try{let n,r=yield Promise.resolve().then((()=>(Lc(),Nc)));e&&0===e.indexOf("AIF-")&&(n="https://vortex.data.microsoft.com/collect/v1"),t=new r.ApplicationInsights({config:{instrumentationKey:e,endpointUrl:n,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!0,disableInstrumentationKeyValidation:!0}}),t.loadAppInsights();let i=Dc();n&&i===Rc.ON&&fetch(n).catch((()=>t=void 0))}catch(e){return Promise.reject(e)}return{logEvent:(e,n)=>{null==t||t.trackEvent({name:e},I(I({},null==n?void 0:n.properties),null==n?void 0:n.measurements))},logException:(e,n)=>{null==t||t.trackException({exception:e,properties:I(I({},null==n?void 0:n.properties),null==n?void 0:n.measurements)})},flush:()=>T(void 0,null,(function*(){null==t||t.flush()}))}})),Uc=class extends class{constructor(e,t,n,r,i){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=n,this.osShim=r,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!i,this.updateUserOptStatus(),void 0!==g.env.onDidChangeTelemetryEnabled?(this.disposables.push(g.env.onDidChangeTelemetryEnabled((()=>this.updateUserOptStatus()))),this.disposables.push(g.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))):this.disposables.push(g.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))}updateUserOptStatus(){let e=Dc();this.userOptIn=e===Rc.ON,this.errorOptIn=e===Rc.ON,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach((n=>{0===e.indexOf(`${n}`)&&(t=n)})),t}get extension(){return void 0===this._extension&&(this._extension=g.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let n={};for(let r in e)n[r]=t(r,e[r]);return n}shouldSendErrorTelemetry(){return!(!1===this.errorOptIn||this.firstParty&&"other"===this.cleanRemoteName(g.env.remoteName)&&(void 0===this.extension||this.extension.extensionKind===g.ExtensionKind.Workspace||g.env.uiKind===g.UIKind.Web))}getCommonProperties(){let e=Object.create(null);if(e["common.os"]=this.osShim.platform,e["common.nodeArch"]=this.osShim.architecture,e["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,g&&g.env){switch(e["common.vscodemachineid"]=g.env.machineId,e["common.vscodesessionid"]=g.env.sessionId,e["common.vscodeversion"]=g.version,e["common.isnewappinstall"]=g.env.isNewAppInstall?g.env.isNewAppInstall.toString():"false",e["common.product"]=g.env.appHost,g.env.uiKind){case g.UIKind.Web:e["common.uikind"]="web";break;case g.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(g.env.remoteName)}return e}anonymizeFilePaths(e,t){let n;if(null==e)return"";let r=[];""!==g.env.appRoot&&r.push(new RegExp(g.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let i=e;if(t){let t=[];for(let i of r)for(;(n=i.exec(e))&&n;)t.push([n.index,i.lastIndex]);let o=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,a=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,s=0;for(i="";(n=a.exec(e))&&n;)n[0]&&!o.test(n[0])&&t.every((([e,t])=>n.index<e||n.index>=t))&&(i+=e.substring(s,n.index)+"<REDACTED: user-file-path>",s=a.lastIndex);s<e.length&&(i+=e.substr(s))}for(let e of r)i=i.replace(e,"");return i}removePropertiesWithPossibleUserInfo(e){if("object"!=typeof e)return;let t=Object.create(null);for(let n of Object.keys(e)){let r=e[n];if(!r)continue;let i=/@[a-zA-Z0-9-.]+/,o=/xox[pbaors]-[a-zA-Z0-9]+-[a-zA-Z0-9-]+?/;/(key|token|sig|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/.test(r.toLowerCase())?t[n]="<REDACTED: secret>":i.test(r)?t[n]="<REDACTED: email>":o.test(r)?t[n]="<REDACTED: token>":t[n]=r}return t}sendTelemetryEvent(e,t,n){if(this.userOptIn&&""!==e){t=I(I({},t),this.getCommonProperties());let r=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:this.removePropertiesWithPossibleUserInfo(r),measurements:n})}}sendRawTelemetryEvent(e,t,n){this.userOptIn&&""!==e&&(t=I(I({},t),this.getCommonProperties()),this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:t,measurements:n}))}sendTelemetryErrorEvent(e,t,n,r){if(this.errorOptIn&&""!==e){t=I(I({},t),this.getCommonProperties());let i=this.cloneAndChange(t,((e,t)=>this.shouldSendErrorTelemetry()?this.anonymizeFilePaths(t,this.firstParty):void 0===r||-1!==r.indexOf(e)?"REDACTED":this.anonymizeFilePaths(t,this.firstParty)));this.telemetryAppender.logEvent(`${this.extensionId}/${e}`,{properties:this.removePropertiesWithPossibleUserInfo(i),measurements:n})}}sendTelemetryException(e,t,n){if(this.shouldSendErrorTelemetry()&&this.errorOptIn&&e){t=I(I({},t),this.getCommonProperties());let r=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));e.stack&&(e.stack=this.anonymizeFilePaths(e.stack,this.firstParty)),this.telemetryAppender.logException(e,{properties:this.removePropertiesWithPossibleUserInfo(r),measurements:n})}}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map((e=>e.dispose())))}}{constructor(e,t,n,r){let i=new class{constructor(e,t){this._isInstantiated=!1,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e,Dc()!==Rc.OFF&&this.instantiateAppender()}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):!this._isInstantiated&&Dc()===Rc.ON&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):!this._isInstantiated&&Dc()!==Rc.OFF&&this._exceptionQueue.push({exception:e,data:t})}flush(){return T(this,null,(function*(){this._telemetryClient&&(yield this._telemetryClient.flush(),this._telemetryClient=void 0)}))}_flushQueues(){this._eventQueue.forEach((({eventName:e,data:t})=>this.logEvent(e,t))),this._eventQueue=[],this._exceptionQueue.forEach((({exception:e,data:t})=>this.logException(e,t))),this._exceptionQueue=[]}instantiateAppender(){this._isInstantiated||this._clientFactory(this._key).then((e=>{this._telemetryClient=e,this._isInstantiated=!0,this._flushQueues()})).catch((e=>{console.error(e)}))}}(n,Fc);n&&0===n.indexOf("AIF-")&&(r=!0),super(e,t,i,{release:navigator.appVersion,platform:"web",architecture:"web"},r)}}},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(4372),a=n(5327),s=n(4097),c=n(4109),u=n(7985),l=n(5061);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,p=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(g+":"+m)}var v=s(e.baseURL,e.url);function y(){if(h){var r="getAllResponseHeaders"in h?c(h.getAllResponseHeaders()):null,o={data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,n,o),h=null}}if(h.open(e.method.toUpperCase(),a(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(n(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var x=(e.withCredentials||u(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;x&&(f[e.xsrfHeaderName]=x)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),p&&"json"!==p&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),a=n(7185);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var c=s(n(5655));c.Axios=o,c.create=function(e){return s(a(c.defaults,e))},c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.all=function(e){return Promise.all(e)},c.spread=n(8713),c.isAxiosError=n(6268),e.exports=c,e.exports.default=c},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),a=n(3572),s=n(7185),c=n(4875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{i=a(d)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),a=n(5655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function u(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(o,u),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var l=i.concat(o).concat(a).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(d,u),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5655);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),o=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(696),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},a=r.version.split(".");function s(e,t){for(var n=t?t.split("."):a,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&s(t);function a(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(a(r," has been removed in "+t));return i&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],c=void 0===s||a(s,o,e);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:c,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},696:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},3300:(e,t)=>{"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},4802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6363);t.ExperimentationService=r.ExperimentationService},6363:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4067),i=n(4234),o=n(5975);class a extends o.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],null!=e.refetchInterval?e.refetchInterval:0,e.featuresTelemetryPropertyName,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new r.TasApiFeatureProvider(new i.AxiosHttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}}t.ExperimentationService=a,a.REFRESH_RATE_IN_MINUTES=30},5975:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3663),i=n(3334);class o extends r.ExperimentationServiceBase{constructor(e,t,n,r,o,a,s,c){if(super(e,r,o,a,s,c),this.telemetry=e,this.filterProviders=t,this.refreshRateMs=n,this.featuresTelemetryPropertyName=r,this.assignmentContextTelemetryPropertyName=o,this.telemetryEventName=a,this.storageKey=s,this.storage=c,n<1e3&&0!==n)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 i.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}return await super.getFeaturesAsync(e)}}t.ExperimentationServiceAutoPolling=o},3663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7002);t.ExperimentationServiceBase=class{constructor(e,t,n,i,o,a){this.telemetry=e,this.featuresTelemetryPropertyName=t,this.assignmentContextTelemetryPropertyName=n,this.telemetryEventName=i,this.storageKey=o,this.storage=a,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(a=new r.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise(((e,t)=>{this.resolveInitialFetchPromise=e}))}get features(){return this._features}set features(e){this._features=e,this.telemetry&&(this.telemetry.setSharedProperty(this.featuresTelemetryPropertyName,this.features.features.join(";")),this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext))}async getFeaturesAsync(e=!1){if(null!=this.fetchPromise){try{await this.fetchPromise}catch(e){}return this.features}if(!this.featureProviders||0===this.featureProviders.length)return Promise.resolve({features:[],assignmentContext:"",configs:[]});this.fetchPromise=Promise.all(this.featureProviders.map((async e=>await e.getFeatures())));try{const t=await this.fetchPromise;this.updateFeatures(t,e)}catch(e){}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 t of e){for(let e of t.features)n.features.includes(e)||n.features.push(e);for(let e of t.configs){const t=n.configs.find((t=>t.Id===e.Id));t?t.Parameters=Object.assign(Object.assign({},t.Parameters),e.Parameters):n.configs.push(e)}n.assignmentContext+=t.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),void 0!==e&&void 0===e.configs&&(e.configs=[])),0===this.features.features.length&&(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){const t=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(e),t.features.includes(e)}getTreatmentVariable(e,t){var n;return this.featuresConsumed=!0,this.PostEventToTelemetry(`${e}.${t}`),null===(n=this.features.configs.find((t=>t.Id===e)))||void 0===n?void 0:n.Parameters[t]}async getTreatmentVariableAsync(e,t,n){if(n){const n=this.featuresConsumed,r=this.getTreatmentVariable(e,t);if(void 0!==r)return r;this.featuresConsumed=n}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(null!=e&&null!=this.featureProviders)for(let t of e)this.featureProviders.push(t)}}},69:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseFeatureProvider=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}}},4e3:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(69);class i extends r.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 t of n.keys()){let r=n.get(t);e.set(t,r)}}return e}PostEventToTelemetry(e){if(this.cachedTelemetryEvents.includes(e))return;const t=JSON.stringify(e);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",t]])),this.cachedTelemetryEvents.push(e)}}t.FilteredFeatureProvider=i},4067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4e3);class i extends r.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 n of e.keys()){const r=e.get(n);t[n]=r}let n=await this.httpClient.get({headers:t});e.keys.length>0&&this.PostEventToTelemetry(t);let r=n.data,i=r.Configs,o=[];for(let e of i)if(e.Parameters)for(let t of Object.keys(e.Parameters)){const n=t+(e.Parameters[t]?"":"cf");o.includes(n)||o.push(n)}return{features:o,assignmentContext:r.AssignmentContext,configs:i}}}t.TasApiFeatureProvider=i},4234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9669);t.AxiosHttpClient=class{constructor(e){this.endpoint=e}get(e){return r.default.get(this.endpoint,Object.assign(Object.assign({},e),{proxy:!1}))}}},7002:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryKeyValueStorage=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)}}},3334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingService=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(),null!=this.onTick&&(e&&this.onTick().then((()=>{})).catch((()=>{})),this.intervalHandle=setInterval((async()=>{await this.onTick()}),this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}}},3234:(e,t,n)=>{"use strict";n.r(t),n.d(t,{v1:()=>p,v3:()=>C,v4:()=>T,v5:()=>E});var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var a=[],s=0;s<256;++s)a.push((s+256).toString(16).substr(1));const c=function(e,t){var n=t||0,r=a;return(r[e[n+0]]+r[e[n+1]]+r[e[n+2]]+r[e[n+3]]+"-"+r[e[n+4]]+r[e[n+5]]+"-"+r[e[n+6]]+r[e[n+7]]+"-"+r[e[n+8]]+r[e[n+9]]+"-"+r[e[n+10]]+r[e[n+11]]+r[e[n+12]]+r[e[n+13]]+r[e[n+14]]+r[e[n+15]]).toLowerCase()};var u,l,d=0,f=0;const p=function(e,t,n){var r=t&&n||0,i=t||[],a=(e=e||{}).node||u,s=void 0!==e.clockseq?e.clockseq:l;if(null==a||null==s){var p=e.random||(e.rng||o)();null==a&&(a=u=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==s&&(s=l=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:Date.now(),g=void 0!==e.nsecs?e.nsecs:f+1,m=h-d+(g-f)/1e4;if(m<0&&void 0===e.clockseq&&(s=s+1&16383),(m<0||h>d)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=h,f=g,l=s;var v=(1e4*(268435455&(h+=122192928e5))+g)%4294967296;i[r++]=v>>>24&255,i[r++]=v>>>16&255,i[r++]=v>>>8&255,i[r++]=255&v;var y=h/4294967296*1e4&268435455;i[r++]=y>>>8&255,i[r++]=255&y,i[r++]=y>>>24&15|16,i[r++]=y>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var x=0;x<6;++x)i[r+x]=a[x];return t||c(i)};function h(e,t,n){function r(e,r,i,o){var a=i&&o||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(r)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(r)||16!==r.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var s=n(r.concat(e));if(s[6]=15&s[6]|t,s[8]=63&s[8]|128,i)for(var u=0;u<16;++u)i[a+u]=s[u];return i||c(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function g(e){return 14+(e+64>>>9<<4)+1}function m(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t,n,r,i,o){return m((a=m(m(t,e),m(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function y(e,t,n,r,i,o,a){return v(t&n|~t&r,e,t,i,o,a)}function x(e,t,n,r,i,o,a){return v(t&r|n&~r,e,t,i,o,a)}function w(e,t,n,r,i,o,a){return v(t^n^r,e,t,i,o,a)}function I(e,t,n,r,i,o,a){return v(n^(t|~r),e,t,i,o,a)}const C=h("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>5]>>>i%32&255,a=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[g(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=n,c=r,u=i,l=o;n=y(n,r,i,o,e[a],7,-680876936),o=y(o,n,r,i,e[a+1],12,-389564586),i=y(i,o,n,r,e[a+2],17,606105819),r=y(r,i,o,n,e[a+3],22,-1044525330),n=y(n,r,i,o,e[a+4],7,-176418897),o=y(o,n,r,i,e[a+5],12,1200080426),i=y(i,o,n,r,e[a+6],17,-1473231341),r=y(r,i,o,n,e[a+7],22,-45705983),n=y(n,r,i,o,e[a+8],7,1770035416),o=y(o,n,r,i,e[a+9],12,-1958414417),i=y(i,o,n,r,e[a+10],17,-42063),r=y(r,i,o,n,e[a+11],22,-1990404162),n=y(n,r,i,o,e[a+12],7,1804603682),o=y(o,n,r,i,e[a+13],12,-40341101),i=y(i,o,n,r,e[a+14],17,-1502002290),n=x(n,r=y(r,i,o,n,e[a+15],22,1236535329),i,o,e[a+1],5,-165796510),o=x(o,n,r,i,e[a+6],9,-1069501632),i=x(i,o,n,r,e[a+11],14,643717713),r=x(r,i,o,n,e[a],20,-373897302),n=x(n,r,i,o,e[a+5],5,-701558691),o=x(o,n,r,i,e[a+10],9,38016083),i=x(i,o,n,r,e[a+15],14,-660478335),r=x(r,i,o,n,e[a+4],20,-405537848),n=x(n,r,i,o,e[a+9],5,568446438),o=x(o,n,r,i,e[a+14],9,-1019803690),i=x(i,o,n,r,e[a+3],14,-187363961),r=x(r,i,o,n,e[a+8],20,1163531501),n=x(n,r,i,o,e[a+13],5,-1444681467),o=x(o,n,r,i,e[a+2],9,-51403784),i=x(i,o,n,r,e[a+7],14,1735328473),n=w(n,r=x(r,i,o,n,e[a+12],20,-1926607734),i,o,e[a+5],4,-378558),o=w(o,n,r,i,e[a+8],11,-2022574463),i=w(i,o,n,r,e[a+11],16,1839030562),r=w(r,i,o,n,e[a+14],23,-35309556),n=w(n,r,i,o,e[a+1],4,-1530992060),o=w(o,n,r,i,e[a+4],11,1272893353),i=w(i,o,n,r,e[a+7],16,-155497632),r=w(r,i,o,n,e[a+10],23,-1094730640),n=w(n,r,i,o,e[a+13],4,681279174),o=w(o,n,r,i,e[a],11,-358537222),i=w(i,o,n,r,e[a+3],16,-722521979),r=w(r,i,o,n,e[a+6],23,76029189),n=w(n,r,i,o,e[a+9],4,-640364487),o=w(o,n,r,i,e[a+12],11,-421815835),i=w(i,o,n,r,e[a+15],16,530742520),n=I(n,r=w(r,i,o,n,e[a+2],23,-995338651),i,o,e[a],6,-198630844),o=I(o,n,r,i,e[a+7],10,1126891415),i=I(i,o,n,r,e[a+14],15,-1416354905),r=I(r,i,o,n,e[a+5],21,-57434055),n=I(n,r,i,o,e[a+12],6,1700485571),o=I(o,n,r,i,e[a+3],10,-1894986606),i=I(i,o,n,r,e[a+10],15,-1051523),r=I(r,i,o,n,e[a+1],21,-2054922799),n=I(n,r,i,o,e[a+8],6,1873313359),o=I(o,n,r,i,e[a+15],10,-30611744),i=I(i,o,n,r,e[a+6],15,-1560198380),r=I(r,i,o,n,e[a+13],21,1309151649),n=I(n,r,i,o,e[a+4],6,-145523070),o=I(o,n,r,i,e[a+11],10,-1120210379),i=I(i,o,n,r,e[a+2],15,718787259),r=I(r,i,o,n,e[a+9],21,-343485551),n=m(n,s),r=m(r,c),i=m(i,u),o=m(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(g(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),T=function(e,t,n){"string"==typeof e&&(t="binary"===e?new Uint8Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){for(var i=n||0,a=0;a<16;++a)t[i+a]=r[a];return t}return c(r)};function b(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function S(e,t){return e<<t|e>>>32-t}const E=h("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}e.push(128);for(var o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<a;++d){for(var f=new Uint32Array(80),p=0;p<16;++p)f[p]=s[d][p];for(var h=16;h<80;++h)f[h]=S(f[h-3]^f[h-8]^f[h-14]^f[h-16],1);for(var g=n[0],m=n[1],v=n[2],y=n[3],x=n[4],w=0;w<80;++w){var I=Math.floor(w/20),C=S(g,5)+b(I,m,v,y)+x+t[I]+f[w]>>>0;x=y,y=v,v=S(m,30)>>>0,m=g,g=C}n[0]=n[0]+g>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+x>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))},189:function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=void 0;var i=n(1926),o=n(800),a=n(800);function s(e){return function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if("number"==typeof e)throw new Error("Browser implementation does currently not support externalized strings.");return o.localize.apply(void 0,r([e,t],n))}}function c(e){return o.setPseudo("pseudo"===(null==e?void 0:e.locale.toLowerCase())),s}Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}}),t.loadMessageBundle=s,t.config=c,i.default.install(Object.freeze({loadMessageBundle:s,config:c}))},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,i,o,a=n(1926);function s(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],i=n[r],o=e;return"string"==typeof i?o=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(o=String(i)),o}))}(o=t.MessageFormat||(t.MessageFormat={})).file="file",o.bundle="bundle",o.both="both",(i=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",i.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&s(t.key)&&s(t.comment)}}(r||(r={})),t.isDefined=s,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return c(t,n)},t.loadMessageBundle=function(e){return a.default().loadMessageBundle(e)},t.config=function(e){return a.default().config(e)}},1926:(e,t)=>{"use strict";var n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},9035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5654);t.getExperimentationService=r.getExperimentationService,t.getExperimentationServiceAsync=r.getExperimentationServiceAsync;var i=n(2560);t.TargetPopulation=i.TargetPopulation},5708:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MementoKeyValueStorage=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)}}},4619:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=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)}}},2560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i{constructor(e,t,n){this.extensionName=e,this.extensionVersion=t,this.targetPopulation=n}static trimVersionSuffix(e){return e.split(/\-[a-zA-Z0-9]+$/)[0]}getFilterValue(e){switch(e){case o.ApplicationVersion:return i.trimVersionSuffix(r.version);case o.Build:return r.env.appName;case o.ClientId:return r.env.machineId;case o.ExtensionName:return this.extensionName;case o.ExtensionVersion:return i.trimVersionSuffix(this.extensionVersion);case o.Language:return r.env.language;case o.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let e=new Map,t=Object.values(o);for(let n of t)e.set(n,this.getFilterValue(n));return e}}var o,a;t.VSCodeFilterProvider=i,function(e){e.Market="X-MSEdge-Market",e.CorpNet="X-FD-Corpnet",e.ApplicationVersion="X-VSCode-AppVersion",e.Build="X-VSCode-Build",e.ClientId="X-MSEdge-ClientId",e.ExtensionName="X-VSCode-ExtensionName",e.ExtensionVersion="X-VSCode-ExtensionVersion",e.Language="X-VSCode-Language",e.TargetPopulation="X-VSCode-TargetPopulation"}(o=t.Filters||(t.Filters={})),(a=t.TargetPopulation||(t.TargetPopulation={})).Team="team",a.Internal="internal",a.Insiders="insider",a.Public="public"},5654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2560),i=n(4802),o=n(7549),a=n(5708),s=n(4619);function c(e,t,n,c,u,...l){if(!u)throw new Error("Memento storage was not provided.");const d=o.workspace.getConfiguration("telemetry");if(!(void 0===o.env.isTelemetryEnabled?d.get("enableTelemetry",!0):o.env.isTelemetryEnabled))return new s.default;const f=[new r.VSCodeFilterProvider(e,t,n),...l],p=new a.MementoKeyValueStorage(u);return new i.ExperimentationService({filterProviders:f,telemetry:c,storageKey:"VSCode.ABExp.FeatureData",keyValueStorage:p,featuresTelemetryPropertyName:"VSCode.ABExp.Features",assignmentContextTelemetryPropertyName:"abexp.assignmentcontext",telemetryEventName:"query-expfeature",endpoint:"https://default.exp-tas.com/vscode/ab",refetchInterval:18e5})}t.getExperimentationService=c,t.getExperimentationServiceAsync=async function(e,t,n,r,i,...o){const a=c(e,t,n,r,i,...o);return await a.initializePromise,a}},3545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSupportedEnvironment=void 0;const n=["vscode","vscode-insiders","code-oss","vscode-wsl","vscode-exploration"];t.isSupportedEnvironment=function(e){return n.includes(e.scheme)||e.authority.endsWith("vscode.dev")||e.authority.endsWith("github.dev")}},4443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Keychain=void 0;const r=n(7549),i=n(189).loadMessageBundle();t.Keychain=class{constructor(e,t,n){this.context=e,this.serviceId=t,this.Logger=n}async setToken(e){try{return await this.context.secrets.store(this.serviceId,e)}catch(e){this.Logger.error(`Setting token failed: ${e}`);const t=i("troubleshooting","Troubleshooting Guide");await r.window.showErrorMessage(i("keychainWriteError","Writing login information to the keychain failed with error '{0}'.",e.message),t)===t&&r.env.openExternal(r.Uri.parse("https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues"))}}async getToken(){try{const e=await this.context.secrets.get(this.serviceId);return e&&"[]"!==e&&this.Logger.trace("Token acquired from secret storage."),e}catch(e){return this.Logger.error(`Getting token failed: ${e}`),Promise.resolve(void 0)}}async deleteToken(){try{return await this.context.secrets.delete(this.serviceId)}catch(e){return this.Logger.error(`Deleting token failed: ${e}`),Promise.resolve(void 0)}}}},5852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Log=void 0;const r=n(7549),i=n(1126);function o(e,t,n=" "){return n.repeat(Math.max(0,t-e.length))+e}t.Log=class{constructor(e){this.type=e;const t=this.type===i.AuthProviderType.github?"GitHub":"GitHub Enterprise";this.output=r.window.createOutputChannel(`${t} Authentication`)}data2String(e){return e instanceof Error?e.stack||e.message:!1===e.success&&e.message?e.message:e.toString()}trace(e,t){this.logLevel("Trace",e,t)}info(e,t){this.logLevel("Info",e,t)}error(e,t){this.logLevel("Error",e,t)}logLevel(e,t,n){this.output.appendLine(`[${e}  - ${this.now()}] ${t}`),n&&this.output.appendLine(this.data2String(n))}now(){const e=new Date;return o(e.getUTCHours()+"",2,"0")+":"+o(e.getMinutes()+"",2,"0")+":"+o(e.getUTCSeconds()+"",2,"0")+"."+e.getMilliseconds()}}},4669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopWatch=t.arrayEquals=t.promiseFromEvent=t.onceEvent=t.filterEvent=void 0;const r=n(7549);t.filterEvent=function(e,t){return(n,r=null,i)=>e((e=>t(e)&&n.call(r,e)),null,i)},t.onceEvent=function(e){return(t,n=null,r)=>{const i=e((e=>(i.dispose(),t.call(n,e))),null,r);return i}};const i=(e,t)=>t(e);t.promiseFromEvent=function(e,t=i){let n,o=new r.EventEmitter;return{promise:new Promise(((r,i)=>{o.event((e=>i("Cancelled"))),n=e((e=>{try{Promise.resolve(t(e,r,i)).catch(i)}catch(e){i(e)}}))})).then((e=>(n.dispose(),e)),(e=>{throw n.dispose(),e})),cancel:o}},t.arrayEquals=function(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0},t.StopWatch=class{constructor(){this._startTime=Date.now(),this._stopTime=-1}stop(){this._stopTime=Date.now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:Date.now()-this._startTime}}},6007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentationTelemetry=void 0;const r=n(7549),i=n(9035);t.ExperimentationTelemetry=class{constructor(e,t){this.context=e,this.baseReporter=t,this.sharedProperties={}}async createExperimentationService(){let e;switch(r.env.uriScheme){case"vscode":e=i.TargetPopulation.Public;case"vscode-insiders":e=i.TargetPopulation.Insiders;case"vscode-exploration":e=i.TargetPopulation.Internal;case"code-oss":e=i.TargetPopulation.Team;default:e=i.TargetPopulation.Public}const t=this.context.extension.id,n=this.context.extension.packageJSON.version,o=(0,i.getExperimentationService)(t,n,e,this,this.context.globalState);return await o.initialFetch,o}async sendTelemetryEvent(e,t,n){this.experimentationServicePromise||(this.experimentationServicePromise=this.createExperimentationService()),await this.experimentationServicePromise,this.baseReporter.sendTelemetryEvent(e,{...this.sharedProperties,...t},n)}async sendTelemetryErrorEvent(e,t,n){this.experimentationServicePromise||(this.experimentationServicePromise=this.createExperimentationService()),await this.experimentationServicePromise,this.baseReporter.sendTelemetryErrorEvent(e,{...this.sharedProperties,...t})}setSharedProperty(e,t){this.sharedProperties[e]=t}postEvent(e,t){const n={};for(const[e,r]of t)n[e]=r;this.sendTelemetryEvent(e,n)}dispose(){return this.baseReporter.dispose()}}},1126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GitHubAuthenticationProvider=t.AuthProviderType=void 0;const r=n(7549),i=n(3234),o=n(4443),a=n(3475),s=n(4669),c=n(6007),u=n(8331),l=n(5852);var d;!function(e){e.github="github",e.githubEnterprise="github-enterprise"}(d=t.AuthProviderType||(t.AuthProviderType={})),t.GitHubAuthenticationProvider=class{constructor(e,t){this.context=e,this.type=t,this._sessionChangeEmitter=new r.EventEmitter,this._logger=new l.Log(this.type),this._keychain=new o.Keychain(this.context,`${this.type}.auth`,this._logger);const{name:n,version:i,aiKey:s}=e.extension.packageJSON;this._telemetryReporter=new c.ExperimentationTelemetry(e,new u.default(n,i,s)),this.type===d.github?this._githubServer=new a.GitHubServer(e.extension.extensionKind===r.ExtensionKind.Workspace,this._logger,this._telemetryReporter):this._githubServer=new a.GitHubEnterpriseServer(this._logger,this._telemetryReporter),this._sessionsPromise=this.readSessions(),this._disposable=r.Disposable.from(this._telemetryReporter,this._githubServer,r.authentication.registerAuthenticationProvider(t,this._githubServer.friendlyName,this,{supportsMultipleAccounts:!1}),this.context.secrets.onDidChange((()=>this.checkForUpdates())))}dispose(){this._disposable.dispose()}get onDidChangeSessions(){return this._sessionChangeEmitter.event}async getSessions(e){const t=e?.sort()||[];this._logger.info(`Getting sessions for ${t.length?t.join(","):"all scopes"}...`);const n=await this._sessionsPromise,r=t.length?n.filter((e=>(0,s.arrayEquals)([...e.scopes].sort(),t))):n;return this._logger.info(`Got ${r.length} sessions for ${t?.join(",")??"all scopes"}...`),r}async afterTokenLoad(e){this._githubServer.sendAdditionalTelemetryInfo(e)}async checkForUpdates(){const e=await this._sessionsPromise;this._sessionsPromise=this.readSessions();const t=await this._sessionsPromise,n=[],r=[];t.forEach((t=>{e.some((e=>e.id===t.id))||(this._logger.info("Adding session found in keychain"),n.push(t))})),e.forEach((e=>{t.some((t=>t.id===e.id))||(this._logger.info("Removing session no longer found in keychain"),r.push(e))})),(n.length||r.length)&&this._sessionChangeEmitter.fire({added:n,removed:r,changed:[]})}async readSessions(){let e;try{this._logger.info("Reading sessions from keychain...");const t=await this._keychain.getToken();if(!t)return[];this._logger.info("Got stored sessions!");try{e=JSON.parse(t)}catch(e){throw await this._keychain.deleteToken(),e}}catch(e){return this._logger.error(`Error reading token: ${e}`),[]}const t=new Set,n=e.map((async e=>{const n=e.scopes.sort(),r=n.join(" ");if(t.has(r))return;let i;if(!e.account)try{i=await this._githubServer.getUserInfo(e.accessToken),this._logger.info(`Verified session with the following scopes: ${r}`)}catch(e){if("Unauthorized"===e.message)return}return setTimeout((()=>this.afterTokenLoad(e.accessToken)),1e3),this._logger.trace(`Read the following session from the keychain with the following scopes: ${r}`),t.add(r),{id:e.id,account:{label:e.account?e.account.label??e.account.displayName??"<unknown>":i?.accountName??"<unknown>",id:e.account?.id??i?.id??"<unknown>"},scopes:n,accessToken:e.accessToken}})),r=(await Promise.allSettled(n)).filter((e=>"fulfilled"===e.status)).map((e=>e.value)).filter((e=>Boolean(e)));return this._logger.info(`Got ${r.length} verified sessions.`),r.length!==e.length&&await this.storeSessions(r),r}async storeSessions(e){this._logger.info(`Storing ${e.length} sessions...`),this._sessionsPromise=Promise.resolve(e),await this._keychain.setToken(JSON.stringify(e)),this._logger.info(`Stored ${e.length} sessions!`)}async createSession(e){try{const t=e.sort();this._telemetryReporter?.sendTelemetryEvent("login",{scopes:JSON.stringify(t)});const n=t.join(" "),r=await this._githubServer.login(n);this.afterTokenLoad(r);const i=await this.tokenToSession(r,t),o=await this._sessionsPromise,a=o.findIndex((e=>e.id===i.id||(0,s.arrayEquals)([...e.scopes].sort(),t)));return a>-1?o.splice(a,1,i):o.push(i),await this.storeSessions(o),this._sessionChangeEmitter.fire({added:[i],removed:[],changed:[]}),this._logger.info("Login success!"),i}catch(e){if("Cancelled"===e||"Cancelled"===e.message)throw this._telemetryReporter?.sendTelemetryEvent("loginCancelled"),e;throw this._telemetryReporter?.sendTelemetryEvent("loginFailed"),r.window.showErrorMessage(`Sign in failed: ${e}`),this._logger.error(e),e}}async tokenToSession(e,t){const n=await this._githubServer.getUserInfo(e);return{id:(0,i.v4)(),accessToken:e,account:{label:n.accountName,id:n.id},scopes:t}}async removeSession(e){try{this._telemetryReporter?.sendTelemetryEvent("logout"),this._logger.info(`Logging out of ${e}`);const t=await this._sessionsPromise,n=t.findIndex((t=>t.id===e));if(n>-1){const e=t[n];t.splice(n,1),await this.storeSessions(t),this._sessionChangeEmitter.fire({added:[],removed:[e],changed:[]})}else this._logger.error("Session not found")}catch(e){throw this._telemetryReporter?.sendTelemetryEvent("logoutFailed"),r.window.showErrorMessage(`Sign out failed: ${e}`),this._logger.error(e),e}}}},3475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GitHubEnterpriseServer=t.GitHubServer=void 0;const r=n(189),i=n(7549),o=n(3300),a=n(3234),s=n(4669),c=n(1126),u=n(3545),l=r.loadMessageBundle(),d="01ab8ac9400c4e429b23",f="network error",p="vscode-auth.github.com";class h extends i.EventEmitter{constructor(e){super(),this.Logger=e}handleUri(e){this.Logger.trace("Handling Uri..."),this.fire(e)}}async function g(e,t,n){try{n.info("Getting token scopes...");const r=await(0,o.default)(t.toString(),{headers:{Authorization:`token ${e}`,"User-Agent":"Visual-Studio-Code"}});if(r.ok){const e=r.headers.get("X-OAuth-Scopes");return e?e.split(",").map((e=>e.trim())):[]}throw n.error(`Getting scopes failed: ${r.statusText}`),new Error(r.statusText)}catch(e){throw n.error(e.message),new Error(f)}}async function m(e,t,n){let r;try{n.info("Getting user info..."),r=await(0,o.default)(t.toString(),{headers:{Authorization:`token ${e}`,"User-Agent":"Visual-Studio-Code"}})}catch(e){throw n.error(e.message),new Error(f)}if(r.ok){const e=await r.json();return n.info("Got account info!"),{id:e.id,accountName:e.login}}{let e=r.statusText;try{const t=await r.json();t.message&&(e=t.message)}catch(e){}throw n.error(`Getting account info failed: ${e}`),new Error(e)}}t.GitHubServer=class{constructor(e,t,n){this._supportDeviceCodeFlow=e,this._logger=t,this._telemetryReporter=n,this.friendlyName="GitHub",this.type=c.AuthProviderType.github,this._onDidManuallyProvideToken=new i.EventEmitter,this._pendingStates=new Map,this._codeExchangePromises=new Map,this._statusBarCommandId=`${this.type}.provide-manually`,this._uriHandler=new h(this._logger),this.exchangeCodeForToken=e=>async(t,n,r)=>{const i=function(e){return e.query.split("&").reduce(((e,t)=>{const n=t.split("=");return e[n[0]]=n[1],e}),{})}(t),a=i.code;if(!(this._pendingStates.get(e)||[]).includes(i.state))return void this._logger.info("State not found in accepted state. Skipping this execution...");const s=`https://${p}/token?code=${a}&state=${i.state}`;this._logger.info("Exchanging code for token...");try{const e=await(0,o.default)(s,{method:"POST",headers:{Accept:"application/json"}});if(e.ok){const t=await e.json();this._logger.info("Token exchange success!"),n(t.access_token)}else r(e.statusText)}catch(e){r(e)}},this._disposable=i.Disposable.from(i.commands.registerCommand(this._statusBarCommandId,(()=>this.manuallyProvideUri())),i.window.registerUriHandler(this._uriHandler))}dispose(){this._disposable.dispose()}async isNoCorsEnvironment(){const e=await i.env.asExternalUri(i.Uri.parse(`${i.env.uriScheme}://vscode.github-authentication/dummy`));return"https"===e.scheme&&/^((insiders\.)?vscode|github)\./.test(e.authority)||"http"===e.scheme&&/^localhost/.test(e.authority)}async login(e){this._logger.info(`Logging in for the following scopes: ${e}`);const t=await i.env.asExternalUri(i.Uri.parse(`${i.env.uriScheme}://vscode.github-authentication/did-authenticate`));if(!(0,u.isSupportedEnvironment)(t)){const t=this._supportDeviceCodeFlow?await this.doDeviceCodeFlow(e):await i.window.showInputBox({prompt:"GitHub Personal Access Token",ignoreFocusOut:!0});if(!t)throw new Error("No token provided");const n=await g(t,this.getServerUri("/"),this._logger);if(!e.split(" ").every((e=>{const t=n.includes(e);return t||!e.includes(":")?t:e.split(":").some((e=>n.includes(e)))})))throw new Error(`The provided token does not match the requested scopes: ${e}`);return t}this.updateStatusBarItem(!0);const n=(0,a.v4)(),r=this._pendingStates.get(e)||[];this._pendingStates.set(e,[...r,n]);const o=i.Uri.parse(`https://${p}/authorize/?callbackUri=${encodeURIComponent(t.toString())}&scope=${e}&state=${n}&responseType=code&authServer=https://github.com`);await i.env.openExternal(o);let c=this._codeExchangePromises.get(e);return c||(c=(0,s.promiseFromEvent)(this._uriHandler.event,this.exchangeCodeForToken(e)),this._codeExchangePromises.set(e,c)),Promise.race([c.promise,(0,s.promiseFromEvent)(this._onDidManuallyProvideToken.event,((e,t,n)=>{e?t(e):n("Cancelled")})).promise,new Promise(((e,t)=>setTimeout((()=>t("Cancelled")),6e4)))]).finally((()=>{this._pendingStates.delete(e),c?.cancel.fire(),this._codeExchangePromises.delete(e),this.updateStatusBarItem(!1)}))}async doDeviceCodeFlow(e){const t=`https://github.com/login/device/code?client_id=${d}&scope=${e}`,n=await(0,o.default)(t,{method:"POST",headers:{Accept:"application/json"}});if(!n.ok)throw new Error(`Failed to get one-time code: ${await n.text()}`);const r=await n.json();if("Copy & Continue to GitHub"!==await i.window.showInformationMessage(l("code.title","Your Code: {0}",r.user_code),{modal:!0,detail:l("code.detail","To finish authenticating, navigate to GitHub and paste in the above one-time code.")},"Copy & Continue to GitHub"))throw new Error("Cancelled");await i.env.clipboard.writeText(r.user_code);const a=await i.env.asExternalUri(i.Uri.parse(r.verification_uri));return await i.env.openExternal(a),await i.window.withProgress({location:i.ProgressLocation.Notification,cancellable:!0,title:l("progress","Open [{0}]({0}) in a new tab and paste your one-time code: {1}",r.verification_uri,r.user_code)},(async(e,t)=>await this.waitForDeviceCodeAccessToken(r,t)))}async waitForDeviceCodeAccessToken(e,t){const n=`https://github.com/login/oauth/access_token?client_id=${d}&device_code=${e.device_code}&grant_type=urn:ietf:params:oauth:grant-type:device_code`,r=120/e.interval;for(let i=0;i<r;i++){if(await new Promise((t=>setTimeout(t,1e3*e.interval))),t.isCancellationRequested)throw new Error("Cancelled");let r;try{r=await(0,o.default)(n,{method:"POST",headers:{Accept:"application/json"}})}catch{continue}if(!r.ok)continue;const i=await r.json();if("authorization_pending"!==i.error){if(i.error)throw new Error(i.error_description);return i.access_token}}throw new Error("Cancelled")}getServerUri(e=""){const t=i.Uri.parse("https://api.github.com");return i.Uri.parse(`${t.scheme}://${t.authority}${e}`)}updateStatusBarItem(e){e&&!this._statusBarItem&&(this._statusBarItem=i.window.createStatusBarItem("status.git.signIn",i.StatusBarAlignment.Left),this._statusBarItem.name=l("status.git.signIn.name","GitHub Sign-in"),this._statusBarItem.text=l("signingIn","$(mark-github) Signing in to github.com..."),this._statusBarItem.command=this._statusBarCommandId,this._statusBarItem.show()),!e&&this._statusBarItem&&(this._statusBarItem.dispose(),this._statusBarItem=void 0)}async manuallyProvideUri(){const e=await i.window.showInputBox({prompt:"Uri",ignoreFocusOut:!0,validateInput(e){if(!e)return;const t=l("validUri","Please enter a valid Uri from the GitHub login page.");try{const n=i.Uri.parse(e.trim());if(!n.scheme||"file"===n.scheme)return t}catch(e){return t}}});e&&this._uriHandler.handleUri(i.Uri.parse(e.trim()))}getUserInfo(e){return m(e,this.getServerUri("/user"),this._logger)}async sendAdditionalTelemetryInfo(e){if(i.env.isTelemetryEnabled&&!await this.isNoCorsEnvironment())try{const t=await(0,o.default)("https://education.github.com/api/user",{headers:{Authorization:`token ${e}`,"faculty-check-preview":"true","User-Agent":"Visual-Studio-Code"}});if(t.ok){const e=await t.json();this._telemetryReporter.sendTelemetryEvent("session",{isEdu:e.student?"student":e.faculty?"faculty":"none"})}}catch(e){}}async checkEnterpriseVersion(e){try{const t=await(0,o.default)(this.getServerUri("/meta").toString(),{headers:{Authorization:`token ${e}`,"User-Agent":"Visual-Studio-Code"}});if(!t.ok)return;const n=await t.json();this._telemetryReporter.sendTelemetryEvent("ghe-session",{version:n.installed_version})}catch{}}},t.GitHubEnterpriseServer=class{constructor(e,t){this._logger=e,this.telemetryReporter=t,this.friendlyName="GitHub Enterprise",this.type=c.AuthProviderType.githubEnterprise,this._onDidManuallyProvideToken=new i.EventEmitter,this._statusBarCommandId="github-enterprise.provide-manually",this._disposable=i.commands.registerCommand(this._statusBarCommandId,(async()=>{const e=await i.window.showInputBox({prompt:"Token",ignoreFocusOut:!0});this._onDidManuallyProvideToken.fire(e)}))}dispose(){this._disposable.dispose()}async login(e){this._logger.info(`Logging in for the following scopes: ${e}`);const t=await i.window.showInputBox({prompt:"GitHub Personal Access Token",ignoreFocusOut:!0});if(!t)throw new Error("Sign in failed: No token provided");const n=await g(t,this.getServerUri("/"),this._logger);if(!e.split(" ").every((e=>{const t=n.includes(e);return t||!e.includes(":")?t:e.split(":").some((e=>n.includes(e)))})))throw new Error(`The provided token does not match the requested scopes: ${e}`);return t}getServerUri(e=""){const t=i.Uri.parse(i.workspace.getConfiguration("github-enterprise").get("uri")||"",!0);return i.Uri.parse(`${t.scheme}://${t.authority}/api/v3${e}`)}async getUserInfo(e){return m(e,this.getServerUri("/user"),this._logger)}async sendAdditionalTelemetryInfo(e){try{const t=await(0,o.default)(this.getServerUri("/meta").toString(),{headers:{Authorization:`token ${e}`,"User-Agent":"Visual-Studio-Code"}});if(!t.ok)return;const n=await t.json();this.telemetryReporter.sendTelemetryEvent("ghe-session",{version:n.installed_version})}catch{}}}},7549:e=>{"use strict";e.exports=require("vscode")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.activate=void 0;const t=n(7549),i=n(1126);e.activate=function(e){let n;e.subscriptions.push(new i.GitHubAuthenticationProvider(e,i.AuthProviderType.github)),t.workspace.getConfiguration().get("github-enterprise.uri")&&(n=new i.GitHubAuthenticationProvider(e,i.AuthProviderType.githubEnterprise),e.subscriptions.push(n)),e.subscriptions.push(t.workspace.onDidChangeConfiguration((async r=>{r.affectsConfiguration("github-enterprise.uri")&&!n&&t.workspace.getConfiguration().get("github-enterprise.uri")&&(n=new i.GitHubAuthenticationProvider(e,i.AuthProviderType.githubEnterprise),e.subscriptions.push(n))})))}})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/b7730c807c1e0fdacdcc91a854bb963715b2a89b/extensions/github-authentication/dist/browser/extension.js.map