Skip to content

Instantly share code, notes, and snippets.

@RhysSullivan
Created August 1, 2024 05:10
Show Gist options
  • Save RhysSullivan/3252294c4af8da66b58ec83894bc34f4 to your computer and use it in GitHub Desktop.
Save RhysSullivan/3252294c4af8da66b58ec83894bc34f4 to your computer and use it in GitHub Desktop.
Replace your `/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js` with the following to use bun instead of node for your TypeScript server
This file has been truncated, but you can view the full file.
(() => {
var e = {
670: (e, t, n) => {
"use strict";
n.r(t),
n.d(t, {
AppInsightsCore: () => m,
BaseTelemetryPlugin: () => A.s,
DiagnosticLogger: () => u.wq,
EventLatency: () => b,
EventPersistence: () => w,
EventPropertyType: () => _,
EventsDiscardedReason: () => L.x,
FullVersionString: () => h.xE,
InternalAppInsightsCore: () => l._,
LoggingSeverity: () => D,
MinChannelPriorty: () => R,
NotificationManager: () => M.h,
PerfEvent: () => s.Q6,
PerfManager: () => s.NS,
ProcessTelemetryContext: () => F.W0,
TraceLevel: () => S,
Undefined: () => Y.bA,
ValueKind: () => y,
ValueSanitizer: () => j,
Version: () => h.Rx,
_InternalLogMessage: () => u.WD,
__getRegisteredEvents: () => V.El,
_logInternalMessage: () => u.Oc,
_throwInternal: () => u.ZP,
_warnToConsole: () => u.OG,
addEventHandler: () => V.So,
addEventListeners: () => V.lQ,
addPageHideEventListener: () => V.Fc,
addPageShowEventListener: () => V.oS,
addPageUnloadEventListener: () => V.ee,
areCookiesSupported: () => ee.gi,
arrForEach: () => I.I,
arrIndexOf: () => O.r,
arrMap: () => q.W,
arrReduce: () => W.K,
attachEvent: () => V.Q3,
blockDynamicConversion: () => ie.V9,
cookieAvailable: () => ee.gi,
createCookieMgr: () => ee.xN,
createDynamicConfig: () => a.e,
createEnumStyle: () => v.H,
createGuid: () => h.gj,
createProcessTelemetryContext: () => F.i8,
createTraceParent: () => re.wk,
createUniqueNamespace: () => te.Z,
createUnloadHandlerContainer: () => ne.P,
dateNow: () => H.f,
detachEvent: () => V.Ym,
disallowsSameSiteNone: () => ee.It,
doPerf: () => s.r2,
dumpObj: () => c.m,
eventOff: () => V.ML,
eventOn: () => V.mB,
extend: () => h.X$,
findW3cTraceParent: () => re.ef,
forceDynamicConversion: () => ie.Hf,
formatTraceParent: () => re.L0,
generateW3CId: () => J.cL,
getCommonSchemaMetaData: () => h.Go,
getConsole: () => Q.U5,
getCookieValue: () => h.UM,
getCrypto: () => Q.MY,
getDocument: () => Z.YE,
getDynamicConfigHandler: () => ie.QA,
getExceptionName: () => K.lL,
getFieldValueType: () => h.cq,
getGlobal: () => Z.mS,
getGlobalInst: () => Z.zS,
getHistory: () => Z.JK,
getIEVersion: () => Q.L0,
getISOString: () => K._u,
getJSON: () => Q.hm,
getLocation: () => Q.g$,
getMsCrypto: () => Q.iN,
getNavigator: () => Z.w3,
getPerformance: () => G.FJ,
getSetValue: () => K.c2,
getTenantId: () => h.EO,
getTime: () => h.WB,
getWindow: () => Z.zk,
hasDocument: () => Z.Wt,
hasHistory: () => Z.tw,
hasJSON: () => Q.Z,
hasNavigator: () => Z.w9,
hasOwnProperty: () => N.v,
hasWindow: () => Z.Vd,
isArray: () => P.cy,
isArrayValid: () => h.wJ,
isBeaconsSupported: () => Q.Uf,
isBoolean: () => P.Lm,
isChromium: () => h.F2,
isDate: () => P.$P,
isDocumentObjectAvailable: () => h.g8,
isError: () => P.bJ,
isFetchSupported: () => Q.R7,
isFunction: () => P.Tn,
isGreaterThanZero: () => h.ei,
isIE: () => Q.lT,
isLatency: () => h.Hh,
isNotTruthy: () => P.wo,
isNullOrUndefined: () => P.hX,
isNumber: () => P.Et,
isObject: () => P.Gv,
isReactNative: () => Q.lV,
isSampledFlag: () => re.N7,
isString: () => P.Kg,
isTruthy: () => P.zz,
isTypeof: () => P.Ed,
isUint8ArrayAvailable: () => h.h3,
isUndefined: () => P.b0,
isValidSpanId: () => re.wN,
isValidTraceId: () => re.hX,
isValidTraceParent: () => re.mJ,
isValueAssigned: () => h.yD,
isValueKind: () => h.m0,
isWindowObjectAvailable: () => h.P$,
isXhrSupported: () => Q.xk,
mergeEvtNamespace: () => V.Hm,
newGuid: () => J.aq,
newId: () => X.Si,
normalizeJsName: () => K.cH,
objDefineAccessors: () => z.r,
objForEachKey: () => C.z,
objFreeze: () => d.N6,
objKeys: () => d.cG,
objSeal: () => d.js,
onConfigChange: () => a.a,
openXhr: () => h.H$,
optimizeObject: () => K.hW,
parseTraceParent: () => re.ZI,
perfNow: () => G.UU,
proxyAssign: () => K.qz,
proxyFunctionAs: () => K.RF,
proxyFunctions: () => K.o$,
random32: () => X.VN,
randomValue: () => X.Z1,
removeEventHandler: () => V.zh,
removeEventListeners: () => V.Wg,
removePageHideEventListener: () => V.sq,
removePageShowEventListener: () => V.vF,
removePageUnloadEventListener: () => V.Ds,
safeGetCookieMgr: () => ee.um,
safeGetLogger: () => u.y0,
sanitizeProperty: () => h.TC,
setEnableEnvMocks: () => Q.cU,
setProcessTelemetryTimings: () => h.u9,
setValue: () => K.KY,
strContains: () => K.Ju,
strEndsWith: () => B.C,
strFunction: () => Y.hW,
strObject: () => Y._1,
strPrototype: () => Y.vR,
strStartsWith: () => $.t,
strTrim: () => U.EH,
strUndefined: () => Y.bA,
throwError: () => o.$8,
toISOString: () => K._u,
useXDomainRequest: () => Q.PV,
});
var r = n(659),
i = n(8279),
o = n(3517),
s = n(8156),
a = n(9622),
c = n(8693),
u = n(3775),
l = n(9379),
d = n(1324),
f = n(937),
h = n(4822),
p = n(1739),
g = (0, d.ZH)({
endpointUrl: f.S,
propertyStorageOverride: {
isVal: function (e) {
return (
!e ||
(e.getProperty && e.setProperty) ||
(0, o.$8)("Invalid property storage override passed."),
!0
);
},
},
}),
m = (function (e) {
function t() {
var n = e.call(this) || this;
return (
(0, i.A)(t, n, function (e, t) {
(e[p.mE] = function (n, r, i, o) {
(0, s.r2)(
e,
function () {
return "AppInsightsCore.initialize";
},
function () {
try {
t[p.mE](
(0, a.e)(n, g, i || e[p.Uw], !1).cfg,
r,
i,
o
);
} catch (t) {
var s = e[p.Uw],
l = (0, c.m)(t);
-1 !== l[p.Sj]("channels") &&
(l +=
"\n - Channels must be provided through config.channels only!"),
(0, u.ZP)(
s,
1,
514,
"SDK Initialization Failed - no telemetry will be sent: " +
l
);
}
},
function () {
return {
config: n,
extensions: r,
logger: i,
notificationManager: o,
};
}
);
}),
(e.track = function (n) {
(0, s.r2)(
e,
function () {
return "AppInsightsCore.track";
},
function () {
var r = n;
if (r) {
(r[p.dg] = r[p.dg] || {}),
(r[p.dg].trackStart = (0, h.WB)()),
(0, h.Hh)(r.latency) || (r.latency = 1);
var i = (r.ext = r.ext || {});
(i.sdk = i.sdk || {}), (i.sdk.ver = h.xE);
var o = (r.baseData = r.baseData || {});
o[f._0] = o[f._0] || {};
var s = o[f._0];
s[f.hj] = s[f.hj] || e.pluginVersionString || f.m5;
}
t.track(r);
},
function () {
return { item: n };
},
!n.sync
);
}),
(e[p.h4] = function (e) {
return t[p.h4](e || "InternalLog");
});
}),
n
);
}
return (0, r.qU)(t, e), (t.__ieDyn = 1), t;
})(l._),
v = n(4282),
y = (0, v.H)({
NotSet: 0,
Pii_DistinguishedName: 1,
Pii_GenericData: 2,
Pii_IPV4Address: 3,
Pii_IPv6Address: 4,
Pii_MailSubject: 5,
Pii_PhoneNumber: 6,
Pii_QueryString: 7,
Pii_SipAddress: 8,
Pii_SmtpAddress: 9,
Pii_Identity: 10,
Pii_Uri: 11,
Pii_Fqdn: 12,
Pii_IPV4AddressLegacy: 13,
CustomerContent_GenericContent: 32,
}),
b = (0, v.H)({
Normal: 1,
CostDeferred: 2,
RealTime: 3,
Immediate: 4,
}),
_ = (0, v.H)({
Unspecified: 0,
String: 1,
Int32: 2,
UInt32: 3,
Int64: 4,
UInt64: 5,
Double: 6,
Bool: 7,
Guid: 8,
DateTime: 9,
}),
w = (0, v.H)({ Normal: 1, Critical: 2 }),
S = (0, v.H)({ NONE: 0, ERROR: 1, WARNING: 2, INFORMATION: 3 }),
P = n(6668),
C = n(9018),
T = n(4016),
x = n(1742),
O = n(6832),
E = (0, x.b2)("includes", T.wM, function (e, t, n) {
return -1 !== (0, O.r)(e, t, n);
}),
I = n(5439),
k = n(4657),
j = (function () {
function e(e) {
var t = this,
n = {},
r = [],
i = [];
function o(e, t) {
var o,
s = n[e];
if ((s && (o = s[t]), !o && null !== o)) {
if ((0, P.Kg)(e) && (0, P.Kg)(t))
if (i[p.oI] > 0) {
for (var a = 0; a < i[p.oI]; a++)
if (i[a][p.hF](e, t)) {
o = { canHandle: !0, fieldHandler: i[a] };
break;
}
} else 0 === r[p.oI] && (o = { canHandle: !0 });
if (!o && null !== o)
for (o = null, a = 0; a < r[p.oI]; a++)
if (r[a][p.hF](e, t)) {
o = {
canHandle: !0,
handler: r[a],
fieldHandler: null,
};
break;
}
s || (s = n[e] = {}), (s[t] = o);
}
return o;
}
function s(e, t, n, r, i, o) {
if (e.handler) return e.handler.property(t, n, i, o);
if (!(0, P.hX)(i[p.QV])) {
if (!(4096 & ~r && (0, h.m0)(i[p.QV]))) return null;
i[p.pF] = i[p.pF].toString();
}
return c(e.fieldHandler, t, n, r, i);
}
function a(e, t, n) {
return (0, h.yD)(n) ? { value: n } : null;
}
function c(e, n, r, i, o) {
if (o && e) {
var s = e.getSanitizer(n, r, i, o[p.QV], o.propertyType);
if (s)
if (4 === i) {
var u = {},
l = o[p.pF];
(0, C.z)(l, function (t, i) {
var o = n + "." + r;
if ((0, h.yD)(i)) {
var s = a(0, 0, i);
(s = c(e, o, t, (0, h.cq)(i), s)) && (u[t] = s[p.pF]);
}
}),
(o[p.pF] = u);
} else {
var d = {
path: n,
name: r,
type: i,
prop: o,
sanitizer: t,
};
o = s.call(t, d);
}
}
return o;
}
e && i.push(e),
(t.clearCache = function () {
n = {};
}),
(t.addSanitizer = function (e) {
e && (E(r, e) || r.push(e), (n = {}));
}),
(t.addFieldSanitizer = function (e) {
e && (E(i, e) || i.push(e), (n = {}));
}),
(t[p.Rl] = function (e) {
if (e) {
var t = (0, O.r)(r, e);
-1 !== t && (r.splice(t, 1), (n = {})),
(0, I.I)(r, function (t) {
t && t[p.Rl] && t[p.Rl](e);
});
}
}),
(t[p.Mr] = function (e) {
if (e) {
var t = (0, O.r)(i, e);
-1 !== t && (i.splice(t, 1), (n = {})),
(0, I.I)(r, function (t) {
t && t[p.Mr] && t[p.Mr](e);
});
}
}),
(t.isEmpty = function () {
return (0, k.R)(r) + (0, k.R)(i) === 0;
}),
(t[p.hF] = function (e, t) {
var n = o(e, t);
return !!n && n[p.nw];
}),
(t[p.pF] = function (e, t, n, r) {
var i = o(e, t);
if (i && i[p.nw]) {
if (!i || !i[p.nw]) return null;
if (i.handler) return i.handler[p.pF](e, t, n, r);
if (!(0, P.Kg)(t) || (0, P.hX)(n) || n === f.m5)
return null;
var c = null,
u = (0, h.cq)(n);
if (8192 & ~u)
1 !== u && 2 !== u && 3 !== u && 4096 & ~u
? 4 === u && (c = a(0, 0, r ? JSON.stringify(n) : n))
: (c = a(0, 0, n));
else {
var l = -8193 & u;
if (
((c = n),
!(0, h.yD)(c[p.pF]) ||
(1 !== l && 2 !== l && 3 !== l && 4096 & ~l))
)
return null;
}
if (c) return s(i, e, t, u, c, r);
}
return null;
}),
(t.property = function (e, t, n, r) {
var i = o(e, t);
if (!i || !i[p.nw]) return null;
if (!(0, P.Kg)(t) || (0, P.hX)(n) || !(0, h.yD)(n[p.pF]))
return null;
var a = (0, h.cq)(n[p.pF]);
return 0 === a ? null : s(i, e, t, a, n, r);
});
}
return (e.getFieldType = h.cq), e;
})(),
R = 100,
D = (0, v.H)({ DISABLED: 0, CRITICAL: 1, WARNING: 2, DEBUG: 3 }),
M = n(1356),
A = n(8257),
F = n(2317),
L = n(3662),
N = n(3266),
V = n(6149),
K = n(3673),
$ = n(7931),
B = n(2494),
U = n(8993),
q = n(4335),
W = n(1011),
z = n(6336),
H = n(225),
J = n(9882),
G = n(558),
X = n(6535),
Z = n(3076),
Q = n(7292),
Y = n(5664),
ee = n(5034),
te = n(4276),
ne = n(836),
re = n(1864),
ie = n(9147);
},
937: (e, t, n) => {
"use strict";
n.d(t, { S: () => i, _0: () => s, hj: () => o, m5: () => r });
var r = "",
i = "https://browser.events.data.microsoft.com/OneCollector/1.0/",
o = "version",
s = "properties";
},
4822: (e, t, n) => {
"use strict";
n.d(t, {
EO: () => O,
F2: () => K,
Go: () => j,
H$: () => $,
Hh: () => I,
P$: () => T,
Rx: () => m,
TC: () => k,
UM: () => R,
WB: () => A,
X$: () => M,
cq: () => V,
ei: () => B,
g8: () => C,
gj: () => D,
h3: () => E,
m0: () => F,
u9: () => N,
wJ: () => L,
xE: () => v,
yD: () => x,
});
var r,
i = n(3076),
o = n(6668),
s = n(7292),
a = n(9882),
c = n(9018),
u = n(5439),
l = n(558),
d = n(5664),
f = n(5881),
h = n(3178),
p = n(937),
g = n(1739),
m = "4.0.3",
v = "1DS-Web-JS-" + m,
y = d.Wy.hasOwnProperty,
b = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation",
_ = "withCredentials",
w = "timeout",
S =
(((r = {})[0] = 0),
(r[2] = 6),
(r[1] = 1),
(r[3] = 7),
(r[4098] = 6),
(r[4097] = 1),
(r[4099] = 7),
r),
P = null,
C = (0, i.Wt)(),
T = (0, i.Vd)();
function x(e) {
return !(e === p.m5 || (0, o.hX)(e));
}
function O(e) {
if (e) {
var t = (0, f.H)(e, "-");
if (t > -1) return (0, h.ZW)(e, t);
}
return p.m5;
}
function E() {
return (
null === P &&
(P =
!(0, o.b0)(Uint8Array) &&
!(function () {
var e = (0, i.w3)();
if (!(0, o.b0)(e) && e.userAgent) {
var t = e.userAgent.toLowerCase();
if (
(t[g.Sj]("safari") >= 0 || t[g.Sj]("firefox") >= 0) &&
t[g.Sj]("chrome") < 0
)
return !0;
}
return !1;
})() &&
!(0, s.lV)()),
P
);
}
function I(e) {
return !!(e && (0, o.Et)(e) && e >= 1 && e <= 4);
}
function k(e, t, n) {
if ((!t && !x(t)) || "string" != typeof e) return null;
var r = typeof t;
if (
"string" === r ||
"number" === r ||
"boolean" === r ||
(0, o.cy)(t)
)
t = { value: t };
else if ("object" !== r || y.call(t, "value")) {
if (
(0, o.hX)(t[g.pF]) ||
t[g.pF] === p.m5 ||
(!(0, o.Kg)(t[g.pF]) &&
!(0, o.Et)(t[g.pF]) &&
!(0, o.Lm)(t[g.pF]) &&
!(0, o.cy)(t[g.pF]))
)
return null;
} else t = { value: n ? JSON.stringify(t) : t };
if ((0, o.cy)(t[g.pF]) && !L(t[g.pF])) return null;
if (!(0, o.hX)(t[g.QV])) {
if ((0, o.cy)(t[g.pF]) || !F(t[g.QV])) return null;
t[g.pF] = t[g.pF].toString();
}
return t;
}
function j(e, t, n) {
var r = -1;
if (!(0, o.b0)(e))
if (
(t > 0 && (32 === t ? (r = 8192) : t <= 13 && (r = t << 5)),
(function (e) {
return e >= 0 && e <= 9;
})(n))
)
-1 === r && (r = 0), (r |= n);
else {
var i = S[V(e)] || -1;
-1 !== r && -1 !== i ? (r |= i) : 6 === i && (r = i);
}
return r;
}
function R(e, t, n) {
var r;
return (
void 0 === n && (n = !0),
e &&
((r = e.get(t)),
n && r && decodeURIComponent && (r = decodeURIComponent(r))),
r || p.m5
);
}
function D(e) {
void 0 === e && (e = "D");
var t = (0, a.aq)();
return (
"B" === e
? (t = "{" + t + "}")
: "P" === e
? (t = "(" + t + ")")
: "N" === e && (t = t.replace(/-/g, p.m5)),
t
);
}
function M(e, t, n, r, i) {
var s = {},
a = !1,
l = 0,
d = arguments[g.oI],
f = arguments;
for ((0, o.Lm)(f[0]) && ((a = f[0]), l++); l < d; l++)
(e = f[l]),
(0, c.z)(e, function (e, t) {
a && t && (0, o.Gv)(t)
? (0, o.cy)(t)
? ((s[e] = s[e] || []),
(0, u.I)(t, function (t, n) {
t && (0, o.Gv)(t)
? (s[e][n] = M(!0, s[e][n], t))
: (s[e][n] = t);
}))
: (s[e] = M(!0, s[e], t))
: (s[e] = t);
});
return s;
}
var A = l.UU;
function F(e) {
return 0 === e || (e > 0 && e <= 13) || 32 === e;
}
function L(e) {
return e[g.oI] > 0;
}
function N(e, t) {
var n = e;
(n[g.dg] = n[g.dg] || {}),
(n[g.dg][g.Jg] = n[g.dg][g.Jg] || {}),
(n[g.dg][g.Jg][t] = A());
}
function V(e) {
var t = 0;
if (null != e) {
var n = typeof e;
"string" === n
? (t = 1)
: "number" === n
? (t = 2)
: "boolean" === n
? (t = 3)
: n === d._1 &&
((t = 4),
(0, o.cy)(e)
? ((t = 4096), e[g.oI] > 0 && (t |= V(e[0])))
: y.call(e, "value") && (t = 8192 | V(e[g.pF])));
}
return t;
}
function K() {
return !!(0, i.zS)("chrome");
}
function $(e, t, n, r, i, o) {
function s(e, t, n) {
try {
e[t] = n;
} catch (e) {}
}
void 0 === r && (r = !1), void 0 === i && (i = !1);
var a = new XMLHttpRequest();
return (
r && s(a, b, r),
n && s(a, _, n),
a.open(e, t, !i),
n && s(a, _, n),
!i && o && s(a, w, o),
a
);
}
function B(e) {
return e > 0;
}
},
1739: (e, t, n) => {
"use strict";
n.d(t, {
Jg: () => d,
Mr: () => p,
QV: () => u,
Rl: () => h,
Sj: () => o,
Uw: () => i,
dg: () => s,
h4: () => a,
hF: () => f,
mE: () => r,
nw: () => g,
oI: () => l,
pF: () => c,
});
var r = "initialize",
i = "logger",
o = "indexOf",
s = "timings",
a = "pollInternalLogs",
c = "value",
u = "kind",
l = "length",
d = "processTelemetryStart",
f = "handleField",
h = "rmSanitizer",
p = "rmFieldSanitizer",
g = "canHandle";
},
8916: (e, t, n) => {
"use strict";
n.r(t),
n.d(t, {
BE_PROFILE: () => o,
NRT_PROFILE: () => i,
PostChannel: () => At,
RT_PROFILE: () => r,
});
var r = "REAL_TIME",
i = "NEAR_REAL_TIME",
o = "BEST_EFFORT",
s = n(659),
a = n(8279),
c = n(4822),
u = n(6668),
l = n(8156),
d = n(6149),
f = n(4276),
h = n(9622),
p = n(2317),
g = n(3076),
m = n(3673),
v = n(3662),
y = n(5439),
b = n(9018),
_ = n(3775),
w = n(8257),
S = n(636),
P = n(1324),
C = "",
T = "POST",
x = "drop",
O = "requeue",
E = "application/x-json-stream",
I = "cache-control",
k = "content-type",
j = "kill-duration",
R = "time-delta-millis",
D = "client-version",
M = "client-id",
A = "time-delta-to-apply-millis",
F = "upload-time",
L = "apikey",
N = "AuthMsaDeviceTicket",
V = "AuthXToken",
K = "msfpc",
$ = "trace",
B = "user",
U = "allowRequestSending",
q = "firstRequestSent",
W = "shouldAddClockSkewHeaders",
z = "getClockSkewHeaderValue",
H = "setClockSkew",
J = "length",
G = "concat",
X = "iKey",
Z = "count",
Q = "events",
Y = "push",
ee = "split",
te = "splice",
ne = "toLowerCase",
re = "hdrs",
ie = "useHdrs",
oe = "initialize",
se = "setTimeoutOverride",
ae = "clearTimeoutOverride",
ce = "overrideEndpointUrl",
ue = "avoidOptions",
le = "enableCompoundKey",
de = "disableXhrSync",
fe = "disableFetchKeepAlive",
he = "useSendBeacon",
pe = "alwaysUseXhrOverride",
ge = "urlString",
me = "timeout",
ve = "ontimeout",
ye = "data",
be = "_sendReason",
_e = "headers",
we = "getResponseHeader",
Se = "getAllResponseHeaders",
Pe = "_thePayload",
Ce = "batches",
Te = "sendType",
xe = "canSendRequest",
Oe = "sendQueuedRequests",
Ee = "isCompletelyIdle",
Ie = "setUnloading",
ke = "sendSynchronousBatch",
je = "_transport",
Re = "getWParam",
De = "isBeacon",
Me = "timings",
Ae = "isTeardown",
Fe = "isSync",
Le = "sendPOST",
Ne = "setKillSwitchTenants",
Ve = "_backOffTransmission",
Ke = "identifier",
$e = "eventsLimitInMem",
Be = "autoFlushEventsLimit",
Ue = "sendAttempt",
qe = "latency",
We = "baseData",
ze = "sync";
function He(e) {
var t = (e.ext || {}).intweb;
return t && (0, c.yD)(t[K]) ? t[K] : null;
}
function Je(e) {
for (var t = null, n = 0; null === t && n < e[J]; n++) t = He(e[n]);
return t;
}
var Ge = (function () {
function e(t, n) {
var r = n ? [][G](n) : [],
i = this,
o = Je(r);
(i[X] = function () {
return t;
}),
(i.Msfpc = function () {
return o || C;
}),
(i[Z] = function () {
return r[J];
}),
(i[Q] = function () {
return r;
}),
(i.addEvent = function (e) {
return !!e && (r[Y](e), o || (o = He(e)), !0);
}),
(i[ee] = function (n, i) {
var s;
if (n < r[J]) {
var a = r[J] - n;
(0, u.hX)(i) || (a = i < a ? i : a),
(s = r[te](n, a)),
(o = Je(r));
}
return new e(t, s);
});
}
return (
(e.create = function (t, n) {
return new e(t, n);
}),
e
);
})(),
Xe = n(3266),
Ze = n(7292),
Qe = n(8993),
Ye = n(8693),
et = n(225),
tt = n(5664),
nt = n(1187),
rt = (function () {
function e() {
var t = !0,
n = !0,
r = !0,
i = "use-collector-delta",
o = !1;
(0, a.A)(e, this, function (e) {
(e[U] = function () {
return t;
}),
(e[q] = function () {
r && ((r = !1), o || (t = !1));
}),
(e[W] = function () {
return n;
}),
(e[z] = function () {
return i;
}),
(e[H] = function (e) {
o ||
(e ? ((i = e), (n = !0), (o = !0)) : (n = !1), (t = !0));
});
});
}
return (e.__ieDyn = 1), e;
})(),
it = (function () {
function e() {
var t = {};
(0, a.A)(e, this, function (e) {
(e[Ne] = function (e, n) {
if (e && n)
try {
var r =
((s = e[ee](",")),
(a = []),
s &&
(0, y.I)(s, function (e) {
a[Y]((0, Qe.EH)(e));
}),
a);
if ("this-request-only" === n) return r;
for (var i = 1e3 * parseInt(n, 10), o = 0; o < r[J]; ++o)
t[r[o]] = (0, et.f)() + i;
} catch (e) {
return [];
}
var s, a;
return [];
}),
(e.isTenantKilled = function (e) {
var n = t,
r = (0, Qe.EH)(e);
return (
(void 0 !== n[r] && n[r] > (0, et.f)()) ||
(delete n[r], !1)
);
});
});
}
return (e.__ieDyn = 1), e;
})();
function ot(e) {
var t,
n = Math.floor(1200 * Math.random()) + 2400;
return (t = Math.pow(2, e) * n), Math.min(t, 6e5);
}
var st = n(6832),
at = n(7931),
ct = n(3178),
ut = 2e6,
lt = Math.min(ut, 65e3),
dt = "metadata",
ft = "f",
ht = /\./,
pt = (function () {
function e(t, n, r, i) {
var o = "data",
s = "baseData",
d = !!i,
f = !0,
h = n,
p = {};
(0, a.A)(e, this, function (e) {
function n(e, t, i, o, s, a, l) {
(0, b.z)(e, function (e, f) {
var g = null;
if (f || (0, c.yD)(f)) {
var m = i,
v = e,
y = s,
b = t;
if (d && !o && ht.test(e)) {
var _ = e.split("."),
w = _.length;
if (w > 1) {
y && (y = y.slice());
for (var S = 0; S < w - 1; S++) {
var P = _[S];
(b = b[P] = b[P] || {}),
(m += "." + P),
y && y.push(P);
}
v = _[w - 1];
}
}
var C =
o &&
(function (e, t) {
var n = p[e];
return (
void 0 === n &&
(e.length >= 7 &&
(n =
(0, at.t)(e, "ext.metadata") ||
(0, at.t)(e, "ext.web")),
(p[e] = n)),
n
);
})(m);
if (
(g =
!C && h && h.handleField(m, v)
? h.value(m, v, f, r)
: (0, c.TC)(v, f, r))
) {
var T = g.value;
if (
((b[v] = T),
a && a(y, v, g),
l && "object" == typeof T && !(0, u.cy)(T))
) {
var x = y;
x && (x = x.slice()).push(v),
n(f, T, m + "." + v, o, x, a, l);
}
}
}
});
}
(e.createPayload = function (e, t, n, r, i, o) {
return {
apiKeys: [],
payloadBlob: C,
overflow: null,
sizeExceed: [],
failedEvts: [],
batches: [],
numEvents: 0,
retryCnt: e,
isTeardown: t,
isSync: n,
isBeacon: r,
sendType: o,
sendReason: i,
};
}),
(e.appendPayload = function (n, r, i) {
var o = n && r && !n.overflow;
return (
o &&
(0, l.r2)(
t,
function () {
return "Serializer:appendPayload";
},
function () {
for (
var t = r.events(),
o = n.payloadBlob,
s = n.numEvents,
a = !1,
c = [],
u = [],
l = n.isBeacon,
d = l ? 65e3 : 3984588,
f = l ? lt : ut,
h = 0,
p = 0;
h < t.length;
) {
var g = t[h];
if (g) {
if (s >= i) {
n.overflow = r.split(h);
break;
}
var m = e.getEventBlob(g);
if (m && m.length <= f) {
var v = m.length;
if (o.length + v > d) {
n.overflow = r.split(h);
break;
}
o && (o += "\n"),
(o += m),
++p > 20 && ((0, ct.hK)(o, 0, 1), (p = 0)),
(a = !0),
s++;
} else
m ? c.push(g) : u.push(g),
t.splice(h, 1),
h--;
}
h++;
}
if (
(c.length > 0 &&
n.sizeExceed.push(Ge.create(r.iKey(), c)),
u.length > 0 &&
n.failedEvts.push(Ge.create(r.iKey(), u)),
a)
) {
n.batches.push(r),
(n.payloadBlob = o),
(n.numEvents = s);
var y = r.iKey();
-1 === (0, st.r)(n.apiKeys, y) &&
n.apiKeys.push(y);
}
},
function () {
return {
payload: n,
theBatch: { iKey: r.iKey(), evts: r.events() },
max: i,
};
}
),
o
);
}),
(e.getEventBlob = function (e) {
try {
return (0, l.r2)(
t,
function () {
return "Serializer.getEventBlob";
},
function () {
var t = {};
(t.name = e.name),
(t.time = e.time),
(t.ver = e.ver),
(t.iKey = "o:" + (0, c.EO)(e.iKey));
var r = {},
i = e.ext;
i &&
((t.ext = r),
(0, b.z)(i, function (e, t) {
n(t, (r[e] = {}), "ext." + e, !0, null, null, !0);
}));
var a = (t[o] = {});
a.baseType = e.baseType;
var u = (a[s] = {});
return (
n(
e.baseData,
u,
s,
!1,
[s],
function (e, t, n) {
gt(r, e, t, n);
},
f
),
n(
e.data,
a,
o,
!1,
[],
function (e, t, n) {
gt(r, e, t, n);
},
f
),
JSON.stringify(t)
);
},
function () {
return { item: e };
}
);
} catch (e) {
return null;
}
});
});
}
return (e.__ieDyn = 1), e;
})();
function gt(e, t, n, r) {
if (r && e) {
var i = (0, c.Go)(r.value, r.kind, r.propertyType);
if (i > -1) {
var o = e[dt];
o || (o = e[dt] = { f: {} });
var s = o[ft];
if ((s || (s = o[ft] = {}), t))
for (var a = 0; a < t.length; a++) {
var l = t[a];
s[l] || (s[l] = { f: {} });
var d = s[l][ft];
d || (d = s[l][ft] = {}), (s = d);
}
(s = s[n] = {}),
(0, u.cy)(r.value) ? (s.a = { t: i }) : (s.t = i);
}
}
}
var mt,
vt = n(6874);
function yt(e, t) {
return {
set: function (n, r) {
for (var i = [], o = 2; o < arguments.length; o++)
i[o - 2] = arguments[o];
return (0, vt.vK)([e, t], n, r, i);
},
};
}
var bt = "sendAttempt",
_t = "&NoResponseBody=true",
wt = "?cors=true&" + k[ne]() + "=" + E,
St =
(((mt = {})[1] = O),
(mt[100] = O),
(mt[200] = "sent"),
(mt[8004] = x),
(mt[8003] = x),
mt),
Pt = {},
Ct = {};
function Tt(e, t, n) {
(Pt[e] = t), !1 !== n && (Ct[t] = e);
}
function xt(e) {
try {
return e.responseText;
} catch (e) {}
return C;
}
function Ot(e, t) {
var n = !1;
if (e && t) {
var r = (0, P.cG)(e);
if (r && r[J] > 0)
for (var i = t[ne](), o = 0; o < r[J]; o++) {
var s = r[o];
if (s && (0, Xe.v)(t, s) && s[ne]() === i) {
n = !0;
break;
}
}
}
return n;
}
function Et(e, t, n, r) {
t &&
n &&
n[J] > 0 &&
(r && Pt[t]
? ((e[re][Pt[t]] = n), (e[ie] = !0))
: (e.url += "&" + t + "=" + n));
}
function It(e, t) {
return (
t &&
((0, u.Et)(t) ? (e = [t][G](e)) : (0, u.cy)(t) && (e = t[G](e))),
e
);
}
Tt(N, N, !1),
Tt(D, D),
Tt(M, "Client-Id"),
Tt(L, L),
Tt(A, A),
Tt(F, F),
Tt(V, V);
var kt = (function () {
function e(t, n, r, i) {
var o,
s,
d,
f,
p,
m,
v,
w,
S,
O,
N,
V,
$,
B,
Ke,
$e = new it(),
Be = !1,
Ue = new rt(),
qe = !1,
We = 0,
ze = !0,
He = [],
Je = {},
Ge = [],
Xe = null,
st = !1,
at = !1,
ct = !1,
ut = [],
lt = [];
(0, a.A)(e, this, function (e) {
!(function () {
var e;
(o = null),
($e = new it()),
(Be = !1),
(Ue = new rt()),
(qe = !1),
(We = 0),
(s = null),
(d = null),
(f = null),
(p = null),
(ze = !0),
(He = []),
(Je = {}),
(Ge = []),
(Xe = null),
(st = !1),
(m = null),
(at = !1),
(ct = !1),
(v = e),
(w = e),
(S = e),
(O = e),
(N = e),
(ut = []),
(V = e),
($ = e),
(lt = []),
(B = !1),
(Ke = yt());
})();
var a = !0;
function dt(e, t) {
for (var n = 0, r = null, i = 0; null == r && i < e[J]; )
1 === (n = e[i])
? (0, Ze.PV)()
? (r = ft)
: (0, Ze.xk)() && (r = gt)
: 2 === n && (0, Ze.R7)(t) && (!t || (t && !S))
? (r = ht)
: qe && 3 === n && (0, Ze.Uf)() && (r = vt),
i++;
return r ? { _transport: n, _isSync: t, sendPOST: r } : null;
}
function ft(e, t, n) {
var r = new XDomainRequest();
r.open(T, e[ge]),
e[me] && (r[me] = e[me]),
(r.onload = function () {
var e = xt(r);
mt(t, 200, {}, e), Nt(e);
}),
(r.onerror = function () {
mt(t, 400, {});
}),
(r[ve] = function () {
mt(t, 500, {});
}),
(r.onprogress = function () {}),
n
? r.send(e[ye])
: Ke.set(function () {
r.send(e[ye]);
}, 0);
}
function ht(e, t, n) {
var r,
i = e[ge],
o = !1,
s = !1,
c =
(((r = {
body: e[ye],
method: T,
}).Microsoft_ApplicationInsights_BypassAjaxInstrumentation =
!0),
r);
n &&
((c.keepalive = !0),
2 === e[be] && ((o = !0), N && (i += _t))),
a && (c.credentials = "include"),
e.headers && (0, P.cG)(e.headers)[J] > 0 && (c[_e] = e[_e]),
fetch(i, c)
.then(function (e) {
var n = {},
r = C,
i = e[_e];
i &&
i.forEach(function (e, t) {
n[t] = e;
}),
e.body &&
e.text().then(function (e) {
r = e;
}),
s || ((s = !0), mt(t, e.status, n, r), Nt(r));
})
.catch(function (e) {
s || ((s = !0), mt(t, 0, {}));
}),
o && !s && ((s = !0), mt(t, 200, {})),
!s &&
e[me] > 0 &&
Ke.set(function () {
s || ((s = !0), mt(t, 500, {}));
}, e[me]);
}
function gt(e, t, n) {
var r = e[ge];
function i(e, t, n) {
if (!e[n] && t && t[we]) {
var r = t[we](n);
r && (e[n] = (0, Qe.EH)(r));
}
return e;
}
function o(e, n) {
mt(
t,
e.status,
(function (e) {
var t = {};
return (
e[Se]
? (t = (function (e) {
var t = {};
if ((0, u.Kg)(e)) {
var n = (0, Qe.EH)(e)[ee](/[\r\n]+/);
(0, y.I)(n, function (e) {
if (e) {
var n = e.indexOf(": ");
if (-1 !== n) {
var r = (0, Qe.EH)(e.substring(0, n))[
ne
](),
i = (0, Qe.EH)(e.substring(n + 1));
t[r] = i;
} else t[(0, Qe.EH)(e)] = 1;
}
});
}
return t;
})(e[Se]()))
: ((t = i(t, e, R)),
(t = i(t, e, j)),
(t = i(t, e, "kill-duration-seconds"))),
t
);
})(e),
n
);
}
n && e[de] && (n = !1);
var s = (0, c.H$)(T, r, a, !0, n, e[me]);
(0, b.z)(e[_e], function (e, t) {
s.setRequestHeader(e, t);
}),
(s.onload = function () {
var e = xt(s);
o(s, e), Nt(e);
}),
(s.onerror = function () {
o(s);
}),
(s[ve] = function () {
o(s);
}),
s.send(e[ye]);
}
function mt(e, t, n, r) {
try {
e(t, n, r);
} catch (e) {
(0, _.ZP)(d, 2, 518, (0, Ye.m)(e));
}
}
function vt(e, t, n) {
var r = 200,
i = e[Pe],
o = e[ge] + (N ? _t : C);
try {
var s = (0, g.w3)();
if (!s.sendBeacon(o, e[ye]))
if (i) {
var a = [];
(0, y.I)(i[Ce], function (e) {
if (a && e && e[Z]() > 0) {
for (var t = e[Q](), n = 0; n < t[J]; n++)
if (!s.sendBeacon(o, Xe.getEventBlob(t[n]))) {
a[Y](e[ee](n));
break;
}
} else a[Y](e[ee](0));
}),
Vt(a, 8003, i[Te], !0);
} else r = 0;
} catch (e) {
(0, _.OG)(
d,
"Failed to send telemetry using sendBeacon API. Ex:" +
(0, Ye.m)(e)
),
(r = 0);
} finally {
mt(t, r, {}, C);
}
}
function Pt(e) {
return 2 === e || 3 === e;
}
function Tt(e) {
return at && Pt(e) && (e = 2), e;
}
function kt() {
return !Be && We < n;
}
function jt() {
var e = Ge;
return (Ge = []), e;
}
function Rt(e, t, n) {
var r = !1;
return (
e &&
e[J] > 0 &&
!Be &&
f[t] &&
Xe &&
(r = 0 !== t || (kt() && (n > 0 || Ue[U]()))),
r
);
}
function Dt(e) {
var t = {};
return (
e &&
(0, y.I)(e, function (e, n) {
t[n] = { iKey: e[X](), evts: e[Q]() };
}),
t
);
}
function Mt(e, n, r, i, o) {
if (e && 0 !== e[J])
if (Be) Vt(e, 1, i);
else {
i = Tt(i);
try {
var s = e,
a = 0 !== i;
(0, l.r2)(
p,
function () {
return "HttpManager:_sendBatches";
},
function (s) {
s && (e = e.slice(0));
for (
var u = [],
l = null,
d = (0, c.WB)(),
h = f[i] || (a ? f[1] : f[0]),
p = h && h[je],
g =
O &&
(at ||
Pt(i) ||
3 === p ||
(h._isSync && 2 === p));
Rt(e, i, n);
) {
var m = e.shift();
m &&
m[Z]() > 0 &&
($e.isTenantKilled(m[X]())
? u[Y](m)
: ((l =
l || Xe.createPayload(n, r, a, g, o, i)),
Xe.appendPayload(l, m, t)
? null !== l.overflow &&
((e = [l.overflow][G](e)),
(l.overflow = null),
Ft(l, d, (0, c.WB)(), o),
(d = (0, c.WB)()),
(l = null))
: (Ft(l, d, (0, c.WB)(), o),
(d = (0, c.WB)()),
(e = [m][G](e)),
(l = null))));
}
l && Ft(l, d, (0, c.WB)(), o),
e[J] > 0 && (Ge = e[G](Ge)),
Vt(u, 8004, i);
},
function () {
return {
batches: Dt(s),
retryCount: n,
isTeardown: r,
isSynchronous: a,
sendReason: o,
useSendBeacon: Pt(i),
sendType: i,
};
},
!a
);
} catch (e) {
(0, _.ZP)(
d,
2,
48,
"Unexpected Exception sending batch: " + (0, Ye.m)(e)
);
}
}
}
function At(e, t, n) {
(e[t] = e[t] || {}), (e[t][s.identifier] = n);
}
function Ft(t, n, i, a) {
if (t && t.payloadBlob && t.payloadBlob[J] > 0) {
var u = !!V,
h = f[t.sendType];
!Pt(t[Te]) &&
t[De] &&
2 === t.sendReason &&
(h = f[2] || f[3] || h);
var g = ct;
(t.isBeacon || 3 === h[je]) && (g = !1);
var m = (function (e, t) {
var n = { url: o, hdrs: {}, useHdrs: !1 };
t
? ((n[re] = (0, c.X$)(n[re], Je)),
(n.useHdrs = (0, P.cG)(n.hdrs)[J] > 0))
: (0, b.z)(Je, function (e, t) {
Ct[e]
? Et(n, Ct[e], t, !1)
: ((n[re][e] = t), (n[ie] = !0));
}),
Et(n, M, "NO_AUTH", t),
Et(n, D, c.xE, t);
var r = C;
(0, y.I)(e.apiKeys, function (e) {
r[J] > 0 && (r += ","), (r += e);
}),
Et(n, L, r, t),
Et(n, F, (0, et.f)().toString(), t);
var i = (function (e) {
for (var t = 0; t < e.batches[J]; t++) {
var n = e[Ce][t].Msfpc();
if (n) return encodeURIComponent(n);
}
return C;
})(e);
if (
((0, c.yD)(i) && (n.url += "&ext.intweb.msfpc=" + i),
Ue[W]() && Et(n, A, Ue[z](), t),
p[Re])
) {
var s = p[Re]();
s >= 0 && (n.url += "&w=" + s);
}
for (var a = 0; a < He[J]; a++)
n.url += "&" + He[a].name + "=" + He[a].value;
return n;
})(t, g);
g = g || m[ie];
var T = (0, c.WB)();
(0, l.r2)(
p,
function () {
return "HttpManager:_doPayloadSend";
},
function () {
for (var o = 0; o < t.batches[J]; o++)
for (var f = t[Ce][o][Q](), b = 0; b < f[J]; b++) {
var P = f[b];
if (st) {
var C = (P[Me] = P[Me] || {});
At(C, "sendEventStart", T),
At(C, "serializationStart", n),
At(C, "serializationCompleted", i);
}
P[bt] > 0 ? P[bt]++ : (P[bt] = 1);
}
Vt(t[Ce], 1e3 + (a || 0), t[Te], !0);
var x = {
data: t.payloadBlob,
urlString: m.url,
headers: m[re],
_thePayload: t,
_sendReason: a,
timeout: v,
disableXhrSync: w,
disableFetchKeepAlive: S,
};
g &&
(Ot(x[_e], I) || (x[_e][I] = "no-cache, no-store"),
Ot(x[_e], k) || (x[_e][k] = E));
var O = null;
h &&
(O = function (n) {
Ue[q]();
var i = function (n, i) {
!(function (t, n, i, o) {
var a,
u = 9e3,
l = null,
d = !1,
f = !1;
try {
var h = !0;
if (typeof t !== tt.bA) {
if (n) {
Ue[H](n[R]);
var p =
n[j] || n["kill-duration-seconds"];
(0, y.I)(
$e[Ne](n["kill-tokens"], p),
function (e) {
(0, y.I)(i[Ce], function (t) {
if (t[X]() === e) {
l = l || [];
var n = t[ee](0);
(i.numEvents -= n[Z]()),
l[Y](n);
}
});
}
);
}
if (200 == t || 204 == t)
return void (u = 200);
(((a = t) >= 300 &&
a < 500 &&
408 != a &&
429 != a) ||
501 == a ||
505 == a ||
i.numEvents <= 0) &&
(h = !1),
(u = 9e3 + (t % 1e3));
}
if (h) {
u = 100;
var g = i.retryCnt;
0 === i[Te] &&
(g < r
? ((d = !0),
Lt(
function () {
0 === i[Te] && We--,
Mt(
i[Ce],
g + 1,
i[Ae],
at ? 2 : i[Te],
5
);
},
at,
ot(g)
))
: ((f = !0), at && (u = 8001)));
}
} finally {
d ||
(Ue[H](),
(function (t, n, r, i) {
try {
i && s[Ve](),
200 === n &&
(i || t[Fe] || s._clearBackOff(),
(function (e) {
if (st) {
var t = (0, c.WB)();
(0, y.I)(e, function (e) {
e &&
e[Z]() > 0 &&
(function (e, t) {
st &&
(0, y.I)(
e,
function (e) {
At(
(e[Me] =
e[Me] || {}),
"sendEventCompleted",
t
);
}
);
})(e[Q](), t);
});
}
})(t[Ce])),
Vt(t[Ce], n, t[Te], !0);
} finally {
0 === t[Te] &&
(We--,
5 !== r &&
e.sendQueuedRequests(t[Te], r));
}
})(i, u, o, f)),
Vt(l, 8004, i[Te]);
}
})(n, i, t, a);
},
o = t[Ae] || t[Fe];
try {
h[Le](n, i, o), $ && $(x, n, o, t[De]);
} catch (e) {
(0, _.OG)(
d,
"Unexpected exception sending payload. Ex:" +
(0, Ye.m)(e)
),
mt(i, 0, {});
}
}),
(0, l.r2)(
p,
function () {
return "HttpManager:_doPayloadSend.sender";
},
function () {
if (O)
if (
(0 === t[Te] && We++,
u && !t.isBeacon && 3 !== h[je])
) {
var e = {
data: x[ye],
urlString: x[ge],
headers: (0, c.X$)({}, x[_e]),
timeout: x[me],
disableXhrSync: x[de],
disableFetchKeepAlive: x[fe],
},
n = !1;
(0, l.r2)(
p,
function () {
return "HttpManager:_doPayloadSend.sendHook";
},
function () {
try {
V(
e,
function (e) {
(n = !0),
ze ||
e[Pe] ||
((e[Pe] = e[Pe] || x[Pe]),
(e[be] = e[be] || x[be])),
O(e);
},
t.isSync || t[Ae]
);
} catch (e) {
n || O(x);
}
}
);
} else O(x);
}
);
},
function () {
return {
thePayload: t,
serializationStart: n,
serializationCompleted: i,
sendReason: a,
};
},
t[Fe]
);
}
t.sizeExceed &&
t.sizeExceed[J] > 0 &&
Vt(t.sizeExceed, 8003, t[Te]),
t.failedEvts &&
t.failedEvts[J] > 0 &&
Vt(t.failedEvts, 8002, t[Te]);
}
function Lt(e, t, n) {
t ? e() : Ke.set(e, n);
}
function Nt(e) {
var t = lt;
try {
for (var n = 0; n < t[J]; n++)
try {
t[n](e);
} catch (e) {
(0, _.ZP)(d, 1, 519, "Response handler failed: " + e);
}
if (e) {
var r = JSON.parse(e);
(0, c.yD)(r.webResult) &&
(0, c.yD)(r.webResult[K]) &&
m.set("MSFPC", r.webResult[K], 31536e3);
}
} catch (e) {}
}
function Vt(e, t, n, r) {
if (e && e[J] > 0 && i) {
var o =
i[
((a = t),
(u = St[a]),
(0, c.yD)(u) ||
((u = "oth"),
a >= 9e3 && a <= 9999
? (u = "rspFail")
: a >= 8e3 && a <= 8999
? (u = x)
: a >= 1e3 && a <= 1999 && (u = "send")),
u)
];
if (o) {
var s = 0 !== n;
(0, l.r2)(
p,
function () {
return "HttpManager:_sendBatchesNotification";
},
function () {
Lt(
function () {
try {
o.call(i, e, t, s, n);
} catch (e) {
(0, _.ZP)(
d,
1,
74,
"send request notification failed: " + e
);
}
},
r || s,
0
);
},
function () {
return {
batches: Dt(e),
reason: t,
isSync: s,
sendSync: r,
sendType: n,
};
},
!s
);
}
}
var a, u;
}
(e[oe] = function (e, t, n) {
B ||
((p = t),
(m = t.getCookieMgr()),
(d = (s = n).diagLog()),
(0, nt.Y)(
ut,
(0, h.a)(e, function (e) {
var t,
r = e.cfg,
i = e.cfg.extensionConfig[n.identifier];
(Ke = yt(i[se], i[ae])),
(0, c.yD)(r.anonCookieName)
? (function (e, t, n) {
for (var r = 0; r < e[J]; r++)
if (e[r].name === t)
return void (e[r].value = n);
e[Y]({ name: t, value: n });
})(He, "anoncknm", r.anonCookieName)
: (function (e, t) {
for (var n = 0; n < e[J]; n++)
if ("anoncknm" === e[n].name)
return void e[te](n, 1);
})(He),
(V = i.payloadPreprocessor),
($ = i.payloadListener);
var s = i.httpXHROverride,
l = i[ce] ? i[ce] : r.endpointUrl;
(o = l + wt),
(ct = !!(0, u.b0)(i[ue]) || !i[ue]),
(st = !i.disableEventTimings);
var h = i.valueSanitizer,
g = i.stringifyObjects,
m = !!r[le];
(0, u.b0)(i[le]) || (m = !!i[le]),
(v = i.xhrTimeout),
(w = !!i[de]),
(S = !!i[fe]),
(N = !1 !== i.addNoResponse),
(qe = !(0, Ze.lV)()),
(Xe = new pt(p, h, g, m)),
(0, u.hX)(i[he]) || (qe = !!i[he]);
var y = s,
b = i[pe] ? s : null,
P = i[pe] ? s : null,
C = [3, 2];
if (!s) {
ze = !1;
var T = (0, Ze.g$)();
T &&
T.protocol &&
"file:" === T.protocol[ne]() &&
(a = !1);
var x = [];
(0, Ze.lV)()
? ((x = [2, 1]), (C = [2, 1, 3]))
: (x = [1, 2, 3]),
(s = dt((x = It(x, i.transports)), !1)) ||
(0, _.OG)(
d,
"No available transport to send events"
),
(y = dt(x, !0));
}
b || (b = dt((C = It(C, i.unloadTransports)), !0)),
(O =
!ze &&
((qe && (0, Ze.Uf)()) || (!S && (0, Ze.R7)(!0)))),
((t = {})[0] = s),
(t[1] = y || dt([1, 2, 3], !0)),
(t[2] = b || y || dt([1], !0)),
(t[3] = P || dt([2, 3], !0) || y || dt([1], !0)),
(f = t);
})
),
(B = !0));
}),
(e.addResponseHandler = function (e) {
return (
lt[Y](e),
{
rm: function () {
var t = lt.indexOf(e);
t >= 0 && lt[te](t, 1);
},
}
);
}),
(e._getDbgPlgTargets = function () {
return [f[0], $e, Xe, f];
}),
(e.addHeader = function (e, t) {
Je[e] = t;
}),
(e[xe] = function () {
return kt() && Ue[U]();
}),
(e[Oe] = function (e, t) {
(0, u.b0)(e) && (e = 0),
at && ((e = Tt(e)), (t = 2)),
Rt(Ge, e, 0) && Mt(jt(), 0, !1, e, t || 0);
}),
(e[Ee] = function () {
return !Be && 0 === We && 0 === Ge[J];
}),
(e[Ie] = function (e) {
at = e;
}),
(e.addBatch = function (e) {
if (e && e[Z]() > 0) {
if ($e.isTenantKilled(e[X]())) return !1;
Ge[Y](e);
}
return !0;
}),
(e.teardown = function () {
Ge[J] > 0 && Mt(jt(), 0, !0, 2, 2),
(0, y.I)(ut, function (e) {
e && e.rm && e.rm();
}),
(ut = []);
}),
(e.pause = function () {
Be = !0;
}),
(e.resume = function () {
(Be = !1), e[Oe](0, 4);
}),
(e[ke] = function (e, t, n) {
e &&
e[Z]() > 0 &&
((0, u.hX)(t) && (t = 1),
at && ((t = Tt(t)), (n = 2)),
Mt([e], 0, !1, t, n || 0));
});
});
}
return (e.__ieDyn = 1), e;
})(),
jt = 1e4,
Rt = "eventsDiscarded",
Dt = void 0,
Mt = (0, P.ZH)({
eventsLimitInMem: { isVal: c.ei, v: jt },
immediateEventLimit: { isVal: c.ei, v: 500 },
autoFlushEventsLimit: { isVal: c.ei, v: 0 },
disableAutoBatchFlushLimit: !1,
httpXHROverride: {
isVal: function (e) {
return e && e[Le];
},
v: Dt,
},
overrideInstrumentationKey: Dt,
overrideEndpointUrl: Dt,
disableTelemetry: !1,
ignoreMc1Ms0CookieProcessing: !1,
setTimeoutOverride: Dt,
clearTimeoutOverride: Dt,
payloadPreprocessor: Dt,
payloadListener: Dt,
disableEventTimings: Dt,
valueSanitizer: Dt,
stringifyObjects: Dt,
enableCompoundKey: Dt,
disableOptimizeObj: !1,
transports: Dt,
unloadTransports: Dt,
useSendBeacon: Dt,
disableFetchKeepAlive: Dt,
avoidOptions: !1,
xhrTimeout: Dt,
disableXhrSync: Dt,
alwaysUseXhrOverride: !1,
maxEventRetryAttempts: { isVal: u.Et, v: 6 },
maxUnloadEventRetryAttempts: { isVal: u.Et, v: 2 },
addNoResponse: Dt,
}),
At = (function (e) {
function t() {
var n,
s = e.call(this) || this;
(s.identifier = "PostChannel"),
(s.priority = 1011),
(s.version = "4.0.3");
var u,
w,
P,
C,
T,
x,
O,
E,
I,
k,
j,
R,
D,
M,
A,
F,
L,
V,
K,
U,
q,
W,
z,
H,
ne,
re = !1,
ie = [],
ce = !1,
ue = 0,
le = 0,
de = {},
fe = r;
return (
(0, a.A)(t, s, function (e, t) {
function s() {
(0, d.Ds)(null, V), (0, d.sq)(null, V), (0, d.vF)(null, V);
}
function a(e) {
"beforeunload" !== (e || (0, g.zk)().event).type &&
((A = !0), E[Ie](A)),
Se(2, 2);
}
function he(e) {
(A = !1), E[Ie](A);
}
function pe(e, t) {
if (
(e[Ue] || (e[Ue] = 0),
e[qe] || (e[qe] = 1),
e.ext && e.ext[$] && delete e.ext[$],
e.ext && e.ext[B] && e.ext[B].id && delete e.ext[B].id,
M &&
((e.ext = (0, m.hW)(e.ext)),
e[We] && (e[We] = (0, m.hW)(e[We])),
e[ye] && (e[ye] = (0, m.hW)(e[ye]))),
e[ze])
)
if (x || ce) (e[qe] = 3), (e[ze] = !1);
else if (E)
return (
M && (e = (0, m.hW)(e)),
void E[ke](
Ge.create(e[X], [e]),
!0 === e[ze] ? 1 : e[ze],
3
)
);
var n = e[qe],
r = le,
i = P;
4 === n && ((r = ue), (i = w));
var o = !1;
if (r < i) o = !je(e, t);
else {
var s = 1,
a = 20;
4 === n && ((s = 4), (a = 1)),
(o = !0),
(function (e, t, n, r) {
for (; n <= t; ) {
var i = Pe(e, t, !0);
if (i && i[Z]() > 0) {
var o = i[ee](0, r),
s = o[Z]();
if (s > 0)
return (
4 === n ? (ue -= s) : (le -= s),
Xe(Rt, [o], v.x.QueueFull),
!0
);
}
n++;
}
return De(), !1;
})(e[X], e[qe], s, a) && (o = !je(e, t));
}
o && Je(Rt, [e], v.x.QueueFull);
}
function ge(e, t, n) {
var r = Me(e, t, n);
return E[Oe](t, n), r;
}
function me() {
return le > 0;
}
function ve() {
if (
(R >= 0 && Me(R, 0, D) && E[Oe](0, D),
ue > 0 && !T && !ce)
) {
var e = de[fe][2];
e >= 0 &&
(T = _e(function () {
(T = null), ge(4, 0, 1), ve();
}, e));
}
var t = de[fe][1];
!C &&
!u &&
t >= 0 &&
!ce &&
(me()
? (C = _e(function () {
(C = null),
ge(0 === O ? 3 : 1, 0, 1),
O++,
(O %= 2),
ve();
}, t))
: (O = 0));
}
function be() {
(n = null),
(re = !1),
(ie = []),
(u = null),
(ce = !1),
(ue = 0),
(w = 500),
(le = 0),
(P = jt),
(de = {}),
(fe = r),
(C = null),
(T = null),
(x = 0),
(O = 0),
(I = {}),
(k = 0),
(z = !1),
(j = 0),
(R = -1),
(D = null),
(M = !0),
(A = !1),
(F = 6),
(L = 2),
(V = null),
(H = null),
(ne = !1),
(K = yt()),
(E = new kt(500, 2, 1, {
requeue: Ne,
send: Ze,
sent: Qe,
drop: Ye,
rspFail: et,
oth: tt,
})),
Le(),
(I[4] = { batches: [], iKeyMap: {} }),
(I[3] = { batches: [], iKeyMap: {} }),
(I[2] = { batches: [], iKeyMap: {} }),
(I[1] = { batches: [], iKeyMap: {} }),
nt();
}
function _e(e, t) {
0 === t && x && (t = 1);
var n = 1e3;
return x && (n = ot(x - 1)), K.set(e, t * n);
}
function we() {
return null !== C && (C.cancel(), (C = null), (O = 0), !0);
}
function Se(e, t) {
we(), u && (u.cancel(), (u = null)), ce || ge(1, e, t);
}
function Pe(e, t, n) {
var r = I[t];
r || (r = I[(t = 1)]);
var i = r.iKeyMap[e];
return (
!i &&
n &&
((i = Ge.create(e)),
r.batches[Y](i),
(r.iKeyMap[e] = i)),
i
);
}
function Te(t, n) {
E[xe]() &&
!x &&
(k > 0 && le > k && (n = !0),
n && null == u && e.flush(t, function () {}, 20));
}
function je(e, t) {
M && (e = (0, m.hW)(e));
var n = e[qe],
r = Pe(e[X], n, !0);
return (
!!r.addEvent(e) &&
(4 !== n
? (le++,
t && 0 === e[Ue] && Te(!e.sync, j > 0 && r[Z]() >= j))
: ue++,
!0)
);
}
function De() {
for (
var e = 0,
t = 0,
n = function (n) {
var r = I[n];
r &&
r[Ce] &&
(0, y.I)(r[Ce], function (r) {
4 === n ? (e += r[Z]()) : (t += r[Z]());
});
},
r = 1;
r <= 4;
r++
)
n(r);
(le = t), (ue = e);
}
function Me(t, n, r) {
var i = !1,
o = 0 === n;
return (
!o || E[xe]()
? (0, l.r2)(
e.core,
function () {
return "PostChannel._queueBatches";
},
function () {
for (var e = [], n = 4; n >= t; ) {
var r = I[n];
r &&
r.batches &&
r.batches[J] > 0 &&
((0, y.I)(r[Ce], function (t) {
E.addBatch(t)
? (i = i || (t && t[Z]() > 0))
: (e = e[G](t[Q]())),
4 === n ? (ue -= t[Z]()) : (le -= t[Z]());
}),
(r[Ce] = []),
(r.iKeyMap = {})),
n--;
}
e[J] > 0 && Je(Rt, e, v.x.KillSwitch),
i && R >= t && ((R = -1), (D = 0));
},
function () {
return { latency: t, sendType: n, sendReason: r };
},
!o
)
: ((R = R >= 0 ? Math.min(R, t) : t),
(D = Math.max(D, r))),
i
);
}
function Ae(e, t) {
ge(1, 0, t),
De(),
Fe(function () {
e && e(),
ie[J] > 0
? (u = _e(function () {
(u = null), Ae(ie.shift(), t);
}, 0))
: ((u = null), ve());
});
}
function Fe(e) {
E[Ee]()
? e()
: (u = _e(function () {
(u = null), Fe(e);
}, 0.25));
}
function Le() {
((de = {})[r] = [2, 1, 0]),
(de[i] = [6, 3, 0]),
(de[o] = [18, 9, 0]);
}
function Ne(t, n) {
var r = [],
i = F;
A && (i = L),
(0, y.I)(t, function (t) {
t &&
t[Z]() > 0 &&
(0, y.I)(t[Q](), function (t) {
t &&
(t[ze] && ((t[qe] = 4), (t[ze] = !1)),
t[Ue] < i
? ((0, c.u9)(t, e[Ke]), pe(t, !1))
: r[Y](t));
});
}),
r[J] > 0 && Je(Rt, r, v.x.NonRetryableStatus),
A && Se(2, 2);
}
function He(t, n) {
var r = W || {},
i = r[t];
if (i)
try {
i.apply(r, n);
} catch (n) {
(0, _.ZP)(
e.diagLog(),
1,
74,
t + " notification failed: " + n
);
}
}
function Je(e, t) {
for (var n = [], r = 2; r < arguments.length; r++)
n[r - 2] = arguments[r];
t && t[J] > 0 && He(e, [t][G](n));
}
function Xe(e, t) {
for (var n = [], r = 2; r < arguments.length; r++)
n[r - 2] = arguments[r];
t &&
t[J] > 0 &&
(0, y.I)(t, function (t) {
t && t[Z]() > 0 && He(e, [t.events()][G](n));
});
}
function Ze(e, t, n) {
e &&
e[J] > 0 &&
He("eventsSendRequest", [
t >= 1e3 && t <= 1999 ? t - 1e3 : 0,
!0 !== n,
]);
}
function Qe(e, t) {
Xe("eventsSent", e, t), ve();
}
function Ye(e, t) {
Xe(Rt, e, t >= 8e3 && t <= 8999 ? t - 8e3 : v.x.Unknown);
}
function et(e) {
Xe(Rt, e, v.x.NonRetryableStatus), ve();
}
function tt(e, t) {
Xe(Rt, e, v.x.Unknown), ve();
}
function nt() {
j = q ? 0 : Math.max(1500, P / 6);
}
be(),
(e._getDbgPlgTargets = function () {
return [E, n];
}),
(e[oe] = function (r, i, o) {
(0, l.r2)(
i,
function () {
return "PostChannel:initialize";
},
function () {
t[oe](r, i, o), (W = i.getNotifyMgr());
try {
(V = (0, d.Hm)(
(0, f.Z)(e[Ke]),
i.evtNamespace && i.evtNamespace()
)),
e._addHook(
(0, h.a)(r, function (t) {
var r = t.cfg,
o = (0, p.i8)(null, r, i);
(n = o.getExtCfg(e[Ke], Mt)),
(K = yt(n[se], n[ae])),
(M = !n.disableOptimizeObj && (0, c.F2)()),
(U = n.ignoreMc1Ms0CookieProcessing),
(function (e) {
var t = e[Re];
e[Re] = function () {
var n = 0;
return U && (n |= 2), n | t.call(e);
};
})(i),
(P = n[$e]),
(w = n.immediateEventLimit),
(k = n[Be]),
(F = n.maxEventRetryAttempts),
(L = n.maxUnloadEventRetryAttempts),
(q = n.disableAutoBatchFlushLimit),
nt(),
(H = n.overrideInstrumentationKey),
(ne = !!n.disableTelemetry),
z && s();
var u = r.disablePageUnloadEvents || [];
(z = (0, d.ee)(a, u, V)),
(z = (0, d.Fc)(a, u, V) || z),
(z =
(0, d.oS)(
he,
r.disablePageShowEvents,
V
) || z);
})
),
E[oe](r, e.core, e);
} catch (t) {
throw (e.setInitialized(!1), t);
}
},
function () {
return { theConfig: r, core: i, extensions: o };
}
);
}),
(e.processTelemetry = function (t, n) {
(0, c.u9)(t, e[Ke]), (n = n || e._getTelCtx(n));
var r = t;
ne ||
re ||
(H && (r[X] = H), pe(r, !0), A ? Se(2, 2) : ve()),
e.processNext(r, n);
}),
(e._doTeardown = function (e, t) {
Se(2, 2), (re = !0), E.teardown(), s(), be();
}),
(e.setEventQueueLimits = function (e, t) {
(n[$e] = P = (0, c.ei)(e) ? e : jt),
(n[Be] = k = (0, c.ei)(t) ? t : 0),
nt();
var r = le > e;
if (!r && j > 0)
for (var i = 1; !r && i <= 3; i++) {
var o = I[i];
o &&
o[Ce] &&
(0, y.I)(o[Ce], function (e) {
e && e[Z]() >= j && (r = !0);
});
}
Te(!0, r);
}),
(e.pause = function () {
we(), (ce = !0), E.pause();
}),
(e.resume = function () {
(ce = !1), E.resume(), ve();
}),
(e._loadTransmitProfiles = function (e) {
we(),
Le(),
(fe = r),
ve(),
(0, b.z)(e, function (e, t) {
var n = t[J];
if (n >= 2) {
var r = n > 2 ? t[2] : 0;
if (
(t[te](0, n - 2),
t[1] < 0 && (t[0] = -1),
t[1] > 0 && t[0] > 0)
) {
var i = t[0] / t[1];
t[0] = Math.ceil(i) * t[1];
}
r >= 0 && t[1] >= 0 && r > t[1] && (r = t[1]),
t[Y](r),
(de[e] = t);
}
});
}),
(e.flush = function (e, t, n) {
var r;
if ((void 0 === e && (e = !0), !ce))
if (((n = n || 1), e))
t ||
(r = (0, S.Qo)(function (e) {
t = e;
})),
null == u
? (we(),
Me(1, 0, n),
(u = _e(function () {
(u = null), Ae(t, n);
}, 0)))
: ie[Y](t);
else {
var i = we();
ge(1, 1, n), t && t(), i && ve();
}
return r;
}),
(e.setMsaAuthTicket = function (e) {
E.addHeader(N, e);
}),
(e.hasEvents = me),
(e._setTransmitProfile = function (e) {
fe !== e && void 0 !== de[e] && (we(), (fe = e), ve());
}),
(0, m.o$)(
e,
function () {
return E;
},
["addResponseHandler"]
),
(e[Ve] = function () {
x < 4 && (x++, we(), ve());
}),
(e._clearBackOff = function () {
x && ((x = 0), we(), ve());
});
}),
s
);
}
return (0, s.qU)(t, e), (t.__ieDyn = 1), t;
})(w.s);
},
4484: (e, t, n) => {
"use strict";
n.d(t, { F: () => d, H: () => l });
var r = n(1011),
i = n(1324),
o = n(2494),
s = n(5025),
a = n(5130),
c = ";",
u = "=";
function l(e) {
if (!e) return {};
var t = e[a.sY](c),
n = (0, r.K)(
t,
function (e, t) {
var n = t[a.sY](u);
if (2 === n[a.oI]) {
var r = n[0][a.OL](),
i = n[1];
e[r] = i;
}
return e;
},
{}
);
if ((0, i.cG)(n)[a.oI] > 0) {
if (n.endpointsuffix) {
var l = n.location ? n.location + "." : "";
n[a.zV] = n[a.zV] || "https://" + l + "dc." + n.endpointsuffix;
}
(n[a.zV] = n[a.zV] || s._G),
(0, o.C)(n[a.zV], "/") && (n[a.zV] = n[a.zV].slice(0, -1));
}
return n;
}
var d = { parse: l };
},
5025: (e, t, n) => {
"use strict";
n.d(t, {
R2: () => u,
_G: () => a,
jp: () => o,
ks: () => l,
tU: () => i,
wc: () => c,
xF: () => r,
ym: () => s,
});
var r = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation",
i = "sampleRate",
o = "ProcessLegacy",
s = "http.method",
a = "https://dc.services.visualstudio.com",
c = "/v2/track",
u = "not_specified",
l = "iKey";
},
7374: (e, t, n) => {
"use strict";
n.d(t, { e: () => i, u: () => o });
var r = n(4282),
i = (0, r.H)({ LocalStorage: 0, SessionStorage: 1 }),
o = (0, r.H)({ AI: 0, AI_AND_W3C: 1, W3C: 2 });
},
87: (e, t, n) => {
"use strict";
n.d(t, { Dt: () => a, Y8: () => u, bb: () => c, vv: () => l });
var r = n(5439),
i = n(6668),
o = n(5130),
s = "";
function a(e, t) {
return (
void 0 === t && (t = !1),
null == e ? t : "true" === e.toString()[o.OL]()
);
}
function c(e) {
(isNaN(e) || e < 0) && (e = 0), (e = Math.round(e));
var t = s + (e % 1e3),
n = s + (Math.floor(e / 1e3) % 60),
r = s + (Math.floor(e / 6e4) % 60),
i = s + (Math.floor(e / 36e5) % 24),
a = Math.floor(e / 864e5);
return (
(t = 1 === t[o.oI] ? "00" + t : 2 === t[o.oI] ? "0" + t : t),
(n = n[o.oI] < 2 ? "0" + n : n),
(r = r[o.oI] < 2 ? "0" + r : r),
(i = i[o.oI] < 2 ? "0" + i : i),
(a > 0 ? a + "." : s) + i + ":" + r + ":" + n + "." + t
);
}
function u(e, t) {
var n = null;
return (
(0, r.I)(e, function (e) {
if (e.identifier === t) return (n = e), -1;
}),
n
);
}
function l(e, t, n, r, o) {
return (
!o &&
(0, i.Kg)(e) &&
("Script error." === e || "Script error" === e)
);
}
},
8596: (e, t, n) => {
"use strict";
n.d(t, { o: () => p });
var r = n(659),
i = n(3673);
function o(e) {
var t = "ai." + e + ".";
return function (e) {
return t + e;
};
}
var s = o("application"),
a = o("device"),
c = o("location"),
u = o("operation"),
l = o("session"),
d = o("user"),
f = o("cloud"),
h = o("internal"),
p = (function (e) {
function t() {
return e.call(this) || this;
}
return (0, r.qU)(t, e), t;
})(
(0, i.SZ)({
applicationVersion: s("ver"),
applicationBuild: s("build"),
applicationTypeId: s("typeId"),
applicationId: s("applicationId"),
applicationLayer: s("layer"),
deviceId: a("id"),
deviceIp: a("ip"),
deviceLanguage: a("language"),
deviceLocale: a("locale"),
deviceModel: a("model"),
deviceFriendlyName: a("friendlyName"),
deviceNetwork: a("network"),
deviceNetworkName: a("networkName"),
deviceOEMName: a("oemName"),
deviceOS: a("os"),
deviceOSVersion: a("osVersion"),
deviceRoleInstance: a("roleInstance"),
deviceRoleName: a("roleName"),
deviceScreenResolution: a("screenResolution"),
deviceType: a("type"),
deviceMachineName: a("machineName"),
deviceVMName: a("vmName"),
deviceBrowser: a("browser"),
deviceBrowserVersion: a("browserVersion"),
locationIp: c("ip"),
locationCountry: c("country"),
locationProvince: c("province"),
locationCity: c("city"),
operationId: u("id"),
operationName: u("name"),
operationParentId: u("parentId"),
operationRootId: u("rootId"),
operationSyntheticSource: u("syntheticSource"),
operationCorrelationVector: u("correlationVector"),
sessionId: l("id"),
sessionIsFirst: l("isFirst"),
sessionIsNew: l("isNew"),
userAccountAcquisitionDate: d("accountAcquisitionDate"),
userAccountId: d("accountId"),
userAgent: d("userAgent"),
userId: d("id"),
userStoreRegion: d("storeRegion"),
userAuthUserId: d("authUserId"),
userAnonymousUserAcquisitionDate: d("anonUserAcquisitionDate"),
userAuthenticatedUserAcquisitionDate: d(
"authUserAcquisitionDate"
),
cloudName: f("name"),
cloudRole: f("role"),
cloudRoleVer: f("roleVer"),
cloudRoleInstance: f("roleInstance"),
cloudEnvironment: f("environment"),
cloudLocation: f("location"),
cloudDeploymentUnit: f("deploymentUnit"),
internalNodeName: h("nodeName"),
internalSdkVersion: h("sdkVersion"),
internalAgentVersion: h("agentVersion"),
internalSnippet: h("snippet"),
internalSdkSrc: h("sdkSrc"),
})
);
},
9762: (e, t, n) => {
"use strict";
n.d(t, { O: () => r });
var r = (0, n(4282).H)({
Verbose: 0,
Information: 1,
Warning: 2,
Error: 3,
Critical: 4,
});
},
1575: (e, t, n) => {
"use strict";
n.d(t, { F: () => i, O: () => o });
var r = n(8596),
i = {
UserExt: "user",
DeviceExt: "device",
TraceExt: "trace",
WebExt: "web",
AppExt: "app",
OSExt: "os",
SessionExt: "ses",
SDKExt: "sdk",
},
o = new r.o();
},
2910: (e, t, n) => {
"use strict";
n.d(t, { a: () => r });
var r = (0, n(4282).o)({
requestContextHeader: [0, "Request-Context"],
requestContextTargetKey: [1, "appId"],
requestContextAppIdFormat: [2, "appId=cid-v1:"],
requestIdHeader: [3, "Request-Id"],
traceParentHeader: [4, "traceparent"],
traceStateHeader: [5, "tracestate"],
sdkContextHeader: [6, "Sdk-Context"],
sdkContextHeaderAppIdRequest: [7, "appId"],
requestContextHeaderLowerCase: [8, "request-context"],
});
},
4658: (e, t, n) => {
"use strict";
n.d(t, {
AN: () => C,
BW: () => _,
Dt: () => O,
Nu: () => v,
Se: () => w,
T9: () => T,
_M: () => S,
iw: () => b,
tm: () => P,
v7: () => E,
vH: () => x,
vh: () => y,
});
var r = n(6668),
i = n(3076),
o = n(3775),
s = n(3673),
a = n(8693),
c = n(9018),
u = n(7374),
l = n(5130),
d = void 0,
f = void 0,
h = "";
function p() {
return _() ? g(u.e.LocalStorage) : null;
}
function g(e) {
try {
if ((0, r.hX)((0, i.mS)())) return null;
var t = new Date()[l.xE](),
n = (0, i.zS)(
e === u.e.LocalStorage ? "localStorage" : "sessionStorage"
),
o = h + t;
n.setItem(o, t);
var s = n.getItem(o) !== t;
if ((n[l.AZ](o), !s)) return n;
} catch (e) {}
return null;
}
function m() {
return C() ? g(u.e.SessionStorage) : null;
}
function v() {
(d = !1), (f = !1);
}
function y(e) {
h = e || "";
}
function b() {
(d = _(!0)), (f = C(!0));
}
function _(e) {
return (e || void 0 === d) && (d = !!g(u.e.LocalStorage)), d;
}
function w(e, t) {
var n = p();
if (null !== n)
try {
return n.getItem(t);
} catch (t) {
(d = !1),
(0, o.ZP)(
e,
2,
1,
"Browser failed read of local storage. " + (0, s.lL)(t),
{ exception: (0, a.m)(t) }
);
}
return null;
}
function S(e, t, n) {
var r = p();
if (null !== r)
try {
return r.setItem(t, n), !0;
} catch (t) {
(d = !1),
(0, o.ZP)(
e,
2,
3,
"Browser failed write to local storage. " + (0, s.lL)(t),
{ exception: (0, a.m)(t) }
);
}
return !1;
}
function P(e, t) {
var n = p();
if (null !== n)
try {
return n[l.AZ](t), !0;
} catch (t) {
(d = !1),
(0, o.ZP)(
e,
2,
5,
"Browser failed removal of local storage item. " +
(0, s.lL)(t),
{ exception: (0, a.m)(t) }
);
}
return !1;
}
function C(e) {
return (e || void 0 === f) && (f = !!g(u.e.SessionStorage)), f;
}
function T() {
var e = [];
return (
C() &&
(0, c.z)((0, i.zS)("sessionStorage"), function (t) {
e.push(t);
}),
e
);
}
function x(e, t) {
var n = m();
if (null !== n)
try {
return n.getItem(t);
} catch (t) {
(f = !1),
(0, o.ZP)(
e,
2,
2,
"Browser failed read of session storage. " + (0, s.lL)(t),
{ exception: (0, a.m)(t) }
);
}
return null;
}
function O(e, t, n) {
var r = m();
if (null !== r)
try {
return r.setItem(t, n), !0;
} catch (t) {
(f = !1),
(0, o.ZP)(
e,
2,
4,
"Browser failed write to session storage. " + (0, s.lL)(t),
{ exception: (0, a.m)(t) }
);
}
return !1;
}
function E(e, t) {
var n = m();
if (null !== n)
try {
return n[l.AZ](t), !0;
} catch (t) {
(f = !1),
(0, o.ZP)(
e,
2,
6,
"Browser failed removal of session storage item. " +
(0, s.lL)(t),
{ exception: (0, a.m)(t) }
);
}
return !1;
}
},
7358: (e, t, n) => {
"use strict";
n.d(t, { B: () => r });
var r = function (e, t) {
(this.aiDataContract = { baseType: 1, baseData: 1 }),
(this.baseType = e),
(this.baseData = t);
};
},
7975: (e, t, n) => {
"use strict";
n.d(t, {
HQ: () => b,
Rr: () => h,
Vj: () => y,
Vk: () => g,
Vt: () => m,
_T: () => _,
lq: () => f,
pJ: () => p,
qW: () => w,
xP: () => v,
zx: () => d,
});
var r = n(8993),
i = n(3775),
o = n(9018),
s = n(6668),
a = n(7292),
c = n(3178),
u = n(5977),
l = n(5130);
function d(e, t, n) {
var r = t[l.oI],
i = f(e, t);
if (i[l.oI] !== r) {
for (var o = 0, s = i; void 0 !== n[s]; )
o++, (s = (0, c.P0)(i, 0, 147) + w(o));
i = s;
}
return i;
}
function f(e, t) {
var n;
return (
t &&
(t = (0, r.EH)((0, u.o)(t)))[l.oI] > 150 &&
((n = (0, c.P0)(t, 0, 150)),
(0, i.ZP)(
e,
2,
57,
"name is too long. It has been truncated to 150 characters.",
{ name: t },
!0
)),
n || t
);
}
function h(e, t, n) {
var o;
return (
void 0 === n && (n = 1024),
t &&
((n = n || 1024),
(t = (0, r.EH)((0, u.o)(t)))[l.oI] > n &&
((o = (0, c.P0)(t, 0, n)),
(0, i.ZP)(
e,
2,
61,
"string value is too long. It has been truncated to " +
n +
" characters.",
{ value: t },
!0
))),
o || t
);
}
function p(e, t) {
return _(e, t, 2048, 66);
}
function g(e, t) {
var n;
return (
t &&
t[l.oI] > 32768 &&
((n = (0, c.P0)(t, 0, 32768)),
(0, i.ZP)(
e,
2,
56,
"message is too long, it has been truncated to 32768 characters.",
{ message: t },
!0
)),
n || t
);
}
function m(e, t) {
var n;
if (t) {
var r = "" + t;
r[l.oI] > 32768 &&
((n = (0, c.P0)(r, 0, 32768)),
(0, i.ZP)(
e,
2,
52,
"exception is too long, it has been truncated to 32768 characters.",
{ exception: t },
!0
));
}
return n || t;
}
function v(e, t) {
if (t) {
var n = {};
(0, o.z)(t, function (t, r) {
if ((0, s.Gv)(r) && (0, a.Z)())
try {
r = (0, a.hm)()[l.Jj](r);
} catch (t) {
(0, i.ZP)(
e,
2,
49,
"custom property is not valid",
{ exception: t },
!0
);
}
(r = h(e, r, 8192)), (t = d(e, t, n)), (n[t] = r);
}),
(t = n);
}
return t;
}
function y(e, t) {
if (t) {
var n = {};
(0, o.z)(t, function (t, r) {
(t = d(e, t, n)), (n[t] = r);
}),
(t = n);
}
return t;
}
function b(e, t) {
return t ? _(e, t, 128, 69)[l.xE]() : t;
}
function _(e, t, n, o) {
var s;
return (
t &&
(t = (0, r.EH)((0, u.o)(t)))[l.oI] > n &&
((s = (0, c.P0)(t, 0, n)),
(0, i.ZP)(
e,
2,
o,
"input is too long, it has been truncated to " +
n +
" characters.",
{ data: t },
!0
)),
s || t
);
}
function w(e) {
var t = "00" + e;
return (0, c.hK)(t, t[l.oI] - 3);
}
},
1062: (e, t, n) => {
"use strict";
n.d(t, { L: () => a });
var r = n(3673),
i = n(5025),
o = n(5130),
s = n(7975),
a = function (e, t, n) {
var a = this,
c = this;
(c.ver = 1),
(c.sampleRate = 100),
(c.tags = {}),
(c[o.RS] = (0, s.Rr)(e, n) || i.R2),
(c.data = t),
(c.time = (0, r._u)(new Date())),
(c.aiDataContract = {
time: 1,
iKey: 1,
name: 1,
sampleRate: function () {
return 100 === a.sampleRate ? 4 : 1;
},
tags: 1,
data: 1,
});
};
},
3072: (e, t, n) => {
"use strict";
n.d(t, { J: () => s });
var r = n(5025),
i = n(5130),
o = n(7975),
s = (function () {
function e(e, t, n, s) {
this.aiDataContract = {
ver: 1,
name: 1,
properties: 0,
measurements: 0,
};
var a = this;
(a.ver = 2),
(a[i.RS] = (0, o.Rr)(e, t) || r.R2),
(a[i.$y] = (0, o.xP)(e, n)),
(a[i.XA] = (0, o.Vj)(e, s));
}
return (
(e.envelopeType = "Microsoft.ApplicationInsights.{0}.Event"),
(e.dataType = "EventData"),
e
);
})();
},
5397: (e, t, n) => {
"use strict";
n.d(t, { WJ: () => x });
var r = n(659),
i = n(6668),
o = n(5439),
s = n(4335),
a = n(8993),
c = n(5881),
u = n(3076),
l = n(5025),
d = n(5130),
f = n(7975),
h = "error",
p = "stack",
g = "stackDetails",
m = "errorSrc",
v = "message",
y = "description";
function b(e, t) {
var n = e;
return (
n &&
!(0, i.Kg)(n) &&
(JSON && JSON[d.Jj]
? ((n = JSON[d.Jj](e)),
!t ||
(n && "{}" !== n) ||
(n = (0, i.Tn)(e[d.xE]) ? e[d.xE]() : "" + e))
: (n = e + " - (Missing JSON.stringify)")),
n || ""
);
}
function _(e, t) {
var n = e;
return (
e &&
(n && !(0, i.Kg)(n) && (n = e[v] || e[y] || n),
n && !(0, i.Kg)(n) && (n = b(n, !0)),
e.filename &&
(n =
n +
" @" +
(e.filename || "") +
":" +
(e.lineno || "?") +
":" +
(e.colno || "?"))),
t &&
"String" !== t &&
"Object" !== t &&
"Error" !== t &&
-1 === (0, c.H)(n || "", t) &&
(n = t + ": " + n),
n || ""
);
}
function w(e) {
return e && e.src && (0, i.Kg)(e.src) && e.obj && (0, i.cy)(e.obj);
}
function S(e) {
var t = e || "";
(0, i.Kg)(t) || (t = (0, i.Kg)(t[p]) ? t[p] : "" + t);
var n = t[d.sY]("\n");
return { src: t, obj: n };
}
function P(e) {
var t = null;
if (e)
try {
if (e[p]) t = S(e[p]);
else if (e[h] && e[h][p]) t = S(e[h][p]);
else if (e.exception && e.exception[p]) t = S(e.exception[p]);
else if (w(e)) t = e;
else if (w(e[g])) t = e[g];
else if ((0, u.zk)() && (0, u.zk)().opera && e[v])
t = (function (e) {
for (var t = [], n = e[d.sY]("\n"), r = 0; r < n[d.oI]; r++) {
var i = n[r];
n[r + 1] && ((i += "@" + n[r + 1]), r++), t.push(i);
}
return { src: e, obj: t };
})(e[d.pM]);
else if (e.reason && e.reason[p]) t = S(e.reason[p]);
else if ((0, i.Kg)(e)) t = S(e);
else {
var n = e[v] || e[y] || "";
(0, i.Kg)(e[m]) && (n && (n += "\n"), (n += " from " + e[m])),
n && (t = S(n));
}
} catch (e) {
t = S(e);
}
return t || { src: "", obj: null };
}
function C(e) {
var t = "";
if (e && !(t = e.typeName || e[d.RS] || ""))
try {
var n = /function (.{1,200})\(/.exec(e.constructor[d.xE]());
t = n && n[d.oI] > 1 ? n[1] : "";
} catch (e) {}
return t;
}
function T(e) {
if (e)
try {
if (!(0, i.Kg)(e)) {
var t = C(e),
n = b(e, !1);
return (
(n && "{}" !== n) ||
(e[h] && (t = C((e = e[h]))), (n = b(e, !0))),
0 !== (0, c.H)(n, t) && "String" !== t ? t + ":" + n : n
);
}
} catch (e) {}
return "" + (e || "");
}
var x = (function () {
function e(e, t, n, r, o, s) {
this.aiDataContract = {
ver: 1,
exceptions: 1,
severityLevel: 0,
properties: 0,
measurements: 0,
};
var a = this;
(a.ver = 2),
(function (e) {
try {
if ((0, i.Gv)(e))
return (
"ver" in e && "exceptions" in e && "properties" in e
);
} catch (e) {}
return !1;
})(t)
? ((a[d.OK] = t[d.OK] || []),
(a[d.$y] = t[d.$y]),
(a[d.XA] = t[d.XA]),
t[d.Ur] && (a[d.Ur] = t[d.Ur]),
t.id && (a.id = t.id),
t[d.Fq] && (a[d.Fq] = t[d.Fq]),
(0, i.hX)(t[d.r1]) || (a[d.r1] = t[d.r1]))
: (n || (n = {}),
(a[d.OK] = [new O(e, t, n)]),
(a[d.$y] = (0, f.xP)(e, n)),
(a[d.XA] = (0, f.Vj)(e, r)),
o && (a[d.Ur] = o),
s && (a.id = s));
}
return (
(e.CreateAutoException = function (e, t, n, r, i, o, s, a) {
var c,
u = C(i || o || e);
return (
((c = {})[d.pM] = _(e, u)),
(c.url = t),
(c.lineNumber = n),
(c.columnNumber = r),
(c.error = T(i || o || e)),
(c.evt = T(o || e)),
(c[d.qg] = u),
(c.stackDetails = P(s || i || o)),
(c.errorSrc = a),
c
);
}),
(e.CreateFromInterface = function (t, n, i, o) {
var a =
n[d.OK] &&
(0, s.W)(n[d.OK], function (e) {
return O[d.vu](t, e);
});
return new e(
t,
(0, r.Im)((0, r.Im)({}, n), { exceptions: a }),
i,
o
);
}),
(e.prototype.toInterface = function () {
var e,
t = this,
n = t.exceptions,
r = t.properties,
i = t.measurements,
o = t.severityLevel,
a = t.problemGroup,
c = t.id,
u = t.isManual,
l =
(n instanceof Array &&
(0, s.W)(n, function (e) {
return e.toInterface();
})) ||
void 0;
return (
((e = { ver: "4.0" })[d.OK] = l),
(e.severityLevel = o),
(e.properties = r),
(e.measurements = i),
(e.problemGroup = a),
(e.id = c),
(e.isManual = u),
e
);
}),
(e.CreateSimpleException = function (e, t, n, r, i, o) {
var s;
return {
exceptions: [
((s = {}),
(s[d.lW] = !0),
(s.message = e),
(s.stack = i),
(s.typeName = t),
s),
],
};
}),
(e.envelopeType = "Microsoft.ApplicationInsights.{0}.Exception"),
(e.dataType = "ExceptionData"),
(e.formatError = T),
e
);
})(),
O = (function () {
function e(e, t, n) {
this.aiDataContract = {
id: 0,
outerId: 0,
typeName: 1,
message: 1,
hasFullStack: 0,
stack: 0,
parsedStack: 2,
};
var r = this;
if (
(function (e) {
try {
if ((0, i.Gv)(e))
return "hasFullStack" in e && "typeName" in e;
} catch (e) {}
return !1;
})(t)
)
(r[d.qg] = t[d.qg]),
(r[d.pM] = t[d.pM]),
(r[p] = t[p]),
(r[d.on] = t[d.on] || []),
(r[d.lW] = t[d.lW]);
else {
var a = t,
c = a && a.evt;
(0, i.bJ)(a) || (a = a[h] || c || a),
(r[d.qg] = (0, f.Rr)(e, C(a)) || l.R2),
(r[d.pM] = (0, f.Vk)(e, _(t || a, r[d.qg])) || l.R2);
var u = t[g] || P(t);
(r[d.on] = (function (e) {
var t,
n = e.obj;
if (n && n[d.oI] > 0) {
t = [];
var r = 0,
i = 0;
if (
((0, o.I)(n, function (e) {
var n = e[d.xE]();
if (E.regex.test(n)) {
var o = new E(n, r++);
(i += o[d.J$]), t.push(o);
}
}),
i > 32768)
)
for (
var s = 0, a = t[d.oI] - 1, c = 0, u = s, l = a;
s < a;
) {
if ((c += t[s][d.J$] + t[a][d.J$]) > 32768) {
var f = l - u + 1;
t.splice(u, f);
break;
}
(u = s), (l = a), s++, a--;
}
}
return t;
})(u)),
(0, i.cy)(r[d.on]) &&
(0, s.W)(r[d.on], function (t) {
(t[d.QE] = (0, f.Rr)(e, t[d.QE])),
(t[d.IE] = (0, f.Rr)(e, t[d.IE]));
}),
(r[p] = (0, f.Vt)(
e,
(function (e) {
var t = "";
return (
e &&
(e.obj
? (0, o.I)(e.obj, function (e) {
t += e + "\n";
})
: (t = e.src || "")),
t
);
})(u)
)),
(r.hasFullStack =
(0, i.cy)(r.parsedStack) && r.parsedStack[d.oI] > 0),
n && (n[d.qg] = n[d.qg] || r[d.qg]);
}
}
return (
(e.prototype.toInterface = function () {
var e,
t = this,
n =
t[d.on] instanceof Array &&
(0, s.W)(t[d.on], function (e) {
return e.toInterface();
});
return (
((e = {
id: t.id,
outerId: t.outerId,
typeName: t[d.qg],
message: t[d.pM],
hasFullStack: t[d.lW],
stack: t[p],
})[d.on] = n || void 0),
e
);
}),
(e.CreateFromInterface = function (t, n) {
var i =
(n[d.on] instanceof Array &&
(0, s.W)(n[d.on], function (e) {
return E[d.vu](e);
})) ||
n[d.on];
return new e(
t,
(0, r.Im)((0, r.Im)({}, n), { parsedStack: i })
);
}),
e
);
})(),
E = (function () {
function e(t, n) {
this.aiDataContract = {
level: 1,
method: 1,
assembly: 0,
fileName: 0,
line: 0,
};
var r = this;
if (((r[d.J$] = 0), "string" == typeof t)) {
var i = t;
(r[d.Av] = n),
(r[d.lx] = "<no_method>"),
(r[d.QE] = (0, a.EH)(i)),
(r[d.IE] = ""),
(r[d.h_] = 0);
var o = i.match(e.regex);
o &&
o[d.oI] >= 5 &&
((r[d.lx] = (0, a.EH)(o[2]) || r[d.lx]),
(r[d.IE] = (0, a.EH)(o[4])),
(r[d.h_] = parseInt(o[5]) || 0));
} else
(r[d.Av] = t[d.Av]),
(r[d.lx] = t[d.lx]),
(r[d.QE] = t[d.QE]),
(r[d.IE] = t[d.IE]),
(r[d.h_] = t[d.h_]),
(r[d.J$] = 0);
(r.sizeInBytes += r.method[d.oI]),
(r.sizeInBytes += r.fileName[d.oI]),
(r.sizeInBytes += r.assembly[d.oI]),
(r[d.J$] += e.baseSize),
(r.sizeInBytes += r.level.toString()[d.oI]),
(r.sizeInBytes += r.line.toString()[d.oI]);
}
return (
(e.CreateFromInterface = function (t) {
return new e(t, null);
}),
(e.prototype.toInterface = function () {
var e = this;
return {
level: e[d.Av],
method: e[d.lx],
assembly: e[d.QE],
fileName: e[d.IE],
line: e[d.h_],
};
}),
(e.regex =
/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/),
(e.baseSize = 58),
e
);
})();
},
5014: (e, t, n) => {
"use strict";
n.d(t, { J: () => a });
var r = n(5025),
i = n(5130),
o = function () {
(this.aiDataContract = {
name: 1,
kind: 0,
value: 1,
count: 0,
min: 0,
max: 0,
stdDev: 0,
}),
(this.kind = 0);
},
s = n(7975),
a = (function () {
function e(e, t, n, a, c, u, l, d, f) {
this.aiDataContract = { ver: 1, metrics: 1, properties: 0 };
var h = this;
h.ver = 2;
var p = new o();
(p[i.F2] = a > 0 ? a : void 0),
(p.max = isNaN(u) || null === u ? void 0 : u),
(p.min = isNaN(c) || null === c ? void 0 : c),
(p[i.RS] = (0, s.Rr)(e, t) || r.R2),
(p.value = n),
(p.stdDev = isNaN(l) || null === l ? void 0 : l),
(h.metrics = [p]),
(h[i.$y] = (0, s.xP)(e, d)),
(h[i.XA] = (0, s.Vj)(e, f));
}
return (
(e.envelopeType = "Microsoft.ApplicationInsights.{0}.Metric"),
(e.dataType = "MetricData"),
e
);
})();
},
1448: (e, t, n) => {
"use strict";
n.d(t, { h: () => a });
var r = n(5025),
i = n(87),
o = n(5130),
s = n(7975),
a = (function () {
function e(e, t, n, a, c, u, l) {
this.aiDataContract = {
ver: 1,
name: 0,
url: 0,
duration: 0,
properties: 0,
measurements: 0,
id: 0,
};
var d = this;
(d.ver = 2),
(d.id = (0, s.HQ)(e, l)),
(d.url = (0, s.pJ)(e, n)),
(d[o.RS] = (0, s.Rr)(e, t) || r.R2),
isNaN(a) || (d[o.qd] = (0, i.bb)(a)),
(d[o.$y] = (0, s.xP)(e, c)),
(d[o.XA] = (0, s.Vj)(e, u));
}
return (
(e.envelopeType = "Microsoft.ApplicationInsights.{0}.Pageview"),
(e.dataType = "PageviewData"),
e
);
})();
},
4164: (e, t, n) => {
"use strict";
n.d(t, { H: () => s });
var r = n(5025),
i = n(5130),
o = n(7975),
s = (function () {
function e(e, t, n, s, a, c, u) {
this.aiDataContract = {
ver: 1,
name: 0,
url: 0,
duration: 0,
perfTotal: 0,
networkConnect: 0,
sentRequest: 0,
receivedResponse: 0,
domProcessing: 0,
properties: 0,
measurements: 0,
};
var l = this;
(l.ver = 2),
(l.url = (0, o.pJ)(e, n)),
(l[i.RS] = (0, o.Rr)(e, t) || r.R2),
(l[i.$y] = (0, o.xP)(e, a)),
(l[i.XA] = (0, o.Vj)(e, c)),
u &&
((l.domProcessing = u.domProcessing),
(l[i.qd] = u[i.qd]),
(l.networkConnect = u.networkConnect),
(l.perfTotal = u.perfTotal),
(l[i.fd] = u[i.fd]),
(l.sentRequest = u.sentRequest));
}
return (
(e.envelopeType =
"Microsoft.ApplicationInsights.{0}.PageviewPerformance"),
(e.dataType = "PageviewPerformanceData"),
e
);
})();
},
1365: (e, t, n) => {
"use strict";
n.d(t, { A: () => a });
var r = n(87),
i = n(2318),
o = n(5130),
s = n(7975),
a = (function () {
function e(e, t, n, a, c, u, l, d, f, h, p, g) {
void 0 === f && (f = "Ajax"),
(this.aiDataContract = {
id: 1,
ver: 1,
name: 0,
resultCode: 0,
duration: 0,
success: 0,
data: 0,
target: 0,
type: 0,
properties: 0,
measurements: 0,
kind: 0,
value: 0,
count: 0,
min: 0,
max: 0,
stdDev: 0,
dependencyKind: 0,
dependencySource: 0,
commandName: 0,
dependencyTypeName: 0,
});
var m = this;
(m.ver = 2),
(m.id = t),
(m[o.qd] = (0, r.bb)(c)),
(m.success = u),
(m.resultCode = l + ""),
(m.type = (0, s.Rr)(e, f));
var v = (0, i._U)(e, n, d, a);
(m.data = (0, s.pJ)(e, a) || v.data),
(m.target = (0, s.Rr)(e, v.target)),
h && (m.target = "".concat(m.target, " | ").concat(h)),
(m[o.RS] = (0, s.Rr)(e, v[o.RS])),
(m[o.$y] = (0, s.xP)(e, p)),
(m[o.XA] = (0, s.Vj)(e, g));
}
return (
(e.envelopeType =
"Microsoft.ApplicationInsights.{0}.RemoteDependency"),
(e.dataType = "RemoteDependencyData"),
e
);
})();
},
2445: (e, t, n) => {
"use strict";
n.d(t, { C: () => s });
var r = n(5025),
i = n(5130),
o = n(7975),
s = (function () {
function e(e, t, n, s, a) {
this.aiDataContract = {
ver: 1,
message: 1,
severityLevel: 0,
properties: 0,
};
var c = this;
(c.ver = 2),
(t = t || r.R2),
(c[i.pM] = (0, o.Vk)(e, t)),
(c[i.$y] = (0, o.xP)(e, s)),
(c[i.XA] = (0, o.Vj)(e, a)),
n && (c[i.Ur] = n);
}
return (
(e.envelopeType = "Microsoft.ApplicationInsights.{0}.Message"),
(e.dataType = "MessageData"),
e
);
})();
},
9354: (e, t, n) => {
"use strict";
n.d(t, {
Gz: () => d,
M0: () => p,
PS: () => h,
cM: () => u,
k6: () => f,
wX: () => l,
});
var r = n(3076),
i = n(6668),
o = n(5130),
s = (0, r.YE)() || {},
a = 0,
c = [null, null, null, null, null];
function u(e) {
var t = a,
n = c,
r = n[t];
return (
s.createElement
? n[t] || (r = n[t] = s.createElement("a"))
: (r = { host: h(e, !0) }),
(r.href = e),
++t >= n[o.oI] && (t = 0),
(a = t),
r
);
}
function l(e) {
var t,
n = u(e);
return n && (t = n.href), t;
}
function d(e) {
var t,
n = u(e);
return n && (t = n[o.Ue]), t;
}
function f(e, t) {
return e ? e.toUpperCase() + " " + t : t;
}
function h(e, t) {
var n = p(e, t) || "";
if (n) {
var r = n.match(/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);
if (null != r && r[o.oI] > 3 && (0, i.Kg)(r[2]) && r[2][o.oI] > 0)
return r[2] + (r[3] || "");
}
return n;
}
function p(e, t) {
var n = null;
if (e) {
var r = e.match(/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);
if (
null != r &&
r[o.oI] > 2 &&
(0, i.Kg)(r[2]) &&
r[2][o.oI] > 0 &&
((n = r[2] || ""), t && r[o.oI] > 2)
) {
var s = (r[1] || "")[o.OL](),
a = r[3] || "";
(("http" === s && ":80" === a) ||
("https" === s && ":443" === a)) &&
(a = ""),
(n += a);
}
}
return n;
}
},
2318: (e, t, n) => {
"use strict";
n.d(t, {
Ft: () => x,
Qu: () => v,
Rs: () => _,
Wt: () => y,
_U: () => P,
jj: () => T,
lt: () => C,
mD: () => S,
mp: () => b,
pg: () => w,
});
var r = n(6832),
i = n(5439),
o = n(558),
s = n(225),
a = n(6668),
c = n(1864),
u = n(5881),
l = n(5025),
d = n(2910),
f = n(7975),
h = n(9354),
p = n(5130),
g = [
l._G + l.wc,
"https://breeze.aimon.applicationinsights.io" + l.wc,
"https://dc-int.services.visualstudio.com" + l.wc,
],
m = "cid-v1:";
function v(e) {
return -1 !== (0, r.r)(g, e[p.OL]());
}
function y(e) {
m = e;
}
function b() {
return m;
}
function _(e, t, n) {
if (!t || (e && e.disableCorrelationHeaders)) return !1;
if (e && e[p.Ol])
for (var r = 0; r < e.correlationHeaderExcludePatterns[p.oI]; r++)
if (e[p.Ol][r].test(t)) return !1;
var o = (0, h.cM)(t).host[p.OL]();
if (
(!o ||
(-1 === (0, u.H)(o, ":443") && -1 === (0, u.H)(o, ":80")) ||
(o = ((0, h.M0)(t, !0) || "")[p.OL]()),
(!e || !e.enableCorsCorrelation) && o && o !== n)
)
return !1;
var s,
a = e && e.correlationHeaderDomains;
if (
a &&
((0, i.I)(a, function (e) {
var t = new RegExp(
e
.toLowerCase()
.replace(/\\/g, "\\\\")
.replace(/\./g, "\\.")
.replace(/\*/g, ".*")
);
s = s || t.test(o);
}),
!s)
)
return !1;
var c = e && e.correlationHeaderExcludedDomains;
if (!c || 0 === c[p.oI]) return !0;
for (r = 0; r < c[p.oI]; r++)
if (
new RegExp(
c[r]
.toLowerCase()
.replace(/\\/g, "\\\\")
.replace(/\./g, "\\.")
.replace(/\*/g, ".*")
).test(o)
)
return !1;
return o && o[p.oI] > 0;
}
function w(e) {
if (e) {
var t = S(e, d.a[1]);
if (t && t !== m) return t;
}
}
function S(e, t) {
if (e)
for (var n = e[p.sY](","), r = 0; r < n[p.oI]; ++r) {
var i = n[r][p.sY]("=");
if (2 === i[p.oI] && i[0] === t) return i[1];
}
}
function P(e, t, n, r) {
var i,
o = r,
s = r;
if (t && t[p.oI] > 0) {
var a = (0, h.cM)(t);
if (((i = a.host), !o))
if (null != a[p.Ue]) {
var c = 0 === a.pathname[p.oI] ? "/" : a[p.Ue];
"/" !== c.charAt(0) && (c = "/" + c),
(s = a[p.Ue]),
(o = (0, f.Rr)(e, n ? n + " " + c : c));
} else o = (0, f.Rr)(e, t);
} else (i = r), (o = r);
return { target: i, name: o, data: s };
}
function C() {
var e = (0, o.FJ)();
if (e && e.now && e.timing) {
var t = e.now() + e.timing.navigationStart;
if (t > 0) return t;
}
return (0, s.f)();
}
function T(e, t) {
var n = null;
return (
0 === e || 0 === t || (0, a.hX)(e) || (0, a.hX)(t) || (n = t - e), n
);
}
function x(e, t) {
var n = e || {};
return {
getName: function () {
return n[p.RS];
},
setName: function (e) {
t && t.setName(e), (n[p.RS] = e);
},
getTraceId: function () {
return n.traceID;
},
setTraceId: function (e) {
t && t.setTraceId(e), (0, c.hX)(e) && (n.traceID = e);
},
getSpanId: function () {
return n.parentID;
},
setSpanId: function (e) {
t && t.setSpanId(e), (0, c.wN)(e) && (n.parentID = e);
},
getTraceFlags: function () {
return n.traceFlags;
},
setTraceFlags: function (e) {
t && t.setTraceFlags(e), (n.traceFlags = e);
},
};
}
},
5130: (e, t, n) => {
"use strict";
n.d(t, {
$e: () => v,
$y: () => C,
AZ: () => c,
Av: () => A,
C9: () => m,
Cx: () => h,
F2: () => d,
Fq: () => I,
IE: () => D,
J$: () => x,
Jj: () => y,
Jm: () => f,
OK: () => S,
OL: () => o,
Ol: () => _,
QE: () => R,
RS: () => u,
Ue: () => b,
Ur: () => E,
XA: () => T,
fd: () => V,
h_: () => L,
i9: () => g,
lW: () => M,
lx: () => F,
oI: () => i,
on: () => P,
pM: () => l,
qd: () => N,
qg: () => O,
r1: () => k,
sY: () => r,
up: () => w,
vu: () => j,
xE: () => a,
zV: () => s,
zw: () => p,
});
var r = "split",
i = "length",
o = "toLowerCase",
s = "ingestionendpoint",
a = "toString",
c = "removeItem",
u = "name",
l = "message",
d = "count",
f = "preTriggerDate",
h = "disabled",
p = "interval",
g = "daysOfMonth",
m = "date",
v = "getUTCDate",
y = "stringify",
b = "pathname",
_ = "correlationHeaderExcludePatterns",
w = "extensionConfig",
S = "exceptions",
P = "parsedStack",
C = "properties",
T = "measurements",
x = "sizeInBytes",
O = "typeName",
E = "severityLevel",
I = "problemGroup",
k = "isManual",
j = "CreateFromInterface",
R = "assembly",
D = "fileName",
M = "hasFullStack",
A = "level",
F = "method",
L = "line",
N = "duration",
V = "receivedResponse";
},
740: (e, t, n) => {
"use strict";
n.r(t),
n.d(t, {
AnalyticsPluginIdentifier: () => W,
BreezeChannelIdentifier: () => q,
ConfigurationManager: () => I,
ConnectionStringParser: () => m.F,
ContextTagKeys: () => k.o,
CtxTagKeys: () => A.O,
DEFAULT_BREEZE_ENDPOINT: () => y._G,
DEFAULT_BREEZE_PATH: () => y.wc,
Data: () => O.B,
DisabledPropertyName: () => y.xF,
DistributedTracingModes: () => F.u,
Envelope: () => b.L,
Event: () => _.J,
Exception: () => w.WJ,
Extensions: () => A.F,
HttpMethod: () => y.ym,
Metric: () => S.J,
PageView: () => P.h,
PageViewPerformance: () => x.H,
ProcessLegacy: () => y.jp,
PropertiesPluginIdentifier: () => U,
RemoteDependencyData: () => C.A,
RequestHeaders: () => v.a,
SampleRate: () => y.tU,
SeverityLevel: () => E.O,
TelemetryItemCreator: () => M,
ThrottleMgr: () => g,
Trace: () => T.C,
correlationIdCanIncludeCorrelationHeader: () => r.Rs,
correlationIdGetCorrelationContext: () => r.pg,
correlationIdGetCorrelationContextValue: () => r.mD,
correlationIdGetPrefix: () => r.mp,
correlationIdSetPrefix: () => r.Wt,
createDistributedTraceContextFromTrace: () => r.Ft,
createDomEvent: () => $,
createTelemetryItem: () => D,
createTraceParent: () => V.wk,
dataSanitizeException: () => j.Vt,
dataSanitizeId: () => j.HQ,
dataSanitizeInput: () => j._T,
dataSanitizeKey: () => j.lq,
dataSanitizeKeyAndAddUniqueness: () => j.zx,
dataSanitizeMeasurements: () => j.Vj,
dataSanitizeMessage: () => j.Vk,
dataSanitizeProperties: () => j.xP,
dataSanitizeString: () => j.Rr,
dataSanitizeUrl: () => j.pJ,
dateTimeUtilsDuration: () => r.jj,
dateTimeUtilsNow: () => r.lt,
dsPadNumber: () => j.qW,
findW3cTraceParent: () => V.ef,
formatTraceParent: () => V.L0,
getExtensionByName: () => L.Y8,
isBeaconApiSupported: () => N.Uf,
isCrossOriginError: () => L.vv,
isInternalApplicationInsightsEndpoint: () => r.Qu,
isSampledFlag: () => V.N7,
isValidSpanId: () => V.wN,
isValidTraceId: () => V.hX,
isValidTraceParent: () => V.mJ,
msToTimeSpan: () => L.bb,
parseConnectionString: () => m.H,
parseTraceParent: () => V.ZI,
strNotSpecified: () => y.R2,
stringToBoolOrDefault: () => L.Dt,
urlGetAbsoluteUrl: () => B.wX,
urlGetCompleteUrl: () => B.k6,
urlGetPathName: () => B.Gz,
urlParseFullHost: () => B.M0,
urlParseHost: () => B.PS,
urlParseUrl: () => B.cM,
utlCanUseLocalStorage: () => h.BW,
utlCanUseSessionStorage: () => h.AN,
utlDisableStorage: () => h.Nu,
utlEnableStorage: () => h.iw,
utlGetLocalStorage: () => h.Se,
utlGetSessionStorage: () => h.vH,
utlGetSessionStorageKeys: () => h.T9,
utlRemoveSessionStorage: () => h.v7,
utlRemoveStorage: () => h.tm,
utlSetLocalStorage: () => h._M,
utlSetSessionStorage: () => h.Dt,
utlSetStoragePrefix: () => h.vh,
});
var r = n(2318),
i = n(6668),
o = n(3775),
s = n(3673),
a = n(9622),
c = n(6832),
u = n(8993),
l = n(6535),
d = n(5439),
f = n(9018),
h = n(4658),
p = n(5130),
g = function (e, t) {
var n,
r,
g,
m,
v,
y,
b,
_ = this,
w = !1,
S = !1;
function P(e, t, i, o) {
if (w) {
var s = (function (e) {
try {
var t = C(e);
return (0, l.Z1)(1e6) <= t.limit.samplingRate;
} catch (e) {}
return !1;
})(e);
if (!s) return;
var a = C(e),
c = R(e),
u = x(a, n, c),
d = !1,
f = 0,
h = D(e);
try {
u && !h
? ((f = Math.min(a.limit.maxSendNumber, c[p.F2] + 1)),
(c[p.F2] = 0),
(d = !0),
(v[e] = !0),
(c[p.Jm] = new Date()))
: ((v[e] = u), (c[p.F2] += 1));
var g = O(e);
I(r, g, c);
for (var m = 0; m < f; m++) j(e, r, t, i);
} catch (e) {}
return { isThrottled: d, throttleNum: f };
}
return (
o && M(e).push({ msgID: e, message: t, severity: i }), null
);
}
function C(e) {
return g[e] || g[109];
}
function T(e, t) {
var n, r, o, s, a;
try {
var c = t || {},
u = {};
u[p.Cx] = !!c[p.Cx];
var l = c[p.zw] || {};
(S =
(null == l ? void 0 : l.daysOfMonth) &&
(null == l ? void 0 : l.daysOfMonth[p.oI]) > 0),
(u[p.zw] =
((s =
null === (o = (o = l) || {}) || void 0 === o
? void 0
: o.monthInterval),
(a = null == o ? void 0 : o.dayInterval),
(0, i.hX)(s) &&
(0, i.hX)(a) &&
((o.monthInterval = 3),
S || ((o[p.i9] = [28]), (S = !0))),
(o = {
monthInterval: null == o ? void 0 : o.monthInterval,
dayInterval: null == o ? void 0 : o.dayInterval,
daysOfMonth: null == o ? void 0 : o.daysOfMonth,
})));
var d = {
samplingRate:
(null === (n = c.limit) || void 0 === n
? void 0
: n.samplingRate) || 100,
maxSendNumber:
(null === (r = c.limit) || void 0 === r
? void 0
: r.maxSendNumber) || 1,
};
(u.limit = d), (g[e] = u);
} catch (e) {}
}
function x(e, t, n) {
if (e && !e[p.Cx] && t && (0, s.Gh)(n)) {
var r = E(),
i = n[p.C9],
o = e[p.zw],
a = 1;
if (null == o ? void 0 : o.monthInterval) {
var u =
12 * (r.getUTCFullYear() - i.getUTCFullYear()) +
r.getUTCMonth() -
i.getUTCMonth();
a = k(o.monthInterval, 0, u);
}
var l = 1;
if (S) l = (0, c.r)(o[p.i9], r[p.$e]());
else if (null == o ? void 0 : o.dayInterval) {
var d = Math.floor((r.getTime() - i.getTime()) / 864e5);
l = k(o.dayInterval, 0, d);
}
return a >= 0 && l >= 0;
}
return !1;
}
function O(e, t) {
var n = (0, s.Gh)(t) ? t : "";
return e ? "appInsightsThrottle" + n + "-" + e : null;
}
function E(e) {
try {
if (!e) return new Date();
var t = new Date(e);
if (!isNaN(t.getDate())) return t;
} catch (e) {}
return null;
}
function I(e, t, n) {
try {
return (0, h._M)(e, t, (0, u.EH)(JSON[p.Jj](n)));
} catch (e) {}
return !1;
}
function k(e, t, n) {
return e <= 0
? 1
: n >= t && (n - t) % e == 0
? Math.floor((n - t) / e) + 1
: -1;
}
function j(e, t, n, r) {
(0, o.ZP)(t, r || 1, e, n);
}
function R(e) {
try {
var t = m[e];
if (!t) {
var n = O(e, y);
(t = (function (e, t, n) {
try {
var r = { date: E(), count: 0 };
if (e) {
var i = JSON.parse(e);
return {
date: E(i[p.C9]) || r[p.C9],
count: i[p.F2] || r[p.F2],
preTriggerDate: i.preTriggerDate
? E(i[p.Jm])
: void 0,
};
}
return I(t, n, r), r;
} catch (e) {}
return null;
})((0, h.Se)(r, n), r, n)),
(m[e] = t);
}
return m[e];
} catch (e) {}
return null;
}
function D(e) {
var t = v[e];
if ((0, i.hX)(t)) {
t = !1;
var n = R(e);
n &&
(t = (function (e) {
try {
if (e) {
var t = new Date();
return (
e.getUTCFullYear() === t.getUTCFullYear() &&
e.getUTCMonth() === t.getUTCMonth() &&
e[p.$e]() === t[p.$e]()
);
}
} catch (e) {}
return !1;
})(n[p.Jm])),
(v[e] = t);
}
return v[e];
}
function M(e) {
return (b = b || {}), (0, i.hX)(b[e]) && (b[e] = []), b[e];
}
(r = (0, o.y0)(e)),
(v = {}),
(m = {}),
(b = {}),
(g = {}),
T(109),
(y = (0, s.Gh)(t) ? t : ""),
e.addUnloadHook(
(0, a.a)(e.config, function (e) {
var t = e.cfg;
n = (0, h.BW)();
var r = t.throttleMgrCfg || {};
(0, f.z)(r, function (e, t) {
T(parseInt(e), t);
});
})
),
(_._getDbgPlgTargets = function () {
return [b];
}),
(_.getConfig = function () {
return g;
}),
(_.canThrottle = function (e) {
var t = R(e);
return x(C(e), n, t);
}),
(_.isTriggered = function (e) {
return D(e);
}),
(_.isReady = function () {
return w;
}),
(_.flush = function (e) {
try {
var t = M(e);
if (t && t[p.oI] > 0) {
var n = t.slice(0);
return (
(b[e] = []),
(0, d.I)(n, function (e) {
P(e.msgID, e[p.pM], e.severity, !1);
}),
!0
);
}
} catch (e) {}
return !1;
}),
(_.flushAll = function () {
try {
if (b) {
var e = !0;
return (
(0, f.z)(b, function (t) {
var n = _.flush(parseInt(t));
e = e && n;
}),
e
);
}
} catch (e) {}
return !1;
}),
(_.onReadyState = function (e, t) {
return (
void 0 === t && (t = !0),
(w = !!(0, i.hX)(e) || e) && t ? _.flushAll() : null
);
}),
(_.sendMessage = function (e, t, n) {
return P(e, t, n, !0);
});
},
m = n(4484),
v = n(2910),
y = n(5025),
b = n(1062),
_ = n(3072),
w = n(5397),
S = n(5014),
P = n(1448),
C = n(1365),
T = n(2445),
x = n(4164),
O = n(7358),
E = n(9762),
I = (function () {
function e() {}
return (
(e.getConfig = function (e, t, n, r) {
var o;
return (
void 0 === r && (r = !1),
(o =
n && e[p.up] && e[p.up][n] && !(0, i.hX)(e[p.up][n][t])
? e[p.up][n][t]
: e[t]),
(0, i.hX)(o) ? r : o
);
}),
e
);
})(),
k = n(8596),
j = n(7975),
R = n(3517);
function D(e, t, n, r, o, a) {
var c;
(n = (0, j.Rr)(r, n) || y.R2),
((0, i.hX)(e) || (0, i.hX)(t) || (0, i.hX)(n)) &&
(0, R.$8)("Input doesn't contain all required fields");
var u = "";
e[y.ks] && ((u = e[y.ks]), delete e[y.ks]);
var l =
(((c = {})[p.RS] = n),
(c.time = (0, s._u)(new Date())),
(c.iKey = u),
(c.ext = a || {}),
(c.tags = []),
(c.data = {}),
(c.baseType = t),
(c.baseData = e),
c);
return (
(0, i.hX)(o) ||
(0, f.z)(o, function (e, t) {
l.data[e] = t;
}),
l
);
}
var M = (function () {
function e() {}
return (e.create = D), e;
})(),
A = n(1575),
F = n(7374),
L = n(87),
N = n(7292),
V = n(1864),
K = n(3076);
function $(e) {
var t = null;
if ((0, i.Tn)(Event)) t = new Event(e);
else {
var n = (0, K.YE)();
n &&
n.createEvent &&
(t = n.createEvent("Event")).initEvent(e, !0, !0);
}
return t;
}
var B = n(9354),
U = "AppInsightsPropertiesPlugin",
q = "AppInsightsChannelPlugin",
W = "ApplicationInsightsAnalytics";
},
2475: (e, t, n) => {
"use strict";
n.d(t, { DD: () => u, Lx: () => c, NU: () => a });
var r = n(6668),
i = n(5977),
o = n(6182);
function s(e, t, n) {
return !e && (0, r.hX)(e)
? t
: (0, r.Lm)(e)
? e
: "true" === (0, i.o)(e)[o.OL]();
}
function a(e) {
return { mrg: !0, v: e };
}
function c(e, t, n) {
return { fb: n, isVal: e, v: t };
}
function u(e, t) {
return { fb: t, set: s, v: !!e };
}
},
991: (e, t, n) => {
"use strict";
n.d(t, { q: () => f });
var r = n(6668),
i = n(9452),
o = n(5977),
s = n(7460),
a = n(9018),
c = n(6182);
function u(e) {
return (
e &&
(0, r.Gv)(e) &&
(e.isVal ||
e.fb ||
(0, i.K)(e, "v") ||
(0, i.K)(e, "mrg") ||
(0, i.K)(e, "ref") ||
e.set)
);
}
function l(e, t, n) {
var i,
s = n.dfVal || r.O9;
if (t && n.fb) {
var a = n.fb;
(0, r.cy)(a) || (a = [a]);
for (var u = 0; u < a[c.oI]; u++) {
var l = a[u],
d = t[l];
if (
(s(d)
? (i = d)
: e &&
(s((d = e.cfg[l])) && (i = d),
e.set(e.cfg, (0, o.o)(l), d)),
s(i))
)
break;
}
}
return !s(i) && s(n.v) && (i = n.v), i;
}
function d(e, t, n) {
var i,
o = n;
return (
n && u(n) && (o = l(e, t, n)),
o &&
(u(o) && (o = d(e, t, o)),
(0, r.cy)(o)
? ((i = [])[c.oI] = o[c.oI])
: (0, s.Q)(o) && (i = {}),
i &&
((0, a.z)(o, function (n, r) {
r && u(r) && (r = d(e, t, r)), (i[n] = r);
}),
(o = i))),
o
);
}
function f(e, t, n, i) {
var o,
h,
p,
g,
m,
v,
y,
b,
_ = i;
u(_)
? ((o = _.isVal),
(h = _.set),
(v = _[c.XW]),
(y = _[c.JQ]),
(g = _.mrg),
!(m = _.ref) && (0, r.b0)(m) && (m = !!g),
(p = l(e, t, _)))
: (p = i),
y && e[c.JQ](t, n);
var w = !0,
S = t[n];
(!S && (0, r.hX)(S)) ||
((b = S),
(w = !1),
o && b !== p && !o(b) && ((b = p), (w = !0)),
h && (w = (b = h(b, p, t)) === p)),
w
? (b = p ? d(e, t, p) : p)
: ((0, s.Q)(b) || (0, r.cy)(p)) &&
g &&
p &&
((0, s.Q)(p) || (0, r.cy)(p)) &&
(0, a.z)(p, function (t, n) {
f(e, b, t, n);
}),
e.set(t, n, b),
m && e.ref(t, n),
v && e[c.XW](t, n);
}
},
9622: (e, t, n) => {
"use strict";
n.d(t, { e: () => N, a: () => V });
var r = n(6668),
i = n(9018),
o = n(6336),
s = n(8693),
a = n(4276),
c = n(6492),
u = n(6182),
l = n(991),
d = n(5439),
f = n(695),
h = n(6832),
p = n(9147),
g = ["push", "pop", "shift", "unshift", "splice"],
m = function (e, t, n, r) {
e &&
e[u.ih](
3,
108,
"".concat(n, " [").concat(t, "] failed - ") + (0, s.m)(r)
);
};
function v(e, t) {
var n = (0, f.k)(e, t);
return n && n.get;
}
function y(e, t, n, r) {
if (t) {
var a = v(t, n);
a && a[e.prop]
? (t[n] = r)
: (function (e, t, n, r) {
var a = {
n,
h: [],
trk: function (t) {
t &&
t.fn &&
(-1 === (0, h.r)(a.h, t) && a.h[u.y5](t),
e.trk(t, a));
},
clr: function (e) {
var t = (0, h.r)(a.h, e);
-1 !== t && a.h[u.Ic](t, 1);
},
},
l = !0,
d = !1;
function f() {
l &&
((d = d || (0, p.hF)(f, e, r)),
r && !r[p.nM] && d && (r = _(e, r, n, "Converting")),
(l = !1));
var t = e.act;
return t && a.trk(t), r;
}
(f[e.prop] = {
chng: function () {
e.add(a);
},
}),
(0, o.vF)(t, a.n, {
g: f,
s: function (o) {
if (r !== o) {
f[e.ro] &&
!e.upd &&
(0, p.If)(
"[" + n + "] is read-only:" + (0, s.m)(t)
),
l && ((d = d || (0, p.hF)(f, e, r)), (l = !1));
var h = d && f[e.rf];
if (d)
if (h) {
(0, i.z)(r, function (e) {
r[e] = o ? o[e] : c.HP;
});
try {
(0, i.z)(o, function (t, n) {
y(e, r, t, n);
}),
(o = r);
} catch (t) {
m((e.hdlr || {})[u.Uw], n, "Assigning", t),
(d = !1);
}
} else
r &&
r[p.nM] &&
(0, i.z)(r, function (t) {
var n = v(r, t);
if (n) {
var i = n[e.prop];
i && i.chng();
}
});
if (o !== r) {
var g = o && (0, p.hF)(f, e, o);
!h && g && (o = _(e, o, n, "Converting")),
(r = o),
(d = g);
}
e.add(a);
}
},
});
})(e, t, n, r);
}
return t;
}
function b(e, t, n, r) {
if (t) {
var i = v(t, n),
o = i && !!i[e.prop],
s = r && r[0],
a = r && r[1],
c = r && r[2];
if (!o) {
if (c)
try {
(0, p.V9)(t);
} catch (t) {
m((e.hdlr || {})[u.Uw], n, "Blocking", t);
}
try {
y(e, t, n, t[n]), (i = v(t, n));
} catch (t) {
m((e.hdlr || {})[u.Uw], n, "State", t);
}
}
s && (i[e.rf] = s), a && (i[e.ro] = a), c && (i[e.blkVal] = !0);
}
return t;
}
function _(e, t, n, s) {
try {
(0, i.z)(t, function (n, r) {
y(e, t, n, r);
}),
t[p.nM] ||
((0, o.Ux)(t, p.nM, {
get: function () {
return e[u.K0];
},
}),
(function (e, t, n) {
(0, r.cy)(t) &&
(0, d.I)(g, function (r) {
var i = t[r];
t[r] = function () {
for (var r = [], o = 0; o < arguments.length; o++)
r[o] = arguments[o];
var s = i[u.y9](this, r);
return _(e, t, n, "Patching"), s;
};
});
})(e, t, n));
} catch (t) {
m((e.hdlr || {})[u.Uw], n, s, t);
}
return t;
}
var w,
S = n(7403),
P = n(6874),
C = n(755),
T = n(655),
x = n(4016),
O = n(411),
E = n(1324),
I = n(2871);
function k(e, t) {
return (
x.s6.setPrototypeOf ||
function (e, t) {
!w &&
(w = (0, I.nR)(function () {
var e;
return ((e = {})[x.r5] = []), e instanceof Array;
})),
w.v
? (e[x.r5] = t)
: (0, i.z)(t, function (t, n) {
return (e[t] = n);
});
}
)(e, t);
}
var j,
R = function (e, t, n) {
function r() {
(this.constructor = t), M(this, e);
}
return (
M(t, e),
((t = k(t, n))[x.Fs] =
n === x.M_ ? (0, O.s)(n) : ((r[x.Fs] = n[x.Fs]), new r())),
t
);
},
D = function (e, t) {
try {
t && (e[x.o_] = t);
} catch (e) {}
},
M = function (e, t) {
try {
(0, o.vF)(e, x.o_, { v: t, c: !0, e: !1 });
} catch (e) {}
};
var A = "[[ai_",
F = "]]";
function L(e) {
var t,
n,
r = (0, S.jj)(A + "get" + e.uid + F),
i = (0, S.jj)(A + "ro" + e.uid + F),
o = (0, S.jj)(A + "rf" + e.uid + F),
a = (0, S.jj)(A + "blkVal" + e.uid + F),
c = (0, S.jj)(A + "dtl" + e.uid + F),
l = null,
f = null;
function p(t, r) {
var i = n.act;
try {
(n.act = t),
t &&
t[c] &&
((0, d.I)(t[c], function (e) {
e.clr(t);
}),
(t[c] = [])),
r({
cfg: e.cfg,
set: e.set.bind(e),
setDf: e[u.h0].bind(e),
ref: e.ref.bind(e),
rdOnly: e[u.XW].bind(e),
});
} catch (t) {
var o = e[u.Uw];
throw (o && o[u.ih](1, 107, (0, s.m)(t)), t);
} finally {
n.act = i || null;
}
}
function g() {
if (l) {
var e = l;
(l = null), f && f[u._w](), (f = null);
var t = [];
if (
((0, d.I)(e, function (e) {
if (
e &&
(e[c] &&
((0, d.I)(e[c], function (t) {
t.clr(e);
}),
(e[c] = null)),
e.fn)
)
try {
p(e, e.fn);
} catch (e) {
t[u.y5](e);
}
}),
l)
)
try {
g();
} catch (e) {
t[u.y5](e);
}
t[u.oI] > 0 &&
(function (e, t) {
var n, r, i, o, a, c;
j ||
((n = "AggregationError"),
(r = function (e, t) {
t[u.oI] > 1 && (e.errors = t[1]);
}),
(o = i || Error),
(a = o[x.Fs][x.o_]),
(c = Error.captureStackTrace),
(j = R(
n,
function () {
var e = this;
try {
D(o, n);
var t = (0, T.p)(o, e, (0, C.K)(arguments)) || e;
if (t !== e) {
var i = (0, E.rL)(e);
i !== (0, E.rL)(t) && k(t, i);
}
return c && c(t, e[x.BB]), r && r(t, arguments), t;
} finally {
D(o, a);
}
},
o
)));
var l = "Watcher error(s): ";
throw (
((0, d.I)(t, function (e, t) {
l += "\n".concat(t, " > ").concat((0, s.m)(e));
}),
new j(l, t || []))
);
})(0, t);
}
}
return (
((t = { prop: r, ro: i, rf: o })[u.JQ] = a),
(t[u.K0] = e),
(t.add = function (e) {
if (e && e.h[u.oI] > 0) {
l || (l = []),
f ||
(f = (0, P.dR)(function () {
(f = null), g();
}, 0));
for (var t = 0; t < e.h[u.oI]; t++) {
var n = e.h[t];
n && -1 === (0, h.r)(l, n) && l[u.y5](n);
}
}
}),
(t[u.zs] = g),
(t.use = p),
(t.trk = function (e, t) {
if (e) {
var n = (e[c] = e[c] || []);
-1 === (0, h.r)(n, t) && n[u.y5](t);
}
}),
(n = t)
);
}
function N(e, t, n, s) {
var c = (function (e, t, n) {
var s,
c = (0, p.QA)(t);
if (c) return c;
var d,
f = (0, a.Z)("dyncfg", !0),
h = t && !1 !== n ? t : (0, p.Dy)(t),
g =
(((s = { uid: null, cfg: h })[u.Uw] = e),
(s[u.zs] = function () {
d[u.zs]();
}),
(s.set = function (t, n, r) {
try {
t = y(d, t, n, r);
} catch (t) {
m(e, n, "Setting value", t);
}
return t[n];
}),
(s[u.h0] = function (e, t) {
return (
t &&
(0, i.z)(t, function (t, n) {
(0, l.q)(g, e, t, n);
}),
e
);
}),
(s[u.x6] = function (e) {
return (function (e, t) {
var n = {
fn: t,
rm: function () {
(n.fn = null), (e = null), (t = null);
},
};
return e.use(n, t), n;
})(d, e);
}),
(s.ref = function (e, t) {
var n;
return b(d, e, t, ((n = {}), (n[0] = !0), n))[t];
}),
(s[u.XW] = function (e, t) {
var n;
return b(d, e, t, ((n = {}), (n[1] = !0), n))[t];
}),
(s[u.JQ] = function (e, t) {
var n;
return b(d, e, t, ((n = {}), (n[2] = !0), n))[t];
}),
(s._block = function (e, t) {
d.use(null, function (n) {
var i = d.upd;
try {
(0, r.b0)(t) || (d.upd = t), e(n);
} finally {
d.upd = i;
}
});
}),
s);
return (
(0, o.vF)(g, "uid", { c: !1, e: !1, w: !1, v: f }),
_((d = L(g)), h, "config", "Creating"),
g
);
})(n, e || {}, s);
return t && c[u.h0](c.cfg, t), c;
}
function V(e, t, n) {
var r = e[p.nM] || e;
return !r.cfg || (r.cfg !== e && r.cfg[p.nM] !== r)
? ((function (e, t) {
e ? (e[u.on](t), e[u.ih](2, 108, t)) : (0, p.If)(t);
})(n, c.xW + (0, s.m)(e)),
N(e, null, n)[u.x6](t))
: r[u.x6](t);
}
},
9147: (e, t, n) => {
"use strict";
n.d(t, {
Dy: () => f,
Hf: () => g,
If: () => v,
QA: () => h,
V9: () => p,
hF: () => m,
nM: () => u,
});
var r = n(7403),
i = n(6668),
o = n(7460),
s = n(9018),
a = n(3517),
c = n(6182),
u = (0, r.eC)("[[ai_dynCfg_1]]"),
l = (0, r.eC)("[[ai_blkDynCfg_1]]"),
d = (0, r.eC)("[[ai_frcDynCfg_1]]");
function f(e) {
var t;
return e &&
((0, i.cy)(e)
? ((t = [])[c.oI] = e[c.oI])
: (0, o.Q)(e) && (t = {}),
t)
? ((0, s.z)(e, function (e, n) {
t[e] = f(n);
}),
t)
: e;
}
function h(e) {
if (e) {
var t = e[u] || e;
if (t.cfg && (t.cfg === e || t.cfg[u] === t)) return t;
}
return null;
}
function p(e) {
if (e && ((0, o.Q)(e) || (0, i.cy)(e)))
try {
e[l] = !0;
} catch (e) {}
return e;
}
function g(e) {
if (e)
try {
e[d] = !0;
} catch (e) {}
return e;
}
function m(e, t, n) {
var r = !1;
return (
n &&
!e[t.blkVal] &&
((r = n[d]) || n[l] || (r = (0, o.Q)(n) || (0, i.cy)(n))),
r
);
}
function v(e) {
(0, a.zk)("InvalidAccess:" + e);
}
},
4282: (e, t, n) => {
"use strict";
n.d(t, { H: () => i, o: () => o });
var r = n(5659),
i = r.WS,
o = r.fn;
},
3662: (e, t, n) => {
"use strict";
n.d(t, { x: () => r });
var r = (0, n(4282).H)({
Unknown: 0,
NonRetryableStatus: 1,
InvalidEvent: 2,
SizeLimitExceeded: 3,
KillSwitch: 4,
QueueFull: 5,
});
},
9379: (e, t, n) => {
"use strict";
n.d(t, { _: () => Q });
var r = n(659),
i = n(8279),
o = n(636),
s = n(1324),
a = n(5439),
c = n(6668),
u = n(3517),
l = n(9018),
d = n(7460),
f = n(6874),
h = n(755),
p = n(5683),
g = n(4016),
m = n(6336),
v = function (e) {
return e.value && w(e), !0;
},
y = [
function (e) {
var t = e.value;
if ((0, c.cy)(t)) {
var n = (e.result = []);
return (n.length = t.length), e.copyTo(n, t), !0;
}
return !1;
},
w,
function (e) {
return e.type === g.H3;
},
function (e) {
var t = e.value;
return !!(0, c.$P)(t) && ((e.result = new Date(t.getTime())), !0);
},
];
function b(e, t, n, r) {
var i = n.handler,
o = n.path ? (r ? n.path.concat(r) : n.path) : [],
s = { handler: n.handler, src: n.src, path: o },
u = typeof t,
l = !1,
f = !1;
t && u === g.qv
? (l = (0, d.Q)(t))
: (f = t === g.M_ || (0, c.Cb)(u));
var h = {
type: u,
isPrim: f,
isPlain: l,
value: t,
result: t,
path: o,
origin: n.src,
copy: function (t, r) {
return b(e, t, r ? s : n, r);
},
copyTo: function (t, n) {
return _(e, t, n, s);
},
};
return h.isPrim
? i && (0, p.n)(i, n, h)
? h.result
: t
: (function (e, t, r, o) {
var s;
return (
(0, a.I)(e, function (e) {
if (e.k === t) return (s = e), -1;
}),
s ||
((s = { k: t, v: t }),
e.push(s),
(function (e) {
(0, m.vF)(h, "result", {
g: function () {
return e.v;
},
s: function (t) {
e.v = t;
},
});
for (
var t = 0, r = i;
!(0, p.n)(r || (t < y.length ? y[t++] : v), n, h);
)
r = g.M_;
})(s)),
s.v
);
})(e, t);
}
function _(e, t, n, r) {
if (!(0, c.hX)(n)) for (var i in n) t[i] = b(e, n[i], r, i);
return t;
}
function w(e) {
var t = e.value;
if (t && e.isPlain) {
var n = (e.result = {});
return e.copyTo(n, t), !0;
}
return !1;
}
function S(e, t, n, r, i, o, s) {
return (function (e, t) {
return (
(0, a.I)(t, function (t) {
!(function (e, t, n) {
_([], e, t, { handler: void 0, src: t, path: [] });
})(e, t);
}),
e
);
})(
b([], (c = e), { handler: undefined, src: c }) || {},
(0, h.K)(arguments)
);
var c;
}
var P,
C = n(9452),
T = n(3076),
x = n(1187),
O = n(6832),
E = n(9622),
I = n(6182),
k = n(4013),
j = n(5034),
R = n(4276),
D = n(7867),
M = n(3775),
A = n(3673),
F = n(6492),
L = n(1356),
N = n(8156),
V = n(2317),
K = n(380),
$ = n(8693),
B = (function (e) {
function t() {
var n,
r,
o = e.call(this) || this;
function s() {
(n = 0), (r = []);
}
return (
(o.identifier = "TelemetryInitializerPlugin"),
(o.priority = 199),
s(),
(0, i.A)(t, o, function (e, t) {
(e.addTelemetryInitializer = function (e) {
return (function (e, t, n) {
var r = { id: t, fn: n };
return (
(0, x.Y)(e, r),
{
remove: function () {
(0, a.I)(e, function (t, n) {
if (t.id === r.id) return e[I.Ic](n, 1), -1;
});
},
}
);
})(r, n++, e);
}),
(e[F.qT] = function (t, n) {
(function (e, t, n) {
for (var r = !1, i = e[I.oI], o = 0; o < i; ++o) {
var s = e[o];
if (s)
try {
if (!1 === s.fn[I.y9](null, [t])) {
r = !0;
break;
}
} catch (e) {
(0, M.ZP)(
n,
2,
64,
"Telemetry initializer failed: " + (0, A.lL)(e),
{ exception: (0, $.m)(e) },
!0
);
}
}
return !r;
})(r, t, n ? n[I.e4]() : e[I.e4]()) && e[I.$5](t, n);
}),
(e[I.tn] = function () {
s();
});
}),
o
);
}
return (0, r.qU)(t, e), (t.__ieDyn = 1), t;
})(n(8257).s),
U = n(836),
q = n(8969),
W = "Plugins must provide initialize method",
z = "SDK is still unloading...",
H = (0, s.ZH)(
(((P = { cookieCfg: {} })[F.jy] = { rdOnly: !0, ref: !0, v: [] }),
(P[F.LZ] = { rdOnly: !0, ref: !0, v: [] }),
(P[F.Bw] = { ref: !0, v: {} }),
(P[F.Yd] = F.HP),
(P.loggingLevelConsole = 0),
(P.diagnosticLogInterval = F.HP),
P)
);
function J(e, t) {
return new N.NS(t);
}
function G(e, t) {
var n = !1;
return (
(0, a.I)(t, function (t) {
if (t === e) return (n = !0), -1;
}),
n
);
}
function X(e, t, n, r) {
n &&
(0, l.z)(n, function (n, i) {
r && (0, d.Q)(i) && (0, d.Q)(t[n]) && X(e, t[n], i, r),
r && (0, d.Q)(i) && (0, d.Q)(t[n])
? X(e, t[n], i, r)
: e.set(t, n, i);
});
}
function Z(e, t) {
var n = null,
r = -1;
return (
(0, a.I)(e, function (e, i) {
if (e.w === t) return (n = e), (r = i), -1;
}),
{ i: r, l: n }
);
}
var Q = (function () {
function e() {
var t,
n,
d,
h,
p,
g,
v,
y,
b,
_,
w,
P,
$,
Q,
Y,
ee,
te,
ne,
re,
ie,
oe,
se,
ae,
ce,
ue,
le,
de,
fe;
(0, i.A)(e, this, function (e) {
function i(e) {
return (
(le && le[I.XM]) ||
fe ||
((e || (d && d.queue[I.oI] > 0)) &&
(de ||
((de = !0),
Te(
t[I.x6](function (e) {
var t = e.cfg.diagnosticLogInterval;
(t && t > 0) || (t = 1e4);
var n = !1;
le && ((n = le[I.XM]), le[I._w]()),
(le = (0, f.AH)(_e, t)).unref(),
(le[I.XM] = n);
})
)),
(le[I.XM] = !0))),
le
);
}
function he() {
var e = {};
ce = [];
var t = function (t) {
t &&
(0, a.I)(t, function (t) {
if (t[I.Ju] && t[I.s] && !e[t.identifier]) {
var n = t[I.Ju] + "=" + t[I.s];
ce[I.y5](n), (e[t.identifier] = t);
}
});
};
t(P),
w &&
(0, a.I)(w, function (e) {
t(e);
}),
t(_);
}
function pe() {
(n = !1),
((t = (0, E.e)({}, H, e[I.Uw])).cfg[I.Bl] = 1),
(0, m.vF)(e, "config", {
g: function () {
return t.cfg;
},
s: function (t) {
e.updateCfg(t, !1);
},
}),
(0, m.vF)(e, "pluginVersionStringArr", {
g: function () {
return ce || he(), ce;
},
}),
(0, m.vF)(e, "pluginVersionString", {
g: function () {
return (
ue || (ce || he(), (ue = ce.join(";"))), ue || F.m5
);
},
}),
(0, m.vF)(e, "logger", {
g: function () {
return d || ((d = new M.wq(t.cfg)), (t[I.Uw] = d)), d;
},
s: function (e) {
(t[I.Uw] = e), d !== e && ((0, k.K)(d, !1), (d = e));
},
}),
(e[I.Uw] = new M.wq(t.cfg)),
(ae = []);
var r = e.config[F.jy] || [];
r.splice(0, r[I.oI]),
(0, x.Y)(r, ae),
(Q = new B()),
(h = []),
(0, k.K)(p, !1),
(p = null),
(g = null),
(v = null),
(0, k.K)(y, !1),
(y = null),
(b = null),
(_ = []),
(w = null),
(P = null),
($ = !1),
(Y = null),
(ee = (0, R.Z)("AIBaseCore", !0)),
(te = (0, U.P)()),
(ie = null),
(oe = null),
(ne = (0, q.w)()),
(se = []),
(ue = null),
(ce = null),
(fe = !1);
}
function ge() {
var n = (0, V.i8)(ye(), t.cfg, e);
return n[I.by](i), n;
}
function me(t) {
var n = (function (e, t, n) {
var r,
i = [],
o = [],
s = {};
return (
(0, a.I)(n, function (t) {
((0, c.hX)(t) || (0, c.hX)(t[I.mE])) && (0, u.$8)(W);
var n = t[F.Vo],
r = t[I.Ju];
t &&
n &&
((0, c.hX)(s[n])
? (s[n] = r)
: (0, M.OG)(
e,
"Two extensions have same priority #" +
n +
" - " +
s[n] +
", " +
r
)),
!n || n < 500 ? i[I.y5](t) : o[I.y5](t);
}),
((r = {})[F.eT] = i),
(r[F.LZ] = o),
r
);
})(e[I.Uw], 0, _);
(b = null),
(ue = null),
(ce = null),
(P = (w || [])[0] || []),
(P = (0, K.Xc)((0, x.Y)(P, n[F.LZ])));
var r = (0, x.Y)((0, K.Xc)(n[F.eT]), P);
ae = (0, s.N6)(r);
var i = e.config[F.jy] || [];
i.splice(0, i[I.oI]), (0, x.Y)(i, ae);
var o = ge();
P && P[I.oI] > 0 && (0, K.pI)(o[I.$o](P), r),
(0, K.pI)(o, r),
t && Se(t);
}
function ve(e) {
var t = null,
n = null,
r = [];
return (
(0, a.I)(ae, function (t) {
if (t[I.Ju] === e && t !== Q) return (n = t), -1;
t.getChannel && r[I.y5](t);
}),
!n &&
r[I.oI] > 0 &&
(0, a.I)(r, function (t) {
if (!(n = t.getChannel(e))) return -1;
}),
n &&
(t = {
plugin: n,
setEnabled: function (e) {
(0, K.Cr)(n)[F.Hr] = !e;
},
isEnabled: function () {
var e = (0, K.Cr)(n);
return !e[I.Ik] && !e[F.Hr];
},
remove: function (e, t) {
var r;
void 0 === e && (e = !0);
var i = [n],
o = (((r = { reason: 1 })[I.tI] = e), r);
be(i, o, function (e) {
e && me({ reason: 32, removed: i }), t && t(e);
});
},
}),
t
);
}
function ye() {
if (!b) {
var n = (ae || []).slice();
-1 === (0, O.r)(n, Q) && n[I.y5](Q),
(b = (0, V.PV)((0, K.Xc)(n), t.cfg, e));
}
return b;
}
function be(n, r, o) {
if (n && n[I.oI] > 0) {
var s = (0, V.PV)(n, t.cfg, e),
c = (0, V.tS)(s, e);
c[I.by](function () {
var e = !1,
t = [];
(0, a.I)(_, function (r, i) {
G(r, n) ? (e = !0) : t[I.y5](r);
}),
(_ = t),
(ue = null),
(ce = null);
var r = [];
w &&
((0, a.I)(w, function (t, i) {
var o = [];
(0, a.I)(t, function (t) {
G(t, n) ? (e = !0) : o[I.y5](t);
}),
r[I.y5](o);
}),
(w = r)),
o && o(e),
i();
}),
c[I.$5](r);
} else o(!1);
}
function _e() {
if (d && d.queue) {
var t = d.queue.slice(0);
(d.queue[I.oI] = 0),
(0, a.I)(t, function (t) {
var n,
r =
(((n = {})[I.RS] =
Y || "InternalMessageId: " + t[I.JR]),
(n.iKey = oe),
(n[I.fA] = (0, A._u)(new Date())),
(n.baseType = M.WD.dataType),
(n.baseData = { message: t[I.pM] }),
n);
e.track(r);
});
}
}
function we(e, t, n, r) {
var i = 1,
o = !1,
s = null;
function a() {
i--,
o &&
0 === i &&
(s && s[I._w](), (s = null), t && t(o), (t = null));
}
return (
(r = r || 5e3),
P &&
P[I.oI] > 0 &&
ge()
[I.$o](P)
.iterate(function (t) {
if (t.flush) {
i++;
var o = !1;
t.flush(
e,
function () {
(o = !0), a();
},
n
) ||
o ||
(e && null == s
? (s = (0, f.dR)(function () {
(s = null), a();
}, r))
: a());
}
}),
(o = !0),
a(),
!0
);
}
function Se(t) {
var n = (0, V.nU)(ye(), e);
n[I.by](i),
(e._updateHook && !0 === e._updateHook(n, t)) || n[I.$5](t);
}
function Pe(t) {
var n = e[I.Uw];
n ? ((0, M.ZP)(n, 2, 73, t), i()) : (0, u.$8)(t);
}
function Ce(t) {
var n = e[I.RF]();
n && n[F.Yp]([t], 2);
}
function Te(e) {
ne.add(e);
}
pe(),
(e._getDbgPlgTargets = function () {
return [ae];
}),
(e[I.tZ] = function () {
return n;
}),
(e[I.mE] = function (i, o, s, f) {
$ && (0, u.$8)(z),
e[I.tZ]() &&
(0, u.$8)("Core cannot be initialized more than once"),
(i = (t = (0, E.e)(i, H, s || e[I.Uw], !1)).cfg),
Te(
t[I.x6](function (e) {
oe = e.cfg.instrumentationKey;
var t = e.ref(e.cfg, F.Bw);
(0, l.z)(t, function (n) {
e.ref(t, n);
}),
(0, c.hX)(oe) &&
(0, u.$8)("Please provide instrumentation key");
})
),
!(p = f) && e[I.RF](),
Te(
t[I.x6](function (e) {
var t = e.cfg.disableDbgExt;
!0 === t && re && (p[I.TP](re), (re = null)),
p &&
!re &&
!0 !== t &&
((re = (0, D.M)(e.cfg)), p[I.vR](re));
})
),
Te(
t[I.x6](function (e) {
var t = e.cfg.enablePerfMgr;
!t && v && (v = null), t && (0, A.c2)(e.cfg, F.Yd, J);
})
),
(e[I.Uw] = s);
var h = i[F.jy];
if (
((_ = [])[I.y5].apply(
_,
(0, r.vz)((0, r.vz)([], o, !1), h, !1)
),
(w = i[F.LZ]),
me(null),
(P && 0 !== P[I.oI]) ||
(0, u.$8)("No " + F.LZ + " available"),
w && w[I.oI] > 1)
) {
var g = e[I.AP]("TeeChannelController");
(g && g.plugin) ||
(0, M.ZP)(d, 1, 28, "TeeChannel required");
}
!(function (e, t, n) {
(0, a.I)(t, function (t) {
var r = (0, E.a)(e, t.w, n);
delete t.w,
(t.rm = function () {
r.rm();
});
});
})(i, se, d),
(se = null),
(n = !0),
e.releaseQueue(),
e[I.h4]();
}),
(e.getChannels = function () {
var e = [];
return (
P &&
(0, a.I)(P, function (t) {
e[I.y5](t);
}),
(0, s.N6)(e)
);
}),
(e.track = function (t) {
(0, N.r2)(
e[F.kI](),
function () {
return "AppInsightsCore:track";
},
function () {
null === t &&
(Ce(t), (0, u.$8)("Invalid telemetry item")),
!t[I.RS] &&
(0, c.hX)(t[I.RS]) &&
(Ce(t), (0, u.$8)("telemetry name required")),
(t.iKey = t.iKey || oe),
(t[I.fA] = t[I.fA] || (0, A._u)(new Date())),
(t.ver = t.ver || "4.0"),
!$ && e[I.tZ]() ? ge()[I.$5](t) : h[I.y5](t);
},
function () {
return { item: t };
},
!t.sync
);
}),
(e[I.ps] = ge),
(e[I.RF] = function () {
return (
p || ((p = new L.h(t.cfg)), (e._notificationManager = p)), p
);
}),
(e[I.vR] = function (t) {
e[I.RF]()[I.vR](t);
}),
(e[I.TP] = function (e) {
p && p[I.TP](e);
}),
(e.getCookieMgr = function () {
return y || (y = (0, j.xN)(t.cfg, e[I.Uw])), y;
}),
(e.setCookieMgr = function (e) {
y !== e && ((0, k.K)(y, !1), (y = e));
}),
(e[F.kI] = function () {
return (
g ||
v ||
Te(
t[I.x6](function (t) {
if (t.cfg.enablePerfMgr) {
var n = t.cfg[F.Yd];
(0, c.Tn)(n) && (v = n(e, e[I.RF]()));
}
})
),
g || v || (0, N.Z4)()
);
}),
(e.setPerfMgr = function (e) {
g = e;
}),
(e.eventCnt = function () {
return h[I.oI];
}),
(e.releaseQueue = function () {
if (n && h[I.oI] > 0) {
var e = h;
(h = []),
(0, a.I)(e, function (e) {
ge()[I.$5](e);
});
}
}),
(e[I.h4] = function (e) {
return (Y = e || null), (fe = !1), le && le[I._w](), i(!0);
}),
(e[I.Di] = function () {
(fe = !0), le && le[I._w](), _e();
}),
(0, A.o$)(
e,
function () {
return Q;
},
["addTelemetryInitializer"]
),
(e[I.M5] = function (t, r, i) {
var s;
void 0 === t && (t = !0),
n || (0, u.$8)("SDK is not initialized"),
$ && (0, u.$8)(z);
var a,
c =
(((s = { reason: 50 })[I.tI] = t),
(s.flushComplete = !1),
s);
t &&
!r &&
(a = (0, o.Qo)(function (e) {
r = e;
}));
var l = (0, V.tS)(ye(), e);
function f(t) {
(c.flushComplete = t),
($ = !0),
te.run(l, c),
e[I.Di](),
l[I.$5](c);
}
return (
l[I.by](function () {
ne.run(e[I.Uw]),
(0, k.k)([y, p, d], t, function () {
pe(), r && r(c);
});
}, e),
_e(),
we(t, f, 6, i) || f(!1),
a
);
}),
(e[I.AP] = ve),
(e.addPlugin = function (e, t, n, r) {
if (!e) return r && r(!1), void Pe(W);
var i = ve(e[I.Ju]);
if (i && !t)
return (
r && r(!1),
void Pe("Plugin [" + e[I.Ju] + "] is already loaded!")
);
var o = { reason: 16 };
function s(t) {
_[I.y5](e), (o.added = [e]), me(o), r && r(!0);
}
if (i) {
var a = [i.plugin];
be(a, { reason: 2, isAsync: !!n }, function (e) {
e ? ((o.removed = a), (o.reason |= 32), s()) : r && r(!1);
});
} else s();
}),
(e.updateCfg = function (n, r) {
var i;
if ((void 0 === r && (r = !0), e[I.tZ]())) {
(i = {
reason: 1,
cfg: t.cfg,
oldCfg: S({}, t.cfg),
newConfig: S({}, n),
merge: r,
}),
(n = i.newConfig);
var o = t.cfg;
(n[F.jy] = o[F.jy]), (n[F.LZ] = o[F.LZ]);
}
t._block(function (e) {
var t = e.cfg;
X(e, t, n, r),
r ||
(0, l.z)(t, function (r) {
(0, C.K)(n, r) || e.set(t, r, F.HP);
}),
e[I.h0](t, H);
}, !0),
t[I.zs](),
i && Se(i);
}),
(e.evtNamespace = function () {
return ee;
}),
(e.flush = we),
(e.getTraceCtx = function (e) {
return ie || (ie = (0, K.u7)()), ie;
}),
(e.setTraceCtx = function (e) {
ie = e || null;
}),
(e.addUnloadHook = Te),
(0, A.RF)(
e,
"addUnloadCb",
function () {
return te;
},
"add"
),
(e.onCfgChange = function (r) {
var i, o, s, a;
return (
n
? (i = (0, E.a)(t.cfg, r, e[I.Uw]))
: ((a = Z((o = se), (s = r)).l) ||
((a = {
w: s,
rm: function () {
var e = Z(o, s);
-1 !== e.i && o[I.Ic](e.i, 1);
},
}),
o[I.y5](a)),
(i = a)),
{
rm: function () {
i.rm();
},
}
);
}),
(e.getWParam = function () {
return (0, T.Wt)() || t.cfg.enableWParam ? 0 : -1;
});
});
}
return (e.__ieDyn = 1), e;
})();
},
4013: (e, t, n) => {
"use strict";
n.d(t, { K: () => c, k: () => u });
var r = n(636),
i = n(4292),
o = n(4657),
s = n(755),
a = n(6182);
function c(e, t) {
if (e && e[a.M5]) return e[a.M5](t);
}
function u(e, t, n) {
var a;
return (
n ||
(a = (0, r.Qo)(function (e) {
n = e;
})),
e && (0, o.R)(e) > 0
? (0, i.Dv)(c(e[0], t), function () {
u((0, s.K)(e, 1), t, n);
})
: n(),
a
);
}
},
8257: (e, t, n) => {
"use strict";
n.d(t, { s: () => v });
var r,
i = n(8279),
o = n(6336),
s = n(6668),
a = n(9622),
c = n(6182),
u = n(3775),
l = n(3673),
d = n(6492),
f = n(2317),
h = n(836),
p = n(8969),
g = "getPlugin",
m = (((r = {})[d.Bw] = { isVal: l.Gh, v: {} }), r),
v = (function () {
function e() {
var t,
n,
r,
v,
y,
b = this;
function _(e) {
void 0 === e && (e = null);
var t = e;
if (!t) {
var i = n || (0, f.i8)(null, {}, b[d.eT]);
t = r && r[g] ? i[c.$o](null, r[g]) : i[c.$o](null, r);
}
return t;
}
function w(e, t, i) {
(0, a.e)(e, m, (0, u.y0)(t)),
!i && t && (i = t[c.ps]()[c.uR]());
var o = r;
r && r[g] && (o = r[g]()),
(b[d.eT] = t),
(n = (0, f.i8)(i, e, t, o));
}
function S() {
(t = !1),
(b[d.eT] = null),
(n = null),
(r = null),
(y = (0, p.w)()),
(v = (0, h.P)());
}
S(),
(0, i.A)(e, b, function (e) {
(e[c.mE] = function (e, n, r, i) {
w(e, n, i), (t = !0);
}),
(e[c.Ik] = function (t, n) {
var i,
o = e[d.eT];
if (o && (!t || o === t[d.eT]())) {
var s,
a = !1,
u = t || (0, f.tS)(null, o, r && r[g] ? r[g]() : r),
l = n || (((i = { reason: 0 })[c.tI] = !1), i);
return (
e[c.tn] && !0 === e[c.tn](u, l, h) ? (s = !0) : h(), s
);
}
function h() {
a ||
((a = !0),
v.run(u, n),
y.run(u[c.e4]()),
!0 === s && u[c.$5](l),
S());
}
}),
(e[c.HC] = function (t, n) {
var i = e[d.eT];
if (i && (!t || i === t[d.eT]())) {
var o,
s = !1,
a = t || (0, f.nU)(null, i, r && r[g] ? r[g]() : r),
u = n || { reason: 0 };
return (
e._doUpdate && !0 === e._doUpdate(a, u, l)
? (o = !0)
: l(),
o
);
}
function l() {
s || ((s = !0), w(a.getCfg(), a.core(), a[c.uR]()));
}
}),
(0, l.RF)(
e,
"_addUnloadCb",
function () {
return v;
},
"add"
),
(0, l.RF)(
e,
"_addHook",
function () {
return y;
},
"add"
),
(0, o.vF)(e, "_unloadHooks", {
g: function () {
return y;
},
});
}),
(b[c.e4] = function (e) {
return _(e)[c.e4]();
}),
(b[c.tZ] = function () {
return t;
}),
(b.setInitialized = function (e) {
t = e;
}),
(b[c.YH] = function (e) {
r = e;
}),
(b[c.$5] = function (e, t) {
t ? t[c.$5](e) : r && (0, s.Tn)(r[d.qT]) && r[d.qT](e, null);
}),
(b._getTelCtx = _);
}
return (e.__ieDyn = 1), e;
})();
},
5034: (e, t, n) => {
"use strict";
n.d(t, { It: () => X, gi: () => q, um: () => B, xN: () => U });
var r,
i,
o,
s = n(2871),
a = n(3076),
c = n(6668),
u = n(6832),
l = n(8993),
d = n(5881),
f = n(3178),
h = n(225),
p = n(8693),
g = n(5439),
m = n(9018),
v = n(2494),
y = n(2475),
b = n(9622),
_ = n(6182),
w = n(3775),
S = n(7292),
P = n(3673),
C = n(6492),
T = "toGMTString",
x = "toUTCString",
O = "cookie",
E = "expires",
I = "isCookieUseDisabled",
k = "disableCookiesUsage",
j = "_ckMgr",
R = null,
D = null,
M = null,
A = {},
F = {},
L =
(((r = {
cookieCfg: (0, y.NU)(
((i = {}),
(i[C.Fk] = { fb: "cookieDomain", dfVal: P.Gh }),
(i.path = { fb: "cookiePath", dfVal: P.Gh }),
(i.enabled = C.HP),
(i.ignoreCookies = C.HP),
(i.blockedCookies = C.HP),
i)
),
cookieDomain: C.HP,
cookiePath: C.HP,
})[k] = C.HP),
r);
function N() {
!o &&
(o = (0, s.nR)(function () {
return (0, a.YE)();
}));
}
function V(e) {
return !e || e.isEnabled();
}
function K(e, t) {
return (
!!(t && e && (0, c.cy)(e.ignoreCookies)) &&
-1 !== (0, u.r)(e.ignoreCookies, t)
);
}
function $(e, t) {
var n = t[_.XM];
if ((0, c.hX)(n)) {
var r = void 0;
(0, c.b0)(e[I]) || (r = !e[I]),
(0, c.b0)(e[k]) || (r = !e[k]),
(n = r);
}
return n;
}
function B(e, t) {
var n;
if (e) n = e.getCookieMgr();
else if (t) {
var r = t.cookieCfg;
n = r && r[j] ? r[j] : U(t);
}
return (
n ||
(n = (function (e, t) {
var n = U[j] || F[j];
return n || ((n = U[j] = U(e, t)), (F[j] = n)), n;
})(t, (e || {})[_.Uw])),
n
);
}
function U(e, t) {
var n, r, i, o, s, p, g, m, v;
(e = (0, b.e)(e || F, null, t).cfg),
(s = (0, b.a)(
e,
function (t) {
t[_.h0](t.cfg, L),
(r = t.ref(t.cfg, "cookieCfg")),
(i = r[C.QW] || "/"),
(o = r[C.Fk]),
(p = !1 !== $(e, r)),
(g = r.getCookie || J),
(m = r.setCookie || G),
(v = r.delCookie || G);
},
t
));
var y =
(((n = {
isEnabled: function () {
var n = !1 !== $(e, r) && p && q(t),
i = F[j];
return n && i && y !== i && (n = V(i)), n;
},
setEnabled: function (e) {
(p = !1 !== e), (r[_.XM] = e);
},
set: function (e, t, n, s, p) {
var g = !1;
if (
V(y) &&
!(function (e, t) {
return (
!!(
t &&
e &&
(0, c.cy)(e.blockedCookies) &&
-1 !== (0, u.r)(e.blockedCookies, t)
) || K(e, t)
);
})(r, e)
) {
var v = {},
b = (0, l.EH)(t || C.m5),
w = (0, d.H)(b, ";");
if (
(-1 !== w &&
((b = (0, l.EH)((0, f.ZW)(t, w))),
(v = W((0, f.P0)(t, w + 1)))),
(0, P.KY)(v, C.Fk, s || o, c.zz, c.b0),
!(0, c.hX)(n))
) {
var O = (0, S.lT)();
if ((0, c.b0)(v[E])) {
var I = (0, h.f)() + 1e3 * n;
if (I > 0) {
var k = new Date();
k.setTime(I),
(0, P.KY)(
v,
E,
z(k, O ? T : x) || z(k, O ? T : x) || C.m5,
c.zz
);
}
}
O || (0, P.KY)(v, "max-age", C.m5 + n, null, c.b0);
}
var j = (0, S.g$)();
j &&
"https:" === j.protocol &&
((0, P.KY)(v, "secure", null, null, c.b0),
null === D && (D = !X(((0, a.w3)() || {})[_.tX])),
D && (0, P.KY)(v, "SameSite", "None", null, c.b0)),
(0, P.KY)(v, C.QW, p || i, null, c.b0),
m(e, H(b, v)),
(g = !0);
}
return g;
},
get: function (e) {
var t = C.m5;
return V(y) && !K(r, e) && (t = g(e)), t;
},
del: function (e, t) {
var n = !1;
return V(y) && (n = y.purge(e, t)), n;
},
purge: function (e, n) {
var r,
i = !1;
if (q(t)) {
var o =
(((r = {})[C.QW] = n || "/"),
(r[E] = "Thu, 01 Jan 1970 00:00:01 GMT"),
r);
(0, S.lT)() || (o["max-age"] = "0"),
v(e, H(C.m5, o)),
(i = !0);
}
return i;
},
})[_.M5] = function (e) {
s && s.rm(), (s = null);
}),
n);
return (y[j] = y), y;
}
function q(e) {
if (null === R) {
(R = !1), !o && N();
try {
var t = o.v || {};
R = void 0 !== t[O];
} catch (t) {
(0, w.ZP)(
e,
2,
68,
"Cannot access document.cookie - " + (0, P.lL)(t),
{ exception: (0, p.m)(t) }
);
}
}
return R;
}
function W(e) {
var t = {};
if (e && e[_.oI]) {
var n = (0, l.EH)(e)[_.sY](";");
(0, g.I)(n, function (e) {
if ((e = (0, l.EH)(e || C.m5))) {
var n = (0, d.H)(e, "=");
-1 === n
? (t[e] = null)
: (t[(0, l.EH)((0, f.ZW)(e, n))] = (0, l.EH)(
(0, f.P0)(e, n + 1)
));
}
});
}
return t;
}
function z(e, t) {
return (0, c.Tn)(e[t]) ? e[t]() : null;
}
function H(e, t) {
var n = e || C.m5;
return (
(0, m.z)(t, function (e, t) {
n += "; " + e + ((0, c.hX)(t) ? C.m5 : "=" + t);
}),
n
);
}
function J(e) {
var t = C.m5;
if ((!o && N(), o.v)) {
var n = o.v[O] || C.m5;
M !== n && ((A = W(n)), (M = n)), (t = (0, l.EH)(A[e] || C.m5));
}
return t;
}
function G(e, t) {
!o && N(), o.v && (o.v[O] = e + "=" + t);
}
function X(e) {
return !(
!(0, c.Kg)(e) ||
(!(0, P.Ju)(e, "CPU iPhone OS 12") &&
!(0, P.Ju)(e, "iPad; CPU OS 12") &&
!(
(0, P.Ju)(e, "Macintosh; Intel Mac OS X 10_14") &&
(0, P.Ju)(e, "Version/") &&
(0, P.Ju)(e, "Safari")
) &&
(!(0, P.Ju)(e, "Macintosh; Intel Mac OS X 10_14") ||
!(0, v.C)(e, "AppleWebKit/605.1.15 (KHTML, like Gecko)")) &&
!(0, P.Ju)(e, "Chrome/5") &&
!(0, P.Ju)(e, "Chrome/6") &&
(!(0, P.Ju)(e, "UnrealEngine") || (0, P.Ju)(e, "Chrome")) &&
!(0, P.Ju)(e, "UCBrowser/12") &&
!(0, P.Ju)(e, "UCBrowser/11"))
);
}
},
9882: (e, t, n) => {
"use strict";
n.d(t, { aq: () => s, cL: () => a });
var r = n(3178),
i = n(6492),
o = n(6535);
function s() {
var e = a();
return (
(0, r.P0)(e, 0, 8) +
"-" +
(0, r.P0)(e, 8, 12) +
"-" +
(0, r.P0)(e, 12, 16) +
"-" +
(0, r.P0)(e, 16, 20) +
"-" +
(0, r.P0)(e, 20)
);
}
function a() {
for (
var e,
t = [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"a",
"b",
"c",
"d",
"e",
"f",
],
n = i.m5,
s = 0;
s < 4;
s++
)
n +=
t[15 & (e = (0, o.VN)())] +
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 a = t[(8 + (3 & (0, o.VN)())) | 0];
return (
(0, r.hK)(n, 0, 8) +
(0, r.hK)(n, 9, 4) +
"4" +
(0, r.hK)(n, 13, 3) +
a +
(0, r.hK)(n, 16, 3) +
(0, r.hK)(n, 19, 12)
);
}
},
4276: (e, t, n) => {
"use strict";
n.d(t, { T: () => h, Z: () => f });
var r = n(6336),
i = n(6182),
o = n(3673),
s = n(6492),
a = n(6535),
c = "3.0.4",
u = "." + (0, a.Si)(6),
l = 0;
function d(e) {
return 1 === e[i.re] || 9 === e[i.re] || !+e[i.re];
}
function f(e, t) {
return (
void 0 === t && (t = !1),
(0, o.cH)(e + l++ + (t ? "." + c : s.m5) + u)
);
}
function h(e) {
var t = {
id: f("_aiData-" + (e || s.m5) + "." + c),
accept: function (e) {
return d(e);
},
get: function (e, n, i, s) {
var a = e[t.id];
return a
? a[(0, o.cH)(n)]
: (s &&
((a = (function (e, t) {
var n = t[e.id];
if (!n) {
n = {};
try {
d(t) && (0, r.vF)(t, e.id, { e: !1, v: n });
} catch (e) {}
}
return n;
})(t, e)),
(a[(0, o.cH)(n)] = i)),
i);
},
kill: function (e, t) {
if (e && e[t])
try {
delete e[t];
} catch (e) {}
},
};
return t;
}
},
7867: (e, t, n) => {
"use strict";
n.d(t, { $: () => l, M: () => d });
var r,
i = n(3076),
o = n(6182),
s = n(6492),
a = [s.fc, s.Yp, s.dI, s.l0],
c = null;
function u(e, t) {
return function () {
var n = arguments,
r = l(t);
if (r) {
var i = r.listener;
i && i[e] && i[e][o.y9](i, n);
}
};
}
function l(e) {
var t,
n = c;
return (
n ||
!0 === e.disableDbgExt ||
(n =
c ||
((t = (0, i.zS)("Microsoft")) && (c = t.ApplicationInsights),
c)),
n ? n.ChromeDbgExt : null
);
}
function d(e) {
if (!r) {
r = {};
for (var t = 0; t < a[o.oI]; t++) r[a[t]] = u(a[t], e);
}
return r;
}
},
3775: (e, t, n) => {
"use strict";
n.d(t, {
OG: () => S,
Oc: () => P,
WD: () => v,
ZP: () => w,
wq: () => b,
y0: () => y,
});
var r,
i = n(8279),
o = n(6668),
s = n(8693),
a = n(9622),
c = n(6182),
u = n(7867),
l = n(7292),
d = n(6492),
f = "warnToConsole",
h = {
loggingLevelConsole: 0,
loggingLevelTelemetry: 1,
maxMessageLimit: 25,
enableDebug: !1,
},
p =
(((r = {})[0] = null),
(r[1] = "errorToConsole"),
(r[2] = f),
(r[3] = "debugToConsole"),
r);
function g(e) {
return e ? '"' + e[c.W7](/\"/g, d.m5) + '"' : d.m5;
}
function m(e, t) {
var n = (0, l.U5)();
if (n) {
var r = "log";
n[e] && (r = e), (0, o.Tn)(n[r]) && n[r](t);
}
}
var v = (function () {
function e(e, t, n, r) {
void 0 === n && (n = !1);
var i = this;
(i[c.JR] = e), (i[c.pM] = (n ? "AI: " : "AI (Internal): ") + e);
var o = d.m5;
(0, l.Z)() && (o = (0, l.hm)().stringify(r));
var s =
(t ? " message:" + g(t) : d.m5) + (r ? " props:" + g(o) : d.m5);
i[c.pM] += s;
}
return (e.dataType = "MessageData"), e;
})();
function y(e, t) {
return (e || {})[c.Uw] || new b(t);
}
var b = (function () {
function e(t) {
(this.identifier = "DiagnosticLogger"), (this.queue = []);
var n,
r,
l,
d,
g,
y = 0,
b = {};
(0, i.A)(e, this, function (e) {
function i(t, n) {
if (!(y >= l)) {
var i = !0,
o = "AITR_" + n[c.JR];
if (
(b[o] ? (i = !1) : (b[o] = !0),
i &&
(t <= r &&
(e.queue[c.y5](n),
y++,
_(1 === t ? "error" : "warn", n)),
y === l))
) {
var s =
"Internal events throttle limit per PageView reached for this app.",
a = new v(23, s, !1);
e.queue[c.y5](a),
1 === t ? e.errorToConsole(s) : e[c.on](s);
}
}
}
function _(e, n) {
var r = (0, u.$)(t || {});
r && r[c.e4] && r[c.e4](e, n);
}
(g = (function (t) {
return (0, a.a)((0, a.e)(t, h, e).cfg, function (e) {
var t = e.cfg;
(n = t[c.Bl]),
(r = t.loggingLevelTelemetry),
(l = t.maxMessageLimit),
(d = t.enableDebug);
});
})(t || {})),
(e.consoleLoggingLevel = function () {
return n;
}),
(e[c.ih] = function (t, r, a, u, l) {
void 0 === l && (l = !1);
var h = new v(r, a, l, u);
if (d) throw (0, s.m)(h);
var g = p[t] || f;
if ((0, o.b0)(h[c.pM]))
_("throw" + (1 === t ? "Critical" : "Warning"), h);
else {
if (l) {
var m = +h[c.JR];
!b[m] && n >= t && (e[g](h[c.pM]), (b[m] = !0));
} else n >= t && e[g](h[c.pM]);
i(t, h);
}
}),
(e.debugToConsole = function (e) {
m("debug", e), _("warning", e);
}),
(e[c.on] = function (e) {
m("warn", e), _("warning", e);
}),
(e.errorToConsole = function (e) {
m("error", e), _("error", e);
}),
(e.resetInternalMessageCount = function () {
(y = 0), (b = {});
}),
(e[c.sx] = i),
(e[c.M5] = function (e) {
g && g.rm(), (g = null);
});
});
}
return (e.__ieDyn = 1), e;
})();
function _(e) {
return e || new b();
}
function w(e, t, n, r, i, o) {
void 0 === o && (o = !1), _(e)[c.ih](t, n, r, i, o);
}
function S(e, t) {
_(e)[c.on](t);
}
function P(e, t, n) {
_(e)[c.sx](t, n);
}
},
7292: (e, t, n) => {
"use strict";
n.d(t, {
$Z: () => $,
Iu: () => B,
L0: () => A,
MY: () => j,
PV: () => N,
R7: () => L,
U5: () => E,
Uf: () => F,
Z: () => I,
cU: () => x,
g$: () => O,
hm: () => k,
iN: () => R,
lT: () => M,
lV: () => D,
xk: () => V,
});
var r = n(5664),
i = n(6668),
o = n(3076),
s = n(558),
a = n(6182),
c = n(3673),
u = n(6492),
l = "documentMode",
d = "location",
f = "console",
h = "JSON",
p = "crypto",
g = "msCrypto",
m = "ReactNative",
v = "msie",
y = "trident/",
b = "XMLHttpRequest",
_ = null,
w = null,
S = !1,
P = null,
C = null;
function T(e, t) {
var n = !1;
if (e) {
try {
if (!(n = t in e)) {
var o = e[r.vR];
o && (n = t in o);
}
} catch (e) {}
if (!n)
try {
var s = new e();
n = !(0, i.b0)(s[t]);
} catch (e) {}
}
return n;
}
function x(e) {
S = e;
}
function O(e) {
if (e && S) {
var t = (0, o.zS)("__mockLocation");
if (t) return t;
}
return typeof location === r._1 && location ? location : (0, o.zS)(d);
}
function E() {
return typeof console !== r.bA ? console : (0, o.zS)(f);
}
function I() {
return Boolean(
(typeof JSON === r._1 && JSON) || null !== (0, o.zS)(h)
);
}
function k() {
return I() ? JSON || (0, o.zS)(h) : null;
}
function j() {
return (0, o.zS)(p);
}
function R() {
return (0, o.zS)(g);
}
function D() {
var e = (0, o.w3)();
return !(!e || !e.product) && e.product === m;
}
function M() {
var e = (0, o.w3)();
if (e && (e[a.tX] !== w || null === _)) {
var t = ((w = e[a.tX]) || u.m5)[a.OL]();
_ = (0, c.Ju)(t, v) || (0, c.Ju)(t, y);
}
return _;
}
function A(e) {
if ((void 0 === e && (e = null), !e)) {
var t = (0, o.w3)() || {};
e = t ? (t.userAgent || u.m5)[a.OL]() : u.m5;
}
var n = (e || u.m5)[a.OL]();
if ((0, c.Ju)(n, v)) {
var r = (0, o.YE)() || {};
return Math.max(parseInt(n[a.sY](v)[1]), r[l] || 0);
}
if ((0, c.Ju)(n, y)) {
var i = parseInt(n[a.sY](y)[1]);
if (i) return i + 4;
}
return null;
}
function F(e) {
return (
(null !== C && !1 !== e) ||
(C = (0, o.w9)() && Boolean((0, o.w3)().sendBeacon)),
C
);
}
function L(e) {
var t = !1;
try {
t = !!(0, o.zS)("fetch");
var n = (0, o.zS)("Request");
t && e && n && (t = T(n, "keepalive"));
} catch (e) {}
return t;
}
function N() {
return (
null === P &&
(P = typeof XDomainRequest !== r.bA) &&
V() &&
(P = P && !T((0, o.zS)(b), "withCredentials")),
P
);
}
function V() {
var e = !1;
try {
e = !!(0, o.zS)(b);
} catch (e) {}
return e;
}
function K(e, t) {
if (e)
for (var n = 0; n < e[a.oI]; n++) {
var r = e[n];
if (r[a.RS] && r[a.RS] === t) return r;
}
return {};
}
function $(e) {
var t = (0, o.YE)();
return t && e ? K(t.querySelectorAll("meta"), e).content : null;
}
function B(e) {
var t,
n = (0, s.FJ)();
if (n) {
var r = n.getEntriesByType("navigation") || [];
t = K((r[a.oI] > 0 ? r[0] : {}).serverTiming, e).description;
}
return t;
}
},
6149: (e, t, n) => {
"use strict";
n.d(t, {
Ds: () => H,
El: () => R,
Fc: () => J,
Hm: () => F,
ML: () => N,
Q3: () => V,
So: () => $,
Wg: () => W,
Ym: () => K,
ee: () => z,
lQ: () => q,
mB: () => L,
oS: () => X,
sq: () => G,
vF: () => Z,
zh: () => B,
});
var r = n(6668),
i = n(5439),
o = n(9018),
s = n(1324),
a = n(3076),
c = n(6832),
u = n(6182),
l = n(4276),
d = n(6492),
f = "on",
h = "attachEvent",
p = "addEventListener",
g = "detachEvent",
m = "removeEventListener",
v = "events",
y = "visibilitychange",
b = "pagehide",
_ = "pageshow",
w = "unload",
S = "beforeunload",
P = (0, l.Z)("aiEvtPageHide"),
C = (0, l.Z)("aiEvtPageShow"),
T = /\.[\.]+/g,
x = /[\.]+$/,
O = 1,
E = (0, l.T)("events"),
I = /^([^.]*)(?:\.(.+)|)/;
function k(e) {
return e && e[u.W7]
? e[u.W7](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g, d.m5)
: e;
}
function j(e, t) {
var n;
if (t) {
var o = d.m5;
(0, r.cy)(t)
? ((o = d.m5),
(0, i.I)(t, function (e) {
(e = k(e)) && ("." !== e[0] && (e = "." + e), (o += e));
}))
: (o = k(t)),
o && ("." !== o[0] && (o = "." + o), (e = (e || d.m5) + o));
}
var s = I.exec(e || d.m5) || [];
return (
((n = {})[u.QM] = s[1]),
(n.ns = (s[2] || d.m5)
.replace(T, ".")
.replace(x, d.m5)
[u.sY](".")
.sort()
.join(".")),
n
);
}
function R(e, t, n) {
var r = [],
s = E.get(e, v, {}, !1),
a = j(t, n);
return (
(0, o.z)(s, function (e, t) {
(0, i.I)(t, function (e) {
var t;
(a[u.QM] && a[u.QM] !== e.evtName[u.QM]) ||
(a.ns && a.ns != a.ns) ||
r[u.y5](
(((t = {})[u.RS] =
e.evtName[u.QM] +
(e.evtName.ns ? "." + e.evtName.ns : d.m5)),
(t.handler = e[u.Yo]),
t)
);
});
}),
r
);
}
function D(e, t, n) {
void 0 === n && (n = !0);
var r = E.get(e, v, {}, n),
i = r[t];
return i || (i = r[t] = []), i;
}
function M(e, t, n, r) {
e &&
t &&
t[u.QM] &&
(e[m] ? e[m](t[u.QM], n, r) : e[g] && e[g](f + t[u.QM], n));
}
function A(e, t, n, r) {
for (var i = t[u.oI]; i--; ) {
var o = t[i];
o &&
((n.ns && n.ns !== o.evtName.ns) ||
(r && !r(o)) ||
(M(e, o.evtName, o[u.Yo], o.capture), t[u.Ic](i, 1)));
}
}
function F(e, t) {
return t
? j("xx", (0, r.cy)(t) ? [e].concat(t) : [e, t]).ns[u.sY](".")
: e;
}
function L(e, t, n, r, i) {
var o;
void 0 === i && (i = !1);
var s = !1;
if (e)
try {
var a = j(t, r);
if (
((s = (function (e, t, n, r) {
var i = !1;
return (
e &&
t &&
t[u.QM] &&
n &&
(e[p]
? (e[p](t[u.QM], n, r), (i = !0))
: e[h] && (e[h](f + t[u.QM], n), (i = !0))),
i
);
})(e, a, n, i)),
s && E.accept(e))
) {
var c =
(((o = { guid: O++, evtName: a })[u.Yo] = n),
(o.capture = i),
o);
D(e, a.type)[u.y5](c);
}
} catch (e) {}
return s;
}
function N(e, t, n, r, i) {
if ((void 0 === i && (i = !1), e))
try {
var a = j(t, r),
c = !1;
!(function (e, t, n) {
if (t[u.QM]) A(e, D(e, t[u.QM]), t, n);
else {
var r = E.get(e, v, {});
(0, o.z)(r, function (r, i) {
A(e, i, t, n);
}),
0 === (0, s.cG)(r)[u.oI] && E.kill(e, v);
}
})(e, a, function (e) {
return !(((!a.ns || n) && e[u.Yo] !== n) || ((c = !0), 0));
}),
c || M(e, a, n, i);
} catch (e) {}
}
function V(e, t, n, r) {
return void 0 === r && (r = !1), L(e, t, n, null, r);
}
function K(e, t, n, r) {
void 0 === r && (r = !1), N(e, t, n, null, r);
}
function $(e, t, n) {
var r = !1,
i = (0, a.zk)();
i && ((r = L(i, e, t, n)), (r = L(i.body, e, t, n) || r));
var o = (0, a.YE)();
return o && (r = L(o, e, t, n) || r), r;
}
function B(e, t, n) {
var r = (0, a.zk)();
r && (N(r, e, t, n), N(r.body, e, t, n));
var i = (0, a.YE)();
i && N(i, e, t, n);
}
function U(e, t, n, r) {
var o = !1;
return (
t &&
e &&
e[u.oI] > 0 &&
(0, i.I)(e, function (e) {
e && ((n && -1 !== (0, c.r)(n, e)) || (o = $(e, t, r) || o));
}),
o
);
}
function q(e, t, n, i) {
var o = !1;
return (
t &&
e &&
(0, r.cy)(e) &&
!(o = U(e, t, n, i)) &&
n &&
n[u.oI] > 0 &&
(o = U(e, t, null, i)),
o
);
}
function W(e, t, n) {
e &&
(0, r.cy)(e) &&
(0, i.I)(e, function (e) {
e && B(e, t, n);
});
}
function z(e, t, n) {
return q([S, w, b], e, t, n);
}
function H(e, t) {
W([S, w, b], e, t);
}
function J(e, t, n) {
var r = F(P, n),
i = U([b], e, t, r);
return (
(t && -1 !== (0, c.r)(t, y)) ||
(i =
U(
[y],
function (t) {
var n = (0, a.YE)();
e && n && "hidden" === n.visibilityState && e(t);
},
t,
r
) || i),
!i && t && (i = J(e, null, n)),
i
);
}
function G(e, t) {
var n = F(P, t);
W([b], e, n), W([y], null, n);
}
function X(e, t, n) {
var r = F(C, n),
i = U([_], e, t, r);
return (
!(i =
U(
[y],
function (t) {
var n = (0, a.YE)();
e && n && "visible" === n.visibilityState && e(t);
},
t,
r
) || i) &&
t &&
(i = X(e, null, n)),
i
);
}
function Z(e, t) {
var n = F(C, t);
W([_], e, n), W([y], null, n);
}
},
3673: (e, t, n) => {
"use strict";
n.d(t, {
CP: () => k,
Gh: () => v,
Ju: () => b,
KY: () => S,
RF: () => x,
SZ: () => E,
_u: () => _,
c2: () => P,
cH: () => y,
hW: () => I,
lL: () => w,
o$: () => O,
qz: () => T,
});
var r = n(1324),
i = n(5664),
o = n(6668),
s = n(5881),
a = n(9452),
c = n(6336),
u = n(5439),
l = n(9018),
d = n(7460),
f = n(6182),
h = n(6492),
p = /-([a-z])/g,
g = /([^\w\d_$])/g,
m = /^(\d+[\w\d_$])/;
function v(e) {
return !(0, o.hX)(e);
}
function y(e) {
var t = e;
return (
t &&
(0, o.Kg)(t) &&
(t = (t = (t = t[f.W7](p, function (e, t) {
return t.toUpperCase();
}))[f.W7](g, "_"))[f.W7](m, function (e, t) {
return "_" + t;
})),
t
);
}
function b(e, t) {
return !(!e || !t) && -1 !== (0, s.H)(e, t);
}
function _(e) {
return (e && e.toISOString()) || "";
}
function w(e) {
return (0, o.bJ)(e) ? e[f.RS] : h.m5;
}
function S(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 P(e, t, n) {
var r;
return (
e
? !(r = e[t]) &&
(0, o.hX)(r) &&
((r = (0, o.b0)(n) ? {} : n), (e[t] = r))
: (r = (0, o.b0)(n) ? {} : n),
r
);
}
function C(e, t) {
var n = null,
r = null;
return (
(0, o.Tn)(e) ? (n = e) : (r = e),
function () {
var e = arguments;
if ((n && (r = n()), r)) return r[t][f.y9](r, e);
}
);
}
function T(e, t, n) {
if (e && t && (0, o.Gv)(e) && (0, o.Gv)(t)) {
var r = function (r) {
if ((0, o.Kg)(r)) {
var i = t[r];
(0, o.Tn)(i)
? (n && !n(r, !0, t, e)) || (e[r] = C(t, r))
: (n && !n(r, !1, t, e)) ||
((0, a.K)(e, r) && delete e[r],
(0, c.vF)(e, r, {
g: function () {
return t[r];
},
s: function (e) {
t[r] = e;
},
}));
}
};
for (var i in t) r(i);
}
return e;
}
function x(e, t, n, r, i) {
e && t && n && (!1 !== i || (0, o.b0)(e[t])) && (e[t] = C(n, r));
}
function O(e, t, n, r) {
return (
e &&
t &&
(0, o.Gv)(e) &&
(0, o.cy)(n) &&
(0, u.I)(n, function (n) {
(0, o.Kg)(n) && x(e, n, t, n, r);
}),
e
);
}
function E(e) {
return function () {
var t = this;
e &&
(0, l.z)(e, function (e, n) {
t[e] = n;
});
};
}
function I(e) {
return e && r.vE && (e = (0, i.s6)((0, r.vE)({}, e))), e;
}
function k(e, t, n, r, i, s) {
var c = arguments,
u = c[0] || {},
l = c[f.oI],
h = !1,
p = 1;
for (
l > 0 && (0, o.Lm)(u) && ((h = u), (u = c[p] || {}), p++),
(0, o.Gv)(u) || (u = {});
p < l;
p++
) {
var g = c[p],
m = (0, o.cy)(g),
v = (0, o.Gv)(g);
for (var y in g)
if ((m && y in g) || (v && (0, a.K)(g, y))) {
var b = g[y],
_ = void 0;
if (h && b && ((_ = (0, o.cy)(b)) || (0, d.Q)(b))) {
var w = u[y];
_ ? (0, o.cy)(w) || (w = []) : (0, d.Q)(w) || (w = {}),
(b = k(h, w, b));
}
void 0 !== b && (u[y] = b);
}
}
return u;
}
Object.getPrototypeOf;
},
6492: (e, t, n) => {
"use strict";
n.d(t, {
Bw: () => u,
Fk: () => y,
HP: () => r,
Hr: () => c,
LZ: () => o,
QW: () => b,
Vo: () => f,
Yd: () => a,
Yp: () => p,
dI: () => g,
eT: () => s,
fc: () => h,
jy: () => l,
kI: () => v,
l0: () => m,
m5: () => i,
qT: () => d,
xW: () => _,
});
var r = void 0,
i = "",
o = "channels",
s = "core",
a = "createPerfMgr",
c = "disabled",
u = "extensionConfig",
l = "extensions",
d = "processTelemetry",
f = "priority",
h = "eventsSent",
p = "eventsDiscarded",
g = "eventsSendRequest",
m = "perfEvent",
v = "getPerfMgr",
y = "domain",
b = "path",
_ = "Not dynamic - ";
},
1356: (e, t, n) => {
"use strict";
n.d(t, { h: () => g });
var r = n(8279),
i = n(636),
o = n(4292),
s = n(5439),
a = n(6874),
c = n(6336),
u = n(6832),
l = n(9622),
d = n(6182),
f = n(6492),
h = { perfEvtsSendAll: !1 };
function p(e, t, n, r) {
(0, s.I)(e, function (e) {
if (e && e[t])
if (n)
(0, a.dR)(function () {
return r(e);
}, 0);
else
try {
r(e);
} catch (e) {}
});
}
var g = (function () {
function e(t) {
var n, s;
this.listeners = [];
var g = [],
m = (0, l.e)(t, h);
(s = m[d.x6](function (e) {
n = !!e.cfg.perfEvtsSendAll;
})),
(0, r.A)(e, this, function (e) {
(0, c.vF)(e, "listeners", {
g: function () {
return g;
},
}),
(e[d.vR] = function (e) {
g[d.y5](e);
}),
(e[d.TP] = function (e) {
for (var t = (0, u.r)(g, e); t > -1; )
g[d.Ic](t, 1), (t = (0, u.r)(g, e));
}),
(e[f.fc] = function (e) {
p(g, f.fc, !0, function (t) {
t[f.fc](e);
});
}),
(e[f.Yp] = function (e, t) {
p(g, f.Yp, !0, function (n) {
n[f.Yp](e, t);
});
}),
(e[f.dI] = function (e, t) {
p(g, f.dI, t, function (n) {
n[f.dI](e, t);
});
}),
(e[f.l0] = function (e) {
e &&
((!n && e[d.Zu]()) ||
p(g, f.l0, !1, function (t) {
e[d.tI]
? (0, a.dR)(function () {
return t[f.l0](e);
}, 0)
: t[f.l0](e);
}));
}),
(e[d.M5] = function (e) {
var t,
n = function () {
s && s.rm(), (s = null), (g = []);
};
if (
(p(g, "unload", !1, function (n) {
var r = n[d.M5](e);
r && (t || (t = []), t[d.y5](r));
}),
t)
)
return (0, i.Qo)(function (e) {
return (0, o.Dv)((0, i.Xf)(t), function () {
n(), e();
});
});
n();
});
});
}
return (e.__ieDyn = 1), e;
})();
},
8156: (e, t, n) => {
"use strict";
n.d(t, { NS: () => p, Q6: () => h, Z4: () => v, r2: () => m });
var r = n(8279),
i = n(225),
o = n(6668),
s = n(6336),
a = n(6182),
c = n(6492),
u = "ctx",
l = "ParentContextKey",
d = "ChildrenContextKey",
f = null,
h = (function () {
function e(t, n, r) {
var c,
f = this;
(f.start = (0, i.f)()),
(f[a.RS] = t),
(f[a.tI] = r),
(f[a.Zu] = function () {
return !1;
}),
(0, o.Tn)(n) &&
(0, s.vF)(f, "payload", {
g: function () {
return !c && (0, o.Tn)(n) && ((c = n()), (n = null)), c;
},
}),
(f[a.O_] = function (t) {
return t
? t === e[l] || t === e[d]
? f[t]
: (f[u] || {})[t]
: null;
}),
(f[a.e_] = function (t, n) {
t &&
(t === e[l]
? (f[t] ||
(f[a.Zu] = function () {
return !0;
}),
(f[t] = n))
: t === e[d]
? (f[t] = n)
: ((f[u] = f[u] || {})[t] = n));
}),
(f[a.Ru] = function () {
var t = 0,
n = f[a.O_](e[d]);
if ((0, o.cy)(n))
for (var r = 0; r < n[a.oI]; r++) {
var s = n[r];
s && (t += s[a.fA]);
}
(f[a.fA] = (0, i.f)() - f.start),
(f.exTime = f[a.fA] - t),
(f[a.Ru] = function () {});
});
}
return (
(e.ParentContextKey = "parent"),
(e.ChildrenContextKey = "childEvts"),
e
);
})(),
p = (function () {
function e(t) {
(this.ctx = {}),
(0, r.A)(e, this, function (e) {
(e.create = function (e, t, n) {
return new h(e, t, n);
}),
(e.fire = function (e) {
e && (e[a.Ru](), t && (0, o.Tn)(t[c.l0]) && t[c.l0](e));
}),
(e[a.e_] = function (t, n) {
t && ((e[u] = e[u] || {})[t] = n);
}),
(e[a.O_] = function (t) {
return (e[u] || {})[t];
});
});
}
return (e.__ieDyn = 1), e;
})(),
g = "CoreUtils.doPerf";
function m(e, t, n, r, i) {
if (e) {
var o = e;
if ((o[c.kI] && (o = o[c.kI]()), o)) {
var s = void 0,
u = o[a.O_](g);
try {
if ((s = o.create(t(), r, i))) {
if (u && s[a.e_] && (s[a.e_](h[l], u), u[a.O_] && u[a.e_])) {
var f = u[a.O_](h[d]);
f || ((f = []), u[a.e_](h[d], f)), f[a.y5](s);
}
return o[a.e_](g, s), n(s);
}
} catch (e) {
s && s[a.e_] && s[a.e_]("exception", e);
} finally {
s && o.fire(s), o[a.e_](g, u);
}
}
}
return n();
}
function v() {
return f;
}
},
2317: (e, t, n) => {
"use strict";
n.d(t, {
PV: () => C,
W0: () => T,
i8: () => w,
nU: () => P,
tS: () => S,
});
var r = n(6668),
i = n(5439),
o = n(8693),
s = n(9018),
a = n(1324),
c = n(991),
u = n(9622),
l = n(6182),
d = n(3775),
f = n(3673),
h = n(6492),
p = n(8156),
g = n(380),
m = "TelemetryPluginChain",
v = "_hasRun",
y = "_getTelCtx",
b = 0;
function _(e, t, n, a) {
var f = null,
p = [];
t || (t = (0, u.e)({}, null, n[l.Uw])),
null !== a &&
(f = a
? (function (e, t, n) {
for (; e; ) {
if (e[l.AP]() === n) return e;
e = e[l.uR]();
}
return C([n], t.config || {}, t);
})(e, n, a)
: e);
var g = {
_next: function () {
var e = f;
if (((f = e ? e[l.uR]() : null), !e)) {
var t = p;
t &&
t[l.oI] > 0 &&
((0, i.I)(t, function (e) {
try {
e.func.call(e.self, e.args);
} catch (e) {
(0,
d.ZP)(n[l.Uw], 2, 73, "Unexpected Exception during onComplete - " + (0, o.m)(e));
}
}),
(p = []));
}
return e;
},
ctx: {
core: function () {
return n;
},
diagLog: function () {
return (0, d.y0)(n, t.cfg);
},
getCfg: function () {
return t.cfg;
},
getExtCfg: function (e, n) {
var i = m(e, !0);
return (
n &&
(0, s.z)(n, function (e, n) {
if ((0, r.hX)(i[e])) {
var o = t.cfg[e];
(!o && (0, r.hX)(o)) || (i[e] = o);
}
(0, c.q)(t, i, e, n);
}),
t[l.h0](i, n)
);
},
getConfig: function (e, n, i) {
void 0 === i && (i = !1);
var o,
s = m(e, !1),
a = t.cfg;
return (
!s || (!s[n] && (0, r.hX)(s[n]))
? (!a[n] && (0, r.hX)(a[n])) || (o = a[n])
: (o = s[n]),
o || !(0, r.hX)(o) ? o : i
);
},
hasNext: function () {
return !!f;
},
getNext: function () {
return f;
},
setNext: function (e) {
f = e;
},
iterate: function (e) {
for (var t; (t = g._next()); ) {
var n = t[l.AP]();
n && e(n);
}
},
onComplete: function (e, t) {
for (var n = [], i = 2; i < arguments.length; i++)
n[i - 2] = arguments[i];
e &&
p[l.y5]({ func: e, self: (0, r.b0)(t) ? g.ctx : t, args: n });
},
},
};
function m(e, n) {
var r = null,
i = t.cfg;
if (i && e) {
var o = i[h.Bw];
!o && n && (o = {}),
(i[h.Bw] = o),
(o = t.ref(i, h.Bw)) &&
(!(r = o[e]) && n && (r = {}), (o[e] = r), (r = t.ref(o, e)));
}
return r;
}
return g;
}
function w(e, t, n, i) {
var o = (0, u.e)(t),
s = _(e, o, n, i),
a = s.ctx;
return (
(a[l.$5] = function (e) {
var t = s._next();
return t && t[h.qT](e, a), !t;
}),
(a[l.$o] = function (e, t) {
return (
void 0 === e && (e = null),
(0, r.cy)(e) && (e = C(e, o.cfg, n, t)),
w(e || a[l.uR](), o.cfg, n, t)
);
}),
a
);
}
function S(e, t, n) {
var i = (0, u.e)(t.config),
o = _(e, i, t, n),
s = o.ctx;
return (
(s[l.$5] = function (e) {
var t = o._next();
return t && t[l.M5](s, e), !t;
}),
(s[l.$o] = function (e, n) {
return (
void 0 === e && (e = null),
(0, r.cy)(e) && (e = C(e, i.cfg, t, n)),
S(e || s[l.uR](), t, n)
);
}),
s
);
}
function P(e, t, n) {
var i = (0, u.e)(t.config),
o = _(e, i, t, n).ctx;
return (
(o[l.$5] = function (e) {
return o.iterate(function (t) {
(0, r.Tn)(t[l.HC]) && t[l.HC](o, e);
});
}),
(o[l.$o] = function (e, n) {
return (
void 0 === e && (e = null),
(0, r.cy)(e) && (e = C(e, i.cfg, t, n)),
P(e || o[l.uR](), t, n)
);
}),
o
);
}
function C(e, t, n, s) {
var c = null,
u = !s;
if ((0, r.cy)(e) && e[l.oI] > 0) {
var f = null;
(0, i.I)(e, function (e) {
if ((u || s !== e || (u = !0), u && e && (0, r.Tn)(e[h.qT]))) {
var i = (function (e, t, n) {
var i,
s = null,
c = (0, r.Tn)(e[h.qT]),
u = (0, r.Tn)(e[l.YH]),
f = {
getPlugin: function () {
return e;
},
getNext: function () {
return s;
},
processTelemetry: function (i, o) {
_(
(o =
o ||
(function () {
var i;
return (
e && (0, r.Tn)(e[y]) && (i = e[y]()),
i || (i = w(f, t, n)),
i
);
})()),
function (t) {
if (!e || !c) return !1;
var n = (0, g.Cr)(e);
return (
!n[l.Ik] &&
!n[h.Hr] &&
(u && e[l.YH](s), e[h.qT](i, t), !0)
);
},
"processTelemetry",
function () {
return { item: i };
},
!i.sync
) || o[l.$5](i);
},
unload: function (t, n) {
_(
t,
function () {
var r = !1;
if (e) {
var i = (0, g.Cr)(e),
o = e[h.eT] || i[h.eT];
!e ||
(o && o !== t.core()) ||
i[l.Ik] ||
((i[h.eT] = null),
(i[l.Ik] = !0),
(i[l.tZ] = !1),
e[l.Ik] && !0 === e[l.Ik](t, n) && (r = !0));
}
return r;
},
"unload",
function () {},
n[l.tI]
) || t[l.$5](n);
},
update: function (t, n) {
_(
t,
function () {
var r = !1;
if (e) {
var i = (0, g.Cr)(e),
o = e[h.eT] || i[h.eT];
!e ||
(o && o !== t.core()) ||
i[l.Ik] ||
(e[l.HC] && !0 === e[l.HC](t, n) && (r = !0));
}
return r;
},
"update",
function () {},
!1
) || t[l.$5](n);
},
_id: (i = e
? e[l.Ju] + "-" + e[h.Vo] + "-" + b++
: "Unknown-0-" + b++),
_setNext: function (e) {
s = e;
},
};
function _(t, n, r, a, c) {
var u = !1,
f = e ? e[l.Ju] : m,
g = t[v];
return (
g || (g = t[v] = {}),
t.setNext(s),
e &&
(0, p.r2)(
t[h.eT](),
function () {
return f + ":" + r;
},
function () {
g[i] = !0;
try {
var e = s ? s._id : h.m5;
e && (g[e] = !1), (u = n(t));
} catch (e) {
var a = !s || g[s._id];
a && (u = !0),
(s && a) ||
(0, d.ZP)(
t[l.e4](),
1,
73,
"Plugin [" +
f +
"] failed during " +
r +
" - " +
(0, o.m)(e) +
", run flags: " +
(0, o.m)(g)
);
}
},
a,
c
),
u
);
}
return (0, a.N6)(f);
})(e, t, n);
c || (c = i), f && f._setNext(i), (f = i);
}
});
}
return s && !c ? C([s], t, n) : c;
}
var T = function (e, t, n, r) {
var i = w(e, t, n, r);
(0, f.o$)(this, i, (0, a.cG)(i));
};
},
6535: (e, t, n) => {
"use strict";
n.d(t, { Si: () => v, VN: () => m, Z1: () => g });
var r = n(225),
i = n(6182),
o = n(7292),
s = n(6492),
a = 4294967296,
c = 4294967295,
u = 123456789,
l = 987654321,
d = !1,
f = u,
h = l;
function p() {
try {
var e = 2147483647 & (0, r.f)();
(t = ((Math.random() * a) ^ e) + e) < 0 && (t >>>= 0),
(f = (u + t) & c),
(h = (l - t) & c),
(d = !0);
} catch (e) {}
var t;
}
function g(e) {
return e > 0 ? Math.floor((m() / c) * (e + 1)) >>> 0 : 0;
}
function m(e) {
var t = 0,
n = (0, o.MY)() || (0, o.iN)();
return (
n &&
n.getRandomValues &&
(t = n.getRandomValues(new Uint32Array(1))[0] & c),
0 === t &&
(0, o.lT)() &&
(d || p(),
(t =
(function (e) {
var t =
((((h = (36969 * (65535 & h) + (h >> 16)) & c) << 16) +
(65535 & (f = (18e3 * (65535 & f) + (f >> 16)) & c))) >>>
0) &
c;
return (t >>>= 0);
})() & c)),
0 === t && (t = Math.floor((a * Math.random()) | 0)),
e || (t >>>= 0),
t
);
}
function v(e) {
void 0 === e && (e = 22);
for (var t = m() >>> 0, n = 0, r = s.m5; r[i.oI] < e; )
n++,
(r +=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(
63 & t
)),
(t >>>= 6),
5 === n &&
((t = (((m() << 2) & 4294967295) | (3 & t)) >>> 0), (n = 0));
return r;
}
},
380: (e, t, n) => {
"use strict";
n.d(t, { Cr: () => u, Xc: () => d, pI: () => l, u7: () => f });
var r = n(5439),
i = n(6182),
o = n(4276),
s = n(6492),
a = n(1864),
c = (0, o.T)("plugin");
function u(e) {
return c.get(e, "state", {}, !0);
}
function l(e, t) {
for (var n, o = [], a = null, c = e[i.uR](); c; ) {
var l = c[i.AP]();
if (l) {
a && a[i.YH] && l[s.qT] && a[i.YH](l);
var d = !!(n = u(l))[i.tZ];
l[i.tZ] && (d = l[i.tZ]()),
d || o[i.y5](l),
(a = l),
(c = c[i.uR]());
}
}
(0, r.I)(o, function (r) {
var o = e[s.eT]();
r[i.mE](e.getCfg(), o, t, e[i.uR]()),
(n = u(r)),
r[s.eT] || n[s.eT] || (n[s.eT] = o),
(n[i.tZ] = !0),
delete n[i.Ik];
});
}
function d(e) {
return e.sort(function (e, t) {
var n = 0;
if (t) {
var r = t[s.qT];
e[s.qT] ? (n = r ? e[s.Vo] - t[s.Vo] : 1) : r && (n = -1);
} else n = e ? 1 : -1;
return n;
});
}
function f(e) {
var t = {};
return {
getName: function () {
return t[i.RS];
},
setName: function (n) {
e && e.setName(n), (t[i.RS] = n);
},
getTraceId: function () {
return t[i.P5];
},
setTraceId: function (n) {
e && e.setTraceId(n), (0, a.hX)(n) && (t[i.P5] = n);
},
getSpanId: function () {
return t[i.wi];
},
setSpanId: function (n) {
e && e.setSpanId(n), (0, a.wN)(n) && (t[i.wi] = n);
},
getTraceFlags: function () {
return t[i.Rr];
},
setTraceFlags: function (n) {
e && e.setTraceFlags(n), (t[i.Rr] = n);
},
};
}
},
836: (e, t, n) => {
"use strict";
n.d(t, { P: () => a });
var r = n(5439),
i = n(8693),
o = n(6182),
s = n(3775);
function a() {
var e = [];
return {
add: function (t) {
t && e[o.y5](t);
},
run: function (t, n) {
(0, r.I)(e, function (e) {
try {
e(t, n);
} catch (e) {
(0,
s.ZP)(t[o.e4](), 2, 73, "Unexpected error calling unload handler - " + (0, i.m)(e));
}
}),
(e = []);
},
};
}
},
8969: (e, t, n) => {
"use strict";
n.d(t, { w: () => a });
var r = n(5439),
i = n(8693),
o = n(1187),
s = n(3775);
function a() {
var e = [];
return {
run: function (t) {
var n = e;
(e = []),
(0, r.I)(n, function (e) {
try {
(e.rm || e.remove).call(e);
} catch (e) {
(0, s.ZP)(t, 2, 73, "Unloading:" + (0, i.m)(e));
}
});
},
add: function (t) {
t && (0, o.Y)(e, t);
},
};
}
},
1864: (e, t, n) => {
"use strict";
n.d(t, {
L0: () => T,
N7: () => C,
ZI: () => _,
ef: () => x,
hX: () => w,
mJ: () => P,
wN: () => S,
wk: () => b,
});
var r = n(3178),
i = n(6668),
o = n(8993),
s = n(6182),
a = n(9882),
c = n(7292),
u = n(6492),
l =
/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,
d = "00",
f = "ff",
h = "00000000000000000000000000000000",
p = "0000000000000000",
g = 1;
function m(e, t, n) {
return !(!e || e[s.oI] !== t || e === n || !e.match(/^[\da-f]*$/i));
}
function v(e, t, n) {
return m(e, t) ? e : n;
}
function y(e) {
(isNaN(e) || e < 0 || e > 255) && (e = 1);
for (var t = e.toString(16); t[s.oI] < 2; ) t = "0" + t;
return t;
}
function b(e, t, n, i) {
var o;
return (
((o = {})[s.s] = m(i, 2, f) ? i : d),
(o[s.P5] = w(e) ? e : (0, a.cL)()),
(o[s.wi] = S(t) ? t : (0, r.ZW)((0, a.cL)(), 16)),
(o.traceFlags = n >= 0 && n <= 255 ? n : 1),
o
);
}
function _(e, t) {
var n;
if (!e) return null;
if (
((0, i.cy)(e) && (e = e[0] || ""),
!e || !(0, i.Kg)(e) || e[s.oI] > 8192)
)
return null;
if (-1 !== e.indexOf(",")) {
var r = e[s.sY](",");
e = r[t > 0 && r[s.oI] > t ? t : 0];
}
var a = l.exec((0, o.EH)(e));
return a && a[1] !== f && a[2] !== h && a[3] !== p
? (((n = {
version: (a[1] || u.m5)[s.OL](),
traceId: (a[2] || u.m5)[s.OL](),
spanId: (a[3] || u.m5)[s.OL](),
})[s.Rr] = parseInt(a[4], 16)),
n)
: null;
}
function w(e) {
return m(e, 32, h);
}
function S(e) {
return m(e, 16, p);
}
function P(e) {
return !!(
e &&
m(e[s.s], 2, f) &&
m(e[s.P5], 32, h) &&
m(e[s.wi], 16, p) &&
m(y(e[s.Rr]), 2)
);
}
function C(e) {
return !!P(e) && (e[s.Rr] & g) === g;
}
function T(e) {
if (e) {
var t = y(e[s.Rr]);
m(t, 2) || (t = "01");
var n = e[s.s] || d;
return (
"00" !== n && "ff" !== n && (n = d),
""
.concat(n.toLowerCase(), "-")
.concat(v(e.traceId, 32, h).toLowerCase(), "-")
.concat(v(e.spanId, 16, p).toLowerCase(), "-")
.concat(t.toLowerCase())
);
}
return "";
}
function x(e) {
var t = "traceparent",
n = _((0, c.$Z)(t), e);
return n || (n = _((0, c.Iu)(t), e)), n;
}
},
6182: (e, t, n) => {
"use strict";
n.d(t, {
$5: () => T,
$o: () => F,
AP: () => w,
Bl: () => A,
Di: () => j,
HC: () => U,
Ic: () => g,
Ik: () => L,
JQ: () => i,
JR: () => N,
Ju: () => b,
K0: () => m,
M5: () => R,
OL: () => r,
O_: () => ee,
P5: () => re,
QM: () => Z,
RF: () => O,
RS: () => P,
Rr: () => oe,
Ru: () => ne,
TP: () => I,
Uw: () => f,
W7: () => G,
XM: () => k,
XW: () => s,
YH: () => W,
Yo: () => Q,
Zu: () => Y,
_w: () => v,
by: () => D,
e4: () => $,
e_: () => te,
fA: () => C,
h0: () => l,
h4: () => S,
ih: () => u,
mE: () => y,
oI: () => o,
on: () => c,
pM: () => V,
ps: () => x,
re: () => J,
s: () => M,
sY: () => H,
sx: () => X,
tI: () => K,
tX: () => z,
tZ: () => _,
tn: () => B,
uR: () => q,
vR: () => E,
wi: () => ie,
x6: () => d,
y5: () => p,
y9: () => h,
zs: () => a,
});
var r = "toLowerCase",
i = "blkVal",
o = "length",
s = "rdOnly",
a = "notify",
c = "warnToConsole",
u = "throwInternal",
l = "setDf",
d = "watch",
f = "logger",
h = "apply",
p = "push",
g = "splice",
m = "hdlr",
v = "cancel",
y = "initialize",
b = "identifier",
_ = "isInitialized",
w = "getPlugin",
S = "pollInternalLogs",
P = "name",
C = "time",
T = "processNext",
x = "getProcessTelContext",
O = "getNotifyMgr",
E = "addNotificationListener",
I = "removeNotificationListener",
k = "enabled",
j = "stopPollingInternalLogs",
R = "unload",
D = "onComplete",
M = "version",
A = "loggingLevelConsole",
F = "createNew",
L = "teardown",
N = "messageId",
V = "message",
K = "isAsync",
$ = "diagLog",
B = "_doTeardown",
U = "update",
q = "getNext",
W = "setNextPlugin",
z = "userAgent",
H = "split",
J = "nodeType",
G = "replace",
X = "logInternalMessage",
Z = "type",
Q = "handler",
Y = "isChildEvt",
ee = "getCtx",
te = "setCtx",
ne = "complete",
re = "traceId",
ie = "spanId",
oe = "traceFlags";
},
5664: (e, t, n) => {
"use strict";
n.d(t, {
Wy: () => c,
_1: () => i,
bA: () => o,
hW: () => r,
s6: () => a,
vR: () => s,
});
var r = "function",
i = "object",
o = "undefined",
s = "prototype",
a = Object,
c = a[s];
},
659: (e, t, n) => {
"use strict";
n.d(t, { Im: () => u, qU: () => d, vz: () => f });
var r = n(3076),
i = n(1324),
o = n(3517),
s = n(411),
a = n(5664),
c =
(((0, r.mS)() || {}).Symbol,
((0, r.mS)() || {}).Reflect,
"hasOwnProperty"),
u =
i.vE ||
function (e) {
for (var t, n = 1, r = arguments.length; n < r; n++)
for (var i in (t = arguments[n]))
a.Wy[c].call(t, i) && (e[i] = t[i]);
return e;
},
l = function (e, t) {
return (
(l =
a.s6.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]);
}),
l(e, t)
);
};
function d(e, t) {
function n() {
this.constructor = e;
}
typeof t !== a.hW &&
null !== t &&
(0, o.zk)(
"Class extends value " +
String(t) +
" is not a constructor or null"
),
l(e, t),
(e[a.vR] =
null === t ? (0, s.s)(t) : ((n[a.vR] = t[a.vR]), new n()));
}
function f(e, t) {
for (var n = 0, r = t.length, i = e.length; n < r; n++, i++)
e[i] = t[n];
return e;
}
},
1380: (e, t, n) => {
"use strict";
n.r(t),
n.d(t, {
AppInsightsCore: () => vt._,
ApplicationInsights: () => Pt,
Sender: () => gt,
SeverityLevel: () => wt.O,
arrForEach: () => T.I,
isNullOrUndefined: () => E.hX,
proxyFunctions: () => b.o$,
throwError: () => yt.$8,
});
var r = n(8279),
i = n(659),
o = n(5025),
s = n(3072),
a = n(2445),
c = n(1448),
u = n(4164),
l = n(5397),
d = n(5014),
f = n(1365),
h = n(740),
p = n(4658),
g = n(2318),
m = n(2910),
v = n(2475),
y = n(3775),
b = n(3673),
_ = n(8693),
w = n(6149),
S = n(4276),
P = n(9622),
C = n(2317),
T = n(5439),
x = n(7292),
O = n(4013),
E = n(6668),
I = n(3076),
k = n(1324),
j = n(225),
R = n(8257),
D = n(636),
M = n(4292),
A = n(6336),
F = n(6874),
L = n(1575),
N = n(7975),
V = n(1062),
K = n(7358),
$ = n(9018),
B = "duration",
U = "tags",
q = "deviceType",
W = "data",
z = "name",
H = "traceID",
J = "length",
G = "stringify",
X = "measurements",
Z = "dataType",
Q = "envelopeType",
Y = "toString",
ee = "onLine",
te = "isOnline",
ne = "_get",
re = "enqueue",
ie = "count",
oe = "eventsLimitInMem",
se = "push",
ae = "emitLineDelimitedJson",
ce = "clear",
ue = "batchPayloads",
le = "createNew",
de = "markAsSent",
fe = "clearSent",
he = "bufferOverride",
pe = "BUFFER_KEY",
ge = "SENT_BUFFER_KEY",
me = "MAX_BUFFER_SIZE",
ve = "sendPOST",
ye = "triggerSend",
be = "diagLog",
_e = "_sender",
we = "customHeaders",
Se = "maxBatchSizeInBytes",
Pe = "onunloadDisableBeacon",
Ce = "isBeaconApiDisabled",
Te = "alwaysUseXhrOverride",
xe = "enableSessionStorageBuffer",
Oe = "_buffer",
Ee = "onunloadDisableFetch",
Ie = "instrumentationKey",
ke = "convertUndefined",
je = "maxBatchInterval",
Re = "baseType",
De = "sampleRate",
Me = "_onError",
Ae = "_onPartialSuccess",
Fe = "_onSuccess",
Le = "itemsAccepted",
Ne = "oriPayload",
Ve = "setRequestHeader",
Ke = "eventsSendRequest",
$e = "getSamplingScore",
Be = "baseType",
Ue = "baseData",
qe = "properties",
We = "true";
function ze(e, t, n) {
return (0, b.KY)(e, t, n, E.zz);
}
function He(e, t, n) {
(0, E.hX)(e) ||
(0, $.z)(e, function (e, r) {
(0, E.Et)(r)
? (n[e] = r)
: (0, E.Kg)(r)
? (t[e] = r)
: (0, x.Z)() && (t[e] = (0, x.hm)()[G](r));
});
}
function Je(e, t) {
(0, E.hX)(e) ||
(0, $.z)(e, function (n, r) {
e[n] = r || t;
});
}
function Ge(e, t, n, r) {
var s = new V.L(e, r, t);
ze(s, "sampleRate", n[o.tU]),
(n[Ue] || {}).startTime && (s.time = (0, b._u)(n[Ue].startTime)),
(s.iKey = n.iKey);
var a = n.iKey.replace(/-/g, "");
return (
(s[z] = s[z].replace("{0}", a)),
(function (e, t, n) {
var r = (n[U] = n[U] || {}),
o = (t.ext = t.ext || {}),
s = (t[U] = t[U] || []),
a = o.user;
a &&
(ze(r, L.O.userAuthUserId, a.authId),
ze(r, L.O.userId, a.id || a.localId));
var c = o.app;
c && ze(r, L.O.sessionId, c.sesId);
var u = o.device;
u &&
(ze(r, L.O.deviceId, u.id || u.localId),
ze(r, L.O[q], u.deviceClass),
ze(r, L.O.deviceIp, u.ip),
ze(r, L.O.deviceModel, u.model),
ze(r, L.O[q], u[q]));
var l = t.ext.web;
if (l) {
ze(r, L.O.deviceLanguage, l.browserLang),
ze(r, L.O.deviceBrowserVersion, l.browserVer),
ze(r, L.O.deviceBrowser, l.browser);
var d = (n[W] = n[W] || {}),
f = (d[Ue] = d[Ue] || {}),
h = (f[qe] = f[qe] || {});
ze(h, "domain", l.domain),
ze(h, "isManual", l.isManual ? We : null),
ze(h, "screenRes", l.screenRes),
ze(h, "userConsent", l.userConsent ? We : null);
}
var p = o.os;
p && ze(r, L.O.deviceOS, p[z]);
var g = o.trace;
g &&
(ze(r, L.O.operationParentId, g.parentID),
ze(r, L.O.operationName, (0, N.Rr)(e, g[z])),
ze(r, L.O.operationId, g[H]));
for (var m = {}, v = s[J] - 1; v >= 0; v--) {
var y = s[v];
(0, $.z)(y, function (e, t) {
m[e] = t;
}),
s.splice(v, 1);
}
(0, $.z)(s, function (e, t) {
m[e] = t;
});
var _ = (0, i.Im)((0, i.Im)({}, r), m);
_[L.O.internalSdkVersion] ||
(_[L.O.internalSdkVersion] = (0, N.Rr)(
e,
"javascript:".concat(Ze.Version),
64
)),
(n[U] = (0, b.hW)(_));
})(e, n, s),
(n[U] = n[U] || []),
(0, b.hW)(s)
);
}
function Xe(e, t) {
(0, E.hX)(t[Ue]) &&
(0, y.ZP)(e, 1, 46, "telemetryItem.baseData cannot be null.");
}
var Ze = { Version: "3.0.4" };
function Qe(e, t, n) {
Xe(e, t);
var r = {},
i = {};
t[Be] !== s.J[Z] && (r.baseTypeSource = t[Be]),
t[Be] === s.J[Z]
? ((r = t[Ue][qe] || {}), (i = t[Ue][X] || {}))
: t[Ue] && He(t[Ue], r, i),
He(t[W], r, i),
(0, E.hX)(n) || Je(r, n);
var o = t[Ue][z],
a = new s.J(e, o, r, i),
c = new K.B(s.J[Z], a);
return Ge(e, s.J[Q], t, c);
}
function Ye(e, t) {
(0, w.ML)(e, null, null, t);
}
var et,
tt,
nt = n(6832),
rt = (function () {
function e(t, n) {
var i = [],
o = !1;
(this[ne] = function () {
return i;
}),
(this._set = function (e) {
return (i = e);
}),
(0, r.A)(e, this, function (e) {
(e[re] = function (r) {
e[ie]() >= n[oe]
? o ||
((0, y.ZP)(
t,
2,
105,
"Maximum in-memory buffer size reached: " + e[ie](),
!0
),
(o = !0))
: i[se](r);
}),
(e[ie] = function () {
return i[J];
}),
(e.size = function () {
for (var e = i[J], t = 0; t < i[J]; t++) e += i[t][J];
return n[ae] || (e += 2), e;
}),
(e[ce] = function () {
(i = []), (o = !1);
}),
(e.getItems = function () {
return i.slice(0);
}),
(e[ue] = function (e) {
return e && e[J] > 0
? n[ae]
? e.join("\n")
: "[" + e.join(",") + "]"
: null;
}),
(e[le] = function (e, n, r) {
var o = i.slice(0);
(e = e || t), (n = n || {});
var s = r ? new ot(e, n) : new it(e, n);
return (
(0, T.I)(o, function (e) {
s[re](e);
}),
s
);
});
});
}
return (e.__ieDyn = 1), e;
})(),
it = (function (e) {
function t(n, i) {
var o = e.call(this, n, i) || this;
return (
(0, r.A)(t, o, function (e, t) {
(e[de] = function (e) {
t[ce]();
}),
(e[fe] = function (e) {});
}),
o
);
}
return (0, i.qU)(t, e), (t.__ieDyn = 1), t;
})(rt),
ot = (function (e) {
function t(n, i) {
var o = e.call(this, n, i) || this,
s = !1,
a = null == i ? void 0 : i.namePrefix,
c = i[he] || { getItem: p.vH, setItem: p.Dt },
u = c.getItem,
l = c.setItem;
return (
(0, r.A)(t, o, function (e, r) {
var i = f(t[pe]),
o = f(t[ge]),
c = e._set(i.concat(o));
function d(e, t) {
var n = [];
return (
(0, T.I)(t, function (t) {
(0, E.Tn)(t) || -1 !== (0, nt.r)(e, t) || n[se](t);
}),
n
);
}
function f(e) {
var t = e;
try {
var r = u(n, (t = a ? a + "_" + t : t));
if (r) {
var i = (0, x.hm)().parse(r);
if (
((0, E.Kg)(i) && (i = (0, x.hm)().parse(i)),
i && (0, E.cy)(i))
)
return i;
}
} catch (e) {
(0,
y.ZP)(n, 1, 42, " storage key: " + t + ", " + (0, b.lL)(e), { exception: (0, _.m)(e) });
}
return [];
}
function h(e, t) {
var r = e;
try {
r = a ? a + "_" + r : r;
var i = JSON[G](t);
l(n, r, i);
} catch (e) {
l(n, r, JSON[G]([])),
(0, y.ZP)(
n,
2,
41,
" storage key: " +
r +
", " +
(0, b.lL)(e) +
". Buffer cleared",
{ exception: (0, _.m)(e) }
);
}
}
c[J] > t[me] && (c[J] = t[me]),
h(t[ge], []),
h(t[pe], c),
(e[re] = function (i) {
e[ie]() >= t[me]
? s ||
((0, y.ZP)(
n,
2,
67,
"Maximum buffer size reached: " + e[ie](),
!0
),
(s = !0))
: (r[re](i), h(t.BUFFER_KEY, e[ne]()));
}),
(e[ce] = function () {
r[ce](), h(t.BUFFER_KEY, e[ne]()), h(t[ge], []), (s = !1);
}),
(e[de] = function (r) {
h(t[pe], e._set(d(r, e[ne]())));
var i = f(t[ge]);
i instanceof Array &&
r instanceof Array &&
((i = i.concat(r))[J] > t[me] &&
((0, y.ZP)(
n,
1,
67,
"Sent buffer reached its maximum size: " + i[J],
!0
),
(i[J] = t[me])),
h(t[ge], i));
}),
(e[fe] = function (e) {
var n = f(t[ge]);
(n = d(e, n)), h(t[ge], n);
}),
(e[le] = function (r, i, o) {
o = !!o;
var s = e[ne]().slice(0),
a = f(t[ge]).slice(0);
(r = r || n), (i = i || {}), e[ce]();
var c = o ? new t(r, i) : new it(r, i);
return (
(0, T.I)(s, function (e) {
c[re](e);
}),
o && c[de](a),
c
);
});
}),
o
);
}
return (
(0, i.qU)(t, e),
(t.BUFFER_KEY = "AI_buffer"),
(t.SENT_BUFFER_KEY = "AI_sentBuffer"),
(t.MAX_BUFFER_SIZE = 2e3),
t
);
})(rt),
st = (function () {
function e(t) {
(0, r.A)(e, this, function (e) {
function n(e, o) {
var s = "__aiCircularRefCheck",
a = {};
if (!e)
return (
(0, y.ZP)(
t,
1,
48,
"cannot serialize object because it is null or undefined",
{ name: o },
!0
),
a
);
if (e[s])
return (
(0, y.ZP)(
t,
2,
50,
"Circular reference detected while serializing object",
{ name: o },
!0
),
a
);
if (!e.aiDataContract) {
if ("measurements" === o) a = i(e, "number", o);
else if ("properties" === o) a = i(e, "string", o);
else if ("tags" === o) a = i(e, "string", o);
else if ((0, E.cy)(e)) a = r(e, o);
else {
(0, y.ZP)(
t,
2,
49,
"Attempting to serialize an object which does not implement ISerializable",
{ name: o },
!0
);
try {
(0, x.hm)()[G](e), (a = e);
} catch (e) {
(0, y.ZP)(
t,
1,
48,
e && (0, E.Tn)(e[Y])
? e[Y]()
: "Error serializing object",
null,
!0
);
}
}
return a;
}
return (
(e[s] = !0),
(0, $.z)(e.aiDataContract, function (i, s) {
var c = (0, E.Tn)(s) ? 1 & s() : 1 & s,
u = (0, E.Tn)(s) ? 4 & s() : 4 & s,
l = 2 & s,
d = void 0 !== e[i],
f = (0, E.Gv)(e[i]) && null !== e[i];
if (!c || d || l) {
if (!u) {
var h;
void 0 !==
(h = f ? (l ? r(e[i], i) : n(e[i], i)) : e[i]) &&
(a[i] = h);
}
} else (0, y.ZP)(t, 1, 24, "Missing required field specification. The field is required but not present on source", { field: i, name: o });
}),
delete e[s],
a
);
}
function r(e, r) {
var i;
if (e)
if ((0, E.cy)(e)) {
i = [];
for (var o = 0; o < e[J]; o++) {
var s = n(e[o], r + "[" + o + "]");
i[se](s);
}
} else
(0, y.ZP)(
t,
1,
54,
"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 = {}),
(0, $.z)(e, function (e, o) {
if ("string" === n)
void 0 === o
? (i[e] = "undefined")
: null === o
? (i[e] = "null")
: o[Y]
? (i[e] = o[Y]())
: (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 s = parseFloat(o);
isNaN(s) ? (i[e] = "NaN") : (i[e] = s);
}
else
(i[e] =
"invalid field: " + r + " is of unknown type."),
(0, y.ZP)(t, 1, i[e], null, !0);
})),
i
);
}
e.serialize = function (e) {
var r = n(e, "root");
try {
return (0, x.hm)()[G](r);
} catch (e) {
(0, y.ZP)(
t,
1,
48,
e && (0, E.Tn)(e[Y])
? e[Y]()
: "Error serializing object",
null,
!0
);
}
};
});
}
return (e.__ieDyn = 1), e;
})(),
at = n(8596),
ct = (function () {
function e() {}
return (
(e.prototype.getHashCodeScore = function (t) {
return (this.getHashCode(t) / e.INT_MAX_VALUE) * 100;
}),
(e.prototype.getHashCode = function (e) {
if ("" === e) return 0;
for (; e[J] < 8; ) e = e.concat(e);
for (var t = 5381, n = 0; n < e[J]; ++n)
(t = (t << 5) + t + e.charCodeAt(n)), (t |= 0);
return Math.abs(t);
}),
(e.INT_MAX_VALUE = 2147483647),
e
);
})(),
ut = function () {
var e = new ct(),
t = new at.o();
this[$e] = function (n) {
return n[U] && n[U][t.userId]
? e.getHashCodeScore(n[U][t.userId])
: n.ext && n.ext.user && n.ext.user.id
? e.getHashCodeScore(n.ext.user.id)
: n[U] && n[U][t.operationId]
? e.getHashCodeScore(n[U][t.operationId])
: n.ext && n.ext.telemetryTrace && n.ext.telemetryTrace[H]
? e.getHashCodeScore(n.ext.telemetryTrace[H])
: 100 * Math.random();
};
},
lt = (function () {
function e(e, t) {
this.INT_MAX_VALUE = 2147483647;
var n = t || (0, y.y0)(null);
(e > 100 || e < 0) &&
(n.throwInternal(
2,
58,
"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",
{ samplingRate: e },
!0
),
(e = 100)),
(this[De] = e),
(this.samplingScoreGenerator = new ut());
}
return (
(e.prototype.isSampledIn = function (e) {
var t = this[De];
return (
null == t ||
t >= 100 ||
e.baseType === d.J[Z] ||
this.samplingScoreGenerator[$e](e) < t
);
}),
e
);
})(),
dt = void 0;
function ft(e) {
try {
return e.responseText;
} catch (e) {}
return null;
}
var ht = (0, k.ZH)(
(((et = { endpointUrl: (0, v.Lx)(E.zz, o._G + o.wc) })[ae] = (0,
v.DD)()),
(et[je] = 15e3),
(et[Se] = 102400),
(et.disableTelemetry = (0, v.DD)()),
(et[xe] = (0, v.DD)(!0)),
(et.isRetryDisabled = (0, v.DD)()),
(et[Ce] = (0, v.DD)(!0)),
(et.disableXhr = (0, v.DD)()),
(et[Ee] = (0, v.DD)()),
(et[Pe] = (0, v.DD)()),
(et[Ie] = dt),
(et.namePrefix = dt),
(et.samplingPercentage = (0, v.Lx)(function (e) {
return !isNaN(e) && e > 0 && e <= 100;
}, 100)),
(et[we] = dt),
(et[ke] = dt),
(et[oe] = 1e4),
(et[he] = !1),
(et.httpXHROverride = {
isVal: function (e) {
return e && e[ve];
},
v: dt,
}),
(et[Te] = (0, v.DD)()),
et)
),
pt =
(((tt = {})[s.J.dataType] = Qe),
(tt[a.C.dataType] = function (e, t, n) {
Xe(e, t);
var r = t[Ue].message,
i = t[Ue].severityLevel,
o = t[Ue][qe] || {},
s = t[Ue][X] || {};
He(t[W], o, s), (0, E.hX)(n) || Je(o, n);
var c = new a.C(e, r, i, o, s),
u = new K.B(a.C[Z], c);
return Ge(e, a.C[Q], t, u);
}),
(tt[c.h.dataType] = function (e, t, n) {
var r;
Xe(e, t);
var i = t[Ue];
(0, E.hX)(i) || (0, E.hX)(i[qe]) || (0, E.hX)(i[qe][B])
? (0, E.hX)(t[W]) ||
(0, E.hX)(t[W][B]) ||
((r = t[W][B]), delete t[W][B])
: ((r = i[qe][B]), delete i[qe][B]);
var o,
s = t[Ue];
((t.ext || {}).trace || {})[H] && (o = t.ext.trace[H]);
var a = s.id || o,
u = s[z],
l = s.uri,
d = s[qe] || {},
f = s[X] || {};
if (
((0, E.hX)(s.refUri) || (d.refUri = s.refUri),
(0, E.hX)(s.pageType) || (d.pageType = s.pageType),
(0, E.hX)(s.isLoggedIn) || (d.isLoggedIn = s.isLoggedIn[Y]()),
!(0, E.hX)(s[qe]))
) {
var h = s[qe];
(0, $.z)(h, function (e, t) {
d[e] = t;
});
}
He(t[W], d, f), (0, E.hX)(n) || Je(d, n);
var p = new c.h(e, u, l, r, d, f, a),
g = new K.B(c.h[Z], p);
return Ge(e, c.h[Q], t, g);
}),
(tt[u.H.dataType] = function (e, t, n) {
Xe(e, t);
var r = t[Ue],
i = r[z],
o = r.uri || r.url,
s = r[qe] || {},
a = r[X] || {};
He(t[W], s, a), (0, E.hX)(n) || Je(s, n);
var c = new u.H(e, i, o, void 0, s, a, r),
l = new K.B(u.H[Z], c);
return Ge(e, u.H[Q], t, l);
}),
(tt[l.WJ.dataType] = function (e, t, n) {
Xe(e, t);
var r = t[Ue][X] || {},
i = t[Ue][qe] || {};
He(t[W], i, r), (0, E.hX)(n) || Je(i, n);
var o = t[Ue],
s = l.WJ.CreateFromInterface(e, o, i, r),
a = new K.B(l.WJ[Z], s);
return Ge(e, l.WJ[Q], t, a);
}),
(tt[d.J.dataType] = function (e, t, n) {
Xe(e, t);
var r = t[Ue],
i = r[qe] || {},
o = r[X] || {};
He(t[W], i, o), (0, E.hX)(n) || Je(i, n);
var s = new d.J(
e,
r[z],
r.average,
r.sampleCount,
r.min,
r.max,
r.stdDev,
i,
o
),
a = new K.B(d.J[Z], s);
return Ge(e, d.J[Q], t, a);
}),
(tt[f.A.dataType] = function (e, t, n) {
Xe(e, t);
var r = t[Ue][X] || {},
i = t[Ue][qe] || {};
He(t[W], i, r), (0, E.hX)(n) || Je(i, n);
var s = t[Ue];
if ((0, E.hX)(s))
return (0, y.OG)(e, "Invalid input for dependency data"), null;
var a = s[qe] && s[qe][o.ym] ? s[qe][o.ym] : "GET",
c = new f.A(
e,
s.id,
s.target,
s[z],
s[B],
s.success,
s.responseCode,
a,
s.type,
s.correlationContext,
i,
r
),
u = new K.B(f.A[Z], c);
return Ge(e, f.A[Q], t, u);
}),
tt),
gt = (function (e) {
function t() {
var n,
i,
s,
a,
c,
u,
l,
d = e.call(this) || this;
(d.priority = 1001), (d.identifier = h.BreezeChannelIdentifier);
var f,
v,
R,
L,
N,
V,
K,
$,
B,
q,
z,
H,
G,
X,
Z,
Q,
Y,
ne,
oe,
ae,
pe,
ge = 0;
return (
(0, r.A)(t, d, function (e, r) {
function h(e, t) {
for (
var n, r = null, i = null, o = 0;
null == i && o < e[J];
)
(r = e[o]),
oe || 1 !== r
? 2 === r && (0, x.R7)(t)
? (i = Ue)
: (0, x.Uf)() && 3 === r && (i = Xe)
: (0, x.PV)()
? (i = pt)
: (0, x.xk)() && (i = Ze),
o++;
return i ? (((n = {})[ve] = i), n) : null;
}
function me(t, n, r, i) {
200 === n && t && e._onSuccess(t, t[J]), i && e[Me](t, i);
}
function $e(t, n, r) {
var i = Be(n),
o = t && t[ve];
return o && i
? (e._buffer[de](n),
o(
i,
function (e, t, r) {
return me(n, e, 0, r);
},
!r
))
: null;
}
function Be(t) {
var n;
if ((0, E.cy)(t) && t[J] > 0) {
var r = e._buffer[ue](t);
return (
((n = {})[W] = r),
(n.urlString = L),
(n.headers = l),
(n.disableXhrSync = oe),
(n.disableFetchKeepAlive = !ae),
(n[Ne] = t),
n
);
}
return null;
}
function Ue(e, t, n) {
return et(e, t, !1);
}
function qe(t) {
var n = t ? t[J] : 0;
return (
e[Oe].size() + n > V &&
((v && !v[te]()) || e[ye](!0, null, 10), !0)
);
}
function We(t, r, i, o, s, a) {
var c = null;
if (
(e._appId ||
((c = tt(a)) && c.appId && (e._appId = c.appId)),
(t < 200 || t >= 300) && 0 !== t)
) {
if ((301 === t || 307 === t || 308 === t) && !ze(i))
return void e[Me](r, s);
!H && ct(t)
? (nt(r),
(0, y.ZP)(
e[be](),
2,
40,
". Response code " +
t +
". Will retry to send " +
r[J] +
" items."
))
: e[Me](r, s);
} else v && !v[te]() ? H || (nt(r, 10), (0, y.ZP)(e[be](), 2, 40, ". Offline - Response Code: ".concat(t, ". Offline status: ").concat(!v.isOnline(), ". Will retry to send ").concat(r.length, " items."))) : (ze(i), 206 === t ? (c || (c = tt(a)), c && !H ? e[Ae](r, c) : e[Me](r, s)) : ((n = 0), e[Fe](r, o)));
}
function ze(e) {
return !(
u >= 10 ||
(0, E.hX)(e) ||
"" === e ||
e === L ||
((L = e), ++u, 0)
);
}
function He(e, t, n, r) {
try {
e(t, n, r);
} catch (e) {}
}
function Je(e, t) {
f
? f(e, !1)
: Xe(Be(e), function (t, n, r) {
return me(e, t, 0, r);
});
}
function Ge(e, t) {
var n = (0, I.w3)(),
r = L,
i = new Blob([e], { type: "text/plain;charset=UTF-8" }),
o = n.sendBeacon(r, i);
return o && t(200, {}, e), o;
}
function Xe(t, n, r) {
var i = t,
o = i && i[W];
if ((0, E.Kg)(o) && o[J] > 0 && !Ge(o, n)) {
var s = [];
if (i[Ne][J] > 0)
for (var a = 0; a < o[J]; a++) {
var c = t[a];
Ge(e._buffer[ue](c), n) || s[se](c);
}
s[J] > 0 &&
(pe && pe(s, !0),
(0, y.ZP)(
e[be](),
2,
40,
". Failed to send telemetry with Beacon API, retried with normal sender."
));
}
}
function Ze(t, n, r) {
var i,
s,
a,
c = t,
u = new XMLHttpRequest(),
d = L;
try {
u[o.xF] = !0;
} catch (e) {}
return (
u.open("POST", d, !r),
u[Ve]("Content-type", "application/json"),
(0, g.Qu)(d) && u[Ve](m.a[6], m.a[7]),
(0, T.I)((0, k.cG)(l), function (e) {
u[Ve](e, l[e]);
}),
(u.onreadystatechange = function () {
var t = c[Ne];
e._xhrReadyStateChange(u, t, t[J]),
4 === u.readyState && s && s(!0);
}),
(u.onerror = function (e) {
He(n, 400, {}, ut(u)), a && a(e);
}),
!r &&
Y &&
(i = (0, D.Qo)(function (e, t) {
(s = e), (a = t);
})),
u.send(t[W]),
i
);
}
function Qe(t, n) {
var r = function (e, n, r) {
return me(t, e, 0, r);
};
if ((0, E.cy)(t)) {
for (var i = t[J], o = 0; o < t[J]; o++) i += t[o][J];
var s = Be(t);
ge + i <= 65e3
? et(s, r, !0)
: (0, x.Uf)()
? Xe(s, r)
: (pe && pe(t, !0),
(0, y.ZP)(
e[be](),
2,
40,
". Failed to send telemetry with Beacon API, retried with xhrSender."
));
}
}
function et(e, t, n) {
var r,
i,
s,
a,
c = L,
u = e,
d = u[W],
f = new Blob([d], { type: "application/json" }),
h = new Headers(),
p = d[J],
v = !1,
y = !1;
(0, g.Qu)(c) && h.append(m.a[6], m.a[7]),
(0, T.I)((0, k.cG)(l), function (e) {
h.append(e, l[e]);
});
var b =
(((r = { method: "POST", headers: h, body: f })[o.xF] =
!0),
r);
n && ((b.keepalive = !0), (v = !0), (ge += p));
var w = new Request(c, b);
try {
w[o.xF] = !0;
} catch (e) {}
!n &&
Y &&
(i = (0, D.Qo)(function (e, t) {
(s = e), (a = t);
}));
try {
(0, M.Dv)(fetch(w), function (e) {
if ((n && ((ge -= p), (p = 0)), !y))
if (((y = !0), e.rejected))
He(t, 400, {}, e.reason && e.reason.message),
a && a(e.reason);
else {
var r = e.value;
r.ok
? (0, M.Dv)(r.text(), function (e) {
var t = u[Ne];
We(
r.status,
t,
r.url,
t[J],
r.statusText,
e.value || ""
),
s && s(!0);
})
: (He(t, 400, {}, r.statusText), s && s(!1));
}
});
} catch (e) {
y || (He(t, 400, {}, (0, _.m)(e)), a && a(e));
}
return v && !y && ((y = !0), He(t, 200, {}), s && s(!0)), i;
}
function tt(t) {
try {
if (t && "" !== t) {
var n = (0, x.hm)().parse(t);
if (
n &&
n.itemsReceived &&
n.itemsReceived >= n[Le] &&
n.itemsReceived - n.itemsAccepted === n.errors[J]
)
return n;
}
} catch (n) {
(0,
y.ZP)(e[be](), 1, 43, "Cannot parse the response. " + (0, b.lL)(n), { response: t });
}
return null;
}
function nt(t, r) {
if ((void 0 === r && (r = 1), t && 0 !== t[J])) {
var o = e[Oe];
o[fe](t), n++;
for (var s = 0, a = t; s < a.length; s++) {
var c = a[s];
o[re](c);
}
!(function (e) {
var t;
if (n <= 1) t = 10;
else {
var r = (Math.pow(2, n) - 1) / 2,
o = Math.floor(Math.random() * r * 10) + 1;
(o *= e), (t = Math.max(Math.min(o, 3600), 10));
}
var s = (0, j.f)() + 1e3 * t;
i = s;
})(r),
rt();
}
}
function rt() {
if (!a && !s) {
var t = i ? Math.max(0, i - (0, j.f)()) : 0,
n = Math.max(G, t);
a = (0, F.dR)(function () {
(a = null), e[ye](!0, null, 1);
}, n);
}
}
function at() {
a && a.cancel(), (a = null), (i = null);
}
function ct(e) {
return (
401 === e ||
403 === e ||
408 === e ||
429 === e ||
500 === e ||
502 === e ||
503 === e ||
504 === e
);
}
function ut(e, t) {
return e
? "XMLHttpRequest,Status:" +
e.status +
",Response:" +
ft(e) || 0
: t;
}
function pt(t, n, r) {
var i = t,
o = (0, I.zk)(),
s = new XDomainRequest(),
a = i[W];
(s.onload = function () {
var t = i[Ne];
e._xdrOnLoad(s, t);
}),
(s.onerror = function () {
He(n, 400, {}, gt(s));
});
var c = (o && o.location && o.location.protocol) || "";
if (0 !== L.lastIndexOf(c, 0))
return (
(0, y.ZP)(
e[be](),
2,
40,
". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."
),
void e._buffer[ce]()
);
var u = L.replace(/^(https?:)/, "");
s.open("POST", u), s.send(a);
}
function gt(e, t) {
return e ? "XDomainRequest,Response:" + ft(e) || 0 : t;
}
function mt() {
(e[_e] = null),
(e[Oe] = null),
(e._appId = null),
(e._sample = null),
(l = {}),
(v = null),
(n = 0),
(i = null),
(s = !1),
(a = null),
(c = null),
(u = 0),
(ge = 0),
(f = null),
(R = null),
(L = null),
(N = null),
(V = 0),
(K = !1),
($ = null),
(B = !1),
(q = null),
(z = dt),
(H = !1),
(X = null),
(Q = dt),
(oe = !1),
(ae = !1),
(pe = null),
(0, A.vF)(e, "_senderConfig", {
g: function () {
return (0, b.CP)({}, ht);
},
});
}
mt(),
(e.pause = function () {
at(), (s = !0);
}),
(e.resume = function () {
s && ((s = !1), (i = null), qe(), rt());
}),
(e.flush = function (t, n, r) {
if ((void 0 === t && (t = !0), !s)) {
at();
try {
return e[ye](t, null, r || 1);
} catch (t) {
(0, y.ZP)(
e[be](),
1,
22,
"flush failed, telemetry will not be collected: " +
(0, b.lL)(t),
{ exception: (0, _.m)(t) }
);
}
}
}),
(e.onunloadFlush = function () {
if (!s)
if (K || ne)
try {
return e[ye](!0, Je, 2);
} catch (t) {
(0, y.ZP)(
e[be](),
1,
20,
"failed to flush with beacon sender on page unload, telemetry will not be collected: " +
(0, b.lL)(t),
{ exception: (0, _.m)(t) }
);
}
else e.flush(!1);
}),
(e.addHeader = function (e, t) {
l[e] = t;
}),
(e.initialize = function (t, o, s, a) {
e.isInitialized() &&
(0, y.ZP)(
e[be](),
1,
28,
"Sender is already initialized"
),
r.initialize(t, o, s, a);
var m = e.identifier;
(c = new st(o.logger)),
(n = 0),
(i = null),
(e[_e] = null),
(u = 0);
var O = e[be]();
(R = (0, w.Hm)(
(0, S.Z)("Sender"),
o.evtNamespace && o.evtNamespace()
)),
(v = (function (e) {
var t,
n = (0, I.YE)(),
r = (0, I.w3)(),
i = !1,
o = !0,
s = (0, w.Hm)((0, S.Z)("OfflineListener"), e);
try {
if ((c((0, I.zk)()) && (i = !0), n)) {
var a = n.body || n;
a.ononline && c(a) && (i = !0);
}
i && r && !(0, E.hX)(r[ee]) && (o = r[ee]);
} catch (e) {
i = !1;
}
function c(e) {
var t = !1;
return (
e &&
(t = (0, w.mB)(e, "online", u, s)) &&
(0, w.mB)(e, "offline", l, s),
t
);
}
function u() {
o = !0;
}
function l() {
o = !1;
}
return (
((t = {})[te] = function () {
var e = !0;
return (
i
? (e = o)
: r && !(0, E.hX)(r[ee]) && (e = r[ee]),
e
);
}),
(t.isListening = function () {
return i;
}),
(t.unload = function () {
var e = (0, I.zk)();
if (e && i) {
if ((Ye(e, s), n)) {
var t = n.body || n;
(0, E.b0)(t.ononline) || Ye(t, s);
}
i = !1;
}
}),
t
);
})(R)),
e._addHook(
(0, P.a)(t, function (t) {
var n = t.cfg;
n.storagePrefix && (0, p.vh)(n.storagePrefix);
var r = (0, C.i8)(null, n, o).getExtCfg(m, ht);
(0, A.vF)(e, "_senderConfig", {
g: function () {
return r;
},
}),
N !== r.endpointUrl && (L = N = r.endpointUrl),
$ &&
$ !== r[we] &&
(0, T.I)($, function (e) {
delete l[e.header];
}),
(V = r[Se]),
(K =
(!1 === r[Pe] || !1 === r[Ce]) && (0, x.Uf)()),
(ne = r[Te]),
(oe = !!r.disableXhr);
var i = r[he],
s = !!r[xe] && (!!i || (0, p.AN)()),
a = r.namePrefix,
c = s !== X || (s && Q !== a) || (s && Z !== i);
if (e[Oe]) {
if (c)
try {
e._buffer = e._buffer[le](O, r, s);
} catch (t) {
(0, y.ZP)(
e[be](),
1,
12,
"failed to transfer telemetry to different buffer storage, telemetry will be lost: " +
(0, b.lL)(t),
{ exception: (0, _.m)(t) }
);
}
qe();
} else e[Oe] = s ? new ot(O, r) : new it(O, r);
(Q = a),
(X = s),
(Z = i),
(ae = !r[Ee] && (0, x.R7)(!0)),
(e._sample = new lt(r.samplingPercentage, O)),
(function (e, t) {
var n = t.disableInstrumentationKeyValidation;
return (
!((0, E.hX)(n) || !n) ||
new RegExp(
"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
).test(e)
);
})((q = r[Ie]), n) ||
(0, y.ZP)(
O,
1,
100,
"Invalid Instrumentation key " + q
),
($ = r[we]),
!(0, g.Qu)(L) && $ && $[J] > 0
? (0, T.I)($, function (e) {
d.addHeader(e.header, e.value);
})
: ($ = null),
(Y = r.enableSendPromise);
var u,
v = r.httpXHROverride,
w = null;
w = h([1, 2], !1);
var S = { sendPOST: Ze };
(pe = function (e, t) {
return $e(S, e, t);
}),
!r[Ce] && (0, x.Uf)() && (w = h([3], !1)),
(w = ne ? v : w || v || S),
(e[_e] = function (e, t) {
return $e(w, e, t);
}),
ae && (f = Qe),
(u = ne ? v : h([3, 1], !0) || v),
(!ne && f) ||
!u ||
(f = function (e, t) {
return $e(u, e, t);
}),
f || (f = pe),
(B = r.disableTelemetry),
(z = r[ke] || dt),
(H = r.isRetryDisabled),
(G = r[je]);
})
);
}),
(e.processTelemetry = function (n, r) {
var i,
s = (r = e._getTelCtx(r))[be]();
try {
if (B) return;
if (!n)
return void (0, y.ZP)(
s,
1,
7,
"Cannot send empty telemetry"
);
if (n.baseData && !n[Re])
return void (0, y.ZP)(
s,
1,
70,
"Cannot send telemetry without baseData and baseType"
);
if ((n[Re] || (n[Re] = "EventData"), !e[_e]))
return void (0, y.ZP)(
s,
1,
28,
"Sender was not initialized"
);
if (((i = n), !e._sample.isSampledIn(i)))
return void (0, y.ZP)(
s,
2,
33,
"Telemetry item was sampled out and not sent",
{ SampleRate: e._sample[De] }
);
n[o.tU] = e._sample[De];
var a = n.iKey || q,
u = t.constructEnvelope(n, a, s, z);
if (!u)
return void (0, y.ZP)(
s,
1,
47,
"Unable to create an AppInsights envelope"
);
var l = !1;
if (
(n[U] &&
n[U][o.jp] &&
((0, T.I)(n[U][o.jp], function (e) {
try {
e &&
!1 === e(u) &&
((l = !0),
(0, y.OG)(
s,
"Telemetry processor check returns false"
));
} catch (e) {
(0,
y.ZP)(s, 1, 64, "One of telemetry initializers failed, telemetry item will not be sent: " + (0, b.lL)(e), { exception: (0, _.m)(e) }, !0);
}
}),
delete n[U][o.jp]),
l)
)
return;
var d = c.serialize(u),
f = e[Oe];
qe(d), f[re](d), rt();
} catch (e) {
(0, y.ZP)(
s,
2,
12,
"Failed adding telemetry to the sender's buffer, some telemetry will be lost: " +
(0, b.lL)(e),
{ exception: (0, _.m)(e) }
);
}
e.processNext(n, r);
}),
(e._xhrReadyStateChange = function (e, t, n) {
4 === e.readyState &&
We(
e.status,
t,
e.responseURL,
n,
ut(e),
ft(e) || e.response
);
}),
(e[ye] = function (t, n, r) {
var i;
if ((void 0 === t && (t = !0), !s))
try {
var o = e[Oe];
if (B) o[ce]();
else {
if (o[ie]() > 0) {
var a = o.getItems();
!(function (t, n) {
var r,
i =
((r = "getNotifyMgr"),
e.core[r]
? e.core[r]()
: e.core._notificationManager);
if (i && i[Ke])
try {
i[Ke](t, n);
} catch (t) {
(0, y.ZP)(
e[be](),
1,
74,
"send request notification failed: " +
(0, b.lL)(t),
{ exception: (0, _.m)(t) }
);
}
})(r || 0, t),
(i = n ? n.call(e, a, t) : e[_e](a, t));
}
new Date();
}
at();
} catch (t) {
var c = (0, x.L0)();
(!c || c > 9) &&
(0, y.ZP)(
e[be](),
1,
40,
"Telemetry transmission failed, some telemetry will be lost: " +
(0, b.lL)(t),
{ exception: (0, _.m)(t) }
);
}
return i;
}),
(e._doTeardown = function (t, n) {
e.onunloadFlush(), (0, O.K)(v, !1), mt();
}),
(e[Me] = function (t, n, r) {
(0, y.ZP)(e[be](), 2, 26, "Failed to send telemetry.", {
message: n,
}),
e._buffer && e._buffer[fe](t);
}),
(e[Ae] = function (t, n) {
for (
var r = [], i = [], o = 0, s = n.errors.reverse();
o < s.length;
o++
) {
var a = s[o],
c = t.splice(a.index, 1)[0];
ct(a.statusCode) ? i[se](c) : r[se](c);
}
t[J] > 0 && e[Fe](t, n[Le]),
r[J] > 0 &&
e[Me](
r,
ut(
null,
[
"partial success",
n[Le],
"of",
n.itemsReceived,
].join(" ")
)
),
i[J] > 0 &&
(nt(i),
(0, y.ZP)(
e[be](),
2,
40,
"Partial success. Delivered: " +
t[J] +
", Failed: " +
r[J] +
". Will retry to send " +
i[J] +
" our of " +
n.itemsReceived +
" items"
));
}),
(e[Fe] = function (t, n) {
e._buffer && e._buffer[fe](t);
}),
(e._xdrOnLoad = function (t, r) {
var i = ft(t);
if (!t || (i + "" != "200" && "" !== i)) {
var o = tt(i);
o && o.itemsReceived && o.itemsReceived > o[Le] && !H
? e[Ae](r, o)
: e[Me](r, gt(t));
} else (n = 0), e[Fe](r, 0);
});
}),
d
);
}
return (
(0, i.qU)(t, e),
(t.constructEnvelope = function (e, t, n, r) {
var o;
return (
(o =
t === e.iKey || (0, E.hX)(t)
? e
: (0, i.Im)((0, i.Im)({}, e), { iKey: t })),
(pt[o.baseType] || Qe)(n, o, r)
);
}),
t
);
})(R.s),
mt = n(4484),
vt = n(9379),
yt = n(3517),
bt = "instrumentationKey",
_t = "connectionString",
wt = n(9762),
St = {
diagnosticLogInterval: (0, v.Lx)(function (e) {
return e && e > 0;
}, 1e4),
},
Pt = (function () {
function e(t) {
var n,
i = new vt._();
((0, E.hX)(t) || ((0, E.hX)(t[bt]) && (0, E.hX)(t[_t]))) &&
(0, yt.$8)("Invalid input configuration"),
(0, r.A)(e, this, function (e) {
function r() {
var e = (0, P.e)(t || {}, St);
(n = e.cfg),
i.addUnloadHook(
(0, P.a)(e, function () {
if (n[_t]) {
var e = (0, mt.H)(n[_t]),
t = e.ingestionendpoint;
(n.endpointUrl = t ? t + o.wc : n.endpointUrl),
(n[bt] = e.instrumentationkey || n[bt]);
}
})
),
i.initialize(n, [new gt()]);
}
(0, A.vF)(e, "config", {
g: function () {
return n;
},
}),
r(),
(e.initialize = r),
(0, b.o$)(e, i, [
"track",
"flush",
"pollInternalLogs",
"stopPollingInternalLogs",
"unload",
"getPlugin",
"addPlugin",
"evtNamespace",
"addUnloadCb",
"onCfgChange",
]);
});
}
return (e.__ieDyn = 1), e;
})();
},
8279: (e, t, n) => {
"use strict";
n.d(t, { A: () => N });
var r,
i = n(3076),
o = n(3266),
s = n(3517),
a = "constructor",
c = "prototype",
u = "function",
l = "_dynInstFuncs",
d = "_isDynProxy",
f = "_dynClass",
h = "_dynCls$",
p = "_dynInstChk",
g = p,
m = "_dfOpts",
v = "_unknown_",
y = "__proto__",
b = "_dyn" + y,
_ = "__dynProto$Gbl",
w = "_dynInstProto",
S = "useBaseInst",
P = "setInstFuncs",
C = Object,
T = C.getPrototypeOf,
x = C.getOwnPropertyNames,
O = (0, i.mS)(),
E =
O[_] ||
(O[_] = { o: ((r = {}), (r[P] = !0), (r[S] = !0), r), n: 1e3 });
function I(e) {
return e && (e === C[c] || e === Array[c]);
}
function k(e) {
return I(e) || e === Function[c];
}
function j(e) {
var t;
if (e) {
if (T) return T(e);
var n = e[y] || e[c] || (e[a] ? e[a][c] : null);
(t = e[b] || n),
(0, o.v)(e, b) ||
(delete e[w], (t = e[b] = e[w] || e[b]), (e[w] = n));
}
return t;
}
function R(e, t) {
var n = [];
if (x) n = x(e);
else
for (var r in e)
"string" == typeof r && (0, o.v)(e, r) && n.push(r);
if (n && n.length > 0) for (var i = 0; i < n.length; i++) t(n[i]);
}
function D(e, t, n) {
return t !== a && typeof e[t] === u && (n || (0, o.v)(e, t));
}
function M(e) {
(0, s.zk)("DynamicProto: " + e);
}
function A(e, t) {
for (var n = e.length - 1; n >= 0; n--) if (e[n] === t) return !0;
return !1;
}
function F(e, t, n, r, i) {
if (!I(e)) {
var s = (n[l] = n[l] || {}),
a = (s[t] = s[t] || {});
!1 !== s[g] && (s[g] = !!i),
R(n, function (t) {
D(n, t, !1) &&
n[t] !== r[t] &&
((a[t] = n[t]),
delete n[t],
(!(0, o.v)(e, t) || (e[t] && !e[t][d])) &&
(e[t] = (function (e, t) {
var n = function () {
var r =
(function (e, t, n, r) {
var i = null;
if (e && (0, o.v)(n, f)) {
var s = e[l] || {};
if (
((i = (s[n[f]] || {})[t]) ||
M("Missing [" + t + "] " + u),
!i[p] && !1 !== s[g])
) {
for (
var a = !(0, o.v)(e, t), c = j(e), d = [];
a && c && !k(c) && !A(d, c);
) {
var h = c[t];
if (h) {
a = h === r;
break;
}
d.push(c), (c = j(c));
}
try {
a && (e[t] = i), (i[p] = 1);
} catch (e) {
s[g] = !1;
}
}
}
return i;
})(this, t, e, n) ||
(function (e, t, n) {
var r = t[e];
return (
r === n && (r = j(t)[e]),
typeof r !== u && M("[" + e + "] is not a " + u),
r
);
})(t, e, n);
return r.apply(this, arguments);
};
return (n[d] = 1), n;
})(e, t)));
});
}
}
function L(e, t) {
return (0, o.v)(e, c)
? e.name || t || v
: ((e || {})[a] || {}).name || t || v;
}
function N(e, t, n, r) {
(0, o.v)(e, c) || M("theClass is an invalid class definition.");
var i = e[c];
(function (e, t) {
if (T) {
for (var n = [], r = j(t); r && !k(r) && !A(n, r); ) {
if (r === e) return !0;
n.push(r), (r = j(r));
}
return !1;
}
return !0;
})(i, t) || M("[" + L(e) + "] not in hierarchy of [" + L(t) + "]");
var s = null;
(0, o.v)(i, f)
? (s = i[f])
: ((s = h + L(e, "_") + "$" + E.n), E.n++, (i[f] = s));
var a = N[m],
u = !!a[S];
u && r && void 0 !== r[S] && (u = !!r[S]);
var p = (function (e) {
var t = {};
return (
R(e, function (n) {
!t[n] && D(e, n, !1) && (t[n] = e[n]);
}),
t
);
})(t),
v = (function (e, t, n, r) {
function i(e, t, n) {
var i = t[n];
if (i[d] && r) {
var o = e[l] || {};
!1 !== o[g] && (i = (o[t[f]] || {})[n] || i);
}
return function () {
return i.apply(e, arguments);
};
}
var o = {};
R(n, function (e) {
o[e] = i(t, n, e);
});
for (var s = j(e), a = []; s && !k(s) && !A(a, s); )
R(s, function (e) {
!o[e] && D(s, e, !T) && (o[e] = i(t, s, e));
}),
a.push(s),
(s = j(s));
return o;
})(i, t, p, u);
n(t, v);
var y = !!T && !!a[P];
y && r && (y = !!r[P]), F(i, s, t, p, !1 !== y);
}
N[m] = E.o;
},
4292: (e, t, n) => {
"use strict";
n.d(t, { Dv: () => i, yN: () => o });
var r = n(6668);
function i(e, t) {
return o(
e,
function (e) {
t && t({ value: e, rejected: !1 });
},
function (e) {
t && t({ rejected: !0, reason: e });
}
);
}
function o(e, t, n, i) {
var o = e;
return (
(0, r.$X)(e) ? (t || n) && (o = e.then(t, n)) : t && t(e),
i &&
(o = (function (e, t) {
var n = e;
return (
t &&
((0, r.$X)(e)
? (n = e.finally
? e.finally(t)
: e.then(
function (e) {
return t(), e;
},
function (e) {
throw (t(), e);
}
))
: t()),
n
);
})(o, i)),
o
);
}
},
636: (e, t, n) => {
"use strict";
n.d(t, { Xf: () => V, Qo: () => N });
var r,
i,
o,
s,
a,
c = n(2871),
u = n(6668),
l = n(8693),
d = n(755),
f = n(3076),
h = n(6874),
p = n(6336),
g = n(7403),
m = n(3517),
v = n(5439),
y = n(4292),
b = !1,
_ = ["pending", "resolving", "resolved", "rejected"],
w = n(8965),
S = "dispatchEvent",
P = "Promise",
C = "unhandledRejection",
T = C.toLowerCase(),
x = [],
O = 0,
E = 10;
function I(e) {
return (0, u.Tn)(e) ? e.toString() : (0, l.m)(e);
}
function k(e) {
return function (t) {
var n = (0, d.K)(arguments, 1);
return e(function (e, n) {
try {
var r = [],
i = 1;
(0, v.I)(t, function (t, o) {
t &&
(i++,
(0, y.yN)(
t,
function (t) {
(r[o] = t), 0 == --i && e(r);
},
n
));
}),
0 == --i && e(r);
} catch (e) {
n(e);
}
}, n);
};
}
function j(e) {
return function (t) {
var n = (0, d.K)(arguments, 1);
return (0, u.$X)(t)
? t
: e(function (e) {
e(t);
}, n);
};
}
function R(e) {
return function (t) {
var n = (0, d.K)(arguments, 1);
return e(function (e, n) {
n(t);
}, n);
};
}
var D,
M,
A = function (e) {
(0, v.I)(e, function (e) {
try {
e();
} catch (e) {}
});
};
function F(e, t) {
return (function (e, t, n) {
var c,
v,
y = (0, d.K)(arguments, 3),
k = 0,
j = !1,
R = [],
D = O++,
M = x.length > 0 ? x[x.length - 1] : void 0,
A = !1,
F = null;
!a && (a = (0, f.O7)(P + "RejectionEvent"));
var L,
N,
V,
K,
$ = function (t, n) {
try {
return (
x.push(D),
(A = !0),
F && F.cancel(),
(F = null),
e(function (e, r) {
R.push(function () {
try {
var i = 2 === k ? t : n,
o = (0, u.b0)(i) ? c : (0, u.Tn)(i) ? i(c) : i;
(0, u.$X)(o)
? o.then(e, r)
: i
? e(o)
: 3 === k
? r(o)
: e(o);
} catch (e) {
r(e);
}
}),
j && U();
}, y)
);
} finally {
x.pop();
}
},
B = function () {
return _[k];
},
U = function () {
if (R.length > 0) {
var e = R.slice();
(R = []), (A = !0), t(e), F && F.cancel(), (F = null);
}
},
q = function (e, t) {
return function (n) {
if (k === t) {
if (2 === e && (0, u.$X)(n))
return (k = 1), void n.then(q(2, 1), q(3, 1));
(k = e),
(j = !0),
(c = n),
U(),
A || 3 !== e || F || (F = (0, h.dR)(W, E));
}
};
},
W = function () {
A ||
((0, f.Ll)()
? process.emit(C, c, v)
: (function (e, t, n, r) {
var i = (0, f.YE)();
!s &&
(s = (0, w.I)(function () {
var e;
return (
i &&
i.createEvent &&
(e = i.createEvent("Event")),
!!e && e.initEvent
);
}, null));
var o = s.v
? i.createEvent("Event")
: r
? new Event(t)
: {};
if (
(n && n(o), s.v && o.initEvent(t, !1, !0), o && e[S])
)
e[S](o);
else {
var a = e["on" + t];
if (a) a(o);
else {
var c = (0, f.zS)("console");
c && (c.error || c.log)(t, (0, l.m)(o));
}
}
})(
(0, f.zk)() || (0, f.mS)(),
T,
function (e) {
return (
(0, p.vF)(e, "promise", {
g: function () {
return v;
},
}),
(e.reason = c),
e
);
},
!!a.v
));
};
return (
(v = {
then: $,
catch: function (e) {
return $(void 0, e);
},
finally: function (e) {
var t = e,
n = e;
return (
(0, u.Tn)(e) &&
((t = function (t) {
return e && e(), t;
}),
(n = function (t) {
throw (e && e(), t);
})),
$(t, n)
);
},
}),
(0, p.Ux)(v, "state", { get: B }),
b &&
((L = v),
(N = B),
(V = function () {
return (0, u.SZ)(c);
}),
(K = function () {
return A;
}),
(r = r || {
toString: function () {
return "[[PromiseState]]";
},
}),
(i = i || {
toString: function () {
return "[[PromiseResult]]";
},
}),
(o = o || {
toString: function () {
return "[[PromiseIsHandled]]";
},
}),
(0, p.Ux)(L, r, { get: N }),
(0, p.Ux)(L, i, { get: V }),
(0, p.Ux)(L, o, { get: K })),
(0, g.Lo)() && (v[(0, g.Y0)(11)] = "IPromise"),
(v.toString = function () {
return (
"IPromise" +
(b ? "[" + D + ((0, u.b0)(M) ? "" : ":" + M) + "]" : "") +
" " +
B() +
(j ? " - " + I(c) : "")
);
}),
(function () {
(0, u.Tn)(n) ||
(0, m.zk)(P + ": executor is not a function - " + I(n));
var e = q(3, 0);
try {
n.call(v, q(2, 0), e);
} catch (t) {
e(t);
}
})(),
v
);
})(
F,
(function (e) {
var t = (0, u.Et)(e) ? e : 0;
return function (e) {
(0, h.dR)(function () {
A(e);
}, t);
};
})(t),
e,
t
);
}
function L(e, t) {
!D && (D = (0, f.O7)(P));
var n = D.v;
if (!n) return F(e);
(0, u.Tn)(e) ||
(0, m.zk)(P + ": executor is not a function - " + (0, l.m)(e));
var r = 0,
i = new n(function (t, n) {
e(
function (e) {
(r = 2), t(e);
},
function (e) {
(r = 3), n(e);
}
);
});
return (
(0, p.Ux)(i, "state", {
get: function () {
return _[r];
},
}),
i
);
}
function N(e, t) {
return (
!M &&
(M = (0, c.nR)(function () {
return L;
})),
M.v.call(this, e, t)
);
}
k(F), j(F), R(F), k(L), j(L), R(L);
var V = k(N);
j(N), R(N);
},
1187: (e, t, n) => {
"use strict";
n.d(t, { Y: () => l });
var r = n(6668),
i = n(7403);
function o(e) {
return !!e && (0, r.Tn)(e.next);
}
var s,
a = n(2871),
c = n(4016),
u = n(655);
function l(e, t) {
var n;
return (
!(0, r.b0)(t) &&
e &&
((0, r.cy)(t)
? (0, u.p)(e.push, e, t)
: o(t) || ((n = t), !(0, r.kF)(n) && (0, r.Tn)(n[(0, i.Y0)(3)]))
? (function (e, t, n) {
if (
e &&
(o(e) ||
(!s &&
(s = (0, a.nR)(function () {
return (0, i.Y0)(3);
})),
(e = e[s.v] ? e[s.v]() : null)),
o(e))
) {
var r = void 0,
u = void 0;
try {
for (
var l = 0;
!(u = e.next())[c.DH] &&
-1 !== t.call(e, u[c.Qg], l, e);
)
l++;
} catch (t) {
(r = { e: t }), e.throw && ((u = null), e.throw(r));
} finally {
try {
u && !u[c.DH] && e.return && e.return(u);
} finally {
if (r) throw r.e;
}
}
}
})(t, function (t) {
e.push(t);
})
: e.push(t)),
e
);
}
},
5439: (e, t, n) => {
"use strict";
n.d(t, { I: () => i });
var r = n(4016);
function i(e, t, n) {
if (e)
for (
var i = e[r.pi] >>> 0, o = 0;
o < i && (!(o in e) || -1 !== t.call(n || e, e[o], o, e));
o++
);
}
},
6832: (e, t, n) => {
"use strict";
n.d(t, { r: () => o });
var r = n(4016),
i = n(1742),
o = (0, i.lK)(r.BA, r.wM);
(0, i.lK)(r.uP, r.wM);
},
4335: (e, t, n) => {
"use strict";
n.d(t, { W: () => i });
var r = n(4016),
i = (0, n(1742).lK)("map", r.wM);
},
1011: (e, t, n) => {
"use strict";
n.d(t, { K: () => i });
var r = n(4016),
i = (0, n(1742).lK)("reduce", r.wM);
},
755: (e, t, n) => {
"use strict";
n.d(t, { K: () => i });
var r = n(4016),
i = (0, n(1742).lK)(r.$9, r.wM);
},
655: (e, t, n) => {
"use strict";
n.d(t, { p: () => r });
var r = (0, n(1742).xC)("apply");
},
5683: (e, t, n) => {
"use strict";
n.d(t, { n: () => r });
var r = (0, n(1742).xC)("call");
},
6668: (e, t, n) => {
"use strict";
n.d(t, {
$P: () => b,
$X: () => P,
Cb: () => p,
Ed: () => u,
Et: () => _,
Gv: () => v,
Kg: () => g,
Lm: () => w,
O9: () => h,
SZ: () => c,
Tn: () => m,
b0: () => l,
bJ: () => S,
cy: () => y,
ez: () => s,
hX: () => d,
kF: () => f,
wo: () => C,
zz: () => T,
});
var r = n(4016),
i = n(8827),
o = [r.An, r.uk, r.Jx, r.ZH, "symbol", "bigint"];
function s(e) {
return function (t) {
return typeof t === e;
};
}
function a(e) {
var t = "[object " + e + "]";
return function (e) {
return !(!e || c(e) !== t);
};
}
function c(e) {
return r.Wy.toString.call(e);
}
function u(e, t) {
return typeof e === t;
}
function l(e) {
return typeof e === r.ZH || e === r.ZH;
}
function d(e) {
return e === r.M_ || l(e);
}
function f(e) {
return e === r.M_ || !h(e);
}
function h(e) {
return !!e || e !== r.DQ;
}
var p = function (e) {
return e !== r.qv && -1 !== o.indexOf(e);
},
g = s(r.An),
m = s(r.H3);
function v(e) {
return !((!e && d(e)) || !e || typeof e !== r.qv);
}
var y = r.kV.isArray,
b = a("Date"),
_ = s(r.uk),
w = s(r.Jx),
S =
(a("RegExp"),
a("File"),
a("FormData"),
a("Blob"),
a("ArrayBuffer"),
a("Error"));
function P(e) {
return !!e && m(e.then);
}
function C(e) {
return (
!e ||
!(0, i.y)(function () {
return e && 0 + e;
}, e)
);
}
function T(e) {
return !(
!e ||
(0, i.y)(function () {
return !(e && 0 + e);
}, !e)
);
}
},
225: (e, t, n) => {
"use strict";
function r() {
return (Date.now || i)();
}
function i() {
return new Date().getTime();
}
n.d(t, { f: () => r });
},
8693: (e, t, n) => {
"use strict";
n.d(t, { m: () => o });
var r = n(4016),
i = n(6668);
function o(e, t) {
var n = r.wg;
if ((0, i.bJ)(e))
n =
"{ stack: '" +
e.stack +
"', message: '" +
e.message +
"', name: '" +
e.name +
"'";
else
try {
n = JSON.stringify(e, r.M_, t ? ((0, i.Et)(t) ? t : 4) : r.DQ);
} catch (e) {
n = " - " + o(e, t);
}
return (0, i.SZ)(e) + ": " + n;
}
},
5659: (e, t, n) => {
"use strict";
n.d(t, { WS: () => s, Tm: () => a, fn: () => c });
var r = n(9018);
function i(e, t, n, i) {
var o = {};
return (
(0, r.z)(e, function (e, r) {
(o[e] = t ? r : e), (o[r] = n ? r : e);
}),
i(o)
);
}
var o = n(1324);
function s(e) {
return i(e, 1, 0, o.ZH);
}
function a(e) {
return i(e, 0, 0, o.ZH);
}
function c(e) {
return (function (e) {
var t = {};
return (
(0, r.z)(e, function (e, n) {
(t[e] = n[1]), (t[n[0]] = n[1]);
}),
(0, o.ZH)(t)
);
})(e);
}
},
3076: (e, t, n) => {
"use strict";
n.d(t, {
JK: () => C,
Ll: () => T,
O7: () => p,
Vd: () => b,
Wt: () => v,
YE: () => y,
mS: () => g,
tw: () => P,
w3: () => S,
w9: () => w,
zS: () => m,
zk: () => _,
});
var r,
i,
o,
s,
a,
c,
u = n(4016),
l = n(1382),
d = n(8965),
f = n(2871),
h = "window",
p = function (e) {
return (0, d.I)(function () {
return m(e) || u.DQ;
}, u.DQ);
},
g = function (e) {
return (
(!r || !1 === e || (f.nr && f.nr.lzy && !r.b)) &&
(r = (0, d.I)(l.u, u.M_)),
r.v
);
},
m = function (e, t) {
var n = r && !1 !== t ? r.v : g(t);
return n && n[e] ? n[e] : e === h && i ? i.v : u.M_;
},
v = function () {
return !!y();
},
y = function () {
return (
(!o || (f.nr && f.nr.lzy && !o.b)) && (o = p("document")), o.v
);
},
b = function () {
return !!_();
},
_ = function () {
return (!i || (f.nr && f.nr.lzy && !i.b)) && (i = p(h)), i.v;
},
w = function () {
return !!S();
},
S = function () {
return (
(!s || (f.nr && f.nr.lzy && !s.b)) && (s = p("navigator")), s.v
);
},
P = function () {
return !!C();
},
C = function () {
return (
(!a || (f.nr && f.nr.lzy && !a.b)) && (a = p("history")), a.v
);
},
T = function () {
return (
!c &&
(c = (0, d.I)(function () {
return !(!process || !(process.versions || {}).node);
}, !1)),
c.v
);
};
},
2871: (e, t, n) => {
"use strict";
n.d(t, { nR: () => c, nr: () => r });
var r,
i = n(4016),
o = n(1382),
s = n(6336),
a = function () {
(r = (0, o.Z)()), (a = i.M_);
};
function c(e) {
var t = {};
return (
a && a(),
(t.b = r.lzy),
(0, s.Ux)(t, "v", {
configurable: !0,
get: function () {
var n = e();
return (
r.lzy || ((0, s.Ux)(t, "v", { value: n }), t.b && delete t.b),
r.lzy && t.b !== r.lzy && (t.b = r.lzy),
n
);
},
}),
t
);
}
},
4657: (e, t, n) => {
"use strict";
n.d(t, { R: () => i });
var r = n(4016),
i = (0, n(1742).k5)(r.pi);
},
558: (e, t, n) => {
"use strict";
n.d(t, { FJ: () => a, UU: () => c });
var r,
i = n(225),
o = n(3076),
s = n(2871);
function a() {
return (
(!r || (!r.b && s.nr && s.nr.lzy)) &&
(r = (0, o.O7)("performance")),
r.v
);
}
function c() {
var e = a();
return e && e.now ? e.now() : (0, i.f)();
}
},
8827: (e, t, n) => {
"use strict";
function r(e, t) {
var n = t;
try {
n = e();
} catch (e) {}
return n;
}
n.d(t, { y: () => r });
},
8965: (e, t, n) => {
"use strict";
n.d(t, { I: () => o });
var r = n(2871),
i = n(8827);
function o(e, t) {
return (0, r.nR)(function () {
return (0, i.y)(e, t);
});
}
},
3517: (e, t, n) => {
"use strict";
function r(e) {
throw new Error(e);
}
function i(e) {
throw new TypeError(e);
}
n.d(t, { $8: () => r, zk: () => i });
},
4016: (e, t, n) => {
"use strict";
n.d(t, {
$9: () => P,
An: () => f,
BA: () => v,
BB: () => p,
DH: () => _,
DQ: () => r,
Fs: () => l,
H3: () => a,
I3: () => x,
Jx: () => s,
M_: () => i,
PF: () => g,
Qg: () => w,
Wy: () => T,
ZH: () => h,
fL: () => m,
kV: () => I,
o_: () => S,
pi: () => b,
qv: () => u,
r5: () => d,
s6: () => C,
sW: () => O,
tq: () => E,
uP: () => y,
uk: () => c,
wM: () => k,
wg: () => o,
});
var r = void 0,
i = null,
o = "",
s = "boolean",
a = "function",
c = "number",
u = "object",
l = "prototype",
d = "__proto__",
f = "string",
h = "undefined",
p = "constructor",
g = "Symbol",
m = "_polyfill",
v = "indexOf",
y = "lastIndexOf",
b = "length",
_ = "done",
w = "value",
S = "name",
P = "slice",
C = Object,
T = C[l],
x = String,
O = x[l],
E = Math,
I = Array,
k = I[l];
},
1382: (e, t, n) => {
"use strict";
n.d(t, { Z: () => a, u: () => s });
var r,
i = n(4016),
o = "__tsUtils$gblCfg";
function s() {
var e;
return (
typeof globalThis !== i.ZH && (e = globalThis),
e || typeof self === i.ZH || (e = self),
e || typeof window === i.ZH || (e = window),
e || typeof global === i.ZH || (e = global),
e
);
}
function a() {
if (!r) {
var e = s() || {};
r = e[o] = e[o] || {};
}
return r;
}
},
1742: (e, t, n) => {
"use strict";
n.d(t, { b2: () => d, k5: () => f, lK: () => l, xC: () => u });
var r = n(8693),
i = n(3517),
o = n(5977),
s = n(4016),
a = s.wM[s.$9],
c = function (e, t) {
(0, i.zk)("'" + (0, o.o)(e) + "' not defined for " + (0, r.m)(t));
},
u = function (e) {
return function (t) {
return t[e].apply(t, a.call(arguments, 1));
};
},
l = function (e, t) {
var n = t && t[e];
return function (t) {
var r = (t && t[e]) || n;
if (r) return r.apply(t, a.call(arguments, 1));
c(e, t);
};
},
d = function (e, t, n) {
var r = t && t[e];
return function (t) {
var i = (t && t[e]) || r;
if (i || n) {
var o = arguments;
return (i || n).apply(t, i ? a.call(o, 1) : o);
}
c(e, t);
};
};
function f(e) {
return function (t) {
return t[e];
};
}
},
411: (e, t, n) => {
"use strict";
n.d(t, { s: () => o });
var r = n(4016),
i = n(8693),
o =
r.s6.create ||
function (e) {
if (!e) return {};
var t = typeof e;
if (t !== r.qv && t !== r.H3)
throw new TypeError(
"Prototype must be an Object or function: " + (0, i.m)(e)
);
function n() {}
return (n[r.Fs] = e), new n();
};
},
6336: (e, t, n) => {
"use strict";
n.d(t, { Ux: () => u, r: () => l, vF: () => d });
var r = n(4016),
i = n(6668),
o = n(9018),
s = n(695),
a = {
e: "enumerable",
c: "configurable",
v: r.Qg,
w: "writable",
g: "get",
s: "set",
};
function c(e) {
var t = {};
if (((t[a.c] = !0), (t[a.e] = !0), e.l)) {
t.get = function () {
return e.l.v;
};
var n = (0, s.k)(e.l, "v");
n &&
n.set &&
(t.set = function (t) {
e.l.v = t;
});
}
return (
(0, o.z)(e, function (e, n) {
t[a[e]] = (0, i.b0)(n) ? t[a[e]] : n;
}),
t
);
}
var u = r.s6.defineProperty;
function l(e, t, n, r, i, o) {
var s = { e: o, c: i };
return n && (s.g = n), r && (s.s = r), u(e, t, c(s));
}
function d(e, t, n) {
return u(e, t, c(n));
}
r.s6.defineProperties;
},
9018: (e, t, n) => {
"use strict";
n.d(t, { z: () => o });
var r = n(6668),
i = n(9452);
function o(e, t, n) {
if (e && (0, r.Gv)(e))
for (var o in e)
if ((0, i.K)(e, o) && -1 === t.call(n || e, o, e[o])) break;
}
},
695: (e, t, n) => {
"use strict";
n.d(t, { k: () => r });
var r = n(4016).s6.getOwnPropertyDescriptor;
},
9452: (e, t, n) => {
"use strict";
n.d(t, { K: () => s });
var r = n(4016),
i = n(695),
o = n(3266),
s =
r.s6.hasOwn ||
function (e, t) {
return (0, o.v)(e, t) || !!(0, i.k)(e, t);
};
},
3266: (e, t, n) => {
"use strict";
n.d(t, { v: () => i });
var r = n(4016);
function i(e, t) {
return e && r.Wy.hasOwnProperty.call(e, t);
}
},
7460: (e, t, n) => {
"use strict";
n.d(t, { Q: () => d });
var r,
i,
o,
s = n(5683),
a = n(3076),
c = n(4016),
u = n(3266),
l = n(1324);
function d(e) {
if (!e || typeof e !== c.qv) return !1;
o || (o = !(0, a.Vd)() || (0, a.zk)());
var t = !1;
if (e !== o) {
i || ((r = Function[c.Fs].toString), (i = (0, s.n)(r, c.s6)));
try {
var n = (0, l.rL)(e);
(t = !n) ||
((0, u.v)(n, c.BB) && (n = n[c.BB]),
(t = n && typeof n === c.H3 && r.call(n) === i));
} catch (e) {}
}
return t;
}
},
1324: (e, t, n) => {
"use strict";
n.d(t, {
vE: () => u,
ZH: () => d,
N6: () => f,
rL: () => p,
cG: () => l,
js: () => h,
});
var r = n(4016),
i = n(6668),
o = n(3517),
s = n(9018),
a = r.s6.freeze,
c = function (e) {
return e;
},
u = r.s6.assign;
function l(e) {
return (
((0, i.Gv)(e) && e !== r.M_) ||
(0, o.zk)("objKeys called on non-object"),
r.s6.keys(e)
);
}
function d(e) {
return (
a &&
(0, s.z)(e, function (e, t) {
((0, i.cy)(t) || (0, i.Gv)(t)) && a(t);
}),
f(e)
);
}
var f = a || c,
h = r.s6.seal || c,
p =
r.s6.getPrototypeOf ||
function (e) {
return e[r.r5] || r.M_;
};
r.s6.entries, r.s6.values;
},
5977: (e, t, n) => {
"use strict";
n.d(t, { o: () => r });
var r = n(4016).I3;
},
2494: (e, t, n) => {
"use strict";
n.d(t, { C: () => l });
var r = n(6668),
i = n(8693),
o = n(3517),
s = n(4016),
a = n(1742),
c = n(5977),
u = n(3178),
l = (0, a.b2)("endsWith", s.sW, function (e, t, n) {
(0, r.Kg)(e) || (0, o.zk)("'" + (0, i.m)(e) + "' is not a string");
var a = (0, r.Kg)(t) ? t : (0, c.o)(t),
l = a[s.pi],
d = e[s.pi],
f = !(0, r.b0)(n) && n < d ? n : d;
return (0, u.P0)(e, f - l, f) === a;
});
},
5881: (e, t, n) => {
"use strict";
n.d(t, { H: () => o });
var r = n(4016),
i = n(1742),
o = (0, i.lK)(r.BA, r.sW);
(0, i.lK)(r.uP, r.sW);
},
7931: (e, t, n) => {
"use strict";
n.d(t, { t: () => l });
var r = n(6668),
i = n(8693),
o = n(3517),
s = n(4016),
a = n(1742),
c = n(5977),
u = n(3178),
l = (0, a.b2)("startsWith", s.sW, function (e, t, n) {
(0, r.Kg)(e) || (0, o.zk)("'" + (0, i.m)(e) + "' is not a string");
var a = (0, r.Kg)(t) ? t : (0, c.o)(t),
l = a[s.pi],
d = n > 0 ? n : 0;
return (0, u.P0)(e, d, d + l) === a;
});
},
3178: (e, t, n) => {
"use strict";
n.d(t, { ZW: () => f, hK: () => d, P0: () => l });
var r = n(6668),
i = n(8693),
o = n(3517),
s = n(4016),
a = n(1742),
c = (s.tq.min, s.tq.max),
u = (0, a.lK)(s.$9, s.sW),
l = (0, a.lK)("substring", s.sW),
d = (0, a.b2)("substr", s.sW, function (e, t, n) {
return (
(0, r.hX)(e) &&
(0, o.zk)("'polyStrSubstr called with invalid " + (0, i.m)(e)),
n < 0
? s.wg
: ((t = t || 0) < 0 && (t = c(t + e[s.pi], 0)),
(0, r.b0)(n) ? u(e, t) : u(e, t, t + n))
);
});
function f(e, t) {
return l(e, 0, t);
}
},
8993: (e, t, n) => {
"use strict";
n.d(t, { EH: () => f });
var r = n(4016),
i = n(1742),
o = n(6668),
s = n(8693),
a = n(3517);
function c(e) {
return function (t) {
return (
(0, o.hX)(t) && (0, a.zk)("strTrim called [" + (0, s.m)(t) + "]"),
t && t.replace && (t = t.replace(e, r.wg)),
t
);
};
}
var u = c(/^\s+|(?=\s)\s+$/g),
l = c(/^\s+/g),
d = c(/(?=\s)\s+$/g),
f = (0, i.b2)("trim", r.sW, u);
(0, i.b2)("trimStart", r.sW, l), (0, i.b2)("trimEnd", r.sW, d);
},
7403: (e, t, n) => {
"use strict";
n.d(t, { Y0: () => C, Lo: () => S, jj: () => T, eC: () => x });
var r,
i = n(4016),
o = (0, n(5659).Tm)({
asyncIterator: 0,
hasInstance: 1,
isConcatSpreadable: 2,
iterator: 3,
match: 4,
matchAll: 5,
replace: 6,
search: 7,
species: 8,
split: 9,
toPrimitive: 10,
toStringTag: 11,
unscopables: 12,
}),
s = n(9452),
a = n(5977),
c = n(1382),
u = n(1324),
l = "_urid";
var d = {};
function f(e) {
var t = {
description: (0, a.o)(e),
toString: function () {
return i.PF + "(" + e + ")";
},
};
return (t[i.fL] = !0), t;
}
function h(e) {
var t = (function () {
if (!r) {
var e = (0, c.Z)();
r = e.gblSym = e.gblSym || { k: {}, s: {} };
}
return r;
})();
if (!(0, s.K)(t.k, e)) {
var n = f(e),
i = (0, u.cG)(t.s).length;
(n[l] = function () {
return i + "_" + n.toString();
}),
(t.k[e] = n),
(t.s[n[l]()] = (0, a.o)(e));
}
return t.k[e];
}
var p,
g,
m,
v = n(6668),
y = n(2871),
b = n(8965),
_ = n(3076);
function w(e) {
return (0, b.I)(function () {
return p.v ? p.v[e] : i.DQ;
}, i.DQ);
}
function S() {
return !!P();
}
function P() {
var e = !p || (y.nr && y.nr.lzy && !p.b);
return (
e && (p = (0, _.O7)(i.PF)),
(!g || e) && (g = w("for")),
(!m || e) && (m = w("keyFor")),
p.v
);
}
function C(e, t) {
var n = o[e];
return (
(!p || (y.nr.lzy && !p.b)) && P(),
p.v
? p.v[n || e]
: t
? i.DQ
: (function (e) {
var t,
n = o[e];
return n && (t = d[n] = d[n] || f(i.PF + "." + n)), t;
})(e)
);
}
function T(e, t) {
return (
(!p || (y.nr.lzy && !p.b)) && P(), p.v ? p.v(e) : t ? i.M_ : f(e)
);
}
function x(e) {
return (!g || (y.nr.lzy && !p.b)) && P(), (g.v || h)(e);
}
(0, v.ez)("symbol");
},
6874: (e, t, n) => {
"use strict";
n.d(t, { AH: () => g, dR: () => h, vK: () => p });
var r = n(755),
i = n(655),
o = n(6668),
s = n(4016),
a = n(6336),
c = "ref",
u = "un" + c,
l = "hasRef",
d = "enabled";
function f(e, t, n, f) {
var h = (0, o.cy)(n),
p = h ? n.length : 0,
g = (p > 0 ? n[0] : h ? s.DQ : n) || setTimeout,
m = (p > 1 ? n[1] : s.DQ) || clearTimeout,
v = f[0];
f[0] = function () {
y.dn(), (0, i.p)(v, e, (0, r.K)(arguments));
};
var y = (function (t, n, r) {
var o,
f,
h = !0,
p = t ? n(s.M_) : s.M_,
g = function () {
return (h = !1), p && p[u] && p[u](), f;
},
v = function () {
return (p = n(p)), h || g(), f;
},
y = function () {
p &&
(function (t) {
(0, i.p)(m, e, [t]);
})(p),
(p = s.M_);
};
return (
((o = { cancel: y, refresh: v })[l] = function () {
return p && p[l] ? p[l]() : h;
}),
(o[c] = function () {
return (h = !0), p && p[c] && p[c](), f;
}),
(o[u] = g),
(o[d] = !1),
(f = o),
(0, a.Ux)(f, d, {
get: function () {
return !!p;
},
set: function (e) {
!e && p && y(), e && !p && v();
},
}),
{
h: f,
dn: function () {
p = s.M_;
},
}
);
})(t, function (t) {
if (t) {
if (t.refresh) return t.refresh(), t;
(0, i.p)(m, e, [t]);
}
return (0, i.p)(g, e, f);
});
return y.h;
}
function h(e, t) {
return f(this, !0, s.DQ, (0, r.K)(arguments));
}
function p(e, t, n) {
return f(this, !0, e, (0, r.K)(arguments, 1));
}
function g(e, t) {
return f(this, !1, s.DQ, (0, r.K)(arguments));
}
},
5396: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.oneDataSystemClientFactory = void 0),
(t.oneDataSystemClientFactory = async (e, t, r) => {
let i = await (async (e, t, r) => {
const i = await Promise.resolve().then(() => o(n(670))),
s = await Promise.resolve().then(() => o(n(8916))),
a = new i.AppInsightsCore(),
c = new s.PostChannel(),
u = {
instrumentationKey: e,
endpointUrl:
"https://mobile.events.data.microsoft.com/OneCollector/1.0",
loggingLevelTelemetry: 0,
loggingLevelConsole: 0,
disableCookiesUsage: !0,
disableDbgExt: !0,
disableInstrumentationKeyValidation: !0,
channels: [[c]],
};
if (r) {
u.extensionConfig = {};
const e = { alwaysUseXhrOverride: !0, httpXHROverride: r };
u.extensionConfig[c.identifier] = e;
}
const l = t.workspace
.getConfiguration("telemetry")
.get("internalTesting");
return (
a.initialize(u, []),
a.addTelemetryInitializer((e) => {
l &&
((e.ext = e.ext ?? {}),
(e.ext.utc = e.ext.utc ?? {}),
(e.ext.utc.flags = 8462029));
}),
a
);
})(e, t, r);
return {
logEvent: (e, t) => {
try {
i?.track({
name: e,
baseData: {
name: e,
properties: t?.properties,
measurements: t?.measurements,
},
});
} catch (e) {
throw new Error(
"Failed to log event to app insights!\n" + e.message
);
}
},
flush: async () => {
try {
return new Promise((e, t) => {
i
? i.flush(!0, (e) => {
e || t("Failed to flush app 1DS!");
})
: e();
});
} catch (e) {
throw new Error("Failed to flush 1DS!\n" + e.message);
}
},
dispose: async () =>
new Promise((e) => {
i
? i.unload(
!1,
() => {
e(), (i = void 0);
},
1e3
)
: e();
}),
};
});
},
2468: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.appInsightsClientFactory = void 0);
const s = n(740),
a = n(8393);
t.appInsightsClientFactory = async (e, t, r) => {
let i;
try {
const r = await Promise.resolve().then(() => o(n(1380)));
if (
((i = new r.ApplicationInsights({
instrumentationKey: e,
disableAjaxTracking: !0,
disableExceptionTracking: !0,
disableFetchTracking: !0,
disableCorrelationHeaders: !0,
disableCookiesUsage: !0,
autoTrackPageVisitTime: !1,
emitLineDelimitedJson: !1,
disableInstrumentationKeyValidation: !0,
})),
t)
) {
i.config.extensionConfig = {};
const e = { alwaysUseXhrOverride: !0, httpXHROverride: t };
i.config.extensionConfig[s.BreezeChannelIdentifier] = e;
}
} catch (e) {
return Promise.reject(e);
}
return {
logEvent: (e, t) => {
const n = { ...t?.properties, ...t?.measurements };
r?.length && a.TelemetryUtil.applyReplacements(n, r),
i?.track({
name: e,
data: n,
baseType: "EventData",
baseData: {
name: e,
properties: t?.properties,
measurements: t?.measurements,
},
});
},
flush: async () => {
i?.flush(!1);
},
dispose: async () =>
new Promise((e) => {
i?.unload(
!0,
() => {
e(), (i = void 0);
},
1e3
);
}),
};
};
},
6548: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.BaseTelemetryReporter = void 0),
(t.BaseTelemetryReporter = class {
constructor(e, t, n) {
(this.telemetrySender = e),
(this.vscodeAPI = t),
(this.userOptIn = !1),
(this.errorOptIn = !1),
(this.disposables = []),
(this._onDidChangeTelemetryLevel =
new this.vscodeAPI.EventEmitter()),
(this.onDidChangeTelemetryLevel =
this._onDidChangeTelemetryLevel.event),
(this.telemetryLogger =
this.vscodeAPI.env.createTelemetryLogger(
this.telemetrySender,
n
)),
this.updateUserOptIn(),
this.telemetryLogger.onDidChangeEnableStates(() => {
this.updateUserOptIn();
});
}
updateUserOptIn() {
(this.errorOptIn = this.telemetryLogger.isErrorsEnabled),
(this.userOptIn = this.telemetryLogger.isUsageEnabled),
(this.telemetryLogger.isErrorsEnabled ||
this.telemetryLogger.isUsageEnabled) &&
this.telemetrySender.instantiateSender(),
this._onDidChangeTelemetryLevel.fire(this.telemetryLevel);
}
get telemetryLevel() {
return this.errorOptIn && this.userOptIn
? "all"
: this.errorOptIn
? "error"
: "off";
}
internalSendTelemetryEvent(e, t, n, r) {
r
? this.telemetrySender.sendEventData(e, {
properties: t,
measurements: n,
})
: this.telemetryLogger.logUsage(e, {
properties: t,
measurements: n,
});
}
sendTelemetryEvent(e, t, n) {
this.internalSendTelemetryEvent(e, t, n, !1);
}
sendRawTelemetryEvent(e, t, n) {
const r = { ...t };
for (const e of Object.keys(r ?? {})) {
const t = r[e];
"string" == typeof e &&
void 0 !== t &&
(r[e] = new this.vscodeAPI.TelemetryTrustedValue(
"string" == typeof t ? t : t.value
));
}
this.sendTelemetryEvent(e, r, n);
}
sendDangerousTelemetryEvent(e, t, n) {
this.telemetrySender.instantiateSender(),
this.internalSendTelemetryEvent(e, t, n, !0);
}
internalSendTelemetryErrorEvent(e, t, n, r) {
r
? this.telemetrySender.sendEventData(e, {
properties: t,
measurements: n,
})
: this.telemetryLogger.logError(e, {
properties: t,
measurements: n,
});
}
sendTelemetryErrorEvent(e, t, n) {
this.internalSendTelemetryErrorEvent(e, t, n, !1);
}
sendDangerousTelemetryErrorEvent(e, t, n) {
this.telemetrySender.instantiateSender(),
this.internalSendTelemetryErrorEvent(e, t, n, !0);
}
async dispose() {
return (
await this.telemetrySender.dispose(),
this.telemetryLogger.dispose(),
Promise.all(this.disposables.map((e) => e.dispose()))
);
}
});
},
2396: (e, t) => {
"use strict";
var n;
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.BaseTelemetrySender = void 0),
(function (e) {
(e[(e.NOT_INSTANTIATED = 0)] = "NOT_INSTANTIATED"),
(e[(e.INSTANTIATING = 1)] = "INSTANTIATING"),
(e[(e.INSTANTIATED = 2)] = "INSTANTIATED");
})(n || (n = {})),
(t.BaseTelemetrySender = class {
constructor(e, t) {
(this._instantiationStatus = n.NOT_INSTANTIATED),
(this._eventQueue = []),
(this._exceptionQueue = []),
(this._clientFactory = t),
(this._key = e);
}
sendEventData(e, t) {
this._telemetryClient
? this._telemetryClient.logEvent(e, t)
: this._instantiationStatus !== n.INSTANTIATED &&
this._eventQueue.push({ eventName: e, data: t });
}
sendErrorData(e, t) {
if (!this._telemetryClient)
return void (
this._instantiationStatus !== n.INSTANTIATED &&
this._exceptionQueue.push({ exception: e, data: t })
);
const r = { stack: e.stack, message: e.message, name: e.name };
t
? (t.properties = { ...t.properties, ...r })
: (t = { properties: r }),
this._telemetryClient.logEvent("unhandlederror", t);
}
async flush() {
return this._telemetryClient?.flush();
}
async dispose() {
this._telemetryClient &&
(await this._telemetryClient.dispose(),
(this._telemetryClient = void 0));
}
_flushQueues() {
this._eventQueue.forEach(({ eventName: e, data: t }) =>
this.sendEventData(e, t)
),
(this._eventQueue = []),
this._exceptionQueue.forEach(({ exception: e, data: t }) =>
this.sendErrorData(e, t)
),
(this._exceptionQueue = []);
}
instantiateSender() {
this._instantiationStatus === n.NOT_INSTANTIATED &&
((this._instantiationStatus = n.INSTANTIATING),
this._clientFactory(this._key)
.then((e) => {
(this._telemetryClient = e),
(this._instantiationStatus = n.INSTANTIATED),
this._flushQueues();
})
.catch((e) => {
console.error(e),
(this._instantiationStatus = n.INSTANTIATED);
}));
}
});
},
8393: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.TelemetryUtil = void 0);
class n {
static applyReplacements(e, t) {
for (const n of Object.keys(e))
for (const r of t)
r.lookup.test(n) &&
(void 0 !== r.replacementString
? (e[n] = r.replacementString)
: delete e[n]);
}
static shouldUseOneDataSystemSDK(e) {
return (
74 === e.length &&
"-" === e[32] &&
"-" === e[41] &&
"-" === e[46] &&
"-" === e[51] &&
"-" === e[56] &&
"-" === e[69]
);
}
static getAdditionalCommonProperties(e) {
return {
"common.os": e.platform,
"common.nodeArch": e.architecture,
"common.platformversion": (e.release || "").replace(
/^(\d+)(\.\d+)?(\.\d+)?(.*)/,
"$1$2$3"
),
"common.telemetryclientversion": "0.9.0",
};
}
static getInstance() {
return n._instance || (n._instance = new n()), n._instance;
}
}
t.TelemetryUtil = n;
},
1170: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 });
const s = o(n(857)),
a = o(n(1398)),
c = o(n(5692)),
u = n(6548),
l = n(2396),
d = n(8393),
f = n(5396),
h = n(2468);
function p() {
return {
sendPOST: (e, t) => {
const n = {
method: "POST",
headers: {
...e.headers,
"Content-Type": "application/json",
"Content-Length": Buffer.byteLength(e.data),
},
};
try {
const r = c.request(e.urlString, n, (e) => {
e.on("data", function (n) {
t(e.statusCode ?? 200, e.headers, n.toString());
}),
e.on("error", function () {
t(0, {});
});
});
r.write(e.data, (e) => {
e && t(0, {});
}),
r.end();
} catch {
t(0, {});
}
},
};
}
class g extends u.BaseTelemetryReporter {
constructor(e, t) {
let n = (e) => (0, h.appInsightsClientFactory)(e, p(), t);
d.TelemetryUtil.shouldUseOneDataSystemSDK(e) &&
(n = (e) => (0, f.oneDataSystemClientFactory)(e, a, p()));
const r = {
release: s.release(),
platform: s.platform(),
architecture: s.arch(),
},
i = new l.BaseTelemetrySender(e, n);
if (e && 0 === e.indexOf("AIF-"))
throw new Error(
"AIF keys are no longer supported. Please switch to 1DS keys for 1st party extensions"
);
super(i, a, {
additionalCommonProperties:
d.TelemetryUtil.getAdditionalCommonProperties(r),
});
}
}
t.default = g;
},
6386: (e, t) => {
"use strict";
var n;
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.Cancellation = void 0),
((n = t.Cancellation || (t.Cancellation = {})).addData = function (
e
) {
if (void 0 !== e.$cancellationData)
throw new Error(
"Message already has a property $cancellationData"
);
const t = new SharedArrayBuffer(4),
n = new Int32Array(t, 0, 1);
return (
(n[0] = 0),
(e.$cancellationData = t),
() => {
Atomics.store(n, 0, 1);
}
);
}),
(n.retrieveCheck = function (e) {
if (!(e instanceof SharedArrayBuffer)) return () => !1;
const t = new Int32Array(e.$cancellationData, 0, 1);
return () => 1 === Atomics.load(t, 0);
});
},
5887: (e, t, n) => {
"use strict";
function r(e, t = !1) {
const n = e.length;
let r = 0,
a = "",
c = 0,
u = 16,
l = 0,
d = 0,
f = 0,
h = 0,
p = 0;
function g(t, n) {
let i = 0,
o = 0;
for (; i < t || !n; ) {
let t = e.charCodeAt(r);
if (t >= 48 && t <= 57) o = 16 * o + t - 48;
else if (t >= 65 && t <= 70) o = 16 * o + t - 65 + 10;
else {
if (!(t >= 97 && t <= 102)) break;
o = 16 * o + t - 97 + 10;
}
r++, i++;
}
return i < t && (o = -1), o;
}
function m() {
if (((a = ""), (p = 0), (c = r), (d = l), (h = f), r >= n))
return (c = n), (u = 17);
let t = e.charCodeAt(r);
if (i(t)) {
do {
r++, (a += String.fromCharCode(t)), (t = e.charCodeAt(r));
} while (i(t));
return (u = 15);
}
if (o(t))
return (
r++,
(a += String.fromCharCode(t)),
13 === t && 10 === e.charCodeAt(r) && (r++, (a += "\n")),
l++,
(f = r),
(u = 14)
);
switch (t) {
case 123:
return r++, (u = 1);
case 125:
return r++, (u = 2);
case 91:
return r++, (u = 3);
case 93:
return r++, (u = 4);
case 58:
return r++, (u = 6);
case 44:
return r++, (u = 5);
case 34:
return (
r++,
(a = (function () {
let t = "",
i = r;
for (;;) {
if (r >= n) {
(t += e.substring(i, r)), (p = 2);
break;
}
const s = e.charCodeAt(r);
if (34 === s) {
(t += e.substring(i, r)), r++;
break;
}
if (92 !== s) {
if (s >= 0 && s <= 31) {
if (o(s)) {
(t += e.substring(i, r)), (p = 2);
break;
}
p = 6;
}
r++;
} else {
if (((t += e.substring(i, r)), r++, r >= n)) {
p = 2;
break;
}
switch (e.charCodeAt(r++)) {
case 34:
t += '"';
break;
case 92:
t += "\\";
break;
case 47:
t += "/";
break;
case 98:
t += "\b";
break;
case 102:
t += "\f";
break;
case 110:
t += "\n";
break;
case 114:
t += "\r";
break;
case 116:
t += "\t";
break;
case 117:
const e = g(4, !0);
e >= 0 ? (t += String.fromCharCode(e)) : (p = 4);
break;
default:
p = 5;
}
i = r;
}
}
return t;
})()),
(u = 10)
);
case 47:
const i = r - 1;
if (47 === e.charCodeAt(r + 1)) {
for (r += 2; r < n && !o(e.charCodeAt(r)); ) r++;
return (a = e.substring(i, r)), (u = 12);
}
if (42 === e.charCodeAt(r + 1)) {
r += 2;
const t = n - 1;
let s = !1;
for (; r < t; ) {
const t = e.charCodeAt(r);
if (42 === t && 47 === e.charCodeAt(r + 1)) {
(r += 2), (s = !0);
break;
}
r++,
o(t) &&
(13 === t && 10 === e.charCodeAt(r) && r++,
l++,
(f = r));
}
return s || (r++, (p = 1)), (a = e.substring(i, r)), (u = 13);
}
return (a += String.fromCharCode(t)), r++, (u = 16);
case 45:
if (
((a += String.fromCharCode(t)),
r++,
r === n || !s(e.charCodeAt(r)))
)
return (u = 16);
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
return (
(a += (function () {
let t = r;
if (48 === e.charCodeAt(r)) r++;
else for (r++; r < e.length && s(e.charCodeAt(r)); ) r++;
if (r < e.length && 46 === e.charCodeAt(r)) {
if ((r++, !(r < e.length && s(e.charCodeAt(r)))))
return (p = 3), e.substring(t, r);
for (r++; r < e.length && s(e.charCodeAt(r)); ) r++;
}
let n = r;
if (
r < e.length &&
(69 === e.charCodeAt(r) || 101 === e.charCodeAt(r))
)
if (
(r++,
((r < e.length && 43 === e.charCodeAt(r)) ||
45 === e.charCodeAt(r)) &&
r++,
r < e.length && s(e.charCodeAt(r)))
) {
for (r++; r < e.length && s(e.charCodeAt(r)); ) r++;
n = r;
} else p = 3;
return e.substring(t, n);
})()),
(u = 11)
);
default:
for (; r < n && v(t); ) r++, (t = e.charCodeAt(r));
if (c !== r) {
switch (((a = e.substring(c, r)), a)) {
case "true":
return (u = 8);
case "false":
return (u = 9);
case "null":
return (u = 7);
}
return (u = 16);
}
return (a += String.fromCharCode(t)), r++, (u = 16);
}
}
function v(e) {
if (i(e) || o(e)) return !1;
switch (e) {
case 125:
case 93:
case 123:
case 91:
case 34:
case 58:
case 44:
case 47:
return !1;
}
return !0;
}
return {
setPosition: function (e) {
(r = e), (a = ""), (c = 0), (u = 16), (p = 0);
},
getPosition: () => r,
scan: t
? function () {
let e;
do {
e = m();
} while (e >= 12 && e <= 15);
return e;
}
: m,
getToken: () => u,
getTokenValue: () => a,
getTokenOffset: () => c,
getTokenLength: () => r - c,
getTokenStartLine: () => d,
getTokenStartCharacter: () => c - h,
getTokenError: () => p,
};
}
function i(e) {
return 32 === e || 9 === e;
}
function o(e) {
return 10 === e || 13 === e;
}
function s(e) {
return e >= 48 && e <= 57;
}
var a, c;
function u(e, t, n) {
let i, o, s, a, c;
if (t) {
for (a = t.offset, c = a + t.length, s = a; s > 0 && !d(e, s - 1); )
s--;
let r = c;
for (; r < e.length && !d(e, r); ) r++;
(o = e.substring(s, r)),
(i = (function (e, t) {
let n = 0,
r = 0;
const i = t.tabSize || 4;
for (; n < e.length; ) {
let t = e.charAt(n);
if (" " === t) r++;
else {
if ("\t" !== t) break;
r += i;
}
n++;
}
return Math.floor(r / i);
})(o, n));
} else (o = e), (i = 0), (s = 0), (a = 0), (c = e.length);
const u = (function (e, t) {
for (let e = 0; e < t.length; e++) {
const n = t.charAt(e);
if ("\r" === n)
return e + 1 < t.length && "\n" === t.charAt(e + 1)
? "\r\n"
: "\r";
if ("\n" === n) return "\n";
}
return (e && e.eol) || "\n";
})(n, e);
let f,
h = 0,
p = 0;
f = n.insertSpaces ? l(" ", n.tabSize || 4) : "\t";
let g = r(o, !1),
m = !1;
function v() {
return h > 1 ? l(u, h) + l(f, i + p) : u + l(f, i + p);
}
function y() {
let e = g.scan();
for (h = 0; 15 === e || 14 === e; )
14 === e && n.keepLines ? (h += 1) : 14 === e && (h = 1),
(e = g.scan());
return (m = 16 === e || 0 !== g.getTokenError()), e;
}
const b = [];
function _(n, r, i) {
m ||
(t && !(r < c && i > a)) ||
e.substring(r, i) === n ||
b.push({ offset: r, length: i - r, content: n });
}
let w = y();
if ((n.keepLines && h > 0 && _(l(u, h), 0, 0), 17 !== w)) {
let e = g.getTokenOffset() + s;
_(l(f, i), s, e);
}
for (; 17 !== w; ) {
let e = g.getTokenOffset() + g.getTokenLength() + s,
t = y(),
r = "",
i = !1;
for (; 0 === h && (12 === t || 13 === t); )
_(" ", e, g.getTokenOffset() + s),
(e = g.getTokenOffset() + g.getTokenLength() + s),
(i = 12 === t),
(r = i ? v() : ""),
(t = y());
if (2 === t)
1 !== w && p--,
(n.keepLines && h > 0) || (!n.keepLines && 1 !== w)
? (r = v())
: n.keepLines && (r = " ");
else if (4 === t)
3 !== w && p--,
(n.keepLines && h > 0) || (!n.keepLines && 3 !== w)
? (r = v())
: n.keepLines && (r = " ");
else {
switch (w) {
case 3:
case 1:
p++, (r = (n.keepLines && h > 0) || !n.keepLines ? v() : " ");
break;
case 5:
r = (n.keepLines && h > 0) || !n.keepLines ? v() : " ";
break;
case 12:
r = v();
break;
case 13:
h > 0 ? (r = v()) : i || (r = " ");
break;
case 6:
n.keepLines && h > 0 ? (r = v()) : i || (r = " ");
break;
case 10:
n.keepLines && h > 0 ? (r = v()) : 6 !== t || i || (r = "");
break;
case 7:
case 8:
case 9:
case 11:
case 2:
case 4:
n.keepLines && h > 0
? (r = v())
: (12 !== t && 13 !== t) || i
? 5 !== t && 17 !== t && (m = !0)
: (r = " ");
break;
case 16:
m = !0;
}
h > 0 && (12 === t || 13 === t) && (r = v());
}
17 === t &&
(r = n.keepLines && h > 0 ? v() : n.insertFinalNewline ? u : ""),
_(r, e, g.getTokenOffset() + s),
(w = t);
}
return b;
}
function l(e, t) {
let n = "";
for (let r = 0; r < t; r++) n += e;
return n;
}
function d(e, t) {
return -1 !== "\r\n".indexOf(e.charAt(t));
}
function f(e, t = [], n = c.DEFAULT) {
let r = {
type: "array",
offset: -1,
length: -1,
children: [],
parent: void 0,
};
function i(e) {
"property" === r.type &&
((r.length = e - r.offset), (r = r.parent));
}
function o(e) {
return r.children.push(e), e;
}
p(
e,
{
onObjectBegin: (e) => {
r = o({
type: "object",
offset: e,
length: -1,
parent: r,
children: [],
});
},
onObjectProperty: (e, t, n) => {
(r = o({
type: "property",
offset: t,
length: -1,
parent: r,
children: [],
})),
r.children.push({
type: "string",
value: e,
offset: t,
length: n,
parent: r,
});
},
onObjectEnd: (e, t) => {
i(e + t),
(r.length = e + t - r.offset),
(r = r.parent),
i(e + t);
},
onArrayBegin: (e, t) => {
r = o({
type: "array",
offset: e,
length: -1,
parent: r,
children: [],
});
},
onArrayEnd: (e, t) => {
(r.length = e + t - r.offset), (r = r.parent), i(e + t);
},
onLiteralValue: (e, t, n) => {
o({ type: g(e), offset: t, length: n, parent: r, value: e }),
i(t + n);
},
onSeparator: (e, t, n) => {
"property" === r.type &&
(":" === e ? (r.colonOffset = t) : "," === e && i(t));
},
onError: (e, n, r) => {
t.push({ error: e, offset: n, length: r });
},
},
n
);
const s = r.children[0];
return s && delete s.parent, s;
}
function h(e, t) {
if (!e) return;
let n = e;
for (let e of t)
if ("string" == typeof e) {
if ("object" !== n.type || !Array.isArray(n.children)) return;
let t = !1;
for (const r of n.children)
if (
Array.isArray(r.children) &&
r.children[0].value === e &&
2 === r.children.length
) {
(n = r.children[1]), (t = !0);
break;
}
if (!t) return;
} else {
const t = e;
if (
"array" !== n.type ||
t < 0 ||
!Array.isArray(n.children) ||
t >= n.children.length
)
return;
n = n.children[t];
}
return n;
}
function p(e, t, n = c.DEFAULT) {
const i = r(e, !1),
o = [];
function s(e) {
return e
? () =>
e(
i.getTokenOffset(),
i.getTokenLength(),
i.getTokenStartLine(),
i.getTokenStartCharacter()
)
: () => !0;
}
function a(e) {
return e
? () =>
e(
i.getTokenOffset(),
i.getTokenLength(),
i.getTokenStartLine(),
i.getTokenStartCharacter(),
() => o.slice()
)
: () => !0;
}
function u(e) {
return e
? (t) =>
e(
t,
i.getTokenOffset(),
i.getTokenLength(),
i.getTokenStartLine(),
i.getTokenStartCharacter()
)
: () => !0;
}
function l(e) {
return e
? (t) =>
e(
t,
i.getTokenOffset(),
i.getTokenLength(),
i.getTokenStartLine(),
i.getTokenStartCharacter(),
() => o.slice()
)
: () => !0;
}
const d = a(t.onObjectBegin),
f = l(t.onObjectProperty),
h = s(t.onObjectEnd),
p = a(t.onArrayBegin),
g = s(t.onArrayEnd),
m = l(t.onLiteralValue),
v = u(t.onSeparator),
y = s(t.onComment),
b = u(t.onError),
_ = n && n.disallowComments,
w = n && n.allowTrailingComma;
function S() {
for (;;) {
const e = i.scan();
switch (i.getTokenError()) {
case 4:
P(14);
break;
case 5:
P(15);
break;
case 3:
P(13);
break;
case 1:
_ || P(11);
break;
case 2:
P(12);
break;
case 6:
P(16);
}
switch (e) {
case 12:
case 13:
_ ? P(10) : y();
break;
case 16:
P(1);
break;
case 15:
case 14:
break;
default:
return e;
}
}
}
function P(e, t = [], n = []) {
if ((b(e), t.length + n.length > 0)) {
let e = i.getToken();
for (; 17 !== e; ) {
if (-1 !== t.indexOf(e)) {
S();
break;
}
if (-1 !== n.indexOf(e)) break;
e = S();
}
}
}
function C(e) {
const t = i.getTokenValue();
return e ? m(t) : (f(t), o.push(t)), S(), !0;
}
return (
S(),
17 === i.getToken()
? !!n.allowEmptyContent || (P(4, [], []), !1)
: (function e() {
switch (i.getToken()) {
case 3:
return (function () {
p(), S();
let t = !0,
n = !1;
for (; 4 !== i.getToken() && 17 !== i.getToken(); ) {
if (5 === i.getToken()) {
if (
(n || P(4, [], []),
v(","),
S(),
4 === i.getToken() && w)
)
break;
} else n && P(6, [], []);
t ? (o.push(0), (t = !1)) : o[o.length - 1]++,
e() || P(4, [], [4, 5]),
(n = !0);
}
return (
g(),
t || o.pop(),
4 !== i.getToken() ? P(8, [4], []) : S(),
!0
);
})();
case 1:
return (function () {
d(), S();
let t = !1;
for (; 2 !== i.getToken() && 17 !== i.getToken(); ) {
if (5 === i.getToken()) {
if (
(t || P(4, [], []),
v(","),
S(),
2 === i.getToken() && w)
)
break;
} else t && P(6, [], []);
(10 !== i.getToken()
? (P(3, [], [2, 5]), 0)
: (C(!1),
6 === i.getToken()
? (v(":"), S(), e() || P(4, [], [2, 5]))
: P(5, [], [2, 5]),
o.pop(),
1)) || P(4, [], [2, 5]),
(t = !0);
}
return (
h(), 2 !== i.getToken() ? P(7, [2], []) : S(), !0
);
})();
case 10:
return C(!0);
default:
return (function () {
switch (i.getToken()) {
case 11:
const e = i.getTokenValue();
let t = Number(e);
isNaN(t) && (P(2), (t = 0)), m(t);
break;
case 7:
m(null);
break;
case 8:
m(!0);
break;
case 9:
m(!1);
break;
default:
return !1;
}
return S(), !0;
})();
}
})()
? (17 !== i.getToken() && P(9, [], []), !0)
: (P(4, [], []), !1)
);
}
function g(e) {
switch (typeof e) {
case "boolean":
return "boolean";
case "number":
return "number";
case "string":
return "string";
case "object":
return e ? (Array.isArray(e) ? "array" : "object") : "null";
default:
return "null";
}
}
function m(e, t, n) {
if (!n.formattingOptions) return [t];
let r = v(e, t),
i = t.offset,
o = t.offset + t.content.length;
if (0 === t.length || 0 === t.content.length) {
for (; i > 0 && !d(r, i - 1); ) i--;
for (; o < r.length && !d(r, o); ) o++;
}
const s = u(
r,
{ offset: i, length: o - i },
{ ...n.formattingOptions, keepLines: !1 }
);
for (let e = s.length - 1; e >= 0; e--) {
const t = s[e];
(r = v(r, t)),
(i = Math.min(i, t.offset)),
(o = Math.max(o, t.offset + t.length)),
(o += t.content.length - t.length);
}
return [
{
offset: i,
length: e.length - (r.length - o) - i,
content: r.substring(i, o),
},
];
}
function v(e, t) {
return (
e.substring(0, t.offset) +
t.content +
e.substring(t.offset + t.length)
);
}
n.r(t),
n.d(t, {
ParseErrorCode: () => k,
ScanError: () => b,
SyntaxKind: () => _,
applyEdits: () => M,
createScanner: () => y,
findNodeAtLocation: () => C,
findNodeAtOffset: () => T,
format: () => R,
getLocation: () => w,
getNodePath: () => x,
getNodeValue: () => O,
modify: () => D,
parse: () => S,
parseTree: () => P,
printParseErrorCode: () => j,
stripComments: () => I,
visit: () => E,
}),
(function (e) {
(e[(e.lineFeed = 10)] = "lineFeed"),
(e[(e.carriageReturn = 13)] = "carriageReturn"),
(e[(e.space = 32)] = "space"),
(e[(e._0 = 48)] = "_0"),
(e[(e._1 = 49)] = "_1"),
(e[(e._2 = 50)] = "_2"),
(e[(e._3 = 51)] = "_3"),
(e[(e._4 = 52)] = "_4"),
(e[(e._5 = 53)] = "_5"),
(e[(e._6 = 54)] = "_6"),
(e[(e._7 = 55)] = "_7"),
(e[(e._8 = 56)] = "_8"),
(e[(e._9 = 57)] = "_9"),
(e[(e.a = 97)] = "a"),
(e[(e.b = 98)] = "b"),
(e[(e.c = 99)] = "c"),
(e[(e.d = 100)] = "d"),
(e[(e.e = 101)] = "e"),
(e[(e.f = 102)] = "f"),
(e[(e.g = 103)] = "g"),
(e[(e.h = 104)] = "h"),
(e[(e.i = 105)] = "i"),
(e[(e.j = 106)] = "j"),
(e[(e.k = 107)] = "k"),
(e[(e.l = 108)] = "l"),
(e[(e.m = 109)] = "m"),
(e[(e.n = 110)] = "n"),
(e[(e.o = 111)] = "o"),
(e[(e.p = 112)] = "p"),
(e[(e.q = 113)] = "q"),
(e[(e.r = 114)] = "r"),
(e[(e.s = 115)] = "s"),
(e[(e.t = 116)] = "t"),
(e[(e.u = 117)] = "u"),
(e[(e.v = 118)] = "v"),
(e[(e.w = 119)] = "w"),
(e[(e.x = 120)] = "x"),
(e[(e.y = 121)] = "y"),
(e[(e.z = 122)] = "z"),
(e[(e.A = 65)] = "A"),
(e[(e.B = 66)] = "B"),
(e[(e.C = 67)] = "C"),
(e[(e.D = 68)] = "D"),
(e[(e.E = 69)] = "E"),
(e[(e.F = 70)] = "F"),
(e[(e.G = 71)] = "G"),
(e[(e.H = 72)] = "H"),
(e[(e.I = 73)] = "I"),
(e[(e.J = 74)] = "J"),
(e[(e.K = 75)] = "K"),
(e[(e.L = 76)] = "L"),
(e[(e.M = 77)] = "M"),
(e[(e.N = 78)] = "N"),
(e[(e.O = 79)] = "O"),
(e[(e.P = 80)] = "P"),
(e[(e.Q = 81)] = "Q"),
(e[(e.R = 82)] = "R"),
(e[(e.S = 83)] = "S"),
(e[(e.T = 84)] = "T"),
(e[(e.U = 85)] = "U"),
(e[(e.V = 86)] = "V"),
(e[(e.W = 87)] = "W"),
(e[(e.X = 88)] = "X"),
(e[(e.Y = 89)] = "Y"),
(e[(e.Z = 90)] = "Z"),
(e[(e.asterisk = 42)] = "asterisk"),
(e[(e.backslash = 92)] = "backslash"),
(e[(e.closeBrace = 125)] = "closeBrace"),
(e[(e.closeBracket = 93)] = "closeBracket"),
(e[(e.colon = 58)] = "colon"),
(e[(e.comma = 44)] = "comma"),
(e[(e.dot = 46)] = "dot"),
(e[(e.doubleQuote = 34)] = "doubleQuote"),
(e[(e.minus = 45)] = "minus"),
(e[(e.openBrace = 123)] = "openBrace"),
(e[(e.openBracket = 91)] = "openBracket"),
(e[(e.plus = 43)] = "plus"),
(e[(e.slash = 47)] = "slash"),
(e[(e.formFeed = 12)] = "formFeed"),
(e[(e.tab = 9)] = "tab");
})(a || (a = {})),
(function (e) {
e.DEFAULT = { allowTrailingComma: !1 };
})(c || (c = {}));
const y = r;
var b, _;
!(function (e) {
(e[(e.None = 0)] = "None"),
(e[(e.UnexpectedEndOfComment = 1)] = "UnexpectedEndOfComment"),
(e[(e.UnexpectedEndOfString = 2)] = "UnexpectedEndOfString"),
(e[(e.UnexpectedEndOfNumber = 3)] = "UnexpectedEndOfNumber"),
(e[(e.InvalidUnicode = 4)] = "InvalidUnicode"),
(e[(e.InvalidEscapeCharacter = 5)] = "InvalidEscapeCharacter"),
(e[(e.InvalidCharacter = 6)] = "InvalidCharacter");
})(b || (b = {})),
(function (e) {
(e[(e.OpenBraceToken = 1)] = "OpenBraceToken"),
(e[(e.CloseBraceToken = 2)] = "CloseBraceToken"),
(e[(e.OpenBracketToken = 3)] = "OpenBracketToken"),
(e[(e.CloseBracketToken = 4)] = "CloseBracketToken"),
(e[(e.CommaToken = 5)] = "CommaToken"),
(e[(e.ColonToken = 6)] = "ColonToken"),
(e[(e.NullKeyword = 7)] = "NullKeyword"),
(e[(e.TrueKeyword = 8)] = "TrueKeyword"),
(e[(e.FalseKeyword = 9)] = "FalseKeyword"),
(e[(e.StringLiteral = 10)] = "StringLiteral"),
(e[(e.NumericLiteral = 11)] = "NumericLiteral"),
(e[(e.LineCommentTrivia = 12)] = "LineCommentTrivia"),
(e[(e.BlockCommentTrivia = 13)] = "BlockCommentTrivia"),
(e[(e.LineBreakTrivia = 14)] = "LineBreakTrivia"),
(e[(e.Trivia = 15)] = "Trivia"),
(e[(e.Unknown = 16)] = "Unknown"),
(e[(e.EOF = 17)] = "EOF");
})(_ || (_ = {}));
const w = function (e, t) {
const n = [],
r = new Object();
let i;
const o = {
value: {},
offset: 0,
length: 0,
type: "object",
parent: void 0,
};
let s = !1;
function a(e, t, n, r) {
(o.value = e),
(o.offset = t),
(o.length = n),
(o.type = r),
(o.colonOffset = void 0),
(i = o);
}
try {
p(e, {
onObjectBegin: (e, o) => {
if (t <= e) throw r;
(i = void 0), (s = t > e), n.push("");
},
onObjectProperty: (e, i, o) => {
if (t < i) throw r;
if (
(a(e, i, o, "property"), (n[n.length - 1] = e), t <= i + o)
)
throw r;
},
onObjectEnd: (e, o) => {
if (t <= e) throw r;
(i = void 0), n.pop();
},
onArrayBegin: (e, o) => {
if (t <= e) throw r;
(i = void 0), n.push(0);
},
onArrayEnd: (e, o) => {
if (t <= e) throw r;
(i = void 0), n.pop();
},
onLiteralValue: (e, n, i) => {
if (t < n) throw r;
if ((a(e, n, i, g(e)), t <= n + i)) throw r;
},
onSeparator: (e, o, a) => {
if (t <= o) throw r;
if (":" === e && i && "property" === i.type)
(i.colonOffset = o), (s = !1), (i = void 0);
else if ("," === e) {
const e = n[n.length - 1];
"number" == typeof e
? (n[n.length - 1] = e + 1)
: ((s = !0), (n[n.length - 1] = "")),
(i = void 0);
}
},
});
} catch (e) {
if (e !== r) throw e;
}
return {
path: n,
previousNode: i,
isAtPropertyKey: s,
matches: (e) => {
let t = 0;
for (let r = 0; t < e.length && r < n.length; r++)
if (e[t] === n[r] || "*" === e[t]) t++;
else if ("**" !== e[t]) return !1;
return t === e.length;
},
};
},
S = function (e, t = [], n = c.DEFAULT) {
let r = null,
i = [];
const o = [];
function s(e) {
Array.isArray(i) ? i.push(e) : null !== r && (i[r] = e);
}
return (
p(
e,
{
onObjectBegin: () => {
const e = {};
s(e), o.push(i), (i = e), (r = null);
},
onObjectProperty: (e) => {
r = e;
},
onObjectEnd: () => {
i = o.pop();
},
onArrayBegin: () => {
const e = [];
s(e), o.push(i), (i = e), (r = null);
},
onArrayEnd: () => {
i = o.pop();
},
onLiteralValue: s,
onError: (e, n, r) => {
t.push({ error: e, offset: n, length: r });
},
},
n
),
i[0]
);
},
P = f,
C = h,
T = function e(t, n, r = !1) {
if (
(function (e, t, n = !1) {
return (
(t >= e.offset && t < e.offset + e.length) ||
(n && t === e.offset + e.length)
);
})(t, n, r)
) {
const i = t.children;
if (Array.isArray(i))
for (let t = 0; t < i.length && i[t].offset <= n; t++) {
const o = e(i[t], n, r);
if (o) return o;
}
return t;
}
},
x = function e(t) {
if (!t.parent || !t.parent.children) return [];
const n = e(t.parent);
if ("property" === t.parent.type) {
const e = t.parent.children[0].value;
n.push(e);
} else if ("array" === t.parent.type) {
const e = t.parent.children.indexOf(t);
-1 !== e && n.push(e);
}
return n;
},
O = function e(t) {
switch (t.type) {
case "array":
return t.children.map(e);
case "object":
const n = Object.create(null);
for (let r of t.children) {
const t = r.children[1];
t && (n[r.children[0].value] = e(t));
}
return n;
case "null":
case "string":
case "number":
case "boolean":
return t.value;
default:
return;
}
},
E = p,
I = function (e, t) {
let n,
i,
o = r(e),
s = [],
a = 0;
do {
switch (((i = o.getPosition()), (n = o.scan()), n)) {
case 12:
case 13:
case 17:
a !== i && s.push(e.substring(a, i)),
void 0 !== t &&
s.push(o.getTokenValue().replace(/[^\r\n]/g, t)),
(a = o.getPosition());
}
} while (17 !== n);
return s.join("");
};
var k;
function j(e) {
switch (e) {
case 1:
return "InvalidSymbol";
case 2:
return "InvalidNumberFormat";
case 3:
return "PropertyNameExpected";
case 4:
return "ValueExpected";
case 5:
return "ColonExpected";
case 6:
return "CommaExpected";
case 7:
return "CloseBraceExpected";
case 8:
return "CloseBracketExpected";
case 9:
return "EndOfFileExpected";
case 10:
return "InvalidCommentToken";
case 11:
return "UnexpectedEndOfComment";
case 12:
return "UnexpectedEndOfString";
case 13:
return "UnexpectedEndOfNumber";
case 14:
return "InvalidUnicode";
case 15:
return "InvalidEscapeCharacter";
case 16:
return "InvalidCharacter";
}
return "<unknown ParseErrorCode>";
}
function R(e, t, n) {
return u(e, t, n);
}
function D(e, t, n, r) {
return (function (e, t, n, r) {
const i = t.slice(),
o = f(e, []);
let s, a;
for (
;
i.length > 0 &&
((a = i.pop()), (s = h(o, i)), void 0 === s && void 0 !== n);
)
n = "string" == typeof a ? { [a]: n } : [n];
if (s) {
if (
"object" === s.type &&
"string" == typeof a &&
Array.isArray(s.children)
) {
const t = h(s, [a]);
if (void 0 !== t) {
if (void 0 === n) {
if (!t.parent) throw new Error("Malformed AST");
const n = s.children.indexOf(t.parent);
let i,
o = t.parent.offset + t.parent.length;
if (n > 0) {
let e = s.children[n - 1];
i = e.offset + e.length;
} else
(i = s.offset + 1),
s.children.length > 1 && (o = s.children[1].offset);
return m(e, { offset: i, length: o - i, content: "" }, r);
}
return m(
e,
{
offset: t.offset,
length: t.length,
content: JSON.stringify(n),
},
r
);
}
{
if (void 0 === n) return [];
const t = `${JSON.stringify(a)}: ${JSON.stringify(n)}`,
i = r.getInsertionIndex
? r.getInsertionIndex(
s.children.map((e) => e.children[0].value)
)
: s.children.length;
let o;
if (i > 0) {
let e = s.children[i - 1];
o = {
offset: e.offset + e.length,
length: 0,
content: "," + t,
};
} else
o =
0 === s.children.length
? { offset: s.offset + 1, length: 0, content: t }
: { offset: s.offset + 1, length: 0, content: t + "," };
return m(e, o, r);
}
}
if (
"array" === s.type &&
"number" == typeof a &&
Array.isArray(s.children)
) {
const t = a;
if (-1 === t) {
const t = `${JSON.stringify(n)}`;
let i;
if (0 === s.children.length)
i = { offset: s.offset + 1, length: 0, content: t };
else {
const e = s.children[s.children.length - 1];
i = {
offset: e.offset + e.length,
length: 0,
content: "," + t,
};
}
return m(e, i, r);
}
if (void 0 === n && s.children.length >= 0) {
const t = a,
n = s.children[t];
let i;
if (1 === s.children.length)
i = {
offset: s.offset + 1,
length: s.length - 2,
content: "",
};
else if (s.children.length - 1 === t) {
let e = s.children[t - 1],
n = e.offset + e.length;
i = {
offset: n,
length: s.offset + s.length - 2 - n,
content: "",
};
} else
i = {
offset: n.offset,
length: s.children[t + 1].offset - n.offset,
content: "",
};
return m(e, i, r);
}
if (void 0 !== n) {
let t;
const i = `${JSON.stringify(n)}`;
if (!r.isArrayInsertion && s.children.length > a) {
const e = s.children[a];
t = { offset: e.offset, length: e.length, content: i };
} else if (0 === s.children.length || 0 === a)
t = {
offset: s.offset + 1,
length: 0,
content: 0 === s.children.length ? i : i + ",",
};
else {
const e = a > s.children.length ? s.children.length : a,
n = s.children[e - 1];
t = {
offset: n.offset + n.length,
length: 0,
content: "," + i,
};
}
return m(e, t, r);
}
throw new Error(
`Can not ${
void 0 === n
? "remove"
: r.isArrayInsertion
? "insert"
: "modify"
} Array index ${t} as length is not sufficient`
);
}
throw new Error(
`Can not add ${
"number" != typeof a ? "index" : "property"
} to parent of type ${s.type}`
);
}
if (void 0 === n)
throw new Error("Can not delete in empty document");
return m(
e,
{
offset: o ? o.offset : 0,
length: o ? o.length : 0,
content: JSON.stringify(n),
},
r
);
})(e, t, n, r);
}
function M(e, t) {
let n = t.slice(0).sort((e, t) => {
const n = e.offset - t.offset;
return 0 === n ? e.length - t.length : n;
}),
r = e.length;
for (let t = n.length - 1; t >= 0; t--) {
let i = n[t];
if (!(i.offset + i.length <= r))
throw new Error("Overlapping edit");
(e = v(e, i)), (r = i.offset);
}
return e;
}
!(function (e) {
(e[(e.InvalidSymbol = 1)] = "InvalidSymbol"),
(e[(e.InvalidNumberFormat = 2)] = "InvalidNumberFormat"),
(e[(e.PropertyNameExpected = 3)] = "PropertyNameExpected"),
(e[(e.ValueExpected = 4)] = "ValueExpected"),
(e[(e.ColonExpected = 5)] = "ColonExpected"),
(e[(e.CommaExpected = 6)] = "CommaExpected"),
(e[(e.CloseBraceExpected = 7)] = "CloseBraceExpected"),
(e[(e.CloseBracketExpected = 8)] = "CloseBracketExpected"),
(e[(e.EndOfFileExpected = 9)] = "EndOfFileExpected"),
(e[(e.InvalidCommentToken = 10)] = "InvalidCommentToken"),
(e[(e.UnexpectedEndOfComment = 11)] = "UnexpectedEndOfComment"),
(e[(e.UnexpectedEndOfString = 12)] = "UnexpectedEndOfString"),
(e[(e.UnexpectedEndOfNumber = 13)] = "UnexpectedEndOfNumber"),
(e[(e.InvalidUnicode = 14)] = "InvalidUnicode"),
(e[(e.InvalidEscapeCharacter = 15)] = "InvalidEscapeCharacter"),
(e[(e.InvalidCharacter = 16)] = "InvalidCharacter");
})(k || (k = {}));
},
9749: (e, t, n) => {
"use strict";
const r = n(8799),
i = Symbol("max"),
o = Symbol("length"),
s = Symbol("lengthCalculator"),
a = Symbol("allowStale"),
c = Symbol("maxAge"),
u = Symbol("dispose"),
l = Symbol("noDisposeOnSet"),
d = Symbol("lruList"),
f = Symbol("cache"),
h = Symbol("updateAgeOnGet"),
p = () => 1,
g = (e, t, n) => {
const r = e[f].get(t);
if (r) {
const t = r.value;
if (m(e, t)) {
if ((y(e, r), !e[a])) return;
} else
n && (e[h] && (r.value.now = Date.now()), e[d].unshiftNode(r));
return t.value;
}
},
m = (e, t) => {
if (!t || (!t.maxAge && !e[c])) return !1;
const n = Date.now() - t.now;
return t.maxAge ? n > t.maxAge : e[c] && n > e[c];
},
v = (e) => {
if (e[o] > e[i])
for (let t = e[d].tail; e[o] > e[i] && null !== t; ) {
const n = t.prev;
y(e, t), (t = n);
}
},
y = (e, t) => {
if (t) {
const n = t.value;
e[u] && e[u](n.key, n.value),
(e[o] -= n.length),
e[f].delete(n.key),
e[d].removeNode(t);
}
};
class b {
constructor(e, t, n, r, i) {
(this.key = e),
(this.value = t),
(this.length = n),
(this.now = r),
(this.maxAge = i || 0);
}
}
const _ = (e, t, n, r) => {
let i = n.value;
m(e, i) && (y(e, n), e[a] || (i = void 0)),
i && t.call(r, i.value, i.key, e);
};
e.exports = class {
constructor(e) {
if (
("number" == typeof e && (e = { max: e }),
e || (e = {}),
e.max && ("number" != typeof e.max || e.max < 0))
)
throw new TypeError("max must be a non-negative number");
this[i] = e.max || 1 / 0;
const t = e.length || p;
if (
((this[s] = "function" != typeof t ? p : t),
(this[a] = e.stale || !1),
e.maxAge && "number" != typeof e.maxAge)
)
throw new TypeError("maxAge must be a number");
(this[c] = e.maxAge || 0),
(this[u] = e.dispose),
(this[l] = e.noDisposeOnSet || !1),
(this[h] = e.updateAgeOnGet || !1),
this.reset();
}
set max(e) {
if ("number" != typeof e || e < 0)
throw new TypeError("max must be a non-negative number");
(this[i] = e || 1 / 0), v(this);
}
get max() {
return this[i];
}
set allowStale(e) {
this[a] = !!e;
}
get allowStale() {
return this[a];
}
set maxAge(e) {
if ("number" != typeof e)
throw new TypeError("maxAge must be a non-negative number");
(this[c] = e), v(this);
}
get maxAge() {
return this[c];
}
set lengthCalculator(e) {
"function" != typeof e && (e = p),
e !== this[s] &&
((this[s] = e),
(this[o] = 0),
this[d].forEach((e) => {
(e.length = this[s](e.value, e.key)), (this[o] += e.length);
})),
v(this);
}
get lengthCalculator() {
return this[s];
}
get length() {
return this[o];
}
get itemCount() {
return this[d].length;
}
rforEach(e, t) {
t = t || this;
for (let n = this[d].tail; null !== n; ) {
const r = n.prev;
_(this, e, n, t), (n = r);
}
}
forEach(e, t) {
t = t || this;
for (let n = this[d].head; null !== n; ) {
const r = n.next;
_(this, e, n, t), (n = r);
}
}
keys() {
return this[d].toArray().map((e) => e.key);
}
values() {
return this[d].toArray().map((e) => e.value);
}
reset() {
this[u] &&
this[d] &&
this[d].length &&
this[d].forEach((e) => this[u](e.key, e.value)),
(this[f] = new Map()),
(this[d] = new r()),
(this[o] = 0);
}
dump() {
return this[d]
.map(
(e) =>
!m(this, e) && {
k: e.key,
v: e.value,
e: e.now + (e.maxAge || 0),
}
)
.toArray()
.filter((e) => e);
}
dumpLru() {
return this[d];
}
set(e, t, n) {
if ((n = n || this[c]) && "number" != typeof n)
throw new TypeError("maxAge must be a number");
const r = n ? Date.now() : 0,
a = this[s](t, e);
if (this[f].has(e)) {
if (a > this[i]) return y(this, this[f].get(e)), !1;
const s = this[f].get(e).value;
return (
this[u] && (this[l] || this[u](e, s.value)),
(s.now = r),
(s.maxAge = n),
(s.value = t),
(this[o] += a - s.length),
(s.length = a),
this.get(e),
v(this),
!0
);
}
const h = new b(e, t, a, r, n);
return h.length > this[i]
? (this[u] && this[u](e, t), !1)
: ((this[o] += h.length),
this[d].unshift(h),
this[f].set(e, this[d].head),
v(this),
!0);
}
has(e) {
if (!this[f].has(e)) return !1;
const t = this[f].get(e).value;
return !m(this, t);
}
get(e) {
return g(this, e, !0);
}
peek(e) {
return g(this, e, !1);
}
pop() {
const e = this[d].tail;
return e ? (y(this, e), e.value) : null;
}
del(e) {
y(this, this[f].get(e));
}
load(e) {
this.reset();
const t = Date.now();
for (let n = e.length - 1; n >= 0; n--) {
const r = e[n],
i = r.e || 0;
if (0 === i) this.set(r.k, r.v);
else {
const e = i - t;
e > 0 && this.set(r.k, r.v, e);
}
}
}
prune() {
this[f].forEach((e, t) => g(this, t, !1));
}
};
},
3904: (e, t, n) => {
const r = Symbol("SemVer ANY");
class i {
static get ANY() {
return r;
}
constructor(e, t) {
if (((t = o(t)), e instanceof i)) {
if (e.loose === !!t.loose) return e;
e = e.value;
}
(e = e.trim().split(/\s+/).join(" ")),
u("comparator", e, t),
(this.options = t),
(this.loose = !!t.loose),
this.parse(e),
this.semver === r
? (this.value = "")
: (this.value = this.operator + this.semver.version),
u("comp", this);
}
parse(e) {
const t = this.options.loose
? s[a.COMPARATORLOOSE]
: s[a.COMPARATOR],
n = e.match(t);
if (!n) throw new TypeError(`Invalid comparator: ${e}`);
(this.operator = void 0 !== n[1] ? n[1] : ""),
"=" === this.operator && (this.operator = ""),
n[2]
? (this.semver = new l(n[2], this.options.loose))
: (this.semver = r);
}
toString() {
return this.value;
}
test(e) {
if (
(u("Comparator.test", e, this.options.loose),
this.semver === r || e === r)
)
return !0;
if ("string" == typeof e)
try {
e = new l(e, this.options);
} catch (e) {
return !1;
}
return c(e, this.operator, this.semver, this.options);
}
intersects(e, t) {
if (!(e instanceof i))
throw new TypeError("a Comparator is required");
return "" === this.operator
? "" === this.value || new d(e.value, t).test(this.value)
: "" === e.operator
? "" === e.value || new d(this.value, t).test(e.semver)
: !(
((t = o(t)).includePrerelease &&
("<0.0.0-0" === this.value || "<0.0.0-0" === e.value)) ||
(!t.includePrerelease &&
(this.value.startsWith("<0.0.0") ||
e.value.startsWith("<0.0.0"))) ||
((!this.operator.startsWith(">") ||
!e.operator.startsWith(">")) &&
(!this.operator.startsWith("<") ||
!e.operator.startsWith("<")) &&
(this.semver.version !== e.semver.version ||
!this.operator.includes("=") ||
!e.operator.includes("=")) &&
!(
c(this.semver, "<", e.semver, t) &&
this.operator.startsWith(">") &&
e.operator.startsWith("<")
) &&
!(
c(this.semver, ">", e.semver, t) &&
this.operator.startsWith("<") &&
e.operator.startsWith(">")
))
);
}
}
e.exports = i;
const o = n(8587),
{ safeRe: s, t: a } = n(9718),
c = n(2111),
u = n(7272),
l = n(3908),
d = n(8311);
},
8311: (e, t, n) => {
class r {
constructor(e, t) {
if (((t = o(t)), e instanceof r))
return e.loose === !!t.loose &&
e.includePrerelease === !!t.includePrerelease
? e
: new r(e.raw, t);
if (e instanceof s)
return (
(this.raw = e.value), (this.set = [[e]]), this.format(), this
);
if (
((this.options = t),
(this.loose = !!t.loose),
(this.includePrerelease = !!t.includePrerelease),
(this.raw = e.trim().split(/\s+/).join(" ")),
(this.set = this.raw
.split("||")
.map((e) => this.parseRange(e))
.filter((e) => e.length)),
!this.set.length)
)
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
if (this.set.length > 1) {
const e = this.set[0];
if (
((this.set = this.set.filter((e) => !m(e[0]))),
0 === this.set.length)
)
this.set = [e];
else if (this.set.length > 1)
for (const e of this.set)
if (1 === e.length && v(e[0])) {
this.set = [e];
break;
}
}
this.format();
}
format() {
return (
(this.range = this.set
.map((e) => e.join(" ").trim())
.join("||")
.trim()),
this.range
);
}
toString() {
return this.range;
}
parseRange(e) {
const t =
((this.options.includePrerelease && p) |
(this.options.loose && g)) +
":" +
e,
n = i.get(t);
if (n) return n;
const r = this.options.loose,
o = r ? u[l.HYPHENRANGELOOSE] : u[l.HYPHENRANGE];
(e = e.replace(o, I(this.options.includePrerelease))),
a("hyphen replace", e),
(e = e.replace(u[l.COMPARATORTRIM], d)),
a("comparator trim", e);
let c = (e = (e = e.replace(u[l.TILDETRIM], f)).replace(
u[l.CARETTRIM],
h
))
.split(" ")
.map((e) => b(e, this.options))
.join(" ")
.split(/\s+/)
.map((e) => E(e, this.options));
r &&
(c = c.filter(
(e) => (
a("loose invalid filter", e, this.options),
!!e.match(u[l.COMPARATORLOOSE])
)
)),
a("range list", c);
const v = new Map(),
y = c.map((e) => new s(e, this.options));
for (const e of y) {
if (m(e)) return [e];
v.set(e.value, e);
}
v.size > 1 && v.has("") && v.delete("");
const _ = [...v.values()];
return i.set(t, _), _;
}
intersects(e, t) {
if (!(e instanceof r)) throw new TypeError("a Range is required");
return this.set.some(
(n) =>
y(n, t) &&
e.set.some(
(e) =>
y(e, t) &&
n.every((n) => e.every((e) => n.intersects(e, t)))
)
);
}
test(e) {
if (!e) return !1;
if ("string" == typeof e)
try {
e = new c(e, this.options);
} catch (e) {
return !1;
}
for (let t = 0; t < this.set.length; t++)
if (k(this.set[t], e, this.options)) return !0;
return !1;
}
}
e.exports = r;
const i = new (n(9749))({ max: 1e3 }),
o = n(8587),
s = n(3904),
a = n(7272),
c = n(3908),
{
safeRe: u,
t: l,
comparatorTrimReplace: d,
tildeTrimReplace: f,
caretTrimReplace: h,
} = n(9718),
{ FLAG_INCLUDE_PRERELEASE: p, FLAG_LOOSE: g } = n(4493),
m = (e) => "<0.0.0-0" === e.value,
v = (e) => "" === e.value,
y = (e, t) => {
let n = !0;
const r = e.slice();
let i = r.pop();
for (; n && r.length; )
(n = r.every((e) => i.intersects(e, t))), (i = r.pop());
return n;
},
b = (e, t) => (
a("comp", e, t),
(e = P(e, t)),
a("caret", e),
(e = w(e, t)),
a("tildes", e),
(e = T(e, t)),
a("xrange", e),
(e = O(e, t)),
a("stars", e),
e
),
_ = (e) => !e || "x" === e.toLowerCase() || "*" === e,
w = (e, t) =>
e
.trim()
.split(/\s+/)
.map((e) => S(e, t))
.join(" "),
S = (e, t) => {
const n = t.loose ? u[l.TILDELOOSE] : u[l.TILDE];
return e.replace(n, (t, n, r, i, o) => {
let s;
return (
a("tilde", e, t, n, r, i, o),
_(n)
? (s = "")
: _(r)
? (s = `>=${n}.0.0 <${+n + 1}.0.0-0`)
: _(i)
? (s = `>=${n}.${r}.0 <${n}.${+r + 1}.0-0`)
: o
? (a("replaceTilde pr", o),
(s = `>=${n}.${r}.${i}-${o} <${n}.${+r + 1}.0-0`))
: (s = `>=${n}.${r}.${i} <${n}.${+r + 1}.0-0`),
a("tilde return", s),
s
);
});
},
P = (e, t) =>
e
.trim()
.split(/\s+/)
.map((e) => C(e, t))
.join(" "),
C = (e, t) => {
a("caret", e, t);
const n = t.loose ? u[l.CARETLOOSE] : u[l.CARET],
r = t.includePrerelease ? "-0" : "";
return e.replace(n, (t, n, i, o, s) => {
let c;
return (
a("caret", e, t, n, i, o, s),
_(n)
? (c = "")
: _(i)
? (c = `>=${n}.0.0${r} <${+n + 1}.0.0-0`)
: _(o)
? (c =
"0" === n
? `>=${n}.${i}.0${r} <${n}.${+i + 1}.0-0`
: `>=${n}.${i}.0${r} <${+n + 1}.0.0-0`)
: s
? (a("replaceCaret pr", s),
(c =
"0" === n
? "0" === i
? `>=${n}.${i}.${o}-${s} <${n}.${i}.${+o + 1}-0`
: `>=${n}.${i}.${o}-${s} <${n}.${+i + 1}.0-0`
: `>=${n}.${i}.${o}-${s} <${+n + 1}.0.0-0`))
: (a("no pr"),
(c =
"0" === n
? "0" === i
? `>=${n}.${i}.${o}${r} <${n}.${i}.${+o + 1}-0`
: `>=${n}.${i}.${o}${r} <${n}.${+i + 1}.0-0`
: `>=${n}.${i}.${o} <${+n + 1}.0.0-0`)),
a("caret return", c),
c
);
});
},
T = (e, t) => (
a("replaceXRanges", e, t),
e
.split(/\s+/)
.map((e) => x(e, t))
.join(" ")
),
x = (e, t) => {
e = e.trim();
const n = t.loose ? u[l.XRANGELOOSE] : u[l.XRANGE];
return e.replace(n, (n, r, i, o, s, c) => {
a("xRange", e, n, r, i, o, s, c);
const u = _(i),
l = u || _(o),
d = l || _(s),
f = d;
return (
"=" === r && f && (r = ""),
(c = t.includePrerelease ? "-0" : ""),
u
? (n = ">" === r || "<" === r ? "<0.0.0-0" : "*")
: r && f
? (l && (o = 0),
(s = 0),
">" === r
? ((r = ">="),
l
? ((i = +i + 1), (o = 0), (s = 0))
: ((o = +o + 1), (s = 0)))
: "<=" === r &&
((r = "<"), l ? (i = +i + 1) : (o = +o + 1)),
"<" === r && (c = "-0"),
(n = `${r + i}.${o}.${s}${c}`))
: l
? (n = `>=${i}.0.0${c} <${+i + 1}.0.0-0`)
: d && (n = `>=${i}.${o}.0${c} <${i}.${+o + 1}.0-0`),
a("xRange return", n),
n
);
});
},
O = (e, t) => (
a("replaceStars", e, t), e.trim().replace(u[l.STAR], "")
),
E = (e, t) => (
a("replaceGTE0", e, t),
e.trim().replace(u[t.includePrerelease ? l.GTE0PRE : l.GTE0], "")
),
I = (e) => (t, n, r, i, o, s, a, c, u, l, d, f, h) =>
`${(n = _(r)
? ""
: _(i)
? `>=${r}.0.0${e ? "-0" : ""}`
: _(o)
? `>=${r}.${i}.0${e ? "-0" : ""}`
: s
? `>=${n}`
: `>=${n}${e ? "-0" : ""}`)} ${(c = _(u)
? ""
: _(l)
? `<${+u + 1}.0.0-0`
: _(d)
? `<${u}.${+l + 1}.0-0`
: f
? `<=${u}.${l}.${d}-${f}`
: e
? `<${u}.${l}.${+d + 1}-0`
: `<=${c}`)}`.trim(),
k = (e, t, n) => {
for (let n = 0; n < e.length; n++) if (!e[n].test(t)) return !1;
if (t.prerelease.length && !n.includePrerelease) {
for (let n = 0; n < e.length; n++)
if (
(a(e[n].semver),
e[n].semver !== s.ANY && e[n].semver.prerelease.length > 0)
) {
const r = e[n].semver;
if (
r.major === t.major &&
r.minor === t.minor &&
r.patch === t.patch
)
return !0;
}
return !1;
}
return !0;
};
},
3908: (e, t, n) => {
const r = n(7272),
{ MAX_LENGTH: i, MAX_SAFE_INTEGER: o } = n(4493),
{ safeRe: s, t: a } = n(9718),
c = n(8587),
{ compareIdentifiers: u } = n(1123);
class l {
constructor(e, t) {
if (((t = c(t)), e instanceof l)) {
if (
e.loose === !!t.loose &&
e.includePrerelease === !!t.includePrerelease
)
return e;
e = e.version;
} else if ("string" != typeof e)
throw new TypeError(
`Invalid version. Must be a string. Got type "${typeof e}".`
);
if (e.length > i)
throw new TypeError(`version is longer than ${i} characters`);
r("SemVer", e, t),
(this.options = t),
(this.loose = !!t.loose),
(this.includePrerelease = !!t.includePrerelease);
const n = e.trim().match(t.loose ? s[a.LOOSE] : s[a.FULL]);
if (!n) throw new TypeError(`Invalid Version: ${e}`);
if (
((this.raw = e),
(this.major = +n[1]),
(this.minor = +n[2]),
(this.patch = +n[3]),
this.major > o || this.major < 0)
)
throw new TypeError("Invalid major version");
if (this.minor > o || this.minor < 0)
throw new TypeError("Invalid minor version");
if (this.patch > o || this.patch < 0)
throw new TypeError("Invalid patch version");
n[4]
? (this.prerelease = n[4].split(".").map((e) => {
if (/^[0-9]+$/.test(e)) {
const t = +e;
if (t >= 0 && t < o) return t;
}
return e;
}))
: (this.prerelease = []),
(this.build = n[5] ? n[5].split(".") : []),
this.format();
}
format() {
return (
(this.version = `${this.major}.${this.minor}.${this.patch}`),
this.prerelease.length &&
(this.version += `-${this.prerelease.join(".")}`),
this.version
);
}
toString() {
return this.version;
}
compare(e) {
if (
(r("SemVer.compare", this.version, this.options, e),
!(e instanceof l))
) {
if ("string" == typeof e && e === this.version) return 0;
e = new l(e, this.options);
}
return e.version === this.version
? 0
: this.compareMain(e) || this.comparePre(e);
}
compareMain(e) {
return (
e instanceof l || (e = new l(e, this.options)),
u(this.major, e.major) ||
u(this.minor, e.minor) ||
u(this.patch, e.patch)
);
}
comparePre(e) {
if (
(e instanceof l || (e = new l(e, this.options)),
this.prerelease.length && !e.prerelease.length)
)
return -1;
if (!this.prerelease.length && e.prerelease.length) return 1;
if (!this.prerelease.length && !e.prerelease.length) return 0;
let t = 0;
do {
const n = this.prerelease[t],
i = e.prerelease[t];
if (
(r("prerelease compare", t, n, i), void 0 === n && void 0 === i)
)
return 0;
if (void 0 === i) return 1;
if (void 0 === n) return -1;
if (n !== i) return u(n, i);
} while (++t);
}
compareBuild(e) {
e instanceof l || (e = new l(e, this.options));
let t = 0;
do {
const n = this.build[t],
i = e.build[t];
if (
(r("prerelease compare", t, n, i), void 0 === n && void 0 === i)
)
return 0;
if (void 0 === i) return 1;
if (void 0 === n) return -1;
if (n !== i) return u(n, i);
} while (++t);
}
inc(e, t, n) {
switch (e) {
case "premajor":
(this.prerelease.length = 0),
(this.patch = 0),
(this.minor = 0),
this.major++,
this.inc("pre", t, n);
break;
case "preminor":
(this.prerelease.length = 0),
(this.patch = 0),
this.minor++,
this.inc("pre", t, n);
break;
case "prepatch":
(this.prerelease.length = 0),
this.inc("patch", t, n),
this.inc("pre", t, n);
break;
case "prerelease":
0 === this.prerelease.length && this.inc("patch", t, n),
this.inc("pre", t, n);
break;
case "major":
(0 === this.minor &&
0 === this.patch &&
0 !== this.prerelease.length) ||
this.major++,
(this.minor = 0),
(this.patch = 0),
(this.prerelease = []);
break;
case "minor":
(0 === this.patch && 0 !== this.prerelease.length) ||
this.minor++,
(this.patch = 0),
(this.prerelease = []);
break;
case "patch":
0 === this.prerelease.length && this.patch++,
(this.prerelease = []);
break;
case "pre": {
const e = Number(n) ? 1 : 0;
if (!t && !1 === n)
throw new Error(
"invalid increment argument: identifier is empty"
);
if (0 === this.prerelease.length) this.prerelease = [e];
else {
let r = this.prerelease.length;
for (; --r >= 0; )
"number" == typeof this.prerelease[r] &&
(this.prerelease[r]++, (r = -2));
if (-1 === r) {
if (t === this.prerelease.join(".") && !1 === n)
throw new Error(
"invalid increment argument: identifier already exists"
);
this.prerelease.push(e);
}
}
if (t) {
let r = [t, e];
!1 === n && (r = [t]),
0 === u(this.prerelease[0], t)
? isNaN(this.prerelease[1]) && (this.prerelease = r)
: (this.prerelease = r);
}
break;
}
default:
throw new Error(`invalid increment argument: ${e}`);
}
return (
(this.raw = this.format()),
this.build.length && (this.raw += `+${this.build.join(".")}`),
this
);
}
}
e.exports = l;
},
7414: (e, t, n) => {
const r = n(144);
e.exports = (e, t) => {
const n = r(e.trim().replace(/^[=v]+/, ""), t);
return n ? n.version : null;
};
},
2111: (e, t, n) => {
const r = n(4641),
i = n(3999),
o = n(5580),
s = n(4089),
a = n(7059),
c = n(5200);
e.exports = (e, t, n, u) => {
switch (t) {
case "===":
return (
"object" == typeof e && (e = e.version),
"object" == typeof n && (n = n.version),
e === n
);
case "!==":
return (
"object" == typeof e && (e = e.version),
"object" == typeof n && (n = n.version),
e !== n
);
case "":
case "=":
case "==":
return r(e, n, u);
case "!=":
return i(e, n, u);
case ">":
return o(e, n, u);
case ">=":
return s(e, n, u);
case "<":
return a(e, n, u);
case "<=":
return c(e, n, u);
default:
throw new TypeError(`Invalid operator: ${t}`);
}
};
},
6170: (e, t, n) => {
const r = n(3908),
i = n(144),
{ safeRe: o, t: s } = n(9718);
e.exports = (e, t) => {
if (e instanceof r) return e;
if (("number" == typeof e && (e = String(e)), "string" != typeof e))
return null;
let n = null;
if ((t = t || {}).rtl) {
let t;
for (
;
(t = o[s.COERCERTL].exec(e)) &&
(!n || n.index + n[0].length !== e.length);
)
(n && t.index + t[0].length === n.index + n[0].length) || (n = t),
(o[s.COERCERTL].lastIndex =
t.index + t[1].length + t[2].length);
o[s.COERCERTL].lastIndex = -1;
} else n = e.match(o[s.COERCE]);
return null === n
? null
: i(`${n[2]}.${n[3] || "0"}.${n[4] || "0"}`, t);
};
},
909: (e, t, n) => {
const r = n(3908);
e.exports = (e, t, n) => {
const i = new r(e, n),
o = new r(t, n);
return i.compare(o) || i.compareBuild(o);
};
},
1763: (e, t, n) => {
const r = n(560);
e.exports = (e, t) => r(e, t, !0);
},
560: (e, t, n) => {
const r = n(3908);
e.exports = (e, t, n) => new r(e, n).compare(new r(t, n));
},
1832: (e, t, n) => {
const r = n(144);
e.exports = (e, t) => {
const n = r(e, null, !0),
i = r(t, null, !0),
o = n.compare(i);
if (0 === o) return null;
const s = o > 0,
a = s ? n : i,
c = s ? i : n,
u = !!a.prerelease.length;
if (c.prerelease.length && !u)
return c.patch || c.minor
? a.patch
? "patch"
: a.minor
? "minor"
: "major"
: "major";
const l = u ? "pre" : "";
return n.major !== i.major
? l + "major"
: n.minor !== i.minor
? l + "minor"
: n.patch !== i.patch
? l + "patch"
: "prerelease";
};
},
4641: (e, t, n) => {
const r = n(560);
e.exports = (e, t, n) => 0 === r(e, t, n);
},
5580: (e, t, n) => {
const r = n(560);
e.exports = (e, t, n) => r(e, t, n) > 0;
},
4089: (e, t, n) => {
const r = n(560);
e.exports = (e, t, n) => r(e, t, n) >= 0;
},
3007: (e, t, n) => {
const r = n(3908);
e.exports = (e, t, n, i, o) => {
"string" == typeof n && ((o = i), (i = n), (n = void 0));
try {
return new r(e instanceof r ? e.version : e, n).inc(t, i, o)
.version;
} catch (e) {
return null;
}
};
},
7059: (e, t, n) => {
const r = n(560);
e.exports = (e, t, n) => r(e, t, n) < 0;
},
5200: (e, t, n) => {
const r = n(560);
e.exports = (e, t, n) => r(e, t, n) <= 0;
},
2938: (e, t, n) => {
const r = n(3908);
e.exports = (e, t) => new r(e, t).major;
},
6254: (e, t, n) => {
const r = n(3908);
e.exports = (e, t) => new r(e, t).minor;
},
3999: (e, t, n) => {
const r = n(560);
e.exports = (e, t, n) => 0 !== r(e, t, n);
},
144: (e, t, n) => {
const r = n(3908);
e.exports = (e, t, n = !1) => {
if (e instanceof r) return e;
try {
return new r(e, t);
} catch (e) {
if (!n) return null;
throw e;
}
};
},
9255: (e, t, n) => {
const r = n(3908);
e.exports = (e, t) => new r(e, t).patch;
},
1729: (e, t, n) => {
const r = n(144);
e.exports = (e, t) => {
const n = r(e, t);
return n && n.prerelease.length ? n.prerelease : null;
};
},
9970: (e, t, n) => {
const r = n(560);
e.exports = (e, t, n) => r(t, e, n);
},
4277: (e, t, n) => {
const r = n(909);
e.exports = (e, t) => e.sort((e, n) => r(n, e, t));
},
7638: (e, t, n) => {
const r = n(8311);
e.exports = (e, t, n) => {
try {
t = new r(t, n);
} catch (e) {
return !1;
}
return t.test(e);
};
},
3927: (e, t, n) => {
const r = n(909);
e.exports = (e, t) => e.sort((e, n) => r(e, n, t));
},
6953: (e, t, n) => {
const r = n(144);
e.exports = (e, t) => {
const n = r(e, t);
return n ? n.version : null;
};
},
9589: (e, t, n) => {
const r = n(9718),
i = n(4493),
o = n(3908),
s = n(1123),
a = n(144),
c = n(6953),
u = n(7414),
l = n(3007),
d = n(1832),
f = n(2938),
h = n(6254),
p = n(9255),
g = n(1729),
m = n(560),
v = n(9970),
y = n(1763),
b = n(909),
_ = n(3927),
w = n(4277),
S = n(5580),
P = n(7059),
C = n(4641),
T = n(3999),
x = n(4089),
O = n(5200),
E = n(2111),
I = n(6170),
k = n(3904),
j = n(8311),
R = n(7638),
D = n(7631),
M = n(9628),
A = n(7889),
F = n(1261),
L = n(3874),
N = n(7075),
V = n(5571),
K = n(5342),
$ = n(6780),
B = n(2525),
U = n(5032);
e.exports = {
parse: a,
valid: c,
clean: u,
inc: l,
diff: d,
major: f,
minor: h,
patch: p,
prerelease: g,
compare: m,
rcompare: v,
compareLoose: y,
compareBuild: b,
sort: _,
rsort: w,
gt: S,
lt: P,
eq: C,
neq: T,
gte: x,
lte: O,
cmp: E,
coerce: I,
Comparator: k,
Range: j,
satisfies: R,
toComparators: D,
maxSatisfying: M,
minSatisfying: A,
minVersion: F,
validRange: L,
outside: N,
gtr: V,
ltr: K,
intersects: $,
simplifyRange: B,
subset: U,
SemVer: o,
re: r.re,
src: r.src,
tokens: r.t,
SEMVER_SPEC_VERSION: i.SEMVER_SPEC_VERSION,
RELEASE_TYPES: i.RELEASE_TYPES,
compareIdentifiers: s.compareIdentifiers,
rcompareIdentifiers: s.rcompareIdentifiers,
};
},
4493: (e) => {
const t = Number.MAX_SAFE_INTEGER || 9007199254740991;
e.exports = {
MAX_LENGTH: 256,
MAX_SAFE_COMPONENT_LENGTH: 16,
MAX_SAFE_INTEGER: t,
RELEASE_TYPES: [
"major",
"premajor",
"minor",
"preminor",
"patch",
"prepatch",
"prerelease",
],
SEMVER_SPEC_VERSION: "2.0.0",
FLAG_INCLUDE_PRERELEASE: 1,
FLAG_LOOSE: 2,
};
},
7272: (e) => {
const t =
"object" == typeof process &&
process.env &&
process.env.NODE_DEBUG &&
/\bsemver\b/i.test(process.env.NODE_DEBUG)
? (...e) => console.error("SEMVER", ...e)
: () => {};
e.exports = t;
},
1123: (e) => {
const t = /^[0-9]+$/,
n = (e, n) => {
const r = t.test(e),
i = t.test(n);
return (
r && i && ((e = +e), (n = +n)),
e === n ? 0 : r && !i ? -1 : i && !r ? 1 : e < n ? -1 : 1
);
};
e.exports = {
compareIdentifiers: n,
rcompareIdentifiers: (e, t) => n(t, e),
};
},
8587: (e) => {
const t = Object.freeze({ loose: !0 }),
n = Object.freeze({});
e.exports = (e) => (e ? ("object" != typeof e ? t : e) : n);
},
9718: (e, t, n) => {
const { MAX_SAFE_COMPONENT_LENGTH: r } = n(4493),
i = n(7272),
o = ((t = e.exports = {}).re = []),
s = (t.safeRe = []),
a = (t.src = []),
c = (t.t = {});
let u = 0;
const l = (e, t, n) => {
const r = t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),
l = u++;
i(e, l, t),
(c[e] = l),
(a[l] = t),
(o[l] = new RegExp(t, n ? "g" : void 0)),
(s[l] = new RegExp(r, n ? "g" : void 0));
};
l("NUMERICIDENTIFIER", "0|[1-9]\\d*"),
l("NUMERICIDENTIFIERLOOSE", "[0-9]+"),
l("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"),
l(
"MAINVERSION",
`(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})\\.(${
a[c.NUMERICIDENTIFIER]
})`
),
l(
"MAINVERSIONLOOSE",
`(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${
a[c.NUMERICIDENTIFIERLOOSE]
})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})`
),
l(
"PRERELEASEIDENTIFIER",
`(?:${a[c.NUMERICIDENTIFIER]}|${a[c.NONNUMERICIDENTIFIER]})`
),
l(
"PRERELEASEIDENTIFIERLOOSE",
`(?:${a[c.NUMERICIDENTIFIERLOOSE]}|${a[c.NONNUMERICIDENTIFIER]})`
),
l(
"PRERELEASE",
`(?:-(${a[c.PRERELEASEIDENTIFIER]}(?:\\.${
a[c.PRERELEASEIDENTIFIER]
})*))`
),
l(
"PRERELEASELOOSE",
`(?:-?(${a[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${
a[c.PRERELEASEIDENTIFIERLOOSE]
})*))`
),
l("BUILDIDENTIFIER", "[0-9A-Za-z-]+"),
l(
"BUILD",
`(?:\\+(${a[c.BUILDIDENTIFIER]}(?:\\.${a[c.BUILDIDENTIFIER]})*))`
),
l(
"FULLPLAIN",
`v?${a[c.MAINVERSION]}${a[c.PRERELEASE]}?${a[c.BUILD]}?`
),
l("FULL", `^${a[c.FULLPLAIN]}$`),
l(
"LOOSEPLAIN",
`[v=\\s]*${a[c.MAINVERSIONLOOSE]}${a[c.PRERELEASELOOSE]}?${
a[c.BUILD]
}?`
),
l("LOOSE", `^${a[c.LOOSEPLAIN]}$`),
l("GTLT", "((?:<|>)?=?)"),
l("XRANGEIDENTIFIERLOOSE", `${a[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),
l("XRANGEIDENTIFIER", `${a[c.NUMERICIDENTIFIER]}|x|X|\\*`),
l(
"XRANGEPLAIN",
`[v=\\s]*(${a[c.XRANGEIDENTIFIER]})(?:\\.(${
a[c.XRANGEIDENTIFIER]
})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:${a[c.PRERELEASE]})?${
a[c.BUILD]
}?)?)?`
),
l(
"XRANGEPLAINLOOSE",
`[v=\\s]*(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${
a[c.XRANGEIDENTIFIERLOOSE]
})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:${
a[c.PRERELEASELOOSE]
})?${a[c.BUILD]}?)?)?`
),
l("XRANGE", `^${a[c.GTLT]}\\s*${a[c.XRANGEPLAIN]}$`),
l("XRANGELOOSE", `^${a[c.GTLT]}\\s*${a[c.XRANGEPLAINLOOSE]}$`),
l(
"COERCE",
`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`
),
l("COERCERTL", a[c.COERCE], !0),
l("LONETILDE", "(?:~>?)"),
l("TILDETRIM", `(\\s*)${a[c.LONETILDE]}\\s+`, !0),
(t.tildeTrimReplace = "$1~"),
l("TILDE", `^${a[c.LONETILDE]}${a[c.XRANGEPLAIN]}$`),
l("TILDELOOSE", `^${a[c.LONETILDE]}${a[c.XRANGEPLAINLOOSE]}$`),
l("LONECARET", "(?:\\^)"),
l("CARETTRIM", `(\\s*)${a[c.LONECARET]}\\s+`, !0),
(t.caretTrimReplace = "$1^"),
l("CARET", `^${a[c.LONECARET]}${a[c.XRANGEPLAIN]}$`),
l("CARETLOOSE", `^${a[c.LONECARET]}${a[c.XRANGEPLAINLOOSE]}$`),
l("COMPARATORLOOSE", `^${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]})$|^$`),
l("COMPARATOR", `^${a[c.GTLT]}\\s*(${a[c.FULLPLAIN]})$|^$`),
l(
"COMPARATORTRIM",
`(\\s*)${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]}|${a[c.XRANGEPLAIN]})`,
!0
),
(t.comparatorTrimReplace = "$1$2$3"),
l(
"HYPHENRANGE",
`^\\s*(${a[c.XRANGEPLAIN]})\\s+-\\s+(${a[c.XRANGEPLAIN]})\\s*$`
),
l(
"HYPHENRANGELOOSE",
`^\\s*(${a[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${
a[c.XRANGEPLAINLOOSE]
})\\s*$`
),
l("STAR", "(<|>)?=?\\s*\\*"),
l("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"),
l("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
},
5571: (e, t, n) => {
const r = n(7075);
e.exports = (e, t, n) => r(e, t, ">", n);
},
6780: (e, t, n) => {
const r = n(8311);
e.exports = (e, t, n) => (
(e = new r(e, n)), (t = new r(t, n)), e.intersects(t, n)
);
},
5342: (e, t, n) => {
const r = n(7075);
e.exports = (e, t, n) => r(e, t, "<", n);
},
9628: (e, t, n) => {
const r = n(3908),
i = n(8311);
e.exports = (e, t, n) => {
let o = null,
s = null,
a = null;
try {
a = new i(t, n);
} catch (e) {
return null;
}
return (
e.forEach((e) => {
a.test(e) &&
((o && -1 !== s.compare(e)) || ((o = e), (s = new r(o, n))));
}),
o
);
};
},
7889: (e, t, n) => {
const r = n(3908),
i = n(8311);
e.exports = (e, t, n) => {
let o = null,
s = null,
a = null;
try {
a = new i(t, n);
} catch (e) {
return null;
}
return (
e.forEach((e) => {
a.test(e) &&
((o && 1 !== s.compare(e)) || ((o = e), (s = new r(o, n))));
}),
o
);
};
},
1261: (e, t, n) => {
const r = n(3908),
i = n(8311),
o = n(5580);
e.exports = (e, t) => {
e = new i(e, t);
let n = new r("0.0.0");
if (e.test(n)) return n;
if (((n = new r("0.0.0-0")), e.test(n))) return n;
n = null;
for (let t = 0; t < e.set.length; ++t) {
const i = e.set[t];
let s = null;
i.forEach((e) => {
const t = new r(e.semver.version);
switch (e.operator) {
case ">":
0 === t.prerelease.length ? t.patch++ : t.prerelease.push(0),
(t.raw = t.format());
case "":
case ">=":
(s && !o(t, s)) || (s = t);
break;
case "<":
case "<=":
break;
default:
throw new Error(`Unexpected operation: ${e.operator}`);
}
}),
!s || (n && !o(n, s)) || (n = s);
}
return n && e.test(n) ? n : null;
};
},
7075: (e, t, n) => {
const r = n(3908),
i = n(3904),
{ ANY: o } = i,
s = n(8311),
a = n(7638),
c = n(5580),
u = n(7059),
l = n(5200),
d = n(4089);
e.exports = (e, t, n, f) => {
let h, p, g, m, v;
switch (((e = new r(e, f)), (t = new s(t, f)), n)) {
case ">":
(h = c), (p = l), (g = u), (m = ">"), (v = ">=");
break;
case "<":
(h = u), (p = d), (g = c), (m = "<"), (v = "<=");
break;
default:
throw new TypeError('Must provide a hilo val of "<" or ">"');
}
if (a(e, t, f)) return !1;
for (let n = 0; n < t.set.length; ++n) {
const r = t.set[n];
let s = null,
a = null;
if (
(r.forEach((e) => {
e.semver === o && (e = new i(">=0.0.0")),
(s = s || e),
(a = a || e),
h(e.semver, s.semver, f)
? (s = e)
: g(e.semver, a.semver, f) && (a = e);
}),
s.operator === m || s.operator === v)
)
return !1;
if ((!a.operator || a.operator === m) && p(e, a.semver)) return !1;
if (a.operator === v && g(e, a.semver)) return !1;
}
return !0;
};
},
2525: (e, t, n) => {
const r = n(7638),
i = n(560);
e.exports = (e, t, n) => {
const o = [];
let s = null,
a = null;
const c = e.sort((e, t) => i(e, t, n));
for (const e of c)
r(e, t, n)
? ((a = e), s || (s = e))
: (a && o.push([s, a]), (a = null), (s = null));
s && o.push([s, null]);
const u = [];
for (const [e, t] of o)
e === t
? u.push(e)
: t || e !== c[0]
? t
? e === c[0]
? u.push(`<=${t}`)
: u.push(`${e} - ${t}`)
: u.push(`>=${e}`)
: u.push("*");
const l = u.join(" || "),
d = "string" == typeof t.raw ? t.raw : String(t);
return l.length < d.length ? l : t;
};
},
5032: (e, t, n) => {
const r = n(8311),
i = n(3904),
{ ANY: o } = i,
s = n(7638),
a = n(560),
c = [new i(">=0.0.0-0")],
u = [new i(">=0.0.0")],
l = (e, t, n) => {
if (e === t) return !0;
if (1 === e.length && e[0].semver === o) {
if (1 === t.length && t[0].semver === o) return !0;
e = n.includePrerelease ? c : u;
}
if (1 === t.length && t[0].semver === o) {
if (n.includePrerelease) return !0;
t = u;
}
const r = new Set();
let i, l, h, p, g, m, v;
for (const t of e)
">" === t.operator || ">=" === t.operator
? (i = d(i, t, n))
: "<" === t.operator || "<=" === t.operator
? (l = f(l, t, n))
: r.add(t.semver);
if (r.size > 1) return null;
if (i && l) {
if (((h = a(i.semver, l.semver, n)), h > 0)) return null;
if (0 === h && (">=" !== i.operator || "<=" !== l.operator))
return null;
}
for (const e of r) {
if (i && !s(e, String(i), n)) return null;
if (l && !s(e, String(l), n)) return null;
for (const r of t) if (!s(e, String(r), n)) return !1;
return !0;
}
let y =
!(!l || n.includePrerelease || !l.semver.prerelease.length) &&
l.semver,
b =
!(!i || n.includePrerelease || !i.semver.prerelease.length) &&
i.semver;
y &&
1 === y.prerelease.length &&
"<" === l.operator &&
0 === y.prerelease[0] &&
(y = !1);
for (const e of t) {
if (
((v = v || ">" === e.operator || ">=" === e.operator),
(m = m || "<" === e.operator || "<=" === e.operator),
i)
)
if (
(b &&
e.semver.prerelease &&
e.semver.prerelease.length &&
e.semver.major === b.major &&
e.semver.minor === b.minor &&
e.semver.patch === b.patch &&
(b = !1),
">" === e.operator || ">=" === e.operator)
) {
if (((p = d(i, e, n)), p === e && p !== i)) return !1;
} else if (">=" === i.operator && !s(i.semver, String(e), n))
return !1;
if (l)
if (
(y &&
e.semver.prerelease &&
e.semver.prerelease.length &&
e.semver.major === y.major &&
e.semver.minor === y.minor &&
e.semver.patch === y.patch &&
(y = !1),
"<" === e.operator || "<=" === e.operator)
) {
if (((g = f(l, e, n)), g === e && g !== l)) return !1;
} else if ("<=" === l.operator && !s(l.semver, String(e), n))
return !1;
if (!e.operator && (l || i) && 0 !== h) return !1;
}
return !(
(i && m && !l && 0 !== h) ||
(l && v && !i && 0 !== h) ||
b ||
y
);
},
d = (e, t, n) => {
if (!e) return t;
const r = a(e.semver, t.semver, n);
return r > 0
? e
: r < 0 || (">" === t.operator && ">=" === e.operator)
? t
: e;
},
f = (e, t, n) => {
if (!e) return t;
const r = a(e.semver, t.semver, n);
return r < 0
? e
: r > 0 || ("<" === t.operator && "<=" === e.operator)
? t
: e;
};
e.exports = (e, t, n = {}) => {
if (e === t) return !0;
(e = new r(e, n)), (t = new r(t, n));
let i = !1;
e: for (const r of e.set) {
for (const e of t.set) {
const t = l(r, e, n);
if (((i = i || null !== t), t)) continue e;
}
if (i) return !1;
}
return !0;
};
},
7631: (e, t, n) => {
const r = n(8311);
e.exports = (e, t) =>
new r(e, t).set.map((e) =>
e
.map((e) => e.value)
.join(" ")
.trim()
.split(" ")
);
},
3874: (e, t, n) => {
const r = n(8311);
e.exports = (e, t) => {
try {
return new r(e, t).range || "*";
} catch (e) {
return null;
}
};
},
2909: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ExperimentationService = void 0);
var r = n(7291);
Object.defineProperty(t, "ExperimentationService", {
enumerable: !0,
get: function () {
return r.ExperimentationService;
},
});
},
7291: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ExperimentationService = void 0);
const r = n(2845),
i = n(1924),
o = n(5761);
class s extends o.ExperimentationServiceAutoPolling {
constructor(e) {
super(
e.telemetry,
e.filterProviders || [],
null != e.refetchInterval ? e.refetchInterval : 0,
e.assignmentContextTelemetryPropertyName,
e.telemetryEventName,
e.storageKey,
e.keyValueStorage
),
(this.options = e),
this.invokeInit();
}
init() {
(this.featureProviders = []),
this.addFeatureProvider(
new r.TasApiFeatureProvider(
new i.HttpClient(this.options.endpoint),
this.telemetry,
this.filterProviders
)
),
super.init();
}
}
(t.ExperimentationService = s), (s.REFRESH_RATE_IN_MINUTES = 30);
},
5761: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ExperimentationServiceAutoPolling = void 0);
const r = n(1714),
i = n(3257);
class o extends r.ExperimentationServiceBase {
constructor(e, t, n, r, o, s, a) {
if (
(super(e, r, o, s, a),
(this.telemetry = e),
(this.filterProviders = t),
(this.refreshRateMs = n),
(this.assignmentContextTelemetryPropertyName = r),
(this.telemetryEventName = o),
(this.storageKey = s),
(this.storage = a),
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;
},
1714: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ExperimentationServiceBase = void 0);
const r = n(8823);
t.ExperimentationServiceBase = class {
get features() {
return this._features;
}
set features(e) {
(this._features = e),
this.telemetry &&
this.telemetry.setSharedProperty(
this.assignmentContextTelemetryPropertyName,
this.features.assignmentContext
);
}
constructor(e, t, n, i, o) {
(this.telemetry = e),
(this.assignmentContextTelemetryPropertyName = t),
(this.telemetryEventName = n),
(this.storageKey = i),
(this.storage = o),
(this.featuresConsumed = !1),
(this.cachedTelemetryEvents = []),
(this._features = {
features: [],
assignmentContext: "",
configs: [],
}),
this.storageKey || (this.storageKey = "ABExp.Features"),
this.storage || (o = new r.MemoryKeyValueStorage()),
(this.loadCachePromise = this.loadCachedFeatureData()),
(this.initializePromise = this.loadCachePromise),
(this.initialFetch = new Promise((e, t) => {
this.resolveInitialFetchPromise = e;
}));
}
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: [],
});
try {
this.fetchPromise = Promise.all(
this.featureProviders.map(async (e) => await e.getFeatures())
);
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) {
(this.featuresConsumed = !0),
this.PostEventToTelemetry(`${e}.${t}`);
const n = this.features.configs.find((t) => t.Id === e);
return null == 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);
}
};
},
6790: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.BaseFeatureProvider = void 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;
}
});
},
4111: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.FilteredFeatureProvider = void 0);
const r = n(6790);
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;
},
2845: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.TasApiFeatureProvider = t.TASAPI_FETCHERROR_EVENTNAME = void 0);
const r = n(4111);
t.TASAPI_FETCHERROR_EVENTNAME = "call-tas-error";
const i = "ErrorType";
class o extends r.FilteredFeatureProvider {
constructor(e, t, n) {
super(t, n),
(this.httpClient = e),
(this.telemetry = t),
(this.filterProviders = n);
}
async fetch() {
let e,
n = this.getFilters(),
r = {};
for (let e of n.keys()) {
const t = n.get(e);
r[e] = t;
}
try {
e = await this.httpClient.get({ headers: r });
} catch (e) {
const n = e,
r = new Map();
n.responseReceived && !n.responseOk
? r.set(i, "ServerError")
: !1 === n.responseReceived
? r.set(i, "NoResponse")
: r.set(i, "GenericError"),
this.telemetry.postEvent(t.TASAPI_FETCHERROR_EVENTNAME, r);
}
if (!e) throw Error(t.TASAPI_FETCHERROR_EVENTNAME);
n.keys.length > 0 && this.PostEventToTelemetry(r);
const o = e.data;
let s = o.Configs,
a = [];
for (let e of s)
if (e.Parameters)
for (let t of Object.keys(e.Parameters)) {
const n = t + (e.Parameters[t] ? "" : "cf");
a.includes(n) || a.push(n);
}
return {
features: a,
assignmentContext: o.AssignmentContext,
configs: s,
};
}
}
t.TasApiFeatureProvider = o;
},
1924: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.HttpClient = t.FetchError = void 0);
class n extends Error {
constructor(e, t, n) {
super(e), (this.responseReceived = t), (this.responseOk = n);
}
}
(t.FetchError = n),
(t.HttpClient = class {
constructor(e) {
this.endpoint = e;
}
async get(e) {
const t = await fetch(this.endpoint, {
method: "GET",
headers: null == e ? void 0 : e.headers,
});
if (!t) throw new n("No response received", !1);
if (!t.ok) throw new n("Response not ok", !0, !1);
const r = await t.json();
if (!r) throw new n("No data received", !1);
return { data: r };
}
});
},
8823: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.MemoryKeyValueStorage = void 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);
}
});
},
3257: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.PollingService = void 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());
}
});
},
1566: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.TargetPopulation =
t.getExperimentationServiceAsync =
t.getExperimentationService =
void 0);
var r = n(2493);
Object.defineProperty(t, "getExperimentationService", {
enumerable: !0,
get: function () {
return r.getExperimentationService;
},
}),
Object.defineProperty(t, "getExperimentationServiceAsync", {
enumerable: !0,
get: function () {
return r.getExperimentationServiceAsync;
},
});
var i = n(8967);
Object.defineProperty(t, "TargetPopulation", {
enumerable: !0,
get: function () {
return i.TargetPopulation;
},
});
},
8142: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.MementoKeyValueStorage = void 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);
}
});
},
9052: (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);
}
});
},
8967: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.TargetPopulation = t.Filters = t.VSCodeFilterProvider = void 0);
const r = n(1398);
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, s;
(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 = o = {})),
(function (e) {
(e.Team = "team"),
(e.Internal = "internal"),
(e.Insiders = "insider"),
(e.Public = "public");
})(s || (t.TargetPopulation = s = {}));
},
2493: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.getExperimentationServiceAsync = t.getExperimentationService =
void 0);
const r = n(8967),
i = n(2909),
o = n(1398),
s = n(8142),
a = n(9052);
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 a.default();
const f = [new r.VSCodeFilterProvider(e, t, n), ...l],
h = new s.MementoKeyValueStorage(u);
return new i.ExperimentationService({
filterProviders: f,
telemetry: c,
storageKey: "VSCode.ABExp.FeatureData",
keyValueStorage: h,
featuresTelemetryPropertyName: "",
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 s = c(e, t, n, r, i, ...o);
return await s.initializePromise, s;
});
},
4756: (e, t, n) => {
"use strict";
var r;
n.r(t),
n.d(t, { URI: () => i, Utils: () => o }),
(() => {
var e = {
470: (e) => {
function t(e) {
if ("string" != typeof e)
throw new TypeError(
"Path must be a string. Received " + JSON.stringify(e)
);
}
function n(e, t) {
for (
var n, r = "", i = 0, o = -1, s = 0, a = 0;
a <= e.length;
++a
) {
if (a < e.length) n = e.charCodeAt(a);
else {
if (47 === n) break;
n = 47;
}
if (47 === n) {
if (o === a - 1 || 1 === s);
else if (o !== a - 1 && 2 === s) {
if (
r.length < 2 ||
2 !== i ||
46 !== r.charCodeAt(r.length - 1) ||
46 !== r.charCodeAt(r.length - 2)
)
if (r.length > 2) {
var c = r.lastIndexOf("/");
if (c !== r.length - 1) {
-1 === c
? ((r = ""), (i = 0))
: (i =
(r = r.slice(0, c)).length -
1 -
r.lastIndexOf("/")),
(o = a),
(s = 0);
continue;
}
} else if (2 === r.length || 1 === r.length) {
(r = ""), (i = 0), (o = a), (s = 0);
continue;
}
t &&
(r.length > 0 ? (r += "/..") : (r = ".."), (i = 2));
} else
r.length > 0
? (r += "/" + e.slice(o + 1, a))
: (r = e.slice(o + 1, a)),
(i = a - o - 1);
(o = a), (s = 0);
} else 46 === n && -1 !== s ? ++s : (s = -1);
}
return r;
}
var r = {
resolve: function () {
for (
var e, r = "", i = !1, o = arguments.length - 1;
o >= -1 && !i;
o--
) {
var s;
o >= 0
? (s = arguments[o])
: (void 0 === e && (e = process.cwd()), (s = e)),
t(s),
0 !== s.length &&
((r = s + "/" + r), (i = 47 === s.charCodeAt(0)));
}
return (
(r = n(r, !i)),
i
? r.length > 0
? "/" + r
: "/"
: r.length > 0
? r
: "."
);
},
normalize: function (e) {
if ((t(e), 0 === e.length)) return ".";
var r = 47 === e.charCodeAt(0),
i = 47 === e.charCodeAt(e.length - 1);
return (
0 !== (e = n(e, !r)).length || r || (e = "."),
e.length > 0 && i && (e += "/"),
r ? "/" + e : e
);
},
isAbsolute: function (e) {
return t(e), e.length > 0 && 47 === e.charCodeAt(0);
},
join: function () {
if (0 === arguments.length) return ".";
for (var e, n = 0; n < arguments.length; ++n) {
var i = arguments[n];
t(i),
i.length > 0 &&
(void 0 === e ? (e = i) : (e += "/" + i));
}
return void 0 === e ? "." : r.normalize(e);
},
relative: function (e, n) {
if ((t(e), t(n), e === n)) return "";
if ((e = r.resolve(e)) === (n = r.resolve(n))) return "";
for (
var i = 1;
i < e.length && 47 === e.charCodeAt(i);
++i
);
for (
var o = e.length, s = o - i, a = 1;
a < n.length && 47 === n.charCodeAt(a);
++a
);
for (
var c = n.length - a, u = s < c ? s : c, l = -1, d = 0;
d <= u;
++d
) {
if (d === u) {
if (c > u) {
if (47 === n.charCodeAt(a + d))
return n.slice(a + d + 1);
if (0 === d) return n.slice(a + d);
} else
s > u &&
(47 === e.charCodeAt(i + d)
? (l = d)
: 0 === d && (l = 0));
break;
}
var f = e.charCodeAt(i + d);
if (f !== n.charCodeAt(a + d)) break;
47 === f && (l = d);
}
var h = "";
for (d = i + l + 1; d <= o; ++d)
(d !== o && 47 !== e.charCodeAt(d)) ||
(0 === h.length ? (h += "..") : (h += "/.."));
return h.length > 0
? h + n.slice(a + l)
: ((a += l), 47 === n.charCodeAt(a) && ++a, n.slice(a));
},
_makeLong: function (e) {
return e;
},
dirname: function (e) {
if ((t(e), 0 === e.length)) return ".";
for (
var n = e.charCodeAt(0),
r = 47 === n,
i = -1,
o = !0,
s = e.length - 1;
s >= 1;
--s
)
if (47 === (n = e.charCodeAt(s))) {
if (!o) {
i = s;
break;
}
} else o = !1;
return -1 === i
? r
? "/"
: "."
: r && 1 === i
? "//"
: e.slice(0, i);
},
basename: function (e, n) {
if (void 0 !== n && "string" != typeof n)
throw new TypeError('"ext" argument must be a string');
t(e);
var r,
i = 0,
o = -1,
s = !0;
if (
void 0 !== n &&
n.length > 0 &&
n.length <= e.length
) {
if (n.length === e.length && n === e) return "";
var a = n.length - 1,
c = -1;
for (r = e.length - 1; r >= 0; --r) {
var u = e.charCodeAt(r);
if (47 === u) {
if (!s) {
i = r + 1;
break;
}
} else
-1 === c && ((s = !1), (c = r + 1)),
a >= 0 &&
(u === n.charCodeAt(a)
? -1 == --a && (o = r)
: ((a = -1), (o = c)));
}
return (
i === o ? (o = c) : -1 === o && (o = e.length),
e.slice(i, o)
);
}
for (r = e.length - 1; r >= 0; --r)
if (47 === e.charCodeAt(r)) {
if (!s) {
i = r + 1;
break;
}
} else -1 === o && ((s = !1), (o = r + 1));
return -1 === o ? "" : e.slice(i, o);
},
extname: function (e) {
t(e);
for (
var n = -1,
r = 0,
i = -1,
o = !0,
s = 0,
a = e.length - 1;
a >= 0;
--a
) {
var c = e.charCodeAt(a);
if (47 !== c)
-1 === i && ((o = !1), (i = a + 1)),
46 === c
? -1 === n
? (n = a)
: 1 !== s && (s = 1)
: -1 !== n && (s = -1);
else if (!o) {
r = a + 1;
break;
}
}
return -1 === n ||
-1 === i ||
0 === s ||
(1 === s && n === i - 1 && n === r + 1)
? ""
: e.slice(n, i);
},
format: function (e) {
if (null === e || "object" != typeof e)
throw new TypeError(
'The "pathObject" argument must be of type Object. Received type ' +
typeof e
);
return (function (e, t) {
var n = t.dir || t.root,
r = t.base || (t.name || "") + (t.ext || "");
return n ? (n === t.root ? n + r : n + "/" + r) : r;
})(0, e);
},
parse: function (e) {
t(e);
var n = {
root: "",
dir: "",
base: "",
ext: "",
name: "",
};
if (0 === e.length) return n;
var r,
i = e.charCodeAt(0),
o = 47 === i;
o ? ((n.root = "/"), (r = 1)) : (r = 0);
for (
var s = -1,
a = 0,
c = -1,
u = !0,
l = e.length - 1,
d = 0;
l >= r;
--l
)
if (47 !== (i = e.charCodeAt(l)))
-1 === c && ((u = !1), (c = l + 1)),
46 === i
? -1 === s
? (s = l)
: 1 !== d && (d = 1)
: -1 !== s && (d = -1);
else if (!u) {
a = l + 1;
break;
}
return (
-1 === s ||
-1 === c ||
0 === d ||
(1 === d && s === c - 1 && s === a + 1)
? -1 !== c &&
(n.base = n.name =
0 === a && o ? e.slice(1, c) : e.slice(a, c))
: (0 === a && o
? ((n.name = e.slice(1, s)),
(n.base = e.slice(1, c)))
: ((n.name = e.slice(a, s)),
(n.base = e.slice(a, c))),
(n.ext = e.slice(s, c))),
a > 0
? (n.dir = e.slice(0, a - 1))
: o && (n.dir = "/"),
n
);
},
sep: "/",
delimiter: ":",
win32: null,
posix: null,
};
(r.posix = r), (e.exports = r);
},
},
t = {};
function n(r) {
var i = t[r];
if (void 0 !== i) return i.exports;
var o = (t[r] = { exports: {} });
return e[r](o, o.exports, n), o.exports;
}
(n.d = (e, t) => {
for (var r in t)
n.o(t, r) &&
!n.o(e, r) &&
Object.defineProperty(e, r, { enumerable: !0, get: t[r] });
}),
(n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)),
(n.r = (e) => {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, {
value: "Module",
}),
Object.defineProperty(e, "__esModule", { value: !0 });
});
var i = {};
(() => {
var e;
if (
(n.r(i),
n.d(i, { URI: () => p, Utils: () => T }),
"object" == typeof process)
)
e = "win32" === process.platform;
else if ("object" == typeof navigator) {
var t = navigator.userAgent;
e = t.indexOf("Windows") >= 0;
}
var r,
o,
s =
((r = function (e, t) {
return (
(r =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (e, t) {
e.__proto__ = t;
}) ||
function (e, t) {
for (var n in t)
Object.prototype.hasOwnProperty.call(t, n) &&
(e[n] = t[n]);
}),
r(e, t)
);
}),
function (e, t) {
if ("function" != typeof t && null !== t)
throw new TypeError(
"Class extends value " +
String(t) +
" is not a constructor or null"
);
function n() {
this.constructor = e;
}
r(e, t),
(e.prototype =
null === t
? Object.create(t)
: ((n.prototype = t.prototype), new n()));
}),
a = /^\w[\w\d+.-]*$/,
c = /^\//,
u = /^\/\//;
function l(e, t) {
if (!e.scheme && t)
throw new Error(
'[UriError]: Scheme is missing: {scheme: "", authority: "'
.concat(e.authority, '", path: "')
.concat(e.path, '", query: "')
.concat(e.query, '", fragment: "')
.concat(e.fragment, '"}')
);
if (e.scheme && !a.test(e.scheme))
throw new Error(
"[UriError]: Scheme contains illegal characters."
);
if (e.path)
if (e.authority) {
if (!c.test(e.path))
throw new Error(
'[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character'
);
} else if (u.test(e.path))
throw new Error(
'[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'
);
}
var d = "",
f = "/",
h =
/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,
p = (function () {
function t(e, t, n, r, i, o) {
void 0 === o && (o = !1),
"object" == typeof e
? ((this.scheme = e.scheme || d),
(this.authority = e.authority || d),
(this.path = e.path || d),
(this.query = e.query || d),
(this.fragment = e.fragment || d))
: ((this.scheme = (function (e, t) {
return e || t ? e : "file";
})(e, o)),
(this.authority = t || d),
(this.path = (function (e, t) {
switch (e) {
case "https":
case "http":
case "file":
t ? t[0] !== f && (t = f + t) : (t = f);
}
return t;
})(this.scheme, n || d)),
(this.query = r || d),
(this.fragment = i || d),
l(this, o));
}
return (
(t.isUri = function (e) {
return (
e instanceof t ||
(!!e &&
"string" == typeof e.authority &&
"string" == typeof e.fragment &&
"string" == typeof e.path &&
"string" == typeof e.query &&
"string" == typeof e.scheme &&
"string" == typeof e.fsPath &&
"function" == typeof e.with &&
"function" == typeof e.toString)
);
}),
Object.defineProperty(t.prototype, "fsPath", {
get: function () {
return _(this, !1);
},
enumerable: !1,
configurable: !0,
}),
(t.prototype.with = function (e) {
if (!e) return this;
var t = e.scheme,
n = e.authority,
r = e.path,
i = e.query,
o = e.fragment;
return (
void 0 === t
? (t = this.scheme)
: null === t && (t = d),
void 0 === n
? (n = this.authority)
: null === n && (n = d),
void 0 === r ? (r = this.path) : null === r && (r = d),
void 0 === i ? (i = this.query) : null === i && (i = d),
void 0 === o
? (o = this.fragment)
: null === o && (o = d),
t === this.scheme &&
n === this.authority &&
r === this.path &&
i === this.query &&
o === this.fragment
? this
: new m(t, n, r, i, o)
);
}),
(t.parse = function (e, t) {
void 0 === t && (t = !1);
var n = h.exec(e);
return n
? new m(
n[2] || d,
C(n[4] || d),
C(n[5] || d),
C(n[7] || d),
C(n[9] || d),
t
)
: new m(d, d, d, d, d);
}),
(t.file = function (t) {
var n = d;
if (
(e && (t = t.replace(/\\/g, f)),
t[0] === f && t[1] === f)
) {
var r = t.indexOf(f, 2);
-1 === r
? ((n = t.substring(2)), (t = f))
: ((n = t.substring(2, r)),
(t = t.substring(r) || f));
}
return new m("file", n, t, d, d);
}),
(t.from = function (e) {
var t = new m(
e.scheme,
e.authority,
e.path,
e.query,
e.fragment
);
return l(t, !0), t;
}),
(t.prototype.toString = function (e) {
return void 0 === e && (e = !1), w(this, e);
}),
(t.prototype.toJSON = function () {
return this;
}),
(t.revive = function (e) {
if (e) {
if (e instanceof t) return e;
var n = new m(e);
return (
(n._formatted = e.external),
(n._fsPath = e._sep === g ? e.fsPath : null),
n
);
}
return e;
}),
t
);
})(),
g = e ? 1 : void 0,
m = (function (e) {
function t() {
var t = (null !== e && e.apply(this, arguments)) || this;
return (t._formatted = null), (t._fsPath = null), t;
}
return (
s(t, e),
Object.defineProperty(t.prototype, "fsPath", {
get: function () {
return (
this._fsPath || (this._fsPath = _(this, !1)),
this._fsPath
);
},
enumerable: !1,
configurable: !0,
}),
(t.prototype.toString = function (e) {
return (
void 0 === e && (e = !1),
e
? w(this, !0)
: (this._formatted || (this._formatted = w(this, !1)),
this._formatted)
);
}),
(t.prototype.toJSON = function () {
var e = { $mid: 1 };
return (
this._fsPath &&
((e.fsPath = this._fsPath), (e._sep = g)),
this._formatted && (e.external = this._formatted),
this.path && (e.path = this.path),
this.scheme && (e.scheme = this.scheme),
this.authority && (e.authority = this.authority),
this.query && (e.query = this.query),
this.fragment && (e.fragment = this.fragment),
e
);
}),
t
);
})(p),
v =
(((o = {})[58] = "%3A"),
(o[47] = "%2F"),
(o[63] = "%3F"),
(o[35] = "%23"),
(o[91] = "%5B"),
(o[93] = "%5D"),
(o[64] = "%40"),
(o[33] = "%21"),
(o[36] = "%24"),
(o[38] = "%26"),
(o[39] = "%27"),
(o[40] = "%28"),
(o[41] = "%29"),
(o[42] = "%2A"),
(o[43] = "%2B"),
(o[44] = "%2C"),
(o[59] = "%3B"),
(o[61] = "%3D"),
(o[32] = "%20"),
o);
function y(e, t, n) {
for (var r = void 0, i = -1, o = 0; o < e.length; o++) {
var s = e.charCodeAt(o);
if (
(s >= 97 && s <= 122) ||
(s >= 65 && s <= 90) ||
(s >= 48 && s <= 57) ||
45 === s ||
46 === s ||
95 === s ||
126 === s ||
(t && 47 === s) ||
(n && 91 === s) ||
(n && 93 === s) ||
(n && 58 === s)
)
-1 !== i &&
((r += encodeURIComponent(e.substring(i, o))), (i = -1)),
void 0 !== r && (r += e.charAt(o));
else {
void 0 === r && (r = e.substr(0, o));
var a = v[s];
void 0 !== a
? (-1 !== i &&
((r += encodeURIComponent(e.substring(i, o))),
(i = -1)),
(r += a))
: -1 === i && (i = o);
}
}
return (
-1 !== i && (r += encodeURIComponent(e.substring(i))),
void 0 !== r ? r : e
);
}
function b(e) {
for (var t = void 0, n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
35 === r || 63 === r
? (void 0 === t && (t = e.substr(0, n)), (t += v[r]))
: void 0 !== t && (t += e[n]);
}
return void 0 !== t ? t : e;
}
function _(t, n) {
var r;
return (
(r =
t.authority && t.path.length > 1 && "file" === t.scheme
? "//".concat(t.authority).concat(t.path)
: 47 === t.path.charCodeAt(0) &&
((t.path.charCodeAt(1) >= 65 &&
t.path.charCodeAt(1) <= 90) ||
(t.path.charCodeAt(1) >= 97 &&
t.path.charCodeAt(1) <= 122)) &&
58 === t.path.charCodeAt(2)
? n
? t.path.substr(1)
: t.path[1].toLowerCase() + t.path.substr(2)
: t.path),
e && (r = r.replace(/\//g, "\\")),
r
);
}
function w(e, t) {
var n = t ? b : y,
r = "",
i = e.scheme,
o = e.authority,
s = e.path,
a = e.query,
c = e.fragment;
if (
(i && ((r += i), (r += ":")),
(o || "file" === i) && ((r += f), (r += f)),
o)
) {
var u = o.indexOf("@");
if (-1 !== u) {
var l = o.substr(0, u);
(o = o.substr(u + 1)),
-1 === (u = l.lastIndexOf(":"))
? (r += n(l, !1, !1))
: ((r += n(l.substr(0, u), !1, !1)),
(r += ":"),
(r += n(l.substr(u + 1), !1, !0))),
(r += "@");
}
-1 === (u = (o = o.toLowerCase()).lastIndexOf(":"))
? (r += n(o, !1, !0))
: ((r += n(o.substr(0, u), !1, !0)), (r += o.substr(u)));
}
if (s) {
if (
s.length >= 3 &&
47 === s.charCodeAt(0) &&
58 === s.charCodeAt(2)
)
(d = s.charCodeAt(1)) >= 65 &&
d <= 90 &&
(s = "/"
.concat(String.fromCharCode(d + 32), ":")
.concat(s.substr(3)));
else if (s.length >= 2 && 58 === s.charCodeAt(1)) {
var d;
(d = s.charCodeAt(0)) >= 65 &&
d <= 90 &&
(s = ""
.concat(String.fromCharCode(d + 32), ":")
.concat(s.substr(2)));
}
r += n(s, !0, !1);
}
return (
a && ((r += "?"), (r += n(a, !1, !1))),
c && ((r += "#"), (r += t ? c : y(c, !1, !1))),
r
);
}
function S(e) {
try {
return decodeURIComponent(e);
} catch (t) {
return e.length > 3 ? e.substr(0, 3) + S(e.substr(3)) : e;
}
}
var P = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
function C(e) {
return e.match(P)
? e.replace(P, function (e) {
return S(e);
})
: e;
}
var T,
x = n(470),
O = function (e, t, n) {
if (n || 2 === arguments.length)
for (var r, i = 0, o = t.length; i < o; i++)
(!r && i in t) ||
(r || (r = Array.prototype.slice.call(t, 0, i)),
(r[i] = t[i]));
return e.concat(r || Array.prototype.slice.call(t));
},
E = x.posix || x,
I = "/";
!(function (e) {
(e.joinPath = function (e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
return e.with({ path: E.join.apply(E, O([e.path], t, !1)) });
}),
(e.resolvePath = function (e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
var r = e.path,
i = !1;
r[0] !== I && ((r = I + r), (i = !0));
var o = E.resolve.apply(E, O([r], t, !1));
return (
i && o[0] === I && !e.authority && (o = o.substring(1)),
e.with({ path: o })
);
}),
(e.dirname = function (e) {
if (0 === e.path.length || e.path === I) return e;
var t = E.dirname(e.path);
return (
1 === t.length && 46 === t.charCodeAt(0) && (t = ""),
e.with({ path: t })
);
}),
(e.basename = function (e) {
return E.basename(e.path);
}),
(e.extname = function (e) {
return E.extname(e.path);
});
})(T || (T = {}));
})(),
(r = i);
})();
const { URI: i, Utils: o } = r;
},
259: (e) => {
"use strict";
e.exports = function (e) {
e.prototype[Symbol.iterator] = function* () {
for (let e = this.head; e; e = e.next) yield e.value;
};
};
},
8799: (e, t, n) => {
"use strict";
function r(e) {
var t = this;
if (
(t instanceof r || (t = new r()),
(t.tail = null),
(t.head = null),
(t.length = 0),
e && "function" == typeof e.forEach)
)
e.forEach(function (e) {
t.push(e);
});
else if (arguments.length > 0)
for (var n = 0, i = arguments.length; n < i; n++)
t.push(arguments[n]);
return t;
}
function i(e, t, n) {
var r = t === e.head ? new a(n, null, t, e) : new a(n, t, t.next, e);
return (
null === r.next && (e.tail = r),
null === r.prev && (e.head = r),
e.length++,
r
);
}
function o(e, t) {
(e.tail = new a(t, e.tail, null, e)),
e.head || (e.head = e.tail),
e.length++;
}
function s(e, t) {
(e.head = new a(t, null, e.head, e)),
e.tail || (e.tail = e.head),
e.length++;
}
function a(e, t, n, r) {
if (!(this instanceof a)) return new a(e, t, n, r);
(this.list = r),
(this.value = e),
t ? ((t.next = this), (this.prev = t)) : (this.prev = null),
n ? ((n.prev = this), (this.next = n)) : (this.next = null);
}
(e.exports = r),
(r.Node = a),
(r.create = r),
(r.prototype.removeNode = function (e) {
if (e.list !== this)
throw new Error(
"removing node which does not belong to this list"
);
var t = e.next,
n = e.prev;
return (
t && (t.prev = n),
n && (n.next = t),
e === this.head && (this.head = t),
e === this.tail && (this.tail = n),
e.list.length--,
(e.next = null),
(e.prev = null),
(e.list = null),
t
);
}),
(r.prototype.unshiftNode = function (e) {
if (e !== this.head) {
e.list && e.list.removeNode(e);
var t = this.head;
(e.list = this),
(e.next = t),
t && (t.prev = e),
(this.head = e),
this.tail || (this.tail = e),
this.length++;
}
}),
(r.prototype.pushNode = function (e) {
if (e !== this.tail) {
e.list && e.list.removeNode(e);
var t = this.tail;
(e.list = this),
(e.prev = t),
t && (t.next = e),
(this.tail = e),
this.head || (this.head = e),
this.length++;
}
}),
(r.prototype.push = function () {
for (var e = 0, t = arguments.length; e < t; e++)
o(this, arguments[e]);
return this.length;
}),
(r.prototype.unshift = function () {
for (var e = 0, t = arguments.length; e < t; e++)
s(this, arguments[e]);
return this.length;
}),
(r.prototype.pop = function () {
if (this.tail) {
var e = this.tail.value;
return (
(this.tail = this.tail.prev),
this.tail ? (this.tail.next = null) : (this.head = null),
this.length--,
e
);
}
}),
(r.prototype.shift = function () {
if (this.head) {
var e = this.head.value;
return (
(this.head = this.head.next),
this.head ? (this.head.prev = null) : (this.tail = null),
this.length--,
e
);
}
}),
(r.prototype.forEach = function (e, t) {
t = t || this;
for (var n = this.head, r = 0; null !== n; r++)
e.call(t, n.value, r, this), (n = n.next);
}),
(r.prototype.forEachReverse = function (e, t) {
t = t || this;
for (var n = this.tail, r = this.length - 1; null !== n; r--)
e.call(t, n.value, r, this), (n = n.prev);
}),
(r.prototype.get = function (e) {
for (var t = 0, n = this.head; null !== n && t < e; t++) n = n.next;
if (t === e && null !== n) return n.value;
}),
(r.prototype.getReverse = function (e) {
for (var t = 0, n = this.tail; null !== n && t < e; t++) n = n.prev;
if (t === e && null !== n) return n.value;
}),
(r.prototype.map = function (e, t) {
t = t || this;
for (var n = new r(), i = this.head; null !== i; )
n.push(e.call(t, i.value, this)), (i = i.next);
return n;
}),
(r.prototype.mapReverse = function (e, t) {
t = t || this;
for (var n = new r(), i = this.tail; null !== i; )
n.push(e.call(t, i.value, this)), (i = i.prev);
return n;
}),
(r.prototype.reduce = function (e, t) {
var n,
r = this.head;
if (arguments.length > 1) n = t;
else {
if (!this.head)
throw new TypeError(
"Reduce of empty list with no initial value"
);
(r = this.head.next), (n = this.head.value);
}
for (var i = 0; null !== r; i++)
(n = e(n, r.value, i)), (r = r.next);
return n;
}),
(r.prototype.reduceReverse = function (e, t) {
var n,
r = this.tail;
if (arguments.length > 1) n = t;
else {
if (!this.tail)
throw new TypeError(
"Reduce of empty list with no initial value"
);
(r = this.tail.prev), (n = this.tail.value);
}
for (var i = this.length - 1; null !== r; i--)
(n = e(n, r.value, i)), (r = r.prev);
return n;
}),
(r.prototype.toArray = function () {
for (
var e = new Array(this.length), t = 0, n = this.head;
null !== n;
t++
)
(e[t] = n.value), (n = n.next);
return e;
}),
(r.prototype.toArrayReverse = function () {
for (
var e = new Array(this.length), t = 0, n = this.tail;
null !== n;
t++
)
(e[t] = n.value), (n = n.prev);
return e;
}),
(r.prototype.slice = function (e, t) {
(t = t || this.length) < 0 && (t += this.length),
(e = e || 0) < 0 && (e += this.length);
var n = new r();
if (t < e || t < 0) return n;
e < 0 && (e = 0), t > this.length && (t = this.length);
for (var i = 0, o = this.head; null !== o && i < e; i++) o = o.next;
for (; null !== o && i < t; i++, o = o.next) n.push(o.value);
return n;
}),
(r.prototype.sliceReverse = function (e, t) {
(t = t || this.length) < 0 && (t += this.length),
(e = e || 0) < 0 && (e += this.length);
var n = new r();
if (t < e || t < 0) return n;
e < 0 && (e = 0), t > this.length && (t = this.length);
for (var i = this.length, o = this.tail; null !== o && i > t; i--)
o = o.prev;
for (; null !== o && i > e; i--, o = o.prev) n.push(o.value);
return n;
}),
(r.prototype.splice = function (e, t, ...n) {
e > this.length && (e = this.length - 1),
e < 0 && (e = this.length + e);
for (var r = 0, o = this.head; null !== o && r < e; r++) o = o.next;
var s = [];
for (r = 0; o && r < t; r++)
s.push(o.value), (o = this.removeNode(o));
for (
null === o && (o = this.tail),
o !== this.head && o !== this.tail && (o = o.prev),
r = 0;
r < n.length;
r++
)
o = i(this, o, n[r]);
return s;
}),
(r.prototype.reverse = function () {
for (
var e = this.head, t = this.tail, n = e;
null !== n;
n = n.prev
) {
var r = n.prev;
(n.prev = n.next), (n.next = r);
}
return (this.head = t), (this.tail = e), this;
});
try {
n(259)(r);
} catch (e) {}
},
6905: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.getExtensionApi = function (e, t) {
return {
getAPI(r) {
if (0 === r) return new n(e, t);
},
};
});
class n {
constructor(e, t) {
(this.onCompletionAccepted = e), (this._pluginManager = t);
}
configurePlugin(e, t) {
this._pluginManager.setConfiguration(e, t);
}
}
},
8158: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.CommandManager = void 0);
const s = o(n(1398));
t.CommandManager = class {
constructor() {
this.commands = new Map();
}
dispose() {
for (const e of this.commands.values()) e.registration.dispose();
this.commands.clear();
}
register(e) {
let t = this.commands.get(e.id);
return (
t
? (t.refCount += 1)
: ((t = {
refCount: 1,
registration: s.commands.registerCommand(
e.id,
e.execute,
e
),
}),
this.commands.set(e.id, t)),
new s.Disposable(() => {
(t.refCount -= 1),
t.refCount <= 0 &&
(t.registration.dispose(), this.commands.delete(e.id));
})
);
}
};
},
339: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ConfigurePluginCommand = void 0),
(t.ConfigurePluginCommand = class {
constructor(e) {
(this.pluginManager = e),
(this.id = "_typescript.configurePlugin");
}
execute(e, t) {
this.pluginManager.setConfiguration(e, t);
}
});
},
6096: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.JavaScriptGoToProjectConfigCommand =
t.TypeScriptGoToProjectConfigCommand =
void 0);
const r = n(270);
(t.TypeScriptGoToProjectConfigCommand = class {
constructor(e, t) {
(this.activeJsTsEditorTracker = e),
(this.lazyClientHost = t),
(this.id = "typescript.goToProjectConfig");
}
execute() {
const e = this.activeJsTsEditorTracker.activeJsTsEditor;
e &&
(0, r.openProjectConfigForFile)(
0,
this.lazyClientHost.value.serviceClient,
e.document.uri
);
}
}),
(t.JavaScriptGoToProjectConfigCommand = class {
constructor(e, t) {
(this.activeJsTsEditorTracker = e),
(this.lazyClientHost = t),
(this.id = "javascript.goToProjectConfig");
}
execute() {
const e = this.activeJsTsEditorTracker.activeJsTsEditor;
e &&
(0, r.openProjectConfigForFile)(
1,
this.lazyClientHost.value.serviceClient,
e.document.uri
);
}
});
},
2936: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.registerBaseCommands = function (e, t, n, f) {
e.register(new c.ReloadTypeScriptProjectsCommand(t)),
e.register(new c.ReloadJavaScriptProjectsCommand(t)),
e.register(new l.SelectTypeScriptVersionCommand(t)),
e.register(new a.OpenTsServerLogCommand(t)),
e.register(new u.RestartTsServerCommand(t)),
e.register(new i.TypeScriptGoToProjectConfigCommand(f, t)),
e.register(new i.JavaScriptGoToProjectConfigCommand(f, t)),
e.register(new r.ConfigurePluginCommand(n)),
e.register(new o.LearnMoreAboutRefactoringsCommand()),
e.register(new d.TSServerRequestCommand(t)),
e.register(new s.OpenJsDocLinkCommand());
});
const r = n(339),
i = n(6096),
o = n(7022),
s = n(3059),
a = n(2076),
c = n(5450),
u = n(6945),
l = n(1561),
d = n(1474);
},
7022: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.LearnMoreAboutRefactoringsCommand = void 0);
const s = o(n(1398)),
a = n(4284);
class c {
constructor() {
this.id = c.id;
}
execute() {
const e =
s.window.activeTextEditor &&
(0, a.isTypeScriptDocument)(s.window.activeTextEditor.document)
? "https://go.microsoft.com/fwlink/?linkid=2114477"
: "https://go.microsoft.com/fwlink/?linkid=2116761";
s.env.openExternal(s.Uri.parse(e));
}
}
(t.LearnMoreAboutRefactoringsCommand = c),
(c.id = "_typescript.learnMoreAboutRefactorings");
},
3059: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.OpenJsDocLinkCommand = void 0);
const s = o(n(1398));
class a {
constructor() {
this.id = a.id;
}
async execute(e) {
const { line: t, character: n } = e.position,
r = new s.Position(t, n);
await s.commands.executeCommand("vscode.open", s.Uri.from(e.file), {
selection: new s.Range(r, r),
});
}
}
(t.OpenJsDocLinkCommand = a), (a.id = "_typescript.openJsDocLink");
},
2076: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.OpenTsServerLogCommand = void 0),
(t.OpenTsServerLogCommand = class {
constructor(e) {
(this.lazyClientHost = e),
(this.id = "typescript.openTsServerLog");
}
execute() {
this.lazyClientHost.value.serviceClient.openTsServerLogFile();
}
});
},
5450: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ReloadJavaScriptProjectsCommand =
t.ReloadTypeScriptProjectsCommand =
void 0),
(t.ReloadTypeScriptProjectsCommand = class {
constructor(e) {
(this.lazyClientHost = e),
(this.id = "typescript.reloadProjects");
}
execute() {
this.lazyClientHost.value.reloadProjects();
}
}),
(t.ReloadJavaScriptProjectsCommand = class {
constructor(e) {
(this.lazyClientHost = e),
(this.id = "javascript.reloadProjects");
}
execute() {
this.lazyClientHost.value.reloadProjects();
}
});
},
6945: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.RestartTsServerCommand = void 0),
(t.RestartTsServerCommand = class {
constructor(e) {
(this.lazyClientHost = e),
(this.id = "typescript.restartTsServer");
}
execute() {
this.lazyClientHost.value.serviceClient.restartTsServer(!0);
}
});
},
1561: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.SelectTypeScriptVersionCommand = void 0);
class n {
constructor(e) {
(this.lazyClientHost = e), (this.id = n.id);
}
execute() {
this.lazyClientHost.value.serviceClient.showVersionPicker();
}
}
(t.SelectTypeScriptVersionCommand = n),
(n.id = "typescript.selectTypeScriptVersion");
},
1474: (e, t, n) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.TSServerRequestCommand = void 0);
const r = n(988);
t.TSServerRequestCommand = class {
constructor(e) {
(this.lazyClientHost = e), (this.id = "typescript.tsserverRequest");
}
execute(e, t, n) {
const i = r.nulToken;
if (
[
"emit-output",
"semanticDiagnosticsSync",
"syntacticDiagnosticsSync",
"suggestionDiagnosticsSync",
"quickinfo",
"quickinfo-full",
"completionInfo",
].includes(e)
)
return this.lazyClientHost.value.serviceClient.execute(
e,
t,
i,
n
);
}
};
},
5016: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ElectronServiceConfigurationProvider = void 0);
const s = o(n(857)),
a = o(n(6928)),
c = o(n(1398)),
u = o(n(5317)),
l = o(n(9896)),
d = n(6934),
f = n(8242);
class h extends d.BaseServiceConfigurationProvider {
fixPathPrefixes(e) {
const t = ["~" + a.sep];
for (const n of t)
if (e.startsWith(n))
return a.join(s.homedir(), e.slice(n.length));
return e;
}
readGlobalTsdk(e) {
const t = e.inspect("typescript.tsdk");
return t && "string" == typeof t.globalValue
? this.fixPathPrefixes(t.globalValue)
: null;
}
readLocalTsdk(e) {
const t = e.inspect("typescript.tsdk");
return t && "string" == typeof t.workspaceValue
? this.fixPathPrefixes(t.workspaceValue)
: null;
}
readLocalNodePath(e) {
return this.validatePath(this.readLocalNodePathWorker(e));
}
readLocalNodePathWorker(e) {
const t = e.inspect("typescript.tsserver.nodePath");
if (t?.workspaceValue && "string" == typeof t.workspaceValue) {
if ("node" === t.workspaceValue) return this.findNodePath();
const e = this.fixPathPrefixes(t.workspaceValue);
return a.isAbsolute(e)
? e
: f.RelativeWorkspacePathResolver.asAbsoluteWorkspacePath(e) ||
null;
}
return null;
}
readGlobalNodePath(e) {
return this.validatePath(this.readGlobalNodePathWorker(e));
}
readGlobalNodePathWorker(e) {
const t = e.inspect("typescript.tsserver.nodePath");
if (t?.globalValue && "string" == typeof t.globalValue) {
if ("node" === t.globalValue) return this.findNodePath();
const e = this.fixPathPrefixes(t.globalValue);
if (a.isAbsolute(e)) return e;
}
return null;
}
findNodePath() {
try {
return u
.execFileSync("node", ["-e", "console.log(process.execPath)"], {
windowsHide: !0,
timeout: 2e3,
cwd: c.workspace.workspaceFolders?.[0].uri.fsPath,
encoding: "utf-8",
})
.trim();
} catch (e) {
return (
c.window.showWarningMessage(
c.l10n.t(
"Could not detect a Node installation to run TS Server."
)
),
null
);
}
}
validatePath(e) {
return !e || (l.existsSync(e) && !l.lstatSync(e).isDirectory())
? e
: (c.window.showWarningMessage(
c.l10n.t(
"The path {0} doesn't point to a valid Node installation to run TS Server. Falling back to bundled Node.",
e
)
),
null);
}
}
t.ElectronServiceConfigurationProvider = h;
},
6934: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.BaseServiceConfigurationProvider =
t.ImplicitProjectConfiguration =
t.TsServerLogLevel =
void 0),
(t.areServiceConfigurationsEqual = function (e, t) {
return a.equals(e, t);
});
const s = o(n(1398)),
a = o(n(8851));
var c;
!(function (e) {
(e[(e.Off = 0)] = "Off"),
(e[(e.Normal = 1)] = "Normal"),
(e[(e.Terse = 2)] = "Terse"),
(e[(e.Verbose = 3)] = "Verbose");
})(c || (t.TsServerLogLevel = c = {})),
(function (e) {
(e.fromString = function (t) {
switch (t?.toLowerCase()) {
case "normal":
return e.Normal;
case "terse":
return e.Terse;
case "verbose":
return e.Verbose;
default:
return e.Off;
}
}),
(e.toString = function (t) {
switch (t) {
case e.Normal:
return "normal";
case e.Terse:
return "terse";
case e.Verbose:
return "verbose";
case e.Off:
default:
return "off";
}
});
})(c || (t.TsServerLogLevel = c = {}));
class u {
constructor(e) {
(this.target = u.readTarget(e)),
(this.module = u.readModule(e)),
(this.checkJs = u.readCheckJs(e)),
(this.experimentalDecorators = u.readExperimentalDecorators(e)),
(this.strictNullChecks = u.readImplicitStrictNullChecks(e)),
(this.strictFunctionTypes = u.readImplicitStrictFunctionTypes(e));
}
isEqualTo(e) {
return a.equals(this, e);
}
static readTarget(e) {
return e.get("js/ts.implicitProjectConfig.target");
}
static readModule(e) {
return e.get("js/ts.implicitProjectConfig.module");
}
static readCheckJs(e) {
return (
e.get("js/ts.implicitProjectConfig.checkJs") ??
e.get("javascript.implicitProjectConfig.checkJs", !1)
);
}
static readExperimentalDecorators(e) {
return (
e.get("js/ts.implicitProjectConfig.experimentalDecorators") ??
e.get(
"javascript.implicitProjectConfig.experimentalDecorators",
!1
)
);
}
static readImplicitStrictNullChecks(e) {
return e.get("js/ts.implicitProjectConfig.strictNullChecks", !0);
}
static readImplicitStrictFunctionTypes(e) {
return e.get("js/ts.implicitProjectConfig.strictFunctionTypes", !0);
}
}
(t.ImplicitProjectConfiguration = u),
(t.BaseServiceConfigurationProvider = class {
loadFromWorkspace() {
const e = s.workspace.getConfiguration();
return {
locale: this.readLocale(e),
globalTsdk: this.readGlobalTsdk(e),
localTsdk: this.readLocalTsdk(e),
npmLocation: this.readNpmLocation(e),
tsServerLogLevel: this.readTsServerLogLevel(e),
tsServerPluginPaths: this.readTsServerPluginPaths(e),
implicitProjectConfiguration: new u(e),
disableAutomaticTypeAcquisition:
this.readDisableAutomaticTypeAcquisition(e),
useSyntaxServer: this.readUseSyntaxServer(e),
webProjectWideIntellisenseEnabled:
this.readWebProjectWideIntellisenseEnable(e),
webProjectWideIntellisenseSuppressSemanticErrors:
this.readWebProjectWideIntellisenseSuppressSemanticErrors(e),
webTypeAcquisitionEnabled: this.readWebTypeAcquisition(e),
enableDiagnosticsTelemetry:
this.readEnableDiagnosticsTelemetry(e),
enableProjectDiagnostics: this.readEnableProjectDiagnostics(e),
maxTsServerMemory: this.readMaxTsServerMemory(e),
enablePromptUseWorkspaceTsdk:
this.readEnablePromptUseWorkspaceTsdk(e),
useVsCodeWatcher: this.readUseVsCodeWatcher(e),
watchOptions: this.readWatchOptions(e),
includePackageJsonAutoImports:
this.readIncludePackageJsonAutoImports(e),
enableTsServerTracing: this.readEnableTsServerTracing(e),
localNodePath: this.readLocalNodePath(e),
globalNodePath: this.readGlobalNodePath(e),
workspaceSymbolsExcludeLibrarySymbols:
this.readWorkspaceSymbolsExcludeLibrarySymbols(e),
enableRegionDiagnostics: this.readEnableRegionDiagnostics(e),
};
}
readTsServerLogLevel(e) {
const t = e.get("typescript.tsserver.log", "off");
return c.fromString(t);
}
readTsServerPluginPaths(e) {
return e.get("typescript.tsserver.pluginPaths", []);
}
readNpmLocation(e) {
return e.get("typescript.npm", null);
}
readDisableAutomaticTypeAcquisition(e) {
return e.get("typescript.disableAutomaticTypeAcquisition", !1);
}
readLocale(e) {
const t = e.get("typescript.locale", "auto");
return t && "auto" !== t ? t : null;
}
readUseSyntaxServer(e) {
switch (e.get("typescript.tsserver.useSyntaxServer")) {
case "never":
return 0;
case "always":
return 1;
case "auto":
return 2;
}
const t = e.get(
"typescript.tsserver.useSeparateSyntaxServer",
!0
);
return "forAllRequests" === t ? 1 : !0 === t ? 2 : 0;
}
readEnableDiagnosticsTelemetry(e) {
return e.get("typescript.enableDiagnosticsTelemetry", !1);
}
readEnableProjectDiagnostics(e) {
return e.get(
"typescript.tsserver.experimental.enableProjectDiagnostics",
!1
);
}
readUseVsCodeWatcher(e) {
return e.get(
"typescript.tsserver.experimental.useVsCodeWatcher",
!1
);
}
readWatchOptions(e) {
return { ...(e.get("typescript.tsserver.watchOptions") ?? {}) };
}
readIncludePackageJsonAutoImports(e) {
return e.get(
"typescript.preferences.includePackageJsonAutoImports"
);
}
readMaxTsServerMemory(e) {
const t = e.get("typescript.tsserver.maxTsServerMemory", 3072);
return Number.isSafeInteger(t) ? Math.max(t, 128) : 3072;
}
readEnablePromptUseWorkspaceTsdk(e) {
return e.get("typescript.enablePromptUseWorkspaceTsdk", !1);
}
readEnableTsServerTracing(e) {
return e.get("typescript.tsserver.enableTracing", !1);
}
readWorkspaceSymbolsExcludeLibrarySymbols(e) {
return e.get(
"typescript.workspaceSymbols.excludeLibrarySymbols",
!0
);
}
readWebProjectWideIntellisenseEnable(e) {
return e.get(
"typescript.tsserver.web.projectWideIntellisense.enabled",
!0
);
}
readWebProjectWideIntellisenseSuppressSemanticErrors(e) {
return e.get(
"typescript.tsserver.web.projectWideIntellisense.suppressSemanticErrors",
!0
);
}
readWebTypeAcquisition(e) {
return e.get(
"typescript.tsserver.web.typeAcquisition.enabled",
!1
);
}
readEnableRegionDiagnostics(e) {
return e.get("typescript.tsserver.enableRegionDiagnostics", !0);
}
});
},
6342: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.disabledSchemes =
t.chatBackingCodeBlock =
t.chatCodeBlock =
t.officeScript =
t.vscodeNotebookCell =
t.walkThroughSnippet =
t.vsls =
t.azurerepos =
t.github =
t.git =
t.untitled =
t.file =
void 0),
(t.getSemanticSupportedSchemes = function () {
return (0, a.isWeb)() && s.workspace.workspaceFolders
? s.workspace.workspaceFolders.map((e) => e.uri.scheme)
: [
t.file,
t.untitled,
t.walkThroughSnippet,
t.vscodeNotebookCell,
t.chatCodeBlock,
t.chatBackingCodeBlock,
];
}),
(t.isOfScheme = function (e, ...t) {
const n = e.scheme.toLowerCase();
return t.some((e) => n === e);
});
const s = o(n(1398)),
a = n(5588);
(t.file = "file"),
(t.untitled = "untitled"),
(t.git = "git"),
(t.github = "github"),
(t.azurerepos = "azurerepos"),
(t.vsls = "vsls"),
(t.walkThroughSnippet = "walkThroughSnippet"),
(t.vscodeNotebookCell = "vscode-notebook-cell"),
(t.officeScript = "office-script"),
(t.chatCodeBlock = "vscode-chat-code-block"),
(t.chatBackingCodeBlock = "vscode-copilot-chat-code-block"),
(t.disabledSchemes = new Set([
t.git,
t.vsls,
t.github,
t.azurerepos,
]));
},
2188: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.standardLanguageDescriptions = t.allDiagnosticLanguages = void 0),
(t.isTsConfigFileName = function (e) {
return /^tsconfig\.(.+\.)?json$/i.test((0, s.basename)(e));
}),
(t.isJsConfigOrTsConfigFileName = function (e) {
return /^[jt]sconfig\.(.+\.)?json$/i.test((0, s.basename)(e));
}),
(t.doesResourceLookLikeATypeScriptFile = function (e) {
return /\.(tsx?|mts|cts)$/i.test(e.fsPath);
}),
(t.doesResourceLookLikeAJavaScriptFile = function (e) {
return /\.(jsx?|mjs|cjs)$/i.test(e.fsPath);
});
const s = n(6928),
a = o(n(4284));
(t.allDiagnosticLanguages = [0, 1]),
(t.standardLanguageDescriptions = [
{
id: "typescript",
diagnosticOwner: "typescript",
diagnosticSource: "ts",
diagnosticLanguage: 1,
languageIds: [a.typescript, a.typescriptreact],
configFilePattern: /^tsconfig(\..*)?\.json$/i,
standardFileExtensions: ["ts", "tsx", "cts", "mts"],
},
{
id: "javascript",
diagnosticOwner: "typescript",
diagnosticSource: "ts",
diagnosticLanguage: 0,
languageIds: [a.javascript, a.javascriptreact],
configFilePattern: /^jsconfig(\..*)?\.json$/i,
standardFileExtensions: ["js", "jsx", "cjs", "mjs", "es6", "pac"],
},
]);
},
4284: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.jsTsLanguageModes =
t.jsxTags =
t.javascriptreact =
t.javascript =
t.typescriptreact =
t.typescript =
void 0),
(t.isSupportedLanguageMode = function (e) {
return (
s.languages.match(
[
t.typescript,
t.typescriptreact,
t.javascript,
t.javascriptreact,
],
e
) > 0
);
}),
(t.isTypeScriptDocument = function (e) {
return s.languages.match([t.typescript, t.typescriptreact], e) > 0;
});
const s = o(n(1398));
(t.typescript = "typescript"),
(t.typescriptreact = "typescriptreact"),
(t.javascript = "javascript"),
(t.javascriptreact = "javascriptreact"),
(t.jsxTags = "jsx-tags"),
(t.jsTsLanguageModes = [
t.javascript,
t.javascriptreact,
t.typescript,
t.typescriptreact,
]);
},
3796: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.Schemes = void 0),
(t.isOfScheme = function (e, t) {
return t.toLowerCase().startsWith(e + ":");
}),
(t.Schemes = Object.freeze({
file: "file",
untitled: "untitled",
mailto: "mailto",
vscode: "vscode",
"vscode-insiders": "vscode-insiders",
notebookCell: "vscode-notebook-cell",
}));
},
5674: (e, t) => {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ExperimentationTelemetryReporter = void 0),
(t.ExperimentationTelemetryReporter = class {
constructor(e) {
(this._sharedProperties = {}), (this._reporter = e);
}
setSharedProperty(e, t) {
this._sharedProperties[e] = t;
}
postEvent(e, t) {
const n = { ...this._sharedProperties, ...Object.fromEntries(t) };
this._reporter.sendTelemetryEvent(e, n);
}
postEventObj(e, t) {
this._reporter.sendTelemetryEvent(e, {
...this._sharedProperties,
...t,
});
}
dispose() {
this._reporter.dispose();
}
});
},
3026: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.ExperimentationService = void 0),
(t.createTasExperimentationService = c);
const s = o(n(1398)),
a = o(n(1566));
async function c(e, t, n, r) {
let i;
switch (s.env.uriScheme) {
case "vscode":
default:
i = a.TargetPopulation.Public;
break;
case "vscode-insiders":
i = a.TargetPopulation.Insiders;
break;
case "vscode-exploration":
i = a.TargetPopulation.Internal;
break;
case "code-oss":
i = a.TargetPopulation.Team;
}
const o = a.getExperimentationService(t, n, i, e, r);
return await o.initialFetch, o;
}
t.ExperimentationService = class {
constructor(e, t, n, r) {
(this._telemetryReporter = e),
(this._experimentationServicePromise = c(
this._telemetryReporter,
t,
n,
r
));
}
async getTreatmentVariable(e, t) {
const n = await this._experimentationServicePromise;
try {
return n.getTreatmentVariableAsync("vscode", e, !0);
} catch {
return t;
}
}
};
},
8284: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
},
s =
(this && this.__importDefault) ||
function (e) {
return e && e.__esModule ? e : { default: e };
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.activate = function (e) {
const t = new T.PluginManager();
e.subscriptions.push(t);
const r = new d.CommandManager();
e.subscriptions.push(r);
const i = new u.EventEmitter();
e.subscriptions.push(i);
const s = new v.NodeLogDirectoryProvider(e),
c = new b.DiskTypeScriptVersionProvider(),
x = new _.ActiveJsTsEditorTracker();
let O;
e.subscriptions.push(x);
const E = (0, C.getPackageInfo)(e);
if (E) {
const { name: t, version: n, aiKey: r } = E,
i = new a.default(r);
(O = new h.ExperimentationTelemetryReporter(i)),
e.subscriptions.push(O),
new p.ExperimentationService(O, t, n, e.globalState);
}
const I = new P.Logger(),
k = (0, g.createLazyClientHost)(
e,
(0, S.onCaseInsensitiveFileSystem)(),
{
pluginManager: t,
commandManager: r,
logDirectoryProvider: s,
cancellerFactory: m.nodeRequestCancellerFactory,
versionProvider: c,
processFactory: new y.ElectronServiceProcessFactory(),
activeJsTsEditorTracker: x,
serviceConfigurationProvider:
new w.ElectronServiceConfigurationProvider(),
experimentTelemetryReporter: O,
logger: I,
},
(e) => {
i.fire(e);
}
);
return (
(0, f.registerBaseCommands)(r, k, t, x),
Promise.resolve()
.then(() => o(n(2547)))
.then((t) => {
e.subscriptions.push(
t.register(k.map((e) => e.serviceClient))
);
}),
Promise.resolve()
.then(() => o(n(4508)))
.then((t) => {
e.subscriptions.push(t.register());
}),
e.subscriptions.push((0, g.lazilyActivateClient)(k, t, x)),
(0, l.getExtensionApi)(i.event, t)
);
}),
(t.deactivate = function () {
c.rmSync(x.instanceTempDir.value, { recursive: !0, force: !0 });
});
const a = s(n(1170)),
c = o(n(9896)),
u = o(n(1398)),
l = n(6905),
d = n(8158),
f = n(2936),
h = n(5674),
p = n(3026),
g = n(7834),
m = n(9786),
v = n(9332),
y = n(8690),
b = n(177),
_ = n(5987),
w = n(5016),
S = n(5346),
P = n(287),
C = n(9047),
T = n(4948),
x = o(n(3837));
},
1372: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, h.conditionalRegistration)(
[
(0, h.requireMinVersion)(t, p.minVersion),
(0, h.requireSomeCapability)(t, f.ClientCapability.Semantic),
],
() =>
a.languages.registerCallHierarchyProvider(e.semantic, new p(t))
);
});
const s = o(n(6928)),
a = o(n(1398)),
c = n(2276),
u = n(2811),
l = o(n(4728)),
d = o(n(2028)),
f = n(6623),
h = n(8078);
class p {
constructor(e) {
this.client = e;
}
async prepareCallHierarchy(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
const i = d.Position.toFileLocationRequestArgs(r, t),
o = await this.client.execute("prepareCallHierarchy", i, n);
return "response" === o.type && o.body
? Array.isArray(o.body)
? o.body.map(g)
: g(o.body)
: void 0;
}
async provideCallHierarchyIncomingCalls(e, t) {
const n = this.client.toTsFilePath(e.uri);
if (!n) return;
const r = d.Position.toFileLocationRequestArgs(
n,
e.selectionRange.start
),
i = await this.client.execute(
"provideCallHierarchyIncomingCalls",
r,
t
);
return "response" === i.type && i.body ? i.body.map(m) : void 0;
}
async provideCallHierarchyOutgoingCalls(e, t) {
const n = this.client.toTsFilePath(e.uri);
if (!n) return;
const r = d.Position.toFileLocationRequestArgs(
n,
e.selectionRange.start
),
i = await this.client.execute(
"provideCallHierarchyOutgoingCalls",
r,
t
);
return "response" === i.type && i.body ? i.body.map(v) : void 0;
}
}
function g(e) {
const t = (function (e) {
return (
e.kind === l.Kind.script ||
(e.kind === l.Kind.module &&
1 === e.selectionSpan.start.line &&
1 === e.selectionSpan.start.offset)
);
})(e),
n = t ? s.basename(e.file) : e.name,
r = t
? a.workspace.asRelativePath(s.dirname(e.file))
: e.containerName ?? "",
i = new a.CallHierarchyItem(
d.SymbolKind.fromProtocolScriptElementKind(e.kind),
n,
r,
a.Uri.file(e.file),
d.Range.fromTextSpan(e.span),
d.Range.fromTextSpan(e.selectionSpan)
),
o = e.kindModifiers
? (0, u.parseKindModifier)(e.kindModifiers)
: void 0;
return (
o?.has(l.KindModifiers.deprecated) &&
(i.tags = [a.SymbolTag.Deprecated]),
i
);
}
function m(e) {
return new a.CallHierarchyIncomingCall(
g(e.from),
e.fromSpans.map(d.Range.fromTextSpan)
);
}
function v(e) {
return new a.CallHierarchyOutgoingCall(
g(e.to),
e.fromSpans.map(d.Range.fromTextSpan)
);
}
p.minVersion = c.API.v380;
},
1352: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.TypeScriptBaseCodeLensProvider = t.ReferencesCodeLens = void 0),
(t.getSymbolRange = function (e, t) {
if (t.nameSpan) return a.Range.fromTextSpan(t.nameSpan);
const n = t.spans?.[0];
if (!n) return;
const r = a.Range.fromTextSpan(n),
i = e.getText(r),
o = new RegExp(
`^(.*?(\\b|\\W))${(0, c.escapeRegExp)(t.text || "")}(\\b|\\W)`,
"gm"
).exec(i),
u = o ? o.index + o[1].length : 0,
l =
e.offsetAt(new s.Position(r.start.line, r.start.character)) + u;
return new s.Range(
e.positionAt(l),
e.positionAt(l + t.text.length)
);
});
const s = o(n(1398)),
a = o(n(2028)),
c = n(7442),
u = n(4014);
class l extends s.CodeLens {
constructor(e, t, n) {
super(n), (this.document = e), (this.file = t);
}
}
t.ReferencesCodeLens = l;
class d extends u.Disposable {
constructor(e, t) {
super(),
(this.client = e),
(this.cachedResponse = t),
(this.changeEmitter = this._register(new s.EventEmitter())),
(this.onDidChangeCodeLenses = this.changeEmitter.event);
}
async provideCodeLenses(e, t) {
const n = this.client.toOpenTsFilePath(e);
if (!n) return [];
const r = await this.cachedResponse.execute(e, () =>
this.client.execute("navtree", { file: n }, t)
);
if ("response" !== r.type) return [];
const i = [];
return (
r.body?.childItems?.forEach((t) =>
this.walkNavTree(e, t, void 0, i)
),
i.map((t) => new l(e.uri, n, t))
);
}
walkNavTree(e, t, n, r) {
const i = this.extractSymbol(e, t, n);
i && r.push(i),
t.childItems?.forEach((n) => this.walkNavTree(e, n, t, r));
}
}
(t.TypeScriptBaseCodeLensProvider = d),
(d.cancelledCommand = { title: "", command: "" }),
(d.errorCommand = {
title: s.l10n.t("Could not determine references"),
command: "",
});
},
3067: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r) {
return (0, l.conditionalRegistration)(
[
(0, l.requireGlobalConfiguration)(
t.id,
"implementationsCodeLens.enabled"
),
(0, l.requireSomeCapability)(n, u.ClientCapability.Semantic),
],
() =>
s.languages.registerCodeLensProvider(e.semantic, new h(n, r, t))
);
});
const s = o(n(1398)),
a = o(n(4728)),
c = o(n(2028)),
u = n(6623),
l = n(8078),
d = n(1352),
f = n(3581);
class h extends d.TypeScriptBaseCodeLensProvider {
constructor(e, t, n) {
super(e, t),
(this._cachedResponse = t),
(this.language = n),
this._register(
s.workspace.onDidChangeConfiguration((e) => {
e.affectsConfiguration(
`${n.id}.implementationsCodeLens.showOnInterfaceMethods`
) && this.changeEmitter.fire();
})
);
}
async resolveCodeLens(e, t) {
const n = c.Position.toFileLocationRequestArgs(
e.file,
e.range.start
),
r = await this.client.execute("implementation", n, t, {
lowPriority: !0,
executionTarget: f.ExecutionTarget.Semantic,
cancelOnResourceChange: e.document,
});
if ("response" !== r.type || !r.body)
return (
(e.command =
"cancelled" === r.type
? d.TypeScriptBaseCodeLensProvider.cancelledCommand
: d.TypeScriptBaseCodeLensProvider.errorCommand),
e
);
const i = r.body
.map(
(e) =>
new s.Location(
this.client.toResource(e.file),
e.start.line === e.end.line
? c.Range.fromTextSpan(e)
: new s.Range(
c.Position.fromLocation(e.start),
new s.Position(e.start.line, 0)
)
)
)
.filter(
(t) =>
!(
t.uri.toString() === e.document.toString() &&
t.range.start.line === e.range.start.line &&
t.range.start.character === e.range.start.character
)
);
return (e.command = this.getCommand(i, e)), e;
}
getCommand(e, t) {
return {
title: this.getTitle(e),
command: e.length ? "editor.action.showReferences" : "",
arguments: [t.document, t.range.start, e],
};
}
getTitle(e) {
return 1 === e.length
? s.l10n.t("1 implementation")
: s.l10n.t("{0} implementations", e.length);
}
extractSymbol(e, t, n) {
if (
t.kind === a.Kind.method &&
n &&
n.kind === a.Kind.interface &&
s.workspace
.getConfiguration(this.language.id)
.get("implementationsCodeLens.showOnInterfaceMethods")
)
return (0, d.getSymbolRange)(e, t);
switch (t.kind) {
case a.Kind.interface:
return (0, d.getSymbolRange)(e, t);
case a.Kind.class:
case a.Kind.method:
case a.Kind.memberVariable:
case a.Kind.memberGetAccessor:
case a.Kind.memberSetAccessor:
if (t.kindModifiers.match(/\babstract\b/g))
return (0, d.getSymbolRange)(e, t);
}
}
}
t.default = h;
},
8314: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.TypeScriptReferencesCodeLensProvider = void 0),
(t.register = function (e, t, n, r) {
return (0, d.conditionalRegistration)(
[
(0, d.requireGlobalConfiguration)(
t.id,
"referencesCodeLens.enabled"
),
(0, d.requireSomeCapability)(n, l.ClientCapability.Semantic),
],
() =>
s.languages.registerCodeLensProvider(e.semantic, new h(n, r, t))
);
});
const s = o(n(1398)),
a = o(n(4728)),
c = n(3581),
u = o(n(2028)),
l = n(6623),
d = n(8078),
f = n(1352);
class h extends f.TypeScriptBaseCodeLensProvider {
constructor(e, t, n) {
super(e, t),
(this._cachedResponse = t),
(this.language = n),
this._register(
s.workspace.onDidChangeConfiguration((e) => {
e.affectsConfiguration(
`${n.id}.referencesCodeLens.showOnAllFunctions`
) && this.changeEmitter.fire();
})
);
}
async resolveCodeLens(e, t) {
const n = u.Position.toFileLocationRequestArgs(
e.file,
e.range.start
),
r = await this.client.execute("references", n, t, {
lowPriority: !0,
executionTarget: c.ExecutionTarget.Semantic,
cancelOnResourceChange: e.document,
});
if ("response" !== r.type || !r.body)
return (
(e.command =
"cancelled" === r.type
? f.TypeScriptBaseCodeLensProvider.cancelledCommand
: f.TypeScriptBaseCodeLensProvider.errorCommand),
e
);
const i = r.body.refs
.filter((e) => !e.isDefinition)
.map((e) =>
u.Location.fromTextSpan(this.client.toResource(e.file), e)
);
return (
(e.command = {
title: this.getCodeLensLabel(i),
command: i.length ? "editor.action.showReferences" : "",
arguments: [e.document, e.range.start, i],
}),
e
);
}
getCodeLensLabel(e) {
return 1 === e.length
? s.l10n.t("1 reference")
: s.l10n.t("{0} references", e.length);
}
extractSymbol(e, t, n) {
if (n && n.kind === a.Kind.enum) return (0, f.getSymbolRange)(e, t);
switch (t.kind) {
case a.Kind.function:
if (
s.workspace
.getConfiguration(this.language.id)
.get("referencesCodeLens.showOnAllFunctions") &&
t.nameSpan
)
return (0, f.getSymbolRange)(e, t);
case a.Kind.const:
case a.Kind.let:
case a.Kind.variable:
if (/\bexport\b/.test(t.kindModifiers))
return (0, f.getSymbolRange)(e, t);
break;
case a.Kind.class:
if ("<class>" === t.text) break;
return (0, f.getSymbolRange)(e, t);
case a.Kind.interface:
case a.Kind.type:
case a.Kind.enum:
return (0, f.getSymbolRange)(e, t);
case a.Kind.method:
case a.Kind.memberGetAccessor:
case a.Kind.memberSetAccessor:
case a.Kind.constructorImplementation:
case a.Kind.memberVariable:
if (
n &&
u.Position.fromLocation(n.spans[0].start).isEqual(
u.Position.fromLocation(t.spans[0].start)
)
)
return;
switch (n?.kind) {
case a.Kind.class:
case a.Kind.interface:
case a.Kind.type:
return (0, f.getSymbolRange)(e, t);
}
}
}
}
t.TypeScriptReferencesCodeLensProvider = h;
},
6052: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r, i, o, a, c) {
return (0, p.conditionalRegistration)(
[
(0, p.requireSomeCapability)(
n,
d.ClientCapability.EnhancedSyntax,
d.ClientCapability.Semantic
),
],
() =>
s.languages.registerCompletionItemProvider(
e.syntax,
new S(n, t, r, i, o, a, c),
...S.triggerCharacters
)
);
});
const s = o(n(1398)),
a = n(2276),
c = n(2811),
u = o(n(4728)),
l = o(n(2028)),
d = n(6623),
f = n(988),
h = n(8981),
p = n(8078),
g = n(9522),
m = o(n(465));
class v extends s.CompletionItem {
constructor(e, t, n, r, i, o) {
const l = n.name || (n.insertText ?? "");
if (
(super(l, v.convertKind(n.kind)),
(this.position = e),
(this.document = t),
(this.tsEntry = n),
(this.completionContext = r),
(this.metadata = i),
n.source && n.hasAction && o.apiVersion.lt(a.API.v490)
? (this.sortText = "￿" + n.sortText)
: (this.sortText = n.sortText),
n.source && n.hasAction)
) {
const e = s.workspace.asRelativePath(n.source);
e !== n.source && (this.label = { label: l, description: e });
}
const { sourceDisplay: d, isSnippet: f } = n;
if (
(d &&
(this.label = {
label: l,
description: m.asPlainTextWithLinks(d, o),
}),
n.labelDetails && (this.label = { label: l, ...n.labelDetails }),
(this.preselect = n.isRecommended),
(this.position = e),
(this.useCodeSnippet =
r.completeFunctionCalls &&
(this.kind === s.CompletionItemKind.Function ||
this.kind === s.CompletionItemKind.Method)),
(this.range = this.getRangeFromReplacementSpan(n, r)),
(this.commitCharacters = v.getCommitCharacters(r, n)),
(this.insertText =
f && n.insertText
? new s.SnippetString(n.insertText)
: n.insertText),
(this.filterText =
n.filterText || this.getFilterText(r.line, n.insertText)),
r.isMemberCompletion &&
r.dotAccessorContext &&
!(this.insertText instanceof s.SnippetString) &&
((this.filterText =
r.dotAccessorContext.text +
(this.insertText || this.textLabel)),
!this.range))
) {
const e = this.completionContext.wordRange;
(this.range = e
? {
inserting: r.dotAccessorContext.range,
replacing: r.dotAccessorContext.range.union(e),
}
: r.dotAccessorContext.range),
(this.insertText = this.filterText);
}
if (n.kindModifiers) {
const e = (0, c.parseKindModifier)(n.kindModifiers);
e.has(u.KindModifiers.optional) &&
(this.insertText ?? (this.insertText = this.textLabel),
this.filterText ?? (this.filterText = this.textLabel),
"string" == typeof this.label
? (this.label += "?")
: (this.label.label += "?")),
e.has(u.KindModifiers.deprecated) &&
(this.tags = [s.CompletionItemTag.Deprecated]),
e.has(u.KindModifiers.color) &&
(this.kind = s.CompletionItemKind.Color),
(this.detail = (function (e) {
if (!e.kindModifiers || e.kind !== u.Kind.script) return;
const t = (0, c.parseKindModifier)(e.kindModifiers);
for (const n of u.KindModifiers.fileExtensionKindModifiers)
if (t.has(n))
return e.name.toLowerCase().endsWith(n)
? e.name
: e.name + n;
})(n));
}
this.resolveRange();
}
get textLabel() {
return "string" == typeof this.label
? this.label
: this.label.label;
}
async resolveCompletionItem(e, t) {
if (
(t.onCancellationRequested(() => {
this._resolvedPromise &&
--this._resolvedPromise.waiting <= 0 &&
setTimeout(() => {
this._resolvedPromise &&
this._resolvedPromise.waiting <= 0 &&
this._resolvedPromise.requestToken.cancel();
}, 300);
}),
this._resolvedPromise)
)
return (
++this._resolvedPromise.waiting, this._resolvedPromise.promise
);
const n = new s.CancellationTokenSource(),
r = (async () => {
const r = e.toOpenTsFilePath(this.document);
if (!r) return;
const i = {
...l.Position.toFileLocationRequestArgs(r, this.position),
entryNames: [
this.tsEntry.source || this.tsEntry.data
? {
name: this.tsEntry.name,
source: this.tsEntry.source,
data: this.tsEntry.data,
}
: this.tsEntry.name,
],
},
o = await e.interruptGetErr(() =>
e.execute("completionEntryDetails", i, n.token)
);
if ("response" !== o.type || !o.body?.length) return;
const a = o.body[0],
c = this.getDetails(e, a);
c && (this.detail = c),
(this.documentation = this.getDocumentation(
e,
a,
this.document.uri
));
const u = this.getCodeActions(a, r),
d = [{ command: y.ID, title: "", arguments: [this] }];
u.command && d.push(u.command);
const f = u.additionalTextEdits;
if (
this.useCodeSnippet &&
(await this.isValidFunctionCompletionContext(
e,
r,
this.position,
this.document,
t
))
) {
const { snippet: e, parameterCount: t } = (0,
g.snippetForFunctionCall)(
{ ...this, label: this.textLabel },
a.displayParts
);
(this.insertText = e),
t > 0 &&
s.workspace
.getConfiguration("editor.parameterHints")
.get("enabled") &&
d.push({
title: "triggerParameterHints",
command: "editor.action.triggerParameterHints",
});
}
return { commands: d, edits: f };
})();
return (
(this._resolvedPromise = {
promise: r,
requestToken: n,
waiting: 1,
}),
this._resolvedPromise.promise
);
}
getDetails(e, t) {
const n = [];
if (t.kind !== u.Kind.script) {
for (const e of t.codeActions ?? []) n.push(e.description);
return (
n.push(m.asPlainTextWithLinks(t.displayParts, e)),
n.join("\n\n")
);
}
}
getDocumentation(e, t, n) {
const r = new s.MarkdownString();
return (
m.appendDocumentationAsMarkdown(r, t.documentation, t.tags, e),
(r.baseUri = n),
r.value.length ? r : void 0
);
}
async isValidFunctionCompletionContext(e, t, n, r, i) {
try {
const r = l.Position.toFileLocationRequestArgs(t, n),
o = await e.execute("quickinfo", r, i);
if ("response" === o.type && o.body)
switch (o.body.kind) {
case "var":
case "let":
case "const":
case "alias":
return !1;
}
} catch {}
const o = r.lineAt(n.line);
return (
!o.text.slice(n.character).match(/^[a-z_$0-9]*\s*\(/gi) &&
!o.text.slice(0, n.character).match(/<\s*[\w]*$/gi)
);
}
getCodeActions(e, t) {
if (!e.codeActions?.length) return {};
const n = [];
let r,
i = !1;
for (const r of e.codeActions)
if ((r.commands && (i = !0), r.changes))
for (const e of r.changes)
e.fileName === t
? n.push(...e.textChanges.map(l.TextEdit.fromCodeEdit))
: (i = !0);
return (
i &&
(r = {
title: "",
command: _.ID,
arguments: [
t,
e.codeActions.map((e) => ({
commands: e.commands,
description: e.description,
changes: e.changes.filter((e) => e.fileName !== t),
})),
],
}),
{ command: r, additionalTextEdits: n.length ? n : void 0 }
);
}
getRangeFromReplacementSpan(e, t) {
if (!e.replacementSpan)
return t.optionalReplacementRange
? {
inserting: new s.Range(
t.optionalReplacementRange.start,
this.position
),
replacing: t.optionalReplacementRange,
}
: void 0;
let n = l.Range.fromTextSpan(e.replacementSpan);
return (
n.isSingleLine ||
(n = new s.Range(
n.start.line,
n.start.character,
n.start.line,
t.line.length
)),
{ inserting: n, replacing: n }
);
}
getFilterText(e, t) {
if (this.tsEntry.name.startsWith("#")) {
const n = this.completionContext.wordRange,
r = n ? e.charAt(n.start.character) : void 0;
return t
? t.startsWith("this.#")
? "#" === r
? t
: t.replace(/^this\.#/, "")
: t
: "#" === r
? void 0
: this.tsEntry.name.replace(/^#/, "");
}
if (!t?.startsWith("this."))
return t?.startsWith("[")
? t.replace(/^\[['"](.+)[['"]\]$/, ".$1")
: t;
}
resolveRange() {
if (this.range) return;
const e = this.completionContext.wordRange;
e &&
(this.range = {
inserting: new s.Range(e.start, this.position),
replacing: e,
});
}
static convertKind(e) {
switch (e) {
case u.Kind.primitiveType:
case u.Kind.keyword:
return s.CompletionItemKind.Keyword;
case u.Kind.const:
case u.Kind.let:
case u.Kind.variable:
case u.Kind.localVariable:
case u.Kind.alias:
case u.Kind.parameter:
return s.CompletionItemKind.Variable;
case u.Kind.memberVariable:
case u.Kind.memberGetAccessor:
case u.Kind.memberSetAccessor:
return s.CompletionItemKind.Field;
case u.Kind.function:
case u.Kind.localFunction:
return s.CompletionItemKind.Function;
case u.Kind.method:
case u.Kind.constructSignature:
case u.Kind.callSignature:
case u.Kind.indexSignature:
return s.CompletionItemKind.Method;
case u.Kind.enum:
return s.CompletionItemKind.Enum;
case u.Kind.enumMember:
return s.CompletionItemKind.EnumMember;
case u.Kind.module:
case u.Kind.externalModuleName:
return s.CompletionItemKind.Module;
case u.Kind.class:
case u.Kind.type:
return s.CompletionItemKind.Class;
case u.Kind.interface:
return s.CompletionItemKind.Interface;
case u.Kind.warning:
return s.CompletionItemKind.Text;
case u.Kind.script:
return s.CompletionItemKind.File;
case u.Kind.directory:
return s.CompletionItemKind.Folder;
case u.Kind.string:
return s.CompletionItemKind.Constant;
default:
return s.CompletionItemKind.Property;
}
}
static getCommitCharacters(e, t) {
if (t.kind === u.Kind.warning || t.kind === u.Kind.string) return;
if (e.isNewIdentifierLocation) return;
const n = [".", ",", ";"];
return e.enableCallCompletions && n.push("("), n;
}
}
class y {
constructor(e, t) {
(this.onCompletionAccepted = e),
(this.telemetryReporter = t),
(this.id = y.ID);
}
execute(e) {
this.onCompletionAccepted(e),
e instanceof v &&
this.telemetryReporter.logTelemetry("completions.accept", {
isPackageJsonImport: e.tsEntry.isPackageJsonImport
? "true"
: void 0,
isImportStatementCompletion: e.tsEntry
.isImportStatementCompletion
? "true"
: void 0,
});
}
}
y.ID = "_typescript.onCompletionAccepted";
class b {
constructor(e) {
(this.client = e), (this.id = b.ID);
}
async execute(e) {
const t = await e.resolveCompletionItem(this.client, f.nulToken);
if (!t) return;
const { edits: n, commands: r } = t;
if (n) {
const t = new s.WorkspaceEdit();
for (const r of n) t.replace(e.document.uri, r.range, r.newText);
await s.workspace.applyEdit(t);
}
for (const e of r)
await s.commands.executeCommand(
e.command,
...(e.arguments ?? [])
);
}
}
b.ID = "_typescript.applyCompletionCommand";
class _ {
constructor(e) {
(this.client = e), (this.id = _.ID);
}
async execute(e, t) {
if (0 === t.length) return !0;
if (1 === t.length)
return (0, h.applyCodeAction)(this.client, t[0], f.nulToken);
const n = await s.window.showQuickPick(
t.map((e) => ({
label: e.description,
description: "",
action: e,
})),
{ placeHolder: s.l10n.t("Select code action to apply") }
);
return (
!!n && (0, h.applyCodeAction)(this.client, n.action, f.nulToken)
);
}
}
var w;
(_.ID = "_typescript.applyCompletionCodeAction"),
(function (e) {
(e.completeFunctionCalls = "suggest.completeFunctionCalls"),
(e.nameSuggestions = "suggest.names"),
(e.pathSuggestions = "suggest.paths"),
(e.autoImportSuggestions = "suggest.autoImports"),
(e.importStatementSuggestions = "suggest.importStatements"),
(e.getConfigurationForResource = function (t, n) {
const r = s.workspace.getConfiguration(t, n);
return {
completeFunctionCalls: r.get(e.completeFunctionCalls, !1),
pathSuggestions: r.get(e.pathSuggestions, !0),
autoImportSuggestions: r.get(e.autoImportSuggestions, !0),
nameSuggestions: r.get(e.nameSuggestions, !0),
importStatementSuggestions: r.get(
e.importStatementSuggestions,
!0
),
};
});
})(w || (w = {}));
class S {
constructor(e, t, n, r, i, o, s) {
(this.client = e),
(this.language = t),
(this.typingsStatus = n),
(this.fileConfigurationManager = r),
(this.telemetryReporter = o),
i.register(new _(this.client)),
i.register(new y(s, this.telemetryReporter)),
i.register(new b(this.client));
}
async provideCompletionItems(e, t, n, r) {
if (
!s.workspace
.getConfiguration(this.language.id, e)
.get("suggest.enabled")
)
return;
if (this.typingsStatus.isAcquiringTypings)
return Promise.reject({
label: s.l10n.t({
message: "Acquiring typings...",
comment: [
"Typings refers to the *.d.ts typings files that power our IntelliSense. It should not be localized",
],
}),
detail: s.l10n.t({
message: "Acquiring typings definitions for IntelliSense.",
comment: [
"Typings refers to the *.d.ts typings files that power our IntelliSense. It should not be localized",
],
}),
});
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
const o = e.lineAt(t.line),
c = w.getConfigurationForResource(this.language.id, e.uri);
if (!this.shouldTrigger(r, o, t, c)) return;
let u = e.getWordRangeAtPosition(t);
if (u && !u.isEmpty) {
const t = u.start.translate(0, 1);
"@" === e.getText(new s.Range(u.start, t)) && (u = u.with(t));
}
await this.client.interruptGetErr(() =>
this.fileConfigurationManager.ensureConfigurationForDocument(e, n)
);
const d = {
...l.Position.toFileLocationRequestArgs(i, t),
includeExternalModuleExports: c.autoImportSuggestions,
includeInsertTextCompletions: !0,
triggerCharacter: this.getTsTriggerCharacter(r),
triggerKind:
l.CompletionTriggerKind.toProtocolCompletionTriggerKind(
r.triggerKind
),
};
let f,
h,
p,
g,
m,
y,
_ = !0,
S = !1,
C = !1;
if (this.client.apiVersion.gte(a.API.v300)) {
const r = Date.now();
try {
g = await this.client.interruptGetErr(() =>
this.client.execute("completionInfo", d, n)
);
} finally {
m = Date.now() - r;
}
if ("response" !== g.type || !g.body)
return void this.logCompletionsTelemetry(m, g);
if (
((_ = g.body.isNewIdentifierLocation),
(C = g.body.isMemberCompletion),
C)
) {
const n =
o.text.slice(0, t.character).match(/\??\.\s*$/) || void 0;
if (n) {
const r = new s.Range(
t.translate({ characterDelta: -n[0].length }),
t
);
f = { range: r, text: e.getText(r) };
}
}
(S = !!g.body.isIncomplete || g.metadata?.isIncomplete),
(h = g.body.entries),
(p = g.metadata),
g.body.optionalReplacementSpan &&
(y = l.Range.fromTextSpan(g.body.optionalReplacementSpan));
} else {
const e = await this.client.interruptGetErr(() =>
this.client.execute("completions", d, n)
);
if ("response" !== e.type || !e.body) return;
(h = e.body), (p = e.metadata);
}
const T = {
isNewIdentifierLocation: _,
isMemberCompletion: C,
dotAccessorContext: f,
enableCallCompletions: !c.completeFunctionCalls,
wordRange: u,
line: o.text,
completeFunctionCalls: c.completeFunctionCalls,
optionalReplacementRange: y,
};
let x = !1,
O = !1;
const E = [];
for (const n of h)
if (!P(n, c)) {
const r = new v(t, e, n, T, p, this.client);
(r.command = { command: b.ID, title: "", arguments: [r] }),
E.push(r),
(x = x || !!n.isPackageJsonImport),
(O = O || !!n.isImportStatementCompletion);
}
return (
void 0 !== m && this.logCompletionsTelemetry(m, g, x, O),
new s.CompletionList(E, S)
);
}
logCompletionsTelemetry(e, t, n, r) {
this.telemetryReporter.logTelemetry("completions.execute", {
duration: String(e),
type: t?.type ?? "unknown",
flags:
"response" === t?.type && "number" == typeof t.body?.flags
? String(t.body.flags)
: void 0,
count: String(
"response" === t?.type && t.body ? t.body.entries.length : 0
),
updateGraphDurationMs:
"response" === t?.type &&
"number" == typeof t.performanceData?.updateGraphDurationMs
? String(t.performanceData.updateGraphDurationMs)
: void 0,
createAutoImportProviderProgramDurationMs:
"response" === t?.type &&
"number" ==
typeof t.performanceData
?.createAutoImportProviderProgramDurationMs
? String(
t.performanceData
.createAutoImportProviderProgramDurationMs
)
: void 0,
includesPackageJsonImport: n ? "true" : void 0,
includesImportStatementCompletion: r ? "true" : void 0,
});
}
getTsTriggerCharacter(e) {
switch (e.triggerCharacter) {
case "@":
return this.client.apiVersion.gte(a.API.v310) &&
this.client.apiVersion.lt(a.API.v320)
? void 0
: "@";
case "#":
return this.client.apiVersion.lt(a.API.v381) ? void 0 : "#";
case " ":
return this.client.apiVersion.gte(a.API.v430) ? " " : void 0;
case ".":
case '"':
case "'":
case "`":
case "/":
case "<":
return e.triggerCharacter;
default:
return;
}
}
async resolveCompletionItem(e, t) {
return await e.resolveCompletionItem(this.client, t), e;
}
shouldTrigger(e, t, n, r) {
return (
" " !== e.triggerCharacter ||
(!(
!r.importStatementSuggestions ||
this.client.apiVersion.lt(a.API.v430)
) &&
"import" === t.text.slice(0, n.character))
);
}
}
function P(e, t) {
return (
(!t.nameSuggestions && e.kind === u.Kind.warning) ||
(!t.pathSuggestions &&
(e.kind === u.Kind.directory ||
e.kind === u.Kind.script ||
e.kind === u.Kind.externalModuleName)) ||
(!t.autoImportSuggestions && e.hasAction)
);
}
S.triggerCharacters = [".", '"', "'", "`", "/", "@", "<", "#", " "];
},
3799: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n) {
return (0, u.conditionalRegistration)(
[
(0, u.requireSomeCapability)(n, c.ClientCapability.Semantic),
(0, u.requireMinVersion)(n, l.API.v560),
(0, u.requireGlobalConfiguration)(t.id, f),
],
() =>
s.languages.registerDocumentPasteEditProvider(
e.semantic,
new h(t.id, n),
{
providedPasteEditKinds: [h.kind],
copyMimeTypes: [h.metadataMimeType],
pasteMimeTypes: ["text/plain"],
}
)
);
});
const s = o(n(1398)),
a = o(n(2028)),
c = n(6623),
u = n(8078),
l = n(2276);
class d {
constructor(e, t) {
(this.resource = e), (this.ranges = t);
}
toJSON() {
return JSON.stringify({
resource: this.resource.toJSON(),
ranges: this.ranges,
});
}
static fromJSON(e) {
try {
const t = JSON.parse(e);
return new d(
s.Uri.from(t.resource),
t.ranges.map(
(e) =>
new s.Range(
e[0].line,
e[0].character,
e[1].line,
e[1].character
)
)
);
} catch {}
}
}
const f = "experimental.updateImportsOnPaste";
class h {
constructor(e, t) {
(this._modeId = e), (this._client = t);
}
prepareDocumentPaste(e, t, n, r) {
n.set(
h.metadataMimeType,
new s.DataTransferItem(new d(e.uri, t).toJSON())
);
}
async provideDocumentPasteEdits(e, t, n, r, i) {
if (!s.workspace.getConfiguration(this._modeId, e.uri).get(f, !1))
return;
const o = this._client.toOpenTsFilePath(e);
if (!o) return;
const c = await n.get("text/plain")?.asString();
if (!c || i.isCancellationRequested) return;
const u = await this.extractMetadata(n, i);
if (i.isCancellationRequested) return;
let l;
if (u) {
const e = u.ranges.map(a.Range.toTextSpan),
t = this._client.toTsFilePath(u.resource);
t && (l = { file: t, spans: e });
}
if (l?.file === o) return;
const d = await this._client.interruptGetErr(() =>
this._client.execute(
"getPasteEdits",
{
file: o,
pastedText: [c],
pasteLocations: t.map(a.Range.toTextSpan),
copiedFrom: l,
},
i
)
);
if ("response" !== d.type || !d.body || i.isCancellationRequested)
return;
const p = new s.DocumentPasteEdit(
"",
s.l10n.t("Paste with imports"),
h.kind
),
g = new s.WorkspaceEdit();
for (const e of d.body.edits)
g.set(
this._client.toResource(e.fileName),
e.textChanges.map(a.TextEdit.fromCodeEdit)
);
return (p.additionalEdit = g), [p];
}
async extractMetadata(e, t) {
const n = await e.get(h.metadataMimeType)?.asString();
if (!t.isCancellationRequested) return n ? d.fromJSON(n) : void 0;
}
}
(h.kind = s.DocumentDropOrPasteEditKind.Empty.append(
"text",
"jsts",
"pasteWithImports"
)),
(h.metadataMimeType = "application/vnd.code.jsts.metadata");
},
98: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 });
const s = o(n(2028));
t.default = class {
constructor(e) {
this.client = e;
}
async getSymbolLocations(e, t, n, r) {
const i = this.client.toOpenTsFilePath(t);
if (!i) return;
const o = s.Position.toFileLocationRequestArgs(i, n),
a = await this.client.execute(e, o, r);
return "response" === a.type && a.body
? a.body.map((e) =>
s.Location.fromTextSpan(this.client.toResource(e.file), e)
)
: void 0;
}
};
},
1965: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
},
s =
(this && this.__importDefault) ||
function (e) {
return e && e.__esModule ? e : { default: e };
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, f.conditionalRegistration)(
[
(0, f.requireSomeCapability)(
t,
l.ClientCapability.EnhancedSyntax,
l.ClientCapability.Semantic
),
],
() => a.languages.registerDefinitionProvider(e.syntax, new h(t))
);
});
const a = o(n(1398)),
c = n(2276),
u = o(n(2028)),
l = n(6623),
d = s(n(98)),
f = n(8078);
class h extends d.default {
async provideDefinition(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
const i = u.Position.toFileLocationRequestArgs(r, t),
o = await this.client.execute("definitionAndBoundSpan", i, n);
if ("response" !== o.type || !o.body) return;
const s = o.body.textSpan
? u.Range.fromTextSpan(o.body.textSpan)
: void 0;
let l = o.body.definitions;
if (
a.workspace
.getConfiguration(e.languageId)
.get("preferGoToSourceDefinition", !1) &&
this.client.apiVersion.gte(c.API.v470)
) {
const e = await this.client.execute("findSourceDefinition", i, n);
"response" === e.type && e.body?.length && (l = e.body);
}
return l.map((e) => {
const t = u.Location.fromTextSpan(
this.client.toResource(e.file),
e
);
return e.contextStart && e.contextEnd
? {
originSelectionRange: s,
targetRange: u.Range.fromLocations(
e.contextStart,
e.contextEnd
),
targetUri: t.uri,
targetSelectionRange: t.range,
}
: {
originSelectionRange: s,
targetRange: t.range,
targetUri: t.uri,
};
});
}
}
t.default = h;
},
1343: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.DiagnosticsManager = void 0);
const s = o(n(1398)),
a = o(n(7405)),
c = n(4014),
u = n(4209),
l = n(8851);
class d {
constructor(e, t) {
(this.file = e),
(this.language = t),
(this._diagnostics = new Map());
}
updateDiagnostics(e, t, n, r) {
e !== this.language &&
(this._diagnostics.clear(), (this.language = e));
const i = this._diagnostics.get(t);
return (
(0 !== i?.length || 0 !== n.length) &&
(3 === t
? this.updateRegionDiagnostics(n, r)
: (this._diagnostics.set(t, n), !0))
);
}
getAllDiagnostics(e) {
return e.getValidate(this.language)
? [
...this.get(0),
...this.get(1),
...this.getSuggestionDiagnostics(e),
]
: [];
}
delete(e) {
for (const [t, n] of this._diagnostics)
this._diagnostics.set(
t,
n.filter((t) => {
return !(
(n = t) === (r = e) ||
(n.code === r.code &&
n.message === r.message &&
n.severity === r.severity &&
n.source === r.source &&
n.range.isEqual(r.range) &&
a.equals(
n.relatedInformation || a.empty,
r.relatedInformation || a.empty,
(e, t) =>
e.message === t.message &&
e.location.range.isEqual(t.location.range) &&
e.location.uri.fsPath === t.location.uri.fsPath
) &&
a.equals(n.tags || a.empty, r.tags || a.empty))
);
var n, r;
})
);
}
updateRegionDiagnostics(e, t) {
if (!this._diagnostics.get(1))
return this._diagnostics.set(1, e), !0;
const n = this._diagnostics
.get(1)
.filter((e) => !t.some((t) => e.range.intersection(t)));
return n.push(...e), this._diagnostics.set(1, n), !0;
}
getSuggestionDiagnostics(e) {
const t = e.getEnableSuggestions(this.language);
return this.get(2).filter(
(e) =>
!!t ||
(e.tags &&
(e.tags.includes(s.DiagnosticTag.Unnecessary) ||
e.tags.includes(s.DiagnosticTag.Deprecated)))
);
}
get(e) {
return this._diagnostics.get(e) || [];
}
}
class f {
constructor() {
this._languageSettings = new Map();
}
getValidate(e) {
return this.get(e).validate;
}
setValidate(e, t) {
return this.update(e, (e) => ({
validate: t,
enableSuggestions: e.enableSuggestions,
}));
}
getEnableSuggestions(e) {
return this.get(e).enableSuggestions;
}
setEnableSuggestions(e, t) {
return this.update(e, (e) => ({
validate: e.validate,
enableSuggestions: t,
}));
}
get(e) {
return this._languageSettings.get(e) || f.defaultSettings;
}
update(e, t) {
const n = this.get(e),
r = t(n);
return (
this._languageSettings.set(e, r),
!(function (e, t) {
return (
e.validate === t.validate &&
e.enableSuggestions === t.enableSuggestions
);
})(n, r)
);
}
}
f.defaultSettings = { validate: !0, enableSuggestions: !0 };
class h extends c.Disposable {
constructor(e, t) {
super(),
(this._telemetryReporter = e),
(this._diagnosticsCollection = t),
(this._diagnosticCodesMap = new Map()),
(this._diagnosticSnapshotsMap = new u.ResourceMap(
(e) => e.toString(),
{ onCaseInsensitiveFileSystem: !1 }
)),
this._register(
s.workspace.onDidChangeTextDocument((e) => {
("typescript" !== e.document.languageId &&
"typescriptreact" !== e.document.languageId) ||
this._updateAllDiagnosticCodesAfterTimeout();
})
),
this._updateAllDiagnosticCodesAfterTimeout(),
this._registerTelemetryEventEmitter();
}
_updateAllDiagnosticCodesAfterTimeout() {
clearTimeout(this._timeout),
(this._timeout = setTimeout(
() => this._updateDiagnosticCodes(),
5e3
));
}
_increaseDiagnosticCodeCount(e) {
void 0 !== e &&
this._diagnosticCodesMap.set(
Number(e),
(this._diagnosticCodesMap.get(Number(e)) || 0) + 1
);
}
_updateDiagnosticCodes() {
this._diagnosticsCollection.forEach((e, t) => {
const n = this._diagnosticSnapshotsMap.get(e);
this._diagnosticSnapshotsMap.set(e, t),
t
.filter((e) => !n?.some((t) => (0, l.equals)(e, t)))
.forEach((e) => {
const t = e.code;
this._increaseDiagnosticCodeCount(
"string" == typeof t || "number" == typeof t
? t
: t?.value
);
});
});
}
_registerTelemetryEventEmitter() {
this._telemetryEmitter = setInterval(() => {
if (this._diagnosticCodesMap.size > 0) {
let e = "";
this._diagnosticCodesMap.forEach((t, n) => {
e += `${n}:${t},`;
}),
this._diagnosticCodesMap.clear(),
this._telemetryReporter.logTelemetry(
"typescript.diagnostics",
{ diagnosticCodes: e }
);
}
}, 3e5);
}
dispose() {
super.dispose(),
clearTimeout(this._timeout),
clearInterval(this._telemetryEmitter);
}
}
class p extends c.Disposable {
constructor(e, t, n, r) {
super(),
(this._settings = new f()),
(this._updateDelay = 50),
(this._diagnostics = new u.ResourceMap(void 0, {
onCaseInsensitiveFileSystem: r,
})),
(this._pendingUpdates = new u.ResourceMap(void 0, {
onCaseInsensitiveFileSystem: r,
})),
(this._currentDiagnostics = this._register(
s.languages.createDiagnosticCollection(e)
)),
(1e3 * Math.random() <= 1 || t.enableDiagnosticsTelemetry) &&
this._register(new h(n, this._currentDiagnostics));
}
dispose() {
super.dispose();
for (const e of this._pendingUpdates.values()) clearTimeout(e);
this._pendingUpdates.clear();
}
reInitialize() {
this._currentDiagnostics.clear(), this._diagnostics.clear();
}
setValidate(e, t) {
this._settings.setValidate(e, t) && this.rebuildAll();
}
setEnableSuggestions(e, t) {
this._settings.setEnableSuggestions(e, t) && this.rebuildAll();
}
updateDiagnostics(e, t, n, r, i) {
let o = !1;
const s = this._diagnostics.get(e);
if (s) o = s.updateDiagnostics(t, n, r, i);
else if (r.length) {
const s = new d(e, t);
s.updateDiagnostics(t, n, r, i),
this._diagnostics.set(e, s),
(o = !0);
}
o && this.scheduleDiagnosticsUpdate(e);
}
configFileDiagnosticsReceived(e, t) {
this._currentDiagnostics.set(e, t);
}
deleteAllDiagnosticsInFile(e) {
this._currentDiagnostics.delete(e), this._diagnostics.delete(e);
}
deleteDiagnostic(e, t) {
const n = this._diagnostics.get(e);
n && (n.delete(t), this.rebuildFile(n));
}
getDiagnostics(e) {
return this._currentDiagnostics.get(e) || [];
}
scheduleDiagnosticsUpdate(e) {
this._pendingUpdates.has(e) ||
this._pendingUpdates.set(
e,
setTimeout(
() => this.updateCurrentDiagnostics(e),
this._updateDelay
)
);
}
updateCurrentDiagnostics(e) {
this._pendingUpdates.has(e) &&
(clearTimeout(this._pendingUpdates.get(e)),
this._pendingUpdates.delete(e));
const t = this._diagnostics.get(e);
this._currentDiagnostics.set(
e,
t ? t.getAllDiagnostics(this._settings) : []
);
}
rebuildAll() {
this._currentDiagnostics.clear();
for (const e of this._diagnostics.values()) this.rebuildFile(e);
}
rebuildFile(e) {
this._currentDiagnostics.set(
e.file,
e.getAllDiagnostics(this._settings)
);
}
}
t.DiagnosticsManager = p;
},
978: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return s.languages.registerCompletionItemProvider(
e.syntax,
new l(t),
"@"
);
});
const s = o(n(1398)),
a = n(2276),
c = [
{
value: "@ts-check",
description: s.l10n.t(
"Enables semantic checking in a JavaScript file. Must be at the top of a file."
),
},
{
value: "@ts-nocheck",
description: s.l10n.t(
"Disables semantic checking in a JavaScript file. Must be at the top of a file."
),
},
{
value: "@ts-ignore",
description: s.l10n.t(
"Suppresses @ts-check errors on the next line of a file."
),
},
],
u = [
...c,
{
value: "@ts-expect-error",
description: s.l10n.t(
"Suppresses @ts-check errors on the next line of a file, expecting at least one to exist."
),
},
];
class l {
constructor(e) {
this.client = e;
}
provideCompletionItems(e, t, n) {
if (!this.client.toOpenTsFilePath(e)) return [];
const r = e
.lineAt(t.line)
.text.slice(0, t.character)
.match(/^\s*\/\/+\s?(@[a-zA-Z\-]*)?$/);
return r
? (this.client.apiVersion.gte(a.API.v390) ? u : c).map((e) => {
const n = new s.CompletionItem(
e.value,
s.CompletionItemKind.Snippet
);
return (
(n.detail = e.description),
(n.range = new s.Range(
t.line,
Math.max(0, t.character - (r[1] ? r[1].length : 0)),
t.line,
t.character
)),
n
);
})
: [];
}
}
},
7168: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
const n = new c(t);
return s.Disposable.from(
s.languages.registerDocumentHighlightProvider(e.syntax, n),
s.languages.registerMultiDocumentHighlightProvider(e.syntax, n)
);
});
const s = o(n(1398)),
a = o(n(2028));
class c {
constructor(e) {
this.client = e;
}
async provideMultiDocumentHighlights(e, t, n, r) {
const i = [e, ...n]
.map((e) => this.client.toOpenTsFilePath(e))
.filter((e) => !!e),
o = this.client.toOpenTsFilePath(e);
if (!o || 0 === i.length) return [];
const c = {
...a.Position.toFileLocationRequestArgs(o, t),
filesToSearch: i,
},
l = await this.client.execute("documentHighlights", c, r);
return "response" === l.type && l.body
? l.body.map(
(e) =>
new s.MultiDocumentHighlight(s.Uri.file(e.file), [...u(e)])
)
: [];
}
async provideDocumentHighlights(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return [];
const i = {
...a.Position.toFileLocationRequestArgs(r, t),
filesToSearch: [r],
},
o = await this.client.execute("documentHighlights", i, n);
return "response" === o.type && o.body ? o.body.flatMap(u) : [];
}
}
function u(e) {
return e.highlightSpans.map(
(e) =>
new s.DocumentHighlight(
a.Range.fromTextSpan(e),
"writtenReference" === e.kind
? s.DocumentHighlightKind.Write
: s.DocumentHighlightKind.Read
)
);
}
},
250: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n) {
return s.languages.registerDocumentSymbolProvider(
e.syntax,
new l(t, n),
{ label: "TypeScript" }
);
});
const s = o(n(1398)),
a = n(2811),
c = o(n(4728)),
u = o(n(2028));
class l {
constructor(e, t) {
(this.client = e), (this.cachedResponse = t);
}
async provideDocumentSymbols(e, t) {
const n = this.client.toOpenTsFilePath(e);
if (!n) return;
const r = { file: n },
i = await this.cachedResponse.execute(e, () =>
this.client.execute("navtree", r, t)
);
if ("response" !== i.type || !i.body?.childItems) return;
const o = [];
for (const t of i.body.childItems) l.convertNavTree(e.uri, o, t);
return o;
}
static convertNavTree(e, t, n) {
let r = l.shouldInclueEntry(n);
if (!r && !n.childItems?.length) return !1;
const i = new Set(n.childItems || []);
for (const o of n.spans) {
const s = u.Range.fromTextSpan(o),
a = l.convertSymbol(n, s);
for (const t of i)
if (
t.spans.some((e) => !!s.intersection(u.Range.fromTextSpan(e)))
) {
const n = l.convertNavTree(e, a.children, t);
(r = r || n), i.delete(t);
}
r && t.push(a);
}
return r;
}
static convertSymbol(e, t) {
const n = e.nameSpan ? u.Range.fromTextSpan(e.nameSpan) : t;
let r = e.text;
switch (e.kind) {
case c.Kind.memberGetAccessor:
r = `(get) ${r}`;
break;
case c.Kind.memberSetAccessor:
r = `(set) ${r}`;
}
const i = new s.DocumentSymbol(
r,
"",
((e) => {
switch (e) {
case c.Kind.module:
return s.SymbolKind.Module;
case c.Kind.class:
return s.SymbolKind.Class;
case c.Kind.enum:
return s.SymbolKind.Enum;
case c.Kind.interface:
return s.SymbolKind.Interface;
case c.Kind.method:
return s.SymbolKind.Method;
case c.Kind.memberVariable:
case c.Kind.memberGetAccessor:
case c.Kind.memberSetAccessor:
return s.SymbolKind.Property;
case c.Kind.variable:
case c.Kind.const:
case c.Kind.localVariable:
return s.SymbolKind.Variable;
case c.Kind.function:
case c.Kind.localFunction:
return s.SymbolKind.Function;
case c.Kind.constructSignature:
case c.Kind.constructorImplementation:
return s.SymbolKind.Constructor;
}
return s.SymbolKind.Variable;
})(e.kind),
t,
t.contains(n) ? n : t
);
return (
(0, a.parseKindModifier)(e.kindModifiers).has(
c.KindModifiers.deprecated
) && (i.tags = [s.SymbolTag.Deprecated]),
i
);
}
static shouldInclueEntry(e) {
return (
e.kind !== c.Kind.alias &&
!(!e.text || "<function>" === e.text || "<class>" === e.text)
);
}
}
},
9640: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.InlayHintSettingNames = void 0),
(t.getInlayHintsPreferences = m);
const s = o(n(6928)),
a = o(n(1398)),
c = n(2276),
u = n(4014),
l = o(n(6342)),
d = n(4284),
f = n(8851),
h = n(4209);
class p extends u.Disposable {
constructor(e, t) {
super(),
(this.client = e),
(this.formatOptions = new h.ResourceMap(void 0, {
onCaseInsensitiveFileSystem: t,
})),
a.workspace.onDidCloseTextDocument(
(e) => {
this.formatOptions.delete(e.uri);
},
void 0,
this._disposables
);
}
async ensureConfigurationForDocument(e, t) {
const n = this.getFormattingOptions(e);
if (n) return this.ensureConfigurationOptions(e, n, t);
}
getFormattingOptions(e) {
const t = a.window.visibleTextEditors.find(
(t) => t.document.fileName === e.fileName
);
return t
? {
tabSize: t.options.tabSize,
insertSpaces: t.options.insertSpaces,
}
: void 0;
}
async ensureConfigurationOptions(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
const i = this.getFileOptions(e, t),
o = this.formatOptions.get(e.uri);
if (o) {
const e = await o;
if (n.isCancellationRequested) return;
if (e && ((s = e), (a = i), (0, f.equals)(s, a))) return;
}
var s, a;
const c = (async () => {
try {
return "response" ===
(await this.client.execute("configure", { file: r, ...i }, n))
.type
? i
: void 0;
} catch {
return;
}
})();
this.formatOptions.set(e.uri, c), await c;
}
async setGlobalConfigurationFromDocument(e, t) {
const n = this.getFormattingOptions(e);
if (!n) return;
const r = { file: void 0, ...this.getFileOptions(e, n) };
await this.client.execute("configure", r, t);
}
reset() {
this.formatOptions.clear();
}
getFileOptions(e, t) {
return {
formatOptions: this.getFormatOptions(e, t),
preferences: this.getPreferences(e),
};
}
getFormatOptions(e, t) {
const n = a.workspace.getConfiguration(
(0, d.isTypeScriptDocument)(e)
? "typescript.format"
: "javascript.format",
e.uri
);
return {
tabSize: t.tabSize,
indentSize: t.tabSize,
convertTabsToSpaces: t.insertSpaces,
newLineCharacter: "\n",
insertSpaceAfterCommaDelimiter: n.get(
"insertSpaceAfterCommaDelimiter"
),
insertSpaceAfterConstructor: n.get("insertSpaceAfterConstructor"),
insertSpaceAfterSemicolonInForStatements: n.get(
"insertSpaceAfterSemicolonInForStatements"
),
insertSpaceBeforeAndAfterBinaryOperators: n.get(
"insertSpaceBeforeAndAfterBinaryOperators"
),
insertSpaceAfterKeywordsInControlFlowStatements: n.get(
"insertSpaceAfterKeywordsInControlFlowStatements"
),
insertSpaceAfterFunctionKeywordForAnonymousFunctions: n.get(
"insertSpaceAfterFunctionKeywordForAnonymousFunctions"
),
insertSpaceBeforeFunctionParenthesis: n.get(
"insertSpaceBeforeFunctionParenthesis"
),
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: n.get(
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"
),
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: n.get(
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"
),
insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: n.get(
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"
),
insertSpaceAfterOpeningAndBeforeClosingEmptyBraces: n.get(
"insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"
),
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:
n.get(
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"
),
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: n.get(
"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"
),
insertSpaceAfterTypeAssertion: n.get(
"insertSpaceAfterTypeAssertion"
),
placeOpenBraceOnNewLineForFunctions: n.get(
"placeOpenBraceOnNewLineForFunctions"
),
placeOpenBraceOnNewLineForControlBlocks: n.get(
"placeOpenBraceOnNewLineForControlBlocks"
),
semicolons: n.get("semicolons"),
indentSwitchCase: n.get("indentSwitchCase"),
};
}
getPreferences(e) {
const t = a.workspace.getConfiguration(
(0, d.isTypeScriptDocument)(e) ? "typescript" : "javascript",
e
),
n = a.workspace.getConfiguration(
(0, d.isTypeScriptDocument)(e)
? "typescript.preferences"
: "javascript.preferences",
e
);
return {
...t.get("unstable"),
quotePreference: this.getQuoteStylePreference(n),
importModuleSpecifierPreference: y(n),
importModuleSpecifierEnding: b(n),
jsxAttributeCompletionStyle: _(n),
allowTextChangesInNewFiles: e.uri.scheme === l.file,
providePrefixAndSuffixTextForRename:
!1 !== n.get("renameShorthandProperties", !0) &&
n.get("useAliasesForRenames", !0),
allowRenameOfImportPath: !0,
includeAutomaticOptionalChainCompletions: t.get(
"suggest.includeAutomaticOptionalChainCompletions",
!0
),
provideRefactorNotApplicableReason: !0,
generateReturnInDocTemplate: t.get(
"suggest.jsdoc.generateReturns",
!0
),
includeCompletionsForImportStatements: t.get(
"suggest.includeCompletionsForImportStatements",
!0
),
includeCompletionsWithSnippetText: !0,
includeCompletionsWithClassMemberSnippets: t.get(
"suggest.classMemberSnippets.enabled",
!0
),
includeCompletionsWithObjectLiteralMethodSnippets: t.get(
"suggest.objectLiteralMethodSnippets.enabled",
!0
),
autoImportFileExcludePatterns:
this.getAutoImportFileExcludePatternsPreference(
n,
a.workspace.getWorkspaceFolder(e.uri)?.uri
),
preferTypeOnlyAutoImports: n.get("preferTypeOnlyAutoImports", !1),
useLabelDetailsInCompletionEntries: !0,
allowIncompleteCompletions: !0,
displayPartsForJSDoc: !0,
disableLineTextInReferences: !0,
interactiveInlayHints: !0,
includeCompletionsForModuleExports: t.get("suggest.autoImports"),
...m(t),
};
}
getQuoteStylePreference(e) {
switch (e.get("quoteStyle")) {
case "single":
return "single";
case "double":
return "double";
default:
return this.client.apiVersion.gte(c.API.v333) ? "auto" : void 0;
}
}
getAutoImportFileExcludePatternsPreference(e, t) {
return (
t &&
e.get("autoImportFileExcludePatterns")?.map((e) => {
const n = /^\.\.?($|[\/\\])/.test(e),
r = this.client.apiVersion.gte(c.API.v540)
? ""
: s.parse(this.client.toTsFilePath(t)).root;
return s.isAbsolute(e)
? e
: e.startsWith("*")
? r + e
: n
? this.client.toTsFilePath(a.Uri.joinPath(t, e))
: r + "**" + s.sep + e;
})
);
}
}
t.default = p;
class g {}
function m(e) {
return {
includeInlayParameterNameHints: v(e),
includeInlayParameterNameHintsWhenArgumentMatchesName: !e.get(
g.parameterNamesSuppressWhenArgumentMatchesName,
!0
),
includeInlayFunctionParameterTypeHints: e.get(
g.parameterNamesEnabled,
!1
),
includeInlayVariableTypeHints: e.get(g.variableTypesEnabled, !1),
includeInlayVariableTypeHintsWhenTypeMatchesName: !e.get(
g.variableTypesSuppressWhenTypeMatchesName,
!0
),
includeInlayPropertyDeclarationTypeHints: e.get(
g.propertyDeclarationTypesEnabled,
!1
),
includeInlayFunctionLikeReturnTypeHints: e.get(
g.functionLikeReturnTypesEnabled,
!1
),
includeInlayEnumMemberValueHints: e.get(
g.enumMemberValuesEnabled,
!1
),
};
}
function v(e) {
switch (e.get("inlayHints.parameterNames.enabled")) {
case "none":
return "none";
case "literals":
return "literals";
case "all":
return "all";
default:
return;
}
}
function y(e) {
switch (e.get("importModuleSpecifier")) {
case "project-relative":
return "project-relative";
case "relative":
return "relative";
case "non-relative":
return "non-relative";
default:
return;
}
}
function b(e) {
switch (e.get("importModuleSpecifierEnding")) {
case "minimal":
return "minimal";
case "index":
return "index";
case "js":
return "js";
default:
return "auto";
}
}
function _(e) {
switch (e.get("jsxAttributeCompletionStyle")) {
case "braces":
return "braces";
case "none":
return "none";
default:
return "auto";
}
}
(t.InlayHintSettingNames = g),
(g.parameterNamesSuppressWhenArgumentMatchesName =
"inlayHints.parameterNames.suppressWhenArgumentMatchesName"),
(g.parameterNamesEnabled = "inlayHints.parameterTypes.enabled"),
(g.variableTypesEnabled = "inlayHints.variableTypes.enabled"),
(g.variableTypesSuppressWhenTypeMatchesName =
"inlayHints.variableTypes.suppressWhenTypeMatchesName"),
(g.propertyDeclarationTypesEnabled =
"inlayHints.propertyDeclarationTypes.enabled"),
(g.functionLikeReturnTypesEnabled =
"inlayHints.functionLikeReturnTypes.enabled"),
(g.enumMemberValuesEnabled = "inlayHints.enumMemberValues.enabled");
},
1803: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
function n() {
s.commands.executeCommand(
"setContext",
l.context,
e.apiVersion.gte(l.minVersion)
);
}
return n(), t.register(new l(e)), e.onTsServerStarted(() => n());
});
const s = o(n(1398)),
a = n(4284),
c = n(2276),
u = o(n(2028));
class l {
constructor(e) {
(this.client = e), (this.id = "typescript.findAllFileReferences");
}
async execute(e) {
if (this.client.apiVersion.lt(l.minVersion))
return void s.window.showErrorMessage(
s.l10n.t(
"Find file references failed. Requires TypeScript 4.2+."
)
);
if ((e ?? (e = s.window.activeTextEditor?.document.uri), !e))
return void s.window.showErrorMessage(
s.l10n.t("Find file references failed. No resource provided.")
);
const t = await s.workspace.openTextDocument(e);
if (!(0, a.isSupportedLanguageMode)(t))
return void s.window.showErrorMessage(
s.l10n.t("Find file references failed. Unsupported file type.")
);
const n = this.client.toOpenTsFilePath(t);
n
? await s.window.withProgress(
{
location: s.ProgressLocation.Window,
title: s.l10n.t("Finding file references"),
},
async (t, r) => {
const i = await this.client.execute(
"fileReferences",
{ file: n },
r
);
if ("response" !== i.type || !i.body) return;
const o = i.body.refs.map((e) =>
u.Location.fromTextSpan(
this.client.toResource(e.file),
e
)
),
a = s.workspace.getConfiguration("references"),
c = a.inspect("preferredLocation");
await a.update("preferredLocation", "view");
try {
await s.commands.executeCommand(
"editor.action.showReferences",
e,
new s.Position(0, 0),
o
);
} finally {
await a.update(
"preferredLocation",
c?.workspaceFolderValue ?? c?.workspaceValue
);
}
}
)
: s.window.showErrorMessage(
s.l10n.t("Find file references failed. Unknown file type.")
);
}
}
(l.context = "tsSupportsFileReferences"), (l.minVersion = c.API.v420);
},
1849: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r) {
return (0, f.conditionalRegistration)(
[
(0, f.requireMinVersion)(t, a.API.v300),
(0, f.requireSomeCapability)(t, d.ClientCapability.Semantic),
],
() => {
const i = new y(t, n, r);
return s.languages.registerCodeActionsProvider(
e.semantic,
i,
i.metadata
);
}
);
});
const s = o(n(1398)),
a = n(2276),
c = o(n(2917)),
u = o(n(9172)),
l = o(n(2028)),
d = n(6623),
f = n(8078);
async function h(e, t, n, r, i, o) {
for (const s of i)
for (const { codes: i, fixName: a } of e) {
if (o.isCancellationRequested) return;
if (!i.has(s.code)) continue;
const e = {
...l.Range.toFileRangeRequestArgs(r, s.range),
errorCodes: [+s.code],
},
c = await n.execute("getCodeFixes", e, o);
if ("response" !== c.type || !c.body?.length) continue;
const u = c.body?.find((e) => e.fixName === a);
if (!u) continue;
if (!u.fixId)
return void l.WorkspaceEdit.withFileCodeEdits(t, n, u.changes);
const d = {
scope: { type: "file", args: { file: r } },
fixId: u.fixId,
},
f = await n.execute("getCombinedCodeFix", d, o);
if ("response" !== f.type || !f.body) return;
return void l.WorkspaceEdit.withFileCodeEdits(
t,
n,
f.body.changes
);
}
}
class p extends s.CodeAction {}
class g extends p {
constructor() {
super(s.l10n.t("Fix all fixable JS/TS issues"), g.kind);
}
async build(e, t, n, r) {
(this.edit = new s.WorkspaceEdit()),
await (async function (e, t, n, r, i, o) {
for (const s of i)
for (const { codes: i, fixName: a } of e) {
if (o.isCancellationRequested) return;
if (!i.has(s.code)) continue;
const e = {
...l.Range.toFileRangeRequestArgs(r, s.range),
errorCodes: [+s.code],
},
c = await n.execute("getCodeFixes", e, o);
if ("response" !== c.type) continue;
const u = c.body?.find((e) => e.fixName === a);
if (u) {
l.WorkspaceEdit.withFileCodeEdits(t, n, u.changes);
break;
}
}
})(
[
{
codes: c.incorrectlyImplementsInterface,
fixName: u.classIncorrectlyImplementsInterface,
},
{
codes: c.asyncOnlyAllowedInAsyncFunctions,
fixName: u.awaitInSyncFunction,
},
],
this.edit,
e,
t,
n,
r
),
await h(
[{ codes: c.unreachableCode, fixName: u.unreachableCode }],
this.edit,
e,
t,
n,
r
);
}
}
g.kind = s.CodeActionKind.SourceFixAll.append("ts");
class m extends p {
constructor() {
super(s.l10n.t("Remove all unused code"), m.kind);
}
async build(e, t, n, r) {
(this.edit = new s.WorkspaceEdit()),
await h(
[
{
codes: c.variableDeclaredButNeverUsed,
fixName: u.unusedIdentifier,
},
],
this.edit,
e,
t,
n,
r
);
}
}
m.kind = s.CodeActionKind.Source.append("removeUnused").append("ts");
class v extends p {
constructor() {
super(s.l10n.t("Add all missing imports"), v.kind);
}
async build(e, t, n, r) {
(this.edit = new s.WorkspaceEdit()),
await h(
[{ codes: c.cannotFindName, fixName: u.fixImport }],
this.edit,
e,
t,
n,
r
);
}
}
v.kind =
s.CodeActionKind.Source.append("addMissingImports").append("ts");
class y {
constructor(e, t, n) {
(this.client = e),
(this.fileConfigurationManager = t),
(this.diagnosticsManager = n);
}
get metadata() {
return {
providedCodeActionKinds: y.kindProviders.map((e) => e.kind),
};
}
async provideCodeActions(e, t, n, r) {
if (!n.only || !s.CodeActionKind.Source.intersects(n.only)) return;
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
const o = this.getFixAllActions(n.only),
a = this.diagnosticsManager.getDiagnostics(e.uri);
return a.length
? (await this.fileConfigurationManager.ensureConfigurationForDocument(
e,
r
),
r.isCancellationRequested
? void 0
: (await Promise.all(
o.map((e) => e.build(this.client, i, a, r))
),
o))
: o;
}
getFixAllActions(e) {
return y.kindProviders
.filter((t) => e.intersects(t.kind))
.map((e) => new e());
}
}
y.kindProviders = [g, m, v];
},
4346: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return s.languages.registerFoldingRangeProvider(e.syntax, new u(t));
});
const s = o(n(1398)),
a = o(n(2028)),
c = n(7405);
class u {
constructor(e) {
this.client = e;
}
async provideFoldingRanges(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
const i = { file: r },
o = await this.client.execute("getOutliningSpans", i, n);
return "response" === o.type && o.body
? (0, c.coalesce)(
o.body.map((t) => this.convertOutliningSpan(t, e))
)
: void 0;
}
convertOutliningSpan(e, t) {
const n = a.Range.fromTextSpan(e.textSpan),
r = u.getFoldingRangeKind(e);
if ("comment" === e.kind) {
const e = t.lineAt(n.start.line).text;
if (/\/\/\s*#endregion/gi.test(e)) return;
}
const i = n.start.line,
o = this.adjustFoldingEnd(n, t);
return new s.FoldingRange(i, o, r);
}
adjustFoldingEnd(e, t) {
if (e.end.character > 0) {
const n = t.getText(new s.Range(e.end.translate(0, -1), e.end));
if (u.foldEndPairCharacters.includes(n))
return Math.max(e.end.line - 1, e.start.line);
}
return e.end.line;
}
static getFoldingRangeKind(e) {
switch (e.kind) {
case "comment":
return s.FoldingRangeKind.Comment;
case "region":
return s.FoldingRangeKind.Region;
case "imports":
return s.FoldingRangeKind.Imports;
default:
return;
}
}
}
u.foldEndPairCharacters = ["}", "]", ")", "`", ">"];
},
9572: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r) {
return (0, c.conditionalRegistration)(
[(0, c.requireGlobalConfiguration)(t.id, "format.enable")],
() => {
const t = new u(n, r);
return s.Disposable.from(
s.languages.registerOnTypeFormattingEditProvider(
e.syntax,
t,
";",
"}",
"\n"
),
s.languages.registerDocumentRangeFormattingEditProvider(
e.syntax,
t
)
);
}
);
});
const s = o(n(1398)),
a = o(n(2028)),
c = n(8078);
class u {
constructor(e, t) {
(this.client = e), (this.formattingOptionsManager = t);
}
async provideDocumentRangeFormattingEdits(e, t, n, r) {
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
await this.formattingOptionsManager.ensureConfigurationOptions(
e,
n,
r
);
const o = a.Range.toFormattingRequestArgs(i, t),
s = await this.client.execute("format", o, r);
return "response" === s.type && s.body
? s.body.map(a.TextEdit.fromCodeEdit)
: void 0;
}
async provideOnTypeFormattingEdits(e, t, n, r, i) {
const o = this.client.toOpenTsFilePath(e);
if (!o) return [];
await this.formattingOptionsManager.ensureConfigurationOptions(
e,
r,
i
);
const s = { ...a.Position.toFileLocationRequestArgs(o, t), key: n },
c = await this.client.execute("formatonkey", s, i);
if ("response" !== c.type || !c.body) return [];
const u = [];
for (const t of c.body) {
const n = a.TextEdit.fromCodeEdit(t),
r = n.range;
if (
0 === r.start.character &&
r.start.line === r.end.line &&
"" === n.newText
) {
const t = e.lineAt(r.start.line).text;
(t.trim().length > 0 || t.length > r.end.character) &&
u.push(n);
} else u.push(n);
}
return u;
}
}
},
1265: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n) {
return (0, c.conditionalRegistration)(
[
(0, c.requireSomeCapability)(
t,
a.ClientCapability.EnhancedSyntax,
a.ClientCapability.Semantic
),
],
() => s.languages.registerHoverProvider(e.syntax, new d(t, n))
);
});
const s = o(n(1398)),
a = n(6623),
c = n(8078),
u = n(465),
l = o(n(2028));
class d {
constructor(e, t) {
(this.client = e), (this.fileConfigurationManager = t);
}
async provideHover(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
const i = await this.client.interruptGetErr(async () => {
await this.fileConfigurationManager.ensureConfigurationForDocument(
e,
n
);
const i = l.Position.toFileLocationRequestArgs(r, t);
return this.client.execute("quickinfo", i, n);
});
return "response" === i.type && i.body
? new s.Hover(
this.getContents(e.uri, i.body, i._serverType),
l.Range.fromTextSpan(i.body)
)
: void 0;
}
getContents(e, t, n) {
const r = [];
if (t.displayString) {
const i = [];
n === a.ServerType.Syntax &&
this.client.hasCapabilityForResource(
e,
a.ClientCapability.Semantic
) &&
i.push(
s.l10n.t({
message: "(loading...)",
comment: [
"Prefix displayed for hover entries while the server is still loading",
],
})
),
i.push(t.displayString),
r.push(
new s.MarkdownString().appendCodeblock(
i.join(" "),
"typescript"
)
);
}
const i = (0, u.documentationToMarkdown)(
t.documentation,
t.tags,
this.client,
e
);
return r.push(i), r;
}
}
},
7772: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
},
s =
(this && this.__importDefault) ||
function (e) {
return e && e.__esModule ? e : { default: e };
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, l.conditionalRegistration)(
[(0, l.requireSomeCapability)(t, c.ClientCapability.Semantic)],
() =>
a.languages.registerImplementationProvider(e.semantic, new d(t))
);
});
const a = o(n(1398)),
c = n(6623),
u = s(n(98)),
l = n(8078);
class d extends u.default {
provideImplementation(e, t, n) {
return this.getSymbolLocations("implementation", e, t, n);
}
}
},
1900: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r, i) {
return (0, f.conditionalRegistration)(
[
(0, f.requireMinVersion)(n, p.minVersion),
(0, f.requireSomeCapability)(n, u.ClientCapability.Semantic),
],
() => {
const o = new p(t, n, r, i);
return s.languages.registerInlayHintsProvider(e.semantic, o);
}
);
});
const s = o(n(1398)),
a = n(2276),
c = n(2028),
u = n(6623),
l = n(4014),
d = n(9640),
f = n(8078),
h = Object.freeze([
d.InlayHintSettingNames
.parameterNamesSuppressWhenArgumentMatchesName,
d.InlayHintSettingNames.parameterNamesEnabled,
d.InlayHintSettingNames.variableTypesEnabled,
d.InlayHintSettingNames.variableTypesSuppressWhenTypeMatchesName,
d.InlayHintSettingNames.propertyDeclarationTypesEnabled,
d.InlayHintSettingNames.functionLikeReturnTypesEnabled,
d.InlayHintSettingNames.enumMemberValuesEnabled,
]);
class p extends l.Disposable {
constructor(e, t, n, r) {
super(),
(this.language = e),
(this.client = t),
(this.fileConfigurationManager = n),
(this.telemetryReporter = r),
(this._onDidChangeInlayHints = this._register(
new s.EventEmitter()
)),
(this.onDidChangeInlayHints = this._onDidChangeInlayHints.event),
(this.hasReportedTelemetry = !1),
this._register(
s.workspace.onDidChangeConfiguration((t) => {
h.some((n) => t.affectsConfiguration(e.id + "." + n)) &&
this._onDidChangeInlayHints.fire();
})
),
this._register(
s.workspace.onDidChangeTextDocument((t) => {
e.languageIds.includes(t.document.languageId) &&
this._onDidChangeInlayHints.fire();
})
);
}
async provideInlayHints(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
if (
!(function (e, t) {
const n = s.workspace.getConfiguration(e.id, t),
r = (0, d.getInlayHintsPreferences)(n);
return (
"literals" === r.includeInlayParameterNameHints ||
"all" === r.includeInlayParameterNameHints ||
r.includeInlayEnumMemberValueHints ||
r.includeInlayFunctionLikeReturnTypeHints ||
r.includeInlayFunctionParameterTypeHints ||
r.includeInlayPropertyDeclarationTypeHints ||
r.includeInlayVariableTypeHints
);
})(this.language, e)
)
return;
const i = e.offsetAt(t.start),
o = e.offsetAt(t.end) - i;
if (
(await this.fileConfigurationManager.ensureConfigurationForDocument(
e,
n
),
n.isCancellationRequested)
)
return;
this.hasReportedTelemetry ||
((this.hasReportedTelemetry = !0),
this.telemetryReporter.logTelemetry("inlayHints.provide", {}));
const a = await this.client.execute(
"provideInlayHints",
{ file: r, start: i, length: o },
n
);
return "response" === a.type && a.success && a.body
? a.body.map((e) => {
const t = new s.InlayHint(
c.Position.fromLocation(e.position),
this.convertInlayHintText(e),
(function (e) {
switch (e) {
case "Parameter":
return s.InlayHintKind.Parameter;
case "Type":
return s.InlayHintKind.Type;
default:
return;
}
})(e.kind)
);
return (
(t.paddingLeft = e.whitespaceBefore),
(t.paddingRight = e.whitespaceAfter),
t
);
})
: void 0;
}
convertInlayHintText(e) {
return e.displayParts
? e.displayParts.map((e) => {
const t = new s.InlayHintLabelPart(e.text);
return (
e.span &&
(t.location = c.Location.fromTextSpan(
this.client.toResource(e.span.file),
e.span
)),
t
);
})
: e.text;
}
}
p.minVersion = a.API.v440;
},
6277: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.templateToSnippet = d),
(t.register = function (e, t, n, r) {
return s.languages.registerCompletionItemProvider(
e.syntax,
new l(n, t, r),
"*"
);
});
const s = o(n(1398)),
a = o(n(2028)),
c = new s.SnippetString("/**\n * $0\n */");
class u extends s.CompletionItem {
constructor(e, t) {
super("/** */", s.CompletionItemKind.Text),
(this.document = e),
(this.position = t),
(this.detail = s.l10n.t("JSDoc comment")),
(this.sortText = "\0");
const n = e.lineAt(t.line).text,
r = n.slice(0, t.character).match(/\/\**\s*$/),
i = n.slice(t.character).match(/^\s*\**\//),
o = t.translate(0, r ? -r[0].length : 0),
a = new s.Range(o, t.translate(0, i ? i[0].length : 0));
this.range = { inserting: a, replacing: a };
}
}
class l {
constructor(e, t, n) {
(this.client = e),
(this.language = t),
(this.fileConfigurationManager = n);
}
async provideCompletionItems(e, t, n) {
if (
!s.workspace
.getConfiguration(this.language.id, e)
.get("suggest.completeJSDocs")
)
return;
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
if (!this.isPotentiallyValidDocCompletionPosition(e, t)) return;
const i = await this.client.interruptGetErr(async () => {
await this.fileConfigurationManager.ensureConfigurationForDocument(
e,
n
);
const i = a.Position.toFileLocationRequestArgs(r, t);
return this.client.execute("docCommentTemplate", i, n);
});
if ("response" !== i.type || !i.body) return;
const o = new u(e, t);
return (
"/** */" === i.body.newText
? (o.insertText = c)
: (o.insertText = d(i.body.newText)),
[o]
);
}
isPotentiallyValidDocCompletionPosition(e, t) {
const n = e.lineAt(t.line).text,
r = n.slice(0, t.character);
if (!/^\s*$|\/\*\*\s*$|^\s*\/\*\*+\s*$/.test(r)) return !1;
const i = n.slice(t.character);
return /^\s*(\*+\/)?\s*$/.test(i);
}
}
function d(e) {
let t = 1;
return (
(e = (e = (e = (e = (e = e.replace(/\$/g, "\\$")).replace(
/^[ \t]*(?=(\/|[ ]\*))/gm,
""
)).replace(/^(\/\*\*\s*\*[ ]*)$/m, (e) => e + "$0")).replace(
/\* @param([ ]\{\S+\})?\s+(\S+)[ \t]*$/gm,
(e, n, r) => {
let i = "* @param ";
return (
" {any}" === n || " {*}" === n
? (i += `{\${${t++}:*}} `)
: n && (i += n + " "),
(i += r + ` \${${t++}}`),
i
);
}
)).replace(/\* @returns[ \t]*$/gm, `* @returns \${${t++}}`)),
new s.SnippetString(e)
);
}
},
8452: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, l.conditionalRegistration)(
[
(0, l.requireMinVersion)(t, d.minVersion),
(0, l.requireSomeCapability)(t, u.ClientCapability.Syntax),
],
() =>
s.languages.registerLinkedEditingRangeProvider(
e.syntax,
new d(t)
)
);
});
const s = o(n(1398)),
a = n(2276),
c = o(n(2028)),
u = n(6623),
l = n(8078);
class d {
constructor(e) {
this.client = e;
}
async provideLinkedEditingRanges(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
const i = c.Position.toFileLocationRequestArgs(r, t),
o = await this.client.execute("linkedEditingRange", i, n);
if ("response" !== o.type || !o.body) return;
const a = o.body.wordPattern
? new RegExp(o.body.wordPattern)
: void 0;
return new s.LinkedEditingRanges(
o.body.ranges.map((e) => c.Range.fromTextSpan(e)),
a
);
}
}
d.minVersion = a.API.v510;
},
968: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, c.conditionalRegistration)(
[(0, c.requireMinVersion)(t, a.API.v540)],
() => {
const n = new l(t);
return s.chat.registerMappedEditsProvider(e.semantic, n);
}
);
});
const s = o(n(1398)),
a = n(2276),
c = n(8078),
u = n(2028);
class l {
constructor(e) {
this.client = e;
}
async provideMappedEdits(e, t, n, r) {
if (!this.isEnabled()) return;
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
const o = await this.client.execute(
"mapCode",
{
file: i,
mapping: {
contents: t,
focusLocations: n.documents.map((e) =>
e.flatMap((e) => {
const t = this.client.toTsFilePath(e.uri);
return t
? e.ranges.map((e) => ({
file: t,
...u.Range.toTextSpan(e),
}))
: [];
})
),
},
},
r
);
return "response" === o.type && o.body
? u.WorkspaceEdit.fromFileCodeEdits(this.client, o.body)
: void 0;
}
isEnabled() {
return s.workspace
.getConfiguration("typescript")
.get("experimental.mappedCodeEdits.enabled", !1);
}
}
},
5922: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r, i) {
const o = [];
for (const c of [h, p, g])
o.push(
(0, f.conditionalRegistration)(
[
(0, f.requireMinVersion)(
t,
c.minVersion ?? a.API.defaultVersion
),
(0, f.requireSomeCapability)(
t,
l.ClientCapability.Semantic
),
],
() => {
const o = new y(t, c, n, r, i);
return s.Disposable.from(
s.languages.registerCodeActionsProvider(e.semantic, o, {
providedCodeActionKinds: [c.kind],
})
);
}
),
...c.commandIds.map((e) =>
n.register({
id: e,
execute: () =>
s.commands.executeCommand("editor.action.sourceAction", {
kind: c.kind.value,
apply: "first",
}),
})
)
);
return s.Disposable.from(...o);
});
const s = o(n(1398)),
a = n(2276),
c = n(4728),
u = o(n(2028)),
l = n(6623),
d = n(988),
f = n(8078),
h = {
commandIds: [],
title: s.l10n.t("Organize Imports"),
kind: s.CodeActionKind.SourceOrganizeImports,
mode: c.OrganizeImportsMode.All,
},
p = {
commandIds: ["typescript.sortImports", "javascript.sortImports"],
minVersion: a.API.v430,
title: s.l10n.t("Sort Imports"),
kind: s.CodeActionKind.Source.append("sortImports"),
mode: c.OrganizeImportsMode.SortAndCombine,
},
g = {
commandIds: [
"typescript.removeUnusedImports",
"javascript.removeUnusedImports",
],
minVersion: a.API.v490,
title: s.l10n.t("Remove Unused Imports"),
kind: s.CodeActionKind.Source.append("removeUnusedImports"),
mode: c.OrganizeImportsMode.RemoveUnused,
};
class m {
constructor(e) {
(this.telemetryReporter = e), (this.id = m.ID);
}
async execute() {
this.telemetryReporter.logTelemetry("organizeImports.execute", {});
}
}
m.ID = "_typescript.didOrganizeImports";
class v extends s.CodeAction {
constructor(e, t, n) {
super(e, t), (this.document = n);
}
}
class y {
constructor(e, t, n, r, i) {
(this.client = e),
(this.commandMetadata = t),
(this.fileConfigManager = r),
n.register(new m(i));
}
provideCodeActions(e, t, n, r) {
return n.only?.contains(this.commandMetadata.kind) &&
this.client.toOpenTsFilePath(e)
? [
new v(
this.commandMetadata.title,
this.commandMetadata.kind,
e
),
]
: [];
}
async resolveCodeAction(e, t) {
const n = await this.client.interruptGetErr(async () => {
if (
(await this.fileConfigManager.ensureConfigurationForDocument(
e.document,
t
),
t.isCancellationRequested)
)
return;
const n = this.client.toOpenTsFilePath(e.document);
if (!n) return;
const r = {
scope: { type: "file", args: { file: n } },
skipDestructiveCodeActions:
this.commandMetadata.mode ===
c.OrganizeImportsMode.SortAndCombine,
mode: u.OrganizeImportsMode.toProtocolOrganizeImportsMode(
this.commandMetadata.mode
),
};
return this.client.execute("organizeImports", r, d.nulToken);
});
if ("response" === n?.type && n.body && !t.isCancellationRequested)
return (
n.body.length &&
(e.edit = u.WorkspaceEdit.fromFileCodeEdits(
this.client,
n.body
)),
(e.command = { command: m.ID, title: "", arguments: [] }),
e
);
}
}
},
5253: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__decorate) ||
function (e, t, n, r) {
var i,
o = arguments.length,
s =
o < 3
? t
: null === r
? (r = Object.getOwnPropertyDescriptor(t, n))
: r;
if (
"object" == typeof Reflect &&
"function" == typeof Reflect.decorate
)
s = Reflect.decorate(e, t, n, r);
else
for (var a = e.length - 1; a >= 0; a--)
(i = e[a]) &&
(s = (o < 3 ? i(s) : o > 3 ? i(t, n, s) : i(t, n)) || s);
return o > 3 && s && Object.defineProperty(t, n, s), s;
},
s =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r, i, o) {
return (0, g.conditionalRegistration)(
[(0, g.requireSomeCapability)(t, l.ClientCapability.Semantic)],
() =>
a.languages.registerCodeActionsProvider(
e.semantic,
new C(t, n, r, i, o),
C.metadata
)
);
});
const a = s(n(1398)),
c = s(n(9172)),
u = s(n(2028)),
l = n(6623),
d = n(988),
f = n(2231),
h = n(8851),
p = n(8981),
g = n(8078),
m = n(212);
class v {
constructor(e, t, n) {
(this.client = e),
(this.diagnosticManager = t),
(this.telemetryReporter = n),
(this.id = v.ID);
}
async execute({
document: e,
action: t,
diagnostic: n,
followupAction: r,
}) {
this.telemetryReporter.logTelemetry("quickFix.execute", {
fixName: t.fixName,
}),
this.diagnosticManager.deleteDiagnostic(e.uri, n);
const i = await (0, p.applyCodeActionCommands)(
this.client,
t.commands,
d.nulToken
);
return await r?.execute(), i;
}
}
v.ID = "_typescript.applyCodeActionCommand";
class y {
constructor(e, t) {
(this.client = e), (this.telemetryReporter = t), (this.id = y.ID);
}
async execute(e) {
this.telemetryReporter.logTelemetry("quickFixAll.execute", {
fixName: e.action.tsAction.fixName,
}),
e.action.combinedResponse &&
(await (0, p.applyCodeActionCommands)(
this.client,
e.action.combinedResponse.body.commands,
d.nulToken
));
}
}
y.ID = "_typescript.applyFixAllCodeAction";
class b {
static from(e) {
const t = new Map();
for (const n of e) t.set(b.key(n), n);
return new b(t);
}
static key(e) {
const { start: t, end: n } = e.range;
return `${e.code}-${t.line},${t.character}-${n.line},${n.character}`;
}
constructor(e) {
this._values = e;
}
get values() {
return this._values.values();
}
get size() {
return this._values.size;
}
}
class _ extends a.CodeAction {
constructor(e, t, n) {
super(t, n), (this.tsAction = e);
}
}
class w extends _ {
constructor(e, t, n, r) {
super(e, n, r), (this.file = t);
}
}
class S {
constructor() {
(this._actions = new Set()),
(this._fixAllActions = new Map()),
(this._aiActions = new Set());
}
*values() {
yield* this._actions, yield* this._aiActions;
}
addAction(e) {
if (e.isAI) this._aiActions.add(e);
else {
for (const t of this._actions)
e.tsAction.fixName === t.tsAction.fixName &&
(0, h.equals)(e.edit, t.edit) &&
this._actions.delete(t);
if ((this._actions.add(e), e.tsAction.fixId)) {
const t = this._fixAllActions.get(e.tsAction.fixId);
t && (this._actions.delete(t), this._actions.add(t));
}
}
}
addFixAllAction(e, t) {
const n = this._fixAllActions.get(e);
n && this._actions.delete(n),
this.addAction(t),
this._fixAllActions.set(e, t);
}
hasFixAllAction(e) {
return this._fixAllActions.has(e);
}
}
class P {
constructor(e) {
this.client = e;
}
async getFixableDiagnosticsForContext(e) {
const t = await this.fixableDiagnosticCodes;
return b.from(
e.filter((e) => void 0 !== e.code && t.has(e.code + ""))
);
}
get fixableDiagnosticCodes() {
return this.client
.execute("getSupportedCodeFixes", null, d.nulToken)
.then((e) => ("response" === e.type && e.body) || [])
.then((e) => new Set(e));
}
}
o([f.memoize], P.prototype, "fixableDiagnosticCodes", null);
class C {
constructor(e, t, n, r, i) {
(this.client = e),
(this.formattingConfigurationManager = t),
(this.diagnosticsManager = r),
n.register(new m.CompositeCommand()),
n.register(new v(e, r, i)),
n.register(new y(e, i)),
n.register(new m.EditorChatFollowUp(e, i)),
(this.supportedCodeActionProvider = new P(e));
}
async provideCodeActions(e, t, n, r) {
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
let o = n.diagnostics;
if (this.client.bufferSyncSupport.hasPendingDiagnostics(e.uri)) {
if (
(await new Promise((e) => {
setTimeout(e, 500);
}),
r.isCancellationRequested)
)
return;
const n = [];
for (const r of this.diagnosticsManager.getDiagnostics(e.uri))
if (
t.intersection(r.range) &&
n.push(r) > C._maxCodeActionsPerFile
)
break;
o = n;
}
const s =
await this.supportedCodeActionProvider.getFixableDiagnosticsForContext(
o
);
if (!s.size || r.isCancellationRequested) return;
if (
(await this.formattingConfigurationManager.ensureConfigurationForDocument(
e,
r
),
r.isCancellationRequested)
)
return;
const a = new S();
for (const t of s.values)
if (
(await this.getFixesForDiagnostic(e, i, t, a, r),
r.isCancellationRequested)
)
return;
const c = Array.from(a.values());
for (const e of c) e.isPreferred = O(e, c);
return c;
}
async resolveCodeAction(e, t) {
if (!(e instanceof w && e.tsAction.fixId)) return e;
const n = {
scope: { type: "file", args: { file: e.file } },
fixId: e.tsAction.fixId,
},
r = await this.client.execute("getCombinedCodeFix", n, t);
return (
"response" === r.type &&
((e.combinedResponse = r),
(e.edit = u.WorkspaceEdit.fromFileCodeEdits(
this.client,
r.body.changes
))),
e
);
}
async getFixesForDiagnostic(e, t, n, r, i) {
const o = {
...u.Range.toFileRangeRequestArgs(t, n.range),
errorCodes: [+n.code],
},
s = await this.client.execute("getCodeFixes", o, i);
if ("response" !== s.type || !s.body) return r;
for (const i of s.body) {
for (const t of this.getFixesForTsCodeAction(e, n, i))
r.addAction(t);
this.addFixAllForTsCodeAction(r, e.uri, t, n, i);
}
return r;
}
getFixesForTsCodeAction(e, t, n) {
const r = [],
i = new _(n, n.description, a.CodeActionKind.QuickFix);
(i.edit = (0, p.getEditForCodeAction)(this.client, n)),
(i.diagnostics = [t]),
(i.ranges = [t.range]),
(i.command = {
command: v.ID,
arguments: [{ action: n, diagnostic: t, document: e }],
title: "",
}),
r.push(i);
const o = a.extensions.getExtension("github.copilot-chat");
if (o?.isActive) {
let i,
o,
s = n.description;
if (n.fixName === c.classIncorrectlyImplementsInterface)
(s += " with Copilot"),
(i = `Implement the stubbed-out class members for ${e.getText(
t.range
)} with a useful implementation.`),
(o = { kind: "code-action", action: n });
else if (
n.fixName === c.fixClassDoesntImplementInheritedAbstractMember
)
(s += " with Copilot"),
(i = `Implement the stubbed-out class members for ${e.getText(
t.range
)} with a useful implementation.`),
(o = { kind: "code-action", action: n });
else if (n.fixName === c.fixMissingFunctionDeclaration)
(s = `Implement missing function declaration '${e.getText(
t.range
)}' using Copilot`),
(i = `Provide a reasonable implementation of the function ${e.getText(
t.range
)} given its type and the context it's called in.`),
(o = { kind: "code-action", action: n });
else if (n.fixName === c.inferFromUsage) {
const i = new _(
n,
"Infer types using Copilot",
a.CodeActionKind.QuickFix
);
(i.edit = new a.WorkspaceEdit()),
(i.diagnostics = [t]),
(i.ranges = [t.range]),
(i.isAI = !0),
(i.command = {
command: m.EditorChatFollowUp.ID,
arguments: [
{
message:
"Add types to this code. Add separate interfaces when possible. Do not change the code except for adding types.",
expand: {
kind: "navtree-function",
pos: t.range.start,
},
document: e,
action: { type: "quickfix", quickfix: n },
},
],
title: "",
}),
r.push(i);
} else
n.fixName === c.addNameToNamelessParameter &&
((s = "Add meaningful parameter name with Copilot"),
(i = `Rename the parameter ${n.changes
.map((e) => e.textChanges.map((e) => e.newText).join(""))
.join("")} with a more meaningful name.`),
(o = { kind: "navtree-function", pos: t.range.start }));
if (o && void 0 !== i) {
const c = new _(n, s, a.CodeActionKind.QuickFix);
(c.edit = (0, p.getEditForCodeAction)(this.client, n)),
c.edit?.insert(e.uri, t.range.start, ""),
(c.diagnostics = [t]),
(c.ranges = [t.range]),
(c.isAI = !0),
(c.command = {
command: m.CompositeCommand.ID,
title: "",
arguments: [
{
command: v.ID,
arguments: [{ action: n, diagnostic: t, document: e }],
title: "",
},
{
command: m.EditorChatFollowUp.ID,
title: "",
arguments: [
{
message: i,
expand: o,
document: e,
action: { type: "quickfix", quickfix: n },
},
],
},
],
}),
r.push(c);
}
}
return r;
}
addFixAllForTsCodeAction(e, t, n, r, i) {
if (!i.fixId || e.hasFixAllAction(i.fixId)) return e;
if (
!this.diagnosticsManager
.getDiagnostics(t)
.some(
(e) =>
e !== r &&
(e.code === r.code ||
(T.has(e.code) && T.get(e.code) === T.get(r.code)))
)
)
return e;
const o = new w(
i,
n,
i.fixAllDescription ||
a.l10n.t("{0} (Fix all in file)", i.description),
a.CodeActionKind.QuickFix
);
return (
(o.diagnostics = [r]),
(o.ranges = [r.range]),
(o.command = {
command: y.ID,
arguments: [{ action: o }],
title: "",
}),
e.addFixAllAction(i.fixId, o),
e
);
}
}
(C._maxCodeActionsPerFile = 1e3),
(C.metadata = {
providedCodeActionKinds: [a.CodeActionKind.QuickFix],
});
const T = new Map([
[2339, 2339],
[2345, 2339],
]),
x = new Map([
[c.annotateWithTypeFromJSDoc, { priority: 2 }],
[c.constructorForDerivedNeedSuperCall, { priority: 2 }],
[c.extendsInterfaceBecomesImplements, { priority: 2 }],
[c.awaitInSyncFunction, { priority: 2 }],
[c.removeUnnecessaryAwait, { priority: 2 }],
[c.classIncorrectlyImplementsInterface, { priority: 3 }],
[c.classDoesntImplementInheritedAbstractMember, { priority: 3 }],
[c.unreachableCode, { priority: 2 }],
[c.unusedIdentifier, { priority: 2 }],
[c.forgottenThisPropertyAccess, { priority: 2 }],
[c.spelling, { priority: 0 }],
[c.addMissingAwait, { priority: 2 }],
[c.addMissingOverride, { priority: 2 }],
[c.addMissingNewOperator, { priority: 2 }],
[c.fixImport, { priority: 1, thereCanOnlyBeOne: !0 }],
]);
function O(e, t) {
if (e instanceof w) return !1;
const n = x.get(e.tsAction.fixName);
return (
!!n &&
t.every((t) => {
if (t === e) return !0;
if (t instanceof w) return !0;
const r = x.get(t.tsAction.fixName);
return (
!r ||
r.priority < n.priority ||
(!(r.priority > n.priority) &&
(!n.thereCanOnlyBeOne ||
e.tsAction.fixName !== t.tsAction.fixName))
);
})
);
}
},
6861: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r, i, o) {
return (0, b.conditionalRegistration)(
[(0, b.requireSomeCapability)(t, g.ClientCapability.Semantic)],
() =>
a.languages.registerCodeActionsProvider(
e.semantic,
new V(t, n, r, i, o),
V.metadata
)
);
});
const s = o(n(6928)),
a = o(n(1398)),
c = n(4756),
u = n(7022),
l = o(n(6342)),
d = n(3796),
f = n(2276),
h = o(n(4728)),
p = o(n(2028)),
g = n(6623),
m = n(7405),
v = n(988),
y = n(212),
b = n(8078);
function _(e, t) {
const n = new a.WorkspaceEdit();
for (const r of t) {
const t = e.toResource(r.fileName);
t.scheme === l.file && n.createFile(t, { ignoreIfExists: !0 });
}
return p.WorkspaceEdit.withFileCodeEdits(n, e, t), n;
}
class w {
constructor(e) {
(this.telemetryReporter = e), (this.id = w.ID);
}
async execute(e) {
this.telemetryReporter.logTelemetry("refactor.execute", {
action: e.action,
trigger: e.trigger,
});
}
}
w.ID = "_typescript.didApplyRefactoring";
class S {
constructor(e) {
(this.client = e), (this.id = S.ID);
}
async execute(e) {
if (!this.client.toOpenTsFilePath(e.document)) return;
const t = await a.window.showQuickPick(
e.refactor.actions.map((e) => ({
action: e,
label: e.name,
description: e.description,
}))
);
if (!t) return;
const n = new F(
this.client,
e.document,
e.refactor,
t.action,
e.rangeOrSelection,
e.trigger
);
await n.resolve(v.nulToken),
!n.edit ||
(await a.workspace.applyEdit(n.edit, { isRefactoring: !0 }))
? n.command &&
(await a.commands.executeCommand(
n.command.command,
...(n.command.arguments ?? [])
))
: a.window.showErrorMessage(
a.l10n.t("Could not apply refactoring")
);
}
}
S.ID = "_typescript.selectRefactoring";
class P {
constructor(e, t) {
(this.client = e), (this.didApplyCommand = t), (this.id = P.ID);
}
async execute(e) {
const t = this.client.toOpenTsFilePath(e.document);
if (!t) return;
const n = await this.getTargetFile(e.document, t, e.range);
if (!n || n.toString() === t.toString()) return;
const r = {
...p.Range.toFileRangeRequestArgs(t, e.range),
action: "Move to file",
refactor: "Move to file",
interactiveRefactorArguments: { targetFile: n },
},
i = await this.client.execute(
"getEditsForRefactor",
r,
v.nulToken
);
if ("response" !== i.type || !i.body) return;
const o = _(this.client, i.body.edits);
(await a.workspace.applyEdit(o, { isRefactoring: !0 }))
? await this.didApplyCommand.execute({
action: e.action.name,
trigger: e.trigger,
})
: a.window.showErrorMessage(
a.l10n.t("Could not apply refactoring")
);
}
async getTargetFile(e, t, n) {
const r = p.Range.toFileRangeRequestArgs(t, n),
i = await this.client.execute(
"getMoveToRefactoringFileSuggestions",
r,
v.nulToken
);
if ("response" !== i.type || !i.body) return;
const o = i.body,
u = { label: a.l10n.t("Select existing file...") },
l = { label: a.l10n.t("Enter new file path...") },
f = a.workspace.getWorkspaceFolder(e.uri),
h = a.window.createQuickPick();
h.ignoreFocusOut = !0;
let g = !0;
const y = () => {
const t = ["./", "../"].find((e) => h.value.startsWith(e));
if (!1 === g && 0 == !!t) return;
g = !!t;
const n = o.files.map((n) => {
const r = this.client.toResource(n),
i = c.Utils.dirname(r),
o = c.Utils.basename(r);
let a;
if (f) {
if (
((a =
r.scheme === d.Schemes.file
? s.relative(f.uri.fsPath, i.fsPath)
: s.posix.relative(f.uri.path, i.path)),
t)
) {
const n = (u = s.relative(
s.dirname(e.uri.fsPath),
r.fsPath
)).startsWith("../")
? u
: `./${u}`;
if (!n.startsWith(t)) return;
a = n;
}
} else a = i.fsPath;
var u;
return {
file: n,
label: c.Utils.basename(r),
description: t ? a : s.join(a, o),
};
});
h.items = [
u,
l,
{
label: a.l10n.t("destination files"),
kind: a.QuickPickItemKind.Separator,
},
...(0, m.coalesce)(n),
];
};
(h.title = a.l10n.t("Move to File")),
(h.placeholder = a.l10n.t("Enter file path")),
(h.matchOnDescription = !0),
h.onDidChangeValue(y),
y();
const b = await new Promise((e) => {
h.onDidAccept(() => {
e(h.selectedItems[0]), h.dispose();
}),
h.onDidHide(() => {
e(void 0), h.dispose();
}),
h.show();
});
if (b) {
if (b === u) {
const t = await a.window.showOpenDialog({
title: a.l10n.t("Select move destination"),
openLabel: a.l10n.t("Move to File"),
defaultUri: c.Utils.dirname(e.uri),
});
return t?.length ? this.client.toTsFilePath(t[0]) : void 0;
}
if (b === l) {
const e = await a.window.showSaveDialog({
title: a.l10n.t("Select move destination"),
saveLabel: a.l10n.t("Move to File"),
defaultUri: this.client.toResource(i.body.newFileName),
});
return e ? this.client.toTsFilePath(e) : void 0;
}
return b.file;
}
}
}
P.ID = "_typescript.moveToFileRefactoring";
const C = Object.freeze({
kind: a.CodeActionKind.RefactorExtract.append("function"),
matches: (e) => e.name.startsWith("function_"),
}),
T = Object.freeze({
kind: a.CodeActionKind.RefactorExtract.append("constant"),
matches: (e) => e.name.startsWith("constant_"),
}),
x = Object.freeze({
kind: a.CodeActionKind.RefactorExtract.append("type"),
matches: (e) => e.name.startsWith("Extract to type alias"),
}),
O = Object.freeze({
kind: a.CodeActionKind.RefactorExtract.append("interface"),
matches: (e) => e.name.startsWith("Extract to interface"),
}),
E = Object.freeze({
kind: a.CodeActionKind.RefactorMove.append("file"),
matches: (e) => e.name.startsWith("Move to file"),
}),
I = Object.freeze({
kind: a.CodeActionKind.RefactorMove.append("newFile"),
matches: (e) => e.name.startsWith("Move to a new file"),
}),
k = Object.freeze({
kind: a.CodeActionKind.RefactorRewrite.append("import"),
matches: (e) =>
e.name.startsWith("Convert namespace import") ||
e.name.startsWith("Convert named imports"),
}),
j = Object.freeze({
kind: a.CodeActionKind.RefactorRewrite.append("export"),
matches: (e) =>
e.name.startsWith("Convert default export") ||
e.name.startsWith("Convert named export"),
}),
R = Object.freeze({
kind: a.CodeActionKind.RefactorRewrite.append("arrow").append(
"braces"
),
matches: (e) =>
e.name.startsWith("Convert default export") ||
e.name.startsWith("Convert named export"),
}),
D = Object.freeze({
kind: a.CodeActionKind.RefactorRewrite.append("parameters").append(
"toDestructured"
),
matches: (e) =>
e.name.startsWith("Convert parameters to destructured object"),
}),
M = Object.freeze({
kind: a.CodeActionKind.RefactorRewrite.append("property").append(
"generateAccessors"
),
matches: (e) =>
e.name.startsWith("Generate 'get' and 'set' accessors"),
}),
A = [C, T, x, O, E, I, k, j, R, D, M];
class F extends a.CodeAction {
constructor(e, t, n, r, i, o) {
const s = r.description;
super(s, F.getKind(r)),
(this.client = e),
(this.document = t),
(this.refactor = n),
(this.action = r),
(this.range = i),
r.notApplicableReason &&
(this.disabled = { reason: r.notApplicableReason }),
(this.command = {
title: s,
command: w.ID,
arguments: [{ action: r.name, trigger: o }],
});
}
async resolve(e) {
const t = this.client.toOpenTsFilePath(this.document);
if (!t) return;
const n = {
...p.Range.toFileRangeRequestArgs(t, this.range),
refactor: this.refactor.name,
action: this.action.name,
},
r = await this.client.execute("getEditsForRefactor", n, e);
"response" === r.type &&
r.body &&
((this.edit = _(this.client, r.body.edits)),
this.edit.size
? r.body.renameLocation &&
this.document.uri.scheme !== l.walkThroughSnippet &&
(this.command = {
command: y.CompositeCommand.ID,
title: "",
arguments: (0, m.coalesce)([
this.command,
{
command: "editor.action.rename",
arguments: [
[
this.document.uri,
p.Position.fromLocation(r.body.renameLocation),
],
],
},
]),
})
: a.window.showErrorMessage(
a.l10n.t("Could not apply refactoring")
));
}
static getKind(e) {
if (e.kind) return a.CodeActionKind.Empty.append(e.kind);
const t = A.find((t) => t.matches(e));
return t ? t.kind : a.CodeActionKind.Refactor;
}
}
class L extends a.CodeAction {
constructor(e, t, n, r) {
super(t.description, E.kind),
t.notApplicableReason &&
(this.disabled = { reason: t.notApplicableReason }),
(this.command = {
title: t.description,
command: P.ID,
arguments: [{ action: t, document: e, range: n, trigger: r }],
});
}
}
class N extends a.CodeAction {
constructor(e, t, n, r) {
super(e.description, a.CodeActionKind.Refactor),
(this.command = {
title: e.description,
command: S.ID,
arguments: [
{ document: t, refactor: e, rangeOrSelection: n, trigger: r },
],
});
}
}
class V {
static isOnSignatureName(e, t) {
if (this._declarationKinds.has(e.kind)) {
if (e.nameSpan) {
const n = p.Range.fromTextSpan(e.nameSpan);
if (t.intersection(n)) return !0;
}
if (
!e.nameSpan &&
/\bexport\b/.test(e.kindModifiers) &&
e.spans.length
) {
const n = p.Range.fromTextSpan(e.spans[0]);
if (
t.intersection(
new a.Range(
n.start.line,
0,
n.start.line,
Number.MAX_SAFE_INTEGER
)
)
)
return !0;
}
}
return (
e.childItems?.some((e) => this.isOnSignatureName(e, t)) ?? !1
);
}
constructor(e, t, n, r, i) {
(this.client = e),
(this.cachedNavTree = t),
(this.formattingOptionsManager = n);
const o = new w(i);
r.register(o),
r.register(new y.CompositeCommand()),
r.register(new S(this.client)),
r.register(new P(this.client, o)),
r.register(new y.EditorChatFollowUp(this.client, i));
}
async provideCodeActions(e, t, n, r) {
if (!this.shouldTrigger(n, t)) return;
if (!this.client.toOpenTsFilePath(e)) return;
const i = await this.interruptGetErrIfNeeded(n, () => {
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
this.formattingOptionsManager.ensureConfigurationForDocument(
e,
r
);
const o = {
...p.Range.toFileRangeRequestArgs(i, t),
triggerReason: this.toTsTriggerReason(n),
kind: n.only?.value,
includeInteractiveActions: this.client.apiVersion.gte(
f.API.v520
),
};
return this.client.execute("getApplicableRefactors", o, r);
});
if ("response" !== i?.type || !i.body) return;
const o = this.convertApplicableRefactors(e, n, i.body, t),
s = (0, m.coalesce)(
await Promise.all(
Array.from(o, async (i) => {
if (
!this.client.apiVersion.lt(f.API.v430) ||
n.only ||
"refactor.rewrite.function.returnType" !== i.kind?.value
) {
if (
this.client.apiVersion.lt(f.API.v540) &&
n.triggerKind === a.CodeActionTriggerKind.Automatic &&
(i.kind?.value === I.kind.value ||
i.kind?.value === E.kind.value)
) {
const n = this.client.toOpenTsFilePath(e);
if (!n) return;
const i = await this.cachedNavTree.execute(e, () =>
this.client.execute("navtree", { file: n }, r)
);
if (
"response" !== i.type ||
!i.body ||
!V.isOnSignatureName(i.body, t)
)
return;
}
return i;
}
})
)
);
return n.only
? this.pruneInvalidActions(
this.appendInvalidActions(s),
n.only,
5
)
: s;
}
interruptGetErrIfNeeded(e, t) {
return e.triggerKind === a.CodeActionTriggerKind.Invoke
? this.client.interruptGetErr(t)
: t();
}
async resolveCodeAction(e, t) {
return e instanceof F && (await e.resolve(t)), e;
}
toTsTriggerReason(e) {
return e.triggerKind === a.CodeActionTriggerKind.Invoke
? "invoked"
: "implicit";
}
*convertApplicableRefactors(e, t, n, r) {
for (const i of n)
if (!1 === i.inlineable) yield new N(i, e, r, t.triggerKind);
else
for (const n of i.actions)
for (const o of this.refactorActionToCodeActions(
e,
t,
i,
n,
r,
i.actions
))
yield o;
}
refactorActionToCodeActions(e, t, n, r, i, o) {
const s = [];
"Move to file" === r.name
? s.push(new L(e, r, i, t.triggerKind))
: s.push(new F(this.client, e, n, r, i, t.triggerKind));
for (const e of s) e.isPreferred = V.isPreferred(r, o);
return s;
}
shouldTrigger(e, t) {
return (
!(e.only && !a.CodeActionKind.Refactor.contains(e.only)) &&
(e.triggerKind === a.CodeActionTriggerKind.Invoke ||
t instanceof a.Selection)
);
}
static isPreferred(e, t) {
if (T.matches(e)) {
const n = (e) => {
const t = e.match(/scope_(\d)/)?.[1];
return t ? +t : void 0;
},
r = n(e.name);
return (
"number" == typeof r &&
t
.filter((t) => t !== e && T.matches(t))
.every((e) => {
const t = n(e.name);
return "number" != typeof t || r < t;
})
);
}
return !(!x.matches(e) && !O.matches(e));
}
appendInvalidActions(e) {
if (this.client.apiVersion.gte(f.API.v400)) return e;
if (!e.some((e) => e.kind && T.kind.contains(e.kind))) {
const t = new a.CodeAction(
a.l10n.t("Extract to constant"),
T.kind
);
(t.disabled = {
reason: a.l10n.t("The current selection cannot be extracted"),
}),
(t.isPreferred = !0),
e.push(t);
}
if (!e.some((e) => e.kind && C.kind.contains(e.kind))) {
const t = new a.CodeAction(
a.l10n.t("Extract to function"),
C.kind
);
(t.disabled = {
reason: a.l10n.t("The current selection cannot be extracted"),
}),
e.push(t);
}
return e;
}
pruneInvalidActions(e, t, n) {
if (this.client.apiVersion.lt(f.API.v400)) return e;
const r = [],
i = [],
o = [];
for (const t of e)
t.disabled
? t.kind && (T.kind.contains(t.kind) || C.kind.contains(t.kind))
? i.push(t)
: o.push(t)
: r.push(t);
const s = [];
s.push(...i), s.push(...o);
const a = s
.filter((e) => !t || (e.kind && t.contains(e.kind)))
.slice(0, n);
return r.push(...a), r;
}
}
(V._declarationKinds = new Set([
h.Kind.module,
h.Kind.class,
h.Kind.interface,
h.Kind.function,
h.Kind.enum,
h.Kind.type,
h.Kind.const,
h.Kind.variable,
h.Kind.let,
])),
(V.metadata = {
providedCodeActionKinds: [
a.CodeActionKind.Refactor,
...A.map((e) => e.kind),
],
documentation: [
{
kind: a.CodeActionKind.Refactor,
command: {
command: u.LearnMoreAboutRefactoringsCommand.id,
title: a.l10n.t("Learn more about JS/TS refactorings"),
},
},
],
});
},
1049: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, u.conditionalRegistration)(
[
(0, u.requireSomeCapability)(
t,
c.ClientCapability.EnhancedSyntax,
c.ClientCapability.Semantic
),
],
() => s.languages.registerReferenceProvider(e.syntax, new l(t))
);
});
const s = o(n(1398)),
a = o(n(2028)),
c = n(6623),
u = n(8078);
class l {
constructor(e) {
this.client = e;
}
async provideReferences(e, t, n, r) {
const i = this.client.toOpenTsFilePath(e);
if (!i) return [];
const o = a.Position.toFileLocationRequestArgs(i, t),
s = await this.client.execute("references", o, r);
if ("response" !== s.type || !s.body) return [];
const c = [];
for (const e of s.body.refs) {
if (!n.includeDeclaration && e.isDefinition) continue;
const t = this.client.toResource(e.file),
r = a.Location.fromTextSpan(t, e);
c.push(r);
}
return c;
}
}
},
3241: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n, r) {
return (0, f.conditionalRegistration)(
[(0, f.requireSomeCapability)(n, d.ClientCapability.Semantic)],
() =>
a.languages.registerRenameProvider(e.semantic, new h(t, n, r))
);
});
const s = o(n(6928)),
a = o(n(1398)),
c = o(n(4284)),
u = n(2276),
l = o(n(2028)),
d = n(6623),
f = n(8078);
class h {
constructor(e, t, n) {
(this.language = e),
(this.client = t),
(this.fileConfigurationManager = n);
}
async prepareRename(e, t, n) {
if (this.client.apiVersion.lt(u.API.v310)) return;
const r = await this.execRename(e, t, n);
if (r)
switch (r.type) {
case "rename": {
const e = r.body.info;
return e.canRename
? l.Range.fromTextSpan(e.triggerSpan)
: Promise.reject(e.localizedErrorMessage);
}
case "jsxLinkedEditing":
return r.spans
.map(l.Range.fromTextSpan)
.find((e) => e.contains(t));
}
}
async provideRenameEdits(e, t, n, r) {
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
const o = await this.execRename(e, t, r);
if (o && !r.isCancellationRequested)
switch (o.type) {
case "rename": {
const e = o.body.info;
if (!e.canRename)
return Promise.reject(e.localizedErrorMessage);
if (e.fileToRename) {
return (
(await this.renameFile(
e.fileToRename,
e.fullDisplayName,
n,
r
)) ||
Promise.reject(
a.l10n.t("An error occurred while renaming file")
)
);
}
return this.updateLocs(o.body.locs, n);
}
case "jsxLinkedEditing":
return this.updateLocs(
[{ file: i, locs: o.spans.map((e) => ({ ...e })) }],
n
);
}
}
async execRename(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
if (
this.client.apiVersion.gte(u.API.v510) &&
a.workspace
.getConfiguration(this.language.id)
.get("preferences.renameMatchingJsxTags", !0) &&
this.looksLikePotentialJsxTagContext(e, t)
) {
const e = l.Position.toFileLocationRequestArgs(r, t),
i = await this.client.execute("linkedEditingRange", e, n);
if ("response" !== i.type || !i.body) return;
return { type: "jsxLinkedEditing", spans: i.body.ranges };
}
const i = {
...l.Position.toFileLocationRequestArgs(r, t),
findInStrings: !1,
findInComments: !1,
};
return this.client.interruptGetErr(async () => {
this.fileConfigurationManager.ensureConfigurationForDocument(
e,
n
);
const t = await this.client.execute("rename", i, n);
if ("response" === t.type && t.body)
return { type: "rename", body: t.body };
});
}
looksLikePotentialJsxTagContext(e, t) {
if (
![c.typescriptreact, c.javascript, c.javascriptreact].includes(
e.languageId
)
)
return !1;
const n = e.getText(new a.Range(t.line, 0, t.line, t.character));
return /\<\/?\s*[\w\d_$.]*$/.test(n);
}
updateLocs(e, t) {
const n = new a.WorkspaceEdit();
for (const r of e) {
const e = this.client.toResource(r.file);
for (const i of r.locs)
n.replace(
e,
l.Range.fromTextSpan(i),
(i.prefixText || "") + t + (i.suffixText || "")
);
}
return n;
}
async renameFile(e, t, n, r) {
s.extname(n)
? s.extname(n) === s.extname(t) &&
(n = n.slice(0, n.length - s.extname(n).length) + s.extname(e))
: (n += s.extname(e));
const i = s.dirname(e),
o = s.join(i, n),
c = { file: e, oldFilePath: e, newFilePath: o },
u = await this.client.execute("getEditsForFileRename", c, r);
if ("response" !== u.type || !u.body) return;
const d = l.WorkspaceEdit.fromFileCodeEdits(this.client, u.body);
return d.renameFile(a.Uri.file(e), a.Uri.file(o)), d;
}
}
},
8217: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, u.conditionalRegistration)(
[
(0, u.requireMinVersion)(t, a.API.v370),
(0, u.requireSomeCapability)(t, c.ClientCapability.Semantic),
],
() => {
const n = new d(t);
return s.languages.registerDocumentRangeSemanticTokensProvider(
e.semantic,
n,
n.getLegend()
);
}
);
});
const s = o(n(1398)),
a = n(2276),
c = n(6623),
u = n(8078),
l = 1e5;
class d {
constructor(e) {
this.client = e;
}
getLegend() {
return new s.SemanticTokensLegend(p, g);
}
async provideDocumentSemanticTokens(e, t) {
const n = this.client.toOpenTsFilePath(e);
return !n || e.getText().length > l
? null
: this.provideSemanticTokens(
e,
{ file: n, start: 0, length: e.getText().length },
t
);
}
async provideDocumentRangeSemanticTokens(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r || e.offsetAt(t.end) - e.offsetAt(t.start) > l) return null;
const i = e.offsetAt(t.start),
o = e.offsetAt(t.end) - i;
return this.provideSemanticTokens(
e,
{ file: r, start: i, length: o },
n
);
}
async provideSemanticTokens(e, t, n) {
if (!this.client.toOpenTsFilePath(e)) return null;
const r = e.version,
i = await this.client.execute(
"encodedSemanticClassifications-full",
{ ...t, format: "2020" },
n,
{ cancelOnResourceChange: e.uri }
);
if ("response" !== i.type || !i.body) return null;
if (r !== e.version)
throw (
(await (function (e) {
let t = e.version;
return new Promise((n) => {
const r = setInterval((i) => {
e.version === t && (clearInterval(r), n()),
(t = e.version);
}, 400);
});
})(e),
new s.CancellationError())
);
const o = i.body.spans,
a = new s.SemanticTokensBuilder();
for (let t = 0; t < o.length; ) {
const n = o[t++],
r = o[t++],
i = o[t++],
s = f(i);
if (void 0 === s) continue;
const c = h(i),
u = e.positionAt(n),
l = e.positionAt(n + r);
for (let t = u.line; t <= l.line; t++) {
const n = t === u.line ? u.character : 0,
r = t === l.line ? l.character : e.lineAt(t).text.length;
a.push(t, n, r - n, s, c);
}
}
return a.build();
}
}
function f(e) {
if (e > 255) return (e >> 8) - 1;
}
function h(e) {
return 255 & e;
}
const p = [];
(p[0] = "class"),
(p[1] = "enum"),
(p[2] = "interface"),
(p[3] = "namespace"),
(p[4] = "typeParameter"),
(p[5] = "type"),
(p[6] = "parameter"),
(p[7] = "variable"),
(p[8] = "enumMember"),
(p[9] = "property"),
(p[10] = "function"),
(p[11] = "method");
const g = [];
(g[2] = "async"),
(g[0] = "declaration"),
(g[3] = "readonly"),
(g[1] = "static"),
(g[5] = "local"),
(g[4] = "defaultLibrary");
},
462: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, u.conditionalRegistration)(
[
(0, u.requireSomeCapability)(
t,
c.ClientCapability.EnhancedSyntax,
c.ClientCapability.Semantic
),
],
() =>
s.languages.registerSignatureHelpProvider(e.syntax, new d(t), {
triggerCharacters: d.triggerCharacters,
retriggerCharacters: d.retriggerCharacters,
})
);
});
const s = o(n(1398)),
a = o(n(2028)),
c = n(6623),
u = n(8078),
l = o(n(465));
class d {
constructor(e) {
this.client = e;
}
async provideSignatureHelp(e, t, n, r) {
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
const o = {
...a.Position.toFileLocationRequestArgs(i, t),
triggerReason: f(r),
},
c = await this.client.interruptGetErr(() =>
this.client.execute("signatureHelp", o, n)
);
if ("response" !== c.type || !c.body) return;
const u = c.body,
l = new s.SignatureHelp();
return (
(l.signatures = u.items.map((t) =>
this.convertSignature(t, e.uri)
)),
(l.activeSignature = this.getActiveSignature(r, u, l.signatures)),
(l.activeParameter = this.getActiveParameter(u)),
l
);
}
getActiveSignature(e, t, n) {
const r =
e.activeSignatureHelp?.signatures[
e.activeSignatureHelp.activeSignature
];
if (r && e.isRetrigger) {
const e = n.findIndex((e) => e.label === r?.label);
if (e >= 0) return e;
}
return t.selectedItemIndex;
}
getActiveParameter(e) {
const t = e.items[e.selectedItemIndex];
return t?.isVariadic
? Math.min(e.argumentIndex, t.parameters.length - 1)
: e.argumentIndex;
}
convertSignature(e, t) {
const n = new s.SignatureInformation(
l.asPlainTextWithLinks(e.prefixDisplayParts, this.client),
l.documentationToMarkdown(
e.documentation,
e.tags.filter((e) => "param" !== e.name),
this.client,
t
)
);
let r = n.label.length;
const i = l.asPlainTextWithLinks(
e.separatorDisplayParts,
this.client
);
for (let o = 0; o < e.parameters.length; ++o) {
const a = e.parameters[o],
c = l.asPlainTextWithLinks(a.displayParts, this.client);
n.parameters.push(
new s.ParameterInformation(
[r, r + c.length],
l.documentationToMarkdown(a.documentation, [], this.client, t)
)
),
(r += c.length),
(n.label += c),
o !== e.parameters.length - 1 &&
((n.label += i), (r += i.length));
}
return (
(n.label += l.asPlainTextWithLinks(
e.suffixDisplayParts,
this.client
)),
n
);
}
}
function f(e) {
switch (e.triggerKind) {
case s.SignatureHelpTriggerKind.TriggerCharacter:
return e.triggerCharacter
? e.isRetrigger
? { kind: "retrigger", triggerCharacter: e.triggerCharacter }
: {
kind: "characterTyped",
triggerCharacter: e.triggerCharacter,
}
: { kind: "invoked" };
case s.SignatureHelpTriggerKind.ContentChange:
return e.isRetrigger
? { kind: "retrigger" }
: { kind: "invoked" };
case s.SignatureHelpTriggerKind.Invoke:
default:
return { kind: "invoked" };
}
}
(d.triggerCharacters = ["(", ",", "<"]),
(d.retriggerCharacters = [")"]);
},
8354: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, u.conditionalRegistration)(
[(0, u.requireMinVersion)(t, l.minVersion)],
() =>
s.languages.registerSelectionRangeProvider(e.syntax, new l(t))
);
});
const s = o(n(1398)),
a = n(2276),
c = o(n(2028)),
u = n(8078);
class l {
constructor(e) {
this.client = e;
}
async provideSelectionRanges(e, t, n) {
const r = this.client.toOpenTsFilePath(e);
if (!r) return;
const i = { file: r, locations: t.map(c.Position.toLocation) },
o = await this.client.execute("selectionRange", i, n);
return "response" === o.type && o.body
? o.body.map(l.convertSelectionRange)
: void 0;
}
static convertSelectionRange(e) {
return new s.SelectionRange(
c.Range.fromTextSpan(e.textSpan),
e.parent ? l.convertSelectionRange(e.parent) : void 0
);
}
}
l.minVersion = a.API.v350;
},
6231: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
function n() {
s.commands.executeCommand(
"setContext",
l.context,
e.apiVersion.gte(l.minVersion)
);
}
return n(), t.register(new l(e)), e.onTsServerStarted(() => n());
});
const s = o(n(1398)),
a = n(4284),
c = n(2276),
u = o(n(2028));
class l {
constructor(e) {
(this.client = e), (this.id = "typescript.goToSourceDefinition");
}
async execute() {
if (this.client.apiVersion.lt(l.minVersion))
return void s.window.showErrorMessage(
s.l10n.t(
"Go to Source Definition failed. Requires TypeScript 4.7+."
)
);
const e = s.window.activeTextEditor;
if (!e)
return void s.window.showErrorMessage(
s.l10n.t(
"Go to Source Definition failed. No resource provided."
)
);
const t = e.document.uri,
n = await s.workspace.openTextDocument(t);
if (!(0, a.isSupportedLanguageMode)(n))
return void s.window.showErrorMessage(
s.l10n.t(
"Go to Source Definition failed. Unsupported file type."
)
);
const r = this.client.toOpenTsFilePath(n);
r
? await s.window.withProgress(
{
location: s.ProgressLocation.Window,
title: s.l10n.t("Finding source definitions"),
},
async (n, i) => {
const o = e.selection.anchor,
a = u.Position.toFileLocationRequestArgs(r, o),
c = await this.client.execute(
"findSourceDefinition",
a,
i
);
if ("response" === c.type && c.body) {
const e = c.body.map((e) =>
u.Location.fromTextSpan(
this.client.toResource(e.file),
e
)
);
if (e.length)
return void (1 === e.length
? s.commands.executeCommand(
"vscode.open",
e[0].uri.with({
fragment: `L${e[0].range.start.line + 1},${
e[0].range.start.character + 1
}`,
})
)
: s.commands.executeCommand(
"editor.action.showReferences",
t,
o,
e
));
}
s.window.showErrorMessage(
s.l10n.t("No source definitions found.")
);
}
)
: s.window.showErrorMessage(
s.l10n.t("Go to Source Definition failed. Unknown file type.")
);
}
}
(l.context = "tsSupportsSourceDefinition"), (l.minVersion = c.API.v470);
},
8676: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n) {
return (0, c.conditionalRegistration)(
[(0, c.requireMinVersion)(n, d.minVersion), f(e.syntax, t)],
() => new d(n)
);
});
const s = o(n(1398)),
a = n(2276),
c = n(8078),
u = n(4014),
l = o(n(2028));
class d extends u.Disposable {
constructor(e) {
super(),
(this.client = e),
(this._disposed = !1),
(this._timeout = void 0),
(this._cancel = void 0),
s.workspace.onDidChangeTextDocument(
(e) => this.onDidChangeTextDocument(e),
null,
this._disposables
);
}
dispose() {
super.dispose(),
(this._disposed = !0),
this._timeout &&
(clearTimeout(this._timeout), (this._timeout = void 0)),
this._cancel &&
(this._cancel.cancel(),
this._cancel.dispose(),
(this._cancel = void 0));
}
onDidChangeTextDocument({
document: e,
contentChanges: t,
reason: n,
}) {
if (
0 === t.length ||
n === s.TextDocumentChangeReason.Undo ||
n === s.TextDocumentChangeReason.Redo
)
return;
const r = s.window.activeTextEditor?.document;
if (e !== r) return;
const i = this.client.toOpenTsFilePath(e);
if (!i) return;
void 0 !== this._timeout && clearTimeout(this._timeout),
this._cancel &&
(this._cancel.cancel(),
this._cancel.dispose(),
(this._cancel = void 0));
const o = t[t.length - 1],
a = o.text[o.text.length - 1];
if (o.rangeLength > 0 || (">" !== a && "/" !== a)) return;
if (
">" ===
(o.range.start.character > 0
? e.getText(
new s.Range(
o.range.start.translate({ characterDelta: -1 }),
o.range.start
)
)
: "")
)
return;
const c = e.version;
this._timeout = setTimeout(async () => {
if (((this._timeout = void 0), this._disposed)) return;
const t = o.text.split(/\r\n|\n/g),
n =
t.length <= 1
? o.range.start.translate({ characterDelta: o.text.length })
: new s.Position(
o.range.start.line + t.length - 1,
t[t.length - 1].length
),
r = l.Position.toFileLocationRequestArgs(i, n);
this._cancel = new s.CancellationTokenSource();
const a = await this.client.execute(
"jsxClosingTag",
r,
this._cancel.token
);
if ("response" !== a.type || !a.body) return;
if (this._disposed) return;
const u = s.window.activeTextEditor;
if (!u) return;
const d = a.body,
f = u.document;
e === f &&
f.version === c &&
u.insertSnippet(
this.getTagSnippet(d),
this.getInsertionPositions(u, n)
);
}, 100);
}
getTagSnippet(e) {
const t = new s.SnippetString();
return t.appendPlaceholder("", 0), t.appendText(e.newText), t;
}
getInsertionPositions(e, t) {
const n = e.selections.map((e) => e.active);
return n.some((e) => e.isEqual(t)) ? n : t;
}
}
function f(e, t) {
return new c.Condition(
() => {
const n = s.window.activeTextEditor;
return !(
!n ||
!s.languages.match(e, n.document) ||
!s.workspace
.getConfiguration(t.id, n.document)
.get("autoClosingTags")
);
},
(e) =>
s.Disposable.from(
s.window.onDidChangeActiveTextEditor(e),
s.workspace.onDidOpenTextDocument(e),
s.workspace.onDidChangeConfiguration(e)
)
);
}
d.minVersion = a.API.v300;
},
4508: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function () {
const e = ["**/[jt]sconfig.json", "**/[jt]sconfig.*.json"],
t = ["json", "jsonc"]
.map((t) => e.map((e) => ({ language: t, pattern: e })))
.flat();
return c.Disposable.from(
c.commands.registerCommand(
h,
async ({ resourceUri: e, extendsValue: t, linkType: n }) => {
const r = await (async function (e, t, n) {
async function r(e) {
return e.path.endsWith(".json") ||
(await (0, d.exists)(e))
? e
: e.with({
path: `${e.path}${
n === p.References ? "/tsconfig.json" : ".json"
}`,
});
}
return ["./", "../"].some((e) => t.startsWith(e))
? r(c.Uri.joinPath(e, t))
: t.startsWith("/") ||
(0, d.looksLikeAbsoluteWindowsPath)(t)
? r(c.Uri.file(t))
: (async function (e, t) {
let n = e;
const r = t[0],
i = r.startsWith("@") ? 2 : 1,
o = r
.split(a.posix.sep)
.slice(0, i)
.join(a.posix.sep);
for (;;) {
const e = c.Uri.joinPath(n, "node_modules", o);
let r;
try {
r = await c.workspace.fs.stat(e);
} catch (e) {}
if (r && r.type & c.FileType.Directory)
for (const n of t
.map((e) =>
e
.split(a.posix.sep)
.slice(i)
.join(a.posix.sep)
)
.filter(Boolean)
.map((t) => c.Uri.joinPath(e, t)))
if (await (0, d.exists)(n)) return n;
const s = n;
if (
((n = c.Uri.joinPath(n, "..")), s.path === n.path)
)
return;
}
})(e, [
t,
...(t.endsWith(".json")
? []
: [`${t}.json`, `${t}/tsconfig.json`]),
]);
})(u.Utils.dirname(c.Uri.from(e)), t, n);
void 0 !== r
? await c.commands.executeCommand("vscode.open", r)
: c.window.showErrorMessage(
c.l10n.t("Failed to resolve {0} as module", t)
);
}
),
c.languages.registerDocumentLinkProvider(t, new g())
);
});
const s = o(n(5887)),
a = n(6928),
c = o(n(1398)),
u = n(4756),
l = n(7405),
d = n(3624);
function f(e, t) {
return e && "array" === e.type && e.children ? e.children.map(t) : [];
}
const h = "_typescript.openExtendsLink";
var p;
!(function (e) {
(e[(e.Extends = 0)] = "Extends"),
(e[(e.References = 1)] = "References");
})(p || (p = {}));
class g {
provideDocumentLinks(e, t) {
const n = s.parseTree(e.getText());
return n
? (0, l.coalesce)([
this.getExtendsLink(e, n),
...this.getFilesLinks(e, n),
...this.getReferencesLinks(e, n),
])
: [];
}
getExtendsLink(e, t) {
const n = s.findNodeAtLocation(t, ["extends"]);
return n && this.tryCreateTsConfigLink(e, n, p.Extends);
}
getReferencesLinks(e, t) {
return f(s.findNodeAtLocation(t, ["references"]), (t) => {
const n = s.findNodeAtLocation(t, ["path"]);
return n && this.tryCreateTsConfigLink(e, n, p.References);
});
}
tryCreateTsConfigLink(e, t, n) {
if (!this.isPathValue(t)) return;
const r = {
resourceUri: { ...e.uri.toJSON(), $mid: void 0 },
extendsValue: t.value,
linkType: n,
},
i = new c.DocumentLink(
this.getRange(e, t),
c.Uri.parse(`command:${h}?${JSON.stringify(r)}`)
);
return (i.tooltip = c.l10n.t("Follow link")), i;
}
getFilesLinks(e, t) {
return f(s.findNodeAtLocation(t, ["files"]), (t) =>
this.pathNodeToLink(e, t)
);
}
pathNodeToLink(e, t) {
return this.isPathValue(t)
? new c.DocumentLink(
this.getRange(e, t),
this.getFileTarget(e, t)
)
: void 0;
}
isPathValue(e) {
return (
e && "string" === e.type && e.value && !e.value.includes("*")
);
}
getFileTarget(e, t) {
return (0, a.isAbsolute)(t.value)
? c.Uri.file(t.value)
: c.Uri.joinPath(u.Utils.dirname(e.uri), t.value);
}
getRange(e, t) {
const n = t.offset,
r = e.positionAt(n + 1),
i = e.positionAt(n + (t.length - 1));
return new c.Range(r, i);
}
}
},
2589: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
},
s =
(this && this.__importDefault) ||
function (e) {
return e && e.__esModule ? e : { default: e };
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return (0, l.conditionalRegistration)(
[
(0, l.requireSomeCapability)(
t,
c.ClientCapability.EnhancedSyntax,
c.ClientCapability.Semantic
),
],
() =>
a.languages.registerTypeDefinitionProvider(e.syntax, new d(t))
);
});
const a = o(n(1398)),
c = n(6623),
u = s(n(98)),
l = n(8078);
class d extends u.default {
provideTypeDefinition(e, t, n) {
return this.getSymbolLocations("typeDefinition", e, t, n);
}
}
t.default = d;
},
4319: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t, n) {
return (0, m.conditionalRegistration)(
[
(0, m.requireMinVersion)(e, y.minVersion),
(0, m.requireSomeCapability)(e, f.ClientCapability.Semantic),
],
() => new y(e, t, n)
);
});
const s = o(n(6928)),
a = o(n(1398)),
c = o(n(6342)),
u = n(2188),
l = n(2276),
d = o(n(2028)),
f = n(6623),
h = n(3931),
p = n(988),
g = n(4014),
m = n(8078),
v = "updateImportsOnFileMove.enabled";
class y extends g.Disposable {
constructor(e, t, n) {
super(),
(this.client = e),
(this.fileConfigurationManager = t),
(this._handles = n),
(this._delayer = new h.Delayer(50)),
(this._pendingRenames = new Set()),
this._register(
a.workspace.onDidRenameFiles(async (e) => {
for (const { newUri: t, oldUri: n } of e.files) {
const e = this.client.toTsFilePath(t);
if (!e) continue;
const r = this.client.toTsFilePath(n);
if (!r) continue;
if ("never" === this.getConfiguration(t).get(v)) continue;
const i = await this.getJsTsFileBeingMoved(t);
i &&
this.client.toTsFilePath(i) &&
(this._pendingRenames.add({
oldUri: n,
newUri: t,
newFilePath: e,
oldFilePath: r,
jsTsFileThatIsBeingMoved: i,
}),
this._delayer.trigger(() => {
a.window.withProgress(
{
location: a.ProgressLocation.Window,
title: a.l10n.t(
"Checking for update of JS/TS imports"
),
},
() => this.flushRenames()
);
}));
}
})
);
}
async flushRenames() {
const e = Array.from(this._pendingRenames);
this._pendingRenames.clear();
for (const t of this.groupRenames(e)) {
const e = new a.WorkspaceEdit(),
n = [];
for (const {
oldUri: r,
newUri: i,
newFilePath: o,
oldFilePath: s,
jsTsFileThatIsBeingMoved: c,
} of t) {
const t = await a.workspace.openTextDocument(c);
this.client.bufferSyncSupport.closeResource(r),
this.client.bufferSyncSupport.openTextDocument(t),
(await this.withEditsForFileRename(e, t, s, o)) && n.push(i);
}
e.size &&
(await this.confirmActionWithUser(n)) &&
(await a.workspace.applyEdit(e, { isRefactoring: !0 }));
}
}
async confirmActionWithUser(e) {
if (!e.length) return !1;
switch (this.getConfiguration(e[0]).get(v)) {
case "always":
return !0;
case "never":
return !1;
default:
return this.promptUser(e);
}
}
getConfiguration(e) {
return a.workspace.getConfiguration(
(0, u.doesResourceLookLikeATypeScriptFile)(e)
? "typescript"
: "javascript",
e
);
}
async promptUser(e) {
if (!e.length) return !1;
const t = { title: a.l10n.t("No"), isCloseAffordance: !0 },
n = { title: a.l10n.t("Yes") },
r = { title: a.l10n.t("Always") },
i = { title: a.l10n.t("Never") };
switch (
await a.window.showInformationMessage(
1 === e.length
? a.l10n.t(
"Update imports for '{0}'?",
s.basename(e[0].fsPath)
)
: this.getConfirmMessage(
a.l10n.t(
"Update imports for the following {0} files?",
e.length
),
e
),
{ modal: !0 },
t,
n,
r,
i
)
) {
case n:
return !0;
case t:
return !1;
case r: {
const t = this.getConfiguration(e[0]);
return (
t.update(v, "always", this.getConfigTargetScope(t, v)), !0
);
}
case i: {
const t = this.getConfiguration(e[0]);
return (
t.update(v, "never", this.getConfigTargetScope(t, v)), !1
);
}
default:
return !1;
}
}
async getJsTsFileBeingMoved(e) {
if (e.scheme === c.file)
return (await (async function (e) {
try {
return (
(await a.workspace.fs.stat(e)).type === a.FileType.Directory
);
} catch {
return !1;
}
})(e))
? (
await a.workspace.findFiles(
new a.RelativePattern(e, "**/*.{ts,tsx,js,jsx}"),
"**/node_modules/**",
1
)
)[0]
: (await this._handles(e))
? e
: void 0;
}
async withEditsForFileRename(e, t, n, r) {
const i = await this.client.interruptGetErr(() => {
this.fileConfigurationManager.setGlobalConfigurationFromDocument(
t,
p.nulToken
);
const e = { oldFilePath: n, newFilePath: r };
return this.client.execute(
"getEditsForFileRename",
e,
p.nulToken
);
});
return !(
"response" !== i.type ||
!i.body.length ||
(d.WorkspaceEdit.withFileCodeEdits(e, this.client, i.body), 0)
);
}
groupRenames(e) {
const t = new Map();
for (const n of e) {
const e = `${
this.client.getWorkspaceRootForResource(
n.jsTsFileThatIsBeingMoved
)?.fsPath
}@@@${(0, u.doesResourceLookLikeATypeScriptFile)(
n.jsTsFileThatIsBeingMoved
)}`;
t.has(e) || t.set(e, new Set()), t.get(e).add(n);
}
return t.values();
}
getConfirmMessage(e, t) {
const n = [e];
return (
n.push(""),
n.push(...t.slice(0, 10).map((e) => s.basename(e.fsPath))),
t.length > 10 &&
(t.length - 10 == 1
? n.push(a.l10n.t("...1 additional file not shown"))
: n.push(
a.l10n.t(
"...{0} additional files not shown",
t.length - 10
)
)),
n.push(""),
n.join("\n")
);
}
getConfigTargetScope(e, t) {
const n = e.inspect(t);
return n?.workspaceFolderValue
? a.ConfigurationTarget.WorkspaceFolder
: n?.workspaceValue
? a.ConfigurationTarget.Workspace
: a.ConfigurationTarget.Global;
}
}
y.minVersion = l.API.v300;
},
8981: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.getEditForCodeAction = c),
(t.applyCodeAction = async function (e, t, n) {
const r = c(e, t);
return (
!(r && !(await s.workspace.applyEdit(r))) && u(e, t.commands, n)
);
}),
(t.applyCodeActionCommands = u);
const s = o(n(1398)),
a = o(n(2028));
function c(e, t) {
return t.changes?.length
? a.WorkspaceEdit.fromFileCodeEdits(e, t.changes)
: void 0;
}
async function u(e, t, n) {
if (t?.length)
for (const r of t)
await e.execute("applyCodeActionCommand", { command: r }, n);
return !0;
}
},
212: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.CompositeCommand = t.EditorChatFollowUp = void 0);
const s = o(n(1398)),
a = n(988),
c = o(n(2028));
class u {
constructor(e, t) {
(this.client = e), (this.telemetryReporter = t), (this.id = u.ID);
}
async execute({ message: e, document: t, expand: n, action: r }) {
"quickfix" === r.type
? this.telemetryReporter.logTelemetry("aiQuickfix.execute", {
action: r.quickfix.fixName,
})
: this.telemetryReporter.logTelemetry("aiRefactor.execute", {
action: r.refactor.name,
});
const i =
"navtree-function" === n.kind
? await f(this.client, t, n.pos.line)
: "refactor-info" === n.kind
? await h(
this.client,
t,
n.refactor.edits.flatMap((e) => e.textChanges)
)
: "code-action" === n.kind
? await h(
this.client,
t,
n.action.changes.flatMap((e) => e.textChanges)
)
: n.range,
o = i ? new s.Selection(i.start, i.end) : void 0;
await s.commands.executeCommand("vscode.editorChat.start", {
initialRange: i,
initialSelection: o,
message: e,
autoSend: !0,
});
}
}
(t.EditorChatFollowUp = u),
(u.ID = "_typescript.quickFix.editorChatReplacement2");
class l {
constructor() {
this.id = l.ID;
}
async execute(...e) {
for (const t of e)
await s.commands.executeCommand(
t.command,
...(t.arguments ?? [])
);
}
}
function d(e, t) {
for (const n of t) {
const t = c.Range.fromTextSpan(n.spans[0]);
if (e === t.start.line) return t;
if (e > t.start.line && e <= t.end.line && n.childItems)
return d(e, n.childItems);
}
}
async function f(e, t, n) {
const r = e.toOpenTsFilePath(t);
if (!r) return;
const i = await e.execute("navtree", { file: r }, a.nulToken);
return "response" === i.type && i.body?.childItems
? d(n, i.body.childItems)
: void 0;
}
async function h(e, t, n) {
let r = c.Position.fromLocation(n[0].start),
i = n[0],
o = n[0],
a = c.Position.fromLocation(n[0].start);
for (const e of n) {
const t = c.Position.fromLocation(e.start),
n = c.Position.fromLocation(e.end);
t.compareTo(r) < 0 && ((r = t), (i = e)),
n.compareTo(a) > 0 && ((a = n), (o = e));
}
const u = t.getText(),
l = u.indexOf(i.newText),
d = l > -1 ? t.positionAt(l) : r,
h = u.lastIndexOf(o.newText),
p = h > -1 ? t.positionAt(h + o.newText.length) : a,
g = await f(e, t, p.line);
return new s.Range(d, g?.end ?? p);
}
(t.CompositeCommand = l), (l.ID = "_typescript.compositeCommand");
},
8078: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.Condition = void 0),
(t.conditionalRegistration = function (e, t) {
return new u(e, t);
}),
(t.requireMinVersion = function (e, t) {
return new c(() => e.apiVersion.gte(t), e.onTsServerStarted);
}),
(t.requireGlobalConfiguration = function (e, t) {
return new c(
() => !!s.workspace.getConfiguration(e, null).get(t),
s.workspace.onDidChangeConfiguration
);
}),
(t.requireSomeCapability = function (e, ...t) {
return new c(
() => t.some((t) => e.capabilities.has(t)),
e.onDidChangeCapabilities
);
});
const s = o(n(1398)),
a = n(4014);
class c extends a.Disposable {
constructor(e, t) {
super(),
(this.getValue = e),
(this._onDidChange = this._register(new s.EventEmitter())),
(this.onDidChange = this._onDidChange.event),
(this._value = this.getValue()),
t(() => {
const e = this.getValue();
e !== this._value &&
((this._value = e), this._onDidChange.fire());
});
}
get value() {
return this._value;
}
}
t.Condition = c;
class u {
constructor(e, t) {
(this.conditions = e),
(this.doRegister = t),
(this.registration = void 0);
for (const t of e) t.onDidChange(() => this.update());
this.update();
}
dispose() {
this.registration?.dispose(), (this.registration = void 0);
}
update() {
this.conditions.every((e) => e.value)
? this.registration ?? (this.registration = this.doRegister())
: (this.registration?.dispose(), (this.registration = void 0));
}
}
},
9522: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.snippetForFunctionCall = function (e, t) {
if (e.insertText && "string" != typeof e.insertText)
return { snippet: e.insertText, parameterCount: 0 };
const n = (function (e) {
const t = [];
let n = [],
r = !1,
i = !1,
o = 0,
s = 0;
e: for (let c = 0; c < e.length; ++c) {
const u = e[c];
switch (u.kind) {
case a.DisplayPartKind.methodName:
case a.DisplayPartKind.functionName:
case a.DisplayPartKind.text:
case a.DisplayPartKind.propertyName:
0 === o && 0 === s && (r = !0);
break;
case a.DisplayPartKind.parameterName:
if (1 === o && 0 === s && r) {
const r = e[c + 1],
o = r && "?" === r.text,
s = "this" === u.text;
o ? n.push(u) : (t.push(...n), (n = [])),
o || s || t.push(u),
(i = i || o);
}
break;
case a.DisplayPartKind.punctuation:
if ("(" === u.text) ++o;
else if (")" === u.text) {
if ((--o, o <= 0 && r)) break e;
} else {
if ("..." === u.text && 1 === o) {
i = !0;
break e;
}
"{" === u.text ? ++s : "}" === u.text && --s;
}
}
}
return { hasOptionalParameters: i, parts: t };
})(t),
r = new s.SnippetString();
return (
r.appendText(`${e.insertText || e.label}(`),
(function (e, t, n) {
for (let n = 0; n < t.length; ++n) {
const r = t[n];
e.appendPlaceholder(r.text),
n !== t.length - 1 && e.appendText(", ");
}
})(r, n.parts),
n.hasOptionalParameters && r.appendTabstop(),
r.appendText(")"),
r.appendTabstop(0),
{
snippet: r,
parameterCount:
n.parts.length + (n.hasOptionalParameters ? 1 : 0),
}
);
});
const s = o(n(1398)),
a = o(n(4728));
},
465: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.asPlainTextWithLinks = l),
(t.tagsToMarkdown = h),
(t.documentationToMarkdown = function (e, t, n, r) {
const i = new s.MarkdownString();
return (
p(i, e, t, n),
(i.baseUri = r),
(i.isTrusted = { enabledCommands: [a.OpenJsDocLinkCommand.id] }),
i
);
}),
(t.appendDocumentationAsMarkdown = p);
const s = o(n(1398)),
a = n(3059),
c = o(n(2028));
function u(e) {
return (function (e) {
return e.replace(
/\{@(link|linkplain|linkcode) (https?:\/\/[^ |}]+?)(?:[| ]([^{}\n]+?))?\}/gi,
(e, t, n, r) =>
"linkcode" === t
? `[\`${r ? r.trim() : n}\`](${n})`
: `[${r ? r.trim() : n}](${n})`
);
})(e);
}
function l(e, t) {
return u(d(e, t));
}
function d(e, t) {
if (!e) return "";
if ("string" == typeof e) return e;
const n = [];
let r;
for (const i of e)
switch (i.kind) {
case "link":
if (r) {
if (r.target) {
const e = {
file: {
...t.toResource(r.target.file).toJSON(),
$mid: void 0,
},
position: c.Position.fromLocation(r.target.start),
},
i = `command:${
a.OpenJsDocLinkCommand.id
}?${encodeURIComponent(JSON.stringify([e]))}`,
o = r.text ? r.text : f(r.name ?? "");
n.push(`[${r.linkcode ? "`" + o + "`" : o}](${i})`);
} else {
const e = r.text ?? r.name;
if (e)
if (/^https?:/.test(e)) {
const t = e.split(" ");
if (1 === t.length) n.push(`<${t[0]}>`);
else if (t.length > 1) {
const e = t.slice(1).join(" ");
n.push(
`[${r.linkcode ? "`" + f(e) + "`" : e}](${t[0]})`
);
}
} else n.push(f(e));
}
r = void 0;
} else r = { linkcode: "{@linkcode " === i.text };
break;
case "linkName":
r && ((r.name = i.text), (r.target = i.target));
break;
case "linkText":
r && (r.text = i.text);
break;
default:
n.push(i.text);
}
return u(n.join(""));
}
function f(e) {
return e.replace(/`/g, "\\$&");
}
function h(e, t) {
return e
.map((e) =>
(function (e, t) {
switch (e.name) {
case "augments":
case "extends":
case "param":
case "template": {
const n = (function (e, t) {
if ("template" === e.name) {
const n = e.text;
if (n && "string" != typeof n) {
const e = n
.filter((e) => "typeParameterName" === e.kind)
.map((e) => e.text)
.join(", "),
r = n
.filter((e) => "text" === e.kind)
.map((e) => d(e.text.replace(/^\s*-?\s*/, ""), t))
.join(" ");
return e ? ["", e, r] : void 0;
}
}
return d(e.text, t).split(/^(\S+)\s*-?\s*/);
})(e, t);
if (3 === n?.length) {
const t = n[1],
r = n[2],
i = `*@${e.name}* \`${t}\``;
return r
? i +
(r.match(/\r\n|\n/g) ? " \n" + u(r) : ` — ${u(r)}`)
: i;
}
break;
}
case "return":
case "returns":
if (!e.text?.length) return;
}
const n = `*@${e.name}*`,
r = (function (e, t) {
if (!e.text) return;
function n(e) {
return /^\s*[~`]{3}/m.test(e) ? e : "```\n" + e + "\n```";
}
let r = d(e.text, t);
switch (e.name) {
case "example": {
r =
"string" == typeof (i = e.text)
? i
: i.map((e) => e.text).join("");
const t = r.match(
/<caption>(.*?)<\/caption>\s*(\r\n|\n)/
);
return t && 0 === t.index
? t[1] + "\n" + n(r.substr(t[0].length))
: n(r);
}
case "author": {
const e = r.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);
return null === e ? r : `${e[1]} ${e[2]}`;
}
case "default":
return n(r);
}
var i;
return u(r);
})(e, t);
return r
? n + (r.match(/\r\n|\n/g) ? " \n" + r : ` — ${r}`)
: n;
})(e, t)
)
.join(" \n\n");
}
function p(e, t, n, r) {
if ((t && e.appendMarkdown(l(t, r)), n)) {
const t = h(n, r);
t && e.appendMarkdown("\n\n" + t);
}
return (
(e.isTrusted = { enabledCommands: [a.OpenJsDocLinkCommand.id] }), e
);
}
},
7197: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.register = function (e, t) {
return s.languages.registerWorkspaceSymbolProvider(new p(e, t));
});
const s = o(n(1398)),
a = o(n(6342)),
c = n(2188),
u = n(2276),
l = n(2811),
d = o(n(4728)),
f = o(n(2028)),
h = n(7405);
class p {
constructor(e, t) {
(this.client = e), (this.modeIds = t);
}
async provideWorkspaceSymbols(e, t) {
let n;
if (this.searchAllOpenProjects) n = void 0;
else {
const e = this.getDocument();
if (
((n = e ? await this.toOpenedFiledPath(e) : void 0),
!n && this.client.apiVersion.lt(u.API.v390))
)
return [];
}
const r = { file: n, searchValue: e, maxResultCount: 256 },
i = await this.client.execute("navto", r, t);
return "response" === i.type && i.body
? (0, h.coalesce)(i.body.map((e) => this.toSymbolInformation(e)))
: [];
}
get searchAllOpenProjects() {
return (
this.client.apiVersion.gte(u.API.v390) &&
"allOpenProjects" ===
s.workspace
.getConfiguration("typescript")
.get("workspaceSymbols.scope", "allOpenProjects")
);
}
async toOpenedFiledPath(e) {
if (e.uri.scheme === a.git)
try {
const t = s.Uri.file(JSON.parse(e.uri.query)?.path);
if (
(0, c.doesResourceLookLikeATypeScriptFile)(t) ||
(0, c.doesResourceLookLikeAJavaScriptFile)(t)
) {
const e = await s.workspace.openTextDocument(t);
return this.client.toOpenTsFilePath(e);
}
} catch {}
return this.client.toOpenTsFilePath(e);
}
toSymbolInformation(e) {
if ("alias" === e.kind && !e.containerName) return;
const t = this.client.toResource(e.file);
if (a.isOfScheme(t, a.chatCodeBlock, a.chatBackingCodeBlock))
return;
const n = p.getLabel(e),
r = new s.SymbolInformation(
n,
(function (e) {
switch (e.kind) {
case d.Kind.method:
return s.SymbolKind.Method;
case d.Kind.enum:
return s.SymbolKind.Enum;
case d.Kind.enumMember:
return s.SymbolKind.EnumMember;
case d.Kind.function:
return s.SymbolKind.Function;
case d.Kind.class:
return s.SymbolKind.Class;
case d.Kind.interface:
return s.SymbolKind.Interface;
case d.Kind.type:
return s.SymbolKind.Class;
case d.Kind.memberVariable:
case d.Kind.memberGetAccessor:
case d.Kind.memberSetAccessor:
return s.SymbolKind.Field;
case d.Kind.variable:
default:
return s.SymbolKind.Variable;
}
})(e),
e.containerName || "",
f.Location.fromTextSpan(t, e)
),
i = e.kindModifiers
? (0, l.parseKindModifier)(e.kindModifiers)
: void 0;
return (
i?.has(d.KindModifiers.deprecated) &&
(r.tags = [s.SymbolTag.Deprecated]),
r
);
}
static getLabel(e) {
const t = e.name;
return "method" === e.kind || "function" === e.kind ? t + "()" : t;
}
getDocument() {
const e = s.window.activeTextEditor?.document;
if (e && this.modeIds.includes(e.languageId)) return e;
const t = s.workspace.textDocuments;
for (const e of t)
if (this.modeIds.includes(e.languageId)) return e;
}
}
},
9462: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
(i = {
enumerable: !0,
get: function () {
return t[n];
},
}),
Object.defineProperty(e, r, i);
}
: function (e, t, n, r) {
void 0 === r && (r = n), (e[r] = t[n]);
}),
i =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, "default", {
enumerable: !0,
value: t,
});
}
: function (e, t) {
e.default = t;
}),
o =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e)
"default" !== n &&
Object.prototype.hasOwnProperty.call(e, n) &&
r(t, e, n);
return i(t, e), t;
};
Object.defineProperty(t, "__esModule", { value: !0 });
const s = n(6928),
a = o(n(1398)),
c = o(n(6342)),
u = n(3796),
l = n(1791),
d = n(6623),
f = n(4014),
h = n(5588);
class p extends f.Disposable {
constructor(e, t, n, r, i, o, s) {
super(),
(this.client = e),
(this.description = t),
(this.commandManager = n),
(this.telemetryReporter = r),
(this.typingsStatus = i),
(this.fileConfigurationManager = o),
(this.onCompletionAccepted = s),
a.workspace.onDidChangeConfiguration(
this.configurationChanged,
this,
this._disposables
),
this.configurationChanged(),
e.onReady(() => this.registerProviders());
}
get documentSelector() {
const e = [],
t = [];
for (const n of this.description.languageIds) {
t.push({ language: n });
for (const t of c.getSemanticSupportedSchemes())
e.push({ language: n, scheme: t });
}
return { semantic: e, syntax: t };
}
async registerProviders() {
const e = this.documentSelector,
t = new l.CachedResponse();
await Promise.all([
Promise.resolve()
.then(() => o(n(1372)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(3067)))
.then((n) =>
this._register(
n.register(e, this.description, this.client, t)
)
),
Promise.resolve()
.then(() => o(n(8314)))
.then((n) =>
this._register(
n.register(e, this.description, this.client, t)
)
),
Promise.resolve()
.then(() => o(n(6052)))
.then((t) =>
this._register(
t.register(
e,
this.description,
this.client,
this.typingsStatus,
this.fileConfigurationManager,
this.commandManager,
this.telemetryReporter,
this.onCompletionAccepted
)
)
),
Promise.resolve()
.then(() => o(n(3799)))
.then((t) =>
this._register(t.register(e, this.description, this.client))
),
Promise.resolve()
.then(() => o(n(1965)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(978)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(7168)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(250)))
.then((n) => this._register(n.register(e, this.client, t))),
Promise.resolve()
.then(() => o(n(1803)))
.then((e) =>
this._register(e.register(this.client, this.commandManager))
),
Promise.resolve()
.then(() => o(n(1849)))
.then((t) =>
this._register(
t.register(
e,
this.client,
this.fileConfigurationManager,
this.client.diagnosticsManager
)
)
),
Promise.resolve()
.then(() => o(n(4346)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(9572)))
.then((t) =>
this._register(
t.register(
e,
this.description,
this.client,
this.fileConfigurationManager
)
)
),
Promise.resolve()
.then(() => o(n(1265)))
.then((t) =>
this._register(
t.register(e, this.client, this.fileConfigurationManager)
)
),
Promise.resolve()
.then(() => o(n(7772)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(1900)))
.then((t) =>
this._register(
t.register(
e,
this.description,
this.client,
this.fileConfigurationManager,
this.telemetryReporter
)
)
),
Promise.resolve()
.then(() => o(n(6277)))
.then((t) =>
this._register(
t.register(
e,
this.description,
this.client,
this.fileConfigurationManager
)
)
),
Promise.resolve()
.then(() => o(n(8452)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(968)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(5922)))
.then((t) =>
this._register(
t.register(
e,
this.client,
this.commandManager,
this.fileConfigurationManager,
this.telemetryReporter
)
)
),
Promise.resolve()
.then(() => o(n(5253)))
.then((t) =>
this._register(
t.register(
e,
this.client,
this.fileConfigurationManager,
this.commandManager,
this.client.diagnosticsManager,
this.telemetryReporter
)
)
),
Promise.resolve()
.then(() => o(n(6861)))
.then((n) =>
this._register(
n.register(
e,
this.client,
t,
this.fileConfigurationManager,
this.commandManager,
this.telemetryReporter
)
)
),
Promise.resolve()
.then(() => o(n(1049)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(3241)))
.then((t) =>
this._register(
t.register(
e,
this.description,
this.client,
this.fileConfigurationManager
)
)
),
Promise.resolve()
.then(() => o(n(8217)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(462)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(8354)))
.then((t) => this._register(t.register(e, this.client))),
Promise.resolve()
.then(() => o(n(6231)))
.then((e) =>
this._register(e.register(this.client, this.commandManager))
),
Promise.resolve()
.then(() => o(n(8676)))
.then((t) =>
this._register(t.register(e, this.description, this.client))
),
Promise.resolve()
.then(() => o(n(2589)))
.then((t) => this._register(t.register(e, this.client))),
]);
}
configurationChanged() {
const e = a.workspace.getConfiguration(this.id, null);
this.updateValidate(e.get("validate.enable", !0)),
this.updateSuggestionDiagnostics(
e.get("suggestionActions.enabled", !0)
);
}
handlesUri(e) {
const t = (0, s.extname)(e.path).slice(1).toLowerCase();
return (
this.description.standardFileExtensions.includes(t) ||
this.handlesConfigFile(e)
);
}
handlesDocument(e) {
return (
this.description.languageIds.includes(e.languageId) ||
this.handlesConfigFile(e.uri)
);
}
handlesConfigFile(e) {
const t = (0, s.basename)(e.fsPath);
return (
!!t &&
!!this.description.configFilePattern &&
this.description.configFilePattern.test(t)
);
}
get id() {
return this.description.id;
}
get diagnosticSource() {
return this.description.diagnosticSource;
}
updateValidate(e) {
this.client.diagnosticsManager.setValidate(
this._diagnosticLanguage,
e
);
}
updateSuggestionDiagnostics(e) {
this.client.diagnosticsManager.setEnableSuggestions(
this._diagnosticLanguage,
e
);
}
reInitialize() {
this.client.diagnosticsManager.reInitialize();
}
triggerAllDiagnostics() {
this.client.bufferSyncSupport.requestAllDiagnostics();
}
diagnosticsReceived(e, t, n, r) {
if (
0 !== e &&
!this.client.hasCapabilityForResource(
t,
d.ClientCapability.Semantic
)
)
return;
if (
1 === e &&
(0, h.isWeb)() &&
(!(0, h.isWebAndHasSharedArrayBuffers)() ||
!(0, h.supportsReadableByteStreams)() ||
this.client.configuration
.webProjectWideIntellisenseSuppressSemanticErrors ||
!this.client.configuration.webProjectWideIntellisenseEnabled)
)
return;
if (1 === e && t.scheme === u.Schemes.notebookCell) return;
const i = a.workspace.getConfiguration(this.id, t),
o = i.get("showUnused", !0),
s = i.get("showDeprecated", !0);
this.client.diagnosticsManager.updateDiagnostics(
t,
this._diagnosticLanguage,
e,
n.filter(
(e) =>
!(
(!o &&
e.reportUnnecessary &&
e.severity === a.DiagnosticSeverity.Hint) ||
(!s &&
e.reportDeprecated &&
e.severity === a.DiagnosticSeverity.Hint)
)
),
r
);
}
configFileDiagnosticsReceived(e, t) {
this.client.diagnosticsManager.configFileDiagnosticsReceived(e, t);
}
get _diagnosticLanguage() {
return this.description.diagnosticLanguage;
}
}
t.default = p;
},
7834: function (e, t, n) {
"use strict";
var r =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
(i &&
!("get" in i
? !t.__esModule
: i.writable || i.configurable)) ||
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment