Socket
Socket
Sign inDemoInstall

@microsoft/1ds-core-js

Package Overview
Dependencies
Maintainers
14
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/1ds-core-js - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

bundle/ms.core-3.1.1.gbl.js

2

dist-esm/src/AppInsightsCore.js
/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

@@ -90,2 +90,7 @@ /**

RealTime: number;
/**
* Bypass normal batching/timing and send as soon as possible, this will still send asynchronously.
* Added in v3.1.1
*/
Immediate: number;
};

@@ -214,9 +219,7 @@ /**

IllegalCharsInName: number;
ItemNotInArray: number; /**
* Normal persistence.
ItemNotInArray: number;
MaxAjaxPerPVExceeded: number; /**
* The EventPersistence contains a set of values that specify the event's persistence.
*/
MaxAjaxPerPVExceeded: number;
MessageTruncated: number; /**
* Critical persistence.
*/
MessageTruncated: number;
NameTooLong: number;

@@ -228,5 +231,3 @@ SampleRateOutOfRange: number;

StartCalledMoreThanOnce: number;
StopCalledWithoutStart: number; /**
* Error trace.
*/
StopCalledWithoutStart: number;
TelemetryInitializerFailed: number;

@@ -240,2 +241,5 @@ TrackArgumentsNotSpecified: number;

FailedMonitorAjaxSetRequestHeader: number;
/**
* Information trace.
*/
SendBrowserInfoOnUserInit: number;

@@ -242,0 +246,0 @@ PluginException: number;

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -96,3 +96,8 @@ * (Microsoft Internal Only)

*/
RealTime: 3
RealTime: 3,
/**
* Bypass normal batching/timing and send as soon as possible, this will still send asynchronously.
* Added in v3.1.1
*/
Immediate: 4
};

@@ -99,0 +104,0 @@ /**

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

import { IEventProperty } from "./DataModels";
import { GuidStyle, FieldValueSanitizerType } from "./Enums";
import { ITelemetryItem, objForEachKey, isNumber, isReactNative, isString, isBoolean, isArray, isObject, perfNow, addEventHandler, uaDisallowsSameSiteNone, objDefineAccessors, toISOString, strTrim, isFunction, objKeys, arrReduce, arrMap, arrIndexOf, arrForEach, areCookiesSupported, ICookieMgr, ICoreUtils, strEndsWith } from "@microsoft/applicationinsights-core-js";
export declare const Version = "3.1.0";
export declare const Version = "3.1.1";
export declare const FullVersionString: string;

@@ -6,0 +6,0 @@ /**

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -14,5 +14,5 @@ * (Microsoft Internal Only)

import { objCreateFn, strShimObject } from "@microsoft/applicationinsights-shims";
import { EventPropertyType, ValueKind } from "./Enums";
import { EventPropertyType, ValueKind, EventLatency } from "./Enums";
import { getDocument, hasNavigator, getNavigator, getWindow, getGlobalInst, objForEachKey, isUndefined, isNullOrUndefined, isNumber, isReactNative, isString, isBoolean, isArray, newGuid, isObject, perfNow, hasOwnProperty, addEventHandler, uaDisallowsSameSiteNone, strPrototype, objDefineAccessors, toISOString, strTrim, isFunction, objKeys, arrReduce, arrMap, arrIndexOf, arrForEach, strUndefined, strObject, areCookiesSupported, safeGetCookieMgr, generateW3CId, mwcRandom32, mwcRandomSeed, random32, randomValue, newId, isIE, dateNow, isError, isDate, isTypeof, strEndsWith, } from "@microsoft/applicationinsights-core-js";
export var Version = '3.1.0';
export var Version = '3.1.1';
export var FullVersionString = "1DS-Web-JS-" + Version;

@@ -96,3 +96,3 @@ // If value is array just get the type for the first element

export function isLatency(value) {
if (value && isNumber(value) && value >= 1 && value <= 3) {
if (value && isNumber(value) && value >= EventLatency.Normal && value <= EventLatency.Immediate) {
return true;

@@ -99,0 +99,0 @@ }

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -17,3 +17,3 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -42,3 +42,4 @@ * (Microsoft Internal Only)

CostDeferred: 2,
RealTime: 3
RealTime: 3,
Immediate: 4
};

@@ -70,3 +71,3 @@ var EventPropertyType = {

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -76,3 +77,3 @@ * (Microsoft Internal Only)

var _a;
var Version = '3.1.0';
var Version = '3.1.1';
var FullVersionString = "1DS-Web-JS-" + Version;

@@ -117,3 +118,3 @@ var _fieldTypeEventPropMap = (_a = {},

function isLatency(value) {
if (value && applicationinsightsCoreJs.isNumber(value) && value >= 1 && value <= 3) {
if (value && applicationinsightsCoreJs.isNumber(value) && value >= EventLatency.Normal && value <= EventLatency.Immediate) {
return true;

@@ -424,3 +425,3 @@ }

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -516,3 +517,3 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -558,3 +559,3 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -741,3 +742,3 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -958,3 +959,3 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -961,0 +962,0 @@ * (Microsoft Internal Only)

/*!
* 1DS JS SDK Core, 3.1.0
* 1DS JS SDK Core, 3.1.1
* Copyright (c) Microsoft and contributors. All rights reserved.
* (Microsoft Internal Only)
*/
var e=this,n=function(e,r,f,n){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}var o=t(n),i={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},u={Normal:1,CostDeferred:2,RealTime:3},a={Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9},l=r.__assignFn(r.__assignFn({},f._InternalMessageId),{AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}),s="3.1.0",d="1DS-Web-JS-"+s,c=((ie={})[0]=a.Unspecified,ie[2]=a.Double,ie[1]=a.String,ie[3]=a.Bool,ie[4098]=a.Double,ie[4097]=a.String,ie[4099]=a.Bool,ie),g=null,v=null,m=!!f.getDocument(),p=!!f.getWindow();function h(e){return!(""===e||f.isNullOrUndefined(e))}function y(e){if(e){var n=e.indexOf("-");if(-1<n)return e.substring(0,n)}return""}function S(){return g=null===g?f.hasNavigator()&&!!f.getNavigator().sendBeacon:g}function b(){return v=null===v?!(f.isUndefined(Uint8Array)||(e=f.getNavigator(),!f.isUndefined(e)&&e.userAgent&&(~(e=e.userAgent.toLowerCase()).indexOf("safari")||~e.indexOf("firefox"))&&!~e.indexOf("chrome"))||f.isReactNative()):v;var e}function C(e){return!!(e&&f.isNumber(e)&&1<=e&&e<=3)}function E(e,n,t){if(!n&&!h(n)||"string"!=typeof e)return null;if("string"==(e=typeof n)||"number"==e||"boolean"==e||f.isArray(n))n={value:n};else if("object"!=e||n.hasOwnProperty("value")){if(f.isNullOrUndefined(n.value)||""===n.value||!f.isString(n.value)&&!f.isNumber(n.value)&&!f.isBoolean(n.value)&&!f.isArray(n.value))return null}else n={value:t?JSON.stringify(n):n};if(f.isArray(n.value)&&!U(n.value))return null;if(!f.isNullOrUndefined(n.kind)){if(f.isArray(n.value)||!F(n.kind))return null;n.value=n.value.toString()}return n}function I(){if(typeof XMLHttpRequest!==undefined){var e=f.getGlobalInst("XMLHttpRequest");if(e)return e=new e,!(!f.isUndefined(e.withCredentials)||typeof XDomainRequest===undefined)}}function N(e,n,t){var r=-1;return f.isUndefined(e)||(0<n&&(32===n?r=8192:n<=13&&(r=n<<5)),0<=t&&t<=9?(-1===r&&(r=0),r|=t):(e=c[x(e)]||-1,-1!==r&&-1!==e?r|=e:e===a.Double&&(r=e))),r}function P(){f.safeGetCookieMgr(null).setEnabled(!1)}function w(e,n,t){f.areCookiesSupported(null)&&f.safeGetCookieMgr(null).set(e,n,86400*t,null,"/")}function O(e){f.areCookiesSupported(null)&&f.safeGetCookieMgr(null).del(e)}function A(e){return f.areCookiesSupported(null)?T(f.safeGetCookieMgr(null),e):""}function T(e,n,t){var r;return void 0===t&&(t=!0),e&&(r=e.get(n),t&&r&&decodeURIComponent&&(r=decodeURIComponent(r))),r||""}function j(e){void 0===e&&(e="D");var n=f.newGuid();return"B"===e?n="{"+n+"}":"P"===e?n="("+n+")":"N"===e&&(n=n.replace(/-/g,"")),n}function k(e,n,t,r,i){var o={},a=!1,s=0,u=arguments.length,l=Object[f.strPrototype],d=arguments;for("[object Boolean]"===l.toString.call(d[0])&&(a=d[0],s++);s<u;s++)f.objForEachKey(d[s],function(t,e){a&&e&&f.isObject(e)?f.isArray(e)?(o[t]=o[t]||[],f.arrForEach(e,function(e,n){e&&f.isObject(e)?o[t][n]=k(!0,o[t][n],e):o[t][n]=e})):o[t]=k(!0,o[t],e):o[t]=e});return o}var D=f.perfNow;function F(e){return e===i.NotSet||e>i.NotSet&&e<=i.Pii_IPV4AddressLegacy||e===i.CustomerContent_GenericContent}function U(e){return 0<e.length}function R(e){var n=f.addEventHandler("beforeunload",e),n=f.addEventHandler("unload",e)||n;return f.addEventHandler("pagehide",e)||n}function V(e,n){e.timings=e.timings||{},e.timings.processTelemetryStart=e.timings.processTelemetryStart||{},e.timings.processTelemetryStart[n]=D()}function x(e){var n,t=0;return null!==e&&e!==undefined&&("string"==(n=typeof e)?t=1:"number"==n?t=2:"boolean"==n?t=3:n===r.strShimObject&&(t=4,f.isArray(e)?(t=4096,0<e.length&&(t|=x(e[0]))):f.hasOwnProperty(e,"value")&&(t=8192|x(e.value)))),t}var M,_={Version:s,FullVersionString:d,strUndefined:f.strUndefined,strObject:f.strObject,Undefined:f.strUndefined,arrForEach:f.arrForEach,arrIndexOf:f.arrIndexOf,arrMap:f.arrMap,arrReduce:f.arrReduce,objKeys:f.objKeys,toISOString:f.toISOString,isReactNative:f.isReactNative,isString:f.isString,isNumber:f.isNumber,isBoolean:f.isBoolean,isFunction:f.isFunction,isArray:f.isArray,isObject:f.isObject,strTrim:f.strTrim,isDocumentObjectAvailable:m,isWindowObjectAvailable:p,isValueAssigned:h,getTenantId:y,isBeaconsSupported:S,isUint8ArrayAvailable:b,isLatency:C,sanitizeProperty:E,getISOString:f.toISOString,useXDomainRequest:I,getCommonSchemaMetaData:N,cookieAvailable:f.areCookiesSupported,disallowsSameSiteNone:f.uaDisallowsSameSiteNone,setCookie:w,deleteCookie:O,getCookie:A,createGuid:j,extend:k,getTime:D,isValueKind:F,isArrayValid:U,objDefineAccessors:f.objDefineAccessors,addPageUnloadEventListener:R,setProcessTelemetryTimings:V,addEventHandler:f.addEventHandler,getFieldValueType:x,strEndsWith:f.strEndsWith,objForEachKey:f.objForEachKey},H={_canUseCookies:undefined,isTypeof:f.isTypeof,isUndefined:f.isUndefined,isNullOrUndefined:f.isNullOrUndefined,hasOwnProperty:f.hasOwnProperty,isFunction:f.isFunction,isObject:f.isObject,isDate:f.isDate,isArray:f.isArray,isError:f.isError,isString:f.isString,isNumber:f.isNumber,isBoolean:f.isBoolean,toISOString:f.toISOString,arrForEach:f.arrForEach,arrIndexOf:f.arrIndexOf,arrMap:f.arrMap,arrReduce:f.arrReduce,strTrim:f.strTrim,objCreate:r.objCreateFn,objKeys:f.objKeys,objDefineAccessors:f.objDefineAccessors,addEventHandler:f.addEventHandler,dateNow:f.dateNow,isIE:f.isIE,disableCookies:P,newGuid:f.newGuid,perfNow:f.perfNow,newId:f.newId,randomValue:f.randomValue,random32:f.random32,mwcRandomSeed:f.mwcRandomSeed,mwcRandom32:f.mwcRandom32,generateW3CId:f.generateW3CId},L="version",G="properties",B=(M=f.AppInsightsCore,r.__extendsFn(W,M),W);function W(){var e=M.call(this)||this;return e.pluginVersionStringArr=[],e.pluginVersionString="",o(W,e,function(a,s){a.initialize=function(t,r,i,o){f.doPerf(a,function(){return"AppInsightsCore.initialize"},function(){if(t){t.endpointUrl||(t.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/");var e=t.propertyStorageOverride;if(e&&(!e.getProperty||!e.setProperty))throw Error("Invalid property storage override passed.");t.channels&&f.arrForEach(t.channels,function(e){e&&f.arrForEach(e,function(e){e.identifier&&e.version&&(e=e.identifier+"="+e.version,a.pluginVersionStringArr.push(e))})})}a.getWParam=function(){return"undefined"!=typeof document?0:-1},r&&f.arrForEach(r,function(e){e&&e.identifier&&e.version&&(e=e.identifier+"="+e.version,a.pluginVersionStringArr.push(e))}),a.pluginVersionString=a.pluginVersionStringArr.join(";");try{s.initialize(t,r,i,o)}catch(n){a.logger.throwInternal(f.LoggingSeverity.CRITICAL,l.ErrorProvidedChannels,"Channels must be provided through config.channels only")}a.pollInternalLogs("InternalLog")},function(){return{config:t,extensions:r,logger:i,notificationManager:o}})},a.track=function(t){f.doPerf(a,function(){return"AppInsightsCore.track"},function(){var e,n=t;n&&(n.timings=n.timings||{},n.timings.trackStart=D(),C(n.latency)||(n.latency=u.Normal),(e=n.ext=n.ext||{}).sdk=e.sdk||{},e.sdk.ver=d,(e=n.baseData=n.baseData||{})[G]||(e[G]={}),(e=e[G])[L]||(e[L]=""),""!==a.pluginVersionString&&(e[L]=a.pluginVersionString)),s.track(n)},function(){return{item:t}},!t.sync)}}),e}var z,K=(z=f.BaseCore,r.__extendsFn(q,z),q);function q(){var e=z.call(this)||this;return o(q,e,function(o,a){o.initialize=function(e,n,t,r){e&&(e.endpointUrl||(e.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/")),o.getWParam=function(){return m?0:-1};try{a.initialize(e,n,t,r)}catch(i){o.logger.throwInternal(f.LoggingSeverity.CRITICAL,l.ErrorProvidedChannels,"Channels must be provided through config.channels only")}},o.track=function(e){var n=e;n&&((e=n.ext=n.ext||{}).sdk=e.sdk||{},e.sdk.ver=d),a.track(n)}}),e}var J=f.isFunction,X=(Q.resolve=function(r){return r instanceof Q?r:r&&J(r.then)?new Q(function(e,n){try{r.then(e,n)}catch(t){n(t)}}):new Q(function(e){e(r)})},Q.reject=function(t){return new Q(function(e,n){n(t)})},Q.all=function(s){if(s&&s.length)return new Q(function(r,e){try{for(var i=[],o=0,n=0;n<s.length;n++){var t=s[n];t&&J(t.then)?(o++,t.then(function(n,t){return function(e){n[t]=e,0==--o&&r(i)}}(i,n),e)):i[n]=t}0===o&&setTimeout(function(){r(i)},0)}catch(a){e(a)}})},Q.race=function(i){return new Q(function(n,t){if(i&&i.length)try{for(var r=0;r<i.length;r++)!function(){var e=i[r];e&&J(e.then)?e.then(n,t):setTimeout(function(){n(e)},0)}()}catch(e){t(e)}})},Q);function Q(n){var a=0,s=null,e=[];function i(t,r,i,o){e.push(function(){var e;try{(e=1===a?J(t)?t(s):s:J(r)?r(s):s)instanceof Q?e.then(i,o):(2!==a||J(r)?i:o)(e)}catch(n){return void o(n)}}),0!==a&&u()}function u(){var r;0<e.length&&(r=e.slice(),e=[],setTimeout(function(){for(var e=0,n=r.length;e<n;++e)try{r[e]()}catch(t){}},0))}function t(e){0===a&&(s=e,a=1,u())}function r(e){0===a&&(s=e,a=2,u())}o(Q,this,function(n){n.then=function(t,r){return new Q(function(e,n){i(t,r,e,n)})},n["catch"]=function(e){return n.then(null,e)}}),function(){if(!J(n))throw new TypeError("ESPromise: resolvedFunc argument is not a Function");try{n(t,r)}catch(e){r(e)}}()}var Z=6e5,Y=0,$=[],ee=[],ne=[];function te(){return(new Date).getTime()}function re(e,n){var p=0,h=(e||"<unnamed>")+"."+Y;function y(e){var n=f.getGlobal();n&&n.QUnit&&console&&console.log("ESPromiseScheduler["+h+"] "+e)}function S(e){n&&n.warnToConsole("ESPromiseScheduler["+h+"] "+e)}Y++,o(re,this,function(e){var g=null,v=0;function m(e,n){for(var t=0;t<e.length;t++)if(e[t].id===n)return e.splice(t,1)[0];return null}e.scheduleEvent=function(t,e,s){var i=h+"."+v;v++,e&&(i+="-("+e+")");var o,a,n,r=i+"{"+p+"}";return p++,(e={evt:null,tm:te(),id:r,isRunning:!1,isAborted:!1}).evt=g?(o=e,a=g,n=new X(function(n,t){var e=te()-a.tm,r=a.id;y("["+i+"] is waiting for ["+r+":"+e+" ms] to complete before starting -- ["+ee.length+"] waiting and ["+$.length+"] running"),o.abort=function(e){o.abort=null,m(ee,i),o.isAborted=!0,t(Error(e))},a.evt.then(function(e){m(ee,i),f(o).then(n,t)},function(e){m(ee,i),f(o).then(n,t)})}),ee.push(o),n):f(e),(g=e).evt._schId=r,e.evt;function u(e){for(var n=te(),t=n-Z,r=e.length,i=0;i<r;){var o,a=e[i];a&&a.tm<t?(o=null,a.abort?(o="Aborting ["+a.id+"] due to Excessive runtime ("+(n-a.tm)+" ms)",a.abort(o)):o="Removing ["+a.id+"] due to Excessive runtime ("+(n-a.tm)+" ms)",S(o),e.splice(i,1),r--):i++}}function l(e,n){var t,r=!1,i=m($,e);i||(i=m(ne,e),r=!0),i?(i.to&&(clearTimeout(i.to),i.to=null),t=te()-i.tm,n?r?S("Timed out event ["+e+"] finally complete -- "+t+" ms"):y("Promise ["+e+"] Complete -- "+t+" ms"):(ne.push(i),S("Event ["+e+"] Timed out and removed -- "+t+" ms"))):y("Failed to remove ["+e+"] from running queue"),g&&g.id===e&&(g=null),u($),u(ee),u(ne)}function d(n,t){return function(e){return l(n,!0),t&&t(e),e}}function c(r,o){var a=r.id;return new X(function(n,t){y("Event ["+a+"] Starting -- waited for "+(r.wTm||"--")+" ms"),r.isRunning=!0,r.abort=function(e){r.abort=null,r.isAborted=!0,l(a,!1),t(Error(e))};var e=o(a);e instanceof X?(s&&(r.to=setTimeout(function(){l(a,!1),t(Error("Timed out after ["+s+"] ms"))},s)),function i(n,e,t,r){e.then(function(e){return e instanceof X?(y("Event ["+n+"] returned a promise -- waiting"),i(n,e,t,r),e):d(n,t)(e)},d(n,r))}(a,e,function(e){y("Event ["+a+"] Resolving after "+(te()-r.tm)+" ms"),n(e)},t)):(y("Promise ["+a+"] Auto completed as the start action did not return a promise"),n())})}function f(e){var n=te();return e.wTm=n-e.tm,e.tm=n,e.isAborted?X.reject(Error("["+i+"] was aborted")):($.push(e),c(e,t))}}})}re.incomplete=function(){return $},re.waitingToStart=function(){return ee},n=re;var ie=(oe.getFieldType=x,oe);function oe(e){var l=this,o={},a=[],s=[];function u(e,n){var t=o[e];if(!(i=t?t[n]:i)&&null!==i){if(f.isString(e)&&f.isString(n))if(0<s.length){for(var r=0;r<s.length;r++)if(s[r].handleField(e,n)){i={canHandle:!0,fieldHandler:s[r]};break}}else 0===a.length&&(i={canHandle:!0});if(!i&&null!==i)for(var i=null,r=0;r<a.length;r++)if(a[r].handleField(e,n)){i={canHandle:!0,handler:a[r],fieldHandler:null};break}(t=t||(o[e]={}))[n]=i}return i}function d(e,n,t,r,i,o){if(e.handler)return e.handler.property(n,t,i,o);if(!f.isNullOrUndefined(i.kind)){if(4096==(4096&r)||!F(i.kind))return null;i.value=i.value.toString()}return function u(i,o,a,e,n){var t,s,r;return n&&i&&(t=i.getSanitizer(o,a,e,n.kind,n.propertyType))&&(4===e?(s={},r=n.value,f.objForEachKey(r,function(e,n){var t,r=o+"."+a;h(n)&&(t=c(0,0,n),(t=u(i,r,e,x(n),t))&&(s[e]=t.value))}),n.value=s):n=t.call(l,e={path:o,name:a,type:e,prop:n,sanitizer:l})),n}(e.fieldHandler,n,t,r,i)}function c(e,n,t){return h(t)?{value:t}:null}e&&s.push(e),l.addSanitizer=function(e){e&&(a.push(e),o={})},l.addFieldSanitizer=function(e){e&&(s.push(e),o={})},l.handleField=function(e,n){return!!(n=u(e,n))&&n.canHandle},l.value=function(e,n,t,r){var i=u(e,n);if(i&&i.canHandle){if(!i||!i.canHandle)return null;if(i.handler)return i.handler.value(e,n,t,r);if(!f.isString(n)||f.isNullOrUndefined(t)||""===t)return null;var o=null,a=x(t);if(8192==(8192&a)){var s=-8193&a;if(!h((o=t).value)||1!=s&&2!=s&&3!=s&&4096!=(4096&s))return null}else 1===a||2===a||3===a||4096==(4096&a)?o=c(0,0,t):4===a&&(o=c(0,0,r?JSON.stringify(t):t));if(o)return d(i,e,n,a,o,r)}return null},l.property=function(e,n,t,r){var i=u(e,n);if(!i||!i.canHandle)return null;if(!f.isString(n)||f.isNullOrUndefined(t)||!h(t.value))return null;var o=x(t.value);return 0===o?null:d(i,e,n,o,t,r)}}e.BaseTelemetryPlugin=f.BaseTelemetryPlugin,e.DiagnosticLogger=f.DiagnosticLogger,e.EventHelper=f.EventHelper,e.EventsDiscardedReason=f.EventsDiscardedReason,e.LoggingSeverity=f.LoggingSeverity,e.MinChannelPriorty=f.MinChannelPriorty,e.NotificationManager=f.NotificationManager,e.PerfEvent=f.PerfEvent,e.PerfManager=f.PerfManager,e.ProcessTelemetryContext=f.ProcessTelemetryContext,e.Undefined=f.strUndefined,e.addEventHandler=f.addEventHandler,e.areCookiesSupported=f.areCookiesSupported,e.arrForEach=f.arrForEach,e.arrIndexOf=f.arrIndexOf,e.arrMap=f.arrMap,e.arrReduce=f.arrReduce,e.attachEvent=f.attachEvent,e.cookieAvailable=f.areCookiesSupported,e.createCookieMgr=f.createCookieMgr,e.dateNow=f.dateNow,e.detachEvent=f.detachEvent,e.disallowsSameSiteNone=f.uaDisallowsSameSiteNone,e.doPerf=f.doPerf,e.dumpObj=f.dumpObj,e.generateW3CId=f.generateW3CId,e.getConsole=f.getConsole,e.getCrypto=f.getCrypto,e.getDocument=f.getDocument,e.getExceptionName=f.getExceptionName,e.getGlobal=f.getGlobal,e.getGlobalInst=f.getGlobalInst,e.getHistory=f.getHistory,e.getIEVersion=f.getIEVersion,e.getISOString=f.toISOString,e.getJSON=f.getJSON,e.getLocation=f.getLocation,e.getMsCrypto=f.getMsCrypto,e.getNavigator=f.getNavigator,e.getPerformance=f.getPerformance,e.getSetValue=f.getSetValue,e.getWindow=f.getWindow,e.hasDocument=f.hasDocument,e.hasHistory=f.hasHistory,e.hasJSON=f.hasJSON,e.hasNavigator=f.hasNavigator,e.hasOwnProperty=f.hasOwnProperty,e.hasWindow=f.hasWindow,e.isArray=f.isArray,e.isBoolean=f.isBoolean,e.isDate=f.isDate,e.isError=f.isError,e.isFunction=f.isFunction,e.isIE=f.isIE,e.isNotTruthy=f.isNotTruthy,e.isNullOrUndefined=f.isNullOrUndefined,e.isNumber=f.isNumber,e.isObject=f.isObject,e.isReactNative=f.isReactNative,e.isString=f.isString,e.isTruthy=f.isTruthy,e.isTypeof=f.isTypeof,e.isUndefined=f.isUndefined,e.newGuid=f.newGuid,e.newId=f.newId,e.normalizeJsName=f.normalizeJsName,e.objCreate=f.objCreate,e.objDefineAccessors=f.objDefineAccessors,e.objForEachKey=f.objForEachKey,e.objKeys=f.objKeys,e.optimizeObject=f.optimizeObject,e.perfNow=f.perfNow,e.proxyAssign=f.proxyAssign,e.random32=f.random32,e.randomValue=f.randomValue,e.safeGetCookieMgr=f.safeGetCookieMgr,e.safeGetLogger=f.safeGetLogger,e.setEnableEnvMocks=f.setEnableEnvMocks,e.setValue=f.setValue,e.strContains=f.strContains,e.strEndsWith=f.strEndsWith,e.strExtensionConfig=f.strExtensionConfig,e.strFunction=f.strFunction,e.strIKey=f.strIKey,e.strObject=f.strObject,e.strPrototype=f.strPrototype,e.strStartsWith=f.strStartsWith,e.strTrim=f.strTrim,e.strUndefined=f.strUndefined,e.throwError=f.throwError,e.toISOString=f.toISOString,e.AppInsightsCore=B,e.BaseCore=K,e.CoreUtils=H,e.ESPromise=X,e.ESPromiseScheduler=n,e.EventLatency=u,e.EventPersistence={Normal:1,Critical:2},e.EventPropertyType=a,e.FullVersionString=d,e.TraceLevel={NONE:0,ERROR:1,WARNING:2,INFORMATION:3},e.Utils=_,e.ValueKind=i,e.ValueSanitizer=ie,e.Version=s,e._ExtendedInternalMessageId=l,e.addPageUnloadEventListener=R,e.createGuid=j,e.deleteCookie=O,e.disableCookies=P,e.extend=k,e.getCommonSchemaMetaData=N,e.getCookie=A,e.getCookieValue=T,e.getFieldValueType=x,e.getTenantId=y,e.getTime=D,e.isArrayValid=U,e.isBeaconsSupported=S,e.isDocumentObjectAvailable=m,e.isLatency=C,e.isUint8ArrayAvailable=b,e.isValueAssigned=h,e.isValueKind=F,e.isWindowObjectAvailable=p,e.sanitizeProperty=E,e.setCookie=w,e.setProcessTelemetryTimings=V,e.useXDomainRequest=I,function(e,n,t){var r=Object.defineProperty;if(r)try{return r(e,n,t)}catch(i){}typeof t.value!==undefined&&(e[n]=t.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@microsoft/applicationinsights-shims"),require("@microsoft/applicationinsights-core-js"),require("@microsoft/dynamicproto-js")):"function"==typeof define&&define.amd?define(["exports","@microsoft/applicationinsights-shims","@microsoft/applicationinsights-core-js","@microsoft/dynamicproto-js"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).oneDS=e.oneDS||{},e.applicationinsightsShims,e.applicationinsightsCoreJs,e.dynamicProto);
var e=this,n=function(e,r,f,n){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}var o=t(n),i={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},u={Normal:1,CostDeferred:2,RealTime:3,Immediate:4},a={Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9},l=r.__assignFn(r.__assignFn({},f._InternalMessageId),{AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}),s="3.1.1",d="1DS-Web-JS-"+s,c=((ie={})[0]=a.Unspecified,ie[2]=a.Double,ie[1]=a.String,ie[3]=a.Bool,ie[4098]=a.Double,ie[4097]=a.String,ie[4099]=a.Bool,ie),g=null,m=null,v=!!f.getDocument(),p=!!f.getWindow();function h(e){return!(""===e||f.isNullOrUndefined(e))}function y(e){if(e){var n=e.indexOf("-");if(-1<n)return e.substring(0,n)}return""}function S(){return g=null===g?f.hasNavigator()&&!!f.getNavigator().sendBeacon:g}function b(){return m=null===m?!(f.isUndefined(Uint8Array)||(e=f.getNavigator(),!f.isUndefined(e)&&e.userAgent&&(~(e=e.userAgent.toLowerCase()).indexOf("safari")||~e.indexOf("firefox"))&&!~e.indexOf("chrome"))||f.isReactNative()):m;var e}function C(e){return!!(e&&f.isNumber(e)&&e>=u.Normal&&e<=u.Immediate)}function E(e,n,t){if(!n&&!h(n)||"string"!=typeof e)return null;if("string"==(e=typeof n)||"number"==e||"boolean"==e||f.isArray(n))n={value:n};else if("object"!=e||n.hasOwnProperty("value")){if(f.isNullOrUndefined(n.value)||""===n.value||!f.isString(n.value)&&!f.isNumber(n.value)&&!f.isBoolean(n.value)&&!f.isArray(n.value))return null}else n={value:t?JSON.stringify(n):n};if(f.isArray(n.value)&&!U(n.value))return null;if(!f.isNullOrUndefined(n.kind)){if(f.isArray(n.value)||!F(n.kind))return null;n.value=n.value.toString()}return n}function I(){if(typeof XMLHttpRequest!==undefined){var e=f.getGlobalInst("XMLHttpRequest");if(e)return e=new e,!(!f.isUndefined(e.withCredentials)||typeof XDomainRequest===undefined)}}function N(e,n,t){var r=-1;return f.isUndefined(e)||(0<n&&(32===n?r=8192:n<=13&&(r=n<<5)),0<=t&&t<=9?(-1===r&&(r=0),r|=t):(e=c[x(e)]||-1,-1!==r&&-1!==e?r|=e:e===a.Double&&(r=e))),r}function P(){f.safeGetCookieMgr(null).setEnabled(!1)}function w(e,n,t){f.areCookiesSupported(null)&&f.safeGetCookieMgr(null).set(e,n,86400*t,null,"/")}function O(e){f.areCookiesSupported(null)&&f.safeGetCookieMgr(null).del(e)}function A(e){return f.areCookiesSupported(null)?T(f.safeGetCookieMgr(null),e):""}function T(e,n,t){var r;return void 0===t&&(t=!0),e&&(r=e.get(n),t&&r&&decodeURIComponent&&(r=decodeURIComponent(r))),r||""}function j(e){void 0===e&&(e="D");var n=f.newGuid();return"B"===e?n="{"+n+"}":"P"===e?n="("+n+")":"N"===e&&(n=n.replace(/-/g,"")),n}function k(e,n,t,r,i){var o={},a=!1,s=0,u=arguments.length,l=Object[f.strPrototype],d=arguments;for("[object Boolean]"===l.toString.call(d[0])&&(a=d[0],s++);s<u;s++)f.objForEachKey(d[s],function(t,e){a&&e&&f.isObject(e)?f.isArray(e)?(o[t]=o[t]||[],f.arrForEach(e,function(e,n){e&&f.isObject(e)?o[t][n]=k(!0,o[t][n],e):o[t][n]=e})):o[t]=k(!0,o[t],e):o[t]=e});return o}var D=f.perfNow;function F(e){return e===i.NotSet||e>i.NotSet&&e<=i.Pii_IPV4AddressLegacy||e===i.CustomerContent_GenericContent}function U(e){return 0<e.length}function R(e){var n=f.addEventHandler("beforeunload",e),n=f.addEventHandler("unload",e)||n;return f.addEventHandler("pagehide",e)||n}function V(e,n){e.timings=e.timings||{},e.timings.processTelemetryStart=e.timings.processTelemetryStart||{},e.timings.processTelemetryStart[n]=D()}function x(e){var n,t=0;return null!==e&&e!==undefined&&("string"==(n=typeof e)?t=1:"number"==n?t=2:"boolean"==n?t=3:n===r.strShimObject&&(t=4,f.isArray(e)?(t=4096,0<e.length&&(t|=x(e[0]))):f.hasOwnProperty(e,"value")&&(t=8192|x(e.value)))),t}var M,_={Version:s,FullVersionString:d,strUndefined:f.strUndefined,strObject:f.strObject,Undefined:f.strUndefined,arrForEach:f.arrForEach,arrIndexOf:f.arrIndexOf,arrMap:f.arrMap,arrReduce:f.arrReduce,objKeys:f.objKeys,toISOString:f.toISOString,isReactNative:f.isReactNative,isString:f.isString,isNumber:f.isNumber,isBoolean:f.isBoolean,isFunction:f.isFunction,isArray:f.isArray,isObject:f.isObject,strTrim:f.strTrim,isDocumentObjectAvailable:v,isWindowObjectAvailable:p,isValueAssigned:h,getTenantId:y,isBeaconsSupported:S,isUint8ArrayAvailable:b,isLatency:C,sanitizeProperty:E,getISOString:f.toISOString,useXDomainRequest:I,getCommonSchemaMetaData:N,cookieAvailable:f.areCookiesSupported,disallowsSameSiteNone:f.uaDisallowsSameSiteNone,setCookie:w,deleteCookie:O,getCookie:A,createGuid:j,extend:k,getTime:D,isValueKind:F,isArrayValid:U,objDefineAccessors:f.objDefineAccessors,addPageUnloadEventListener:R,setProcessTelemetryTimings:V,addEventHandler:f.addEventHandler,getFieldValueType:x,strEndsWith:f.strEndsWith,objForEachKey:f.objForEachKey},H={_canUseCookies:undefined,isTypeof:f.isTypeof,isUndefined:f.isUndefined,isNullOrUndefined:f.isNullOrUndefined,hasOwnProperty:f.hasOwnProperty,isFunction:f.isFunction,isObject:f.isObject,isDate:f.isDate,isArray:f.isArray,isError:f.isError,isString:f.isString,isNumber:f.isNumber,isBoolean:f.isBoolean,toISOString:f.toISOString,arrForEach:f.arrForEach,arrIndexOf:f.arrIndexOf,arrMap:f.arrMap,arrReduce:f.arrReduce,strTrim:f.strTrim,objCreate:r.objCreateFn,objKeys:f.objKeys,objDefineAccessors:f.objDefineAccessors,addEventHandler:f.addEventHandler,dateNow:f.dateNow,isIE:f.isIE,disableCookies:P,newGuid:f.newGuid,perfNow:f.perfNow,newId:f.newId,randomValue:f.randomValue,random32:f.random32,mwcRandomSeed:f.mwcRandomSeed,mwcRandom32:f.mwcRandom32,generateW3CId:f.generateW3CId},L="version",G="properties",B=(M=f.AppInsightsCore,r.__extendsFn(W,M),W);function W(){var e=M.call(this)||this;return e.pluginVersionStringArr=[],e.pluginVersionString="",o(W,e,function(a,s){a.initialize=function(t,r,i,o){f.doPerf(a,function(){return"AppInsightsCore.initialize"},function(){if(t){t.endpointUrl||(t.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/");var e=t.propertyStorageOverride;if(e&&(!e.getProperty||!e.setProperty))throw Error("Invalid property storage override passed.");t.channels&&f.arrForEach(t.channels,function(e){e&&f.arrForEach(e,function(e){e.identifier&&e.version&&(e=e.identifier+"="+e.version,a.pluginVersionStringArr.push(e))})})}a.getWParam=function(){return"undefined"!=typeof document?0:-1},r&&f.arrForEach(r,function(e){e&&e.identifier&&e.version&&(e=e.identifier+"="+e.version,a.pluginVersionStringArr.push(e))}),a.pluginVersionString=a.pluginVersionStringArr.join(";");try{s.initialize(t,r,i,o)}catch(n){a.logger.throwInternal(f.LoggingSeverity.CRITICAL,l.ErrorProvidedChannels,"Channels must be provided through config.channels only")}a.pollInternalLogs("InternalLog")},function(){return{config:t,extensions:r,logger:i,notificationManager:o}})},a.track=function(t){f.doPerf(a,function(){return"AppInsightsCore.track"},function(){var e,n=t;n&&(n.timings=n.timings||{},n.timings.trackStart=D(),C(n.latency)||(n.latency=u.Normal),(e=n.ext=n.ext||{}).sdk=e.sdk||{},e.sdk.ver=d,(e=n.baseData=n.baseData||{})[G]||(e[G]={}),(e=e[G])[L]||(e[L]=""),""!==a.pluginVersionString&&(e[L]=a.pluginVersionString)),s.track(n)},function(){return{item:t}},!t.sync)}}),e}var z,K=(z=f.BaseCore,r.__extendsFn(q,z),q);function q(){var e=z.call(this)||this;return o(q,e,function(o,a){o.initialize=function(e,n,t,r){e&&(e.endpointUrl||(e.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/")),o.getWParam=function(){return v?0:-1};try{a.initialize(e,n,t,r)}catch(i){o.logger.throwInternal(f.LoggingSeverity.CRITICAL,l.ErrorProvidedChannels,"Channels must be provided through config.channels only")}},o.track=function(e){var n=e;n&&((e=n.ext=n.ext||{}).sdk=e.sdk||{},e.sdk.ver=d),a.track(n)}}),e}var J=f.isFunction,X=(Q.resolve=function(r){return r instanceof Q?r:r&&J(r.then)?new Q(function(e,n){try{r.then(e,n)}catch(t){n(t)}}):new Q(function(e){e(r)})},Q.reject=function(t){return new Q(function(e,n){n(t)})},Q.all=function(s){if(s&&s.length)return new Q(function(r,e){try{for(var i=[],o=0,n=0;n<s.length;n++){var t=s[n];t&&J(t.then)?(o++,t.then(function(n,t){return function(e){n[t]=e,0==--o&&r(i)}}(i,n),e)):i[n]=t}0===o&&setTimeout(function(){r(i)},0)}catch(a){e(a)}})},Q.race=function(i){return new Q(function(n,t){if(i&&i.length)try{for(var r=0;r<i.length;r++)!function(){var e=i[r];e&&J(e.then)?e.then(n,t):setTimeout(function(){n(e)},0)}()}catch(e){t(e)}})},Q);function Q(n){var a=0,s=null,e=[];function i(t,r,i,o){e.push(function(){var e;try{(e=1===a?J(t)?t(s):s:J(r)?r(s):s)instanceof Q?e.then(i,o):(2!==a||J(r)?i:o)(e)}catch(n){return void o(n)}}),0!==a&&u()}function u(){var r;0<e.length&&(r=e.slice(),e=[],setTimeout(function(){for(var e=0,n=r.length;e<n;++e)try{r[e]()}catch(t){}},0))}function t(e){0===a&&(s=e,a=1,u())}function r(e){0===a&&(s=e,a=2,u())}o(Q,this,function(n){n.then=function(t,r){return new Q(function(e,n){i(t,r,e,n)})},n["catch"]=function(e){return n.then(null,e)}}),function(){if(!J(n))throw new TypeError("ESPromise: resolvedFunc argument is not a Function");try{n(t,r)}catch(e){r(e)}}()}var Z=6e5,Y=0,$=[],ee=[],ne=[];function te(){return(new Date).getTime()}function re(e,n){var p=0,h=(e||"<unnamed>")+"."+Y;function y(e){var n=f.getGlobal();n&&n.QUnit&&console&&console.log("ESPromiseScheduler["+h+"] "+e)}function S(e){n&&n.warnToConsole("ESPromiseScheduler["+h+"] "+e)}Y++,o(re,this,function(e){var g=null,m=0;function v(e,n){for(var t=0;t<e.length;t++)if(e[t].id===n)return e.splice(t,1)[0];return null}e.scheduleEvent=function(t,e,s){var i=h+"."+m;m++,e&&(i+="-("+e+")");var o,a,n,r=i+"{"+p+"}";return p++,(e={evt:null,tm:te(),id:r,isRunning:!1,isAborted:!1}).evt=g?(o=e,a=g,n=new X(function(n,t){var e=te()-a.tm,r=a.id;y("["+i+"] is waiting for ["+r+":"+e+" ms] to complete before starting -- ["+ee.length+"] waiting and ["+$.length+"] running"),o.abort=function(e){o.abort=null,v(ee,i),o.isAborted=!0,t(Error(e))},a.evt.then(function(e){v(ee,i),f(o).then(n,t)},function(e){v(ee,i),f(o).then(n,t)})}),ee.push(o),n):f(e),(g=e).evt._schId=r,e.evt;function u(e){for(var n=te(),t=n-Z,r=e.length,i=0;i<r;){var o,a=e[i];a&&a.tm<t?(o=null,a.abort?(o="Aborting ["+a.id+"] due to Excessive runtime ("+(n-a.tm)+" ms)",a.abort(o)):o="Removing ["+a.id+"] due to Excessive runtime ("+(n-a.tm)+" ms)",S(o),e.splice(i,1),r--):i++}}function l(e,n){var t,r=!1,i=v($,e);i||(i=v(ne,e),r=!0),i?(i.to&&(clearTimeout(i.to),i.to=null),t=te()-i.tm,n?r?S("Timed out event ["+e+"] finally complete -- "+t+" ms"):y("Promise ["+e+"] Complete -- "+t+" ms"):(ne.push(i),S("Event ["+e+"] Timed out and removed -- "+t+" ms"))):y("Failed to remove ["+e+"] from running queue"),g&&g.id===e&&(g=null),u($),u(ee),u(ne)}function d(n,t){return function(e){return l(n,!0),t&&t(e),e}}function c(r,o){var a=r.id;return new X(function(n,t){y("Event ["+a+"] Starting -- waited for "+(r.wTm||"--")+" ms"),r.isRunning=!0,r.abort=function(e){r.abort=null,r.isAborted=!0,l(a,!1),t(Error(e))};var e=o(a);e instanceof X?(s&&(r.to=setTimeout(function(){l(a,!1),t(Error("Timed out after ["+s+"] ms"))},s)),function i(n,e,t,r){e.then(function(e){return e instanceof X?(y("Event ["+n+"] returned a promise -- waiting"),i(n,e,t,r),e):d(n,t)(e)},d(n,r))}(a,e,function(e){y("Event ["+a+"] Resolving after "+(te()-r.tm)+" ms"),n(e)},t)):(y("Promise ["+a+"] Auto completed as the start action did not return a promise"),n())})}function f(e){var n=te();return e.wTm=n-e.tm,e.tm=n,e.isAborted?X.reject(Error("["+i+"] was aborted")):($.push(e),c(e,t))}}})}re.incomplete=function(){return $},re.waitingToStart=function(){return ee},n=re;var ie=(oe.getFieldType=x,oe);function oe(e){var l=this,o={},a=[],s=[];function u(e,n){var t=o[e];if(!(i=t?t[n]:i)&&null!==i){if(f.isString(e)&&f.isString(n))if(0<s.length){for(var r=0;r<s.length;r++)if(s[r].handleField(e,n)){i={canHandle:!0,fieldHandler:s[r]};break}}else 0===a.length&&(i={canHandle:!0});if(!i&&null!==i)for(var i=null,r=0;r<a.length;r++)if(a[r].handleField(e,n)){i={canHandle:!0,handler:a[r],fieldHandler:null};break}(t=t||(o[e]={}))[n]=i}return i}function d(e,n,t,r,i,o){if(e.handler)return e.handler.property(n,t,i,o);if(!f.isNullOrUndefined(i.kind)){if(4096==(4096&r)||!F(i.kind))return null;i.value=i.value.toString()}return function u(i,o,a,e,n){var t,s,r;return n&&i&&(t=i.getSanitizer(o,a,e,n.kind,n.propertyType))&&(4===e?(s={},r=n.value,f.objForEachKey(r,function(e,n){var t,r=o+"."+a;h(n)&&(t=c(0,0,n),(t=u(i,r,e,x(n),t))&&(s[e]=t.value))}),n.value=s):n=t.call(l,e={path:o,name:a,type:e,prop:n,sanitizer:l})),n}(e.fieldHandler,n,t,r,i)}function c(e,n,t){return h(t)?{value:t}:null}e&&s.push(e),l.addSanitizer=function(e){e&&(a.push(e),o={})},l.addFieldSanitizer=function(e){e&&(s.push(e),o={})},l.handleField=function(e,n){return!!(n=u(e,n))&&n.canHandle},l.value=function(e,n,t,r){var i=u(e,n);if(i&&i.canHandle){if(!i||!i.canHandle)return null;if(i.handler)return i.handler.value(e,n,t,r);if(!f.isString(n)||f.isNullOrUndefined(t)||""===t)return null;var o=null,a=x(t);if(8192==(8192&a)){var s=-8193&a;if(!h((o=t).value)||1!=s&&2!=s&&3!=s&&4096!=(4096&s))return null}else 1===a||2===a||3===a||4096==(4096&a)?o=c(0,0,t):4===a&&(o=c(0,0,r?JSON.stringify(t):t));if(o)return d(i,e,n,a,o,r)}return null},l.property=function(e,n,t,r){var i=u(e,n);if(!i||!i.canHandle)return null;if(!f.isString(n)||f.isNullOrUndefined(t)||!h(t.value))return null;var o=x(t.value);return 0===o?null:d(i,e,n,o,t,r)}}e.BaseTelemetryPlugin=f.BaseTelemetryPlugin,e.DiagnosticLogger=f.DiagnosticLogger,e.EventHelper=f.EventHelper,e.EventsDiscardedReason=f.EventsDiscardedReason,e.LoggingSeverity=f.LoggingSeverity,e.MinChannelPriorty=f.MinChannelPriorty,e.NotificationManager=f.NotificationManager,e.PerfEvent=f.PerfEvent,e.PerfManager=f.PerfManager,e.ProcessTelemetryContext=f.ProcessTelemetryContext,e.Undefined=f.strUndefined,e.addEventHandler=f.addEventHandler,e.areCookiesSupported=f.areCookiesSupported,e.arrForEach=f.arrForEach,e.arrIndexOf=f.arrIndexOf,e.arrMap=f.arrMap,e.arrReduce=f.arrReduce,e.attachEvent=f.attachEvent,e.cookieAvailable=f.areCookiesSupported,e.createCookieMgr=f.createCookieMgr,e.dateNow=f.dateNow,e.detachEvent=f.detachEvent,e.disallowsSameSiteNone=f.uaDisallowsSameSiteNone,e.doPerf=f.doPerf,e.dumpObj=f.dumpObj,e.generateW3CId=f.generateW3CId,e.getConsole=f.getConsole,e.getCrypto=f.getCrypto,e.getDocument=f.getDocument,e.getExceptionName=f.getExceptionName,e.getGlobal=f.getGlobal,e.getGlobalInst=f.getGlobalInst,e.getHistory=f.getHistory,e.getIEVersion=f.getIEVersion,e.getISOString=f.toISOString,e.getJSON=f.getJSON,e.getLocation=f.getLocation,e.getMsCrypto=f.getMsCrypto,e.getNavigator=f.getNavigator,e.getPerformance=f.getPerformance,e.getSetValue=f.getSetValue,e.getWindow=f.getWindow,e.hasDocument=f.hasDocument,e.hasHistory=f.hasHistory,e.hasJSON=f.hasJSON,e.hasNavigator=f.hasNavigator,e.hasOwnProperty=f.hasOwnProperty,e.hasWindow=f.hasWindow,e.isArray=f.isArray,e.isBoolean=f.isBoolean,e.isDate=f.isDate,e.isError=f.isError,e.isFunction=f.isFunction,e.isIE=f.isIE,e.isNotTruthy=f.isNotTruthy,e.isNullOrUndefined=f.isNullOrUndefined,e.isNumber=f.isNumber,e.isObject=f.isObject,e.isReactNative=f.isReactNative,e.isString=f.isString,e.isTruthy=f.isTruthy,e.isTypeof=f.isTypeof,e.isUndefined=f.isUndefined,e.newGuid=f.newGuid,e.newId=f.newId,e.normalizeJsName=f.normalizeJsName,e.objCreate=f.objCreate,e.objDefineAccessors=f.objDefineAccessors,e.objForEachKey=f.objForEachKey,e.objKeys=f.objKeys,e.optimizeObject=f.optimizeObject,e.perfNow=f.perfNow,e.proxyAssign=f.proxyAssign,e.random32=f.random32,e.randomValue=f.randomValue,e.safeGetCookieMgr=f.safeGetCookieMgr,e.safeGetLogger=f.safeGetLogger,e.setEnableEnvMocks=f.setEnableEnvMocks,e.setValue=f.setValue,e.strContains=f.strContains,e.strEndsWith=f.strEndsWith,e.strExtensionConfig=f.strExtensionConfig,e.strFunction=f.strFunction,e.strIKey=f.strIKey,e.strObject=f.strObject,e.strPrototype=f.strPrototype,e.strStartsWith=f.strStartsWith,e.strTrim=f.strTrim,e.strUndefined=f.strUndefined,e.throwError=f.throwError,e.toISOString=f.toISOString,e.AppInsightsCore=B,e.BaseCore=K,e.CoreUtils=H,e.ESPromise=X,e.ESPromiseScheduler=n,e.EventLatency=u,e.EventPersistence={Normal:1,Critical:2},e.EventPropertyType=a,e.FullVersionString=d,e.TraceLevel={NONE:0,ERROR:1,WARNING:2,INFORMATION:3},e.Utils=_,e.ValueKind=i,e.ValueSanitizer=ie,e.Version=s,e._ExtendedInternalMessageId=l,e.addPageUnloadEventListener=R,e.createGuid=j,e.deleteCookie=O,e.disableCookies=P,e.extend=k,e.getCommonSchemaMetaData=N,e.getCookie=A,e.getCookieValue=T,e.getFieldValueType=x,e.getTenantId=y,e.getTime=D,e.isArrayValid=U,e.isBeaconsSupported=S,e.isDocumentObjectAvailable=v,e.isLatency=C,e.isUint8ArrayAvailable=b,e.isValueAssigned=h,e.isValueKind=F,e.isWindowObjectAvailable=p,e.sanitizeProperty=E,e.setCookie=w,e.setProcessTelemetryTimings=V,e.useXDomainRequest=I,function(e,n,t){var r=Object.defineProperty;if(r)try{return r(e,n,t)}catch(i){}typeof t.value!==undefined&&(e[n]=t.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@microsoft/applicationinsights-shims"),require("@microsoft/applicationinsights-core-js"),require("@microsoft/dynamicproto-js")):"function"==typeof define&&define.amd?define(["exports","@microsoft/applicationinsights-shims","@microsoft/applicationinsights-core-js","@microsoft/dynamicproto-js"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).oneDS=e.oneDS||{},e.applicationinsightsShims,e.applicationinsightsCoreJs,e.dynamicProto);
//# sourceMappingURL=ms.core.min.js.map
{
"name": "@microsoft/1ds-core-js",
"version": "3.1.0",
"version": "3.1.1",
"description": "Microsoft Application Insights JavaScript SDK - 1ds-core-js extensions",

@@ -5,0 +5,0 @@ "author": "Microsoft Application Insights Team",

@@ -94,2 +94,8 @@ /**

RealTime: 3,
/**
* Bypass normal batching/timing and send as soon as possible, this will still send asynchronously.
* Added in v3.1.1
*/
Immediate: 4,
};

@@ -96,0 +102,0 @@

@@ -9,3 +9,3 @@ /**

import { IEventProperty, IExtendedTelemetryItem } from "./DataModels";
import { EventPropertyType, _ExtendedInternalMessageId, GuidStyle, ValueKind, FieldValueSanitizerType } from "./Enums";
import { EventPropertyType, _ExtendedInternalMessageId, GuidStyle, ValueKind, FieldValueSanitizerType, EventLatency } from "./Enums";
import {

@@ -110,3 +110,3 @@ ITelemetryItem, getDocument, hasNavigator, getNavigator, getWindow, getGlobalInst,

export function isLatency(value: number | undefined): boolean {
if (value && isNumber(value) && value >= 1 && value <= 3) {
if (value && isNumber(value) && value >= EventLatency.Normal && value <= EventLatency.Immediate) {
return true;

@@ -113,0 +113,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc